Advanced search  

News:

cpg1.5.48 Security release - upgrade mandatory!
The Coppermine development team is releasing a security update for Coppermine in order to counter a recently discovered vulnerability. It is important that all users who run version cpg1.5.46 or older update to this latest version as soon as possible.
[more]

Pages: [1]   Go Down

Author Topic: eCard problem with the Links inside the eMail (not working)  (Read 8954 times)

0 Members and 1 Guest are viewing this topic.

raummusik

  • Coppermine novice
  • *
  • Offline Offline
  • Posts: 30

hi, i successfully installed cpg without problems at all. i tried the eCard option just some mins ago. the eCard arrives but those 2 Links inside not working proper. anyone knows where i can change those links and also the text of the links ? i just want to have the URL of the whole site in the link , not only the image link . or perhaps the links at the top could be the "image" link. (which also works fine) and the link above (click here to view more pics) , just not working . perhaps someone can help me ? ...

cu
 ben
Logged

Joachim Müller

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 47843
  • aka "GauGau"
    • gaugau.de
Re: eCard problem with the Links inside the eMail (not working)
« Reply #1 on: June 17, 2004, 02:02:21 pm »

the settings in coppermine config "Target address for the 'See more pictures' link in e-cards" is labelled inadequatly, as it is not only used for the ecards, but on several other places as well. It should contain the url of your coppermine dir.
You can edit the ecard stuff in your language file (e.g. lang/english.php), find
Code: [Select]
// ------------------------------------------------------------------------- //
// File ecard.php
// ------------------------------------------------------------------------- //

if (defined('ECARDS_PHP') || defined('DISPLAYECARD_PHP')) $lang_ecard_php =array(
  'title' => 'Send an e-card',
  'invalid_email' => '<b>Warning</b> : invalid email address !',
  'ecard_title' => 'An e-card from %s for you',
  'error_not_image' => 'Only images can be sent as an ecard.', //cpg1.3.0
  'view_ecard' => 'If the e-card does not display correctly, click this link',
  'view_more_pics' => 'Click this link to view more pictures !',
  'send_success' => 'Your ecard was sent',
  'send_failed' => 'Sorry but the server can\'t send your e-card...',
  'from' => 'From',
  'your_name' => 'Your name',
  'your_email' => 'Your email address',
  'to' => 'To',
  'rcpt_name' => 'Recipient name',
  'rcpt_email' => 'Recipient email address',
  'greetings' => 'Greetings',
  'message' => 'Message',
);
and themes/yourtheme/theme.php, search for
Code: [Select]
// HTML template for e-cards
$template_ecard = <<<EOT
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html dir="{LANG_DIR}">
<head>
<title>{TITLE}</title>
<meta http-equiv="content-type" content="text/html; charset={CHARSET}" />
</head>
<body bgcolor="#FFFFFF" text="#0F5475" link="#0F5475" vlink="#0F5475" alink="#0F5475">
<br />
<p align="center"><a href="{VIEW_ECARD_TGT}"><b>{VIEW_ECARD_LNK}</b></a></p>
<table border="0" cellspacing="0" cellpadding="1" align="center">
  <tr>
    <td bgcolor="#000000">
      <table border="0" cellspacing="0" cellpadding="10" bgcolor="#ffffff">
        <tr>
          <td valign="top">
           <img src="{PIC_URL}" border="1" alt="" /><br />
          </td>
          <td valign="top" width="200" height="250">
            <div align="right"><img src="{URL_PREFIX}images/stamp.gif" alt="" border="0" /></div>
            <br />
            <b><font face="arial" color="#000000" size="4">{GREETINGS}</font></b>
            <br />
            <br />
            <font face="arial" color="#000000" size="2">{MESSAGE}</font>
            <br />
            <br />
            <font face="arial" color="#000000" size="2">{SENDER_NAME}</font>
            (<a href="mailto:{SENDER_EMAIL}"><font face="arial" color="#000000" size="2">{SENDER_EMAIL}</font></a>)
          </td>
        </tr>
      </table>
    </td>
  </tr>
</table>
<p align="center"><a href="{VIEW_MORE_TGT}"><b>{VIEW_MORE_LNK}</b></a></p>
</body>
</html>
EOT;

GauGau
Logged

ween

  • Coppermine newbie
  • Offline Offline
  • Posts: 16
Re: eCard problem with the Links inside the eMail (not working)
« Reply #2 on: June 20, 2004, 05:21:29 pm »

I installed CPG 1.3.0 and works great.
Do have a small problem with the e-card.
The recipients get a notification at bottom with incorrect date.

>>>> Sent by from IP at Sunday, June,25,2004 01:19 AM [GMT] <<<<<

How can I correct this?
Logged

Joachim Müller

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 47843
  • aka "GauGau"
    • gaugau.de
Re: eCard problem with the Links inside the eMail (not working)
« Reply #3 on: June 21, 2004, 12:39:09 am »

Edit ecard.php, find
Code: [Select]
       $message .= "Sent by $sender_name from IP {$_SERVER['REMOTE_ADDR']} at ".gmstrftime("%A,  %B,%V,%Y %I:%M %p ", time())." [GMT]";and modify accordingly...

GauGau

P.S. Don't hijack other user's thread - the issue you're having is not related to raummusik's issue. We have a "one question per thread" policy on this board. In the future, pleast start a new thread when coming up with a new question.
« Last Edit: June 22, 2004, 07:59:33 am by GauGau »
Logged

raummusik

  • Coppermine novice
  • *
  • Offline Offline
  • Posts: 30
Re: eCard problem with the Links inside the eMail (not working)
« Reply #4 on: June 22, 2004, 09:58:36 pm »

which coppermine config php file you mean ?  soon i will also move the whole gallery thing to another server. is this a big problem cause the sql db is also then "away" or can i use just my old sql db then and move the php files (the cpg dir.) just to another webspace ?

but first i wanna solve this e-card problem . i got also some other questions about removing some things from the gallery to it fits more in my homepage, but i first try to find the solution myself in the forum.

cu
 raum
Logged

Joachim Müller

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 47843
  • aka "GauGau"
    • gaugau.de
Re: eCard problem with the Links inside the eMail (not working)
« Reply #5 on: June 23, 2004, 05:38:39 am »

if you only want to move the files to "B" and the mySQL database stays on server "A", it depends on the policy of your webhost: most webhosts only allow database calls on "localhost" (if this is the case with your webhost, you'll have to move your database to server "B" as well). If your webhost allows database calls like "foo.bar.com", you should be fine (although you have to points of failure and performance may significantly decrease).

GauGau
Logged

apassio

  • Coppermine novice
  • *
  • Offline Offline
  • Posts: 35
    • Christine & Son's website
Re: eCard problem with the Links inside the eMail (not working)
« Reply #6 on: August 16, 2004, 09:45:37 am »

I'm not sure I understood how to solve the pb with the  "Target address for the 'See more pictures' link in e-cards" is labelled inadequatly"

Indeed, I noticed I need to leave this field in config on the coppermine directory url, otherwise the absolute url for each photo gets "corrupted" and does not work.

e.g. my coppermine directory: mydomain/photos. How do I change my eCard to display another url for more pictures, e.g. mydomain/enterphoto.htm without messing up, because if I do it today, the absolute url of all my pictures will be corrupted to mydomain/enterphoto.htm/displayimage.php?xxx, which of course does not work because the displayimage.php file is not in that directory.

Thanks
Logged

Joachim Müller

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 47843
  • aka "GauGau"
    • gaugau.de
Re: eCard problem with the Links inside the eMail (not working)
« Reply #7 on: August 16, 2004, 09:48:38 am »

the "target address for links..." is used for other purposes as well, it must point to http://yourdomain.tld/your_coppermine_folder/ Exclamation mark. It is inacurately labelled and will be named "URL of your coppermine gallery folder (no 'index.php' or similar at the end)" in future versions of coppermine.

GauGau
Logged

apassio

  • Coppermine novice
  • *
  • Offline Offline
  • Posts: 35
    • Christine & Son's website
Re: eCard problem with the Links inside the eMail (not working)
« Reply #8 on: August 16, 2004, 10:11:45 am »

Does this mean that there is no other place where I can customized the url for "more photos" to appear in eCards?

thanks

Logged

Nibbler

  • Guest
Re: eCard problem with the Links inside the eMail (not working)
« Reply #9 on: August 16, 2004, 03:47:25 pm »

You'd have to edit ecard.php, find the line
Code: [Select]
'{VIEW_MORE_TGT}' => $CONFIG['ecards_more_pic_target'],and hardcode your url in
Code: [Select]
'{VIEW_MORE_TGT}' => 'http://www.mydomain/enterphoto.htm',
Logged

apassio

  • Coppermine novice
  • *
  • Offline Offline
  • Posts: 35
    • Christine & Son's website
Re: eCard problem with the Links inside the eMail (not working)
« Reply #10 on: August 16, 2004, 04:22:51 pm »

Thanks, it works!

have a nice day
Logged

mancool

  • Coppermine regular visitor
  • **
  • Offline Offline
  • Posts: 62
Re: eCard problem with the Links inside the eMail (not working)
« Reply #11 on: September 12, 2004, 04:25:45 pm »

Edit ecard.php, find
Code: [Select]
        $message .= "Sent by $sender_name from IP {$_SERVER['REMOTE_ADDR']} at ".gmstrftime("%A,  %B,%V,%Y %I:%M %p ", time())." [GMT]";and modify accordingly...

GauGau

P.S. Don't hijack other user's thread - the issue you're having is not related to raummusik's issue. We have a "one question per thread" policy on this board. In the future, pleast start a new thread when coming up with a new question.

I'm sorry, I would like to show nothing or just the url, what should I do not such coding???
Logged

Casper

  • VIP
  • Coppermine addict
  • ***
  • Country: 00
  • Offline Offline
  • Gender: Male
  • Posts: 5231
Re: eCard problem with the Links inside the eMail (not working)
« Reply #12 on: September 12, 2004, 04:48:50 pm »

To show nothing, change it to this;

Code: [Select]
$message .= "";
Logged
It has been a long time now since I did my little bit here, and have done no coding or any other such stuff since. I'm back to being a noob here

integer_i

  • Coppermine newbie
  • Offline Offline
  • Posts: 1
Re: eCard problem: picture not displayed (wrong link)
« Reply #13 on: December 14, 2004, 12:54:30 pm »

I have another (related) problem. The link in the ecard to show the picture points
to:

http://www.myhost.com/albums/dirname/normal_picname.jpg

which ist mostly correct.

Buf if you delete the original files in admin-mode, the link should be

http://www.myhost.com/albums/dirname/picname.jpg

because the normal_ - files do not exist anymore.

I will fix it this eventing and post the fix later... CU, great work anyway

Logged

villas

  • Coppermine newbie
  • Offline Offline
  • Gender: Male
  • Posts: 11
Re: eCard problem: picture not displayed (wrong link)
« Reply #14 on: December 30, 2004, 05:24:52 am »

I have another (related) problem. The link in the ecard to show the picture points
to:

http://www.myhost.com/albums/dirname/normal_picname.jpg

which ist mostly correct.

Buf if you delete the original files in admin-mode, the link should be

http://www.myhost.com/albums/dirname/picname.jpg

because the normal_ - files do not exist anymore.

I will fix it this eventing and post the fix later... CU, great work anyway

 I think solve this change in ecards.php (lines ~79 to 79):

Code: [Select]

    if ($CONFIG['make_intermediate'] && max($row['pwidth'], $row['pheight']) > $CONFIG['picture_width']) {
        $n_picname = get_pic_url($row, 'norma');
    } else {
        $n_picname = get_pic_url($row, 'fullsize');
    }


changing to this:

Code: [Select]

    if ($CONFIG['make_intermediate'] && max($row['pwidth'], $row['pheight']) > $CONFIG['picture_width']) {
        $n_picname = get_pic_url($row, '');
    } else {
        $n_picname = get_pic_url($row, '');
    }


The ecard was send with after delete the original photos.

Villas

Logged
Pages: [1]   Go Up
 

Page created in 0.024 seconds with 15 queries.