Why not use last_addition & pic_count in albums table Why not use last_addition & pic_count in albums table
 

News:

CPG Release 1.6.26
Correct PHP8.2 issues with user and language managers.
Additional fixes for PHP 8.2
Correct PHP8 error with SMF 2.0 bridge.
Correct IPTC supplimental category parsing.
Download and info HERE

Main Menu

Why not use last_addition & pic_count in albums table

Started by Titooy, May 22, 2005, 10:49:22 PM

Previous topic - Next topic

0 Members and 2 Guests are viewing this topic.

Titooy

I presume the reason is the $pic_filter but I honestly think it doesn't worth it since adding these informations to the album tables allows lessening very much the amount of sql queries. (sorry for the very approximative english)

I've tried to write an alternative index file which would run about 250 queries less than the actual one. To achieve this I store the categories/albums structure in php tables. On my computer it loads a bit faster but I have no idea if it doesn't use too much ram...

Maybe the $cpg_categories and $cpg_albums could be stored in the sessions table of the db...

As you have certainly noticed, I'm not very much experimented in php programming so there are certainly mistakes there but maybe it can give another point of vue on the code (or maybe not...)


thumb.php is meant to load the categories and albums thumbs.


The update_db file can be safely applied without messing out your db since it only changes things that are not used in the standard coppermine install.
Categories:
adds a "theme" field (I've added this to allow sub-templates)

Albums:
changes "pic_count" to "file_count"
adds a "last_pid" field
updates file_count, last_addition and last_pid


[edit] it's a very basic code so there's just the breadcrumb and gallery. No theme and modules.


Joachim Müller

[moderation]
bumping this unresolved thread to the top...

Joachim Müller

as none of the devs appears to be willing to look into Titoy's proposal, and it's not an actual bug, but an improvement proposal, I'm moving this thread from "CPG 1.4 Testing/Bugs" to "feature requests", scheduling this for a later stage of coppermine's developent.