forum.coppermine-gallery.net

Support => cpg1.4.x Support => Older/other versions => cpg1.4 themes/skins/templates => Topic started by: typomaniac101 on January 13, 2010, 07:26:50 am

Title: Removing email links from ecards
Post by: typomaniac101 on January 13, 2010, 07:26:50 am
Hi, I'm curious as to whether one can remove the email link which shows up on ecards?  :)
Title: Re: Removing email links from ecards
Post by: Joachim Müller on January 13, 2010, 08:01:24 am
You can change the layout of your ecard by editing themes/theme.php: find
Code: [Select]
$template_ecard = <<<EOTand edit as suggested below. If that section doesn't exist in your custom theme, copy
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">
           <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;
from themes/sample/theme.php into a new line before
Code: [Select]
?>of themes/yourtheme/theme.php
You probably get the idea what to remove. This will take care of the HTML template. You will need to edit the plain text template as well, so do the same thing as suggested above for
Code: [Select]
// 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;
as well.

In the future do as suggested per board rules (http://forum.coppermine-gallery.net/index.php/topic,55415.msg270616.html#msg270616) and post a link to your gallery in each thread you post in. Do so now!