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: whats wrong with my template?  (Read 393 times)
0 Members and 1 Guest are viewing this topic.
beneath_the_ashes
New Member
*

Karma: 0
Offline Offline

Posts: 0


WWW
« on: May 11, 2003, 01:02:00 PM »

i cant get this template to work...maybe i am way off, but it seems right to me...if someone could double check me...

<font size="1" face="Verdana">
<% } elsif ($VIEW eq "Event") { %>
<% if (viewDetails($EVENT->{details}->{permissions})){ %>
<TABLE BORDER="0" CELLPADDING="2" CELLSPACING="0">
<%
foreach (@$fields) {
next unless ($db->{'properties'}->{$_}->{'display_details'});
next unless ($EVENT->{details}->{$_});
$EVENT->{details}->{$_} =~ s/\r\n/<BR>/g;
%>
<TR><TD ALIGN="right" VALIGN="top"><SPAN CLASS="text"><B><%=$db->{'properties'}->{$_}->{'name'}%>:
</B></SPAN></TD><TD ALIGN="left" VALIGN="top"><SPAN CLASS="text"><%=$EVENT->{details}->{$_}%></SPAN></TD></TR>
<% } %>
<%
($second, $minute, $hour, $date, $month, $year) = localtime($EVENT->{details}->{time_added} + $main::localtime_offset);
$month++;
$year += 1900;
%>
<TR><TD ALIGN="right" VALIGN="top"><SPAN CLASS="text">
 <font size="1" color="#CCCCCC">TimeAdded: </font></SPAN></TD><TD ALIGN="left" VALIGN="top"><SPAN CLASS="text"><font size="1" color="#CCCCCC"><%= $month %>-<%= $date %>-<%= $year %> @ <%=(($hour > 12)?$hour-12:$hour)%>:<% print sprintf("%02d",$minute); %> <%=(($hour > 11)?"PM":"AM")%></font></SPAN></TD></TR>

</TABLE></font>
<% ELSE %>
<p align="center"><b><font color="#FFFFFF">The details for this event are
PRIVATE!<br>
You must </font>
<a href="http://www.darkvisionsmedia.com/cgi-bin/calendar/calendar.pl?calendar=default&template=login.html">
<font color="#FFFF00">login</font></a><font color="#FFFFFF"> to view them.<br>
If you dont have an account, you need to </font>
<a href="http://www.darkvisionsmedia.com/Site/Body/Interact/Contact/default.asp">
<font color="#FFFF00">contact</font></a><font color="#FFFFFF"> me.<br>
But you will only get one if you are VIP.</font></b></p>
<% /IF %></font>

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: May 11, 2003, 01:53:00 PM »

** i cant get this template to work **

It's very difficult to just look at code and see what may be wrong with it.

What doesn't work about it?

What output IS produced?

Can you link to the calendar using it so we can see the output for ourselves?

Dan O.

[This message has been edited by DanO (edited May 11, 2003).]

Logged
beneath_the_ashes
New Member
*

Karma: 0
Offline Offline

Posts: 0


WWW
« Reply #2 on: May 11, 2003, 05:35:00 PM »

sure can...
http://www.darkvisionsmedia.com/cgi-bin/calendar/calendar.pl?maxevents=999&template=BTAshows.htm&duration=365&popup=1&template=BTAeventview.html&event_id=198

the errors SEEMED obvious at first...but i apparently am not skilled enough to fix them...haha

thanks...

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

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: May 11, 2003, 06:40:00 PM »

Is what you posted the whole of the template code?

If so, you're missing a whack of stuff before it which will be required in order for the template to do anything. Most templates start with Perl code which at the very least retrieves calendar variables and/or event data.

The first line of Perl code in what you posted is
<% } elsif ($VIEW eq "Event") { %>
which should follow a Perl "if" statement which I don't see.

Dan O.

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

Logged
beneath_the_ashes
New Member
*

Karma: 0
Offline Offline

Posts: 0


WWW
« Reply #4 on: May 12, 2003, 06:25:00 AM »

ok...this was really stupid, and i just realized it...but what i was trying to do was use the EVENT VIEW code from my default.html and use it as a seperate template...so that i could call on that new template to display event details with a different look...so my first post, was exactly was is in my default.html for the event view code...i realize that is missing information, but dont know exactly what...

i am trying to use this template with the code discussed in http://www.calendarscript.com/support/forum/Forum4/HTML/000081.html

i feel like im close, but i need that little push over the cliff...

the link to my event listing is: http://www.darkvisionsmedia.com/cgi-bin/calendar/calendar.pl?template=BTAshows.htm&duration=365&maxevents=999

thanks
-ryan

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

Logged
DanO
Moderator
Full Member
*****

Karma: 13
Offline Offline

Posts: 230

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


WWW
« Reply #5 on: May 12, 2003, 08:50:00 PM »

> what i was trying to do was use the EVENT VIEW code from my default.html and use it as a seperate template...<

Just make a copy of the default.html template file, rename it to something different and take out any (HTML) code you don't want in there (if even necessary).

> so that i could call on that new template to display event details with a different look. <

Have you seen the previous forum message:
Using pop-ups with default template

Maybe you can work on that way of displaying an event easier?

Dan O.


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

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