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)The number 1 (one) being added to events list
Pages: [1]   Go Down
Print
Author Topic: The number 1 (one) being added to events list  (Read 876 times)
0 Members and 1 Guest are viewing this topic.
newtech
New Member
*

Karma: 0
Offline Offline

Posts: 28


« on: August 25, 2007, 01:52:40 PM »

I am using ssi_list_description.html template.
At the end of the description the script is adding a 1. Looking at the template I do not find a one(1)anywhere.
When I remove the following line:
<%= EVENT FIELD(description) %><BR>
The 1 disappears (and of course the description)

So, where, what is putting the number 1?

Monday, August 27
• 9:00 am -10:00 am :
Prayer
Morning Prayer1

Saturday, September 15
• 6:30 pm -8:45 pm :
Alpha Course
Learn about Christianity
Alpha is a ten week course that is a practical exploration of the Christian faith. more...1
« Last Edit: August 25, 2007, 01:57:50 PM by newtech » 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: August 25, 2007, 03:51:06 PM »


I am using ssi_list_description.html template.


Where did you get it from? I am not familiar with it so I have no idea of the page code it uses.

Dan O.
Logged
newtech
New Member
*

Karma: 0
Offline Offline

Posts: 28


« Reply #2 on: August 25, 2007, 05:02:35 PM »

I thought I got it from much2, but I guess not. Here is the code:
Code:
<!--#include file="preferences.pl"-->
<%
&getEvents( {'duration'=>$in{duration}} );
$DAY = $Grid->{'grid'}->[0]->[0];
$EVENTS = $DAY->{events};
$total_events=0;
%>
<DL>
<%FOREACH EVENTLIST%>
<%IF EVENTS EXIST%>
<%$total_events++;%>
<DT><B><%=$DAY->{dayname}%>, <%=$DAY->{monthname}%> <%=$DAY->{dd}%></B>
<DD>
<%FOREACH EVENT%>
<% if ($_SHOW_GRID_EVENT_BULLET) {%>&#149;<%}%>
<% if ($_SHOW_EVENT_TIMES eq "ALL" || $_SHOW_EVENT_TIMES eq "START") { %>
<% if ($EVENT->{'schedule'}->{'start_time'}) { %><%= SCHEDULE FIELD(start_time) %><% } %>
<% } %>
<% if ($_SHOW_EVENT_TIMES eq "ALL") { %>
<% if ($EVENT->{'schedule'}->{'end_time'}) { %>-<%= SCHEDULE FIELD(end_time) %><% } %>
<% } %>
<% if (($_SHOW_EVENT_TIMES eq "ALL" || $_SHOW_EVENT_TIMES eq "START") && ($EVENT->{'schedule'}->{'start_time'})) { %> : <% } %>


<h2><%= EVENT FIELD(title) %></h2>
<%= # $EVENT->{'details'}->{'title'} %><BR>
           <%= EVENT FIELD(description) %><br />
<%/FOREACH%><BR>
<%/IF%>
<%/FOREACH%>
</DL>
<%unless($total_events){%>
<CENTER><I><%= $_NO_EVENTS_LABEL %></I></CENTER>
<% } %>

This is the code that passes the description(which is including the 1)
Code:
<%= EVENT FIELD(description) %>

I don't see how the template can possibly be passing the 1.
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: August 26, 2007, 01:06:18 PM »

That looks like a slightly modified version of the standard ssi.html template that ships with CalendarScript.

Remove the tag:

<%= # $EVENT->{'details'}->{'title'} %>

... or either the move the "#" sign to before the "=" sign or totally remove the "=" sign from the tag.

A "#" sign followed by an "$" sign (eg. #$Some_Variable) has a specific meaning in Perl. The "=" sign in the tag is telling the script to print it out.

Dan O.
« Last Edit: August 26, 2007, 01:37:15 PM by DanO » Logged
newtech
New Member
*

Karma: 0
Offline Offline

Posts: 28


« Reply #4 on: August 27, 2007, 11:56:42 PM »

Removing
<%= # $EVENT->{'details'}->{'title'} %>

took care of problem thanks. I know need to see if I can limit the description.
Logged
Pages: [1]   Go Up
Print
Jump to: