Go Back   vb.org Archive > vBulletin Modifications > Archive > vB.org Archives > vBulletin 3.0 > vBulletin 3.0 Full Releases
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools
Mini Calendar Details »»
Mini Calendar
Version: 1.00, by Colin F Colin F is offline
Developer Last Online: Apr 2014 Show Printable Version Email this Page

Version: 3.0.3 Rating:
Released: 08-07-2004 Last Update: Never Installs: 38
Re-useable Code Translations  
No support by the author.

Mini Calendar

What it does:
The Mini Calendar is just what it's name says. It allows you to add a small calendar to any or all vBulletin page(s). It links back to the month, next and previous month as well as any days with an event.

Is it complicated?
Installation is easy. Just include the cal.php file on any page that you want it shown, make one new template and insert $smallcalendar at the exact place you want it shown. Look at the instructions below.

Changes:
New files (1):
cal.php

Changed files(0-1):
depending on where it should be shown

New database fields/tables(0):
none

New templates(1):
small_calendar

Changed templates(1-2):
wherever mini calendar should be shown
(phpinclude_start, if shown on all pages)

New phrases(0):
none

Screenshots:
see attachmentsInstructions:
  • Backup all your files as well as your database.
    For help backing up your database, look here: http://www.vbulletin.com/docs/html/m...atabase_backup
  • Upload cal.php (attachment) to your forum home directory
  • Make a new template with the name small_calendar and insert the contents of template.txt (attachment) into it
  • Decide if you want to have your mini calendar on specific pages or on all your pages
    • If you decide to have the mini calendar on all your pages (for example in a sidebar) edit your phpinclude_start template and add
      PHP Code:
      include ("cal.php"); 
      to the end of it.
    • If you only want the mini calendar on specific pages, open the php file that makes that page and under
      PHP Code:
      require_once('./global.php'); 
      add
      PHP Code:
      include ("cal.php"); 
  • edit the template that shows the area in which you want to insert your mini calendar and add $smallcalendar to the exact spot where your mini calendar should be shown.
Donations: This hack will always be free, however your donations are kindly accepted and will help towards further development. If you donate, please leave me some info (either your forum site or username at vB.org) so that I can thank you.

Install:
Don't feel like donating, but still want to thank me for my work? Click the install button to show your appreciation. As a great side effect, you'll get an email update once there is a bigger update or important security fix!

Updates:
10.08.2004: Updated cal.php to fix (hopefully) the events being on the wrong day with far out timezones.

Show Your Support

  • This modification may not be copied, reproduced or published elsewhere without author's permission.

Comments
  #12  
Old 08-10-2004, 05:43 PM
Colin F's Avatar
Colin F Colin F is offline
 
Join Date: Jul 2004
Location: Switzerland
Posts: 1,551
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

If someone with this problem could give me access to their site as well as ftp for trying this out, I would be most grateful.

In the meantime, could someone try the following:
exchange this: $eventdateday = date("mj",$event[dateline_from]);

with this: $eventdateday = vbdate("mj",$event[dateline_from],false,true,false,true);
Reply With Quote
  #13  
Old 08-10-2004, 06:29 PM
PUPSTAHS PUPSTAHS is offline
 
Join Date: Jul 2004
Posts: 15
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Ok I just tried that out... it seems to fix half of the problem. Now all-day-events are shown on the correct day, but if you click the link, it still goes to the day before.

So for example, before the fix an all-day August 14th event would appear on August 13th and link to August 13th, resulting in an error. Now it appears on August 14th on the mini calendar, but still links to the 13th, so there is still an error.

For more information, here is August 2004 on my mini calendar.

Original, unmodified install:
*12th - Midnight to 9AM
--Correct
*14th - All-day
--Incorrect, the 13th is highlighted/linked instead and the link points to the 13th
*20th - All-day
--Incorrect, the 19th is highlighted/linked instead and the link points to the 19th
*21st (8am) to 22nd (9am)
--Only the 21st is highlighted as having an activity, even tho the event extends over two days
*29th - 8am - 11:30pm
--Correct
*30th - All-day
--Incorrect, the 29th is highlighted/linked instead and the link points to the 29th

Now w/ your fix:
*12th - Midnight to 9AM
--Correct
*14th - All-day
--The correct day is highlighted, but the link points to the 13th, resulting in an error
*20th - All-day
--The correct day is highlighted, but the link points to the 19th, resulting in an error
*21st (8am) to 22nd (9am)
--Only the 21st is highlighted as having an activity, even tho the event extends over two days
*29th - 8am - 11:30pm
--Correct
*30th - All-day
--The correct day is highlighted, but the link points to the 29th, resulting in an error
Reply With Quote
  #14  
Old 08-10-2004, 06:40 PM
spence2 spence2 is offline
 
Join Date: Jun 2002
Location: usa
Posts: 284
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Hi, Colin ... thanks for the hack!, which I got working on my forumhome ... but, of course, I wanted MORE, so I decided to try to make a second small calendar as well. Here's what I did:

First, I completed the hack for one calendar ... then:

Made second (duplicate) template and named it small_calendar_bal.

Duplicated cal.php and named it bal.php
assigned it to:
$calendarid = 2;
Replaced all instances of $calendarbits with $balendarbits
changed the last line of that file to:
eval("\$smallcalendarbal .= \"".fetch_template("small_calendar_bal")."\";") ;

Uploaded bal.php
Called it from the template: $smallcalendarbal

Added this in index.php:
require_once('./global.php');
include ("cal.php");
include ("bal.php");

Both instances now link to the correct calendars.
HOWEVER, entries made in either calendar show up as day links in both.
While if incorrect, they link to the "no entry" error page ... it would be sweet if I could correct his one remaining problem.

Any ideas?
Reply With Quote
  #15  
Old 08-10-2004, 06:51 PM
Colin F's Avatar
Colin F Colin F is offline
 
Join Date: Jul 2004
Location: Switzerland
Posts: 1,551
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

OK, to fix the wrong link problem, find:
$eventday= date("Y-n-j", $event[dateline_from]);

replace with:
$eventday= vbdate("Y-n-j", $event[dateline_from],false,true,false,true);

Do this with all three instances of the find text.
I'll upload an updated cal.php shortly.
Reply With Quote
  #16  
Old 08-10-2004, 06:59 PM
Colin F's Avatar
Colin F Colin F is offline
 
Join Date: Jul 2004
Location: Switzerland
Posts: 1,551
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Great that you got it to wrok spence2!

Could you add an event on calendar 1 and an event on a different date in calendar 2?
Then check which event is displayed (linked) on each of your three minicalendars.
Reply With Quote
  #17  
Old 08-10-2004, 06:59 PM
PUPSTAHS PUPSTAHS is offline
 
Join Date: Jul 2004
Posts: 15
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Works like a dream, thank you! Definitely going to be making good use of this... keep up the good work.
Reply With Quote
  #18  
Old 08-10-2004, 07:04 PM
Colin F's Avatar
Colin F Colin F is offline
 
Join Date: Jul 2004
Location: Switzerland
Posts: 1,551
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

See the bottom part of my first post to see what's to do if you like/installed the hack

[high]* Colin F is happy it's finally working![/high]
Reply With Quote
  #19  
Old 08-11-2004, 03:37 PM
PUPSTAHS PUPSTAHS is offline
 
Join Date: Jul 2004
Posts: 15
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Colin F
See the bottom part of my first post to see what's to do if you like/installed the hack

[high]* Colin F is happy it's finally working![/high]
Well it's *close* to perfection ... ranged events still don't work! Unlike the mini calendars on the main calendar page, the mini calendar hack only shows the first day of a ranged event as having an event.

i.e. i've got a ranged event from August 14th to 15th, but only August 14th on the mini calendar has a link.

I've been using your hack for the last few days, and I think that's the last bug.
Reply With Quote
  #20  
Old 08-12-2004, 09:36 AM
Colin F's Avatar
Colin F Colin F is offline
 
Join Date: Jul 2004
Location: Switzerland
Posts: 1,551
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I also don't use ranged events on my calendar

But I'll look into it aswell when I get home this evening.
Reply With Quote
  #21  
Old 08-12-2004, 12:54 PM
spence2 spence2 is offline
 
Join Date: Jun 2002
Location: usa
Posts: 284
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Colin F
Great that you got it to wrok spence2!

Could you add an event on calendar 1 and an event on a different date in calendar 2?
Then check which event is displayed (linked) on each of your three minicalendars.
Still have events showing up in all calendars (see post #13).
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 11:46 PM.


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.04926 seconds
  • Memory Usage 2,316KB
  • Queries Executed 27 (?)
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
  • (3)bbcode_php
  • (2)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)modsystem_post
  • (1)navbar
  • (6)navbar_link
  • (120)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (3)pagenav_pagelink
  • (11)post_thanks_box
  • (11)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (11)post_thanks_postbit_info
  • (10)postbit
  • (11)postbit_onlinestatus
  • (11)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_postinfo_query
  • fetch_postinfo
  • 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
  • pagenav_page
  • pagenav_complete
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete