Seite 1 von 2

Geburtstage auf EZPortal?

Verfasst: 30.08.2004 10:45
von Anni
Hallo zusammen,
ich habe den Geburtstagmod vor einiger Zeit eingebaut, aber nun würde ich es gerne auch im EzPortal einbauen (z.b. im Block, wo man sieht, wer alles momentan online ist). Wie gehe ich da vor? Weil im index.php ist das alles sehr weit unten,und da guckt man halt nicht so oft hin :oops:

Vielleicht kann eine/-r von Euch helfen... das wäre echt lieb..

Liebe Grüsse
Anni

Verfasst: 30.08.2004 10:48
von Leuchte
Schau mal ins Verzeichnis "Blocks for ezPortal" des Mods.

Verfasst: 30.08.2004 10:52
von Anni
hi leuchte...
das hab ich doch schon... und weil ich da nix fand, was auch nur dem ähnelt, was ich suche, habe ich hier danach gefragt... :oops:

Verfasst: 30.08.2004 10:58
von Leuchte
In dem Verzeichnis gibt es die Anleitung zu "Birthday Block". Was verstehst du daran nicht, bzw. wieso ähnelt es nicht dem, was du willst?

Verfasst: 30.08.2004 11:02
von Anni
in meinem Verzeichnis ist nix mit "birthday block" :o

ich hab nur search-block, chat box, recent topics, und change style. :o :-?

Verfasst: 30.08.2004 11:08
von Leuchte
#################################################################
## Title: Birthday Block for Smartor's ezPortal
## Author: Smartor <smartor_xp@hotmail.com> - http://smartor.is-root.com
## Description: This file explains you how to create Birthday block on ezPortal
## Required Birthday MOD
##
## Files To Edit: 2
## portal.php
## templates/subSilver/portal_body.tpl
##
## Included Files: N/A
##
#################################################################

#
#-----[ OPEN ]---------------------------------------------
#
portal.php

#
#-----[ FIND ]----------------------------------------
#
//
// Start output of page


#
#-----[ BEFORE ADD ]-----------------------------------
#
// Birthday Mod, Show users with birthday
$sql = "SELECT user_id, username, user_birthday,user_level FROM " . USERS_TABLE. " WHERE user_birthday!=999999 ORDER BY username";
if($result = $db->sql_query($sql))
{
$birthdayrow = $db->sql_fetchrowset($result);
if (!empty($birthdayrow))
{
$year=create_date('Y', time(), $board_config['board_timezone']);
$date_today = create_date('Ymd', time(), $board_config['board_timezone']);
$date_forward = create_date('Ymd', time()+($board_config['birthday_check_day']*86400), $board_config['board_timezone']);
for($i = 0; $i < count($birthdayrow); $i++)
{
$user_birthday=realdate("md",$birthdayrow[$i]['user_birthday']);
$user_birthday2=(($year.$user_birthday<$date_today)? $year+1:$year).$user_birthday;
if ($user_birthday2==$date_today)
{
//user have birthday today
$user_age=$year- realdate ('Y',$birthdayrow[$i]['user_birthday']);
$style_color = ($birthdayrow[$i]['user_level'] == ADMIN )?'style="color:#' . $theme['fontcolor3'] . '"':(( $birthdayrow[$i]['user_level'] == MOD )?'style="color:#' . $theme['fontcolor2'] . '"':'');
$birthday_today_list .= ' <a href="' . append_sid("profile.$phpEx?mode=viewprofile&" . POST_USERS_URL . "=" . $birthdayrow[$i]['user_id']) . '"' . $style_color .'><b>' . $birthdayrow[$i]['username'] . ' ('.$user_age.')</b></a>';
}
else if ($user_birthday2>$date_today && $user_birthday2<=$date_forward)
{
// user are having birthday within the next days
$user_age=($year.$user_birthday<$date_today)?$year- realdate('Y',$birthdayrow[$i]['user_birthday']) + 1 : $year- realdate('Y',$birthdayrow[$i]['user_birthday']);
$style_color = ($birthdayrow[$i]['user_level'] == ADMIN )?'style="color:#' . $theme['fontcolor3'] . '"':(( $birthdayrow[$i]['user_level'] == MOD )?'style="color:#' . $theme['fontcolor2'] . '"':'');
$birthday_week_list .= ' <a href="' . append_sid("profile.$phpEx?mode=viewprofile&" . POST_USERS_URL . "=" . $birthdayrow[$i]['user_id']) . '"' . $style_color .'><b>' . $birthdayrow[$i]['username'] . ' ('.$user_age.')</b></a>';
}
}
}
}
$db->sql_freeresult($result);

#
#-----[ FIND ]----------------------------------------
#
'L_VOTE_BUTTON' => $lang['Vote'],

#
#-----[ AFTER ADD ]-----------------------------------
#
// Birthday Mod
'L_WHOSBIRTHDAY_WEEK' => sprintf((($birthday_week_list)? $lang ['Birthday_week'].$birthday_week_list:$lang ['Nobirthday_week']),$board_config['birthday_check_day']),
'L_WHOSBIRTHDAY_TODAY' =>($birthday_today_list&&$board_config['birthday_check_day'])? $lang ['Birthday_today'].$birthday_today_list:$lang ['Nobirthday_today'],
'L_BIRTHDAY' => $lang['Birthday'],


#
#-----[ OPEN ]---------------------------------------------
#
templates/subSilver/portal_body.tpl

#
#-----[ FIND ]----------------------------------------
#
<table width="100%" cellpadding="2" cellspacing="1" border="0" class="forumline">
<tr>
<td class="catHead" height="25"><span class="genmed"><b>{L_STATISTICS}</b></span></td>
</tr>
<tr>
<td class="row1" align="left"><span class="gensmall">{TOTAL_USERS}<br />{NEWEST_USER}<br /><br/>{TOTAL_POSTS} {TOTAL_TOPICS}<br />&nbsp;</span></td>
</tr>
</table>

<br />

#
#-----[ AFTER ADD ]-----------------------------------
#
<table width="100%" cellpadding="2" cellspacing="1" border="0" class="forumline">
<tr>
<td class="catHead" height="25"><span class="genmed"><b>{L_BIRTHDAY}</b></span></td>
</tr>
<tr>
<td class="row1" align="left"><span class="gensmall">{L_WHOSBIRTHDAY_TODAY}<br /><br />{L_WHOSBIRTHDAY_WEEK}<br />&nbsp;</span></td>
</tr>
</table>

<br />

#
#-----[ SAVE/CLOSE ALL FILES ]------------------------------------------
#
# EoF
Bitte sehr

Verfasst: 30.08.2004 11:16
von Anni
hab vielen Dank Leuchte.. :) *verneig*

Verfasst: 30.08.2004 12:24
von Brexi
Eine Frage zum EZ-Portal Mod wo finde ich den:

Verfasst: 30.08.2004 12:33
von Leuchte
http://smartor.is-root.com/

Bitte die Suche benutzen: KB:19

Verfasst: 30.08.2004 20:05
von Anni
Hallo Leuchte,
nochmals vielen herzlichen Dank.. es hat geklappt :D

was würde ich ohne Euch machen? ;)

LG
Anni