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)Day Span - mod default template
Pages: [1]   Go Down
Print
Author Topic: Day Span - mod default template  (Read 868 times)
0 Members and 1 Guest are viewing this topic.
beneath_the_ashes
New Member
*

Karma: 0
Offline Offline

Posts: 0


WWW
« on: February 25, 2007, 03:09:00 PM »

so i need to implement the mods in default.html for the dayspan template, into my default template.  i already had alot of customized stuff in there, so i used beyond compare to port over the needed changes, but now im getting an error.

you can see the error here: http://www.wearemanalive.com/cgi-bin/calendar/calendar.pl

and here is a copy of my default.html http://www.wearemanalive.com/default.html

the error is:
syntax error at (eval 3) line 384, near "} elsif" Missing right curly or square bracket at (eval 3) line 522, at end of line

but ive looked it over a hundred time, and there is no missing brackets that im aware of....

any thoughts?

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: February 25, 2007, 04:33:00 PM »

Sorry but I do not know where your problem lies.

** any thoughts? **

I would suggest you start again from scratch with dayspan template (if you really want to use it) and then make your customizations to it instead of trying to move parts of its codes elsewhere.

JMO

Dan O.

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

Logged
beneath_the_ashes
New Member
*

Karma: 0
Offline Offline

Posts: 0


WWW
« Reply #2 on: February 25, 2007, 05:41:00 PM »

you mean did you look at it and didnt see anything?

the reason i wanted to move the code from dayspan to my default.html is because the code in the dayspan seems pretty old.  lots of variables have been replaced with static text and the css (both the stylesheet and the tag classes) are changed unneccessarily.  i thought that the code needed from that would be fairly minimal.

most of the differences between it and the new 3.2.1 default.html are all unimportant

is there any programs that can evaluate my opening and closing tags in a perl script and show me them visually?  i feel like problem is an easy fix, but its near impossible to find details like that

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

Logged
beneath_the_ashes
New Member
*

Karma: 0
Offline Offline

Posts: 0


WWW
« Reply #3 on: February 25, 2007, 06:41:00 PM »

so i found out a way to make it work, but i might be overlooking something important...

if i take out...

<% $i = 0; foreach $EVENT (@{$currRow[$COL][0]}) { $i++; %>

it seems to work....

i updated the default.htm at the link above, and you can see that line i commented out at line 291 in the source.  

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

Logged
beneath_the_ashes
New Member
*

Karma: 0
Offline Offline

Posts: 0


WWW
« Reply #4 on: February 25, 2007, 07:12:00 PM »

man i feel sill posting this many times simultaneously, but i made a little more progress...
http://www.wearemanalive.com/cgi-bin/calendar/calendar.pl

it looks great now...except the event that spans, is ALSO lsited on each day indivudally...and i cant seem to find what is causing that.

also, if you look at in Firefox, the formatting is all wierd.  But in IE7 it looks perfect.

and again... http://www.wearemanalive.com/default.html  has my updated source

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

Logged
beneath_the_ashes
New Member
*

Karma: 0
Offline Offline

Posts: 0


WWW
« Reply #5 on: February 25, 2007, 07:43:00 PM »

ok. think i have a MUCH more specific question now.

im PRETTY sure the reason for the problem is from using DaySpan and the At A Glance mod's together...

im thinking th conflicting code is this....

This line of DaySpan code:

code:

<% $i = 0; foreach $EVENT (@{$currRow[$COL][0]}) { $i++; %>

and this section of At A Glance code:

code:

<% @dino = ( );
@rubble = ( );
$ct=0;
$startday=8;
$endday=17;
$firsttime=0;%>
<%FOREACH EVENT%>
<%$greatkazoo=0;%>
<%$i++;%>

Im trying to blend them together to make both happy, but so far, im not knowlegable to make it work....

any idea?  

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

[This message has been edited by beneath_the_ashes (edited February 25, 2007).]

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: February 25, 2007, 08:42:00 PM »

Sorry but I'm not familiar with the coding of either of those templates. Maybe someone that is can tell you how to get them working together?

Dan O.

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

Logged
beneath_the_ashes
New Member
*

Karma: 0
Offline Offline

Posts: 0


WWW
« Reply #7 on: February 26, 2007, 01:47:00 PM »

i got it.  it was because At A Glance and DaySpan arent comaptible together...this is the fixed part that was giving me problems....

change it from:

code:
                     
<% @dino = ( );
@rubble = ( );
$ct=0;
$startday=0;
$endday=24;
$firsttime=0;%>
<%FOREACH EVENT%>
<%$greatkazoo=0;%>

to...

code:
                     
<% @dino = ( );
@rubble = ( );
$ct=0;
$startday=0;
$endday=24;
$firsttime=0;%>
<% $i = 0; foreach $EVENT (@{$currRow[$COL][0]}) { $i++; %>
<%$greatkazoo=0;%>

if anyone wants to see more of the code i edited to mod it, let me know.  basically the template that comes with DaySpan is outdated, so added DaySpan into the new 3.2.1 deafult.htm

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

Logged
beneath_the_ashes
New Member
*

Karma: 0
Offline Offline

Posts: 0


WWW
« Reply #8 on: February 26, 2007, 01:49:00 PM »

oh and...is there a way to change the title of this thread?

DaySpan & At A Glance in 3.2.1, or something would be a more helpful title

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

Logged
DanO
Moderator
Full Member
*****

Karma: 13
Offline Offline

Posts: 230

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


WWW
« Reply #9 on: February 26, 2007, 01:55:00 PM »

** i got it. **

Glad to hear it.

** is there a way to change the title of this thread? **

Not to my knowledge.

Dan O.

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

Logged
beneath_the_ashes
New Member
*

Karma: 0
Offline Offline

Posts: 0


WWW
« Reply #10 on: April 09, 2007, 07:14:00 PM »

so DanO, as i was following your other thread regarding adding date and time to the event view, i ran into a problem with TubaDave's Day Span.

the problem is, to get the date to show up in the event view, you have to pass the datestring variable through the URL....

BUT with dayspan, it passes the last date from the events week, instead of passing the datestring for the LAST DAY of that event.

How can i pass the last date of an spanned event via the daystring?

i tried: &datestring=<%=$dateEnd %>
but it passes a strange date back.  about a month ahead.

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

Logged
DanO
Moderator
Full Member
*****

Karma: 13
Offline Offline

Posts: 230

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


WWW
« Reply #11 on: April 09, 2007, 09:54:00 PM »

** i tried: &datestring=<%=$dateEnd %> **

Is there such a variable defined anywhere??

** How can i pass the last date of an spanned event via the daystring? **

<%= $EVENT->{'schedule'}->{'end'} %> or <%= SCHEDULE FIELD(end) %> should make the event schedule's end date available but it will be in Unix date/time format. It would have to be converted from there to change it to human readable format (or the format the $DAY->{datestring} variable is in). I don't know that that date is stored anywhere else already in that format.

Dan O.

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

Logged
musicvid
New Member
*

Karma: 1
Offline Offline

Posts: 8


WWW
« Reply #12 on: April 10, 2007, 12:26:00 AM »

You can try this code, but keep in mind it is untested . . .
code:
use POSIX qw(strftime);
my @end  = gmtime($EVENT->{schedule}->{end});
my $end_datestr = strftime(“%Y%m%d”, @end);

Then you could say something like this:
&datestring=<%= $end_datestr %>
in your url query string.

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

[This message has been edited by musicvid (edited April 10, 2007).]

Logged
beneath_the_ashes
New Member
*

Karma: 0
Offline Offline

Posts: 0


WWW
« Reply #13 on: April 10, 2007, 05:05:00 PM »

worked perfect! thanks

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

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