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: Custom Fields added to registration email  (Read 7769 times)

0 Members and 1 Guest are viewing this topic.

kenlbrown

  • Coppermine newbie
  • Offline Offline
  • Posts: 1
Custom Fields added to registration email
« on: October 26, 2010, 06:29:43 pm »

Greetings...
I've spent 2 days reading and applying suggestions on how to add custom fields to the registration email that is sent out to the admin but for the life of me I'm not having any success.  I'm using cpg1.5.8.  I've edited english.php and added the {PLACEHOLDERS}... I'm using {USER_PROFILE1} and {USER_PROFILE2} as my placeholders.

In register.php I've edited the following lines:

Lines 591-598
    $user_array = array();
    $user_array['user_id'] = mysql_insert_id();
   $user_array['user_name'] = $user_name;
   $user_array['user_profile1'] = $profile1;
    $user_array['user_profile2'] = $profile2;
    $user_array['user_email'] = $email;
    $user_array['user_active'] = $active;
    CPGPluginAPI::filter('register_form_submit', $user_array);

Lines 619-624
            $template_vars = array(
                '{SITE_NAME}' => $CONFIG['gallery_name'],
                '{USER_NAME}' => $user_name,
            '{USER_PROFILE1}' => $profile1,
            '{USER_PROFILE2}' => $profile2,
                '{ACT_LINK}'  => $act_link,

Lines 675-680
                $template_vars = array(
                    '{SITE_NAME}' => $CONFIG['gallery_name'],
                    '{USER_NAME}' => $user_name,
               '{USER_PROFILE1}' => $profile1,
               '{USER_PROFILE2}' => $profile2,
                    '{ACT_LINK}' => $act_link,

Obviously I'm missing something and this should be something easier to accomplish than taking 2 days :/

I've also tried USER_PROFILE1_NAME and so forth with the same results...

My apologies if this is a repost

Here is the website that CPG is being for: http://www.konahonudivers.com/scuba-diving-photos/index.php

Many thanks in advance!

Ken 
Logged

elesese

  • Coppermine newbie
  • Offline Offline
  • Posts: 1
    • hi5
Re: Custom Fields added to registration email
« Reply #1 on: October 26, 2010, 10:41:50 pm »

thanks for share this code ^^
Logged

Αndré

  • Administrator
  • Coppermine addict
  • *****
  • Country: de
  • Offline Offline
  • Gender: Male
  • Posts: 15764
Re: Custom Fields added to registration email
« Reply #2 on: October 29, 2010, 01:29:17 pm »

What's your actual question?
Logged
Pages: [1]   Go Up
 

Page created in 0.019 seconds with 20 queries.