coppermine-gallery.com/forum

Support => cpg1.4.x Support => Older/other versions => cpg1.4 miscellaneous => Topic started by: niks_007 on June 12, 2006, 12:25:59 AM

Title: static url for cpg
Post by: niks_007 on June 12, 2006, 12:25:59 AM
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
Title: Re: static url for cpg
Post by: Nibbler on June 12, 2006, 01:01:02 AM
Use the static url provided in the pic info section below each picture in the intermediate view.
Title: Re: static url for cpg
Post by: niks_007 on June 12, 2006, 06:03:42 PM
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

Title: Re: static url for cpg
Post by: casNuy on June 21, 2006, 06:28:45 PM
see my answer in :
http://forum.coppermine-gallery.net/index.php?topic=32602.0 (http://forum.coppermine-gallery.net/index.php?topic=32602.0)

Cas
Title: Re: static url for cpg
Post by: Trev98 on October 24, 2006, 02:34:05 AM
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.
Title: Re: static url for cpg
Post by: Joachim Müller on October 24, 2006, 07:21:37 AM
You mustn't edit themes.inc.php, under no circumstances. Edit themes/yourtheme/theme.php instead!
Title: Re: static url for cpg
Post by: Trev98 on October 24, 2006, 07:30:31 AM
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?
Title: Re: static url for cpg
Post by: Joachim Müller 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).
Title: Re: static url for cpg
Post by: Trev98 on October 24, 2006, 08:03:07 AM
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. ;)