coppermine-gallery.com/forum

Support => cpg1.4.x Support => Older/other versions => cpg1.4 miscellaneous => Topic started by: racingworld08 on September 27, 2008, 01:14:14 AM

Title: Embedding HTML code into the Description field of a picture.
Post by: racingworld08 on September 27, 2008, 01:14:14 AM
Hi

I have created an album which has several pictures. For each picture, I am inputting text in the description text field describing the picture. I have a situation where I need some of the text in this description field to be a html link to another site. Is this possible?? I tried putting some html code in the description text box but it didnt work.

I would appreciate any assistance in how I can go about doing this if at all possible.

thanks
Title: Re: Embedding HTML code into the Description field of a picture.
Post by: JohnM-UK on September 27, 2008, 01:23:39 AM
You can use BB Code. Example:

http://www.oneuk.f2s.com/photos/displayimage.php?pos=-216 [Edit GauGau] Removed hotlinked image (http://www.oneuk.f2s.com/photos/albums/2007/thumb_C_IMG_1879.jpg), as it serves no particular purpose in your posting. In the future, if you must post reference to an image, don't hotlink it, but attach it [/Edit]

Link I used there:
[url=http://maps.google.co.uk/?ie=UTF8&ll=52.328196,1.683719&spn=0.002419,0.004989&t=k&z=18&om=1]Map[/url]
Which gives:
Map (http://maps.google.co.uk/?ie=UTF8&ll=52.328196,1.683719&spn=0.002419,0.004989&t=k&z=18&om=1)

So..
[url=http://www.yoursite.com/whateverfolder/page.php]Text to link[/url]
Title: Re: Embedding HTML code into the Description field of a picture.
Post by: racingworld08 on September 28, 2008, 11:30:18 PM
thanks for that JohnM.. It worked.  However, I want the link to open up a new window as I dont want users to leave my site. Any assistance on that would be greatful.
Title: Re: Embedding HTML code into the Description field of a picture.
Post by: thomasFRU on October 05, 2008, 05:48:32 PM
change line 594 in function.inc.php to
                $bbcode_tpl['url']  = '<span class="bblink"><a href="{URL}" target="external">{DESCRIPTION}</a></span>';