Calendar Links

KSclans

New Member
Messages
197
Reaction score
0
Points
0
I have a calendar, have days on it, and I want to create links for each day, but I do not manually add each link for everyday... so how can i create something so that day 1 will go to day 1 page, 2 will go to 2, without I adding the links to each one of them ?
 

vol7ron

New Member
Messages
434
Reaction score
0
Points
0
depends on how the calendar is created. you can do this at creation time with a server side script, or after page load using Javascript
 

KSclans

New Member
Messages
197
Reaction score
0
Points
0
I find this http://keithdevens.com/software/php_calendar

he say
HTML:
$days is an optional array that can contain information you want to specify for each day, including a location to link that day to, a stylesheet class for that day, and any content you want to appear for that day of the calendar. For example, an array passed for the days parameter might look something like this:
<?php 
$days = array( 
    2=>array('/weblog/archive/2004/Jan/02','linked-day'), 
    3=>array('/weblog/archive/2004/Jan/03','linked-day'), 
    8=>array('/weblog/archive/2004/Jan/08','linked-day'), 
    22=>array('/weblog/archive/2004/Jan/22','linked-day'), 
); 
?>
</SPAN>
Is it possible to just use some kind of array function to add all the links to the calendar ? without using java...
 

vol7ron

New Member
Messages
434
Reaction score
0
Points
0
If that's the software you using, that snippet of code you posted will work.

Just replace /weblog/archive/2004/Jan/22 with your page
 

KSclans

New Member
Messages
197
Reaction score
0
Points
0
............ I asking, are there a way that will automatically add all the links, like jan 1 go jan 1 , 2 to 2, 3 to 3, I not going to add all the links for a year...or years... so i want to see if there is a script that will automatically set links for ALL days...
 

lemurina

New Member
Messages
25
Reaction score
0
Points
0
Hmm.. There might be a problem.. You need a script that changes a script?
I can't help you until you show me your calender script and then maybe I can help you :)
 

xmakina

New Member
Messages
264
Reaction score
0
Points
0
There is. Use PHP with a For or Do loop and just run from 1st to last day of the month.
 

vol7ron

New Member
Messages
434
Reaction score
0
Points
0
The problem in understanding is that you gave an example of optional links. Now I think you're saying that you don't want optional, you want guaranteed for the particular day?

If that's true you don't need a loop. There is already one when the calendar is created. Instead, go into the creation code of the calendar and change the html there where the day is placed.

You'll have two variables there that are important: the month and day. Wherever the day is placed, just wrap it in an anchor tag and set the month and day to the link there.
 
Top