pid in theme pid in theme
 

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

pid in theme

Started by m-a-b, February 03, 2005, 01:11:19 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

m-a-b

hi!

i want to change this line: in themes/classic/theme.php
'{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 :-)

Abbas Ali

In themes/classic/theme.php

Replace


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


with


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
Chief Geek at Ranium Systems

m-a-b

i have even done this before your post - but it does not work.

Abbas Ali

Ok. Edit functions.inc.php

After (around line 1076)


$thumb_list[$i]['aid'] = $row['aid'];


Add


$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.

Chief Geek at Ranium Systems

m-a-b

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????????????

Abbas Ali

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.
Chief Geek at Ranium Systems

m-a-b

Quote from: 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.

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...

???

Abbas Ali

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. :)
Chief Geek at Ranium Systems