Welcome, Guest. Please login or register.
Did you miss your activation email?


Login with username, password and session length

Search

 
Advanced search

8043 Posts in 1856 Topics- by 2099 Members - Latest Member: roi
Calendar Script CommunityEverything ElseGeneral Use (Moderators: scott, DanO, Marty)Weekend and Holidays Grid Colour
Pages: [1]   Go Down
Print
Author Topic: Weekend and Holidays Grid Colour  (Read 461 times)
0 Members and 1 Guest are viewing this topic.
Herman
Guest
« on: April 11, 2006, 02:30:00 PM »

Hi All.

First of all thanks for this great product.
As I'm new to all of this coding and recoding but to tell you the thruth, I love it.

The updates I did to my calendar so far are:
1) Different title text colours;
2) Added the Icons display;
3) Added the full year with dayspan;
4) Added the one click event entry;
5) Added "At a Glance" timebar;

So far everything is working perfectly.
What I can't figure out however is how to have the weekends and public holidays marked with different grid colours.

I would really appreciate your thoughts and help in this matter.

Logged
DanO
Moderator
Full Member
*****

Karma: 13
Offline Offline

Posts: 230

Please don't PM me. Post in the open forum.


WWW
« Reply #1 on: April 11, 2006, 10:06:00 PM »

** I can't figure out however is how to have the weekends and public holidays marked with different grid colours. **

I don't know about 'public holidays' but the days can probably be coloured differently using a conditional on the day of the week (0-6) determined with the $COL variable in the grid part of the template.

I don't know the exact code to use but it would likely need to be placed just shortly after the line <%FOREACH GRID ROW%> in the default.html template file. Although not exactly what you're looking for, maybe the mod at the following link will give you some ideas how to create it?

LINK > Wider cells for weekend days???

Dan O.

------------------

Logged
musicvid
New Member
*

Karma: 1
Offline Offline

Posts: 8


WWW
« Reply #2 on: April 11, 2006, 11:47:00 PM »

Herman,
I noticed that the holidays lists I imported all contain the text 'US' which does not occur in any of my normally posted events. Therefore, you could use the inclusion or exclusion of that text as a conditional.

There may be other inclusions or exclusions in fields from imported event lists that differ from regular events (such as a required field,       hint) that could form the basis for a completely reliable conditional, as DanO has alluded to.

Although not totally applicable to your situation, here is how I prevent holidays and unconfirmed events from appearing in my public rss feed template (the custom field event_type is a required field):

<% next if ($EVENT->{'details'}->{'event_type'} eq "") | | ($EVENT->{'details'}->{'event_type'} eq "Reserved"); %>

Good luck exploring!

[This message has been edited by musicvid (edited April 12, 2006).]

Logged
Herman
Guest
« Reply #3 on: April 12, 2006, 03:04:00 AM »

Thanks Dan.

I started to work on your tip and I did the following:

When you have a calendar with the ATAGLANCE adition working,
I updated the coding from:

<!-- BEGIN ATAGLANCE ADDITION TWO -->
<table border=0 width=100% height=100%><tr><td valign=top>
<!-- END ATAGLANCE ADDITION TWO -->

to

<!-- BEGIN ATAGLANCE ADDITION TWO -->
<table border=0 width=100% height=100% bgcolor="<%=(($COL == 5 | | $COL == 6 )?"#dddddd":"")%>"><tr><td valign=top>
<!-- END ATAGLANCE ADDITION TWO -->

Providing you have the Saturday and the Sunday as column 5 and 6.

It works fine. Now I only have to find a solution for the holidays. Thanks.

Thanks MusicVid. I think that your suggestion for the holidays is worthwhile to look further into.

Thanks both of you.

Logged
Herman
Guest
« Reply #4 on: April 12, 2006, 03:29:00 AM »

Thanks both of you for your responds. !!
Logged
DanO
Moderator
Full Member
*****

Karma: 13
Offline Offline

Posts: 230

Please don't PM me. Post in the open forum.


WWW
« Reply #5 on: April 12, 2006, 12:21:00 PM »

** bgcolor="<%=(($COL == 5 | | $COL == 6 )?"#dddddd":"")%>"> **

You really should put some colour designation in that tag between the "" and not leave it blank. Some browsers may display unexpected results otherwise.

JMO

Dan O.

------------------

Logged
Pages: [1]   Go Up
Print
Jump to: