Hey Folks,
Is there a way to include the url of an image, the copyright and the filename in E-Cards? I understand I'd have to edit ecard.php, but I'm not sure exactly what I need to put in there.
As always, your help is much appreciated.
Thank you.
Cheers
Carl
Copy the ecard template from include/themes.inc.php into your theme's theme.php and modify it as you wish.
$template_ecard = <<<EOT
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html dir="{LANG_DIR}">
<head>
<meta http-equiv="content-type" content="text/html; charset={CHARSET}" />
<title>{TITLE}</title>
</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">
<a href="{VIEW_MORE_TGT}/displayimage.php?pos=-{PID}">
<img src="{PIC_URL}" border="1" alt="" /></a>
<br />
<div align="center">
<h2>{PIC_TITLE}</h2>
</div>
</td>
<td valign="top" width="300">
<div align="right"><img src="{URL_PREFIX}images/stamp.gif" border="0" alt="" /></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>
<tr>
<td colspan="2">
{PIC_CAPTION}
</td>
</tr>
</table>
</td>
</tr>
</table>
<p align="center"><a href="{VIEW_MORE_TGT}"><b>{VIEW_MORE_LNK}</b></a></p>
</body>
</html>
EOT;
Hey Nibbler,
Thank you. I tried what you suggsted, but I ended up with the whole code for the ecard starting the top of page on my site . I must have did something wrong. I tried it without any modification to the code at all, and it still didn't work. Do I not just modify the include/themes.inc.php code, and upload the modified themes.inc.php into the includes folder on my site?
Also, can help me with the modification - what, specifically, do i add to include the Filename, the File url, and a simple copyright (I can use the iptc copyright info) under the pic caption?
I do appreciate your help.
Thank you.
Cheers
Carl
Quote from: Walkinman on February 03, 2006, 08:00:18 AM
Do I not just modify the include/themes.inc.php code, and upload the modified themes.inc.php into the includes folder on my site?
Don't edit include/themes.inc.php (under no circumstances), but edit themes/yourtheme/theme.php
Add the code Nibbler refered to into a new line right before
?>
Hey GauGau,
Thank you .. I had it after the ?> (as you could no doubt tel!)
But what do I add to include the filename of the image and the url for that image? I tried 'filename', but that doesn't work. I can write anothe copyright blurb, so I just need the filename and the url for that image.
Thank you.
Cheers
Carl
Hey folks,
Well, I've got the url and so forth set .. But I would like to include the filename as well .. and I can't figure out how to do that so far. How can I have the filename included, just above the caption for the image?
Thank you.
Cheers
Carl
Look for this in ecard.php
$params = array('{LANG_DIR}' => $lang_text_dir,
'{TITLE}' => sprintf($lang_ecard_php['ecard_title'], $sender_name),
'{CHARSET}' => $CONFIG['charset'] == 'language file' ? $lang_charset : $CONFIG['charset'],
'{VIEW_ECARD_TGT}' => "{$gallery_url_prefix}displayecard.php?data=$encoded_data",
'{VIEW_ECARD_LNK}' => $lang_ecard_php['view_ecard'],
'{VIEW_ECARD_LNK_PLAINTEXT}' => $lang_ecard_php['view_ecard_plaintext'],
'{PIC_URL}' => $n_picname,
'{URL_PREFIX}' => $gallery_url_prefix,
'{GREETINGS}' => $greetings,
'{MESSAGE}' => bb_decode($msg_content),
'{PLAINTEXT_MESSAGE}' => $message,
'{SENDER_EMAIL}' => $sender_email,
'{SENDER_NAME}' => $sender_name,
'{VIEW_MORE_TGT}' => $CONFIG['ecards_more_pic_target'],
'{VIEW_MORE_LNK}' => $lang_ecard_php['view_more_pics'],
'{PID}' => $pid,
'{PIC_TITLE}' => $pic_title,
'{PIC_CAPTION}' => $pic_caption,
);
and add in the extra placeholder tag
'{FILENAME}' => $row['filename'],
then you can place that wherever you like in the template.
Hey Nibbler,
That's fixed it, perfect. This thread can be marked solved.
Thank you for your help.
Cheers
Carl