Ich benutze auf meiner Seite das Calendar_combi Modul.
Ich fände es schön, wenn man die Kategorien Liste unter dem
Kalender ausblenden könnte. Kann mir jemand sagen wie das geht ?
Außerdem scrollen die Termine oberhalb des Kalenders. Ich hätte
das gerne unterhalb des Kalenders. Hat auch hierzu jemand einen
Tip für mich.
Vielen Dank im voraus.
Zitatdas gerne unterhalb des Kalenders. Hat auch hierzu jemand einen
Tip für mich.
Halo IT5000,
etwa so?
<?php // $Id: block-Calendar_combi.php,v 20.13 2004/04/15 21:18:36 EllselAn Exp $
/************************************************************************/
/* KalenderMx v1.4 */
/* =================== */
/* Calendar Module for vkpMx 2.x / pragmaMx & phpNuke 5.5-7.2 */
/* Copyright (c) 2004 by A.Ellsel (kalender@pragmamx.org) */
/* http://www.pragmamx.org & http://www.shiba-design.de */
/* -------------------------------------------------------------------- */
/* KalenderMx is based on EventCalendar 2.0 */
/* Copyright (c) 2001 Originally by Rob Sutton */
/* http://smart.xnettech.net (Nuke Site) */
/* Development continued by Aleks A.-Lessmann */
/* Included some ideas and changes by: */
/* flobee, bulli-frank, kicks, kochloeffel, FrankySz, Jubilee */
/* -------------------------------------------------------------------- */
/* This program is free software. You can redistribute it and/or modify */
/* it under the terms of the GNU General Public License as published by */
/* the Free Software Foundation; either version 2 or a newer version. */
/************************************************************************/
### !!!! don't change this 3 lines !!!! #########################################
$thisfile=basename(__file__);
if (eregi($thisfile, $_SERVER["PHP_SELF"])) die ("classement: You can't access this file directly...");
global $bgcolor1,$bgcolor2,$bgcolor3,$bgcolor4,$bgcolor5,$textcolor1,$textcolor2, $dbi;
#################################################################################
$mxblockcache = FALSE;
###### Einstellungen fuer den Block ###################################################
if (!defined("CAL_MODULE_NAME")) define("CAL_MODULE_NAME","Kalender"); // CHANGE THIS IF YOU CHANGE THE CALENDAR-MODULES FOLDER NAME
#########################################################################################
$sort = "asc"; # Sortierung der Liste: asc =aufsteigend / desc =absteigend
$scrollheight = 70 ; # Hoehe des scrollenden Bereichs
$scrolldelay = 350 ; # Scrollgeschwindigkeit: grosser Wert = langsamer / kleiner Wert = schneller
$listcount = 5 ; # count of entries in the List-Block, 0 hides the List-Block
$listEnddate = 1 ; # display the ending Date in List-View: 0=nein / 1=ja
$listStarttime = 0 ; # display the starting Time in List-View: 0=nein / 1=ja
$listEndtime = 0 ; # display the ending Time in List-View: 0=nein / 1=ja
$showNewlink = 1 ; # Link Event vorschlagen anzeigen: 0=nein / 1=ja
$showLegend = 0 ; # Farblegende anzeigen: 0=nein / 1=ja
###### Einstellungen fuer den Monats-Block ############################################
$bordercolor = $bgcolor1; # Rahmenfarbe um Tage in Monatsblock
$todaycolor = $textcolor1; # Textfarbe HEUTE
$todaybackground = $bgcolor1; # Hintergrundfarbe HEUTE
$daycolor = $textcolor2; # Textfarbe normale Tage
$daybackground = $bgcolor2; # Hintergrundfarbe normale Tage
$showtodayevents = 1 ; # heutige Termine anzeigen
$showsymbols = 0 ; # Bildsymbole anzeigen
######### Definition der Farben und Rahmen ###############################################################
$listbordercolor = $bgcolor2; # Rahmenfarbe um Liste
$listbgcolor1 = $bgcolor1; # Hintergrund erste Zeile ( "" fuer Transparent )
$listtxtcolor1 = $textcolor1; # Text erste Zeile
$listbgcolor2 = $bgcolor2; # Hintergrund naechste Zeile
$listtxtcolor2 = $textcolor2; # Text naechste Zeile
$scrollbgcolor = $bgcolor1; # Hintergrundfarbe des Marquee-Tags (Zwischenraum Scrollinhalte)
$listtableborder = 0; # html Rahmen um Liste
$listtablecellspacing = 1; # abstand zwischen Events (auch Rahmenbreite)
$listtablecellpadding = 2; # this will make the Events lines larger or smaller depending on value
###### Ende der Einstellungen, ab hier nichts veraendern !! #############################
$conftest = @include("modules/".CAL_MODULE_NAME."/config/config.php");
if (!$conftest){
$content = "<b>Error!</b><br>You must change the constant '\"CAL_MODULE_NAME\"' in file: <br>".__file__."";
return;
}
get_lang(CAL_MODULE_NAME);
if (!defined("CAL_MODULE_PATH")) define("CAL_MODULE_PATH","modules/".CAL_MODULE_NAME."/");
if (!defined("CAL_TABLE_EVENTS")) @include_once(CAL_MODULE_PATH."includes/functions.php");
$showNewlink = (calIsPostAllowed() && $showNewlink) ? 1 : 0;
if (!calDetectGoodBrowser ()) {$scrolling=0;}
$curMonth = (int)Date("m");
$curDay = (int)Date("d");
$curYear = (int)Date("Y");
/**** Get the Day (Integer) for the first day in the month */
$First_Day_of_Month_Date = @mktime(0, 0, 0, $curMonth, 1, $curYear);
$Day_of_First_Week = Date("w",$First_Day_of_Month_Date)-_CALWEEKBEGINN;
if ($Day_of_First_Week < 0) $Day_of_First_Week=6;
$day_of_week = $Day_of_First_Week + 1;
/**** Find the last day of the month */
$lastday = (int)Date("t",$First_Day_of_Month_Date);
$curMonthName = calGetMonthName($curMonth)." $curYear";
$whereoption= "categorie in(".calGetSqlEventpoints().") AND activ=1";
$qrydate = "$curYear-$curMonth-$curDay";
$qry="SELECT count(eid) FROM ".CAL_TABLE_EVENTS."
WHERE (startDate>= '$qrydate' or endDate>= '$qrydate')
and ($whereoption)";
list($icount) = sql_fetch_row(sql_query($qry, $dbi), $dbi);
#print "$icount <br> $qry";
if ($icount>$listcount) $icount=$listcount;
$content = "\n<!-- $thisfile output start -->\n<center>";
$i = 0; $ievents = 0;
if ($icount) {
setlocale (LC_TIME, _CALLOCALE);
$imgprops= "align=\"middle\" hspace=\"1\" vspace=\"2\" width=\"9\" height=\"9\" border=\"0\" alt=\"\"";
if ($icount<3) {$scrolling=0;}
if ($scrolling) {
$content.="<marquee behavior='scroll' direction='$scrolldirection' height='$scrollheight' hspace='0' vspace='5' loop='' scrolldelay='$scrolldelay' onmouseover='this.stop()' onmouseout='this.start()'>";
}
######## Kalender Start
###############################
/**** Build Month */
$qry ="SELECT startDate, endDate
FROM ".CAL_TABLE_EVENTS."
WHERE (((startDate<='$curYear-$curMonth-01') Or (startDate>='$curYear-$curMonth-01' And startDate<='$curYear-$curMonth-$lastday')) AND (endDate>='$curYear-$curMonth-01')
AND ($whereoption))
ORDER BY startDate, endDate";
$result = sql_query($qry, $dbi);
while(list($startDate, $endDate) = sql_fetch_row($result, $dbi)) {
$aStartDate = explode("-",$startDate);
$startDay = (int)$aStartDate[2];
$startMon = (int)$aStartDate[1];
$startYea = (int)$aStartDate[0];
if ($startDate != $endDate) {
$aEndDate = explode("-",$endDate);
$endDay = (int)$aEndDate[2];
$endMon = (int)$aEndDate[1];
$endYea = (int)$aEndDate[0];
$lday = ($curMonth < $endMon || $curYear < $endYea) ? $lastday : $endDay;
$fday = ($curMonth > $startMon || $curYear > $startYea) ? 1 : $startDay;
for ($countDay = $fday ; $countDay <= $lday ; $countDay++){
$daycount[$countDay] = (empty($daycount[$countDay])) ? 1 : $daycount[$countDay]+1;
}
}
else {
if ($curYear == $startYea && $curMonth == $startMon) {
$daycount[$startDay] = (empty($daycount[$startDay])) ? 1 : $daycount[$startDay]+1;
}
}
}
/**** Build Current Month */
$cmonth = "";
for ($day = 1 ; $day <= $lastday ; $day++){
if ($day_of_week == 1){
$cmonth .= "<tr>\n";
}
$dayrows = (isset($daycount[$day])) ? $daycount[$day] : 0;
$dayrows = ($dayrows >= 4) ? 4 : $dayrows;
$bgcolor = ($day == Date("d")) ? $todaybackground : $daybackground;
$fncolor = ($day == Date("d")) ? $todaycolor : $daycolor;
$xday = ($day == Date("d")) ? "<b>$day</b>" : $day;
$imgprops= "width=\"13\" height=\"14\" border=\"0\"";
$cmonth .= "<td align=\"center\" style=\"background-color: $bgcolor;\">";
$cmonth .= "<a href=\"".CAL_MODULE_LINK."&m=$curMonth&d=$day&y=$curYear&op=day\">";
$cmonth .= "<span style=\"color: $fncolor;\" class=\"tiny\">$xday</span>";
if($showsymbols) $cmonth .= "<br><img src=\"".CAL_IMAGE_PATH."events".$dayrows.".gif\" $imgprops>";
$cmonth .= "</a></td>\n";
if ($day_of_week == 7){
$day_of_week = 0;
$cmonth .= "</tr>\n";
}
$day_of_week += 1;
}
/**** Build Month */
$content .= "\n<table border=\"0\" cellspacing=\"1\" cellpadding=\"2\" style=\"background-color: $bordercolor;\" width=\"100%\">";
$content .= "\n<tr>\n<th colspan=\"7\" style=\"background-color: $bgcolor2;\">";
$content .= "<span class=\"tiny\"><a href=\"".CAL_MODULE_LINK."&m=$curMonth&d=1&y=$curYear&op=month\">";
$content .= "$curMonthName</a></span></th>\n</tr>\n";
$content .= "\n<tr>";
/**** Previous Greyed month days */
if ($Day_of_First_Week != 0){
$content .= "\n<td colspan=\"$Day_of_First_Week\" style=\"background-color: $daybackground;\"> </td>\n";
}
$content .= $cmonth;
/**** Next Greyed month days */
#$day = 1;
if ($day_of_week != 1){
$tmp = 8 - $day_of_week;
$content .= "<td colspan=\"$tmp\" style=\"background-color: $daybackground;\"> </td>\n</tr>\n";
}
$content .= "</table>\n";
$content.="";
if ($showNewlink) {
#$content.="<hr size=\"1\" style=\"color: $listbgcolor2;\" width=\"96%\" noshade>";
$content.="<table width=\"100%\" border=\"0\" cellspacing=\"0\" cellpadding=\"0\"><tr><td><a href=\"".CAL_MODULE_LINK."&file=submit\"><img src=\"".CAL_IMAGE_PATH."sign.gif\" alt=\""._CALSUBMITEVENT."\" width=\"16\" height=\"16\" border=\"0\" align=\"middle\" hspace=\"0\" vspace=\"1\"></a></td><td valign=\"middle\"><span class=\"tiny\"> <a href=\"".CAL_MODULE_LINK."&file=submit\">"._CALSUBMITEVENT."</a></span></td></tr></table>";
}
if ($showNewlink && $showLegend) {
$content.="<hr size=\"1\" style=\"color: $listbgcolor2;\" width=\"96%\" noshade>";
}
if ($showLegend) {
$imgprops= "align=\"middle\" hspace=\"6\" vspace=\"3\" width=\"9\" height=\"9\" border=\"0\" alt=\"\"";
$content.=calBuildColorLegendSideBlocks();
}
$content.="</center>";
$content .= "\n<!-- $thisfile output end -->\n<!-- KalenderMx Å by shiba-design.de -->\n";
$content=ereg_replace("\t","",$content);
if ($ievents==0){
$blockfiletitle = _CALNAME;
}
else {
if (empty($icount)) {$icount="";}
$blockfiletitle = _CALNEXT." $icount "._CALLISTDESCRIPTION2;
}
######## Kalender Stop
$content.="<table cellspacing=\"$listtablecellspacing\" cellpadding=\"$listtablecellpadding\" style=\"background-color: $listbordercolor; border: ${listtableborder}px solid $listbordercolor;\" border=\"$listtableborder\" width=\"96%\">";
$qry="SELECT eid, title, hometext, posteddate, topic, informant, year(startDate), month(startDate), dayofmonth(startDate), hour(startTime), minute(startTime), year(endDate), month(endDate), dayofmonth(endDate), hour(endTime), minute(endTime), alldayevent, categorie FROM ".CAL_TABLE_EVENTS."
WHERE (startDate>= '$qrydate' or endDate>= '$qrydate')
and ($whereoption)
order by startDate $sort, endDate $sort
limit 0,$icount";
$result=sql_query($qry, $dbi);
while(list($eid, $title, $hometext, $posteddate, $topic, $informant, $y1, $m1, $d1, $h1, $mi1, $y2, $m2, $d2, $h2, $mi2, $alldayevent, $categorie) = sql_fetch_row($result, $dbi)) {
$title = htmlspecialchars(strip_tags(stripslashes($title)), ENT_QUOTES);
$fontstyle = ($listStarttime) ? "tiny" : "content";
$dateStart = strftime(_CALSHORTDATEFORMAT, @mktime(0, 0, 0, $m1, $d1, $y1));
if ($listStarttime && !$alldayevent) {
$dateStart.= " ".strftime(_CALTIMEFORMAT, @mktime($h1, $mi1, 0, $m1, $d1, $y1));
}
$dateEnd = ($listEnddate) ? strftime(_CALSHORTDATEFORMAT, @mktime(0, 0, 0, $m2, $d2, $y2)) : "";
if ($listEndtime && !$alldayevent) {
$dateEnd.= " ".strftime(_CALTIMEFORMAT, @mktime($h2, $mi2, 0, $m2, $d2, $y2));
}
$bgcolornew = ($i==0) ? $listbgcolor1 : $listbgcolor2;
$txtcolornew = ($i==0) ? $listtxtcolor1 : $listtxtcolor2;
$i = ($i==0) ? 1 : 0;
$alttext = ($hometext && !$scrolling) ? substr(htmlentities(strip_tags(stripslashes($hometext))),0,70).'...' : "";
$content.="<tr style=\"background-color: $bgcolornew;\">
<td valign=\"top\"><img src=\"".calGetBarImage("ball",$categorie)."\" $imgprops></td>\n
<td><div title=\"$alttext\"><span style=\"color: $txtcolornew;\" class=\"tiny\">$dateStart - $dateEnd<br>\n
<a href=\"".CAL_MODULE_LINK."&op=view&eid=$eid\">$title</a></span></div></td>\n</tr>\n";
$ievents++;
}
$content .= ($scrolling) ? "</table></marquee>" : "</table>";
setlocale (LC_TIME, $GLOBALS["locale"]);
}
$bgcolornew = ($i==1) ? $listbgcolor2 : $listbgcolor1;
if (!$scrolling){
$content.="<hr size=\"1\" style=\"color: $listbgcolor2;\" width=\"96%\" noshade>";
}
?>
Ja, vielen Dank Euch beiden so habe ich mir das vorgestellt.
Leider scrollt da jetzt nix mehr, wenn der Termin Bereich unten
steht. Kann man das auch wieder zum scrollen bringen ?
Jau, danke schon besser. Nur leider ( ich glaubs kaum ) scrollt jetzt
der ganze Kalender. Die Monatsansicht und die 5 Termine darunter.
Es sollten jedoch nur die Termine scrollen.
Kannst du da noch mal schauen ?
Vielen Dank deppsleep jetzt geht´s wie ich mir das vorstelle.