Advanced search  

News:

cpg1.5.24 maintenance release - upgrade recommended
The Coppermine development team is releasing an update for Coppermine in order to fix several minor issues. All fixes are not security critical, so if your gallery is running fine with cpg1.5.20 or cpg1.5.22 you don't need to upgrade. If you are running an older version than cpg1.5.20, you must update to this latest version as soon as possible because of the security impact!
[more]

Pages: [1]   Go Down

Author Topic: Custom Fields added to registration email  (Read 2857 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: 11829
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.156 seconds with 20 queries.