Changing the booking am and pm colors

Help with installation and general calendar setttings

Changing the booking am and pm colors

Postby nootkan » Sun Sep 26, 2010 4:27 am

I'm a little confused as to how to change the key colors for the booking am and booking pm states. The available state is gray, the booked is red, provisional (which I've deleted and not using) is orange and special is lime, so where is the color in the image for the other two? I also checked the css but didn't find any reference to the booking am or pm colors. What am I missing? :?
nootkan
 
Posts: 18
Joined: Sun Sep 19, 2010 1:41 am

Re: Changing the booking am and pm colors

Postby chris » Sun Sep 26, 2010 9:38 am

The "am" and "pm" states use the background image.
The positioning of this is defined in these classes:

Code: Select all
/* position background image for each state - adjust to your image */
.cal_month ul li.booked_am      {   background-position: 200px top;   }
.cal_month ul li.booked_pm      {   background-position: 230px top;   }



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

Re: Changing the booking am and pm colors

Postby nootkan » Sun Sep 26, 2010 7:30 pm

Not sure if this is supposed to be this difficult or not (probably just me) but it doesn't matter which position I put in (880,330,185,40) the color always shows as light gray. I am using the default image as I don't understand how you are doing this. Normally, I just use the background-color: #006699; syntax to define my backgrounds. Do I have to use the image for the backgrounds? I use the above syntax and achieve what I want but didn't want to cause any conflicts with your coding. So far I haven't seen any conflicts by using the background-color tag in my testing of the calendar.
nootkan
 
Posts: 18
Joined: Sun Sep 19, 2010 1:41 am

Re: Changing the booking am and pm colors

Postby chris » Sun Sep 26, 2010 7:44 pm

These "half" day states use a background image to create the diagonal effect.
The code that I placed there was simply the code to position the background image in the right place.
However, if you are just seeing grey either you have tested with values that put the image outside of the box or, more likely, the path to the image is wrong (this is defined at the top of the css file )

Can you show me an url so that I might be able to help better?

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

Re: Changing the booking am and pm colors

Postby nootkan » Sun Sep 26, 2010 8:01 pm

Okay I got it. I had to add the whole url to the site for the path instead of the path to the calendar only. Thanks for this calendar it will make my sportsfishing website more user friendly. Looking forward to some mods by those who are better at php than me. I seem to remember a post that explains how to remove the text box and previous/next arrows at the top as I don't need them I will only have one item. I will look for the post. Thanks again for your support Chris. A donation is on the way for this great availability calendar.
nootkan
 
Posts: 18
Joined: Sun Sep 19, 2010 1:41 am

Re: Changing the booking am and pm colors

Postby chris » Sun Sep 26, 2010 8:10 pm

Thanks for the donation - it is greatly appreciated (take note other forum users :D )

The text etc that you mention wanting to remove is in the main index file. You should find a block of code something like this:
Code: Select all
<!-- optional calendar change options -->
         <div id="cal_admin">
            <form method="get">
            <select name="id_item" class="select" onchange="this.form.submit();">
               '.sel_list_items($_REQUEST["id_item"]).'
            </select>
            <select name="lang" class="select" onchange="this.form.submit();">
                  '.$list_languages_web.'
               </select>
            </form>
         </div>
         <!-- end options -->

You can remove all that quite safely ;)

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

Re: Changing the booking am and pm colors

Postby nootkan » Sun Sep 26, 2010 8:41 pm

Chris, I found the post that states what you just posted and commented the code out. I had to create blank images however to remove the arrows as just commenting them out changed the layout of the calendar. Thanks again.
nootkan
 
Posts: 18
Joined: Sun Sep 19, 2010 1:41 am

Re: Changing the booking am and pm colors

Postby chris » Mon Sep 27, 2010 9:36 am

The arrows are also a fundemental part of the calendar code and especially the JavaScript.
I am suprised that by removing them messes up the layout but I would not be surprised if without them you got JavaScript errors. To remove them completely you would alos need to modify the JavaScript file.

Anyway, you have found a way round your problem. :)

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


Return to Support

Who is online

Users browsing this forum: No registered users and 2 guests

cron