Seite 1 von 1
Calpeek 1.0.4
Verfasst: 03.02.2003 22:01
von mini-power
Hallo
Ich habe gerade probiert den Calpeek-Mod (version 1.0.4) einzubauen.
Leider komme ich nun nicht mehr weiter und hoffe, dass mir jemand helfen kann.
Ich habe ihn nun mal soweit, dass er läuft. *freu*
Leider nur noch nicht so, wie ich gerne möchte. Ich möchte, dass der MOD unten bei "Wer ist online" angezeigt wird.
Da sollte in einer eigenen Zeile stehen :
Termine in den nächsten 30 Tagen : 12.02 blablabla / 19.02 blablabla
Wie bringe ich das hin ???
Mein Forum
mein Calpeek-MOD (das wird jetzt ausgegeben)
MOD von hier runtergeladen
Hoffe, dass mir da jemand weiterhelfen kann. Habe auch schon diverse Foren durchsucht danach, aber leider waren es alles ältere Versionen.
gruss & danke
mini-power
Verfasst: 03.02.2003 22:57
von Wuppi_o_L
Hi
erstmal nen sorry, weiß die URL nicht mehr, daher hier der Hack:
Code: Alles auswählen
#####################################################################
## Mod Title: My_Cal_Peek
## Mod Version: 0.0.2 BETA
## Author: Markus Klöschen <markus@kloeschen.de>
## Description:
## This mod shows the events and birthdays of $cal_num days on index-page.
## Uses Database from Calendar Mod (Version 1.2.2j)
## Will NOW show also Birthdays using
## Birtday Mod (Version 1.1.14 -PART1)
##
## Installation Level: (easy)
## Installation Time: 1-5 Minutes
## Files To Edit:
## lang_main.php,
## index.php,
## index_body.tpl
## Included Files: (n/a)
##
## Version History:
## 0.0.1 shows only Events
## 0.0.2 show also birthdays (needs birthday mod)
##
#####################################################################
## Security Disclaimer: This MOD Cannot Be Posted To Or Added At Any Non-Official phpBB Sites
#####################################################################
##
## Author Note: (if you have any questions feel free to send me a Private Message)
## Forum: http://linden.kloeschen.de/phpBB2/index.php username: markus
## or any forum (i.e. phpbb2-users.de ) username: kloeschen
##
#####################################################################
## Before Adding This MOD To Your Forum, You Should Back Up All Files Related To This MOD
#####################################################################
#
#-----[ OPEN FILE ]------------------------------------------
#
# (make sure to edit this file for every language your board uses).
/language/lang_german/lang_main.php
#
#-----[ FIND ]------------------------------------------
#
# AT THE BOTTOM OF THE PAGE
//
// That's all Folks!
#
#-----[ BEFORE, ADD ]------------------------------------------
#
//My_CAL_PEEK
$lang['calpeek']="Termine"; //Events
$lang['calpeektimer'] = "Die Termine in den nächsten <b>%s</b> Tagen"; //Events in the next %s days
$lang['calpeekbirthtimer']="Geburtstage in den nächsten <b>%s</b> Tagen"; //Birthday in the next %s days
#
#-----[ SAVE FILE ]------------------------------------------
#
/language/lang_german/lang_main.php
#
#-----[ OPEN FILE ]------------------------------------------
#
#
/index.php
#
#-----[ FIND ]------------------------------------------
#
#
//
// End session management
//
#
#-----[ AFTER, ADD ]------------------------------------------
#
//my_cal_peek
$cal_num = 14; // number of days to look ahead
$peeklen = 30; // subject character length
$datefirst = ''; // display the date in which order 'month' = Month/Day
// (Default: Day/Month)
include_once('./cal_settings.php');
$today = date("Y-m-d") . " 00:00:00";
$window = date("Y-m-d", mktime(0,0,0,date("m"),date("d")+$cal_num,date("Y")));
$sql = "SELECT * FROM ". $table_prefix . $tablename;
$sql .= " WHERE eventspan >= '$today' AND stamp <= '$window'";
$sql .= " ORDER BY eventspan";
$result = $db->sql_query($sql);
$result = mysql_db_query($dbname, $sql);
if ($result)
{
while ($row = mysql_fetch_array($result))
{
$row[stamp] = substr($row[stamp], 0, 10);
$evntdate = split("-", $row[stamp]);
if ($datefirst == 'month') { $shortdate = $evntdate[1] . "/" . $evntdate[2]; }
else { $shortdate = $evntdate[2] . "/" . $evntdate[1]; }
$link = "calendar.php?mode=display&day=".$evntdate[2];
$link .= "&month=".$evntdate[1]."&year=".$evntdate[0];
$link = ereg_replace("=0", "=", $link);
$curevnt = $row[subject];
if (strlen($curevnt) > ($peeklen+3))
{
$curevnt = substr($curevnt, 0, $peeklen) . "...";
}
else
{
$curevnt = $curevnt;
}
$template->assign_block_vars('calpeek', array(
'LINK' => $link,
'DATE' => $shortdate,
'EVENT' => $curevnt
)
);
} # end of while
}
//end of my_cal_peek
#
#-----[ FIND ]------------------------------------------
#
#
$user_birthday=realdate("md",$birthdayrow[$i]['user_birthday']);
$user_birthday2=(($year.$user_birthday<$date_today)? $year+1:$year).$user_birthday;
#
#-----[ AFTER, ADD ]------------------------------------------
#
//CALPEEK_BIRTHDAY
// "stolen" from calendar mod
$date_forward_cal_peek = create_date('Ymd', time()+($cal_num*86400), $board_config['board_timezone']);
if ($user_birthday2>$date_today && $user_birthday2<=$date_forward_cal_peek)
{
$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'] . '"':'');
$template->assign_block_vars('calpeek_birthday', array(
'LINK' => append_sid("profile.$phpEx?mode=viewprofile&" . POST_USERS_URL . "=" . $birthdayrow[$i]['user_id']),
'USER' => $birthdayrow[$i]['username'],
'DATE' => realdate("d/m",$birthdayrow[$i]['user_birthday']),
'AGE' => $user_age
)
);
}
//CALPEEK_BIRTHDAY
#
#-----[ FIND ]------------------------------------------
#
#
'L_NEW_POSTS_LOCKED' => $lang['New_posts_locked'],
'L_ONLINE_EXPLAIN' => $lang['Online_explain'],
#
#-----[ AFTER, ADD ]------------------------------------------
#
//My_Cal_Peek
'CALPEEK' => $lang['calpeek'],
'CALPEEK_TIMER' => sprintf($lang['calpeektimer'],$cal_num),
'CALPEEK_BIRTHDAY_TIMER' => sprintf($lang['calpeekbirthtimer'],$cal_num),
//My_Cal_Peek
#
#-----[ SAVE FILE ]------------------------------------------
#
/index.php
#
#-----[ OPEN FILE ]------------------------------------------
#
#
/templates/subSilver/index_body.tpl
#
#-----[ FIND ]------------------------------------------
#
#(A nice Place - wherever you like!)
?????
#
#-----[ AFTER, ADD ]------------------------------------------
#
<table width="100%" cellpadding="3" cellspacing="1" border="0" height="100%">
<tr>
<td class="row2"><span class="gensmall">{CALPEEK_TIMER}</span>
</td>
</tr>
<tr>
<td class="row1" align="left" valign="head" height="100%">
<!-- BEGIN calpeek -->
<span class="gen">{calpeek.DATE}:</span><a href="{calpeek.LINK}" class="gensmall">{calpeek.EVENT}</a><br>
<!-- END calpeek -->
</td></tr>
<tr>
<td class="row2"><span class="gensmall">{CALPEEK_BIRTHDAY_TIMER}</span>
</td>
</tr>
<tr>
<td class="row1" align="left" valign="head" height="100%">
<!-- BEGIN calpeek_birthday -->
<span class="gen">{calpeek_birthday.DATE}:</span><a href="{calpeek_birthday.LINK}" class="gensmall">{calpeek_birthday.USER}</a><span class="gensmall"> ({calpeek_birthday.AGE})</span><br>
<!-- END calpeek_birthday -->
</td>
</tr>
</table>
#
#-----[ SAVE FILE ]------------------------------------------
#
/templates/subSilver/index_body.tpl
#
#
So hab ichs auch gemacht

auf anhieb geklappt ... naja die Probleme waren nur meine genauen Vorstellungen, mußte nen bissel basteln
Viel spass
Verfasst: 03.02.2003 22:58
von Wuppi_o_L
Hi nochmal ...
Ich der hack beiinhaltet auch die Anzeige von Geburtstage - dafür brauchste den birthday-mod ... den hab ich net, geht also trotzdem - mußt nur die zeilen mit birthday weglassen
Bis denne
Wuppi
Verfasst: 03.02.2003 23:08
von SQRT
gibts das auch für MyCalendar?

Verfasst: 07.02.2003 00:06
von mini-power
Hallo Wuppi_o_L
Danke nochmals für deine Hilfe. Hatte jetzt endlich mal kurz Zeit und hab das eingebaut.
Funktioniert wunderbar ! *freu*
Jetzt hätte ich dazu nur noch eine kleine Frage. Und zwar wird das Datum ja so angezeigt : 06/03 wie bring ich das hin, dass es so dargestellt wird 06.03.
Hast du vielleicht eine Idee ?
Oder sonst jemand eine Idee ?
Danke & Gruss
mini-power
Verfasst: 20.05.2003 18:06
von Traycer
wo bekomme ich den calpeek Mod für mein PHPBB Plus 1.1 Board????