Mini_Cal. cleaned up. :-D

Hopefully everything completely transferred ... I check it later
This commit is contained in:
Christian
2008-10-08 15:04:23 +00:00
parent 566aaa622b
commit 29a237f8b7
19 changed files with 162 additions and 1039 deletions

View File

@@ -581,4 +581,50 @@ function ap_validate($str) {
return $page_string;
}
// Mini Cal.
class calendar
{
var $dateYYY; // year in numeric format (YYYY)
var $dateMM; // month in numeric format (MM)
var $dateDD; // day in numeric format (DD)
var $ext_dateMM; // extended month (e.g. February)
var $daysMonth; // count of days in month
var $stamp; // timestamp
var $day; // return array s.a.
/**
* convert date->timestamp
**/
function makeTimestamp($date)
{
$this->stamp = strtotime($date);
return ($this->stamp);
}
/**
* get date listed in array
**/
function getMonth($callDate)
{
$this->makeTimestamp($callDate);
$this->dateYYYY = date("Y", $this->stamp);
$this->dateMM = date("n", $this->stamp);
$this->ext_dateMM = date("F", $this->stamp);
$this->dateDD = date("d", $this->stamp);
$this->daysMonth = date("t", $this->stamp);
for($i=1; $i < $this->daysMonth+1; $i++)
{
$this->makeTimestamp("$i $this->ext_dateMM $this->dateYYYY");
$this->day[] = array(
"0" => "$i",
"1" => $this->dateMM,
"2" => $this->dateYYYY,
"3" => (date('w', $this->stamp))
);
}
}
}
?>

View File

@@ -1,308 +0,0 @@
<?php
/**
*
* @package - Board3portal
* @version $Id$
* @copyright (c) kevin / saint ( www.board3.de/ ), (c) Ice, (c) nickvergessen ( www.flying-bits.org/ ), (c) redbull254 ( www.digitalfotografie-foren.de ), (c) Christian_N ( www.phpbb-projekt.de )
* @based on: phpBB3 Portal by Sevdin Filiz, www.phpbb3portal.com
* @copyright (c) Adrian Cockburn - phpbb@netclectic.com (mini calendar)
* @license http://opensource.org/licenses/gpl-license.php GNU Public License
*
*/
if (!defined('IN_PHPBB'))
{
exit;
}
if (!defined('IN_MINI_CAL'))
{
exit;
}
/**
* Features include: 11 languages, returns all data in one array,
* intelligent linker function
*
* day[] = array(0 => 'dayNumeric', // e.g. 19
* 1 => 'dayName', // e.g. Tue
* 2 => 'dayNameL', // e.g. Tuesday
* 3 => 'monthName', // e.g. March
* 4 => 'monthNumeric' // e.g. 12
* 5 => 'year' // e.g. 2002
* 6 => 'timestamp' // e.g. 1020204000
* 7 => 'dayOfWeek' // 0-6 ! e.g. sunday=0, monday=1...
* 8 => 'dayOfYear' // day of year (001 - 366)
* 9 => 'weekNum' // weeknumber of current year
* 10 => 'link' // link from link function
* 11 => 'mysqlDate' // contains date in mysql-format (YYYY-MM-DD)
*
*
* language options:
* 0 = english (default) 1 = german
* 2 = french 3 = spanish
* 4 = finish 5 = polish
* 6 = portuguese 7 = italian
* 8 = italian 9 = slovak
* 10 = turkish
*
**/
/**
* set language
* @const language
* default 0 / english
**/
define("language", "1");
/**
* set default date format
* @const dateFormat
* default
**/
define("dateFormat" , "0");
class calendarSuite {
var $dateYYY; // year in numeric format (YYYY)
var $dateMM; // month in numeric format (MM)
var $dateDD; // day in numeric format (DD)
var $ext_dateMM; // extended month (e.g. February)
var $ext_dateDD; // extended day (e.g. Mon)
var $daysMonth; // count of days in month
var $nextMonth; // contains next month
var $lastMonth; // contains last month
var $stamp; // timestamp
var $day; // return array s.a.
/**
* Constructor
*
* Sets default values for e.g. language (default=english)
**/
function calendarSuite(){
switch (language) {
case 0:
$this->language = "en_EN";
break;
case 1:
$this->language = "de_DE";
break;
case 2:
$this->language = "fr_FR";
break;
case 3:
$this->language = "es_ES";
break;
case 4:
$this->language = "fi_FI";
break;
case 5:
$this->language = "pl_PL";
break;
case 6:
$this->language = "pt_PT";
break;
case 7:
$this->language = "it_IT";
break;
case 8:
$this->language = "ru_RU";
break;
case 9:
$this->language = "sk_SK";
break;
case 10:
$this->language = "tr_TR";
break;
default:
$this->language = "en_EN";
}
setlocale (LC_TIME, $this->language); // set language
// end of function calendarSuite
}
/**
* determine the next month after current
**/
function nextMonth() {
$this->nextMonth = $this->getMonth("+1 month");
// end of function nextMonth
}
/**
* determine the last month before current
**/
function lastMonth() {
$this->lastMonth = $this->getMonth("-1 month");
// end of function lastMonth
}
/**
* convert date->timestamp
**/
function makeTimestamp($date) {
$this->stamp = strtotime($date);
return ($this->stamp);
// end of function makeTimestamp
}
/**
* get date listed in array
**/
function getMonth($callDate) {
$this->makeTimestamp($callDate);
$this->dateYYYY = date("Y", $this->stamp);
$this->dateMM = date("n", $this->stamp);
$this->ext_dateMM = date("F", $this->stamp);
$this->dateDD = date("d", $this->stamp);
$this->daysMonth = date("t", $this->stamp);
$this->monthStart = date("w", $this->stamp);
for($i=1; $i < $this->daysMonth+1; $i++) {
$this->makeTimestamp("$i $this->ext_dateMM $this->dateYYYY");
$this->day[] = array(
"0" => "$i",
"1" => (strftime('%a', $this->stamp)),
"2" => (strftime('%A', $this->stamp)),
"3" => (strftime("%B", $this->stamp)),
"4" => $this->dateMM,
"5" => $this->dateYYYY,
"6" => $this->stamp,
"7" => (date('w', $this->stamp)),
"8" => (strftime('%j', $this->stamp)),
"9" => (strftime('%U', $this->stamp)),
"10" => $this->dateLinker($this->stamp),
"11" => $this->formatDate($this->stamp, 99)
);
}
// end of function getMonth
}
/**
* get detailed array of day
**/
function getDayDetail($stamp) {
$this->dateYYYY = date("Y", $stamp);
$this->dateMM = date("n", $stamp);
$this->dateDD = date("d", $stamp);
$this->ext_dateMM = date("F", $stamp);
$this->daysMonth = date("t", $stamp);
$this->monthStart = date("w", $stamp);
$this->day = array(
"0" => (date("j",$stamp)),
"1" => (strftime('%a', $stamp)),
"2" => (strftime('%A', $stamp)),
"3" => $this->ext_dateMM,
"4" => $this->dateMM,
"5" => $this->dateYYYY,
"6" => $stamp,
"7" => (date('w', $stamp)),
"8" => strftime('%j', $stamp),
"9" => strftime('%U', $stamp)
);
// end of function getDay
}
/**
* make links for every day
**/
function dateLinker($stamp) {
$link = "?stamp=".$stamp;
return $link;
// end of function dateLinker
}
/**
* format date in different forms
**/
function formatDate($stamp, $option = dateFormat) {
switch ($option) {
case 0:
$this->formatted = date("d n Y", $stamp);
return $this->formatted;
break;
case 1:
$this->formatted = date("d Y M", $stamp);
return $this->formatted;
break;
case 2:
$this->formatted = date("M d Y", $stamp);
return $this->formatted;
break;
case 3:
$this->formatted = date("M Y d", $stamp);
return $this->formatted;
break;
case 4:
$this->formatted = date("Y M d", $stamp);
return $this->formatted;
break;
case 5:
$this->formatted = date("Y d M", $stamp);
return $this->formatted;
break;
case 6:
$this->formatted = date("d M Y", $stamp);
return $this->formatted;
break;
case 99:
$this->formatted = date("Y-m-d", $stamp);
return $this->formatted;
break;
}
// end of function formatDate
}
// end of class
}
?>

View File

@@ -1,7 +0,0 @@
<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=UTF-8" />
</head>
<body bgcolor="#FFFFFF" text="#000000">
</body>
</html>

View File

@@ -1,143 +0,0 @@
<?php
/**
*
* @package - Board3portal
* @version $Id$
* @copyright (c) kevin / saint ( www.board3.de/ ), (c) Ice, (c) nickvergessen ( www.flying-bits.org/ ), (c) redbull254 ( www.digitalfotografie-foren.de ), (c) Christian_N ( www.phpbb-projekt.de )
* @based on: phpBB3 Portal by Sevdin Filiz, www.phpbb3portal.com
* @copyright (c) Adrian Cockburn - phpbb@netclectic.com (mini calendar)
* @license http://opensource.org/licenses/gpl-license.php GNU Public License
*
*/
if (!defined('IN_PHPBB'))
{
exit;
}
if (!defined('IN_MINI_CAL'))
{
exit;
}
/***************************************************************************
getFormattedDate
version: 1.0.0
parameters: $cal_weekday -
$cal_month -
$cal_monthday -
$cal_year -
$cal_hour -
$cal_min -
$cal_sec -
returns: a date formatted according to the MINI_CAL_DATE_PATTERNS
set in mini_cal_config.php and the Mini_Cal_date_format
set in lang_main_min_cal.php
***************************************************************************/
function getFormattedDate($cal_weekday, $cal_month, $cal_monthday, $cal_year, $cal_hour, $cal_min, $cal_sec, $format)
{
global $lang;
// initialise out date formatting patterns
$cal_date_pattern = unserialize(MINI_CAL_DATE_PATTERNS);
$cal_date_replace = array(
$lang['mini_cal']['day'][$cal_weekday],
$lang['mini_cal']['month'][$cal_month],
$cal_month,
( (strlen($cal_monthday) < 2 ) ? '0' : '' ) . $cal_monthday,
$cal_monthday,
( (strlen($cal_month) < 2 ) ? '0' : '' ) . $cal_month,
substr($cal_year, -2),
$cal_year,
( (strlen($cal_hour) < 2 ) ? '0' : '' ) . $cal_hour,
$cal_hour,
( (strlen($cal_hour) < 2 ) ? '0' : '' ) . ( ( $cal_hour > 12 ) ? $cal_hour-12 : $cal_hour ),
( $cal_hour > 12 ) ? $cal_hour-12 : $cal_hour,
$cal_min,
$cal_sec,
( $cal_hour < 12 ) ? 'AM' : 'PM'
);
return preg_replace($cal_date_pattern, $cal_date_replace, $format);
}
/***************************************************************************
setQueryStringVal
version: 1.0.0
parameters: $var - the variable who's value is to be replaced
$value - the new value for the variable
returns: a modified querystring prefixed with ?
***************************************************************************/
function setQueryStringVal($var, $value)
{
$querystring = $_SERVER["QUERY_STRING"];
if (!stristr($querystring, $var))
{
$querystring .= ($querystring) ? '&' : '';
$querystring .= "$var=$value";
}
else
{
$querystring = ereg_replace("($var=[[:digit:]]{1,3})", "$var=$value", $querystring);
}
return '?' . $querystring;
}
/***************************************************************************
getPostForumsList
version: 1.0.0
parameters: $mini_cal_post_auth - a comma seperated list of forms with post rights
returns: adds a forums select list to the template output
***************************************************************************/
function getPostForumsList($mini_cal_post_auth, $and_post_auth_sql = '')
{
if ($mini_cal_post_auth)
{
global $db, $template, $lang;
// get a list of events forums
$sql = 'SELECT c.cat_id, c.cat_title, f.forum_id, f.forum_name
FROM ' . FORUMS_TABLE . ' f, ' . CATEGORIES_TABLE . ' c
WHERE f.cat_id = c.cat_id
AND f.forum_id IN (' . $mini_cal_post_auth . ')' .
$and_post_auth_sql;
if( $result = $db->sql_query($sql) )
{
$num_rows = $db->sql_numrows($result);
if ( $num_rows > 0 )
{
$template->assign_block_vars('switch_mini_cal_add_events', array());
$forums_list = '<select style="width: 100%" name="' . POST_FORUM_URL . '" onchange="if(this.options[this.selectedIndex].value > -1){ forms[\'mini_cal\'].submit() }">';
$cat_id = 0;
while ($row = $db->sql_fetchrow($result))
{
$forums_list .= '<option value="' . $row['forum_id'] . '"' . $selected . '> - ' . substr($row['forum_name'],0,20) . '</option>';
}
$forums_list .= '</select>';
$template->assign_vars( array(
'S_MINI_CAL_EVENTS_FORUMS_LIST' => $forums_list
)
);
}
$db->sql_freeresult($result);
}
}
}
?>

View File

@@ -1,89 +0,0 @@
<?php
/**
*
* @package - Board3portal
* @version $Id$
* @copyright (c) kevin / saint ( www.board3.de/ ), (c) Ice, (c) nickvergessen ( www.flying-bits.org/ ), (c) redbull254 ( www.digitalfotografie-foren.de ), (c) Christian_N ( www.phpbb-projekt.de )
* @based on: phpBB3 Portal by Sevdin Filiz, www.phpbb3portal.com
* @copyright (c) Adrian Cockburn - phpbb@netclectic.com (mini calendar)
* @license http://opensource.org/licenses/gpl-license.php GNU Public License
*
*/
if (!defined('IN_PHPBB'))
{
exit;
}
if (!defined('IN_MINI_CAL'))
{
exit;
}
/***************************************************************************
The following values are configurable to tailor the mini cal to your needs.
***************************************************************************/
// Defines which events calendar you are using, if any
// possible values:
// MYCAL - MyCalendar
// PLUS - MyCalendar+
// TOPIC - Topic Calendar
// SNAIL - Websnail Calendar Pro
// SNAILLITE - Websnail Calendar Lite
// NONE - No Supported Calendar is installed
define('MINI_CAL_CALENDAR_VERSION', 'NONE');
// EVENTS CALENDAR USERS ONLY!
// Limits the number of events shown on the mini cal
define('MINI_CAL_LIMIT', 5);
// EVENTS CALENDAR USERS ONLY!
// Limits the number of days ahead in which time upcoming events will be shown
// set to 0 (zero) for umlimited
define('MINI_CAL_DAYS_AHEAD', 7);
// Defines what type of search happens when a user clicks on a date in the calendar
// possible values:
// POSTS - will return all posts posted on that date
// EVENTS - will return all events happening on that date (ONLY SUITABLE FOR EVENTS CALENDAR USERS).
define('MINI_CAL_DATE_SEARCH', 'POSTS');
// First Day of the Week - 0=Sunday, 1=Monday...6=Saturday
// if you change this remember to change the short day names in lang_main_mini_cal.php
define('MINI_CAL_FDOW', 1);
// Defines the css class to use for mini cal days urls
define('MINI_CAL_DAY_LINK_CLASS', 'gensmall');
// Defines the css class to use for mini cal today date
define('MINI_CAL_TODAY_CLASS', 'gensmall');
// defines the authentication level required to be able to view the upcoming events
// this relates to the permission level assigned to forum
// possible values:
// auth_view, auth_read, auth_post, auth_reply, auth_edit,
// auth_delte, auth_sticky, auth_announce, auth_vote, auth_pollcreate
define('MINI_CAL_EVENT_AUTH_LEVEL', 'auth_view');
/***************************************************************************
You should NOT modify any values below here.
***************************************************************************/
// DO NOT MODIFY THIS!
define('MINI_CAL_DATE_PATTERNS', serialize(array('/%a/', '/%b/', '/%c/', '/%d/', '/%e/', '/%m/', '/%y/', '/%Y/',
'/%H/', '/%k/', '/%h/', '/%l/', '/%i/', '/%s/', '/%p/')));
?>

View File

@@ -1,303 +0,0 @@
<?php
/**
*
* @package - Board3portal
* @version $Id$
* @copyright (c) kevin / saint ( www.board3.de/ ), (c) Ice, (c) nickvergessen ( www.flying-bits.org/ ), (c) redbull254 ( www.digitalfotografie-foren.de ), (c) Christian_N ( www.phpbb-projekt.de )
* @based on: phpBB3 Portal by Sevdin Filiz, www.phpbb3portal.com
* @copyright (c) Adrian Cockburn - phpbb@netclectic.com (mini calendar)
* @license http://opensource.org/licenses/gpl-license.php GNU Public License
*
*/
if (!defined('IN_PHPBB'))
{
exit;
}
if (!defined('IN_MINI_CAL'))
{
exit;
}
/**
* set_var
*
* Set variable, used by {@link request_var the request_var function}
*
* @access private
*/
/***************************************************************************
getMiniCalForumsAuth
version: 1.0.0
parameters: $userdata - an initialised $userdata array.
returns: a two part array
$mini_cal_auth['view'] - a comma seperated list of forums which the user has VIEW permissions for
$mini_cal_auth['post'] - a comma seperated list of forums which the user has POST permissions for
***************************************************************************/
function getMiniCalForumsAuth($user)
{
global $db, $auth, $user;
// initialise our forums auth list
$mini_cal_auth_ary = array();
$mini_cal_auth_ary = $auth->acl($user->data);
$mini_cal_auth = array();
$mini_cal_auth['view'] = '';
$mini_cal_auth['post'] = '';
while ( list($mini_cal_forum_id, $mini_cal_auth_level) = each($mini_cal_auth_ary) )
{
if ( $mini_cal_auth_level[MINI_CAL_EVENT_AUTH_LEVEL] )
{
$mini_cal_auth['view'] .= ($mini_cal_auth['view'] == '') ? $mini_cal_forum_id : ', ' . $mini_cal_forum_id;
}
if ( ($mini_cal_auth_level['auth_post']) && $mini_cal_auth_level['auth_cal'] )
{
$mini_cal_auth['post'] .= ($mini_cal_auth['post'] == '') ? $mini_cal_forum_id : ', ' . $mini_cal_forum_id;
}
}
return $mini_cal_auth;
}
/***************************************************************************
getMiniCalEventDays
version: 1.0.0
parameters: $auth_view_forums - a comma seperated list of forums which the user has VIEW permissions for
returns: an array containing a list of day containing event the user has permission to view
***************************************************************************/
function getMiniCalEventDays($auth_view_forums)
{
global $db, $mini_cal_this_year, $mini_cal_this_month;
$mini_cal_event_days = array();
if ($auth_view_forums)
{
// start and end date
$start_date = mktime(0,0,0, $mini_cal_this_month, 01, $mini_cal_this_year);
$w_month = $mini_cal_this_month + 1;
$w_year = $mini_cal_this_year;
if ($w_month > 12)
{
$w_month = 01;
$w_year++;
}
$end_date = mktime(0,0,0, $w_month, 01, $w_year);
// we consider the duration
$sql = "SELECT DISTINCT topic_calendar_time, topic_calendar_duration
FROM " . TOPICS_TABLE . "
WHERE forum_id IN ($auth_view_forums)
AND (topic_calendar_time + topic_calendar_duration) >= $start_date
AND topic_calendar_time < $end_date
AND topic_calendar_time IS NOT NULL
AND topic_calendar_time <> 0";
if ( $result = $db->sql_query($sql) )
{
$mini_cal_event_days_ww = array();
while( $row = $db->sql_fetchrow($result) )
{
$start_day = intval(date('d', $row['topic_calendar_time']));
for ($i = 0; ( ($i <= intval($row['topic_calendar_duration'] / 86400)) && ( ($start_day + $i) <= 31) ); $i++)
{
$mini_cal_event_days_ww[ ($start_day + $i) ] = true;
}
}
while (list($mini_cal_event_day, $mini_cal_event_present) = each($mini_cal_event_days_ww) )
{
$mini_cal_event_days[] = $mini_cal_event_day;
}
}
}
return $mini_cal_event_days;
}
/***************************************************************************
getMiniCalEvents
version: 1.0.0
parameters: $mini_cal_auth - a two part array
$mini_cal_auth['view'] - a comma seperated list of forums which the user has VIEW permissions for
$mini_cal_auth['post'] - a comma seperated list of forums which the user has POST permissions for
returns: nothing - it assigns variable to the template
***************************************************************************/
function getMiniCalEvents($mini_cal_auth)
{
global $template, $db, $phpEx, $lang, $mini_cal_today,
$mini_cal_this_month, $mini_cal_this_year, $mini_cal_this_day;
// start and end date
$start_date = mktime(0,0,0, intval(substr($mini_cal_today, 4, 2)), $mini_cal_this_day, $mini_cal_this_year);
$w_month = $mini_cal_this_month;
$days_ahead_sql = '';
if (MINI_CAL_DAYS_AHEAD > 0)
{
$w_year = $mini_cal_this_year;
if ($w_month > 12)
{
$w_month = 01;
$w_year++;
}
$end_date = mktime(0,0,0, $w_month, $mini_cal_this_day + MINI_CAL_DAYS_AHEAD, $w_year);
$days_ahead_sql = " AND topic_calendar_time < $end_date ";
}
// initialise some sql bits
$mini_cal_auth_sql = ($mini_cal_auth['view']) ? ' AND t.forum_id in (' . $mini_cal_auth['view'] . ') ' : '';
// get events
$sql = "SELECT t.topic_id, t.topic_calendar_time, t.topic_title, t.forum_id, t.topic_calendar_duration
FROM " . TOPICS_TABLE . " t
WHERE topic_calendar_time >= $start_date
$days_ahead_sql
AND topic_calendar_time IS NOT NULL
AND topic_calendar_time <> 0
$mini_cal_auth_sql
ORDER BY
t.topic_calendar_time ASC";
// did we get a result?
if( $result = $db->sql_query_limit($sql, MINI_CAL_LIMIT) )
{
$template->assign_block_vars('switch_mini_cal_events', array());
if ( $db->sql_numrows($result) > 0 )
{
// we've got some events
// now let's output our events in the given date format for the current language
while ($row = $db->sql_fetchrow($result))
{
$cal_time = $row['topic_calendar_time'];
$day_span = (date("Ymd", $cal_time) < date("Ymd", $cal_time+$row['topic_calendar_duration']));
$include_time = date("His", $cal_time) > 0;
$cal_date = getFormattedDate(
date('w', $cal_time),
date('n', $cal_time),
date('d', $cal_time),
date('Y', $cal_time),
date('H', $cal_time),
date('i', $cal_time),
date('s', $cal_time),
$lang['Mini_Cal_date_format'].((!$day_span && $include_time)?' '.$lang['Mini_Cal_date_format_Time']:'')
);
if ($day_span || $row['topic_calendar_duration'] > 0)
{
$cal_time = $cal_time + $row['topic_calendar_duration'];
$cal_date .= ' - ' . getFormattedDate(
date('w', $cal_time),
date('n', $cal_time),
date('d', $cal_time),
date('Y', $cal_time),
date('H', $cal_time),
date('i', $cal_time),
date('s', $cal_time),
((!$day_span)?$lang['Mini_Cal_date_format_Time']:$lang['Mini_Cal_date_format'])
);
}
$template->assign_block_vars('mini_cal_events', array(
'MINI_CAL_EVENT_DATE' => $cal_date,
'S_MINI_CAL_EVENT' => $row['topic_title'],
'U_MINI_CAL_EVENT' => append_sid( $phpbb_root_path . "viewtopic.$phpEx?" . POST_TOPIC_URL . '=' . $row['topic_id'] )
)
);
}
}
else
{
// no events :(
$template->assign_block_vars('mini_cal_no_events', array());
}
$db->sql_freeresult($result);
}
}
/***************************************************************************
getMiniCalSearchSql
version: 1.0.0
parameters: $search_id - the type of search we're looking for
$search_date - the date passed to the search
returns: an sql string
***************************************************************************/
function getMiniCalSearchSql($search_date)
{
$s_yy = intval(substr($search_date, 0, 4));
$s_mm = intval(substr($search_date, 4, 2));
$s_dd = intval(substr($search_date, 6, 2));
$search_date = mktime(0,0,0, $s_mm, $s_dd, $s_yy);
$nix_tomorrow = mktime (0,0,0, $s_mm, $s_dd + 1, $s_yy);
$sql = "SELECT topic_first_post_id as post_id
FROM " . TOPICS_TABLE . "
WHERE (topic_calendar_time + topic_calendar_duration) >= $search_date AND topic_calendar_time < $nix_tomorrow";
return $sql;
}
/***************************************************************************
getMiniCalSearchURL
version: 1.0.0
parameters: $search_date - the date passed to the search
returns: an url string
***************************************************************************/
function getMiniCalSearchURL($search_date)
{
global $phpEx;
$s_yy = intval(substr($search_date, 0, 4));
$s_mm = intval(substr($search_date, 4, 2));
$s_dd = intval(substr($search_date, 6, 2));
$search_date = mktime(0,0,0, $s_mm, $s_dd, $s_yy);
//$url = append_sid($phpbb_root_path . "search.$phpEx?search_id=mini_cal_events&amp;d=" . $search_date);
$url = append_sid($phpbb_root_path . "calendar_scheduler.$phpEx?d=" . $search_date);
return $url;
}
/***************************************************************************
getMiniCalPostForumsList
version: 1.0.0
parameters: $mini_cal_post_auth - a comma seperated list of forms with post rights
returns: adds a forums select list to the template output
***************************************************************************/
function getMiniCalPostForumsList($mini_cal_post_auth)
{
getPostForumsList($mini_cal_post_auth);
}
$template->assign_vars(array(
'U_MINI_CAL_CALENDAR' => append_sid($phpbb_root_path . 'calendar.' . $phpEx),
'U_MINI_CAL_ADD_EVENT' => append_sid($phpbb_root_path . 'posting.' . $phpEx . '?mode=newtopic&f=' . MINI_CAL_EVENTS_FORUM )
)
);
?>