Allowing everyone to "book"

Help with installation and general calendar setttings

Allowing everyone to "book"

Postby Napbree » Tue May 25, 2010 4:07 pm

Hey,

I saw in the FAQ that there is a post to allow anyone to book, however it isn't loading (old link?). I would like to knowhow to do this, I'm fairly experienced with PHP but haven't got a lot of time to go crawling through the code.

I can add other variables to it to fetch the username session so i can track who booked it, etc. I'm thinking of expanding it a little so people can add notes as well. Not too sure yet.

Great work on this though, this is exactly what I need. And for once, a nice UI + nice interaction with js, all other calendars are 1950's styled. +10000 for it being free by the way, may send a donation your way :)

Thanks,

Nathan
Napbree
 
Posts: 6
Joined: Tue May 25, 2010 4:03 pm

Re: Allowing everyone to "book"

Postby chris » Tue May 25, 2010 5:12 pm

Hi,
Thanks for the comments.
Actually this script doesn't include any "booking" features. It's basic design is simply to be an "availability" calendar.

That said, it can be easily incoroporated into an existing (or new) bookings form by "activating" the calendar dates in the public version and sending the dates clicked to the booking form.

To do this, just follow the steps in this thread

Let me know if this isn't actually what you referring to.

Chris
User avatar
chris
Site Admin
 
Posts: 1089
Joined: Mon Dec 17, 2007 7:42 pm
Location: Málaga, Spain

Re: Allowing everyone to "book"

Postby Napbree » Tue May 25, 2010 6:48 pm

Hey, thanks for the rapid reply.

Basically, i want to be able to do the same (for the moment) as the admin panels booking page (e.g. where you click on a date and it "books" it, but i want guests to be able to do this, not submit it via a form or w/e. Just exactly the same as the admin panel but without the dependencies of having to login to the admin panel to do this. Because my site has it's own login system and i kinda wanna route it away from this to make it as easy to use as possible.

So basically for now I want to be able to do the same as the admin panel booking section (click to book) on another page

But I plan on adding more features when i get this bit working (e.g. if they hold ctrl and click then it will popup a form to enter a note) and a linear version (this is easy).

Thanks

Nathan
Napbree
 
Posts: 6
Joined: Tue May 25, 2010 4:03 pm

Re: Allowing everyone to "book"

Postby chris » Tue May 25, 2010 7:04 pm

OK, so basically you need to use the full admin javascript file rather than the "public" one.

You will note that the public versin uses this file:
mootools-cal-public.js

changing it this this one should add the functionality:
mootools-cal-admin.js

Another thing to note is that the ajax file that updates the dates states has a control in it to only allow updates by "registered" admin users - it checks this by checking that a certain session value exists (can't remember which right now) - you will need to change this for one of "your" session values.

Chris
User avatar
chris
Site Admin
 
Posts: 1089
Joined: Mon Dec 17, 2007 7:42 pm
Location: Málaga, Spain

Re: Allowing everyone to "book"

Postby Napbree » Tue May 25, 2010 8:23 pm

Hey,

I changed the contents of the public one to the admin one and set all $admin_only variables to false. Still no go - even removed the if statement for the admin only just to make sure. Not working.

Any ideas?
Napbree
 
Posts: 6
Joined: Tue May 25, 2010 4:03 pm

Re: Allowing everyone to "book"

Postby chris » Tue May 25, 2010 8:26 pm

Can you show me an url? (pm if you prefer)
It is pretty near impossible to know what is going on without seeing "something"

Chris
User avatar
chris
Site Admin
 
Posts: 1089
Joined: Mon Dec 17, 2007 7:42 pm
Location: Málaga, Spain

Re: Allowing everyone to "book"

Postby Napbree » Tue May 25, 2010 8:32 pm

It's all local and I don't have access to ftp at this present time, I can move it to a dropbox file - public but you can't execute.. There's no passwords or anything in there that need to be hidden so it's no problem to do that..
Napbree
 
Posts: 6
Joined: Tue May 25, 2010 4:03 pm

Re: Allowing everyone to "book"

Postby chris » Tue May 25, 2010 8:48 pm

Sorry, I have not got time to recreate your enviroment....

Are you getting any errors?
If so, javascript or php and what are they?
Are the dates even clickable once you change the javascript file?
Is the ajax file getting called?

Chris
User avatar
chris
Site Admin
 
Posts: 1089
Joined: Mon Dec 17, 2007 7:42 pm
Location: Málaga, Spain

Re: Allowing everyone to "book"

Postby Napbree » Tue May 25, 2010 8:51 pm

There are no errors

They are clickable, already highlighted will change colour, however the ones that aren't highlighted are still clickable but nothing happens, even if I add a die() or a echo in the ajax files no message is returned.

I'm not sure if the file is actually getting called.
Napbree
 
Posts: 6
Joined: Tue May 25, 2010 4:03 pm

Re: Allowing everyone to "book"

Postby Napbree » Tue May 25, 2010 8:56 pm

I fixed it,

I needed to transfer the js variables from the admin booking .php file. And replace them with the original ones.

Thanks for your help,

Sorted it out now.

I can provide a guide on how to do it for other users if you want? :)
Napbree
 
Posts: 6
Joined: Tue May 25, 2010 4:03 pm


Return to Support

Who is online

Users browsing this forum: No registered users and 1 guest

cron