forum.coppermine-gallery.net
Support => cpg1.3.x Support => Older/other versions => cpg1.3 Miscellaneous => Topic started by: psundstrom on June 11, 2004, 12:13:37 pm
-
I want to change the link to ecard.php to call my own ecard script.
I've edited displayimage.php and changed:
$ecard_tgt = "ecard.php?album=$album$cat_link&pid=$pid&pos=$pos";
to
$ecard_tgt = "/cgi-bin/postcard.cgi?image=$picname";
I've tried all sorts of other variables apart from $picname, but the value is always blank. I just need to have a variable that has the image URL.
-
do not mess around in displayimage.php - instead, edit themes/yourtheme/theme.php and change the ecard link there.
GauGau
-
Thanks for the info GauGau.
However, I can't get it to recognise the image URL.
I edited theme.php and changed the email link to be:
<a href="/cgi-bin/postcard.cgi?image={PIC_URL}" title="{ECARD_TITLE}"><img src="themes/hardwired/images/ecard.gif" width="21" height="15" border="0" align="absmiddle" alt="{ECARD_TITLE}"></a>
But the {PIC_URL} doesn't get expanded and the postcard.cgi script sees the parameter as a literal {PIC_URL}. Seeing as {PIC_URL} is used to display the image, I don't understand why the above doesn't work.
-
Unfortunately my PHP knowledge is very limited, so if I can just find out how to define a variable that holds the image URL, then I'll be set. :D
-
using {PIC_URL} in this context is just whishfull thinking, won't work this way. Go back to the original link (<a href="{ECARD_TGT}" title="{ECARD_TITLE}"><img src="images/ecard.gif" width="16" height="16" border="0" align="absmiddle" alt="{ECARD_TITLE}"></a>). In fact I was wrong in my first post, you should edit displayimage.php. Change
$ecard_tgt = "ecard.php?album=$album$cat_link&pid=$pid&pos=$pos";
to$picture_url = get_pic_url($CURRENT_PIC_DATA, 'fullsize');
$ecard_tgt = "/cgi-bin/postcard.cgi?image=$picture_url";
instead (not tested though).
Please report back
GauGau
-
That did the trick.
Thank you very much GauGau. :D