Go Back   vb.org Archive > vBulletin 3 Discussion > vB3 Design and Graphics Discussions
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools Display Modes
  #1  
Old 01-09-2008, 12:24 PM
potocki99 potocki99 is offline
 
Join Date: Jan 2007
Posts: 5
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default Mini Calendar

I know there are a couple of Mod's for a mini calendar, but they are outdated and I can't get them to work.

Any idea if there is a way to maybe take the minicalendar on the calendar.php page and move it, or copy it and put it on the forumhome?

I looked into the VBAdvanced, but that is way more than what I want to do with my board at this time.

Thanks!
Reply With Quote
  #2  
Old 01-17-2008, 03:30 AM
CNibbana CNibbana is offline
 
Join Date: Apr 2003
Posts: 16
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I feel your pain.

The mini calendar of old that shows the actual VB calendar on a non-VB page, complete with links to events, etc. is something I have wanted for a long time. I would love to see this mod but don't have the capability to figure it out myself (I tried).

Hopefully someone out there with the skills will make it happen!
Reply With Quote
  #3  
Old 01-18-2008, 01:44 AM
Shanj Shanj is offline
 
Join Date: Oct 2006
Location: Wales UK
Posts: 155
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Would like to display a mini calendar in my side column.

I know the cms do it but I prefer to just select items I want and stick them in.
I'm using Ultimate Side Columns and it adds on to the navbar template.

Also want a hierarch calendar, top as now, 2nd level viewable by usergroup, 3rd lever private for oneself. Lower levels get feed from upper level/s.
Reply With Quote
  #4  
Old 11-16-2008, 07:23 AM
mikelangelo2005's Avatar
mikelangelo2005 mikelangelo2005 is offline
 
Join Date: Mar 2008
Posts: 14
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I also look for the same
greetings,
Reply With Quote
  #5  
Old 05-26-2009, 05:37 PM
Trady Trady is offline
 
Join Date: Oct 2007
Location: UK
Posts: 12
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Also looking for this...

T.
Reply With Quote
  #6  
Old 07-29-2009, 04:35 PM
Dulce Dulce is offline
 
Join Date: Apr 2009
Posts: 10
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

has this been made anywhere yet?
Reply With Quote
  #7  
Old 08-11-2009, 04:29 AM
Vector76 Vector76 is offline
 
Join Date: Jul 2009
Posts: 2
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I put something together that appears to work. Basically I took a very carefully chosen few lines from calendar.php, just enough to get the mini calendar to work. Here's the php in its entirety:
PHP Code:
<?php
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(000$month1$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'], 11);
$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);
?>
I named this file cal.php.

Then within index.php (i wanted it on the main page only), right after
PHP Code:
require_once('./global.php'); 
I put
PHP Code:
require_once('./cal.php'); 
Then the last step is, within the template, wherever you want the mini calendar to appear, place this (the same fragment that appears on the monthly calendar).
HTML Code:
<table class="tborder" cellpadding="2" cellspacing="$stylevar[cellspacing]" border="0" width="170">
$minimonth
</table>

So, to summarize:
1. copy the php code into a file, cal.php and put that file in the main forum directory
2. add php code to require_once this file, in the file where you want to use the mini calendar
3. add the <table> fragment including $minimonth to your template.

Note, I don't really understand how the multiple calendars work, or the access control for calendars, so this is hard-coded to always display calendar 1.

If someone else wants to turn this into an official "mod" then by all means go ahead.

Attached is a screen shot (I put it on the FAQ page first so as not to disrupt the forum during development).
Attached Images
File Type: png calendar.png (28.7 KB, 0 views)
Reply With Quote
  #8  
Old 08-11-2009, 02:07 PM
Vector76 Vector76 is offline
 
Join Date: Jul 2009
Posts: 2
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I made a mistake and didn't notice that the weekday abbreviations (S, M, T, W, T, F, S) were not showing up along the top row. I finally figured out what was causing that: the phrase group that's loaded needs to include 'calendar'. And the $phrasegroups variable needs to be updated before global.php is included.

So for example at the top of index.php you'll see:
PHP Code:
$phrasegroups = array('holiday'); 
which needs to be
PHP Code:
$phrasegroups = array('holiday''calendar'); 
in order for the days to show up.

There's probably a nice clean way to do this in vbulletin that is more modular and doesn't involve editing code in as many places, but for me this is now working.
Reply With Quote
  #9  
Old 09-30-2009, 06:07 PM
Front Range 4x4 Front Range 4x4 is offline
 
Join Date: Jan 2009
Posts: 318
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Thanks, this works well on 3.8.
Reply With Quote
  #10  
Old 10-06-2009, 02:58 AM
And 1 And 1 is offline
 
Join Date: Aug 2008
Location: Chimbarongo, Region de O'
Posts: 10
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Thanks
Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 06:58 AM.


Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.08514 seconds
  • Memory Usage 2,294KB
  • Queries Executed 12 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)ad_showthread_beforeqr
  • (1)ad_showthread_firstpost
  • (1)ad_showthread_firstpost_sig
  • (1)ad_showthread_firstpost_start
  • (1)bbcode_html
  • (5)bbcode_php
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)navbar
  • (3)navbar_link
  • (120)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (1)pagenav_pagelink
  • (10)post_thanks_box
  • (10)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (10)post_thanks_postbit_info
  • (10)postbit
  • (1)postbit_attachment
  • (10)postbit_onlinestatus
  • (10)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open
  • (1)tagbit_wrapper 

Phrase Groups Available:
  • global
  • inlinemod
  • postbit
  • posting
  • reputationlevel
  • showthread
Included Files:
  • ./showthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_post_thanks.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • showthread_start
  • showthread_getinfo
  • forumjump
  • showthread_post_start
  • showthread_query_postids
  • showthread_query
  • bbcode_fetch_tags
  • bbcode_create
  • showthread_postbit_create
  • postbit_factory
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • fetch_musername
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • postbit_attachment
  • pagenav_page
  • pagenav_complete
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete