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]: Changing the ecard link  (Read 4063 times)

0 Members and 1 Guest are viewing this topic.

psundstrom

  • Coppermine newbie
  • Offline Offline
  • Posts: 9
[Solved]: Changing the ecard link
« 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.
« Last Edit: June 27, 2004, 12:45:45 am by GauGau »
Logged

Joachim Müller

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 47843
  • aka "GauGau"
    • gaugau.de
Re: Changing the ecard link
« Reply #1 on: June 14, 2004, 12:06:50 am »

do not mess around in displayimage.php - instead, edit themes/yourtheme/theme.php and change the ecard link there.

GauGau
Logged

psundstrom

  • Coppermine newbie
  • Offline Offline
  • Posts: 9
Re: Changing the ecard link
« Reply #2 on: June 14, 2004, 09:40:44 am »

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.


Logged

psundstrom

  • Coppermine newbie
  • Offline Offline
  • Posts: 9
Re: Changing the ecard link
« Reply #3 on: June 18, 2004, 11:30:03 pm »

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
Logged

Joachim Müller

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 47843
  • aka "GauGau"
    • gaugau.de
Re: Changing the ecard link
« Reply #4 on: June 20, 2004, 03:48:04 pm »

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
Code: [Select]
$ecard_tgt = "ecard.php?album=$album$cat_link&amp;pid=$pid&amp;pos=$pos";to
Code: [Select]
$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
Logged

psundstrom

  • Coppermine newbie
  • Offline Offline
  • Posts: 9
Re: Changing the ecard link
« Reply #5 on: June 26, 2004, 10:26:56 pm »

That did the trick.

Thank you very much GauGau.   :D
Logged
Pages: [1]   Go Up
 

Page created in 0.032 seconds with 20 queries.