forum.coppermine-gallery.net

Support => cpg1.5.x Support => cpg1.5 themes (visuals) => Topic started by: allvip on March 20, 2014, 03:38:24 pm

Title: Meta albums from idex.php to take the actual image not the thumbs
Post by: allvip on March 20, 2014, 03:38:24 pm
I want to have big thumbnails (300px width) only for the meta albums on the index.php but the thumbnails are just 128px width.I don't won't to crop all the thumbs at 300px because I am on a shared host.

Can coppermine have a condition to use the actual image not the thumbnails for the meta albums only on the index.php?
Title: Re: Meta albums from idex.php to take the actual image not the thumbs
Post by: Αndré on March 20, 2014, 04:02:55 pm
Copy the function theme_display_thumbnails from themes/sample/theme.php to your theme's theme.php file, if it doesn't exist.

Find
Code: [Select]
$superCage = Inspekt::makeSuperCage();and below, add
Code: [Select]
    global $CPG_PHP_SELF;
    if (!is_numeric($aid) && $CPG_PHP_SELF == 'index.php' && $cat == 0) {
        foreach($thumb_list as $key => $value) {
            $thumb_list[$key]['image'] = str_replace('/'.$CONFIG['thumb_pfx'], '/', $value['image']);
        }
    }
Title: Re: Meta albums from idex.php to take the actual image not the thumbs
Post by: allvip on March 20, 2014, 04:08:35 pm
It shows only the filename,no image

src="albums/userpics/10001Charlize_Theron_photoshoot_028.jpg.

and it shows on category pages too.
Title: Re: Meta albums from idex.php to take the actual image not the thumbs
Post by: Αndré on March 20, 2014, 04:25:01 pm
Above code updated.
Title: Re: Meta albums from idex.php to take the actual image not the thumbs
Post by: allvip on March 20, 2014, 04:28:44 pm
Thanks.It worked.

If someone needs this for all the pages just delete  && $cat == 0 from Andre's code.