Advanced search  

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

Pages: [1]   Go Down

Author Topic: [Solved]: link in the descriptiontext of an album  (Read 4764 times)

0 Members and 1 Guest are viewing this topic.

doggystyle

  • Contributor
  • Coppermine novice
  • ***
  • Offline Offline
  • Posts: 43
[Solved]: link in the descriptiontext of an album
« on: July 19, 2004, 06:36:42 pm »

i would like to change that a link wich is clicked in the description text of an album opens in the same window and not in a new one. wich file i have to modify?

greets

doggy
« Last Edit: July 20, 2004, 06:27:52 pm by GauGau »
Logged

Joachim Müller

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 47843
  • aka "GauGau"
    • gaugau.de
Re: link in the descriptiontext of an album
« Reply #1 on: July 19, 2004, 10:06:52 pm »

edit displayimage.php, find
Code: [Select]
        $pic_html = "<a href=\"{$picture_url}\" target=\"_blank\" class=\"document_link\"><img src=\"".$pic_thumb_url."\" border=\"0\" class=\"image\" /></a>\n<br />";and replace with
Code: [Select]
        $pic_html = "<a href=\"{$picture_url}\" class=\"document_link\"><img src=\"".$pic_thumb_url."\" border=\"0\" class=\"image\" /></a>\n<br />";
GauGau
Logged

doggystyle

  • Contributor
  • Coppermine novice
  • ***
  • Offline Offline
  • Posts: 43
Re: link in the descriptiontext of an album
« Reply #2 on: July 20, 2004, 12:40:12 am »

hmmm doesn't work for me  ???
Logged

Nibbler

  • Guest
Re: link in the descriptiontext of an album
« Reply #3 on: July 20, 2004, 02:36:51 am »

Can you post a link to your gallery ?
Logged

doggystyle

  • Contributor
  • Coppermine novice
  • ***
  • Offline Offline
  • Posts: 43
Re: link in the descriptiontext of an album
« Reply #4 on: July 20, 2004, 02:28:41 pm »

edited line nr. 197 but the html source still shows a "_blank" in the album and picture description.

http://galerie.domnights.de/

thx
Logged

Joachim Müller

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 47843
  • aka "GauGau"
    • gaugau.de
Re: link in the descriptiontext of an album
« Reply #5 on: July 20, 2004, 03:04:43 pm »

OK, this is bbcode - edit include/functions-inc.php, find
Code: [Select]
        $ret = preg_replace("#([\n ])([a-z]+?)://([a-z0-9\-\.,\?!%\*_\#:;~\\&$@\/=\+]+)#i", "\\1<a href=\"\\2://\\3\" target=\"_blank\">\\2://\\3</a>", $ret);
        $ret = preg_replace("#([\n ])www\.([a-z0-9\-]+)\.([a-z0-9\-.\~]+)((?:/[a-z0-9\-\.,\?!%\*_\#:;~\\&$@\/=\+]*)?)#i", "\\1<a href=\"http://www.\\2.\\3\\4\" target=\"_blank\">www.\\2.\\3\\4</a>", $ret);
and replace with
Code: [Select]
        $ret = preg_replace("#([\n ])([a-z]+?)://([a-z0-9\-\.,\?!%\*_\#:;~\\&$@\/=\+]+)#i", "\\1<a href=\"\\2://\\3\">\\2://\\3</a>", $ret);
        $ret = preg_replace("#([\n ])www\.([a-z0-9\-]+)\.([a-z0-9\-.\~]+)((?:/[a-z0-9\-\.,\?!%\*_\#:;~\\&$@\/=\+]*)?)#i", "\\1<a href=\"http://www.\\2.\\3\\4\">www.\\2.\\3\\4</a>", $ret);
, find
Code: [Select]
                $bbcode_tpl['url']  = '<span class="bblink"><a href="{URL}" target="_blank">{DESCRIPTION}</a></span>';and replace with
Code: [Select]
                $bbcode_tpl['url']  = '<span class="bblink"><a href="{URL}">{DESCRIPTION}</a></span>';
GauGau
Logged

doggystyle

  • Contributor
  • Coppermine novice
  • ***
  • Offline Offline
  • Posts: 43
Re: link in the descriptiontext of an album
« Reply #6 on: July 20, 2004, 04:09:01 pm »

that's it!

thx
Logged
Pages: [1]   Go Up
 

Page created in 0.02 seconds with 19 queries.