forum.coppermine-gallery.net

Support => cpg1.5.x Support => cpg1.5 email => Topic started by: Malm_Vogn on January 06, 2012, 10:55:57 am

Title: Prefill e-card receiver name and email?
Post by: Malm_Vogn 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
Title: Re: Prefill e-card receiver name and email?
Post by: Αndré 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.
Title: Re: Re: Prefill e-card receiver name and email?
Post by: Malm_Vogn 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
Title: Re: Prefill e-card receiver name and email?
Post by: Αndré 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';
}
Title: Re: Prefill e-card receiver name and email?
Post by: Malm_Vogn on January 11, 2012, 12:53:17 pm
Thank U very much. Works like a charm  ;D Problem solved!!!!!
Title: Re: Prefill e-card receiver name and email?
Post by: Αndré 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.
Title: Re: Prefill e-card receiver name and email?
Post by: Malm_Vogn on January 13, 2012, 09:20:44 am
Of course  :)