forum.coppermine-gallery.net

Support => cpg1.3.x Support => Older/other versions => cpg1.3 Themes/Skins/Templates => Topic started by: m-a-b on February 03, 2005, 01:11:19 pm

Title: pid in theme
Post by: m-a-b on February 03, 2005, 01:11:19 pm
hi!

i want to change this line: in themes/classic/theme.php
Code: [Select]
'{LINK_TGT}' => "displayimage.php?album=$aid$cat_link&pos={$thumb['pos']}",
so that the pid of the image is shown.

so i changed $thumb['pos'] to $CURRENT_PIC_DATA[pid] but with no effect.

so i tried many other changes at this part.

can someone help me to find the right code?

thanks!

Markus :-)
Title: Re: pid in theme
Post by: Abbas Ali on February 03, 2005, 01:52:02 pm
In themes/classic/theme.php

Replace

Code: [Select]
function theme_display_thumbnails(&$thumb_list, $nbThumb, $album_name, $aid, $cat, $page, $total_pages, $sort_options, $display_tabs, $mode = 'thumb')
{
    global $CONFIG;

with

Code: [Select]
function theme_display_thumbnails(&$thumb_list, $nbThumb, $album_name, $aid, $cat, $page, $total_pages, $sort_options, $display_tabs, $mode = 'thumb')
{
    global $CONFIG, $CURRENT_PIC_DATA;

and then use $CURRENT_PIC_DATA['pid'] to build the link
Title: Re: pid in theme
Post by: m-a-b on February 07, 2005, 02:02:17 pm
i have even done this before your post - but it does not work.
Title: Re: pid in theme
Post by: Abbas Ali on February 08, 2005, 06:19:27 am
Ok. Edit functions.inc.php

After (around line 1076)

Code: [Select]
$thumb_list[$i]['aid'] = $row['aid'];

Add

Code: [Select]
$thumb_list[$i]['pid'] = $row['pid'];

then edit theme.php and use $thumb['pid'] wherever you want pid.

I have not tested this code but hope it works.

Title: Re: pid in theme
Post by: m-a-b on February 08, 2005, 12:23:32 pm
thanks!

it is working.

i think it should be better if in every link the absolute pid is used and not the pos.
i really do not understand what effect the relative pos should have????????????
Title: Re: pid in theme
Post by: Abbas Ali on February 08, 2005, 12:35:17 pm
pid works fine for normal albums but if you are in some meta album like most viewed, last commented, last uploaded etc then pos plays very important role. Without pos no meta albums will work.
Title: Re: pid in theme
Post by: m-a-b on February 08, 2005, 09:15:21 pm
pid works fine for normal albums but if you are in some meta album like most viewed, last commented, last uploaded etc then pos plays very important role. Without pos no meta albums will work.

i really do not know what you mean with "meta albums"

now every link has the absolute pos for example: http://www.freeforstyle.de/gallery/thumbnails.php?album=lastup&cat=0
an it works...

 ???
Title: Re: pid in theme
Post by: Abbas Ali on February 09, 2005, 06:02:44 am
I meant it for displayimage.php page which comes when you click on the thumbnail. On that page the image navigation requires pos to be passed in get. Also the film strip feature on that page which are nothing but thumbnails require pos.

But i guess since you are making changes only for thumbnails page, everything on displayimage.php should work fine. I guess you won't face any problems. So what you should do is just enjoy Coppermine. :)