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
Pages: [1]   Go Down
Print
Author Topic: Short Day Names?  (Read 576 times)
0 Members and 1 Guest are viewing this topic.
LoserUser
Guest
« on: November 26, 2002, 08:01:00 AM »

First, I should say, I am an idiot. That being said, I can't figure out how to include abbreviated days [instead of Sunday, Monday, Tuesday it's Sun, Mon, Tue etc].

Here is the script I'm working with. I've tried all sorts of things, but can't seem to get it working.

Again, remember that I am an idiot. Thanks  

<center><font face=verdana>
<%
&getEvents( { 'range'=>'month' } );
%>
<TABLE BORDER="0" HEIGHT=10% WIDTH=150 CELLPADDING="0" CELLSPACING="0">
<TR>
<TH CLASS="thinborder" NOWRAP ALIGN="RIGHT" COLSPAN="7" bgcolor=#C0C0C0>
<center><font size="1"><A CLASS=SELECT HREF="<% LAST MONTH LINK%>" CLASS="navigationtext"> <<</A></B>
<font size="1"><%=$MONTH_NAME%> <%=$YEAR%> <B>
<font size="1"><A CLASS=SELECT HREF="<% NEXT MONTH LINK%>" CLASS="navigationtext"> >></A></B></TH></TR></center>
<TR><%FOREACH GRID COLUMN%>
<% $d=0; %>
<TH CLASS="thinborder" BGCOLOR="<%=$_COLUMN_HEADER_BGCOLOR%>">
<SPAN CLASS="columnheader"><font size="1"><%= $Grid->{'day_abbreviations'}->[$COL] %></SPAN></TH>
<%$d++;%>
<%/FOREACH%></TR>
<%FOREACH GRID ROW%>
<TR>
<%FOREACH GRID COLUMN%>
<% $i=0; %>
<TD CLASS="thinborder" VALIGN=TOP width="24" height="7" BGCOLOR="<%IF SELECTED%>#C0C0C0<%ELSE%><%=$_GRID_CELL_BGCOLOR%>#FFFFFF<%/IF%>">
<%IF DISPLAY%>
<font size="1"><SPAN BGCOLOR="<%=$_GRID_DATE_BGCOLOR%>" STYLE="background-color:<%=$_GRID_DATE_BGCOLOR%>"> <NOBR>
<%if($DAY->{'dd'}==1&&$VIEW ne "Month"){%><%=$DAY->{''}%> <%}%><%=$DAY->{'dd'}%></NOBR></SPAN>
<%FOREACH EVENT%>
<%$i++;%>
<%/FOREACH%>
<%IF EVENTS EXIST%>
<font size="1"><span style="background-color: #FFFFFF"><A CLASS=SELECT HREF="<%=$CGI_URL_QUERYSTRING%>selected_datestring=<%=$DAY->{'datestring'}%>&datestring=<%=$DAY->{'datestring'}%>&view=Day" CLASS="griddatetext">
*</A></span>
<%/IF%>
<%/IF%>
</TD>
<%/FOREACH%>
</TR>
<%/FOREACH%>
</TABLE>

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: November 26, 2002, 12:46:00 PM »

 
quote:
I can't figure out how to include abbreviated days [instead of Sunday, Monday, Tuesday it's Sun, Mon, Tue etc].

If you don't need the full day names elsewhere, you can change the day names to their abbreviated form in the administration section under template options(?).

Dan O.

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

Logged
LoserUser
Guest
« Reply #2 on: November 26, 2002, 12:51:00 PM »

Yeah, actually, I knew about that, but unfortunatly, I do use the script elswhere and need the full names for that. Thanks though. Any other thoughts?
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: November 26, 2002, 06:29:00 PM »

In place of
<%= $Grid->{'day_abbreviations'}->[$COL] %>
you could try
<%= $DAY_ABBREVIATIONS->[$COL] %>

At least according to the Documentation under Customization it should work that way?

Dan O.

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

[This message has been edited by DanO (edited November 26, 2002).]

Logged
LoserUser
Guest
« Reply #4 on: November 27, 2002, 07:53:00 AM »

Holy Bjezus! That was it. Fantastic! Thanks a TON.


Logged
Shelley
New Member
*

Karma: 0
Offline Offline

Posts: 13

Web Designer


« Reply #5 on: August 20, 2004, 03:51:00 PM »

"If you don't need the full day names elsewhere, you can change the day names to their abbreviated form in the administration section under template options(?)."


Unfortunately,  this does not work in version 3.2.1. I have also tried substituting 'dayabbreviation' for 'dayname' in the default template html document. It just collapses the columns and does not abbreviate the daynames. In fact there is no text at all.


"In place of
<%= $Grid->{'day_abbreviations'}->[$COL] %>
you could try
<%= $DAY_ABBREVIATIONS->[$COL] %>

At least according to the Documentation under Customization it should work that way"


In which document should this substitution go? Default template?

Many thanks for any help on this.

Shelley

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


Well, I have solved my difficulty. I went into the config.txt document in the calendars folder that is in the calendarscript directory and changed the following:

from "day_names=ARRAY(Sunday,Monday,Tuesday,Wednesday,Thursday,Friday,Saturdday) "

to

"day_names=ARRAY(Sun,Mon,Tues,Wed,Thurs,Fri,Sat) "

I think this is probably cheating, but it works. I now have abbreviated days in my calendar.

[This message has been edited by Shelley (edited August 22, 2004).]

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