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 CommunityCustomizationCustomizing CalendarScript (Moderators: scott, DanO, Marty)Background colors and embedded links
Pages: [1]   Go Down
Print
Author Topic: Background colors and embedded links  (Read 286 times)
0 Members and 1 Guest are viewing this topic.
kerry
New Member
*

Karma: 0
Offline Offline

Posts: 0


WWW
« on: March 24, 2004, 04:18:00 PM »

Hello,

This is actually two separate questions that I hope I can get answers to.

1) I would like to change the background color of the individual days of a calendar, ie. 3/17 is green, 3/18 is red, etc.  These colors could be unique for each day of the year and not day of the week.  How do I do that?  I assume there is some file editing that needs to be done since I have not figured out a way to do it through the UI.

2)  I would like to have a link put in the calendar that when clicked on in the calendar, a separate window opens up going to the link as opposed to the description page of the event that is in CalendarScript.

Thanks for any and all help!
Kerry

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: March 24, 2004, 08:38:00 PM »

2. I believe that is covered in the previous forum message "Using pop-ups with default template".

1. If you know of or can formulate a mathematical formula based on the date to generate hex numbers appropriate for used in an HTML font tag or SSI code, it may be possible to edit the default.html template file to accomplish it. I've never heard of anyone attempting previously.

Dan O.

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

Logged
kerry
New Member
*

Karma: 0
Offline Offline

Posts: 0


WWW
« Reply #2 on: March 25, 2004, 10:19:00 AM »

Hey DanO,

What I have done on some web pages to get this color/date effect is to create an array for each day of the year, and assign it a color.  As there is no mathematical formula for determining the color and the color may change from year to year (the color I want for Feb 19, 2004 may be different from Feb 19, 2005), this brute force method is the only thing I came up with.  What I was wondering is if I take this Javascript array that I developed, is it possible to hook it in somehow to CalendarScript to give me the look I want?
An example of the array would be:
info = new Array(
//January 2004
/* 1/1 */ new dataSet( "#FFFFFF" ),
/* 1/2 */ new dataSet( "#FFFFFF" ),
/* 1/3 */ new dataSet( "#88CC88" ),
/* 1/4 */ new dataSet( "#FFFFFF" ),
/* 1/5 */ new dataSet( "#EE6666" ),
etc.

Logged
DanO
Moderator
Full Member
*****

Karma: 13
Offline Offline

Posts: 230

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


WWW
« Reply #3 on: March 25, 2004, 02:34:00 PM »

** I was wondering is if I take this Javascript array that I developed, is it possible to hook it in somehow to CalendarScript to give me the look I want? **

I have no idea if you'd be able to use that JavaScript code to do it but if you can convert that routine to Perl code, you may be able to incorporate that into the default.html template file to achieve the results you're looking for.

Alternately, you may be able to use your JavaScript code to change the colours of the table cells via CSS. I can't tell you how to go about it though.

Dan O.

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

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