Advanced search  

News:

CPG Release 1.6.26
Correct PHP8.2 issues with user and language managers.
Additional fixes for PHP 8.2
Correct PHP8 error with SMF 2.0 bridge.
Correct IPTC supplimental category parsing.
Download and info HERE

Pages: [1]   Go Down

Author Topic: Change imagesize in Ecard?  (Read 4576 times)

0 Members and 1 Guest are viewing this topic.

affeee

  • Coppermine newbie
  • Offline Offline
  • Posts: 8
Change imagesize in Ecard?
« on: March 23, 2007, 03:46:55 pm »

Hi

I am trying to change the imagesize in the ecard. I dont have intermediate pictures on my site, so the pictures sent in the ecard are way to big.

In ecard.php starting on row 79 i found this:

Code: [Select]
// Create and send the e-card
if (count($_POST) > 0 && $valid_sender_email && $valid_recipient_email) {
    $gallery_url_prefix = $CONFIG['ecards_more_pic_target']. (substr($CONFIG['ecards_more_pic_target'], -1) == '/' ? '' : '/');
    if ($CONFIG['make_intermediate'] && max($row['pwidth'], $row['pheight']) > $CONFIG['picture_width']) {
        $n_picname = get_pic_url($row, 'normal');
    } else {
        $n_picname = get_pic_url($row, 'fullsize');
    }

I suppose that this is where the imageurl for the ecard is built. Is it possible to put in dimensions here somewhere? For example width="400px", height="300px"

Logged

dreams83

  • Contributor
  • Coppermine regular visitor
  • ***
  • Offline Offline
  • Posts: 54
Re: Change imagesize in Ecard?
« Reply #1 on: July 18, 2007, 01:26:29 am »

copy the variable

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 the sample/theme.php

to your theme_folder/theme.php

and add the width="400"

to

Code: [Select]
<img src="{PIC_URL}" border="1" alt="" width="400"/></a>
that should do it i think.
Logged
Pages: [1]   Go Up
 

Page created in 0.014 seconds with 19 queries.