with
in the extcal_index.html file (don't forget to update the install when messing with the HTML files :).
Still could use the help on the daily_view.php on the main page though :)
Corey
<?php // $Id: index.php,v 1.2 2004/08/27 21:05:07 zoullou Exp $ // ------------------------------------------------------------------------ // // XOOPS - PHP Content Management System // // Copyright (c) 2000 XOOPS.org // // <https://xoops.org/> // // ------------------------------------------------------------------------ // // 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 of the License, or // // (at your option) any later version. // // // // You may not change or alter any portion of this comment or credits // // of supporting developers from this source code or any supporting // // source code which is considered copyrighted (c) material of the // // original comment or credit authors. // // // // This program is distributed in the hope that it will be useful, // // but WITHOUT ANY WARRANTY; without even the implied warranty of // // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // // GNU General Public License for more details. // // // // You should have received a copy of the GNU General Public License // // along with this program; if not, write to the Free Software // // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA // // ------------------------------------------------------------------------ // include("header.php"); if ($xoopsModuleConfig['extcal_listview'] == '1') { $xoopsOption['template_main'] = 'extcal_listview.html'; include(XOOPS_ROOT_PATH."/header.php"); $cat = isset($HTTP_GET_VARS['cat']) ? intval($HTTP_GET_VARS['cat']) : 0; $xoopsTpl->assign('catselected', $cat); $show = isset($HTTP_GET_VARS['show']) ? intval($HTTP_GET_VARS['show']) : 0; if ($show == 0) { $year = $info['cal']['month']['current']['year']; $lastyear = "2003"; $nextyear = "2005"; } else { $year = $show; $lastyear = $show - 1; $nextyear = $show + 1; } // Get all events for this year $event = new Event(); $all_events = $event->getListViewEvents($year, $cat); $all_categories = $event->getAllCategories(); $xoopsTpl->assign('events', $all_events); $xoopsTpl->assign('categories', $all_categories); $lang["title"] = _MD_CALENDAR; $lang["year"] = $year; $lang["lastyear"] = $lastyear; $lang["nextyear"] = $nextyear; $lang["date"] = _MD_DATE; $lang["event"] = _MD_EVENT; $lang["category"] = _MD_CATEGORY; $lang["more"] = _MD_MORE; $lang["catselect"] = _MD_CATSELECT; $lang["catselectall"] = _MD_CATSELECTALL; $xoopsTpl->assign('lang', $lang); } else { $xoopsOption['template_main'] = 'extcal_index.html'; include(XOOPS_ROOT_PATH."/header.php"); $cat = isset($HTTP_GET_VARS['cat']) ? intval($HTTP_GET_VARS['cat']) : 0; $xoopsTpl->assign('catselected', $cat); $show = isset($HTTP_GET_VARS['show']) ? intval($HTTP_GET_VARS['show']) : 0; $html = ""; $event = new Event(); $all_events = $event->getListViewEvents($year, $cat); $all_categories = $event->getAllCategories(); $xoopsTpl->assign('events', $all_events); $xoopsTpl->assign('categories', $all_categories); // Get all events for this month $cat = isset($HTTP_GET_VARS['cat']) ? intval($HTTP_GET_VARS['cat']) : 0; $xoopsTpl->assign('catselected', $cat); $event = new Event(); $all_event = $event->getAllEvent($info['cal']['month']['current']['month'], $info['cal']['month']['current']['year'], $cat); // Number of day in this month $nb_day = $info['cal']['month']['current']['daynumber']; // Id of the first day for this month $start_day = $info['cal']['month']['current']['firstday']; // Get cell of the first row where began this month if( $start_day == 0 ) { $start_cell = 7; } else { $start_cell = $start_day; } // Get number of row for this month if( $nb_day == 31 ) { if( $start_day == 6 || $start_day == 0 ) { $nb_row = 6; } else { $nb_row = 5; } } elseif( $nb_day == 30 ) { if( $start_day == 6 ) { $nb_row = 6; } else { $nb_row = 5; } } elseif( $nb_day == 29 ) { $nb_row = 5; } elseif( $nb_day == 28 ) { if( $start_day != 1 ) { $nb_row = 5; } else { $nb_row = 4; } } // Counter for the day number of this month $day_count = 1; // Counter for the number's cell in cellendar $cell_count = 1; for( $i=0 ; $i<$nb_row ; $i++ ) { $html .= "<tr height='50px'>n"; // Counter for number's cell in the row (Monday, tuesday...) $k = 0; do { // Cellules faisant parties d'un mois if( $cell_count >= $start_cell && $day_count <= $nb_day ) { // If it's the current day if($day_count == $info['now']['day'] && $info['cal']['month']['current']['month'] == $info['now']['month'] && $info['cal']['month']['current']['year'] == $info['now']['year']) { $class = "currentday"; } else { $class = "day"; } $html .= "<td class='$class'>n"; $html .= "<table width='100%'><tr><td>$day_count</td><td> </td></tr></table>n"; // Si il y a des evenements pour le jour en cours if( array_key_exists($day_count, $all_event) ) { $html .= "<table style='font-size: 10px;'>"; foreach($all_event[$day_count] as $key=>$value) { $html .= "<tr><td><a href='daily_view.php?day=".$day_count."&month=".$info['cal']['month']['current']['month']."&year=".$info['cal']['month']['current']['year']."&id=".$value['id']."'>".$value['title']."</a></td></tr>"; } $html .= "</table>n"; } $html .= "</td>n"; $day_count++; // Cellules ne faisant pas partie d'un mois } else { $html .= "<td class='emptyday'>"; $html .= $info['cal']['month']['current']['monthname']." ".$info['cal']['month']['current']['year']; $html .= "</td>n"; } $cell_count++; $k++; } while( $k != 7 ); $html .= "</tr>n"; } $lang["title"] = _MD_CALENDAR; $lang["year"] = $year; $lang["lastyear"] = $lastyear; $lang["nextyear"] = $nextyear; $lang["date"] = _MD_DATE; $lang["event"] = _MD_EVENT; $lang["category"] = _MD_CATEGORY; $lang["more"] = _MD_MORE; $lang["catselect"] = _MD_CATSELECT; $lang["catselectall"] = _MD_CATSELECTALL; if( $info['cal']['month']['current']['month'] == $info['now']['month'] && $info['cal']['month']['current']['year'] == $info['now']['year'] ) { $xoopsTpl->assign('classcurrentmonth', 'currentmonth'); } else { $xoopsTpl->assign('classcurrentmonth', 'thismonth'); } $curentdate = $info['now']['dayname']." ".$info['now']['day']." ".$info['now']['monthname']." ".$info['now']['year']; $xoopsTpl->assign('curentdate', $curentdate); $prevmonth = array('id'=>$info['cal']['month']['preview']['month'], 'year'=>$info['cal']['month']['preview']['year'], 'name'=>$info['cal']['month']['preview']['monthname']); $xoopsTpl->assign('prevmonth', $prevmonth); $thismonth = array('year'=>$info['cal']['month']['current']['year'], 'name'=>$info['cal']['month']['current']['monthname']); $xoopsTpl->assign('thismonth', $thismonth); $nextmonth = array('id'=>$info['cal']['month']['next']['month'], 'year'=>$info['cal']['month']['next']['year'], 'name'=>$info['cal']['month']['next']['monthname']); $xoopsTpl->assign('nextmonth', $nextmonth); $xoopsTpl->assign('lang', $lang); $xoopsTpl->assign('calendar', $html); } include(XOOPS_ROOT_PATH."/footer.php"); ?>