coppermine-gallery.com/forum

Support => Older/other versions => cpg1.2 Standalone Support => Topic started by: rodan on March 01, 2004, 01:58:32 PM

Title: hyperlink in album description
Post by: rodan on March 01, 2004, 01:58:32 PM
In case I didn´t find anything about this on this board by searching I would like to ask if there is a possibilty to use HTML or BBcode in the album description because I would like to set a hyperlink there to a Zip file on another webspace which contains all the pictures of the album.

I know there are Zip File MODS but in this case the file should be on another webspace ... like this



<a href="http://www.123.com/test.zip"><img src="download.gif" heigth=10 width=10></a>

Can anyone help me. BBcode would also solve the problem !!?

thanks

/rodan
Title: hyperlink in album description
Post by: Nibbler on March 01, 2004, 02:56:15 PM
Use BBCode in the album description

Download zip (//http//www.123.com/test.zip)
Title: :)
Post by: rodan on March 01, 2004, 03:22:44 PM
Thanks it works...

Is it also possible to show a picture instead of the text link ?
I tried several bbcodes for IMG ( I´m not yet really into bbcode - so i don´t know the right one ) but none did function.

If no - no problem ...
otherwise ;) THANKS
Title: hyperlink in album description
Post by: rodan on March 01, 2004, 03:33:20 PM
hmmmm i read this board FAQ but the bbcode for image there and the exact example did not work...

so I´ll use the text link then ... thx
Title: hyperlink in album description
Post by: Nibbler on March 01, 2004, 03:47:12 PM
If you add the img tag processing into functions.php you can use the img tags in your descriptions also.

Search for the function "function bb_decode($text)"

and add the following block above the codes for bold, underline,and italics.


// [img] and [/img] for images
$text = str_replace("[img]", '<img src="', $text);
$text = str_replace("[/img]", '">', $text);


You can add any new BBCode tags you like in this way
Title: hyperlink in album description
Post by: Nibbler on March 01, 2004, 04:00:50 PM
To do exactly what you want, you could create a new tag like this:

into functions.inc.php in the same place a above, add:


$text = str_replace("[zip]", '<a href="http://www.123.com/', $text);
$text = str_replace("[/zip]", '.zip"><img src="download.gif" height=10 width=10></a>', $text);


Then into album descriptions you can use

Quote[zip]test[/zip]

To add your image with link to zip file you specify within the tags.
Title: hyperlink in album description
Post by: Bruz on March 01, 2004, 04:07:23 PM
I think I will use your solution too Nibbler - because there seems to be no way to get the "download an album as .zip"-feature running.

Thx for your advice!
Title: hyperlink in album description
Post by: rodan on March 01, 2004, 05:18:32 PM
danke vielmals & merci beaucoup ... thanks !