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: Prefill e-card receiver name and email?  (Read 9456 times)

0 Members and 1 Guest are viewing this topic.

Malm_Vogn

  • Coppermine newbie
  • Offline Offline
  • Posts: 9
Prefill e-card receiver name and email?
« on: January 06, 2012, 10:55:57 am »

Hi!

How do I prefill the ecard receiver fields with a name and an email adress?

We use our gallery to collect information about old photos; a substantial part of our visitors will not, or are not skilled enough to, register and hence make comments. We still want them to tell us what they know about the photo, so prefilled ecards sent to us we think is the way around.

Best regards

Terje S, Museum Nord - Narvik, Norway
Logged

Αndré

  • Administrator
  • Coppermine addict
  • *****
  • Country: de
  • Offline Offline
  • Gender: Male
  • Posts: 15764
Re: Prefill e-card receiver name and email?
« Reply #1 on: January 06, 2012, 12:44:59 pm »

IMHO the "Report to administrator" function is more appropriate for your purpose. If not, it's of course possible to predefine data in the ecard form. Just let me know if you need the corresponding code changes.
Logged

Malm_Vogn

  • Coppermine newbie
  • Offline Offline
  • Posts: 9
Re: Re: Prefill e-card receiver name and email?
« Reply #2 on: January 06, 2012, 02:20:42 pm »

IMHO the "Report to administrator" function is more appropriate for your purpose. If not, it's of course possible to predefine data in the ecard form. Just let me know if you need the corresponding code changes.

Good idea, but the Report to Administration form needs too much rewriting to serve our purpose. Image is too small, also.So yes, I do need the code changes. Thx for quick answering.

Terje
Logged

Αndré

  • Administrator
  • Coppermine addict
  • *****
  • Country: de
  • Offline Offline
  • Gender: Male
  • Posts: 15764
Re: Prefill e-card receiver name and email?
« Reply #3 on: January 09, 2012, 03:40:36 pm »

Open ecard.php, find
Code: [Select]
} else {

    echo <<< EOT
            <a href="displayimage.php?pid=$pid">
                <img src="$thumb_pic_url" width="{$thumb_size['width']}" height="{$thumb_size['height']}" alt="" vspace="8" border="0" class="image" />
            </a>
EOT;

}
and below, add
Code: [Select]
if (!$recipient_name) {
    $recipient_name = 'Default name';
}
if (!$recipient_email) {
    $recipient_email = 'default@address.com';
}
Logged

Malm_Vogn

  • Coppermine newbie
  • Offline Offline
  • Posts: 9
Re: Prefill e-card receiver name and email?
« Reply #4 on: January 11, 2012, 12:53:17 pm »

Thank U very much. Works like a charm  ;D Problem solved!!!!!
Logged

Αndré

  • Administrator
  • Coppermine addict
  • *****
  • Country: de
  • Offline Offline
  • Gender: Male
  • Posts: 15764
Re: Prefill e-card receiver name and email?
« Reply #5 on: January 11, 2012, 12:54:27 pm »

Please
tag your answer as "solved" by clicking on the "Topic Solved" button on the bar at the left hand side at the bottom of your thread.
Logged

Malm_Vogn

  • Coppermine newbie
  • Offline Offline
  • Posts: 9
Re: Prefill e-card receiver name and email?
« Reply #6 on: January 13, 2012, 09:20:44 am »

Of course  :)
Logged
Pages: [1]   Go Up
 

Page created in 0.023 seconds with 20 queries.