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 CommunityCustomizationHacks and Mods (Moderators: scott, DanO, Marty)Add name of Day to datestring in Event View
Pages: [1] 2   Go Down
Print
Author Topic: Add name of Day to datestring in Event View  (Read 1052 times)
0 Members and 1 Guest are viewing this topic.
Steve
New Member
*

Karma: 0
Offline Offline

Posts: 0

photographer


WWW
« on: February 03, 2003, 01:59:00 PM »

I have succesfully entered the mods (thanks for all the work that is shown in the archives!) to place the time and date on the event page.

However, I'd also like to add the day name to the date string. In other words, I'd like Feburay 3, 2003 to read:

Monday, Feburary 3, 2003.

Any suggestions?

--Steve

Logged
wderzawiec
New Member
*

Karma: 0
Offline Offline

Posts: 15

Web site coordinator


WWW
« Reply #1 on: November 25, 2004, 12:37:00 PM »

I'd like to know this too.  Anyone?
Logged
DanO
Moderator
Full Member
*****

Karma: 13
Offline Offline

Posts: 230

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


WWW
« Reply #2 on: November 25, 2004, 03:42:00 PM »

The answer will likely depend on the exact code being used (which we don't know). A simple way may be to just pass it along with the date string information in the link to the Event View page.

Dan O.

[This message has been edited by DanO (edited November 25, 2004).]

Logged
wderzawiec
New Member
*

Karma: 0
Offline Offline

Posts: 15

Web site coordinator


WWW
« Reply #3 on: November 25, 2004, 08:56:00 PM »

I'm sorry, I'm not sure what you mean by "exact code."  I was able to make the event date appear on the event page by using TubaDave's post of May 3, 2002, found here: http://www.calendarscript.com/support/forum/Forum4/HTML/000169.html

How would I pass the day name to the date string?

The code I am using for the link to the Event View page is: <A HREF="<%=$CGI_URL_QUERYSTRING%>view=Event&event_id=<%= EVENT FIELD(id) %>&datestring=<%=$DAY->{datestring}%>" CLASS="gridtext"><%= EVENT FIELD(title) %></A><BR>

How would I modify this to include the day name?  Thanks,

W

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

Logged
DanO
Moderator
Full Member
*****

Karma: 13
Offline Offline

Posts: 230

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


WWW
« Reply #4 on: November 26, 2004, 04:13:00 PM »

The weekday name should be available in the calendar grids with the $DAY->{dayname} variable. If you modified the link you're using by adding the following to it:

&dayname=<%= $DAY->{dayname} %>

That information should then be available for printing in the template using a tag like:

<%= $in{dayname} %>

Dan O.

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

Logged
wderzawiec
New Member
*

Karma: 0
Offline Offline

Posts: 15

Web site coordinator


WWW
« Reply #5 on: November 26, 2004, 07:04:00 PM »

Wonderful!  Thanks so much --

w

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

Logged
DanO
Moderator
Full Member
*****

Karma: 13
Offline Offline

Posts: 230

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


WWW
« Reply #6 on: November 26, 2004, 09:30:00 PM »

Did it work for you?

Dan O.

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

Logged
wderzawiec
New Member
*

Karma: 0
Offline Offline

Posts: 15

Web site coordinator


WWW
« Reply #7 on: November 26, 2004, 10:03:00 PM »

Yes, thanks!

w

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

Logged
DanO
Moderator
Full Member
*****

Karma: 13
Offline Offline

Posts: 230

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


WWW
« Reply #8 on: November 27, 2004, 08:10:00 PM »

Glad to hear it.

Dan O.

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

Logged
musicvid
New Member
*

Karma: 1
Offline Offline

Posts: 8


WWW
« Reply #9 on: December 05, 2004, 11:53:00 AM »

Thanks, Dan!
Simply brilliant. I've been looking for one like this for a long time.

I had to use a tag like this to keep the static dayname from being displayed (passed back in the URL) in Month View when returning via link from a Day or Event View page.

<% if ($VIEW eq "Day" | | $VIEW eq "Event") {%><%= $in{dayname} %><%}%>

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

[This message has been edited by musicvid (edited December 05, 2004).]

Logged
DanO
Moderator
Full Member
*****

Karma: 13
Offline Offline

Posts: 230

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


WWW
« Reply #10 on: December 05, 2004, 02:24:00 PM »

** I had to use a tag like this to keep the static dayname from being displayed in Month View **

I believe the original question was about modifying the 'Event View' screen so if used just in the Event View part of the template, it shouldn't affect any other displays.

    BTW. "dayname" is probably a bad variable name to use for the passed information as it is already a variable used by the calendar. It might be a better idea to use something different like the following so it doesn't over write an existing calendar variable value. Eg.

&thisdayname=<%= $DAY->{dayname} %>

That information should then be available for printing in the template using a tag like:

<%= $in{thisdayname} %>

But you can make up a variable name for yourself which is sure not to be used by CalendarScript otherwise. Maybe "danodayname" ?    

This part "$DAY->{dayname}" must remain as it is!

JFYI

Dan O.

[This message has been edited by DanO (edited December 05, 2004).]

Logged
musicvid
New Member
*

Karma: 1
Offline Offline

Posts: 8


WWW
« Reply #11 on: December 05, 2004, 06:53:00 PM »

"...if used just in the Event View part of the template, it shouldn't affect any other displays."

Unfortunately, any linkback to Month View from Event View carries &dayname=Tuesday or the like in the URL. Dunno why.

"..."dayname" is probably a bad variable name to use for the passed information as it is already a variable used by the calendar."

Ok, "danodayname" it is!

Thanks again for all your help to us scriptually challenged.

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

Logged
DanO
Moderator
Full Member
*****

Karma: 13
Offline Offline

Posts: 230

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


WWW
« Reply #12 on: December 05, 2004, 08:33:00 PM »

** Unfortunately, any linkback to Month View from Event View carries &dayname=Tuesday or the like in the URL. **

That is true but I don't see anywhere else in the default.html template file where $in{dayname} is used to make it visible to users. If you've only added the <%= $in{dayname} %> inside the Event View section, I don't see how it would be displayed anywhere else for users to see.

** any linkback to Month View carries... Dunno why. **

Because CalendarScript is designed to build onto the previous query string for the next time it is used.

JFYI

Dan O.

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

Logged
musicvid
New Member
*

Karma: 1
Offline Offline

Posts: 8


WWW
« Reply #13 on: December 06, 2004, 12:06:00 AM »

Ahh, I see the point of confusion. I'm using the Doublecal template and inserting the dayname after $title_tag and before $month_name. Apples and oranges, I should have mentioned it earlier.

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

[This message has been edited by musicvid (edited December 06, 2004).]

Logged
Geoffrey
New Member
*

Karma: 0
Offline Offline

Posts: 0

Bridge Engineer


WWW
« Reply #14 on: January 16, 2005, 08:50:00 PM »

I have gotten the events popup to print out the day name when linked from the calendar in either list view or grid view.   However, I have not been able to get it to work when linked from the Search Results.

I have tried adding the &thisdayname=<%= $DAY->{dayname} %> to the <A HREF> tag in the Search View section of the default.html, but alas, no joy.

Any ideas?

------------------
Geoffrey H. Goldberg
Pittsburgh

Logged

Geoffrey H.  Goldberg<BR>Pittsburgh<BR>
Pages: [1] 2   Go Up
Print
Jump to: