VERSION 1.1 RELEASED!
Changes: Added (by popular demand) Event deletion!
Ok… I have finally got this script working!
I have not done it like a tutorial because it is just too big, so here are a load of screen shots, There is a link to a fully functional demo and zip at the bottom!
A little setup information:
1. Copy the entire calendar into whatever directory you want.
2. Create your database and import the ‘databaseSQL.sql’ file into it, this will create the default data for running it.
3. Alter the ‘databaseConnection.php’ file to show your connection details.That should be it..
NOTE:By default the username and password are both ‘admin‘ (without the quotes), i suggest you change your password in the control panel.
If you have any problems i will be happy to help, just post your query as a comment to this page.
Screen Shots
Default View

View Events

View Events 2

Login

Control Panel

Add Event

Add Event 2

Downloads

Hi,
I downloaded and uploaded mysqlCalendar zip file in root directory of my website but only the default page worked. The view, add and control panel pages didnt work. What could be the problem?
i am really impressed with your code, Thanks a lot
You are really Great
Thanks again
This code more good
my in prodution perfect!
// Show the calendar.
for($i=0; $i<date("t", $thisDate); $i++)
{
$thisDay = ($i + 1);
if(($month == 0) || ($year == 0)) {
$finalDate = mktime(0, 0, 0, date("m"), $thisDay, date("Y"));
$today = mktime(0, 0, 0, date("m"), date("d"), date("Y"));
$fdf = mktime(0, 0, 0, date("m"), 1, date("Y"));
$month = date("m");
$year = date("Y");
} else {
$finalDate = mktime(0, 0, 0, $month, $thisDay, $year);
$today = mktime(0, 0, 0, date("m"), date("d"), date("Y"));
$fdf = mktime(0, 0, 0, $month, 1, $year);
}
As I show you with the code above, you fix the problem of not showing today after changing the month
Would like to download the “Add Event 2″ calendar…
Do you have any examples of what this calendar looks like in use?
Thanks!
Danielle
hi.when i refresh the page total event colors are gone.i want event colors(Red) even after page is refreshed.pls help me.
New to all this so be patient please…Try to log on but it says:
Warning: Cannot modify header information – headers already sent by (output started at //////databaseConnection.php:1) in //////index.php on line 21
How do I log on ?
Thanks
I installed the calendar to folder on my client’s site, changed the values in the databaseConnections.php file, created the database, and imported the SQL file. but when I got to the URL (casadeamor.pjcii.net/cal) – I get a blank page. Any ideas?
Hey it’s working great, and really easy. But there’s just one thing…there are 4 years in it 2006 to 2009. How can i change it? because it’s 2011 now.
Thanks!
hie,
I have a problem with your code. i follow steps but when I open the index.php, show me this:Notice: Undefined variable: tTop in rpc.php on line 172. where I need define this variable?
thanks!
PD:sorry for english but it’s not very good xD
please add
$tTop = “”; in the top page or isset()?
how to remove password req?
how to display all events on one page.
is this a dead project?
So good.. It works perfectly!…
Dear Jamie,
I would like to add a new mysql field besides body, but everything i tried does not work
Can you help me ?
Do you have teh coding ?
Thanks
Regards
Peter
Netherlands
Hi, I would like to congratulate you for the code, but I have a question, how can I register a new User without the permission to delete events?
Thanks
Filipe
Brazil
Hi! please help me i have error: “Notice: Undefined index: action in C:\xampp\htdocs\mysqlCalendar_1_2\index.php on line 4″.que hago para comenzar a utilizarlo?
I do to get started?
set code in line error
$variable = isset($variable)?$variable:”;
or
test in the top page $variable = ”;
Please help me, I encounter the problems, how to solve:
! ) Notice: Undefined index: action in C:\wamp\www\mysqlCalendar\index.php on line 4
Call Stack
# Time Memory Function Location
1 0.0006 391448 {main}( ) ..\index.php:0
( ! ) Notice: Undefined index: nodstrumCalendarV2 in C:\wamp\www\mysqlCalendar\rpc.php on line 89
Call Stack
# Time Memory Function Location
1 0.0039 438536 {main}( ) ..\rpc.php:0
Login
Mon
Tue
Wed
Thur
Fri
Sat
Sun
( ! ) Notice: Undefined index: nodstrumCalendarV2 in C:\wamp\www\mysqlCalendar\rpc.php on line 143
Call Stack
# Time Memory Function Location
1 0.0039 438536 {main}( ) ..\rpc.php:0
( ! ) Notice: Undefined variable: tTop in C:\wamp\www\mysqlCalendar\rpc.php on line 172
Call Stack
# Time Memory Function Location
1 0.0039 438536 {main}( ) ..\rpc.php:0
1
( ! ) Notice: Undefined index: nodstrumCalendarV2 in C:\wamp\www\mysqlCalendar\rpc.php on line 143
Call Stack
# Time Memory Function Location
1 0.0039 438536 {main}( ) ..\rpc.php:0
( ! ) Notice: Undefined variable: tTop in C:\wamp\www\mysqlCalendar\rpc.php on line 172
Call Stack
# Time Memory Function Location
1 0.0039 438536 {main}( ) ..\rpc.php:0
o meu esta aparecendo todo desconfiguro, teria como alguem me ajudar por favor?
Bruna o que desconfigurou, uso este calendário também.
Existem alguns ajustes que devem ser realizados pois quando foi desenvolvido provalvelmente em php 5.2
As minhas dicas são: verificas as tags de <? papa <?php
usar $variavel = isset($vatriavel)?$vatriavel:''; // se não estiver setada fica vazia.
Este é um do melhores calendários de eventos que já vi, até adaptei em um sistema onde cadas usuário tinha seu evento.
my tips to correct some problems encountered
line 4 -> $action = isset($_POST['action'])?$_POST['action']:”;
line 89 rpc.php -> if(isset($_COOKIE['nodstrumCalendarV2']))
line 143 rpc.php – > if(isset($_COOKIE['nodstrumCalendarV2']))
line 172 insert code +- line 4 -> $tTop = isset($tTop)? $tTop:”;
I hope it helps
Gilberto, desculpe o incomodo, mas se tivesse como voce me passar algum contato para q possa explicar melhor o meu problema, ficaria grata.
clique no meu nome e use o formulário de contato do site.
Hello,
I have a problem with this scrip : i didn’t have the buttom “add event”
Could you help me ?
Thanks and sorry if my english is not perfect.
plz send the code in java jsp servlet
The Download for the demo is not working.
his dudeness, it works like a charm, just one thing, it’s possible to change the days’ name? ‘cos i speack portuguese so ‘Tue’ here is ‘Ter’ ok. so it’s possible to change its names? thanks.
his dudeness, my fault,rsrs, silly question, but a thought one, lol, i’´m using jquery in other parts of mu web page, so when i use this script, error and conflicts between jquery and Prototype, so, how can i handle this? or does anybody of your guys have some jquery version of this calendar? thanks
No conflict?
search google no conflict jquery
Aqui eu coloquei uma versão personalizada em porturgues para php 5.3
Thanks for the script, excellent work! Just one comment, how do you change the years as it is obviously 2011 now, thanks in advance.
Script was working great. Moved to new Windows server with php mysql. Everything working great except I can’t post a new event. Get javascript error (invalid argument line 96). Here is the kicker. It works great posting from my computer. Every other computer I try I get the error. Please help.
this problem is CASE SENSITIVE?
What is that supposed to tell me, that a variable name is not named correctly?
Stan
I would like to know how integrate this wonderfull calendar in a page of my website ?
please help me.
I’ve uploaded the .sql and can see the calendar on my website, but when I enter the default user and pass (admin) it comes up saying “Your username or password was incorrect”
Is the default details different? Also how can I change the date to 2011? or 2012?
I can log in now. Also, I’ve found out how to change the date to 2011 e.t.c. (if you haven’t already)
Go about a quarter down the page on “rpc.php”, after the comment saying “Change the name in here to your language” A few lines down, look for “$yStart = 2006;” Just change that to the year you want to start with and refresh your page. Done and all the dates have been updated.
Happy Xmas
hi, can you help me? i try to chanche de year in the calendar please.
Hi !
Thank you very much for this amazing calendar witch work very well. But I’ve got a problem with Safari (windows).
The ajax request doesn’t work on this navigator, how can I fix it ? Thanks
Instead of entering each event for each day, is there a way to upload data directly to MySQL db? I have a problem with the Date field. Anyone know of any workarounds?
Thank you very much!!
It works perfectly!!
[...] http://www.nodstrum.com/2007/06/27/mysql-calendar/ [...]
The pleasantest things in the world are pleasant thoughts: and the great art of life is to have as many of them as possible. -Montaigne
For anyone who wants to change the years that are available, open up rpc.php and find this line:
$yStart = 2006;
Change it to:
$yStart = date(‘Y’);
This will ensure that the first year available is the current year. You can also change how far into the future by changing the number on the line below it.