phpBBHacks.com - Great idea to speed SMARTOR Photo Gallery up - Page 2
Get Photoshop help and share your work at PhotoshopForums.com
StatsForums Home   RegisterRegister   ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in
FAQFAQ   SearchSearch   MemberlistMemberlist   TutorialsTutorials   ContactContact Us
Add Us:     MySpace     Facebook     StumbleUpon
Username:    Password:
Remember Me?    
Great idea to speed SMARTOR Photo Gallery up
Goto page Previous  1, 2, 3  Next
BlinkList
del.icio.us
Furl
linkaGoGo
reddit
Simpy
Mister Wong
Yahoo! My Web

Post new topic   Reply to topic    phpBBHacks.com Support Forums Forum Index -> phpBB 2 Hack Development
 See a User Guidelines violation? Please contact us.
Author Message

Stunt
New User

Joined: 23 Jan 2007
Posts: 4

PostPosted: August 21st 2007, 12:27 pm    Post subject: Reply with quote

I think this is awesome what you are doing and I wish I had joined this topic sooner. I am also running this album with several thousand images and the total is constantly increasing.

I have a question about replacing the counting queries in the album index and album cat pages. I am assuming you mean both album.php and album_cat.php? However I was unable to find the query you posted in either of them or anything similiar. I already set up the incrementing and decrementing upload and delete counter for each category, I just need to do this part.

I am very interested in improving this mod though. It definitely needs work and I am surprised no one else has been actively working on it. My first idea/problem is that as far as I know there is no way to check for duplicate images throughout the categories. My idea is that we add a column to the image information that includes each files exact size and then build a page that shows images that have the same size.

Hopefully you are still checking this topic
Back to top
View user's profile Send private message

JLA
Not So New User

Joined: 03 Dec 2004
Posts: 73

PostPosted: August 21st 2007, 3:30 pm    Post subject: Reply with quote

Stunt wrote:
I think this is awesome what you are doing and I wish I had joined this topic sooner. I am also running this album with several thousand images and the total is constantly increasing.

I have a question about replacing the counting queries in the album index and album cat pages. I am assuming you mean both album.php and album_cat.php? However I was unable to find the query you posted in either of them or anything similiar. I already set up the incrementing and decrementing upload and delete counter for each category, I just need to do this part.

I am very interested in improving this mod though. It definitely needs work and I am surprised no one else has been actively working on it. My first idea/problem is that as far as I know there is no way to check for duplicate images throughout the categories. My idea is that we add a column to the image information that includes each files exact size and then build a page that shows images that have the same size.

Hopefully you are still checking this topic


We do have the ability for checking of duplicate images in our mod by using MD5 and other similar methods thoughout the mod. This way a user cannot upload a duplicate of another picture on the site and there is code that checked all pre-existing images

The way works much better as it uses multiple methods of fingerprinting images which is very accurate.

The counting query is there is you are using smartors album and not FAP

Are you sure you are using the correct mod?

Great to hear you are working on your mod as well. We are now almost at 700,000 pictures and growing everyday and no problems in sight at this point.
_________________
http://www.jlaforums.com
Back to top
View user's profile Send private message

Stunt
New User

Joined: 23 Jan 2007
Posts: 4

PostPosted: August 21st 2007, 4:15 pm    Post subject: Reply with quote

I am using Full Album Pack 1.4.0a, is the counting fixed in this version?
Back to top
View user's profile Send private message

JLA
Not So New User

Joined: 03 Dec 2004
Posts: 73

PostPosted: August 21st 2007, 9:49 pm    Post subject: Reply with quote

No, FAP is a completely different MOD and none of this will apply.

Only applies to the Smartor Photo Album
_________________
http://www.jlaforums.com
Back to top
View user's profile Send private message

Stunt
New User

Joined: 23 Jan 2007
Posts: 4

PostPosted: August 22nd 2007, 3:56 pm    Post subject: Reply with quote

Perhaps you can help me improve how FAP counts the amount of images since I already have the incrementing and decrementing set up.

I believe this is the code that counts the totals...

Code:
// ------------------------------------------------------------------------
// Returns the number of pictures for current catgory and it subs
// ------------------------------------------------------------------------
function album_get_total_pics($cats)
{
   global $db;

   $sql_where = " WHERE c.cat_id " . ( (is_array($cats)) ? "IN (". implode(",", $cats) .")" : "= " . $cats);

   $sql = "SELECT COUNT(p.pic_id) AS count
         FROM " . ALBUM_CAT_TABLE . " AS c
         LEFT JOIN " . ALBUM_TABLE . " AS p ON c.cat_id = p.pic_cat_id " . $sql_where;

   if (!$result = $db->sql_query($sql))
   {
      message_die(GENERAL_ERROR, "Couldn't get total number of pictures for album categories and sub categories", "", __LINE__, __FILE__, $sql);
   }

   if ($db->sql_numrows($result) == 0)
   {
      return 0;
   }

   $row = $db->sql_fetchrow($result);
   $db->sql_freeresult($result);

   return intval($row['count']);
}
Back to top
View user's profile Send private message

JLA
Not So New User

Joined: 03 Dec 2004
Posts: 73

PostPosted: August 22nd 2007, 4:02 pm    Post subject: Reply with quote

Stunt wrote:
Perhaps you can help me improve how FAP counts the amount of images since I already have the incrementing and decrementing set up.

I believe this is the code that counts the totals...

Code:
// ------------------------------------------------------------------------
// Returns the number of pictures for current catgory and it subs
// ------------------------------------------------------------------------
function album_get_total_pics($cats)
{
   global $db;

   $sql_where = " WHERE c.cat_id " . ( (is_array($cats)) ? "IN (". implode(",", $cats) .")" : "= " . $cats);

   $sql = "SELECT COUNT(p.pic_id) AS count
         FROM " . ALBUM_CAT_TABLE . " AS c
         LEFT JOIN " . ALBUM_TABLE . " AS p ON c.cat_id = p.pic_cat_id " . $sql_where;

   if (!$result = $db->sql_query($sql))
   {
      message_die(GENERAL_ERROR, "Couldn't get total number of pictures for album categories and sub categories", "", __LINE__, __FILE__, $sql);
   }

   if ($db->sql_numrows($result) == 0)
   {
      return 0;
   }

   $row = $db->sql_fetchrow($result);
   $db->sql_freeresult($result);

   return intval($row['count']);
}


You are going to have to 1st establish a new field that will have the current pic count of the cat

Then get rid of that query and write a new one that will get that new value
_________________
http://www.jlaforums.com
Back to top
View user's profile Send private message

Mighty Gorgon
Not So New User

Joined: 10 Aug 2007
Posts: 41
Location: Italy

PostPosted: August 24th 2007, 3:40 am    Post subject: Reply with quote

Yes, I agree that this modification would speed up page loadings a bit in albums with thousands of pics.

Even Thoul suggestion to use the cache mod it's a really good idea... I use it myself on my sites and this speed up things incredibly... I have some pages loading with just one sql thanks to this mod originally created by CyberAlien.

Anyway, back on this topic, I'll try to consider coding this modification in FAP.
_________________
Luca
Back to top
View user's profile Send private message Visit poster's website

JLA
Not So New User

Joined: 03 Dec 2004
Posts: 73

PostPosted: August 24th 2007, 8:25 am    Post subject: Reply with quote

Mighty Gorgon wrote:
Yes, I agree that this modification would speed up page loadings a bit in albums with thousands of pics.

Even Thoul suggestion to use the cache mod it's a really good idea... I use it myself on my sites and this speed up things incredibly... I have some pages loading with just one sql thanks to this mod originally created by CyberAlien.

Anyway, back on this topic, I'll try to consider coding this modification in FAP.


This speeds things up more than a bit. With our album (nearly 700,000 pictures) it went from over a min processing time for the index (and that was with alot of things stripped out - pic details, popular and last added pics, etc) to just a sec or so now The thing that is good is it is such a simple change to make and not quite sure why Smartor didn't do it to begin with. The way that it is written now is not too good as far as that is concerned.

If you want Luca - contact us at at our site and we can discuss this further with you if you like

Best of luck
_________________
http://www.jlaforums.com
Back to top
View user's profile Send private message

Mighty Gorgon
Not So New User

Joined: 10 Aug 2007
Posts: 41
Location: Italy

PostPosted: August 26th 2007, 5:55 pm    Post subject: Reply with quote

Thanks for your offer !

I have already coded this and it is running on both of my sites:

http://www.mightygorgon.com (~3200 pics)

http://www.icyphoenix.com (~140 pics)

I can't notice any speed improvement... but it is due to the small amount of pics and subfolders.

I agree with you that if you have hundred of thousands of pics COUNT sql are not suitable.

Thanks for reporting this issue.

Next version of FAP will have this code included together with a couple of new features.

If someone would like to test it (better if on sites with many pics) I can provide a beta testing package.

Thank you.
_________________
Luca
Back to top
View user's profile Send private message Visit poster's website

JLA
Not So New User

Joined: 03 Dec 2004
Posts: 73

PostPosted: August 26th 2007, 6:21 pm    Post subject: Reply with quote

Stunt wrote:
I am using Full Album Pack 1.4.0a, is the counting fixed in this version?


Well Stunt - it appears that Luca might have come up with something similar to what we developed for Smartor's album.

This would be a great thing for those who have chosen to use FAP over Smartor's. When we looked at FAP, it really wasnt' right for us as it had many of the same weaknesses as did Smartor's mod along with alot of extra features that were entirely too much bloat for a gallery with a large amount of pictures. If any similar improvements have been made to FAP since a couple of months ago, this surely will be a welcome thing to FAP users.

Best of luck to you and your search.
_________________
http://www.jlaforums.com
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    phpBBHacks.com Support Forums Forum Index -> phpBB 2 Hack Development All times are GMT - 6 Hours
Goto page Previous  1, 2, 3  Next
Page 2 of 3
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum



Links: Big Message Boards - Free JavaScript - phpBB2 - phpbb styles - Suporte phpBB - phpBB.it - phpBB Česky - phpBB Turkiye - phpBBArabia.com - phpBB-fr.com - Romanian phpBB online community - phpBB-TW.net - phpBBservice.nl - phpBB Brasil

Network: iFroggy Network Blog - iFroggy Hosting - SportsForums.net - KarateForums.com - YanksBlog.com - PhotoshopForums.com - DeveloperCube - Managing Online Forums - ManagingCommunities.com - CommunityAdmins.com - DrGregHouse.com - Bad Boy Blog - SodaRatings.com - Patrick O'Keefe

< Advertising - Contact Us - Staff - User Guidelines >

Copyright © 2001-2009. iFroggy Network, phpBBHacks.com. All Rights Reserved. Privacy Policy. We Support phpBBHacks.com (of course!).
Powered by phpBB © phpBB Group. phpBB SEO. Hosted by 100MegsWebHosting. We are in no way affiliated with the phpBB Group. phpBB is copyright to the phpBB Group.