Easy PHP Calendar - We really take care of your dates!


Go Back   Easy PHP Calendar > General Discussion > General Support

General Support Questions about using the Easy PHP Calendar. (Not installation or customizations)

Closed Thread
 
Thread Tools Search this Thread Display Modes

Day with custom link or url
Old 02-13-2005, 04:31 AM   #1
rod
Calendar User
 
rod is offline
Join Date: Feb 2005
Posts: 2
Default Day with custom link or url

Can I configure escal to create a custom link for each date shown?

For example, I would like the user to click on a day and go to that day's weather summary. This will require a link that passes the date info to the custom link. I don't want to do this with a popup, but a straight link to another web page.
 

Old 02-13-2005, 08:01 AM   #2
Dave G
Calendar User
 
Dave G is offline
Join Date: Oct 2004
Posts: 14
Default

[Post Removed]
 

Old 02-13-2005, 09:26 AM   #3
Brian
EPC Developer
 
Brian's Avatar
 
Brian is offline
Join Date: Jun 2001
Location: Florida, USA
Posts: 10,906
Default

Quote:
Let me know if you'd like the file.
Please don't pass around a file as this would be against the licensing agreement.

But, feel free to post the section of code that was modified to perform this task.
__________________
-- Brian

Questions?

Instructions | FAQs | Errors FAQ | Forums | Support
| Web Site Hosting
 

Old 02-13-2005, 01:56 PM   #4
Dave G
Calendar User
 
Dave G is offline
Join Date: Oct 2004
Posts: 14
Default

Sorry Brian - but you could have just removed the wording and not the whole post

Anyway, took me a while to remember exactly what I did as I made the change over 2 months ago and didn't take notes, so I've had to take a good look again.

2 things need to be done - change the display of the day numbers from plain text to "a href" elements and to provide the target of those hrefs with the day value, aswell as the month and year value.

How I did it was to modify 2 sections of the code in functions/escal.php as follows:

Find:
Code:
echo " title=\"$et[$daycount]\" onClick=\"popupEvent($daycount,$popupWidth,$popupHeight)\" style=\"cursor:hand;\"";} } echo ">$cd</td>\n";$daycount++;$cd++;}
Replace with:
Code:
 echo " title=\"$et[$daycount]\" onClick=\"window.location.href='$thisFile?mo=$mo&amp;yr=$yr&amp;day=$cd'\" style=\"cursor:hand;\"";} } echo "><a class='today' href='$thisFile?mo=$mo&amp;yr=$yr&amp;day=$cd'>$cd</a></div>\n";$daycount++;$cd++;}
Find:
Code:
 echo " title=\"$et[$daycount]\" onClick=\"popupEvent($daycount,$popupWidth,$popupHeight)\" style=\"cursor:pointer;cursor:hand;\"";} } echo ">$cd</td>\n";$daycount++;}
Replace with:
Code:
echo " title=\"$et[$daycount]\" onClick=\"window.location.href='$thisFile?mo=$mo&amp;yr=$yr&amp;day=$cd'\" style=\"cursor:pointer;cursor:hand;\"";} }
 echo "><a class='s2$bgc[$daycount]' href='$thisFile?mo=$mo&amp;yr=$yr&amp;day=$cd'>$cd</a></div>\n";$daycount++;}
NB: I had an issue with the way the $thisFile value was being presented by the code and couldn't work around it so had to hard code my domain into the links. Be aware of that if you have problems - replace the $thisFile values with http://yourdomain.com$thisFile.
 

Old 02-13-2005, 08:00 PM   #5
Brian
EPC Developer
 
Brian's Avatar
 
Brian is offline
Join Date: Jun 2001
Location: Florida, USA
Posts: 10,906
Default

Quote:
Originally Posted by Dave G
Sorry Brian - but you could have just removed the wording and not the whole post
Actually, I didn't mean to remove the whole post . I rolled out of bed this morning to check the forums and answer any questions, all-the-while rushing to get ready to go out of town for the day... and I accidentally removed all of the text from your post and couldn't get it back.

Thanks for posting the follow-up!
__________________
-- Brian

Questions?

Instructions | FAQs | Errors FAQ | Forums | Support
| Web Site Hosting
 

Old 02-14-2005, 12:49 AM   #6
rod
Calendar User
 
rod is offline
Join Date: Feb 2005
Posts: 2
Default

Thanks Dave!
 
Closed Thread

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Canonical URL Issue david_osborne General Support 1 10-08-2004 03:33 PM
How can I link from event day with no popup aemilius General Support 6 07-15-2004 11:23 AM
url link on calendar Bullet General Support 6 04-14-2004 11:54 AM
Full URL in Calendar cmams General Support 2 03-03-2004 03:29 PM



All times are GMT -4. The time now is 06:04 AM.


vBulletin skins developed by: eXtremepixels
Powered by vBulletin® Version 3.8.4
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.
Copyright 2009 NashTech, Inc.

| Home | Register | Today's Posts | Search | New Posts |