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: Custom Fields added to registration email  (Read 6885 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: 15760
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 21 queries.