forum.coppermine-gallery.net

Support => cpg1.4.x Support => Older/other versions => cpg1.4 ecards & email => Topic started by: ericsoup on May 16, 2008, 11:55:33 pm

Title: gMail eCard formatting
Post by: ericsoup on May 16, 2008, 11:55:33 pm
Hello.  I'm trying to get the eCards to properly format in Gmail, but they are still arriving funky.  The link does open up the window to displaycard.php and they look fine there. 

I know that this is certainly an issue with how gmail is interpreting the code I have in $template_ecard, but I'm wondering if anyone has stumbled upon a magic formatting trick to make the cards layout properly within the body of a gMail message. 

Here is the code I'm currently using:
Code: [Select]
// HTML template for e-cards
$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">
           
                                         <img src="{PIC_URL}" border="1" alt="" />
                                       
                                         </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" align="center">
<a class="ecard-link" href="{VIEW_MORE_TGT}"><b>Send more eCards!</b>                       
</td>
                </tr>
      </table>
    </td>
  </tr>
</table>

</body>
</html>
EOT;

// plain-text template for e-cards (as fallback for clients that can't display html-formatted mails)
$template_ecard_plaintext = <<<EOT
{TITLE}
=========================================

{VIEW_ECARD_LNK_PLAINTEXT}:
{VIEW_ECARD_TGT}

{GREETINGS}


{PLAINTEXT_MESSAGE}

{SENDER_NAME} ({SENDER_EMAIL})

-----------------------------------------
{VIEW_MORE_LNK}:
{VIEW_MORE_TGT}
EOT;

Thank you.
Title: Re: gMail eCard formatting
Post by: Joachim Müller on May 17, 2008, 07:25:03 am
The ecard displays just fine in Gmail for me, or rather: as expected. It's a spam prevention technique that most email providers and email apps use nowadays not to display embedded images within an email, so the real approach is not to rely on the image being displayed. There is little you can do to circumvent display issues in email clients or webmail clients. If you want my opinion: ecards is a silly feature on today's internet in the first place, so it should no longer be used.
Title: Re: gMail eCard formatting
Post by: anselmej on November 09, 2008, 12:12:58 pm
Hi !
I don't find where to change the E card  appearance (which file and function), that part of code >>
Code: [Select]
<b>This will be the alternate link to the ecard once it gets generated. It won't work for previews.</b></a></p>
<table align="center" border="0" cellpadding="1" cellspacing="0">
  <tbody><tr>
    <td bgcolor="#000000">
      <table bgcolor="#ffffff" border="0" cellpadding="10" cellspacing="0">
        <tbody><tr>
          <td valign="top">
           <a href="http://mywebsite.com/displayimage.php?pos=-131">

                                         <img src="http://mywebsite.com/albums/regions/photo220.jpg" alt="" border="1"></a>
                                         <br>
                                         <div align="center">
                                                 <h2></h2>
                                         </div>

          </td>
          <td valign="top" width="300">
            <div align="right"><img src="http://mywebsite.com/images/stamp.gif" alt="" border="0"></div>

            <br>
            <b><font color="#000000" size="4" face="arial">message title</font></b>
            <br>
            <br>
            <font color="#000000" size="2" face="arial">message description</font>
            <br>
            <br>
            <font color="#000000" size="2" face="arial">My name </font>

            (<a href="mailto:anselmej@email.com"><font color="#000000" size="2" face="arial">anselmej@email.com</font></a>)
          </td>
        </tr>
                <tr>
                        <td colspan="2">
                               
                        </td>
                </tr>
      </tbody></table>

    </td>
  </tr>
</tbody></table>
<p align="center"><a href="http://mywebsite.com/"><b>View more pictures !</b></a></p>

Thank you

Title: Re: gMail eCard formatting
Post by: Joachim Müller on November 09, 2008, 12:17:16 pm
File: themes/yourtheme/theme.php
Variables $template_ecard and $template_ecard_plaintext

Thread hijacking is not permitted. The thread starter asked about something different. For the last time: read up board rules and do exactly as suggested there. You have been warned before. Next sign of disrespecting board rules will lead to permanent ban. Locking.