Register Members List Search Today's Posts Mark Forums Read

Closed Thread
 
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: 3
Released: 07 Jul 2004 Last Update: Never Downloads: 2
Not Supported Re-usable Code Translations Is in Beta Stage  

Mini Calendar

THIS HAS MOVED OUT OF BETA. SEE THE NEW THREAD HERE: http://www.vbulletin.org/forum/showthread.php?t=68117



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

Download Now

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

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 Full Releases 81 27 Jun 2007 21:25

Comments
  #2  
Old 07 Jul 2004, 11:36
Colin F's Avatar
Colin F Colin F is offline
 
Join Date: Jul 2004
Location: Switzerland
Cool

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:[list][*]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 red 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; 07 Jul 2004 at 15:03.
  #3  
Old 07 Jul 2004, 17:51
sabret00the's Avatar
sabret00the sabret00the is offline
 
Join Date: Jan 2003
Real name: sabe
nice work, i wanted something like this to go in my journal
__________________
UNDER CONSTRUCTION: Confessionary Hack

Make me a Hack of The Month author: GRPS: Groups Commune
make my hacks, they'll make you famous

unless it's a security concern, please do not pm/im me for support unless you're willing to pay.
  #4  
Old 16 Jul 2004, 17:24
Stan Melony Stan Melony is offline
 
Join Date: Jul 2004
Real name: Marten
I have problems understanding the instructions.

how can i make a template? where will i have to put it?
  #5  
Old 16 Jul 2004, 22:07
upnorth upnorth is offline
 
Join Date: Jul 2003
Non vB page

Any idea how I can get this working on a non-vB page? Would like to display this on my home page.

As well was wondering how hard it would be to convert this to a script that would display (again on a non-vB page) the events just for the current day?

I had both these when I was still on vB version 2.3.2 and it was a great way to show a canlendar and the current event on my home page but since I upgraded I'm not sure how to get this functionaliyt back?
  #6  
Old 19 Jul 2004, 09:52
Colin F's Avatar
Colin F Colin F is offline
 
Join Date: Jul 2004
Location: Switzerland
well you've got to include cal.php for sure, so have

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

near the top of that file. You might have to change that a bit if you're in a different folder than your vB installation.
The template still goes into your templates and will be called anyway.
And then write $smallcalendar where you want the calendar to be.
I think it should actually work...
__________________
  #7  
Old 19 Jul 2004, 20:45
upnorth upnorth is offline
 
Join Date: Jul 2003
Took your code and made a few changes and thinks its wiorking for me. See the attached file. I pull this into my home page using an ifame tag.

One thing thats happening that I'm not sure why is when I add a new event to my calendar it shows up in the vB forum calendar on the proper day but on the mini calendar one day early? any events that were in my forum before I updated to 3.0.3 show up on the proper day in the mini caneldar its just the new ones that are off by one day...any ideas?
Attached Files
File Type: php mini_calendar303_test.php (5.8 KB, 15 views)
  #8  
Old 24 Jul 2004, 09:43
Colin F's Avatar
Colin F Colin F is offline
 
Join Date: Jul 2004
Location: Switzerland
Hi upnorth

It seems what you did is simply include the template in the file

Do you have someplace I can see this problem? I can't get it to work here...
__________________
  #9  
Old 26 Jul 2004, 21:44
upnorth upnorth is offline
 
Join Date: Jul 2003
unfortunately I'm hosting behind a corp firewall.

Did you try running the code as is? Belive this page needs to be in the forums root to work so that it can find the following.

<?php
require_once('./global.php')
?>

which needs to be at the beginning of your html page.
  #10  
Old 27 Jul 2004, 15:57
upnorth upnorth is offline
 
Join Date: Jul 2003
Hey Colin did you have any luck with getting my file to run? Seems that all new events are showing up on my small calendar one day ahead of when they should. The main vB calendar is correct but say an event that shows on the vB calendar for tomorrow shows up on the mini calendar today. As well when you select the link on the mini calendar it dosn't pull up the event. I just get "there are no events to display". (I assume because of a date problem ...maybe the same one that has it off by one.) Any help would be appretiated. I'm currently at a loss and if I can't fix this I'll need to pull it from my site which I realy don't want to do as this is a cool hack
  #11  
Old 27 Jul 2004, 16:07
Colin F's Avatar
Colin F Colin F is offline
 
Join Date: Jul 2004
Location: Switzerland
Sorry I didn't get back to you sooner.

I uploaded your file to my site, but (unfortunatelly) everything worked. The events are on the right day and the links work...

I'm thinking it has something to do with your timezone. What timezone are you in?
__________________
  #12  
Old 27 Jul 2004, 18:58
upnorth upnorth is offline
 
Join Date: Jul 2003
Time zone that the forum is set on is (GMT –7:00) Mountain Time (US & Canada)

I took a look at the “event” table and it looks like data fields are filled in differently from the old events that were put in during version 2.3.2 and any new events that were put in after the upgrade. The differences are as follows.

Older events the “dateline_from” and “dateline_to” fields are filled in and 0 is in the “dateline” field. For the new events “dateline_from” is filled in and “dateline_to” is empty and “dateline” is filled in. Example can be found below.

Event / dateline_from / dateline_to / dateline
Old1 / 1090497600 / 1090501200 / empty
New1 / 1090972800 / 0 / 1090607909

Does this help at all? Any ideas?
  #13  
Old 27 Jul 2004, 19:37
Colin F's Avatar
Colin F Colin F is offline
 
Join Date: Jul 2004
Location: Switzerland
Ok, from the new one I know that dateline is when the event was entered. dateline_from is when it started.

On your old example, the dateline isn't filled in yet (I assume that's new) and the dateline_from and dateline_to are an hour apart.

You might try changing the date() functions to vbdate(), but I'm not sure if that would help
__________________
  #14  
Old 27 Jul 2004, 19:46
uReside.com uReside.com is offline
 
Join Date: Oct 2003
Real name: Jeff
Will this work for having a different calender for each subforum? Can you have it automatically add the calendar when you add a new sub forum? Because i want a calender for each sub forum but i'm planning on having around 5000 sub forums
  #15  
Old 27 Jul 2004, 20:13
Colin F's Avatar
Colin F Colin F is offline
 
Join Date: Jul 2004
Location: Switzerland
no, there's nothing in it to make calendars. But you can have different calendars
__________________
Closed Thread


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 04:44.

Layout Options | Width: Wide Color: