eCard problem with the Links inside the eMail (not working) eCard problem with the Links inside the eMail (not working)
 

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]

Main Menu

eCard problem with the Links inside the eMail (not working)

Started by raummusik, June 16, 2004, 10:56:24 PM

Previous topic - Next topic

0 Members and 2 Guests are viewing this topic.

raummusik

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

Joachim Müller

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// ------------------------------------------------------------------------- //
// 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// 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

ween

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?

Joachim Müller

Edit ecard.php, find        $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.

raummusik

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

Joachim Müller

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

apassio

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

Joachim Müller

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

apassio

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

thanks


Nibbler

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

apassio


mancool

Quote from: GauGau on June 21, 2004, 12:39:09 AM
Edit ecard.php, find         $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???

Casper

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

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


villas

Quote from: integer_i 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

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



   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:



   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