Note: this list is kept only as a demonstration for CVSNotice. For the latest CVS notices, see the Xaraya and Postnuke sites
View Statistics - Next Notice - Previous NoticeDirectory filter : [ all ] / postnuke_modules / postcalendar / pnblocks [ view in CVS ]
Date | Directory [filter] | File(s) [view] | Author [filter] |
01 Oct 2002 23:14:39 | postnuke_modules/postcalendar/pnblocks | calendar.php,1.64,1.65 | Roger Raymond |
code cleanup |
Update of /home/cvsroot/postnuke_modules/postcalendar/pnblocks In directory ns7.hostnuke.net:/tmp/cvs-serv6589/pnblocks Modified Files: calendar.php Log Message: code cleanup Index: calendar.php =================================================================== RCS file: /home/cvsroot/postnuke_modules/postcalendar/pnblocks/calendar.php,v retrieving revision 1.64 retrieving revision 1.65 diff -C2 -d -r1.64 -r1.65 *** calendar.php 10 Sep 2002 15:30:00 -0000 1.64 --- calendar.php 1 Oct 2002 23:14:37 -0000 1.65 *************** *** 5,9 **** * PostCalendar::PostNuke Events Calendar Module * Copyright (C) 2002 The PostCalendar Team ! * http://www.alyousif.tv/cal * * This program is free software; you can redistribute it and/or modify --- 5,9 ---- * PostCalendar::PostNuke Events Calendar Module * Copyright (C) 2002 The PostCalendar Team ! * http://pc.bahraini.tv * * This program is free software; you can redistribute it and/or modify *************** *** 25,38 **** * */ ! @define('DATE_CALC_BEGIN_WEEKDAY', pnModGetVar('postcalendar','firstdayofweek')); ! $pcModInfo = pnModGetInfo(pnModGetIDFromName('postcalendar')); ! $pcModDir = pnVarPrepForOS($pcModInfo['directory']); ! @require_once('modules/'.$pcModDir.'/pnincludes/Date/Calc.php'); ! @require_once('modules/'.$pcModDir.'/pnincludes/Benchmark/Timer.php'); ! @define('SMARTY_DIR',"modules/$pcModDir/pnincludes/Smarty/"); ! @define('SMARTY_TEMPLATE_DIR',"modules/$pcModDir/pntemplates"); ! @define('SMARTY_COMPILE_DIR',"modules/$pcModDir/pntemplates/compiled"); ! @require_once(SMARTY_DIR.'/Smarty.class.php'); /** --- 25,36 ---- * */ ! // load the user api functions ! pnModAPILoad('PostCalendar','user'); ! @define('DATE_CALC_BEGIN_WEEKDAY', pnModGetVar('PostCalendar','firstdayofweek')); ! $pcModInfo = pnModGetInfo(pnModGetIDFromName('PostCalendar')); ! $pcDir = pnVarPrepForOS($pcModInfo['directory']); ! @require_once('modules/'.$pcDir.'/pnincludes/Date/Calc.php'); ! @require_once('modules/'.$pcDir.'/pnincludes/Benchmark/Timer.php'); /** *************** *** 51,56 **** { // Values ! return array('text_type' => 'postcalendar', ! 'module' => 'postcalendar', 'text_type_long' => 'Calendar Block', 'allow_multiple' => true, --- 49,54 ---- { // Values ! return array('text_type' => 'PostCalendar', ! 'module' => 'PostCalendar', 'text_type_long' => 'Calendar Block', 'allow_multiple' => true, *************** *** 74,95 **** } // set up Smarty ! $tpl = new Smarty(); ! $tpl->template_dir = SMARTY_TEMPLATE_DIR; ! $tpl->compile_dir = SMARTY_COMPILE_DIR; ! //$tpl->compile_check = false; ! $tpl->caching = false; ! $tpl->left_delimiter = '[-'; ! $tpl->right_delimiter = '-]'; ! //================================================================= ! // Register our custom functions ! //================================================================= ! $tpl->register_function('pc_date_format','postcalendar_smarty_pcDateFormat'); ! $tpl->register_function('pc_event_url','postcalendar_smarty_pcEventURL'); ! $tpl->register_function('pc_date_select','postcalendar_smarty_pcDateSelect'); ! $tpl->register_function('pc_url','postcalendar_smarty_pcURL'); ! $tpl->register_modifier('pc_date_format','postcalendar_smarty_pc_date_format'); ! // find out what template we're using ! $template_name = pnModGetVar('postcalendar','pcTemplate'); if(!isset($template_name) || empty($template_name)) { $template_name ='default'; --- 72,78 ---- } // set up Smarty ! $tpl = new pcSmarty(); // find out what template we're using ! $template_name = pnModGetVar('PostCalendar','pcTemplate'); if(!isset($template_name) || empty($template_name)) { $template_name ='default'; *************** *** 113,117 **** } // get DB information ! pnModDBInfoLoad('postcalendar'); list($dbconn) = pnDBGetConn(); $pntable = pnDBGetTables(); --- 96,100 ---- } // get DB information ! pnModDBInfoLoad('PostCalendar'); list($dbconn) = pnDBGetConn(); $pntable = pnDBGetTables(); *************** *** 122,131 **** $topics_table = $pntable['topics']; $topics_column = &$pntable['topics_column']; - // let's load the User API so we can use it - if(!pnModAPILoad('postcalendar','user')) { - die('Could not load PostCalendar user API'); - } // grab the modules information ! $modinfo = pnModGetInfo(pnModGetIDFromName('postcalendar')); // Get variables from content block $vars = unserialize($blockinfo['content']); --- 105,110 ---- $topics_table = $pntable['topics']; $topics_column = &$pntable['topics_column']; // grab the modules information ! $modinfo = pnModGetInfo(pnModGetIDFromName('PostCalendar')); // Get variables from content block $vars = unserialize($blockinfo['content']); *************** *** 138,150 **** $pcbshowsslinks = $vars['pcbshowsslinks']; // postcalendar global vars ! $useinternationaldates = pnModGetVar('postcalendar','useinternationaldates'); ! $eventsopeninnewwindow = pnModGetVar('postcalendar','eventsopeninnewwindow'); ! $dayhighlightcolor = pnModGetVar('postcalendar','dayhighlightcolor'); ! $firstdayofweek = pnModGetVar('postcalendar','firstdayofweek'); ! $displayballs = pnModGetVar('postcalendar','displayballs'); // load the DHTML JavaScript code and insert it into the page ! if($usepopups) { $output .= pnModAPIFunc('postcalendar','user','loadPopups'); } // insert the js popup code into the page (find better code) ! if($eventsopeninnewwindow) { $output .= pnModAPIFunc('postcalendar','user','jsPopup'); } // Let's setup the info to build this sucka! $the_year = substr($Date,0,4); --- 117,129 ---- $pcbshowsslinks = $vars['pcbshowsslinks']; // postcalendar global vars ! $useinternationaldates = pnModGetVar('PostCalendar','useinternationaldates'); ! $eventsopeninnewwindow = pnModGetVar('PostCalendar','eventsopeninnewwindow'); ! $dayhighlightcolor = pnModGetVar('PostCalendar','dayhighlightcolor'); ! $firstdayofweek = pnModGetVar('PostCalendar','firstdayofweek'); ! $displayballs = pnModGetVar('PostCalendar','displayballs'); // load the DHTML JavaScript code and insert it into the page ! if($usepopups) { $output .= pnModAPIFunc('PostCalendar','user','loadPopups'); } // insert the js popup code into the page (find better code) ! if($eventsopeninnewwindow) { $output .= pnModAPIFunc('PostCalendar','user','jsPopup'); } // Let's setup the info to build this sucka! $the_year = substr($Date,0,4); *************** *** 155,162 **** $next_month = Date_Calc::beginOfNextMonth(1,$the_month,$the_year,'%Y%m%d'); $last_day = Date_Calc::daysInMonth($the_month,$the_year); ! $pc_prev = pnModURL('postcalendar','user','view',array('tplview'=>$template_view,'viewtype'=>'month','Date'=>$prev_month)); ! $pc_next = pnModURL('postcalendar','user','view',array('tplview'=>$template_view,'viewtype'=>'month','Date'=>$next_month)); ! $pc_month_name = pnModAPIFunc('postcalendar', 'user', 'getmonthname', array('Date'=>mktime(0,0,0,$the_month,$the_day,$the_year))); ! $month_link_url = pnModURL('postcalendar', 'user', 'view', array('tplview'=>$template_view,'viewtype'=>'month','Date'=>date('Ymd',mktime(0,0,0,$the_month,1,$the_year)))); $month_link_text = $pc_month_name.' '.$the_year; //******************************************************************* --- 134,141 ---- $next_month = Date_Calc::beginOfNextMonth(1,$the_month,$the_year,'%Y%m%d'); $last_day = Date_Calc::daysInMonth($the_month,$the_year); ! $pc_prev = pnModURL('PostCalendar','user','view',array('tplview'=>$template_view,'viewtype'=>'month','Date'=>$prev_month)); ! $pc_next = pnModURL('PostCalendar','user','view',array('tplview'=>$template_view,'viewtype'=>'month','Date'=>$next_month)); ! $pc_month_name = pnModAPIFunc('PostCalendar', 'user', 'getmonthname', array('Date'=>mktime(0,0,0,$the_month,$the_day,$the_year))); ! $month_link_url = pnModURL('PostCalendar', 'user', 'view', array('tplview'=>$template_view,'viewtype'=>'month','Date'=>date('Ymd',mktime(0,0,0,$the_month,1,$the_year)))); $month_link_text = $pc_month_name.' '.$the_year; //******************************************************************* *************** *** 211,215 **** $starting_date = date('m/d/Y',mktime(0,0,0,$the_month,1-$first_day,$the_year)); $ending_date = date('m/d/Y',mktime(0,0,0,$the_month,$the_last_day,$the_year)); ! $eventsByDate = pnModAPIFunc('postcalendar','user','pcGetEvents', array('start'=>$starting_date,'end'=>$ending_date)); $PostCalendarURL = 'index.php?module='.pnVarPrepForOS($modinfo['name']); --- 190,194 ---- $starting_date = date('m/d/Y',mktime(0,0,0,$the_month,1-$first_day,$the_year)); $ending_date = date('m/d/Y',mktime(0,0,0,$the_month,$the_last_day,$the_year)); ! $eventsByDate = pnModAPIFunc('PostCalendar','user','pcGetEvents', array('start'=>$starting_date,'end'=>$ending_date)); $PostCalendarURL = 'index.php?module='.pnVarPrepForOS($modinfo['name']); *************** *** 245,254 **** $tpl->assign('usepopups',$usepopups); $tpl->assign('useinternationaldates',$useinternationaldates); - $tpl->assign('bgcolor1',$bgcolor1); - $tpl->assign('bgcolor2',$bgcolor2); - $tpl->assign('bgcolor3',$bgcolor3); - $tpl->assign('bgcolor4',$bgcolor4); - $tpl->assign('textcolor1',$textcolor1); - $tpl->assign('textcolor2',$textcolor2); $tpl->assign('PrevMonthURL',$pc_prev); $tpl->assign('NextMonthURL',$pc_next); --- 224,227 ---- *************** *** 293,298 **** if($pcbshowsslinks) { $output .= '<br /><br />'; ! $submit_event_url = pnModURL('postcalendar','user','submit'); ! $search_event_url = pnModURL('postcalendar','user','search'); $output .= '<center>'; $output .= '[ <a href="'.$submit_event_url.'">'._PC_SUBMIT_EVENT.'</a> ] '; --- 266,271 ---- if($pcbshowsslinks) { $output .= '<br /><br />'; ! $submit_event_url = pnModURL('PostCalendar','user','submit'); ! $search_event_url = pnModURL('PostCalendar','user','search'); $output .= '<center>'; $output .= '[ <a href="'.$submit_event_url.'">'._PC_SUBMIT_EVENT.'</a> ] ';
View Statistics - Next Notice - Previous Notice
Visit Developer Site - Browse CVS Repository |
Syndicate via backend.rss (max. once per hour please) | Powered by CVSNotice 0.1.3 |