Using HTML in an image description Using HTML in an image description
 

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

Using HTML in an image description

Started by ejgladwin, August 31, 2005, 05:22:43 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

ejgladwin

Hello,

Is it possible to allow HTML to be used in the description of an image?  I know that you can use BBCODE, but I would like to add a paypal button to a few of my images and the description box seems like the best place to put it (as I always leave that empty usually).

I searched the boards but couldn't find a post where someone had done this.  Would it be easy to make the description field accept HTML, or would it be a big job?  I'm using Coppermine 1.3.2.

Thanks in advance for any help,

Edward ~

http://photos.edgladwin.com/

Joachim Müller

No, html can't be inserted, and I wouldn't modify coppermine to allow it for security reasons unless you're the only one who can edit image descriptions (i.e. users can't upload pics at all on your gallery). However, there are Paypal mods available, search the mods board.

ejgladwin

It is a personal gallery so I am the only one who can upload pics, edit descriptions, etc. (my admin account is the only account) but I will take a look at the other Paypal mods.  I did take a quick look at them but they seemed to have more functionality than I needed, and I've already modified my Coppermine install quite a bit so I didn't want to mess up my current modifications :)   I can probably use the other mods with a little bit of work though :)  Thanks for the reply!

Tranz

If the paypal button is an image, you can use a combination of [img] and [url] tags to make the "button" clickable.

ejgladwin

#4
It is a paypal button actually, but the code for the button goes like this:

<form target="paypal" action="https://www.paypal.com/cgi-bin/webscr" method="post">
<input type="image" src="https://www.paypal.com//en_GB/i/btn/sc-but-02.gif" border="0" name="submit" alt="Make payments with PayPal!">
<input type="hidden" name="add" value="1">
<input type="hidden" name="cmd" value="_cart">
<input type="hidden" name="business" value="myemail@address.com">
<input type="hidden" name="item_name" value="A4 Photo">
<input type="hidden" name="item_number" value="PID255">
<input type="hidden" name="amount" value="14.99">
<input type="hidden" name="no_shipping" value="2">
<input type="hidden" name="no_note" value="1">
<input type="hidden" name="currency_code" value="GBP">
<input type="hidden" name="bn" value="PP-ShopCartBF">
</form>


which would just add a simple button so people could buy an A4 print of a photo from me.  Would there be any way to add the above code to the description without allowing all HTML to be used?  Perhaps by modifying function bb_decode in functions.inc.php?  To allow me to type something like [paypal_button][/paypal button] and have it replaced with the above code?

PS - I'm also going to download and take a look at this mod: http://forum.coppermine-gallery.net/index.php?topic=19491.0 later today, maybe it'll just be easier to use that :)

Tranz