static url for cpg static url for cpg
 

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

static url for cpg

Started by niks_007, June 12, 2006, 12:25:59 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

niks_007

Dear Friends,
          I wish to setup links in copermine gallery as static becouse what realy happens that the links are made according to position and when ever new imagea are added the position get changed.

i have readed some where in cpg 1.3 to do that but it wont work in 1.4 any one please help me out...

i wisht to see this link like it is a pic of aishwarya rai but when i send it to some one after few days as new pics added the position get changed
http://www.lakesparadise.com/wallpapers/displayimage.php?album=26&pos=0

some what like
http://www.lakesparadise.com/wallpapers/displayimage.ph?image_id=5265

thanks
Niks

Nibbler

Use the static url provided in the pic info section below each picture in the intermediate view.

niks_007

Dear Sir,
      Thanks for your reply i know that the static link is provided below the image in pic info but when it comes to linking it links or the links follow in following fashion

http://www.lakesparadise.com/wallpapers/displayimage.php?album=26&pos=1

instead of

http://www.lakesparadise.com/wallpapers/displayimage.php?pos=-2626

the above first link is not static as it can be changed or will not follow same image all the time but the second one certainly in copermine support forum few months back i have readed a tecnic through which we can convert these not static links to static as non static is not search engine friendly but now i cant find that any where.

if it is possible to convert those links to static then it will be best for site as search engines can find then better..
...


Thanks
Niks


casNuy


Trev98

I got static URLs working in my gallery by changing this line in include/themes.inc.php (in the theme_display_thumbnails function, around line 1815):

'{LINK_TGT}' => "displayimage.php?album=$aid$cat_link&pos={$thumb['pos']}$uid_link",

to:
'{LINK_TGT}' => "displayimage.php?pos=-" . $thumb['pid'],

I suppose this would work in the other functions, as well in the themes.inc.php file.

Joachim Müller

You mustn't edit themes.inc.php, under no circumstances. Edit themes/yourtheme/theme.php instead!

Trev98

Quote from: GauGau on October 24, 2006, 07:21:37 AM
You mustn't edit themes.inc.php, under no circumstances. Edit themes/yourtheme/theme.php instead!
Oh, ok. Would my change cause a security risk?

Joachim Müller

Indirectly - it will vanish when upgrading, or keep you from upgrading. Changes to custom themes stick. We have noticed in the past that users are reluctant to apply security-related updates because they modified coppermine core files and are afriad to lose their changes. That's why we always suggest changing your custom theme (which will override the default behaviour specified in themes.inc.php).

Trev98

Quote from: GauGau on October 24, 2006, 07:35:15 AM
Indirectly - it will vanish when upgrading, or keep you from upgrading. Changes to custom themes stick. We have noticed in the past that users are reluctant to apply security-related updates because they modified coppermine core files and are afriad to lose their changes. That's why we always suggest changing your custom theme (which will override the default behaviour specified in themes.inc.php).
Gotcha, thanks for the explanation. ;)