phpBB2 Plus 1.52 erg traag, reden is Birthday Mod
Forumregels
Sinds 1 januari 2009 wordt phpBB2 niet meer ondersteund.
Onderstaande informatie is verouderd en dient uitsluitend als archief.
Sinds 1 januari 2009 wordt phpBB2 niet meer ondersteund.
Onderstaande informatie is verouderd en dient uitsluitend als archief.

-
- Berichten: 464
- Lid geworden op: 08 jun 2004, 13:21
- Locatie: Breedtje @
- Contacteer:
phpBB2 Plus 1.52 erg traag, reden is Birthday Mod
Op phpbb2.de staat heel duidelijk aangegeven dat het birthday mod en het last visit mod het forum en portal erg traag maken.
Nu wil ik deze 2 mod verwijderen.
Maar de vraag is hoe kan ik dat doen zonder fouten.
Wat ik eerder heb gedaan is het readme.txt gelezen en alles weer precies andersom gedaan maar mn forum en portal opende niet.
Hij gaf een fout in page header.
Terwijl in het instalietie instructie page header niet eens staat dus daar hoev ik geen wijzigeging te doen.
Nu wil ik deze 2 mod verwijderen.
Maar de vraag is hoe kan ik dat doen zonder fouten.
Wat ik eerder heb gedaan is het readme.txt gelezen en alles weer precies andersom gedaan maar mn forum en portal opende niet.
Hij gaf een fout in page header.
Terwijl in het instalietie instructie page header niet eens staat dus daar hoev ik geen wijzigeging te doen.
-
- Berichten: 464
- Lid geworden op: 08 jun 2004, 13:21
- Locatie: Breedtje @
- Contacteer:
-
- Berichten: 464
- Lid geworden op: 08 jun 2004, 13:21
- Locatie: Breedtje @
- Contacteer:
Hoe doe ik dat?
Of is er daar ook een instaal.txt bestand voor die ik andersom kan uitvoeren.
Ik ga nu weer opnieuw proberen om alles weer andersom te doen.
Birthday Mod v1.5.4 deze versie kan ik nergens vinden
Behalve bij het auteur : http://mods.db9.dk
Alleen wat is er aan de hand met dit site?
Ongeloofelijk traag en constant fouten.
Ik kom er niet eens in
Iemand een download link naar Birthday Mod v1.5.4
Of is er daar ook een instaal.txt bestand voor die ik andersom kan uitvoeren.
Ik ga nu weer opnieuw proberen om alles weer andersom te doen.
Birthday Mod v1.5.4 deze versie kan ik nergens vinden
Behalve bij het auteur : http://mods.db9.dk
Alleen wat is er aan de hand met dit site?
Ongeloofelijk traag en constant fouten.
Ik kom er niet eens in
Iemand een download link naar Birthday Mod v1.5.4
-
- Berichten: 464
- Lid geworden op: 08 jun 2004, 13:21
- Locatie: Breedtje @
- Contacteer:
De Birthday hack ook staat op phpBBHacks -->
http://www.phpbbhacks.com/download/187
Ik heb ook problemen met de site van Niels, vooral met posten....
http://www.phpbbhacks.com/download/187
Ik heb ook problemen met de site van Niels, vooral met posten....

Je kan deze mod heel snel laten worden. Als je het in cache laat zetten. In de index.php vind je dit stuk:
Vervang met:
Code: Selecteer alles
// Birthday Mod, Show users with birthday
$sql = ($board_config['birthday_check_day']) ? "SELECT user_id, username, user_birthday,user_level FROM " . USERS_TABLE. " WHERE user_birthday!=999999 ORDER BY username" :"";
if($result = $db->sql_query($sql))
{
if (!empty($result))
{
$time_now = time();
$this_year = create_date('Y', $time_now, $board_config['board_timezone']);
$date_today = create_date('Ymd', $time_now, $board_config['board_timezone']);
$date_forward = create_date('Ymd', $time_now+($board_config['birthday_check_day']*86400), $board_config['board_timezone']);
while ($birthdayrow = $db->sql_fetchrow($result))
{
$user_birthday2 = $this_year.($user_birthday = realdate("md",$birthdayrow['user_birthday'] ));
if ( $user_birthday2 < $date_today ) $user_birthday2 += 10000;
if ( $user_birthday2 > $date_today && $user_birthday2 <= $date_forward )
{
// user are having birthday within the next days
$user_age = ( $this_year.$user_birthday < $date_today ) ? $this_year - realdate ('Y',$birthdayrow['user_birthday'])+1 : $this_year- realdate ('Y',$birthdayrow['user_birthday']);
switch ($birthdayrow['user_level'])
{
case ADMIN :
$birthdayrow['username'] = '<b>' . $birthdayrow['username'] . '</b>';
$style_color = 'style="color:#' . $theme['fontcolor3'] . '"';
break;
case MOD :
$birthdayrow['username'] = '<b>' . $birthdayrow['username'] . '</b>';
$style_color = 'style="color:#' . $theme['fontcolor2'] . '"';
break;
default: $style_color = '';
}
$birthday_week_list .= ' <a href="' . append_sid("profile.$phpEx?mode=viewprofile&" . POST_USERS_URL . "=" . $birthdayrow['user_id']) . '"' . $style_color .'>' . $birthdayrow['username'] . ' ('.$user_age.')</a>,';
} else if ( $user_birthday2 == $date_today )
{
//user have birthday today
$user_age = $this_year - realdate ( 'Y',$birthdayrow['user_birthday'] );
switch ($birthdayrow['user_level'])
{
case ADMIN :
$birthdayrow['username'] = '<b>' . $birthdayrow['username'] . '</b>';
$style_color = 'style="color:#' . $theme['fontcolor3'] . '"';
break;
case MOD :
$birthdayrow['username'] = '<b>' . $birthdayrow['username'] . '</b>';
$style_color = 'style="color:#' . $theme['fontcolor2'] . '"';
break;
default: $style_color = '';
}
$birthday_today_list .= ' <a href="' . append_sid("profile.$phpEx?mode=viewprofile&" . POST_USERS_URL . "=" . $birthdayrow['user_id']) . '"' . $style_color .'>' . $birthdayrow['username'] . ' ('.$user_age.')</a>,';
}
}
if ($birthday_today_list) $birthday_today_list[ strlen( $birthday_today_list)-1] = ' ';
if ($birthday_week_list) $birthday_week_list[ strlen( $birthday_week_list)-1] = ' ';
}
$db->sql_freeresult($result);
}
Code: Selecteer alles
// Birthday Mod, Show users with birthday
$cache_data_file = $phpbb_root_path."cache/birthday_". $board_config['board_timezone'] . ".dat";
if (@is_file($cache_data_file) && empty($SID))
{
$valid = (date('YzH',time()) - date('YzH',@filemtime($cache_data_file))<1) ? true : false;
} else
{
$valid = false;
}
if ($valid )
{
include ($cache_data_file);
$birthday_today_list = stripslashes($birthday_today_list);
$birthday_week_list = stripslashes($birthday_week_list);
} else
{
$sql = ($board_config['birthday_check_day']) ? "SELECT user_id, username, user_birthday,user_level FROM " . USERS_TABLE. " WHERE user_birthday!=999999 ORDER BY username" :"";
if($result = $db->sql_query($sql))
{
if (!empty($result))
{
$time_now = time();
$this_year = create_date('Y', $time_now, $board_config['board_timezone']);
$date_today = create_date('Ymd', $time_now, $board_config['board_timezone']);
$date_forward = create_date('Ymd', $time_now+($board_config['birthday_check_day']*86400), $board_config['board_timezone']);
while ($birthdayrow = $db->sql_fetchrow($result))
{
$user_birthday2 = $this_year.($user_birthday = realdate("md",$birthdayrow['user_birthday'] ));
if ( $user_birthday2 < $date_today ) $user_birthday2 += 10000;
if ( $user_birthday2 > $date_today && $user_birthday2 <= $date_forward )
{
// user are having birthday within the next days
$user_age = ( $this_year.$user_birthday < $date_today ) ? $this_year - realdate ('Y',$birthdayrow['user_birthday'])+1 : $this_year- realdate ('Y',$birthdayrow['user_birthday']);
switch ($birthdayrow['user_level'])
{
case ADMIN :
$birthdayrow['username'] = '<b>' . $birthdayrow['username'] . '</b>';
$style_color = 'style="color:#' . $theme['fontcolor3'] . '"';break;
case MOD :
$birthdayrow['username'] = '<b>' . $birthdayrow['username'] . '</b>';
$style_color = 'style="color:#' . $theme['fontcolor2'] . '"';break;
default: $style_color = '';
}
$birthday_week_list .= ' <a href="' . append_sid("profile.$phpEx?mode=viewprofile&" . POST_USERS_URL . "=" . $birthdayrow['user_id']) . '"' . $style_color .'>' . $birthdayrow['username'] . ' ('.$user_age.')</a>,';
} else if ( $user_birthday2 == $date_today )
{
//user have birthday today
$user_age = $this_year - realdate ( 'Y',$birthdayrow['user_birthday'] );
switch ($birthdayrow['user_level'])
{
case ADMIN :
$birthdayrow['username'] = '<b>' . $birthdayrow['username'] . '</b>';
$style_color = 'style="color:#' . $theme['fontcolor3'] . '"';break;
case MOD :
$birthdayrow['username'] = '<b>' . $birthdayrow['username'] . '</b>';
$style_color = 'style="color:#' . $theme['fontcolor2'] . '"';break;
default: $style_color = '';
}
$birthday_today_list .= ' <a href="' . append_sid("profile.$phpEx?mode=viewprofile&" . POST_USERS_URL . "=" . $birthdayrow['user_id']) . '"' . $style_color .'>' . $birthdayrow['username'] . ' ('.$user_age.')</a>,';
}
}
if ($birthday_today_list) $birthday_today_list[ strlen( $birthday_today_list)-1] = ' ';
if ($birthday_week_list) $birthday_week_list[ strlen( $birthday_week_list)-1] = ' ';
}
$db->sql_freeresult($result);
if (empty($SID))
{
// stores the data set in a cache file
$data = "<?php\n";
$data .='$birthday_today_list = \'' . addslashes($birthday_today_list) . ".';\n";
$data .='$birthday_week_list = \''.addslashes($birthday_week_list) . ".';\n?>";
$fp = fopen( $cache_data_file, "w" );
fwrite($fp, $data);
fclose($fp);
}
}
}
Bezoek ook ns mn site:
http://www.partyfreakers.nl of mn premodded site: http://www.vitrax.org
Laturzzz,
Duvelske
http://www.partyfreakers.nl of mn premodded site: http://www.vitrax.org
Laturzzz,
Duvelske
-
- Berichten: 464
- Lid geworden op: 08 jun 2004, 13:21
- Locatie: Breedtje @
- Contacteer:
dat hoort bij de im portal
Is een block ervan
laat alle laatste berichten scrollend zien.


Bezoek ook ns mn site:
http://www.partyfreakers.nl of mn premodded site: http://www.vitrax.org
Laturzzz,
Duvelske
http://www.partyfreakers.nl of mn premodded site: http://www.vitrax.org
Laturzzz,
Duvelske
-
- Berichten: 464
- Lid geworden op: 08 jun 2004, 13:21
- Locatie: Breedtje @
- Contacteer:
Wil je deze mod eruit halen dan? Alleen in plus zit toch ook een callender die ook met de birthday mod werkt?
Dan kan je het er wel allemaal uithalen, maar vergt heel veel tijd hoor. Je kan dan beter zorgen dat niemand een verjaardag kan invullen. En in de index.php dat stuk weg haalt. Dan berekend hij niet wie er jarig is enz. Scheeld al een hoop. En scheeld jou een hoop werk 


Bezoek ook ns mn site:
http://www.partyfreakers.nl of mn premodded site: http://www.vitrax.org
Laturzzz,
Duvelske
http://www.partyfreakers.nl of mn premodded site: http://www.vitrax.org
Laturzzz,
Duvelske
-
- Berichten: 464
- Lid geworden op: 08 jun 2004, 13:21
- Locatie: Breedtje @
- Contacteer:
-
- Berichten: 464
- Lid geworden op: 08 jun 2004, 13:21
- Locatie: Breedtje @
- Contacteer:
Re: phpBB2 Plus 1.52 erg traag, reden is Birthday Mod
Nursaniyem schreef:Op phpbb2.de staat heel duidelijk aangegeven dat het birthday mod en het last visit mod het forum en portal erg traag maken.
Nu wil ik deze 2 mod verwijderen.
Maar de vraag is hoe kan ik dat doen zonder fouten.
Wat ik eerder heb gedaan is het readme.txt gelezen en alles weer precies andersom gedaan maar mn forum en portal opende niet.
Hij gaf een fout in page header.
Terwijl in het instalietie instructie page header niet eens staat dus daar hoev ik geen wijzigeging te doen.
Je moet deze aanpassen:
ps sorry voor de lange coding mensen
en
ps sorry voor de lange coding mensen

Code: Selecteer alles
#
#-----[ OPEN ]------------------------------------------------
#
includes/usercp_register.php
#
#-----[ FIND ]------------------------------------------------
#
$signature = str_replace('<br />', "\n", $signature);
#
#-----[ 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, $error, $error_msg, $user_avatar_local);
}
#
#-----[ 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
#
#-----[ OPEN ]------------------------------------------------
#
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
Code: Selecteer alles
#
#-----[ OPEN ]------------------------------------------------
#
# Make sure to edit this file for every theme you use!
#
templates/subSilver/index_body.tpl
#
#-----[ FIND ]------------------------------------------------
#
<td class="row1" align="center" valign="middle" rowspan
#
#-----[ IN-LINE FIND ]----------------------------------------
#
# This value can be different, if other mods, add +1 to the value
#
2
#
#-----[ IN-LINE REPLACE WITH ]--------------------------------
#
# The find value can be different, if other mods, add +1 to the value
#
3
#
#-----[ FIND ]------------------------------------------------
#
{LOGGED_IN_USER_LIST}</span></td>
</tr>
#
#-----[ AFTER, ADD ]------------------------------------------
#
<!-- Start add - Birthday MOD -->
<tr>
<td class="row1" align="left"><span class="gensmall">{L_WHOSBIRTHDAY_TODAY}<br />{L_WHOSBIRTHDAY_WEEK}</span></td>
</tr>
<!-- End add - Birthday MOD -->
#
#-----[ OPEN ]------------------------------------------------
#
# Make sure to edit this file for every theme you use!
#
templates/subSilver/profile_add_body.tpl
#
#-----[ FIND ]------------------------------------------------
#
<input type="text" class="post"style="width: 200px" name="interests" size="35" maxlength="150" value="{INTERESTS}" />
</td>
</tr>
#
#-----[ AFTER, ADD ]------------------------------------------
#
<!-- Start add - Birthday MOD -->
<tr>
<td class="row1"><span class="gen">{L_BIRTHDAY}:{BIRTHDAY_REQUIRED}</span></td>
<td class="row2"><span class="gen">{S_BIRTHDAY}</span></td>
</tr>
<!-- End add - Birthday MOD -->
#
#-----[ OPEN ]------------------------------------------------
#
# Make sure to edit this file for every theme you use!
#
templates/subSilver/profile_view_body.tpl
#
#-----[ FIND ]------------------------------------------------
#
<td> <b><span class="gen">{INTERESTS}</span></b></td>
</tr>
#
#-----[ AFTER, ADD ]------------------------------------------
#
<!-- Start add - Birthday MOD -->
<tr>
<td valign="top" align="right" nowrap="nowrap"><span class="gen">{L_BIRTHDAY}:</span></td>
<td><b><span class="gen">{BIRTHDAY}</span></b></td>
</tr>
<!-- End add - Birthday MOD -->
Code: Selecteer alles
#
#-----[ OPEN ]------------------------------------------------
#
index.php
#
#-----[ FIND ]------------------------------------------------
#
//
// Start output of page
#
#-----[ BEFORE, ADD ]-----------------------------------------
#
// Birthday Mod, Show users with birthday
$sql = ($board_config['birthday_check_day']) ? "SELECT user_id, username, user_birthday,user_level FROM " . USERS_TABLE. " WHERE user_birthday!=999999 ORDER BY username" :"";
if($result = $db->sql_query($sql))
{
if (!empty($result))
{
$time_now = time();
$this_year = create_date('Y', $time_now, $board_config['board_timezone']);
$date_today = create_date('Ymd', $time_now, $board_config['board_timezone']);
$date_forward = create_date('Ymd', $time_now+($board_config['birthday_check_day']*86400), $board_config['board_timezone']);
while ($birthdayrow = $db->sql_fetchrow($result))
{
$user_birthday2 = $this_year.($user_birthday = realdate("md",$birthdayrow['user_birthday'] ));
if ( $user_birthday2 < $date_today ) $user_birthday2 += 10000;
if ( $user_birthday2 > $date_today && $user_birthday2 <= $date_forward )
{
// user are having birthday within the next days
$user_age = ( $this_year.$user_birthday < $date_today ) ? $this_year - realdate ('Y',$birthdayrow['user_birthday'])+1 : $this_year- realdate ('Y',$birthdayrow['user_birthday']);
switch ($birthdayrow['user_level'])
{
case ADMIN :
$birthdayrow['username'] = '<b>' . $birthdayrow['username'] . '</b>';
$style_color = 'style="color:#' . $theme['fontcolor3'] . '"';
break;
case MOD :
$birthdayrow['username'] = '<b>' . $birthdayrow['username'] . '</b>';
$style_color = 'style="color:#' . $theme['fontcolor2'] . '"';
break;
default: $style_color = '';
}
$birthday_week_list .= ' <a href="' . append_sid("profile.$phpEx?mode=viewprofile&" . POST_USERS_URL . "=" . $birthdayrow['user_id']) . '"' . $style_color .'>' . $birthdayrow['username'] . ' ('.$user_age.')</a>,';
} else if ( $user_birthday2 == $date_today )
{
//user have birthday today
$user_age = $this_year - realdate ( 'Y',$birthdayrow['user_birthday'] );
switch ($birthdayrow['user_level'])
{
case ADMIN :
$birthdayrow['username'] = '<b>' . $birthdayrow['username'] . '</b>';
$style_color = 'style="color:#' . $theme['fontcolor3'] . '"';
break;
case MOD :
$birthdayrow['username'] = '<b>' . $birthdayrow['username'] . '</b>';
$style_color = 'style="color:#' . $theme['fontcolor2'] . '"';
break;
default: $style_color = '';
}
$birthday_today_list .= ' <a href="' . append_sid("profile.$phpEx?mode=viewprofile&" . POST_USERS_URL . "=" . $birthdayrow['user_id']) . '"' . $style_color .'>' . $birthdayrow['username'] . ' ('.$user_age.')</a>,';
}
}
if ($birthday_today_list) $birthday_today_list[ strlen( $birthday_today_list)-1] = ' ';
if ($birthday_week_list) $birthday_week_list[ strlen( $birthday_week_list)-1] = ' ';
}
$db->sql_freeresult($result);
}
#
#-----[ FIND ]------------------------------------------------
#
'L_FORUM' =>
#
#-----[ BEFORE, ADD ]-----------------------------------------
#
// Start add - Birthday MOD
'L_WHOSBIRTHDAY_WEEK' => ($board_config['birthday_check_day'] > 1) ? sprintf( (($birthday_week_list) ? $lang['Birthday_week'] : $lang['Nobirthday_week']), $board_config['birthday_check_day']).$birthday_week_list : '',
'L_WHOSBIRTHDAY_TODAY' => ($board_config['birthday_check_day']) ? ($birthday_today_list) ? $lang['Birthday_today'].$birthday_today_list : $lang['Nobirthday_today'] : '',
// End add - Birthday MOD
Bezoek ook ns mn site:
http://www.partyfreakers.nl of mn premodded site: http://www.vitrax.org
Laturzzz,
Duvelske
http://www.partyfreakers.nl of mn premodded site: http://www.vitrax.org
Laturzzz,
Duvelske
-
- Berichten: 464
- Lid geworden op: 08 jun 2004, 13:21
- Locatie: Breedtje @
- Contacteer:
Jepz, maar niet geheel verwijderd. Want je zit ook met de callender als ik het goed heb als je alles zou verwijderen dan krijg je daar problemen mee. Weet niet precies hoe dat in elkaar zit 

Bezoek ook ns mn site:
http://www.partyfreakers.nl of mn premodded site: http://www.vitrax.org
Laturzzz,
Duvelske
http://www.partyfreakers.nl of mn premodded site: http://www.vitrax.org
Laturzzz,
Duvelske