23 Mar
Calendar plugin
IMPORTANT!: If you've downloaded the version 0.3 of this plugin from my site, please update to version 0.4 because there are some security issues with the original plugin!
For some time now, we're using the wp-cal plugin on Ochblog. It really is a great plugin, once you've got it working. To bad it's just a nightmare to get it working properly. I don't know how many adjustments I had to make to the code to get the thing going, but it finally works now. Since the original plugin writer seems kinda busy doin other things, it's now available for download here (version 0.4).
Installation
Upload the content of the zip filt to your plugin folder. Go and activate the plugin. Create a new WordPress page and add <!--cal--> to it. Open wp-content/plugins/wp-cal/js/cal.js and change line one to reflect your WordPress installation.
Example: If you have WordPress installed in www.site.com/blog then line 2 should look like this:
var baseurl = “/blog/wp-content/plugins/wp-cal”;
If WordPress is installed in the root this line does not need editing. Default is:
var baseurl = “/wp-content/plugins/wp-cal”;
March 23rd, 2007 at 4:56 pm
Dikke vette überw00t!
July 13th, 2007 at 10:33 am
Thank you so much for posting this along with your bugfixes
I've had a support request on the forum at Fahlstad for ages, and there are many other unanswered posts there.
Such a shame from someone who writes some damn good plugins just to vanish like that!
So, you've made a potentailly great plugin back into a great plugin! Thanks!
July 20th, 2007 at 2:03 am
This blog seems to be the only one with comments on how difficult it is to make the plugin working. I'm still working on it, but is a no go. Does your download zip file has the bugs fixed? because I followed the installation instructions but you seem to be missing what code we add to the page "Upload the content of the zip filt to your plugin folder. Go and activate the plugin. Create a new WordPress page and add" , but add what?. I added in the page code mode, but no calendar. I get only text. I am using wp 2.1. Could you help
July 20th, 2007 at 3:50 pm
@Karla:
Yup, there was something missing there allright, had to do with recent upgrade to Wordpress 2.2. Changed this, and now it should work fine. The files I provided fix the issues with not being able to add a description from non-Firefox browsers, and there are some minor changes done with the roles system to asure compatibility with future Wordpress versions.
July 21st, 2007 at 12:15 am
check te kalender page. There is the code as you can see. But nothing is displayed except tw small boxes. One for the calendar and one for the current event. Something is missing
The original plugin had a calendar and event display, but I could not edit or add events
Just downloaded and installed 10 minutes ago. Should be recent version yes. Did deinstall the previous version including all files and deleted the table in the database.
July 21st, 2007 at 1:31 am
Zoute. I could not believe my eyes : ) I was so happy. It worked. The way you re-wrote the instruccions made it a whole lot easier, not to mention the entire plugin is now functional. Thank you so very very much. I am a newbie to wordpress 1 month into it and it still amazes me how people are able to create such nice things. Way to go, I am glad you picked up where it was left off. wp 2.1 worked
July 21st, 2007 at 3:12 pm
@Hunter58:
Mijn fout, per ongeluk verkeerde bestanden online gezet. De oplossing:
1. open het bestand wp-content/plugins/wp-cal/js/cal.js
2. op regel 1 van dit bestand staat:
var baseurl = "http://www.ochblog.com/wp-content/plugins/wp-cal";
verander dit in:
var baseurl = "/wp-content/plugins/wp-cal";
en sla het bestand op.
Nu moet hij het doen, eventueel na een ctrl-F5. Werkt dit nog niet, dan even plugin opnieuw downloaden en installeren, ik heb nu wel de juiste bestanden online staan :D.
July 21st, 2007 at 5:23 pm
Aanpassen werkte niet. Ik heb de plugin maar helemaal verwijderd en ook de caltabel uit de database gesloopt. De pagina weg gegooid en op deze uitgangssituatie de plugin opnieuw geïnstalleerd en de activatiestappen doorlopen. Wel even de nieuwe bij jouw weg gehaald
Nu werkt alles als een zonnetje. Enig idee of er ook een NL versei komt? Of moet ik daar eens naar kijken?
July 21st, 2007 at 5:53 pm
Ik ben niet met een nl versie bezig, en denk ook niet dat ik daar mee bezig ga zijn. Ga dus vooral je gang, op zich is de plugin vrij makkelijk te vertalen.
August 7th, 2007 at 5:15 pm
I am having serious trouble styling the calendar on my site. As you can see here http://www.thecopelandfamily.org/fellowship/?page_id=9 it cuts off the descriptions, the edit/delete links do not work. I have tried a few CSS changes and ever a custom page template but nothing helps. Would it be possible to get the code you use for your calendar on this site? I really like the layout of it with the events box at the bottom and the overall sizing.
August 7th, 2007 at 6:17 pm
Collin,
Not sure if I quite understand your question, I don't see anything wich looks like this calendar plugin on the link you provided? The plugin I use is downloadable over here, like stated in the post above. Hope this is what you're looking for.
August 23rd, 2007 at 10:42 am
I have got the Calendar working and it is awesome, thanks!
The only question I have is if it is possible to either remove the start or end times(or not have to input anything in them), or change them so that the format is 12:00am to 12:00pm and not from 00:00 to 24:00.
Is there a way to do any of these things?
August 23rd, 2007 at 5:05 pm
They could be removed by editing the code, or not be mandatory. Don't know about the am/pm thing, I will have to look into that. I'll get back on this later.
August 23rd, 2007 at 6:34 pm
To not having to input start or end times, just open the wp-cal/js/cal.js file in a text editor, and delete the lines that say:
These lines can be found around line#63. Empty your cache, and it should work.
October 11th, 2007 at 1:50 am
It seems that now I am getting the error that the end time is earlier than the start time, let's say if the start time is 8:00 am and the end time is 2:00 pm. Any ideas how to change the code for this without messing up the rest of the functions?
October 11th, 2007 at 10:16 am
The code for checking if the end time is earlier than the start time is also in wp-cal/js/cal.js, and goes like
if( (s[0] > e[0]) || ((s[0] == e[0]) && (s[1] > e[1])) ){ $('enderror').innerHTML = "Error: End time is earlier then start time!" error = true; }Just delete these lines and check is gone.
November 15th, 2007 at 9:17 pm
I am getting the error "Fatal error: Call to undefined function cal_days_in_month() in /home/ackwwal7/public_html/durr/wp/wp-content/plugins/wp-cal/functions/cal.php on line 59"
I have changed line 1 to reflect the folder wp.
The todays events area shows up, but not the calendar.
I installed the original plug in. Got that error. Deleted it from my server after deactivating it. Found your fixes, uploaded and activated that. Made the cal.js change. Still get the error.
Any ideas?
thank you in advance.
November 17th, 2007 at 6:20 pm
Cherie, I'm having some problems with my computer right now, because of which I can't access these files myself right now. So I'll have to get back on this later, sorry.
November 23rd, 2007 at 8:00 pm
Cherie, after looking into it, I really can't figure out why it doesn't work. The cal_days_in_month() function is a native php function, available since php v4.0.7, could it be you have an older php version?
December 4th, 2007 at 6:28 pm
I am running php 5.0.5.
Zend is on.
Anything else that should be on that might not be?
December 4th, 2007 at 7:00 pm
Erh, is your php compiled with the --enable-calendar option?
(see the comments over here)
January 26th, 2008 at 12:13 am
A HUGE thank you for re-working the code. The new download worked perfectly!
By the way..I see that you have enable the calendar to use hyperlinks see the site below.
http://www.ochblog.com/events/
Could you please tell me how I can get the new code so I can insert hyperlinks in my calendar as well.
Thank you very very much and well done!
I really appreciate it.
-David
January 26th, 2008 at 12:29 pm
David, the event calendar at ochblog should be the same as the one available for download here, and I really can't remember altering the code of the plugin to enable hyperlinks. Are you sure you can't insert html hyperlinks into your calendar?
February 14th, 2008 at 12:14 am
Doing a search for WP-Cal I saw quite a few sites stating that WP-Cal contains a SQL Injection Vulnerability. Was this addressed when you fixed the script? Is this a serious issue and am I safe to install this on my site?
February 14th, 2008 at 5:04 pm
David: it is now ;). If you have downloaded the plugin before I posted this comment, please download it again. About the severity of this issue: I tried exploiting the bug on this site, and got a database error.
February 15th, 2008 at 8:27 am
I'm having two problems with wp-cal that I would be SO grateful if you could help me fix. (1)I cannot get the calendar to display. I know that several people posted to the WP help support pages who couldn't get the calendar to appear either, but the issue was never resolved. I would REALLY appreciate any help. I've downloaded your latest version of the plugin, and I've created the page with and added /blog/ to the file path in "cal.js". Can you think of anything else I might try? (2)when I click "wp-cal" on the options menu, I get a message saying "page not found". The url it tries to go to is: http://mydomain/blog/wp-admin/wp-cal/functions/options.php
It's right - this file isn't there, but I don't know how to have it look some place else. Am I missing something obvious? Thank you for any help you can provide. It's great of you to be spending your time on this.
February 20th, 2008 at 8:06 pm
I thought I had the calendar up and running great, but now when I go to edit an existing event I have problems.
a)Click on "edit" and resulting input fields are blank. I have to retype all the information.
b)After filling out new data and hitting "edit", calendar sends me to December 1969 says "Update successful"
c)Go to date and event ends up not updating at all, has old content.
February 20th, 2008 at 9:06 pm
David, I've found the same problem, and will be working on a fix for this later on (or at least try to work on it).
February 20th, 2008 at 9:59 pm
Ok, I've updated the zip file, there was a slight error in the editevent.php file, it's fixed.
March 7th, 2008 at 10:59 am
I have installed WordPress (v2.3.3) I can see the calender but cant add event into it. The app has created the table in the database. I have also dl the latest version om wp-cal on this site.
Does anyone have any? It seem it cant read and insert from the database.
I also get the header background image in the "titel" field when I try to add event.
Thanks
March 7th, 2008 at 11:13 am
OR is a problem with AJAX? I dont even get a error message when I hit the "add event" button without enter something in the titel, start or endtime fields.
March 20th, 2008 at 11:10 pm
Hey guys, great work on the plugin! Only thing that would make it the ultimate calendar plugin is if you can schedule a multi-day event that would put some kind of a colored bar across the days the event is going on.
So, let's say I'm gonna be in Orlando for 5 days... it would be cool if on those 5 days there would be a colored bar going across those days that says "orlando" or something like that as the event note.
Thanks!
- Trevor
March 22nd, 2008 at 3:04 pm
I find the problem! =)
March 24th, 2008 at 8:28 pm
It would be cool indeed Trevor, but I wouldn't know how to build that. All I did was fix some bugs in the code of this plugin :p.
March 26th, 2008 at 9:12 pm
Any idea to add it to your sidebar ?

March 29th, 2008 at 8:21 pm
Well, it can be done Vinnie.
May 8th, 2008 at 4:54 am
Thanks so much for your bugfixing! I tried installing the original plugin and couldn't get it to work right to save my life. Also comment #14 up there helped me save a lot of time digging through code to figure out where to cut out that time validation bit.
July 30th, 2008 at 10:47 pm
Is there any way to fix the width of the calendar days?
It would look much nicer if each day on the calendar was a set width.
August 5th, 2008 at 10:53 am
I would also like to say a huge thanks for fixing the code, good job
I would also like to agree with Rich on the idea of having fixed day widths, it would make the calendar much more visually appealing for sure!
Thanks again!
August 5th, 2008 at 8:34 pm
not getting the WP-Cal to work. am i doing something wrong?
August 8th, 2008 at 8:49 pm
Hi, I've been away for the holidays for a while, so some quick answers:
Rich/Lauren: to do this you could open the three css files in the /functions folder, and look for lines that go like
td.days{ height:70px;And add a widht argument here, so it goes like
td.days{ height:70px; width: 14%;brad: I wouldn't know, is it doing anything?