Advanced search  

News:

cpg1.5.48 Security release - upgrade mandatory!
The Coppermine development team is releasing a security update for Coppermine in order to counter a recently discovered vulnerability. It is important that all users who run version cpg1.5.46 or older update to this latest version as soon as possible.
[more]

Pages: [1]   Go Down

Author Topic: Include url. copyright and file name W/ E-card  (Read 6765 times)

0 Members and 1 Guest are viewing this topic.

Walkinman

  • Coppermine frequent poster
  • ***
  • Offline Offline
  • Gender: Male
  • Posts: 380
    • Skolai Images - Nature, Travel and Adventure stock photos
Include url. copyright and file name W/ E-card
« on: February 02, 2006, 10:10:29 pm »

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
« Last Edit: February 03, 2006, 08:12:47 pm by Nibbler »
Logged

Nibbler

  • Guest
Re: Include url. copyright and file name W/ E-card
« Reply #1 on: February 02, 2006, 10:47:25 pm »

Copy the ecard template from include/themes.inc.php into your theme's theme.php and modify it as you wish.

Code: [Select]
$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;
Logged

Walkinman

  • Coppermine frequent poster
  • ***
  • Offline Offline
  • Gender: Male
  • Posts: 380
    • Skolai Images - Nature, Travel and Adventure stock photos
Re: Include url. copyright and file name W/ E-card
« Reply #2 on: February 03, 2006, 08:00:18 am »

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
Logged

Joachim Müller

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 47843
  • aka "GauGau"
    • gaugau.de
Re: Include url. copyright and file name W/ E-card
« Reply #3 on: February 03, 2006, 08:22:08 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
Code: [Select]
?>
Logged

Walkinman

  • Coppermine frequent poster
  • ***
  • Offline Offline
  • Gender: Male
  • Posts: 380
    • Skolai Images - Nature, Travel and Adventure stock photos
Re: Include url. copyright and file name W/ E-card
« Reply #4 on: February 03, 2006, 04:59:44 pm »

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
Logged

Walkinman

  • Coppermine frequent poster
  • ***
  • Offline Offline
  • Gender: Male
  • Posts: 380
    • Skolai Images - Nature, Travel and Adventure stock photos
Re: Include url. copyright and file name W/ E-card
« Reply #5 on: February 03, 2006, 06:00:31 pm »

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
Logged

Nibbler

  • Guest
Re: Include url. copyright and file name W/ E-card
« Reply #6 on: February 03, 2006, 06:09:05 pm »

Look for this in ecard.php

Code: [Select]
    $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

Code: [Select]
'{FILENAME}' => $row['filename'],

then you can place that wherever you like in the template.
Logged

Walkinman

  • Coppermine frequent poster
  • ***
  • Offline Offline
  • Gender: Male
  • Posts: 380
    • Skolai Images - Nature, Travel and Adventure stock photos
Re: Include url. copyright and file name W/ E-card
« Reply #7 on: February 03, 2006, 07:11:45 pm »

Hey Nibbler,

That's fixed it, perfect. This thread can be marked solved.

Thank you for your help.

Cheers

Carl
Logged
Pages: [1]   Go Up
 

Page created in 0.044 seconds with 19 queries.