SMF 2.0.7
Hi,
For example, this custom field is not shown in register.
How to generate/add this custom field to database while register? This field is set to '0' values, not an empty values.
Thanks!
It has been 24 hours 0 minutes and 1 second. :p
Bump.
LOL ;D
This is something I imagine a MOD for. If only I could get the time... :(
Lainaus käyttäjältä: margarett - huhtikuu 12, 2014, 12:56:28 IP
LOL ;D
This is something I imagine a MOD for. If only I could get the time... :(
Okay, maybe I just need this: Where did the SMF insert custom field to database while register?
What PHP file and line?
Thanks!
Finally! I solved my problem :D
From Subs-Member.php
Find
// Theme variables too?
if (!empty($theme_vars))
{
$inserts = array();
foreach ($theme_vars as $var => $val)
$inserts[] = array($memberID, $var, $val);
$smcFunc['db_insert']('insert',
'{db_prefix}themes',
array('id_member' => 'int', 'variable' => 'string-255', 'value' => 'string-65534'),
$inserts,
array('id_member', 'variable')
);
}
Replace with
// Theme variables too?
if (!empty($theme_vars))
{
$smcFunc['db_insert']('insert',
'{db_prefix}themes',
array(
'id_member' => 'int', 'variable' => 'string-255', 'value' => 'string-65534',
),
array(
$memberID, 'cust_battle', '0',
),
array('id_member', 'variable')
);
$smcFunc['db_insert']('insert',
'{db_prefix}themes',
array(
'id_member' => 'int', 'variable' => 'string-255', 'value' => 'string-65534',
),
array(
$memberID, 'cust_t', '0',
),
array('id_member', 'variable')
);
$inserts = array();
foreach ($theme_vars as $var => $val)
$inserts[] = array($memberID, $var, $val);
$smcFunc['db_insert']('insert',
'{db_prefix}themes',
array('id_member' => 'int', 'variable' => 'string-255', 'value' => 'string-65534'),
$inserts,
array('id_member', 'variable')
);
}
But it semms odd because it takes many query.
At least this problem is solved. :3