GeburtstagsMod - Finde Code in usercp_register.php nicht!
Verfasst: 09.03.2007 15:40
Hallo!
Ich habe das Geburtstagsmod 1.5.9.
in der install.txt steht folgendes drin:
Ich hab nur ein Problem: (hab die alte 2.0.6. Version, ein Update will ich erst machen wenn Olympus rauskommt)
- Ich finde nicht in dieser Datei: $signature_bbcode_uid = '';
sondern das:
if ( $signature_bbcode_uid == '' )
{
Jetzt weiß ich nicht wo ich das ändern muss.? Und die anderen Codes finde ich auch nicht in der includes/usercp_register.php.
Das ist die einzige Datei, in der ich diese Codes nicht finde
Wisst ihr ne Lösung?
Die Codes finde ich auch nicht:
$avatar_sql finde ich auch nicht
$sql = "UPDATE auch nicht
$sql = "INSERT INTO " . USERS_TABLE . "
VALUES ($user_id,
$interests = $userdata['user_interests'];
display_avatar_gallery($mode
Ich habe das Geburtstagsmod 1.5.9.
in der install.txt steht folgendes drin:
Ich hab nur ein Problem: (hab die alte 2.0.6. Version, ein Update will ich erst machen wenn Olympus rauskommt)
- Ich finde nicht in dieser Datei: $signature_bbcode_uid = '';
sondern das:
if ( $signature_bbcode_uid == '' )
{
Jetzt weiß ich nicht wo ich das ändern muss.? Und die anderen Codes finde ich auch nicht in der includes/usercp_register.php.
Das ist die einzige Datei, in der ich diese Codes nicht finde
Wisst ihr ne Lösung?
Die Codes finde ich auch nicht:
$avatar_sql finde ich auch nicht
$sql = "UPDATE auch nicht
$sql = "INSERT INTO " . USERS_TABLE . "
VALUES ($user_id,
$interests = $userdata['user_interests'];
display_avatar_gallery($mode
Code: Alles auswählen
#
#-----[ OPEN ]------------------------------------------------
#
includes/usercp_register.php
#
#-----[ FIND ]------------------------------------------------
#
$signature_bbcode_uid = '';
#
#-----[ AFTER, ADD ]------------------------------------------
#
// Start add - Birthday MOD
if (isset($HTTP_POST_VARS['birthday']) )
{
$birthday = intval ($HTTP_POST_VARS['birthday']);
if ($birthday!=999999)
{
$b_day = realdate('j',$birthday);
$b_md = realdate('n',$birthday);
$b_year = realdate('Y',$birthday);
}
} else
{
$b_day = ( isset($HTTP_POST_VARS['b_day']) ) ? intval ($HTTP_POST_VARS['b_day']) : 0;
$b_md = ( isset($HTTP_POST_VARS['b_md']) ) ? intval ($HTTP_POST_VARS['b_md']) : 0;
$b_year = ( isset($HTTP_POST_VARS['b_year']) ) ? intval ($HTTP_POST_VARS['b_year']) : 0;
if ($b_day && $b_md && $b_year)
{
$birthday = mkrealdate($b_day,$b_md,$b_year);
} else
{
$birthday = 999999;
}
}
// End add - Birthday MOD
#
#-----[ FIND ]------------------------------------------------
#
$avatar_sql = user_avatar_gallery($mode
}
#
#-----[ AFTER, ADD ]------------------------------------------
#
// Start add - Birthday MOD
// find the birthday values, reflected by the $lang['Submit_date_format']
if ($b_day || $b_md || $b_year) //if a birthday is submited, then validate it
{
$user_age=(date('md')>=$b_md.(($b_day <= 9) ? '0':'').$b_day) ? date('Y') - $b_year : date('Y') - $b_year - 1 ;
// Check date, maximum / minimum user age
if (!checkdate($b_md,$b_day,$b_year))
{
$error = TRUE;
if( isset($error_msg) )$error_msg .= "<br />";
$error_msg .= $lang['Wrong_birthday_format'];
} else
if ($user_age>$board_config['max_user_age'])
{
$error = TRUE;
if( isset($error_msg) )$error_msg .= "<br />";
$error_msg .= sprintf($lang['Birthday_to_high'],$board_config['max_user_age']);
} else
if ($user_age<$board_config['min_user_age'])
{
$error = TRUE;
if( isset($error_msg) )$error_msg .= "<br />";
$error_msg .= sprintf($lang['Birthday_to_low'],$board_config['min_user_age']);
} else
{
$birthday = ($error) ? $birthday : mkrealdate($b_day,$b_md,$b_year);
$next_birthday_greeting = (date('md')<$b_md.(($b_day <= 9) ? '0':'').$b_day) ? date('Y'):date('Y')+1 ;
}
} else
{
if ($board_config['birthday_required'])
{
$error = TRUE;
if( isset($error_msg) )$error_msg .= "<br />";
$error_msg .= sprintf($lang['Birthday_require']);
}
$birthday = 999999;
}
// End add - Birthday MOD
#
#-----[ FIND ]------------------------------------------------
#
$sql = "UPDATE " . USERS_TABLE . "
SET
#
#-----[ IN-LINE FIND ]----------------------------------------
#
str_replace("\'", "''", $interests) . "'
#
#-----[ IN-LINE AFTER, ADD ]----------------------------------
#
, user_birthday = '$birthday', user_next_birthday_greeting = '$next_birthday_greeting'
#
#-----[ FIND ]------------------------------------------------
#
# NOTICE - IMPORTENT SECURITY RISK
#
# If you some how do not preform the following VERY carefully you have the
# potential to compromise your forum SECURITY, your users may easyly get ADMIN access if you make mistake
# meny users do make mistake in the step, so please be very exact, if this fail, then do not run your code on live forum
#
$sql = "INSERT INTO " . USERS_TABLE . "
#
#-----[ IN-LINE FIND ]----------------------------------------
#
, user_active, user_actkey)
#
#-----[ IN-LINE BEFORE, ADD ]---------------------------------
#
, user_birthday, user_next_birthday_greeting
#
#-----[ FIND ]------------------------------------------------
#
VALUES ($user_id,
#
#-----[ IN-LINE FIND ]----------------------------------------
#
, ";
#
#-----[ IN-LINE BEFORE, ADD ]---------------------------------
#
, '$birthday', '$next_birthday_greeting'
#
#-----[ FIND ]------------------------------------------------
#
$interests = $userdata['user_interests'];
#
#-----[ AFTER, ADD ]------------------------------------------
#
// Start add - Birthday MOD
$birthday = $userdata['user_birthday'];
// End add - Birthday MOD
#
#-----[ FIND ]------------------------------------------------
#
display_avatar_gallery($mode
#
#-----[ IN-LINE FIND ]----------------------------------------
#
);
#
#-----[ IN-LINE BEFORE, ADD ]---------------------------------
#
, $birthday
#
#-----[ FIND ]------------------------------------------------
#
if ( $error )
{
$template->set_filenames(array(
#
#-----[ BEFORE, ADD ]-----------------------------------------
#
// Start add - Birthday MOD
if ( $birthday!=999999 )
{
$b_day = realdate('j', $birthday);
$b_md = realdate('n', $birthday);
$b_year = realdate('Y', $birthday);
$birthday = realdate($lang['Submit_date_format'], $birthday);
} else
{
$b_day = '';
$b_md = '';
$b_year = '';
$birthday = '';
}
// End add - Birthday MOD
#
#-----[ FIND ]------------------------------------------------
#
//
// Let's do an overall check for settings/versions which would prevent
#
#-----[ BEFORE, ADD ]-----------------------------------------
#
// Start add - Birthday MOD
$s_b_day = '<span class="genmed">' . $lang['Day'] . ' </span><select name="b_day" size="1" class="gensmall">
<option value="0"> - </option>
<option value="1"> 1 </option>
<option value="2"> 2 </option>
<option value="3"> 3 </option>
<option value="4"> 4 </option>
<option value="5"> 5 </option>
<option value="6"> 6 </option>
<option value="7"> 7 </option>
<option value="8"> 8 </option>
<option value="9"> 9 </option>
<option value="10"> 10 </option>
<option value="11"> 11 </option>
<option value="12"> 12 </option>
<option value="13"> 13 </option>
<option value="14"> 14 </option>
<option value="15"> 15 </option>
<option value="16"> 16 </option>
<option value="17"> 17 </option>
<option value="18"> 18 </option>
<option value="19"> 19 </option>
<option value="20"> 20 </option>
<option value="21"> 21 </option>
<option value="22"> 22 </option>
<option value="23"> 23 </option>
<option value="24"> 24 </option>
<option value="25"> 25 </option>
<option value="26"> 26 </option>
<option value="27"> 27 </option>
<option value="28"> 28 </option>
<option value="29"> 29 </option>
<option value="30"> 30 </option>
<option value="31"> 31 </option>
</select> ';
$s_b_md = '<span class="genmed">' . $lang['Month'] . ' </span><select name="b_md" size="1" class="gensmall">
<option value="0"> - </option>
<option value="1"> '.$lang['datetime']['January'].' </option>
<option value="2"> '.$lang['datetime']['February'].' </option>
<option value="3"> '.$lang['datetime']['March'].' </option>
<option value="4"> '.$lang['datetime']['April'].' </option>
<option value="5"> '.$lang['datetime']['May'].' </option>
<option value="6"> '.$lang['datetime']['June'].' </option>
<option value="7"> '.$lang['datetime']['July'].' </option>
<option value="8"> '.$lang['datetime']['August'].' </option>
<option value="9"> '.$lang['datetime']['September'].' </option>
<option value="10"> '.$lang['datetime']['October'].' </option>
<option value="11"> '.$lang['datetime']['November'].' </option>
<option value="12"> '.$lang['datetime']['December'].' </option>
</select> ';
$s_b_day= str_replace("value=\"".$b_day."\">", "value=\"".$b_day."\" SELECTED>" ,$s_b_day);
$s_b_md = str_replace("value=\"".$b_md."\">", "value=\"".$b_md."\" SELECTED>" ,$s_b_md);
$s_b_year = '<span class="genmed">' . $lang['Year'] . ' </span><input type="text" class="post" style="width: 50px" name="b_year" size="4" maxlength="4" value="' . $b_year . '" /> ';
$i = 0;
$s_birthday = '';
for ($i=0; $i<=strlen($lang['Submit_date_format']); $i++)
{
switch ($lang['Submit_date_format'][$i])
{
case d: $s_birthday .= $s_b_day;break;
case m: $s_birthday .= $s_b_md;break;
case Y: $s_birthday .= $s_b_year;break;
}
}
// End add - Birthday MOD
#
#-----[ FIND ]------------------------------------------------
#
'OCCUPATION' =>
'INTERESTS' =>
#
#-----[ AFTER, ADD ]------------------------------------------
#
// Start add - Birthday MOD
'S_BIRTHDAY' => $s_birthday,
'BIRTHDAY_REQUIRED' => ($board_config['birthday_required']) ? '*' : '',
// End add - Birthday MOD
#
#-----[ FIND ]------------------------------------------------
#
'L_INTERESTS' =>
#
#-----[ AFTER, ADD ]------------------------------------------
#
// Start add - Birthday MOD
'L_BIRTHDAY' => $lang['Birthday'],
// End add - Birthday MOD