The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
|||
|
|||
![]()
Hi,
I am trying to find a mod that puts the current months calendar into the sidebar. So far I have found this thread that vector76 shows how to put a calendar onto the index page in vbulletin 3. I have so far created a Custom sidebar using php with the following in: --------- require_once(DIR . '/includes/functions_calendar.php'); $today = getdate(TIMENOW - $vbulletin->options['hourdiff']); $vbulletin->GPC['month'] = $today['mon']; $vbulletin->GPC['year'] = $today['year']; $usertoday = array( 'firstday' => gmdate('w', gmmktime(0, 0, 0, $month, 1, $year)), 'day' => $vbulletin->GPC['day'], 'month' => $vbulletin->GPC['month'], 'year' => $vbulletin->GPC['year'], ); // NOTE! Hard-coded for calendar number 1! $vbulletin->GPC['calendarid'] = 1; $calendarinfo = verify_id('calendar', $vbulletin->GPC['calendarid'], 1, 1); $getoptions = convert_bits_to_array($calendarinfo['options'], $_CALENDAROPTIONS); $calendarinfo = array_merge($calendarinfo, $getoptions); $geteaster = convert_bits_to_array($calendarinfo['holidays'], $_CALENDARHOLIDAYS); $calendarinfo = array_merge($calendarinfo, $geteaster); $eventrange = array(); $eventrange['frommonth'] = $vbulletin->GPC['month']; $eventrange['fromyear']= $vbulletin->GPC['year']; $eventrange['nextmonth'] = $vbulletin->GPC['month']; $eventrange['nextyear'] = $vbulletin->GPC['year']; //$eventcache = cache_events($eventrange); $minimonth = construct_calendar_output($today, $usertoday, $calendarinfo); return $minimonth; ---------- and also replace the line $phrasegroups = array('holiday'); with $phrasegroups = array('holiday', 'calendar'); in forum.php. It does display a calendar in the sidebar, but only Monday - Friday... and I do have show Saturday & Sunday enabled in the Calendar section of the Admin control panel. How can I get it to show Saturday & Sunday as well? Also, if I enable the line $eventcache = cache_events($eventrange); I get a '503 service unavailable' error and a database error report emailed to me. I am a novice using php & vbulletin, so any help would be appreciated. I'm sure there are others that would like this feature as well. Thanks Dave |
![]() |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
![]() |
|
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|