I've read these postings and I'm still not able to get it working:
http://forum.coppermine-gallery.net/index.php/topic,39006.msg184822.html#msg184822http://forum.coppermine-gallery.net/index.php/topic,37086.20.htmlhttp://forum.coppermine-gallery.net/index.php/topic,59101.0.htmlMy issue is the custom field values does not appear in the (see attached).
In
register.php, I've done this:
foreach($admins as $admin) {
//check if the admin language is available
if (file_exists("lang/{$admin['lang']}.php")) {
$lang_register_php_def = cpg_get_default_lang_var('lang_register_php', $admin['lang']);
$lang_register_approve_email_def = cpg_get_default_lang_var('lang_register_approve_email', $admin['lang']);
} else {
$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');
}
$act_link = rtrim($CONFIG['site_url'], '/') . '/register.php?activate=' . $act_key;
$template_vars = array(
'{SITE_NAME}' => $CONFIG['gallery_name'],
'{USER_NAME}' => $row['user_name'],
'{ACT_LINK}' => $act_link,
'{PROFILE1}' => $profile1,
'{PROFILE2}' => $profile2,
'{PROFILE3}' => $profile3,
'{PROFILE4}' => $profile4,
'{PROFILE5}' => $profile5,
);
cpg_mail($admin['email'], sprintf($lang_register_php_def['notify_admin_request_email_subject'], $CONFIG['gallery_name']), nl2br(strtr($lang_register_approve_email_def, $template_vars)));
In
english.php, I've done this:
$lang_register_approve_email = <<< EOT
A new user with the username "{USER_NAME}" has registered in your gallery.
The information provided are:
Name : "{PROFILE1}"
Contact number : "{PROFILE2}"
Name of child : "{PROFILE3}"
Child DOB : "{PROFILE4}"
Relationship with child: "{PROFILE5}"
In order to activate the account, you need to click on the link below or copy and paste it in your web browser.
<a href="{ACT_LINK}">{ACT_LINK}</a>
EOT;
I couldn't figure out what is wrong. All the fields profile1, profile2, profile3, profile4, profile5 has been populated with values and are not blank. However the coppermine fields {SITE_NAME}, {USER_NAME} are displaying the field values.
I suspect the variable $profile1, $profile2, $profile3, $profile4, $profile5 is blank. Perhaps the sql didn't select the values for these variables.
Hope someone can help.
Thanks.