GeburtstagsMod - Finde Code in usercp_register.php nicht!

Du hast Probleme beim Einbau oder bei der Benutzung eines Mods? In diesem Forum bist du richtig.
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.
Antworten
Mutated!
Mitglied
Beiträge: 171
Registriert: 01.04.2004 14:05
Wohnort: Karlsruhe
Kontaktdaten:

GeburtstagsMod - Finde Code in usercp_register.php nicht!

Beitrag von Mutated! »

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

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'] . '&nbsp;</span><select name="b_day" size="1" class="gensmall"> 
		<option value="0">&nbsp;-&nbsp;</option> 
		<option value="1">&nbsp;1&nbsp;</option>
		<option value="2">&nbsp;2&nbsp;</option>
		<option value="3">&nbsp;3&nbsp;</option>
		<option value="4">&nbsp;4&nbsp;</option>
		<option value="5">&nbsp;5&nbsp;</option>
		<option value="6">&nbsp;6&nbsp;</option>
		<option value="7">&nbsp;7&nbsp;</option>
		<option value="8">&nbsp;8&nbsp;</option>
		<option value="9">&nbsp;9&nbsp;</option>
		<option value="10">&nbsp;10&nbsp;</option>
		<option value="11">&nbsp;11&nbsp;</option>
		<option value="12">&nbsp;12&nbsp;</option>
		<option value="13">&nbsp;13&nbsp;</option>
		<option value="14">&nbsp;14&nbsp;</option>
		<option value="15">&nbsp;15&nbsp;</option>
		<option value="16">&nbsp;16&nbsp;</option>
		<option value="17">&nbsp;17&nbsp;</option>
		<option value="18">&nbsp;18&nbsp;</option>
		<option value="19">&nbsp;19&nbsp;</option>
		<option value="20">&nbsp;20&nbsp;</option>
		<option value="21">&nbsp;21&nbsp;</option>
		<option value="22">&nbsp;22&nbsp;</option>
		<option value="23">&nbsp;23&nbsp;</option>
		<option value="24">&nbsp;24&nbsp;</option>
		<option value="25">&nbsp;25&nbsp;</option>
		<option value="26">&nbsp;26&nbsp;</option>
		<option value="27">&nbsp;27&nbsp;</option>
		<option value="28">&nbsp;28&nbsp;</option>
		<option value="29">&nbsp;29&nbsp;</option>
		<option value="30">&nbsp;30&nbsp;</option>
		<option value="31">&nbsp;31&nbsp;</option>
	  	</select>&nbsp;&nbsp;';
	$s_b_md = '<span class="genmed">' . $lang['Month'] . '&nbsp;</span><select name="b_md" size="1" class="gensmall"> 
     		<option value="0">&nbsp;-&nbsp;</option> 
		<option value="1">&nbsp;'.$lang['datetime']['January'].'&nbsp;</option>
		<option value="2">&nbsp;'.$lang['datetime']['February'].'&nbsp;</option>
		<option value="3">&nbsp;'.$lang['datetime']['March'].'&nbsp;</option>
		<option value="4">&nbsp;'.$lang['datetime']['April'].'&nbsp;</option>
		<option value="5">&nbsp;'.$lang['datetime']['May'].'&nbsp;</option>
		<option value="6">&nbsp;'.$lang['datetime']['June'].'&nbsp;</option>
		<option value="7">&nbsp;'.$lang['datetime']['July'].'&nbsp;</option>
		<option value="8">&nbsp;'.$lang['datetime']['August'].'&nbsp;</option>
		<option value="9">&nbsp;'.$lang['datetime']['September'].'&nbsp;</option>
		<option value="10">&nbsp;'.$lang['datetime']['October'].'&nbsp;</option>
		<option value="11">&nbsp;'.$lang['datetime']['November'].'&nbsp;</option>
		<option value="12">&nbsp;'.$lang['datetime']['December'].'&nbsp;</option>
		</select>&nbsp;&nbsp;';
	$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'] . '&nbsp;</span><input type="text" class="post" style="width: 50px" name="b_year" size="4" maxlength="4" value="' . $b_year . '" />&nbsp;&nbsp;'; 
	$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
-Tanja-
Mitglied
Beiträge: 1051
Registriert: 03.02.2007 08:19

Beitrag von -Tanja- »

Dann verlink uns mal die includes/usercp_register.php als Text-File
Mutated!
Mitglied
Beiträge: 171
Registriert: 01.04.2004 14:05
Wohnort: Karlsruhe
Kontaktdaten:

Beitrag von Mutated! »

Hier könnt ihr die usercp_register.php anschauen

in der usercp_viewprofile.php finde ich auch nicht die Codes:
Hier könnt ihr die usercp_viewprofile.php anschauen

Code: Alles auswählen

 
includes/usercp_viewprofile.php

#
#-----[ FIND ]------------------------------------------------
#
//
// Generate page

#
#-----[ BEFORE, ADD ]-----------------------------------------
#

// Start add - Birthday MOD
if ($profiledata['user_birthday']!=999999)
{
	$user_birthday = realdate($lang['DATE_FORMAT'], $profiledata['user_birthday']);
} else
{
	$user_birthday = $lang['No_birthday_specify'];
}
// End add - Birthday MOD

#
#-----[ FIND ]------------------------------------------------
#
'INTERESTS' =>

#
#-----[ AFTER, ADD ]------------------------------------------
#

// Start add - Birthday MOD
	'BIRTHDAY' => $user_birthday,
// End add - Birthday MOD

#
#-----[ FIND ]------------------------------------------------
#
'L_INTERESTS' =>

#
#-----[ AFTER, ADD ]------------------------------------------
#

// Start add - Birthday MOD
	'L_BIRTHDAY' => $lang['Birthday'],
// End add - Birthday MOD
-Tanja-
Mitglied
Beiträge: 1051
Registriert: 03.02.2007 08:19

Beitrag von -Tanja- »

Gib mir die Adresse deiner Mail dann schick dir jetzt die geänderte Datei. :wink:
-Tanja-
Mitglied
Beiträge: 1051
Registriert: 03.02.2007 08:19

Beitrag von -Tanja- »

Mutated! hat geschrieben:Hier könnt ihr die usercp_register.php anschauen

in der usercp_viewprofile.php finde ich auch nicht die Codes:
Hier könnt ihr die usercp_viewprofile.php anschauen

Code: Alles auswählen

 
includes/usercp_viewprofile.php

#
#-----[ FIND ]------------------------------------------------
#
//
// Generate page

#
#-----[ BEFORE, ADD ]-----------------------------------------
#

// Start add - Birthday MOD
if ($profiledata['user_birthday']!=999999)
{
	$user_birthday = realdate($lang['DATE_FORMAT'], $profiledata['user_birthday']);
} else
{
	$user_birthday = $lang['No_birthday_specify'];
}
// End add - Birthday MOD

#
#-----[ FIND ]------------------------------------------------
#
'INTERESTS' =>

#
#-----[ AFTER, ADD ]------------------------------------------
#

// Start add - Birthday MOD
	'BIRTHDAY' => $user_birthday,
// End add - Birthday MOD

#
#-----[ FIND ]------------------------------------------------
#
'L_INTERESTS' =>

#
#-----[ AFTER, ADD ]------------------------------------------
#

// Start add - Birthday MOD
	'L_BIRTHDAY' => $lang['Birthday'],
// End add - Birthday MOD
ähhhh :roll: , in der usercp_viewprofile.php hast du schon alles geändert!!! Wieso schreibst du das du diese Abschnitte nicht findest. Hab jetzt in der verlinkten Datei nachgeschaut und gesehen das die Änderungen die du oben aufgelistet hast, schon alle gemacht wurden. :wink:

Und in der usercp_register.php hab ich OHNE Mühe ALLE Abschnitte gefunden.
Immer gut schauen, dann findet man alles.

P.S. Ich warte auf deine Mail, damit ich dir die Datei schicken kann. :wink:
Mutated!
Mitglied
Beiträge: 171
Registriert: 01.04.2004 14:05
Wohnort: Karlsruhe
Kontaktdaten:

Beitrag von Mutated! »

ja in der anderen Datei hab ich nur "Generate the page" gefunden aber nicht "INTERESTS".
E-Mail Adresse siehe: PN-Eingang
-Tanja-
Mitglied
Beiträge: 1051
Registriert: 03.02.2007 08:19

Beitrag von -Tanja- »

Auch die hast du schon gefunden und geändert. :wink:

P.S. Mail ist abgeschickt worden. :wink:

Tschüssss
Mutated!
Mitglied
Beiträge: 171
Registriert: 01.04.2004 14:05
Wohnort: Karlsruhe
Kontaktdaten:

Beitrag von Mutated! »

danke. jetzt klappt alles. bist super! :D
-Tanja-
Mitglied
Beiträge: 1051
Registriert: 03.02.2007 08:19

Beitrag von -Tanja- »

8)
Antworten

Zurück zu „phpBB 2.0: Mod Support“