Xaraya / Postnuke CVS Notices - Message

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 Notice

Directory filter : [ all ] / postnuke_modules / postcalendar [ view in CVS ]

Date Directory [filter] File(s) [view] Author [filter]
02 Oct 2002 00:16:07postnuke_modules/postcalendarpnuserapi.php,1.106,1.107 smarty_plugins.php,1.3,1.4Roger Raymond
 template and code cleanup

Update of /home/cvsroot/postnuke_modules/postcalendar
In directory ns7.hostnuke.net:/tmp/cvs-serv10352

Modified Files:
	pnuserapi.php smarty_plugins.php 
Log Message:
template and code cleanup


Index: pnuserapi.php
===================================================================
RCS file: /home/cvsroot/postnuke_modules/postcalendar/pnuserapi.php,v
retrieving revision 1.106
retrieving revision 1.107
diff -C2 -d -r1.106 -r1.107
*** pnuserapi.php	1 Oct 2002 23:22:48 -0000	1.106
--- pnuserapi.php	2 Oct 2002 00:16:05 -0000	1.107
***************
*** 30,81 ****
  //************************************************************************
  @define('DATE_CALC_BEGIN_WEEKDAY', pnModGetVar('PostCalendar','firstdayofweek'));
! @define('_IS_SUNDAY',        0);
! @define('_IS_MONDAY',        1);
! @define('_IS_SATURDAY',      2);
! @define('_AM_VAL',           1);
! @define('_PM_VAL',           2);
! @define('_ACTION_DELETE',    4);
! @define('_ACTION_EDIT',      2);
! @define('_EVENT_APPROVED',   1);
! @define('_EVENT_QUEUED',     0);
  // $event_repeat
! @define('NO_REPEAT',0);
! @define('REPEAT',1);
! @define('REPEAT_ON',2);
  // $event_repeat_freq
! @define('REPEAT_EVERY',0);
! @define('REPEAT_EVERY_OTHER',1);
! @define('REPEAT_EVERY_THIRD',2);
! @define('REPEAT_EVERY_FOURTH',3);
  // $event_repeat_freq_type
! @define('REPEAT_EVERY_DAY',0);
! @define('REPEAT_EVERY_WEEK',1);
! @define('REPEAT_EVERY_MONTH',2);
! @define('REPEAT_EVERY_YEAR',3);
! @define('REPEAT_EVERY_MWF',4);
! @define('REPEAT_EVERY_TR',5);
! @define('REPEAT_EVERY_MF',6);
! @define('REPEAT_EVERY_SS',7);
  // $event_repeat_on_num
! @define('REPEAT_ON_1ST',0);
! @define('REPEAT_ON_2ND',1);
! @define('REPEAT_ON_3RD',2);
! @define('REPEAT_ON_4TH',3);
! @define('REPEAT_ON_LAST',4);
  // $event_repeat_on_day
! @define('REPEAT_ON_SUN',0);
! @define('REPEAT_ON_MON',1);
! @define('REPEAT_ON_TUE',2);
! @define('REPEAT_ON_WED',3);
! @define('REPEAT_ON_THU',4);
! @define('REPEAT_ON_FRI',5);
! @define('REPEAT_ON_SAT',6);
  // $event_repeat_on_freq
! @define('REPEAT_ON_MONTH',0);
! @define('REPEAT_ON_2MONTH',1);
! @define('REPEAT_ON_3MONTH',2);
! @define('REPEAT_ON_4MONTH',3);
! @define('REPEAT_ON_6MONTH',4);
! @define('REPEAT_ON_YEAR',5);
  //=========================================================================
  //  Require utility classes
--- 30,81 ----
  //************************************************************************
  @define('DATE_CALC_BEGIN_WEEKDAY', pnModGetVar('PostCalendar','firstdayofweek'));
! @define('_IS_SUNDAY',           0);
! @define('_IS_MONDAY',           1);
! @define('_IS_SATURDAY',         2);
! @define('_AM_VAL',              1);
! @define('_PM_VAL',              2);
! @define('_ACTION_DELETE',       4);
! @define('_ACTION_EDIT',         2);
! @define('_EVENT_APPROVED',      1);
! @define('_EVENT_QUEUED',        0);
  // $event_repeat
! @define('NO_REPEAT',            0);
! @define('REPEAT',               1);
! @define('REPEAT_ON',            2);
  // $event_repeat_freq
! @define('REPEAT_EVERY',         0);
! @define('REPEAT_EVERY_OTHER',   1);
! @define('REPEAT_EVERY_THIRD',   2);
! @define('REPEAT_EVERY_FOURTH',  3);
  // $event_repeat_freq_type
! @define('REPEAT_EVERY_DAY',     0);
! @define('REPEAT_EVERY_WEEK',    1);
! @define('REPEAT_EVERY_MONTH',   2);
! @define('REPEAT_EVERY_YEAR',    3);
! @define('REPEAT_EVERY_MWF',     4);
! @define('REPEAT_EVERY_TR',      5);
! @define('REPEAT_EVERY_MF',      6);
! @define('REPEAT_EVERY_SS',      7);
  // $event_repeat_on_num
! @define('REPEAT_ON_1ST',        0);
! @define('REPEAT_ON_2ND',        1);
! @define('REPEAT_ON_3RD',        2);
! @define('REPEAT_ON_4TH',        3);
! @define('REPEAT_ON_LAST',       4);
  // $event_repeat_on_day
! @define('REPEAT_ON_SUN',        0);
! @define('REPEAT_ON_MON',        1);
! @define('REPEAT_ON_TUE',        2);
! @define('REPEAT_ON_WED',        3);
! @define('REPEAT_ON_THU',        4);
! @define('REPEAT_ON_FRI',        5);
! @define('REPEAT_ON_SAT',        6);
  // $event_repeat_on_freq
! @define('REPEAT_ON_MONTH',      0);
! @define('REPEAT_ON_2MONTH',     1);
! @define('REPEAT_ON_3MONTH',     2);
! @define('REPEAT_ON_4MONTH',     3);
! @define('REPEAT_ON_6MONTH',     4);
! @define('REPEAT_ON_YEAR',       5);
  //=========================================================================
  //  Require utility classes
***************
*** 361,365 ****
          $time = time();
          $time += (pnUserGetVar('timezone_offset') - pnConfigGetVar('timezone_offset')) * 3600;
-         //$Date = ml_ftime('%m/%d/%Y',$time);
          $Date = ml_ftime('%Y%m%d',$time);
      }
--- 361,364 ----
***************
*** 367,371 ****
          $viewtype = 'month'; 
      }
-     //list($the_month,$the_day,$the_year) = explode('/',$Date);
      $the_year   = substr($Date,0,4);
      $the_month  = substr($Date,4,2);
--- 366,369 ----
***************
*** 398,405 ****
      //=================================================================
      $tpl = new pcSmarty();
-     //$tpl->template_dir = SMARTY_TEMPLATE_DIR;
-     //$tpl->compile_dir  = SMARTY_COMPILE_DIR;
-     //$tpl->left_delimiter  =  '[-';
-     //$tpl->right_delimiter =  '-]';
      //=================================================================
      //  Find out what Template we're using (n/a)
--- 396,399 ----
***************
*** 416,420 ****
          $template_view ='default';
      }
!     if(!file_exists('modules/'.$modinfo['directory'].'/pntemplates/'.$template_name.'/views/'.$viewtype.'/'.$template_view.'_view.html')) {
          $template_view_load = 'default';
      } else {
--- 410,414 ----
          $template_view ='default';
      }
!     if(!file_exists('modules/'.$modinfo['directory'].'/pntemplates/'.$template_name.'/views/'.$viewtype.'/'.$template_view.'.html')) {
          $template_view_load = 'default';
      } else {
***************
*** 570,575 ****
      }
      
-     //$prev_month = Date_Calc::beginOfPrevMonth(1,$the_month,$the_year,'%m/%d/%Y');
-     //$next_month = Date_Calc::beginOfNextMonth(1,$the_month,$the_year,'%m/%d/%Y');
      $prev_month = Date_Calc::beginOfPrevMonth(1,$the_month,$the_year,'%Y%m%d');
      $next_month = Date_Calc::beginOfNextMonth(1,$the_month,$the_year,'%Y%m%d');
--- 564,567 ----
***************
*** 620,634 ****
      $ImagePath = 'modules/'.$modinfo['directory'].'/pntemplates/'.$template_name.'/images/';
      //=================================================================
-     //  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');
-     
-     //=================================================================
      //  Assign the menu variables to the template object
      //=================================================================
      $tpl->assign('DayView',_CALDAYLINK);
      $tpl->assign('WeekView',_CALWEEKLINK);
--- 612,620 ----
      $ImagePath = 'modules/'.$modinfo['directory'].'/pntemplates/'.$template_name.'/images/';
      //=================================================================
      //  Assign the menu variables to the template object
      //=================================================================
+     $tpl->assign('TPL_NAME',$template_name);
+     $tpl->assign('VIEW_TYPE',$viewtype);
+     $tpl->assign('FUNCTION',pnVarCleanFromInput('func'));
      $tpl->assign('DayView',_CALDAYLINK);
      $tpl->assign('WeekView',_CALWEEKLINK);
***************
*** 681,684 ****
--- 667,671 ----
      $tpl->assign('category',pnModAPIFunc('postcalendar','user','getCategories'));
      
+     
      //=================================================================
      //  Parse the template
***************
*** 1303,1307 ****
      //}
      
-     //pnModDBInfoLoad('postcalendar');
      list($dbconn) = pnDBGetConn();
      $pntable = pnDBGetTables();
--- 1290,1293 ----

Index: smarty_plugins.php
===================================================================
RCS file: /home/cvsroot/postnuke_modules/postcalendar/smarty_plugins.php,v
retrieving revision 1.3
retrieving revision 1.4
diff -C2 -d -r1.3 -r1.4
*** smarty_plugins.php	10 Sep 2002 16:22:53 -0000	1.3
--- smarty_plugins.php	2 Oct 2002 00:16:05 -0000	1.4
***************
*** 55,77 ****
      switch($args['action']) {
          case 'submit' :
!             echo pnModURL('postcalendar','user','submit',array('tplview'=>$template_view,'Date'=>$Date));
              break;
          case 'submit-admin' :
!             echo pnModURL('postcalendar','admin','submit',array('tplview'=>$template_view,'Date'=>$Date));
              break;
          case 'search' :
!             echo pnModURL('postcalendar','user','search');
              break;        
          case 'day' :
!             echo pnModURL('postcalendar','user','view',array('tplview'=>$template_view,'viewtype'=>'day','Date'=>$Date));
              break;
          case 'week' :
!             echo pnModURL('postcalendar','user','view',array('tplview'=>$template_view,'viewtype'=>'week','Date'=>$Date));
              break;
          case 'month' :
!             echo pnModURL('postcalendar','user','view',array('tplview'=>$template_view,'viewtype'=>'month','Date'=>$Date));
              break;
          case 'year' :
!             echo pnModURL('postcalendar','user','view',array('tplview'=>$template_view,'viewtype'=>'year','Date'=>$Date));
              break;
          case 'detail' :
--- 55,77 ----
      switch($args['action']) {
          case 'submit' :
!             echo pnModURL('PostCalendar','user','submit',array('tplview'=>$template_view,'Date'=>$Date));
              break;
          case 'submit-admin' :
!             echo pnModURL('PostCalendar','admin','submit',array('tplview'=>$template_view,'Date'=>$Date));
              break;
          case 'search' :
!             echo pnModURL('PostCalendar','user','search');
              break;        
          case 'day' :
!             echo pnModURL('PostCalendar','user','view',array('tplview'=>$template_view,'viewtype'=>'day','Date'=>$Date));
              break;
          case 'week' :
!             echo pnModURL('PostCalendar','user','view',array('tplview'=>$template_view,'viewtype'=>'week','Date'=>$Date));
              break;
          case 'month' :
!             echo pnModURL('PostCalendar','user','view',array('tplview'=>$template_view,'viewtype'=>'month','Date'=>$Date));
              break;
          case 'year' :
!             echo pnModURL('PostCalendar','user','view',array('tplview'=>$template_view,'viewtype'=>'year','Date'=>$Date));
              break;
          case 'detail' :
***************
*** 79,83 ****
              
              } else {
!                 echo pnModURL('postcalendar','user','view',array('tplview'=>$template_view,'viewtype'=>'details','eid'=>$args['eid']));
              }
              break;
--- 79,83 ----
              
              } else {
!                 echo pnModURL('PostCalendar','user','view',array('tplview'=>$template_view,'viewtype'=>'details','eid'=>$args['eid']));
              }
              break;
***************
*** 88,92 ****
      extract($args);
      if(!isset($format)) {
!         $format = pnModGetVar('postcalendar','pcEventDateFormat');
      }
      if(isset($date)) {
--- 88,92 ----
      extract($args);
      if(!isset($format)) {
!         $format = pnModGetVar('PostCalendar','pcEventDateFormat');
      }
      if(isset($date)) {
***************
*** 117,125 ****
  {   
      extract($args);
!     $modinfo = pnModGetInfo(pnModGetIDFromName('postcalendar'));
      //=================================================================
      //  Find out what Template we're using (n/a)
      //=================================================================
!     $template_name = pnModGetVar('postcalendar','pcTemplate');
      if(!isset($template_name)) {
          $template_name ='default';
--- 117,125 ----
  {   
      extract($args);
!     $modinfo = pnModGetInfo(pnModGetIDFromName('PostCalendar'));
      //=================================================================
      //  Find out what Template we're using (n/a)
      //=================================================================
!     $template_name = pnModGetVar('PostCalendar','pcTemplate');
      if(!isset($template_name)) {
          $template_name ='default';
***************
*** 147,151 ****
  function postcalendar_smarty_pcDateSelect($args) 
  {   
!     $useinternationaldate = pnModGetVar('postcalendar','useinternationaldates');
      list($Date,$d,$m,$y) = pnVarCleanFromInput('Date','jumpday','jumpmonth','jumpyear');
      if(isset($Date)) {
--- 147,151 ----
  function postcalendar_smarty_pcDateSelect($args) 
  {   
!     $useinternationaldate = pnModGetVar('PostCalendar','useinternationaldates');
      list($Date,$d,$m,$y) = pnVarCleanFromInput('Date','jumpday','jumpmonth','jumpyear');
      if(isset($Date)) {
***************
*** 185,199 ****
      $output->SetOutputMode(_PNH_RETURNOUTPUT);
          if($args['day'] === true) {
!             $sel_data = pnModAPIFunc('postcalendar','user','buildDaySelect',array('pc_day'=>$d));
              $dayselect = $output->FormSelectMultiple('jumpday', $sel_data);
          }
          
          if($args['month'] === true) {
!             $sel_data = pnModAPIFunc('postcalendar','user','buildMonthSelect',array('pc_month'=>$m));
              $monthselect = $output->FormSelectMultiple('jumpmonth', $sel_data);
          }
          
          if($args['year'] === true) {
!             $sel_data = pnModAPIFunc('postcalendar','user','buildYearSelect',array('pc_year'=>$y));
              $yearselect = $output->FormSelectMultiple('jumpyear', $sel_data);
          }
--- 185,199 ----
      $output->SetOutputMode(_PNH_RETURNOUTPUT);
          if($args['day'] === true) {
!             $sel_data = pnModAPIFunc('PostCalendar','user','buildDaySelect',array('pc_day'=>$d));
              $dayselect = $output->FormSelectMultiple('jumpday', $sel_data);
          }
          
          if($args['month'] === true) {
!             $sel_data = pnModAPIFunc('PostCalendar','user','buildMonthSelect',array('pc_month'=>$m));
              $monthselect = $output->FormSelectMultiple('jumpmonth', $sel_data);
          }
          
          if($args['year'] === true) {
!             $sel_data = pnModAPIFunc('PostCalendar','user','buildYearSelect',array('pc_year'=>$y));
              $yearselect = $output->FormSelectMultiple('jumpyear', $sel_data);
          }
***************
*** 216,220 ****
          $jumpsubmit = $output->FormSubmit(_PC_JUMP_MENU_SUBMIT);
          if($args['form'] === true) {
!             $fstart = $output->FormStart(pnModURL('postcalendar','user','view'));
              $fend = $output->FormEnd();
          }
--- 216,220 ----
          $jumpsubmit = $output->FormSubmit(_PC_JUMP_MENU_SUBMIT);
          if($args['form'] === true) {
!             $fstart = $output->FormStart(pnModURL('PostCalendar','user','view'));
              $fend = $output->FormEnd();
          }


Directory filter : [ all ] / postnuke_modules / postcalendar [ view in CVS ]

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