Register Members List Search Today's Posts Mark Forums Read

Reply
 
Mod Options
Mini Calendar Details »
Mini Calendar
Mod Version: 1.00, by Colin F (Member) Colin F is offline
Developer Last Online: Apr 2014 I like it Show Printable Version Email this Page

This modification is in the archives.
vB Version: 3.0.3 Rating: (0 vote - 0 average) Installs: 38
Released: 08 Aug 2004 Last Update: Never Downloads: 139
Not Supported Re-usable Code Translations  

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
      Block Disabled:      (Update License Status)  
      Suspended or Unlicensed Members Cannot View Code.

      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
      Block Disabled:      (Update License Status)  
      Suspended or Unlicensed Members Cannot View Code.

      add
      Block Disabled:      (Update License Status)  
      Suspended or Unlicensed Members Cannot View Code.

  • 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.

Download Now

Only licensed members can download files, Click Here for more information.

Screenshots

Click image for larger version

Name:	screenshot1.jpg
Views:	1568
Size:	172.7 KB
ID:	20082   Click image for larger version

Name:	screenshot2.jpg
Views:	1140
Size:	51.7 KB
ID:	20083  

Show Your Support

  • To receive notifications regarding updates -> Click to Mark as Installed.
  • This modification may not be copied, reproduced or published elsewhere without author's permission.
Similar Mod
Mod Developer Type Replies Last Post
Mini Calendar Colin F vBulletin 3.0 Beta Releases 18 27 Jul 2004 22:56

Comments
  #2  
Old 08 Aug 2004, 16:58
Colin F's Avatar
Colin F Colin F is offline
 
Join Date: Jul 2004
Location: Switzerland
Tips and Tricks

But its... *english*?!?
To translate the few hardcoded dayvalues, go to lines 21-27 and edit the Su, Mo Tu, We, Th, Fr, Sa values near the end of each line to your liking.
DON'T change these values if you think there's a problem with the first day of the week! The script checks on the browsing users start of week day and changes the mini calendar so that the day is also all the way on the left!

German:

Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.

French:

Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.

How can I have it use my other calendar?
If you have more than one calendar and would like mini calendar to pull the events from a different calendar, do the following:
  • Go to yourforums.com/pathtoyourforum/calendar.php?s=&month=6&year=2004&do=&c=1
  • Pick the calendar you want to use as the base for mini calendar from the Calendar Jump box on the bottom right.
  • Now look in your adressbar. The adress should be something like

    Block Disabled:      (Update License Status)  
    Suspended or Unlicensed Members Cannot View Code.

    Look for the c variable (marked green above) and write that down or remember that or whatever
  • Edit cal.php. Change the variable $calendarid on line 5 to the value of that c variable you picked out of the adress.
  • save / reupload
__________________

Last edited by Colin F; 08 Aug 2004 at 17:04.
Reply With Quote
  #3  
Old 08 Aug 2004, 17:08
nexialys
Guest
 
thanks for the final release!
Reply With Quote
  #4  
Old 09 Aug 2004, 22:33
PUPSTAHS PUPSTAHS is offline
 
Join Date: Jul 2004
Hi Colin,
Excellent work, but the single all-day events still do not appear correctly for me (and others). Example:

A single all-day event on August 20th appears on the Mini Calendar on August 19th, thereby resulting in an incorrect link and a "no events to display" error from the calendar. Using a ranged event works fine, but all-day events result in erroneous links to the previous day every time.

FYI I did a straight, simple install, with no modifications.

Any help would be great, as I love the idea.

Last edited by PUPSTAHS; 09 Aug 2004 at 23:54.
Reply With Quote
  #5  
Old 10 Aug 2004, 06:03
Colin F's Avatar
Colin F Colin F is offline
 
Join Date: Jul 2004
Location: Switzerland
S***!

Ok...
I'm thinking it has something to do with your timezone. what timezone are you in?
__________________
Reply With Quote
  #6  
Old 10 Aug 2004, 09:40
PUPSTAHS PUPSTAHS is offline
 
Join Date: Jul 2004
Hmm

I'm PST... (-8:00)
Reply With Quote
  #7  
Old 10 Aug 2004, 11:48
Colin F's Avatar
Colin F Colin F is offline
 
Join Date: Jul 2004
Location: Switzerland
I have an idea... but I don't have access to phpmyadmin here at work. I'll look at it when I come home
__________________
Reply With Quote
  #8  
Old 10 Aug 2004, 14:07
spence2 spence2 is offline
 
Join Date: Jun 2002
To be clear ... the .php I alter should look like:

require_once('./global.php');
include ("cal.php");

Is this correct?
So far I'm having trouble getting this to work, so I wanted to clarify.
Thanks.
Reply With Quote
  #9  
Old 10 Aug 2004, 17:00
Colin F's Avatar
Colin F Colin F is offline
 
Join Date: Jul 2004
Location: Switzerland
Originally Posted by spence2
To be clear ... the .php I alter should look like:

require_once('./global.php');
include ("cal.php");

Is this correct?
So far I'm having trouble getting this to work, so I wanted to clarify.
Thanks.
That is correct spence2.
__________________
Reply With Quote
  #10  
Old 10 Aug 2004, 19:05
PUPSTAHS PUPSTAHS is offline
 
Join Date: Jul 2004
Regarding the all-day-event bug--

I'm no PHP or vBulletin expert, but it seems strange that a different time zone would be causing a problem that seems to only deal with dates, not times.

I could be wrong tho... mostly I just want my mini-calendar up and kicking :squareeyed:
Reply With Quote
  #11  
Old 10 Aug 2004, 19:43
Colin F's Avatar
Colin F Colin F is offline
 
Join Date: Jul 2004
Location: Switzerland
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
  #12  
Old 10 Aug 2004, 20:29
PUPSTAHS PUPSTAHS is offline
 
Join Date: Jul 2004
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
  #13  
Old 10 Aug 2004, 20:40
spence2 spence2 is offline
 
Join Date: Jun 2002
multiple small calendars

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?
Attached Images
File Type: gif smallcal.gif (6.7 KB, 112 views)
Attached Files
File Type: php bal.php (5.5 KB, 8 views)

Last edited by spence2; 12 Aug 2004 at 05:05.
Reply With Quote
  #14  
Old 10 Aug 2004, 20:51
Colin F's Avatar
Colin F Colin F is offline
 
Join Date: Jul 2004
Location: Switzerland
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
  #15  
Old 10 Aug 2004, 20:59
Colin F's Avatar
Colin F Colin F is offline
 
Join Date: Jul 2004
Location: Switzerland
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
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Mod Options

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


New To Site? Need Help?

All times are GMT. The time now is 14:48.

Layout Options | Width: Wide Color: