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: Adding Profile Fields to activation email.  (Read 6844 times)

0 Members and 1 Guest are viewing this topic.

MaxxFusion

  • Coppermine newbie
  • Offline Offline
  • Posts: 15
    • Affordable Ecommerce Solutions
Adding Profile Fields to activation email.
« on: July 27, 2006, 09:06:22 pm »

I get the notification email when a new user signs up but stock the only thing that comes in the email is the username and email address.  I want to be able to Make the Profile 1 and Profile 2 required fields and have them come in the email.  This way I will know at a glance who the request is from.

How can I do this?

Thanks,
Frank
« Last Edit: July 29, 2006, 06:20:06 am by TranzNDance »
Logged

Joachim Müller

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 47843
  • aka "GauGau"
    • gaugau.de
Re: Adding Profile Fields to activation email.
« Reply #1 on: July 28, 2006, 07:14:34 am »

For a start, post a link to your site and a non-admin test user account.
Logged

MaxxFusion

  • Coppermine newbie
  • Offline Offline
  • Posts: 15
    • Affordable Ecommerce Solutions
Re: Adding Profile Fields to activation email.
« Reply #2 on: July 28, 2006, 01:27:14 pm »

Joachim Müller

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 47843
  • aka "GauGau"
    • gaugau.de
Re: Adding Profile Fields to activation email.
« Reply #3 on: July 28, 2006, 04:20:41 pm »

The registration email only containing the username and email address is expected default behaviour, I must have misinterpreted/misread your initial question in the first place, so please accept my apologies for unnecessarily asking you for link and account.
To get the profile fields to show in your email, you'll have to edit register.php, find
Code: [Select]
    // email notification to admin
        if ($CONFIG['reg_notify_admin_email']) {

                        // get default language in which to inform the admin
                        $lang_register_php_def = cpg_get_default_lang_var('lang_register_php');
                        $lang_register_approve_email_def = cpg_get_default_lang_var('lang_register_approve_email');

                                        if ($CONFIG['admin_activation']==1) {
                                                        $act_link = rtrim($CONFIG['site_url'], '/') . '/register.php?activate=' . $act_key;
                                                        $template_vars = array(
                                                                        '{SITE_NAME}' => $CONFIG['gallery_name'],
                                                                        '{USER_NAME}' => $user_name,
                                                                        '{ACT_LINK}' => $act_link,
                                                        );
                                                        cpg_mail('admin', sprintf($lang_register_php_def['notify_admin_request_email_subject'], $CONFIG['gallery_name']), nl2br(strtr($lang_register_approve_email_def, $template_vars)));
                                        } else {
                                                        cpg_mail('admin', sprintf($lang_register_php_def['notify_admin_email_subject'], $CONFIG['gallery_name']), sprintf($lang_register_php_def['notify_admin_email_body'], $user_name));
                }
                                }
and replace with
Code: [Select]
    // email notification to admin
        if ($CONFIG['reg_notify_admin_email']) {

                        // get default language in which to inform the admin
                        $lang_register_php_def = cpg_get_default_lang_var('lang_register_php');
                        $lang_register_approve_email_def = cpg_get_default_lang_var('lang_register_approve_email');

                                        if ($CONFIG['admin_activation']==1) {
                                                        $act_link = rtrim($CONFIG['site_url'], '/') . '/register.php?activate=' . $act_key;
                                                        $template_vars = array(
                                                                        '{SITE_NAME}' => $CONFIG['gallery_name'],
                                                                        '{USER_NAME}' => $user_name,
                                                                        '{ACT_LINK}' => $act_link,
                                                        );
                                                        // custom hack: add profile fields - start
                                                        $custom_line_break = "\n\r";
                                                        $cutom_email_content = $custom_line_break
                                                                               $profile1.$custom_line_break.
                                                                               $profile2.$custom_line_break.
                                                                               $profile3.$custom_line_break.
                                                                               $profile4.$custom_line_break.
                                                                               $profile5.$custom_line_break.
                                                                               $profile6';
                                                        // custom hack: add profile fields - end

                                                        cpg_mail('admin', sprintf($lang_register_php_def['notify_admin_request_email_subject'], $CONFIG['gallery_name']), nl2br(strtr($lang_register_approve_email_def, $template_vars).$cutom_email_content));
                                        } else {
                                                        cpg_mail('admin', sprintf($lang_register_php_def['notify_admin_email_subject'], $CONFIG['gallery_name']), sprintf($lang_register_php_def['notify_admin_email_body'], $user_name));
                }
                                }
(not tested - please report back).
Logged

MaxxFusion

  • Coppermine newbie
  • Offline Offline
  • Posts: 15
    • Affordable Ecommerce Solutions
Re: Adding Profile Fields to activation email.
« Reply #4 on: July 28, 2006, 05:26:23 pm »

I have done this and get

Parse error: parse error, unexpected T_VARIABLE in /home/thepumas/public_html/register.php on line 322

Nibbler

  • Guest
Re: Adding Profile Fields to activation email.
« Reply #5 on: July 28, 2006, 05:28:52 pm »

Should be

Code: [Select]
                                                        // custom hack: add profile fields - start
                                                        $custom_line_break = "\n\r";
                                                        $cutom_email_content = $custom_line_break.
                                                                               $profile1.$custom_line_break.
                                                                               $profile2.$custom_line_break.
                                                                               $profile3.$custom_line_break.
                                                                               $profile4.$custom_line_break.
                                                                               $profile5.$custom_line_break.
                                                                               $profile6;
                                                        // custom hack: add profile fields - end
Logged

MaxxFusion

  • Coppermine newbie
  • Offline Offline
  • Posts: 15
    • Affordable Ecommerce Solutions
Re: Adding Profile Fields to activation email.
« Reply #6 on: July 28, 2006, 05:34:38 pm »

Where does that part go?

Nibbler

  • Guest
Re: Adding Profile Fields to activation email.
« Reply #7 on: July 28, 2006, 05:38:46 pm »

Replaces the part with the typo, here

Code: [Select]
                                                        // custom hack: add profile fields - start
                                                        $custom_line_break = "\n\r";
                                                        $cutom_email_content = $custom_line_break
                                                                               $profile1.$custom_line_break.
                                                                               $profile2.$custom_line_break.
                                                                               $profile3.$custom_line_break.
                                                                               $profile4.$custom_line_break.
                                                                               $profile5.$custom_line_break.
                                                                               $profile6';
                                                        // custom hack: add profile fields - end
Logged

MaxxFusion

  • Coppermine newbie
  • Offline Offline
  • Posts: 15
    • Affordable Ecommerce Solutions
Re: Adding Profile Fields to activation email.
« Reply #8 on: July 28, 2006, 08:28:52 pm »

That worked.

Thanks
Pages: [1]   Go Up
 

Page created in 0.019 seconds with 19 queries.