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 [ view in CVS ]
| Date | Directory [filter] | File(s) [view] | Author [filter] |
| 02 Oct 2002 17:03:24 | postnuke_modules/postcalendar | common.api.php,1.1,1.2 pnadmin.php,1.31,1.32 pnadminapi.php,1.10,1.11 pnuser.php,1.59,1.60 pnuserapi.php,1.109,1.110 | Roger Raymond |
| ML support for themes, language file cleanup, bug fixes and code cleanup | |||
Update of /home/cvsroot/postnuke_modules/postcalendar
In directory ns7.hostnuke.net:/tmp/cvs-serv9685
Modified Files:
common.api.php pnadmin.php pnadminapi.php pnuser.php
pnuserapi.php
Log Message:
ML support for themes, language file cleanup, bug fixes and code cleanup
Index: common.api.php
===================================================================
RCS file: /home/cvsroot/postnuke_modules/postcalendar/common.api.php,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -d -r1.1 -r1.2
*** common.api.php 2 Oct 2002 13:07:11 -0000 1.1
--- common.api.php 2 Oct 2002 17:03:22 -0000 1.2
***************
*** 1,4 ****
--- 1,57 ----
<?php
/**
+ * $Id$
+ *
+ * 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
+ * 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.
+ *
+ * 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
+ *
+ * To read the license please read the docs/license.txt or visit
+ * http://www.gnu.org/copyleft/gpl.html
+ *
+ */
+
+ /**
+ * return the translated month name
+ * @param $args mktime(0,0,0,month);
+ * @returns string
+ * @return month name in user's language
+ */
+ function postcalendar_adminapi_getmonthname($args)
+ { return postcalendar_userapi_getmonthname($args);
+ }
+ function postcalendar_userapi_getmonthname($args)
+ {
+ extract($args);
+ if(!isset($Date)) { return false; }
+ $month_name = array('01' => _CALJAN,
+ '02' => _CALFEB,
+ '03' => _CALMAR,
+ '04' => _CALAPR,
+ '05' => _CALMAY,
+ '06' => _CALJUN,
+ '07' => _CALJUL,
+ '08' => _CALAUG,
+ '09' => _CALSEP,
+ '10' => _CALOCT,
+ '11' => _CALNOV,
+ '12' => _CALDEC);
+ return $month_name[date('m',$Date)];
+ }
+ /**
* Returns an array of form data for FormSelectMultiple
*/
Index: pnadmin.php
===================================================================
RCS file: /home/cvsroot/postnuke_modules/postcalendar/pnadmin.php,v
retrieving revision 1.31
retrieving revision 1.32
diff -C2 -d -r1.31 -r1.32
*** pnadmin.php 2 Oct 2002 13:07:11 -0000 1.31
--- pnadmin.php 2 Oct 2002 17:03:22 -0000 1.32
***************
*** 788,791 ****
--- 788,792 ----
$pc_event_id = pnVarCleanFromInput('pc_event_id');
$is_update = pnVarCleanFromInput('is_update');
+ $authid = pnVarCleanFromInput('authid');
// get the theme globals :: is there a better way to do this?
pnThemeLoad(pnUserGetTheme());
***************
*** 794,800 ****
extract($args);
if(!isset($Date)) {
! $time = time();
! $time += (pnUserGetVar('timezone_offset') - pnConfigGetVar('timezone_offset')) * 3600;
! $Date = ml_ftime('%Y%m%d',$time);
}
$year = substr($Date,0,4);
--- 795,799 ----
extract($args);
if(!isset($Date)) {
! $Date = postcalendar_getDate();
}
$year = substr($Date,0,4);
***************
*** 822,826 ****
$users_col = &$pntable['postcalendar_users_column'];
! $categories = pnModAPIFunc('postcalendar','user','getCategories');
if(!isset($pc_event_id) || empty($pc_event_id)) {
--- 821,825 ----
$users_col = &$pntable['postcalendar_users_column'];
! $categories = pnModAPIFunc('PostCalendar','admin','getCategories');
if(!isset($pc_event_id) || empty($pc_event_id)) {
***************
*** 985,989 ****
$output->Linebreak(2);
} else {
! $output->Text(pnModAPIFunc('postcalendar','user','eventPreview',array('event_subject'=>$event_subject,
'event_desc'=>$event_desc,
'event_topic'=>$event_topic,
--- 984,988 ----
$output->Linebreak(2);
} else {
! $output->Text(pnModAPIFunc('PostCalendar','admin','eventPreview',array('event_subject'=>$event_subject,
'event_desc'=>$event_desc,
'event_topic'=>$event_topic,
***************
*** 1149,1161 ****
$tpl->assign('textcolor1', $textcolor1);
$tpl->assign('textcolor2', $textcolor2);
- $tpl->assign('DayView', _CALDAYLINK);
- $tpl->assign('WeekView', _CALWEEKLINK);
- $tpl->assign('MonthView', _CALMONTHLINK);
- $tpl->assign('YearView', _CALYEARLINK);
- $tpl->assign('Submit', _CALSUBMITEVENT);
- $tpl->assign('Search', _CALSEARCHEVENT);
$tpl->assign('ModuleName', $modinfo['displayname']);
$tpl->assign('ModuleDirectory', $modinfo['directory']);
! $tpl->assign('category',pnModAPIFunc('postcalendar','user','getCategories'));
$tpl->assign('NewEventHeader', _PC_NEW_EVENT_HEADER);
$tpl->assign('EventTitle', _PC_EVENT_TITLE);
--- 1148,1154 ----
$tpl->assign('textcolor1', $textcolor1);
$tpl->assign('textcolor2', $textcolor2);
$tpl->assign('ModuleName', $modinfo['displayname']);
$tpl->assign('ModuleDirectory', $modinfo['directory']);
! $tpl->assign('category',pnModAPIFunc('PostCalendar','admin','getCategories'));
$tpl->assign('NewEventHeader', _PC_NEW_EVENT_HEADER);
$tpl->assign('EventTitle', _PC_EVENT_TITLE);
***************
*** 1182,1196 ****
$output->SetOutputMode(_PNH_RETURNOUTPUT);
if($useinternationaldates) {
! $sel_data = pnModAPIFunc('postcalendar','user','buildDaySelect',array('pc_day'=>$day,'selected'=>$event_startday));
$formdata = $output->FormSelectMultiple('event_startday', $sel_data);
! $sel_data = pnModAPIFunc('postcalendar','user','buildMonthSelect',array('pc_month'=>$month,'selected'=>$event_startmonth));
$formdata .= $output->FormSelectMultiple('event_startmonth', $sel_data);
} else {
! $sel_data = pnModAPIFunc('postcalendar','user','buildMonthSelect',array('pc_month'=>$month,'selected'=>$event_startmonth));
$formdata = $output->FormSelectMultiple('event_startmonth', $sel_data);
! $sel_data = pnModAPIFunc('postcalendar','user','buildDaySelect',array('pc_day'=>$day,'selected'=>$event_startday));
$formdata .= $output->FormSelectMultiple('event_startday', $sel_data);
}
! $sel_data = pnModAPIFunc('postcalendar','user','buildYearSelect',array('pc_year'=>$year,'selected'=>$event_startyear));
$formdata .= $output->FormSelectMultiple('event_startyear', $sel_data);
$output->SetOutputMode(_PNH_KEEPOUTPUT);
--- 1175,1189 ----
$output->SetOutputMode(_PNH_RETURNOUTPUT);
if($useinternationaldates) {
! $sel_data = pnModAPIFunc('PostCalendar','admin','buildDaySelect',array('pc_day'=>$day,'selected'=>$event_startday));
$formdata = $output->FormSelectMultiple('event_startday', $sel_data);
! $sel_data = pnModAPIFunc('PostCalendar','admin','buildMonthSelect',array('pc_month'=>$month,'selected'=>$event_startmonth));
$formdata .= $output->FormSelectMultiple('event_startmonth', $sel_data);
} else {
! $sel_data = pnModAPIFunc('PostCalendar','admin','buildMonthSelect',array('pc_month'=>$month,'selected'=>$event_startmonth));
$formdata = $output->FormSelectMultiple('event_startmonth', $sel_data);
! $sel_data = pnModAPIFunc('PostCalendar','admin','buildDaySelect',array('pc_day'=>$day,'selected'=>$event_startday));
$formdata .= $output->FormSelectMultiple('event_startday', $sel_data);
}
! $sel_data = pnModAPIFunc('PostCalendar','admin','buildYearSelect',array('pc_year'=>$year,'selected'=>$event_startyear));
$formdata .= $output->FormSelectMultiple('event_startyear', $sel_data);
$output->SetOutputMode(_PNH_KEEPOUTPUT);
***************
*** 1208,1222 ****
$output->SetOutputMode(_PNH_RETURNOUTPUT);
if($useinternationaldates) {
! $sel_data = pnModAPIFunc('postcalendar','user','buildDaySelect',array('pc_day'=>$day,'selected'=>$event_endday));
$formdata = $output->FormSelectMultiple('event_endday', $sel_data);
! $sel_data = pnModAPIFunc('postcalendar','user','buildMonthSelect',array('pc_month'=>$month,'selected'=>$event_endmonth));
$formdata .= $output->FormSelectMultiple('event_endmonth', $sel_data);
} else {
! $sel_data = pnModAPIFunc('postcalendar','user','buildMonthSelect',array('pc_month'=>$month,'selected'=>$event_endmonth));
$formdata = $output->FormSelectMultiple('event_endmonth', $sel_data);
! $sel_data = pnModAPIFunc('postcalendar','user','buildDaySelect',array('pc_day'=>$day,'selected'=>$event_endday));
$formdata .= $output->FormSelectMultiple('event_endday', $sel_data);
}
! $sel_data = pnModAPIFunc('postcalendar','user','buildYearSelect',array('pc_year'=>$year,'selected'=>$event_endyear));
$formdata .= $output->FormSelectMultiple('event_endyear', $sel_data);
$output->SetOutputMode(_PNH_KEEPOUTPUT);
--- 1201,1215 ----
$output->SetOutputMode(_PNH_RETURNOUTPUT);
if($useinternationaldates) {
! $sel_data = pnModAPIFunc('PostCalendar','admin','buildDaySelect',array('pc_day'=>$day,'selected'=>$event_endday));
$formdata = $output->FormSelectMultiple('event_endday', $sel_data);
! $sel_data = pnModAPIFunc('PostCalendar','admin','buildMonthSelect',array('pc_month'=>$month,'selected'=>$event_endmonth));
$formdata .= $output->FormSelectMultiple('event_endmonth', $sel_data);
} else {
! $sel_data = pnModAPIFunc('PostCalendar','admin','buildMonthSelect',array('pc_month'=>$month,'selected'=>$event_endmonth));
$formdata = $output->FormSelectMultiple('event_endmonth', $sel_data);
! $sel_data = pnModAPIFunc('PostCalendar','admin','buildDaySelect',array('pc_day'=>$day,'selected'=>$event_endday));
$formdata .= $output->FormSelectMultiple('event_endday', $sel_data);
}
! $sel_data = pnModAPIFunc('PostCalendar','admin','buildYearSelect',array('pc_year'=>$year,'selected'=>$event_endyear));
$formdata .= $output->FormSelectMultiple('event_endyear', $sel_data);
$output->SetOutputMode(_PNH_KEEPOUTPUT);
***************
*** 1226,1230 ****
// PARSE SELECT_TIMED_EVENT
//=================================================================
! $stimes = pnModAPIFunc('postcalendar','user','buildTimeSelect',array('hselected'=>$event_starttimeh,'mselected'=>$event_starttimem));
$output->SetOutputMode(_PNH_RETURNOUTPUT);
--- 1219,1223 ----
// PARSE SELECT_TIMED_EVENT
//=================================================================
! $stimes = pnModAPIFunc('PostCalendar','admin','buildTimeSelect',array('hselected'=>$event_starttimeh,'mselected'=>$event_starttimem));
$output->SetOutputMode(_PNH_RETURNOUTPUT);
***************
*** 1245,1249 ****
$output->SetOutputMode(_PNH_KEEPOUTPUT);
! //$etimes = pnModAPIFunc('postcalendar','user','buildTimeSelect',array('hselected'=>$event_endtimeh,'mselected'=>$event_endtimem));
$tpl->assign('SelectTimedHours', $timed_hours);
$tpl->assign('SelectTimedMinutes', $timed_minutes);
--- 1238,1242 ----
$output->SetOutputMode(_PNH_KEEPOUTPUT);
! //$etimes = pnModAPIFunc('PostCalendar','admin','buildTimeSelect',array('hselected'=>$event_endtimeh,'mselected'=>$event_endtimem));
$tpl->assign('SelectTimedHours', $timed_hours);
$tpl->assign('SelectTimedMinutes', $timed_minutes);
***************
*** 1312,1316 ****
// PARSE select_event_type_block
//=================================================================
! $maincategories = pnModAPIFunc('postcalendar','user','getCategories');
$categories = array();
foreach($maincategories as $category) {
--- 1305,1309 ----
// PARSE select_event_type_block
//=================================================================
! $maincategories = pnModAPIFunc('PostCalendar','admin','getCategories');
$categories = array();
foreach($maincategories as $category) {
***************
*** 1479,1491 ****
$output->SetOutputMode(_PNH_RETURNOUTPUT);
- //$preview_button = $output->Text('<input type="submit" name="preview" value="'._PC_EVENT_PREVIEW.'">');
- //if($preview) {
- // $submit_button = $output->Text('<input type="submit" name="commit" value="'._PC_EVENT_SUBMIT.'">');
- //} else {
- // $submit_button = '';
- //}
$authkey = $output->FormHidden('authid',pnSecGenAuthKey());
$output->SetOutputMode(_PNH_KEEPOUTPUT);
- //$form_submit = $preview_button.' '.$submit_button.$authkey;
$form_submit = '<select name="form_action">
<option value="preview">'._PC_EVENT_PREVIEW.'</option>
--- 1472,1477 ----
***************
*** 1496,1500 ****
$output->Text($tpl->fetch($template_name.'/admin/submit.html'));
- //$output->Text(postcalendar_footer());
return $output->GetOutput();
}
--- 1482,1485 ----
***************
*** 1572,1617 ****
$settings[$i][] = $output->Text(_PC_DAY_HIGHLIGHT_COLOR . ' [<a HREF="#" onClick="pick(\'pick\');return false;" NAME="pick" ID="pick">pick</a>]');
$settings[$i++][] = $output->FormText('dayhighlightcolor', pnModGetVar('postcalendar','dayhighlightcolor'));
- //$settings[$i][] = $output->Text(_PC_DISPLAY_BALLS);
- //$settings[$i++][] = $output->FormCheckBox('displayballs', pnModGetVar('postcalendar','displayballs'));
- //$settings[$i][] = $output->Text(_PC_SHOW_TIME_ON_EVENTS);
- //$settings[$i++][] = $output->FormCheckBox('showtimeonevents', pnModGetVar('postcalendar','showtimeonevents'));
$settings[$i][] = $output->Text(_PC_USE_JS_POPUPS);
$settings[$i++][] = $output->FormCheckBox('usepopups', pnModGetVar('postcalendar','usepopups'));
- //$settings[$i++][] = $output->Text(_PC_ADMIN_CATEGORY_SETTINGS);
- /*
- $settings[$i++][] = $output->Text(_PC_ADMIN_DAYVIEW_SETTINGS);
- $settings[$i][] = $output->Text(_PC_DAY_VIEW_STARTHOUR);
- $settings[$i++][] = $output->FormText('pcDayViewStartHour', pnModGetVar('postcalendar','pcDayViewStartHour'),5);
- $settings[$i][] = $output->Text(_PC_DAY_VIEW_STARTMINUTE);
- $settings[$i++][] = $output->FormText('pcDayViewStartMinute', pnModGetVar('postcalendar','pcDayViewStartMinute'),5);
- $settings[$i][] = $output->Text(_PC_DAY_VIEW_ENDHOUR);
- $settings[$i++][] = $output->FormText('pcDayViewEndHour', pnModGetVar('postcalendar','pcDayViewEndHour'),5);
- $settings[$i][] = $output->Text(_PC_DAY_VIEW_ENDMINUTE);
- $settings[$i++][] = $output->FormText('pcDayViewEndMinute', pnModGetVar('postcalendar','pcDayViewEndMinute'),5);
- $settings[$i][] = $output->Text(_PC_DAY_TIME_INCREMENT);
- $settings[$i++][] = $output->FormText('pcDayTimeIncrement', pnModGetVar('postcalendar','pcDayTimeIncrement'),5);
-
-
- $settings[$i++][] = $output->Text(_PC_ADMIN_MONTHVIEW_SETTINGS);
- $settings[$i][] = $output->Text(_PC_MONTH_TABLE_BORDER);
- $settings[$i++][] = $output->FormText('monthtableborder', pnModGetVar('postcalendar','monthtableborder'),5);
- $settings[$i][] = $output->Text(_PC_MONTH_TABLE_CELL_PADDING);
- $settings[$i++][] = $output->FormText('monthtablecellspacing', pnModGetVar('postcalendar','monthtablecellspacing'),5);
- $settings[$i][] = $output->Text(_PC_MONTH_TABLE_CELL_SPACING);
- $settings[$i++][] = $output->FormText('monthtablecellpadding', pnModGetVar('postcalendar','monthtablecellpadding'),5);
-
- $settings[$i++][] = $output->Text(_PC_ADMIN_YEARVIEW_SETTINGS);
- $settings[$i][] = $output->Text(_PC_YEAR_TABLE_BORDER);
- $settings[$i++][] = $output->FormText('yeartableborder', pnModGetVar('postcalendar','yeartableborder'),5);
- $settings[$i][] = $output->Text(_PC_YEAR_TABLE_CELL_SPACING);
- $settings[$i++][] = $output->FormText('yeartablecellspacing', pnModGetVar('postcalendar','yeartablecellspacing'),5);
- $settings[$i][] = $output->Text(_PC_YEAR_TABLE_CELL_PADDING);
- $settings[$i++][] = $output->FormText('yeartablecellpadding', pnModGetVar('postcalendar','yeartablecellpadding'),5);
- $settings[$i][] = $output->Text(_PC_SHOW_EVENTS_IN_YEAR);
- $settings[$i++][] = $output->FormCheckBox('showeventsinyear', pnModGetVar('postcalendar','showeventsinyear'));
- $settings[$i][] = $output->Text(_PC_NUM_COLS_IN_YEAR_VIEW);
- $settings[$i++][] = $output->FormText('numcolsinyearview', pnModGetVar('postcalendar','numcolsinyearview'),5);
- */
$output->SetOutputMode(_PNH_KEEPOUTPUT);
--- 1557,1563 ----
***************
*** 1643,1667 ****
$useinternationaldates,
$firstdayofweek,
- $dayhighlightcolor,
- $monthtableborder,
- $monthtablecellspacing,
- $monthtablecellpadding,
- $yeartableborder,
- $yeartablecellspacing,
- $yeartablecellpadding,
- $displayballs,
- $eventoverview,
- $showtimeonevents,
$usepopups,
$showeventsinyear,
- $numcolsinyearview,
$allowdirectsubmit,
$listhowmanyevents,
$displaytopics,
- $pcDayViewStartHour,
- $pcDayViewStartMinute,
- $pcDayViewEndHour,
- $pcDayViewEndMinute,
- $pcDayTimeIncrement,
$pcEventDateFormat) = pnVarCleanFromInput('time24hours',
'eventsopeninnewwindow',
--- 1589,1597 ----
***************
*** 1669,1692 ****
'firstdayofweek',
'dayhighlightcolor',
- 'monthtableborder',
- 'monthtablecellspacing',
- 'monthtablecellpadding',
- 'yeartableborder',
- 'yeartablecellspacing',
- 'yeartablecellpadding',
- 'displayballs',
- 'eventoverview',
- 'showtimeonevents',
'usepopups',
'showeventsinyear',
- 'numcolsinyearview',
'allowdirectsubmit',
'listhowmanyevents',
'displaytopics',
- 'pcDayViewStartHour',
- 'pcDayViewStartMinute',
- 'pcDayViewEndHour',
- 'pcDayViewEndMinute',
- 'pcDayTimeIncrement',
'pcEventDateFormat');
--- 1599,1607 ----
***************
*** 1697,1720 ****
if(!isset($firstdayofweek)) { $firstdayofweek='0'; }
if(!isset($dayhighlightcolor)) { $dayhighlightcolor = 'red'; }
- if(!isset($monthtableborder)) { $monthtableborder='0'; }
- if(!isset($monthtablecellspacing)) { $monthtablecellspacing='0'; }
- if(!isset($monthtablecellpadding)) { $monthtablecellpadding='0'; }
- if(!isset($yeartableborder)) { $yeartableborder='0'; }
- if(!isset($yeartablecellspacing)) { $yeartablecellspacing='0'; }
- if(!isset($yeartablecellpadding)) { $yeartablecellpadding='0'; }
- if(!isset($displayballs)) { $displayballs='0'; }
- if(!isset($eventoverview)) { $eventoverview='0'; }
- if(!isset($showtimeonevents)) { $showtimeonevents='0'; }
if(!isset($usepopups)) { $usepopups='0'; }
if(!isset($showeventsinyear)) { $showeventsinyear='0'; }
- if(!isset($numcolsinyearview)) { $numcolsinyearview='4'; }
if(!isset($allowdirectsubmit)) { $allowdirectsubmit='0'; }
if(!isset($listhowmanyevents)) { $listhowmanyevents='15'; }
if(!isset($displaytopics)) { $displaytopics='0'; }
- if(!isset($pcDayViewStartHour)) { $pcDayViewStartHour='08'; }
- if(!isset($pcDayViewStartMinute)) { $pcDayViewStartMinute='00'; }
- if(!isset($pcDayViewEndHour)) { $pcDayViewEndHour='21'; }
- if(!isset($pcDayViewEndMinute)) { $pcDayViewEndMinute='00'; }
- if(!isset($pcDayTimeIncrement)) { $pcDayTimeIncrement='60'; }
if(!isset($pcEventDateFormat)) { $pcEventDateFormat='%m/$d/%Y'; }
--- 1612,1620 ----
***************
*** 1724,1747 ****
pnModSetVar('postcalendar', 'firstdayofweek', $firstdayofweek);
pnModSetVar('postcalendar', 'dayhighlightcolor', $dayhighlightcolor);
- pnModSetVar('postcalendar', 'monthtableborder', $monthtableborder);
- pnModSetVar('postcalendar', 'monthtablecellspacing', $monthtablecellspacing);
- pnModSetVar('postcalendar', 'monthtablecellpadding', $monthtablecellpadding);
- pnModSetVar('postcalendar', 'yeartableborder', $yeartableborder);
- pnModSetVar('postcalendar', 'yeartablecellspacing', $yeartablecellspacing);
- pnModSetVar('postcalendar', 'yeartablecellpadding', $yeartablecellpadding);
- pnModSetVar('postcalendar', 'displayballs', $displayballs);
- pnModSetVar('postcalendar', 'eventoverview', $eventoverview);
- pnModSetVar('postcalendar', 'showtimeonevents', $showtimeonevents);
pnModSetVar('postcalendar', 'usepopups', $usepopups);
pnModSetVar('postcalendar', 'showeventsinyear', $showeventsinyear);
- pnModSetVar('postcalendar', 'numcolsinyearview', $numcolsinyearview);
pnModSetVar('postcalendar', 'allowdirectsubmit', $allowdirectsubmit);
pnModSetVar('postcalendar', 'listhowmanyevents', $listhowmanyevents);
pnModSetVar('postcalendar', 'displaytopics', $displaytopics);
- pnModSetVar('postcalendar', 'pcDayViewStartHour', $pcDayViewStartHour);
- pnModSetVar('postcalendar', 'pcDayViewStartMinute', $pcDayViewStartMinute);
- pnModSetVar('postcalendar', 'pcDayViewEndHour', $pcDayViewEndHour);
- pnModSetVar('postcalendar', 'pcDayViewEndMinute', $pcDayViewEndMinute);
- pnModSetVar('postcalendar', 'pcDayTimeIncrement', $pcDayTimeIncrement);
pnModSetVar('postcalendar', 'pcEventDateFormat', $pcEventDateFormat);
--- 1624,1632 ----
Index: pnadminapi.php
===================================================================
RCS file: /home/cvsroot/postnuke_modules/postcalendar/pnadminapi.php,v
retrieving revision 1.10
retrieving revision 1.11
diff -C2 -d -r1.10 -r1.11
*** pnadminapi.php 2 Oct 2002 13:07:11 -0000 1.10
--- pnadminapi.php 2 Oct 2002 17:03:22 -0000 1.11
***************
*** 43,147 ****
require_once("modules/$pcDir/pcSmarty.class.php");
-
- /**
- * Returns an array of form data for FormSelectMultiple
- */
- function postcalendar_adminapi_buildMonthSelect($args)
- {
- extract($args);
-
- if(!isset($pc_month)) {
- $pc_month = Date('m');
- }
-
- $output = new pnHTML();
- $output->SetInputMode(_PNH_VERBATIMINPUT);
-
- // create the return object to be inserted into the form
- $options = array();
- $count = 0;
- for ($i = 1; $i <= 12; $i++) {
- $sel = '';
- if ($i == $pc_month) {
- $sel = 'selected';
- }
- $options[$count]['id'] = $i;
- $options[$count]['selected'] = $sel;
- $options[$count]['name'] = $i < 10 ? '0'.$i : $i;
- $count++;
- }
-
- $output->FormSelectMultiple('pc_month',$options);
- return $output->GetOutput();
- }
-
- /**
- * Returns an array of form data for FormSelectMultiple
- */
- function postcalendar_adminapi_buildDaySelect($args)
- {
- extract($args);
-
- if(!isset($pc_day)) {
- $pc_day = Date('d');
- }
-
- $output = new pnHTML();
- $output->SetInputMode(_PNH_VERBATIMINPUT);
-
- // create the return object to be inserted into the form
- $options = array();
- $count = 0;
- for ($i = 1; $i <= 31; $i++) {
- $sel = '';
- if ($i == $pc_day) {
- $sel = "selected";
- }
- $options[$count]['id'] = $i;
- $options[$count]['selected'] = $sel;
- $options[$count]['name'] = $i;
- $count++;
- }
-
- $output->FormSelectMultiple('pc_day',$options);
- return $output->GetOutput();
- }
-
- /**
- * Returns an array of form data for FormSelectMultiple
- */
- function postcalendar_adminapi_buildYearSelect($args)
- {
- extract($args);
-
- if(!isset($pc_year)) {
- $pc_year = Date('Y');
- }
-
- $output = new pnHTML();
- $output->SetInputMode(_PNH_VERBATIMINPUT);
-
- // create the return object to be inserted into the form
- $options = array();
- // we want the list to contain 10 year before today and 30 years after
- // maybe this will eventually become a user defined value
- $pc_start_year = $pc_year - 10;
- $pc_end_year = $pc_year + 30;
- $count = 0;
- for ($i = $pc_start_year; $i <= $pc_end_year; $i++) {
- $sel = false;
- if ($i == $pc_year) {
- $sel = true;
- }
- $options[$count]['id'] = $i;
- $options[$count]['selected'] = $sel;
- $options[$count]['name'] = $i;
- $count++;
- }
-
- $output->FormSelectMultiple('pc_year',$options);
- return $output->GetOutput();
- }
-
function postcalendar_adminapi_buildHourSelect($args)
{
--- 43,46 ----
***************
*** 232,258 ****
$output = "waiting<br />";
return $output->GetOutput();
- }
-
- function postcalendar_adminapi_getCategories()
- {
- list($dbconn) = pnDBGetConn();
- $pntable = pnDBGetTables();
-
- $output = new pnHTML();
- $output->SetInputMode(_PNH_VERBATIMINPUT);
-
- $sql = "SELECT pc_catid, pc_catname, pc_catcolor, pc_catdesc
- FROM $pntable[postcalendar_categories]
- ORDER BY pc_catname";
- $result = $dbconn->Execute($sql);
- if($result === false) {
- $output->Text('DB Error :: ' . $dbconn->ErrorNo() .' : ' . $dbconn->ErrorMsg());
- return $output->GetOutput();
- }
- $return = array();
- for($i=0; !$result->EOF; $result->MoveNext(), $i++) {
- list($return[$i]['id'],$return[$i]['name'],$return[$i]['color'],$return[$i]['desc']) = $result->fields;
- }
- return $return;
}
--- 131,134 ----
Index: pnuser.php
===================================================================
RCS file: /home/cvsroot/postnuke_modules/postcalendar/pnuser.php,v
retrieving revision 1.59
retrieving revision 1.60
diff -C2 -d -r1.59 -r1.60
*** pnuser.php 1 Oct 2002 23:22:48 -0000 1.59
--- pnuser.php 2 Oct 2002 17:03:22 -0000 1.60
***************
*** 27,31 ****
//=========================================================================
! // Load the API Functions
//=========================================================================
pnModAPILoad('PostCalendar','user');
--- 27,31 ----
//=========================================================================
! // Load the API Functions and Language defines
//=========================================================================
pnModAPILoad('PostCalendar','user');
***************
*** 96,105 ****
function postcalendar_user_display($args)
{
- $output = new pnHTML();
- $output->SetInputMode(_PNH_VERBATIMINPUT);
-
if (!pnSecAuthAction(0, 'PostCalendar::', '::', ACCESS_READ)) {
! $output->Text(_POSTCALENDARNOAUTH);
! return $output->GetOutput();
}
--- 96,101 ----
function postcalendar_user_display($args)
{
if (!pnSecAuthAction(0, 'PostCalendar::', '::', ACCESS_READ)) {
! return _POSTCALENDARNOAUTH;
}
***************
*** 119,132 ****
case 'month':
case 'year':
! $output->Text('<p align="right"><a href="modules.php?op=modload&name=PostCalendar&file=print&date='.$Date.'&viewtype='.$viewtype.'">'.$imgsrc.'</a></p>');
! $output->Text(pnModAPIFunc('PostCalendar','user','buildView',array('Date'=>$Date,'viewtype'=>$viewtype)));
break;
case 'details':
! $output->Text('<p align="right"><a href="modules.php?op=modload&name=PostCalendar&file=print&date='.$Date.'&viewtype=event&eid='.$eid.'">'.$imgsrc.'</a></p>');
! $output->Text(pnModAPIFunc('PostCalendar','user','eventDetail',array('eid'=>$eid)));
break;
}
// Return the output that has been generated by this function
! return $output->GetOutput();
}
--- 115,128 ----
case 'month':
case 'year':
! $out = '<p align="right"><a href="modules.php?op=modload&name=PostCalendar&file=print&date='.$Date.'&viewtype='.$viewtype.'">'.$imgsrc.'</a></p>';
! $out .= pnModAPIFunc('PostCalendar','user','buildView',array('Date'=>$Date,'viewtype'=>$viewtype));
break;
case 'details':
! $out = '<p align="right"><a href="modules.php?op=modload&name=PostCalendar&file=print&date='.$Date.'&viewtype=event&eid='.$eid.'">'.$imgsrc.'</a></p>';
! $out .= pnModAPIFunc('PostCalendar','user','eventDetail',array('eid'=>$eid));
break;
}
// Return the output that has been generated by this function
! return $out;
}
***************
*** 152,162 ****
$Date = pnVarCleanFromInput('Date');
extract($args);
! if(!isset($Date)) {
! //$Date = date('m/d/Y');
! $time = time();
! $time += (pnUserGetVar('timezone_offset') - pnConfigGetVar('timezone_offset')) * 3600;
! $Date = ml_ftime('%Y%m%d',$time);
! }
! //list($month,$day,$year) = explode('/',$Date);
$year = substr($Date,0,4);
$month = substr($Date,4,2);
--- 148,152 ----
$Date = pnVarCleanFromInput('Date');
extract($args);
! $Date = postcalendar_getDate();
$year = substr($Date,0,4);
$month = substr($Date,4,2);
***************
*** 173,177 ****
// get DB information
- pnModDBInfoLoad('postcalendar');
list($dbconn) = pnDBGetConn();
$pntable = pnDBGetTables();
--- 163,166 ----
***************
*** 476,479 ****
--- 465,469 ----
// PARSE MAIN
//=================================================================
+ $tpl->assign('TPL_NAME',$template_name);
$tpl->assign('DayView', _CALDAYLINK);
$tpl->assign('WeekView', _CALWEEKLINK);
Index: pnuserapi.php
===================================================================
RCS file: /home/cvsroot/postnuke_modules/postcalendar/pnuserapi.php,v
retrieving revision 1.109
retrieving revision 1.110
diff -C2 -d -r1.109 -r1.110
*** pnuserapi.php 2 Oct 2002 13:07:11 -0000 1.109
--- pnuserapi.php 2 Oct 2002 17:03:22 -0000 1.110
***************
*** 95,125 ****
/**
- * return the translated month name
- * @param $args mktime(0,0,0,month);
- * @returns string
- * @return month name in user's language
- */
- function postcalendar_userapi_getmonthname($args)
- {
- extract($args);
- if(!isset($Date)) { return false; }
- $month_name = array('01' => _CALJAN,
- '02' => _CALFEB,
- '03' => _CALMAR,
- '04' => _CALAPR,
- '05' => _CALMAY,
- '06' => _CALJUN,
- '07' => _CALJUL,
- '08' => _CALAUG,
- '09' => _CALSEP,
- '10' => _CALOCT,
- '11' => _CALNOV,
- '12' => _CALDEC);
- return $month_name[date('m',$Date)];
- }
-
- /**
* Return formated date string
*/
function postcalendar_userapi_getFormatedDate($args)
{
--- 95,102 ----
/**
* Return formated date string
*/
+
+ // deprecated or not used
function postcalendar_userapi_getFormatedDate($args)
{
***************
*** 211,217 ****
extract($args);
if(!isset($Date) || empty($Date)) {
! $time = time();
! $time += (pnUserGetVar('timezone_offset') - pnConfigGetVar('timezone_offset')) * 3600;
! $Date = ml_ftime('%Y%m%d',$time);
}
if(!isset($viewtype)) {
--- 188,192 ----
extract($args);
if(!isset($Date) || empty($Date)) {
! $Date = postcalendar_getDate();
}
if(!isset($viewtype)) {
***************
*** 227,236 ****
// Get the global PostCalendar config settings
//=================================================================
! $usepopups = pnModGetVar('postcalendar','usepopups');
! $useinternationaldates = pnModGetVar('postcalendar','useinternationaldates');
! $eventsopeninnewwindow = pnModGetVar('postcalendar','eventsopeninnewwindow');
! $dayhighlightcolor = pnModGetVar('postcalendar','dayhighlightcolor');
! $firstdayofweek = pnModGetVar('postcalendar','firstdayofweek');
! $pcEventDateFormat = pnModGetVar('postcalendar','pcEventDateFormat');
//=================================================================
--- 202,211 ----
// Get the global PostCalendar config settings
//=================================================================
! $usepopups = pnModGetVar('PostCalendar','usepopups');
! $useinternationaldates = pnModGetVar('PostCalendar','useinternationaldates');
! $eventsopeninnewwindow = pnModGetVar('PostCalendar','eventsopeninnewwindow');
! $dayhighlightcolor = pnModGetVar('PostCalendar','dayhighlightcolor');
! $firstdayofweek = pnModGetVar('PostCalendar','firstdayofweek');
! $pcEventDateFormat = pnModGetVar('PostCalendar','pcEventDateFormat');
//=================================================================
***************
*** 251,255 ****
// Find out what Template we're using (n/a)
//=================================================================
! $template_name = pnModGetVar('postcalendar','pcTemplate');
if(!isset($template_name)) {
$template_name ='default';
--- 226,230 ----
// Find out what Template we're using (n/a)
//=================================================================
! $template_name = pnModGetVar('PostCalendar','pcTemplate');
if(!isset($template_name)) {
$template_name ='default';
***************
*** 271,275 ****
//=================================================================
$tpl->config_dir = 'modules/'.$modinfo['directory'].'/pntemplates/'.$template_name.'/config/';
!
//=================================================================
// populate the template object with information for
--- 246,254 ----
//=================================================================
$tpl->config_dir = 'modules/'.$modinfo['directory'].'/pntemplates/'.$template_name.'/config/';
! //=================================================================
! // Load the Language Defines
! //=================================================================
! $tpl->assign('USER_LANG', pnUserGetLang());
! //include_once('modules/'.$modinfo['directory'].'/pntemplates/'.$template_name.'/lang/'.pnUserGetLang().'/default.php');
//=================================================================
// populate the template object with information for
***************
*** 418,425 ****
$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');
! $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_Calc::dateFormat($the_day,$the_month,$the_year,'%Y%m%d')));
$month_link_text = $pc_month_name.' '.$the_year;
--- 397,404 ----
$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');
! $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_Calc::dateFormat($the_day,$the_month,$the_year,'%Y%m%d')));
$month_link_text = $pc_month_name.' '.$the_year;
***************
*** 427,433 ****
$prev_day = Date_Calc::prevDay($the_day,$the_month,$the_year,'%Y%m%d');
$next_day = Date_Calc::nextDay($the_day,$the_month,$the_year,'%Y%m%d');
! $pc_prev_day = pnModURL('postcalendar','user','view',array('tplview'=>$template_view,'viewtype'=>'day','Date'=>$prev_day));
! $pc_next_day = pnModURL('postcalendar','user','view',array('tplview'=>$template_view,'viewtype'=>'day','Date'=>$next_day));
! $day_link_url = pnModURL('postcalendar','user','view',array('tplview'=>$template_view,'viewtype'=>'day',
'Date'=>Date_Calc::dateFormat($the_day,$the_month,$the_year,'%Y%m%d')));;
if($useinternationaldates) {
--- 406,412 ----
$prev_day = Date_Calc::prevDay($the_day,$the_month,$the_year,'%Y%m%d');
$next_day = Date_Calc::nextDay($the_day,$the_month,$the_year,'%Y%m%d');
! $pc_prev_day = pnModURL('PostCalendar','user','view',array('tplview'=>$template_view,'viewtype'=>'day','Date'=>$prev_day));
! $pc_next_day = pnModURL('PostCalendar','user','view',array('tplview'=>$template_view,'viewtype'=>'day','Date'=>$next_day));
! $day_link_url = pnModURL('PostCalendar','user','view',array('tplview'=>$template_view,'viewtype'=>'day',
'Date'=>Date_Calc::dateFormat($the_day,$the_month,$the_year,'%Y%m%d')));;
if($useinternationaldates) {
***************
*** 439,445 ****
$prev_week = date('Ymd',mktime(0,0,0,$week_first_day_month,$week_first_day_date-7,$week_first_day_year));
$next_week = date('Ymd',mktime(0,0,0,$week_last_day_month,$week_last_day_date+1,$week_last_day_year));
! $pc_prev_week = pnModURL('postcalendar','user','view',array('viewtype'=>'week','Date'=>$prev_week));
! $pc_next_week = pnModURL('postcalendar','user','view',array('viewtype'=>'week','Date'=>$next_week));
! $week_link_url = pnModURL('postcalendar', 'user', 'view',
array('tplview'=>$template_view,'viewtype'=>'week','Date'=>Date_Calc::dateFormat($week_first_day_date,$the_month,$the_year,'%Y%m%d')));;
if($useinternationaldates) {
--- 418,424 ----
$prev_week = date('Ymd',mktime(0,0,0,$week_first_day_month,$week_first_day_date-7,$week_first_day_year));
$next_week = date('Ymd',mktime(0,0,0,$week_last_day_month,$week_last_day_date+1,$week_last_day_year));
! $pc_prev_week = pnModURL('PostCalendar','user','view',array('viewtype'=>'week','Date'=>$prev_week));
! $pc_next_week = pnModURL('PostCalendar','user','view',array('viewtype'=>'week','Date'=>$next_week));
! $week_link_url = pnModURL('PostCalendar', 'user', 'view',
array('tplview'=>$template_view,'viewtype'=>'week','Date'=>Date_Calc::dateFormat($week_first_day_date,$the_month,$the_year,'%Y%m%d')));;
if($useinternationaldates) {
***************
*** 454,459 ****
$prev_year = Date_Calc::beginOfPrevWeek(1,1,$the_year-1,'%Y%m%d');
$next_year = Date_Calc::beginOfNextWeek(1,1,$the_year+1,'%Y%m%d');
! $pc_prev_year = pnModURL('postcalendar','user','view',array('viewtype'=>'year','Date'=>$prev_year));
! $pc_next_year = pnModURL('postcalendar','user','view',array('viewtype'=>'year','Date'=>$next_year));
$year_link_url ='';
$year_link_text = '';
--- 433,438 ----
$prev_year = Date_Calc::beginOfPrevWeek(1,1,$the_year-1,'%Y%m%d');
$next_year = Date_Calc::beginOfNextWeek(1,1,$the_year+1,'%Y%m%d');
! $pc_prev_year = pnModURL('PostCalendar','user','view',array('viewtype'=>'year','Date'=>$prev_year));
! $pc_next_year = pnModURL('PostCalendar','user','view',array('viewtype'=>'year','Date'=>$next_year));
$year_link_url ='';
$year_link_text = '';
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 |