Hi
ich suche eine usercp_register.php wo der Gender und Birthday Mod schon fuktionierend eingebaut sind. Ich kriege es nicht gebacken das da zum laufen zu bekommen.
bei beiden Mods steht find ( $signature_bbcode_uid = ''; ) das kommt aber nirgends vor, habe die 2.0.19 version.
Bitte mal Dringend um HILFE........
Gruß
Red Benz
(Suche fertige)usercp_register.php mit Gender u Birthday Mod
Forumsregeln
phpBB 2.0 hat das Ende seiner Lebenszeit überschritten
phpBB 2.0 wird nicht mehr aktiv unterstützt. Insbesondere werden - auch bei Sicherheitslücken - keine Patches mehr bereitgestellt. Der Einsatz von phpBB 2.0 erfolgt daher auf eigene Gefahr. Wir empfehlen einen Umstieg auf phpBB 3.0, welches aktiv weiterentwickelt wird und für welches regelmäßig Updates zur Verfügung gestellt werden.
phpBB 2.0 hat das Ende seiner Lebenszeit überschritten
phpBB 2.0 wird nicht mehr aktiv unterstützt. Insbesondere werden - auch bei Sicherheitslücken - keine Patches mehr bereitgestellt. Der Einsatz von phpBB 2.0 erfolgt daher auf eigene Gefahr. Wir empfehlen einen Umstieg auf phpBB 3.0, welches aktiv weiterentwickelt wird und für welches regelmäßig Updates zur Verfügung gestellt werden.
Genau das habe ich gemacht und dann habe ich 3 Stellen zur Auswahl und hinter welcher soll ich es setzen ?andechser hat geschrieben:Ich find´s schon...wenn Du den Abschnitt suchst (Ich gehe mal davon aus, du machst das über ´suchen`) lass mal die Klammern bei der Suche weg und guck, ob was
passiert...
Ich habe diese Datei nun schon mehrfach neu gemacht und jedesmal nur Fehler. Ich habe nun schon rund 40 Mods eingebaut aber die Beschreibung dieser beiden ist die Krönung.
Gruß
Red Benz
Hi ...
Was hast du denn da für eine Anleitung vom Birthday MOD?
In meiner Anleitung finde ich nur das hier was es zu suchen gilt.
Markus
Was hast du denn da für eine Anleitung vom Birthday MOD?
In meiner Anleitung finde ich nur das hier was es zu suchen gilt.
Code: Alles auswählen
$signature = str_replace('<br />', "\n", $signature);
.... Telefon-Support - Schnelle Hilfe bei Hackangriffen, Modeinbau, Templateanpassung, Grafikerst., uvm.
.... Es gibt keine Probleme .... Nur neue Chancen
.... Ihr wollt ein einmaliges Template? - Prof. Templateerstellung und phpBB-Anpassungen
.... Es gibt keine Probleme .... Nur neue Chancen
.... Ihr wollt ein einmaliges Template? - Prof. Templateerstellung und phpBB-Anpassungen
Hi
Der von dir gepostete Text kommt bei mir nirgends vor !
Revision:
1.5.9
File Size:
33 Kb
phpBB Version:
2.0.20
Author:
Niels Chr. Denmark
Downloads:
67189
Added:
2002-02-19 03:45:12
Last Update:
May 7, 2006
Was für eine Version ist deins denn ?
Gruß
Red Benz
Der von dir gepostete Text kommt bei mir nirgends vor !
Revision:
1.5.9
File Size:
33 Kb
phpBB Version:
2.0.20
Author:
Niels Chr. Denmark
Downloads:
67189
Added:
2002-02-19 03:45:12
Last Update:
May 7, 2006
Code: Alles auswählen
MOD Title: Birthday
## MOD Author: Niels < ncr@db9.dk > (Niels Chr. Rød) http://mods.db9.dk
## MOD Description: This mod will add a birthday field into your
## user's profile and make users age viewable
## to others when viewing posts.
## MOD Version: 1.5.9
#-----[ 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
Gruß
Red Benz
-
- Mitglied
- Beiträge: 513
- Registriert: 29.09.2004 14:23
Code: Alles auswählen
#-----[ FIND ]------------------------------------------------
#
$signature_bbcode_uid = '';
#
#-----[ AFTER, ADD ]------------------------------------------
#
@SuesseMaus28884
so gesehen hast du recht....
nur grade deshalb zweifelt man irgendwann an sich selbst wenn dann der Einbau des 41zigsten nicht klappt.
Ich habe festgestellt das der Code von Nils für die neueste phpBB version ist, darin ist der gesuchte Text enthalten aber nicht in der 2.0.19.
Ich werde mit der neuen Erkenntnis einen neuen Anlauf nehmen.
Gruß
Red Benz
so gesehen hast du recht....
nur grade deshalb zweifelt man irgendwann an sich selbst wenn dann der Einbau des 41zigsten nicht klappt.
Ich habe festgestellt das der Code von Nils für die neueste phpBB version ist, darin ist der gesuchte Text enthalten aber nicht in der 2.0.19.
Ich werde mit der neuen Erkenntnis einen neuen Anlauf nehmen.
Gruß
Red Benz