First Day

1 view
Skip to first unread message

fun1450

unread,
Mar 4, 2010, 11:35:37 AM3/4/10
to Ajax Availability Calendar
Hi
First many thanks for this application. I think I'll use it "As it is"
except for the "First Day" of the week. I make a website to rent a
house or flat, and the beginning of the week is Saturday. So
Question : is it easy to modify the code and add Saturday ?

Thanks

cbolson

unread,
Mar 4, 2010, 1:40:11 PM3/4/10
to Ajax Availability Calendar
Hi there, I am glad that you might be able to use this calendar.

What you have requested is actually going to be part of the next
release (no date yet) as it is quite a common request.
My idea is to make it possbile to choose whichever day of the week you
like as the start day.

In the mean time... how are your php skills?
To to this will require you to open a couple of php files and modify
them with some new code.

1. Define start day.

You will have to hard code in the start day in the "ac-includes" >
"common.inc.php" file.

FInd this line and comment it out (by placing "//" at the beginning of
the line) - don't delete it as you might need it again in the future:

define("AC_START_DAY" , "".$row_config["start_day"]."");

and add this line after it:

define("AC_START_DAY", "6"); #
sunday=0,monday=1,tuesday=2,wednesday=3,thursday=4,friday=5,saturday=6

2. Modigy the php function that draws the calender.

Open the "ac-includes" > "functions.inc.php" file and, within the
draw_cal() function find these lines (used pastebin to make things
clearer):

http://ajaxavailabilitycalendar.pastebin.com/4vk5xEXL

And replace with the lines here:

http://ajaxavailabilitycalendar.pastebin.com/qzdRaY90


I hope you can follow those 2 steps.
Let me know how it goes, if you have any problems or if you need any
help :)

Chris

fun1450

unread,
Mar 4, 2010, 3:16:06 PM3/4/10
to Ajax Availability Calendar
Thanks for your fast answer. I try as soon as possible ( tomorrow ?)
and I report.
Yves
Reply all
Reply to author
Forward
0 new messages