Re: Inclusão de novos campos no registro.
Enviado: 20 Out 2011, 11:28
Esta modificação envie o e-mail com os campos de perfil personalizados. Isso se você optar pela ativação do usuário pelo Administrador ou Usuário + Administrador.
Suporte com ética e seriedade
https://suportephpbb.com.br/

Re: Send custom profile field answers in Admin activation email?
Postby dellsystem » Wed Oct 14, 2009 12:19 pm
In any case, here's the basic idea:
Open includes/ucp/ucp_register.php
Do a 'find' for the name of the .txt file you want to use. In this example, we'll use 'admin_activate'.
So the first instance of admin_activate in that file shows up in this line:
A couple of lines later, this line should appear:Código: Selecionar todos
Select all $messenger->template('admin_activate', $row['user_lang']);
Código: Selecionar todos
Select all $messenger->assign_vars(array)
Right after that, make a new line and add this:Código: Selecionar todos
Select all 'RECRUITER' => request_var('pf_recruiter', ''),
In that .txt file, add:
Código: Selecionar todos
Select all This person was recruited by {RECRUITER}
This is assuming that your profile field is named 'recruiter'. Change the code if necessary.
I haven't been able to test this, let me know if there are problems.
Abraço.adeyjones escreveu:I have just double checked to see what files I edited and they are definately correct.
language/en/email/admin_activate.txt contains:
Practice Name: {PRACTICE_NAME}
Address: {PRACTICE_ADDRESS}
Telephone: {PRACTICE_TEL}
Promo Code: {PROMO_CODE}
Method Of Payment: {METHOD_OF_PAYMENT}
and includes/ucp/ucp_register.php contains:I don't have any other mods installed.Código: Selecionar todos
$messenger->assign_vars(array( 'PRACTICE_NAME' => request_var('pf_practice_name', ''), 'PRACTICE_ADDRESS' => request_var('pf_practice_address', ''), 'PRACTICE_TEL' => request_var('pf_practice_tel', ''), 'PROMO_CODE' => request_var('pf_promo_code', ''), 'METHOD_OF_PAYMENT' => request_var('method_of_payment', ''), 'USERNAME' => htmlspecialchars_decode($data['username']), 'U_USER_DETAILS' => "$server_url/memberlist.$phpEx?mode=viewprofile&u=$user_id", 'U_ACTIVATE' => "$server_url/ucp.$phpEx?mode=activate&u=$user_id&k=$user_actkey") );
I have amended ucp_register to include these bits, still no luck on registering a test account.

Código: Selecionar todos
while ($row = $db->sql_fetchrow($result))
{
$messenger->template('admin_activate', $row['user_lang']);
$messenger->to($row['user_email'], $row['username']);
$messenger->im($row['user_jabber'], $row['username']);
$messenger->assign_vars(array(
'USERNAME' => htmlspecialchars_decode($data['username']),
'U_USER_DETAILS' => "$server_url/memberlist.$phpEx?mode=viewprofile&u=$user_id",
'U_ACTIVATE' => "$server_url/ucp.$phpEx?mode=activate&u=$user_id&k=$user_actkey");
$messenger->send($row['user_notify_type']);
}
vamo ver no que dá.better use utf8_normalize_nfc and true as named here to prevent display-issues..
Tem sim....php tem esse lance de formato ansi/utf-8 ?
