Advanced search  

News:

cpg1.5.48 Security release - upgrade mandatory!
The Coppermine development team is releasing a security update for Coppermine in order to counter a recently discovered vulnerability. It is important that all users who run version cpg1.5.46 or older update to this latest version as soon as possible.
[more]

Pages: [1]   Go Down

Author Topic: pid in theme  (Read 5322 times)

0 Members and 1 Guest are viewing this topic.

m-a-b

  • Coppermine newbie
  • Offline Offline
  • Gender: Male
  • Posts: 14
  • augs-burg.de
    • augs-burg.de
pid in theme
« 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 :-)
« Last Edit: February 11, 2005, 02:26:35 pm by GauGau »
Logged

Abbas Ali

  • Administrator
  • Coppermine addict
  • *****
  • Country: in
  • Offline Offline
  • Gender: Male
  • Posts: 2165
  • Spread the PHP Web
    • Ranium Systems
Re: pid in theme
« Reply #1 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
Logged
Chief Geek at Ranium Systems

m-a-b

  • Coppermine newbie
  • Offline Offline
  • Gender: Male
  • Posts: 14
  • augs-burg.de
    • augs-burg.de
Re: pid in theme
« Reply #2 on: February 07, 2005, 02:02:17 pm »

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

Abbas Ali

  • Administrator
  • Coppermine addict
  • *****
  • Country: in
  • Offline Offline
  • Gender: Male
  • Posts: 2165
  • Spread the PHP Web
    • Ranium Systems
Re: pid in theme
« Reply #3 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.

Logged
Chief Geek at Ranium Systems

m-a-b

  • Coppermine newbie
  • Offline Offline
  • Gender: Male
  • Posts: 14
  • augs-burg.de
    • augs-burg.de
Re: pid in theme
« Reply #4 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????????????

Abbas Ali

  • Administrator
  • Coppermine addict
  • *****
  • Country: in
  • Offline Offline
  • Gender: Male
  • Posts: 2165
  • Spread the PHP Web
    • Ranium Systems
Re: pid in theme
« Reply #5 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.
Logged
Chief Geek at Ranium Systems

m-a-b

  • Coppermine newbie
  • Offline Offline
  • Gender: Male
  • Posts: 14
  • augs-burg.de
    • augs-burg.de
Re: pid in theme
« Reply #6 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...

 ???

Abbas Ali

  • Administrator
  • Coppermine addict
  • *****
  • Country: in
  • Offline Offline
  • Gender: Male
  • Posts: 2165
  • Spread the PHP Web
    • Ranium Systems
Re: pid in theme
« Reply #7 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. :)
Logged
Chief Geek at Ranium Systems
Pages: [1]   Go Up
 

Page created in 0.017 seconds with 21 queries.