coppermine-gallery.com/forum

Support => Older/other versions => cpg1.2 Standalone Support => Topic started by: darkpunk99 on April 01, 2004, 06:48:04 AM

Title: eCard: display author
Post by: darkpunk99 on April 01, 2004, 06:48:04 AM
I'm trying to get eCards to display the username of who uploaded the image in the message.

I've had a user complain because eCards are getting sent out without giving her credit for her artwork.

Currently, it looks like this (http://nervousness.org/forums/gallery/displayecard.php?data=YTo2OntzOjI6InJuIjtzOjU6IkphbWVzIjtzOjI6InNuIjtzOjExOiJteXN1bmRvd24xNSI7czoyOiJzZSI7czoyMToiamFtZXNAbm90eW91cnNlbGYuY29tIjtzOjE6InAiO3M6NzY6Imh0dHA6Ly9uZXJ2b3VzbmVzcy5vcmcvZm9ydW1zL2dhbGxlcnkvYWxidW1zL3VzZXJwaWNzLzEwOTQ5L25vcm1hbF9jZWNlOC5qcGciO3M6MToiZyI7czo0OiJ0ZXN0IjtzOjE6Im0iO3M6MTE6ImhvbGxhISA4LSkgIjt9)

I tried editting the theme.php file to look like:

// 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 />
            <font face="arial" color="#000000" size="4">Image By:</font>
            <br />
            <font face="arial" color="#000000" size="4"><a href="http://nervousness.org/forums/gallery/profile.php?uid={USER_ID}">{USER_NAME}</a></font>
            <br />
            <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;


But, I guess {USER_ID} and {USER_NAME} aren't valid tags, as they were showing up as the code, not the id/name.  Any idea on how I could fix this?  (not by disabling ecards altogether.  please.)

Thanks!  Great script, great community, great support.
Title: eCard: display author
Post by: photoman13 on April 06, 2004, 11:19:34 PM
I think it's 'username' and 'uid'

like that.. from looking on the profile.php anyways :)

Hope that helps?

But I'm wondering if that would just put the senders info there, and not the person that uploaded it... would be a nice addition though :)