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)Searching in the template with command line argumentss
Pages: 1 [2] 3   Go Down
Print
Author Topic: Searching in the template with command line argumentss  (Read 1989 times)
0 Members and 1 Guest are viewing this topic.
OperaDivaMommy
New Member
*

Karma: 0
Offline Offline

Posts: 0

mommy, opera singer, violinist, website designer


WWW
« Reply #15 on: November 21, 2003, 10:27:00 AM »

It *sounds* like this search/display change *should* work for me, but I can't get any of the example links to show any events at all.

The only time I can see events is if I go to the actual full calendar.

Can someone direct me to examples of multiple-day events that only display once?  I'd sure appreciate it :-)

Laura

Logged

Laura Ruiz
http://www.increDesign.com

==========
This will be our reply to violence:
 To make music more intensely,
 more beautifully,
 more devotedly than ever before.
    -Leonard Bernstein
==========

OperaDivaMommy
New Member
*

Karma: 0
Offline Offline

Posts: 0

mommy, opera singer, violinist, website designer


WWW
« Reply #16 on: November 21, 2003, 10:36:00 AM »

mmm, my guess as to why I can't see any results is because it appears that there are no other events on the calendar after this month.  I tried adding an event but it wouldn't let me - didn't have the right permissions.  Will keep trying.  I seem to recall seeing a link on the page to access the admin side of things.

Laura

------------------
Laura Ruiz
http://www.increDesign.com

==========
This will be our reply to violence:
 To make music more intensely,
 more beautifully,
 more devotedly than ever before.
    -Leonard Bernstein
==========

Logged

Laura Ruiz
http://www.increDesign.com

==========
This will be our reply to violence:
 To make music more intensely,
 more beautifully,
 more devotedly than ever before.
    -Leonard Bernstein
==========

DanO
Moderator
Full Member
*****

Karma: 13
Offline Offline

Posts: 230

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


WWW
« Reply #17 on: November 21, 2003, 01:31:00 PM »

** I tried adding an event but it wouldn't let me - didn't have the right permissions. **

Have you tried using the template with your own calendar?

BTW. You can see a picture of what the output looks like using the 'camera' link
from the "Chronological List" template details at the
Unofficial CalendarScript - Mods and Plugins site.

Dan O.

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

[This message has been edited by DanO (edited November 21, 2003).]

Logged
OperaDivaMommy
New Member
*

Karma: 0
Offline Offline

Posts: 0

mommy, opera singer, violinist, website designer


WWW
« Reply #18 on: November 21, 2003, 11:48:00 PM »

Hi Dan,
Thank you!  Can't believe I was so dense as to not try that.

I think I've generally got it working now.  But I've had to change a couple of things which have thrown other things a little out of whack.  Maybe I could get some guidance as to how to solve this?
http://www.julianagondek.com/calendar/calendar.pl?&template=default2.html

For some reason, the initial template I'd used was displaying the last day of the event first, the tilde, then the first day of the event.  It was a little odd.  But I changed around the firstday & lastday listings and that fixed things - for the most part.  The issue I have now is that for 1-day events the tilde is still showing and I haven't been able to figure out how to get rid of it.

Also, I'd like to display the day of the week for both the first and last days, but I've only managed to display the day for the end date (on this sample page, the 3rd event starts on a Sunday, not a Friday - it ends on a Friday).

It's also displaying last event first instead of the first upcoming event.  Not sure why.

Finally, I'd like to use the same layout for "Past Performances" on the 2nd half of the page, but I need to have it display on PAST events instead of also current ones.  Any thoughts?

Thanks in advance, again :-)

Laura

[This message has been edited by OperaDivaMommy (edited November 22, 2003).]

Logged

Laura Ruiz
http://www.increDesign.com

==========
This will be our reply to violence:
 To make music more intensely,
 more beautifully,
 more devotedly than ever before.
    -Leonard Bernstein
==========

DanO
Moderator
Full Member
*****

Karma: 13
Offline Offline

Posts: 230

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


WWW
« Reply #19 on: November 22, 2003, 01:56:00 PM »

** Maybe I could get some guidance as to how to solve this? **

A link to the template file itself would be necessary to see the
code being used in it. In your case it looks like
http://www.julianagondek.com/calendar/calendarscript/templates/calendars/oldsty  le/default2.html

I don't know how much I can help as I didn't create and don't use the original template.

The line:
$firstdow=$DAY->{dayabbreviation}
looks like it might set the $firstdow variable to the first
day name abbreviation. Have you tried seeing what value it prints out?

** It's also displaying last event first instead of the first upcoming event. Not sure why **

Me neither, that code is pretty complicated to follow.

** I'd like to use the same layout for "Past Performances" on the 2nd half of the page **

For that I can think of 2 options.

1. Since that template I believe was designed as an SSI template
(meaning to be included into another page via SSI), have an SSI page
call the template twice, one showing upcoming events and again with
the values changed in the &getEvents({duration=>$period}); statement to
get the appropriate range of events for past events.

2. Adjust the template to get events starting previous to the current date,
first only print out events after the current date then loop through
the event list again printing out only events before the current date.

I'm afraid I can not supply the exact code necessary to do any of the above. Sorry.

Dan O.


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

[This message has been edited by DanO (edited November 22, 2003).]

Logged
OperaDivaMommy
New Member
*

Karma: 0
Offline Offline

Posts: 0

mommy, opera singer, violinist, website designer


WWW
« Reply #20 on: November 22, 2003, 07:38:00 PM »

Hi Dan,
Thanks for the suggestions.

Yes, I'd tried using the firstdow code.  I can't figure out what exactly it does, but not what we were hoping ;-)

As for displaying PAST events, I've figured out how to display with a start date of 20020101, but I need some sort of automatic way to stop it from displaying anything for the *next* 183 days - automatically.  If I could set the first set of events to 183d and the 2nd to an end date of -183d that would be ideal.  But I can't seem to get it to recognize a negative number.  hmmm...I'll keep fiddling around.  I don't know perl so it's all trial and error for me.  Oh well.

Maybe if I could figure out how to pass both a startdate AND an endrange...haven't been able to get both to work.  Maybe I just haven't found the right syntax yet.

Laura

[This message has been edited by OperaDivaMommy (edited November 22, 2003).]

Logged

Laura Ruiz
http://www.increDesign.com

==========
This will be our reply to violence:
 To make music more intensely,
 more beautifully,
 more devotedly than ever before.
    -Leonard Bernstein
==========

OperaDivaMommy
New Member
*

Karma: 0
Offline Offline

Posts: 0

mommy, opera singer, violinist, website designer


WWW
« Reply #21 on: November 23, 2003, 04:18:00 PM »

Ok.  I have no idea what I did, but it seems to be mostly where I want it now.

There are only 2 things I'm still having trouble with.  Can Dan or someone else help me?  Maybe the person who created the original template ;-)

1.  How can I display the event year for "Past Performances"?  I thought I'd had it figured out by just calling $year, but nothing displays.  Do I need to define it somewhere too?

2.  When I try and switch around the firstdate and lastdate display (I don't know why they display backwards), I lose the if/then stuff set up for the tilde.  Right now I'm letting it display in the default order, but it sure would be nice to get it fixed up.

Thanks in advance, and thanks for your patience while I try and figure some of this out.  I'm good at fiddling around with things, but I don't really know what I'm doing ;-)

Laura

Logged

Laura Ruiz
http://www.increDesign.com

==========
This will be our reply to violence:
 To make music more intensely,
 more beautifully,
 more devotedly than ever before.
    -Leonard Bernstein
==========

DanO
Moderator
Full Member
*****

Karma: 13
Offline Offline

Posts: 230

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


WWW
« Reply #22 on: November 23, 2003, 09:23:00 PM »

** How can I display the event year for "Past Performances"? **

You can try using the variable $DAY->{yyyy} but I have no idea if it is
defined in the area of the template you're going to be using it in.

Dan O.

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

Logged
wiru
New Member
*

Karma: 0
Offline Offline

Posts: 0


WWW
« Reply #23 on: December 07, 2004, 01:32:00 PM »

This link http://www.memobug.com/treebay/cgi-bin/calendarscript/templates/calendars/oldstyle/sampleG.html
for the Chronological List does not work. Does anyone know where it can be downloaded.

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

Logged
DanO
Moderator
Full Member
*****

Karma: 13
Offline Offline

Posts: 230

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


WWW
« Reply #24 on: December 07, 2004, 02:25:00 PM »

** Does anyone know where it can be downloaded. **

A copy is now linked from the Unofficial CalendarScript - Mods and Plugins
site with the details of the 'Chronological List' template.

If memobug disappovies of my making it available again, just let me know and I'll remove it.

Dan O.

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

Logged
beneath_the_ashes
New Member
*

Karma: 0
Offline Offline

Posts: 0


WWW
« Reply #25 on: August 03, 2005, 03:42:00 PM »

so i have been using this template flawlessly for a long time.  i recently noticed that if i look at the source code of the generated html, there is a TON of blank space.  i was looking at the code and couldnt figure out why.

this is the link to my page: http://www.wearemanalive.com/cgi-bin/calendar/calendar.pl?template=666shows.htm&country=123

and here is my template:

code:

<style>
BODY {scrollbar-face-color: #96D4FF}
BODY {scrollbar-3dLight-Color: #000000}
BODY {scrollbar-Arrow-Color: #000000}
BODY {scrollbar-Base-Color: #000000}
BODY {scrollbar-DarkShadow-Color: #000000}
BODY {scrollbar-Highlight-Color: #000000}
BODY {scrollbar-Shadow-Color: #000000}
BODY {scrollbar-Track-Color: #000000}
BODY {background-repeat: no-repeat}
</style>
<body text="#000000" bgproperties="fixed"
background="http://animositysf.com/gobig/images/Design4_07.jpg" topmargin="0" leftmargin="0">

<FONT SIZE= 1 face = "Arial, Helvetica">
<%
($second, $minute, $hour, $date, $month, $year) = localtime($EVENT->{details}->{time_added} +
$main::localtime_offset);
$month++;
$year += 1900;
%>
<%
$STYLE = "List";
$defaultmax=999; # the default number of events shown

$defaultperiod='365d'; # the default period to sample
$period=int(lc($in{duration})).'d';
if (int($period)==0) {$period=$defaultperiod}; # if no maximum assume default
# $searchcity=lc($in{city});
# if (length($searchcity) < 4) {$searchcity=""}; #need at least 4 chars for valid city
# $searchstate=lc($in{state});
# if (length($searchstate) < 2) {$searchstate=""}; #need at least 2 chars for valid state
$maxevents=$in{maxevents};
if ($maxevents==0) {$maxevents=$defaultmax}; # if no maximum assume default
$searchcountry=lc($in{country});
# if (length($searchstate) > 999) {$searchcountry=''};

#print 'THIS TEST IS HARD WIRED TO SEARCH THE DATABASE FOR &country=on the command line';
#print 'CITY: '.$searchcity.' '.'STATE:'. $searchstate.' '.'COUNTRY '.$searchcountry;

#&getEvents( {'duration'=>$in{duration}} ); #original

&getEvents({duration=>$period});

$DAY = $Grid->{'grid'}->

  • ->
  • ;
    $EVENTS = $DAY->{events};
    $total_events=0; %>

    <!-- BEGIN DATE GATHERING -->
    <% FOREACH EVENTLIST%>
        <% FOREACH EVENT%>
          <% $titlearray=$EVENT->{'details'}->{'title'};
             $montharray='month'.$EVENT->{'details'}->{'title'};
    #          print 'COUNTRY READS: '.$EVENT->{'details'}->{'country'}.'<BR>';
             $thismonth=$DAY->{'monthabbreviation'};
             push(@$montharray,$thismonth);
             push(@$titlearray,$DAY->{'dd'});   %>
        <%/FOREACH%>
    <%/FOREACH%>
    <!-- END DATE GATHERING -->
    </FONT>

    <FONT SIZE= 1 face = "Verdana">
    <div align="center">
     <center>

    <TABLE border=0 cellspacing="0" cellpadding="5" style="border-collapse: collapse" >
    <TR align="center" >
     <TD style="border-style:solid; border-width:2; "
    bgcolor="#A5CCF3" bordercolor="#000000">
     <p style="margin-top: 0; margin-bottom: 0"><font size="2"><b>DATE</b></TD>
     <TD style="border-style:solid; border-width:2; "
    bgcolor="#A5CCF3" bordercolor="#000000">
     <font size="2"><b>LOCATION</b></font></TD>
     <TD style="border-style:solid; border-width:2; "
    bgcolor="#A5CCF3" bordercolor="#000000">
     <font size="2"><b>DETAILS</b></font></TD></TR>


    <%FOREACH EVENTLIST%><b><font size="1">
         <%IF EVENTS EXIST%>
           <% if ($total_events < $maxevents) { %>
              <%FOREACH EVENT%>
                 <%$flag=0;%>
                 <%$titlearray=$EVENT->{'details'}->{'title'};%>
                 <%$montharray='month'.$EVENT->{'details'}->{'title'};%>
                 <%foreach $dupetest(@titleevent) {%>
                    <%if ($EVENT->{'details'}->{'title'} eq $dupetest) {
                         $flag=1;
                    }%>
                 <%};%>


               <% $eventcountry=lc($EVENT->{'details'}->{'country'}); %>
                 <%if ($searchcountry eq "$eventcountry") {%>

                    <% $eventstate=lc($EVENT->{'details'}->{'state'}); %>
                      <%if ( ($searchstate eq "") or ($searchstate =~ m/$eventstate/ ) ) {%>


                           <%if ($flag eq 0) {%> </font>
                           </b>
                           <TR align="center">
                               <%$total_events++;%><b><font size="1"> </font>
                               <% $firstdate = shift(@$titlearray);
                               $lastdate = pop(@$titlearray);
                               $firstmonth = shift(@$montharray);
                               $lastmonth = pop(@$montharray);  
                               $firstdow=$DAY->{dayabbreviation};
                               %><font size="1"> </font>

                               </b>

    <TD align="left" style="border-top:1px solid #000000; border-bottom:1px solid #000000; " valign="top">
    <a href="<%=$CGI_URL_QUERYSTRING%>popup=1&template=666events.htm&event_id=<%=$EVENT->{'details'}->{'id'}%>" STYLE="text-decoration:underline;">
    <font size="1">
    <%=$firstmonth%></FONT><font size="2"> <%=$firstdate%>
                               <% if ($lastdate) { %>
                               <p align="left" style="margin-top: 0; margin-bottom: 0">  
                               ~<p align="left" style="margin-top: 0; margin-bottom: 0"><%if
    ($firstmonth ne $lastmonth) {%>
                                           <%=$lastmonth;%>
                                     <%};%>
                                     <%=$lastdate;%>
                               <%};%>

                               </FONT>
                               </a>

                               <b>

                               </TD>

                               <TD align="left" style="border-top:1px solid #000000; border-bottom:1px solid #000000; "
    valign="top"><font size="1"><%= EVENT FIELD(location) %></font></TD>
                               <TD align="left" style="border-top:1px solid #000000; border-bottom:1px solid #000000; " valign="top"><font size="1"><%= EVENT FIELD(description) %></font></TD>
                               </TR>
                               <%push(@titleevent,$EVENT->{'details'}->{'title'});%>
                          <%}%>
                     <%}%>
                 <%}%>
             <%/FOREACH%>
           <%} %>
        <%/IF%>
    <%/FOREACH%> </b>
                         
    </TABLE>

     </center>
    </div>
    </FONT>

    <FONT SIZE= 1 face = "Arial, Helvetica">

    <FONT SIZE= 1 face = "Verdana">

    <%if ($total_events) {%>
        <p align="center" style="margin-top: 0; margin-bottom: 0">Total Shows: <%=$total_events%><BR>
     
    <%} else {%>
        <CENTER>
        <p><I>No Shows Scheduled</I></p>
        <p> </p>
    </CENTER>
    </FONT>
    <%}%>
    <p></p>

    <FONT SIZE= 1 face = "Verdana">
                               <p align="center" style="margin-top: 0; margin-bottom: 0">
                               <b>
                               <a target="_blank"
    href="<%=$AdminConfig->get("calendar_url")%>?calendar=<%=$Calendar%>">go to the Man Alive Calendar</a></b></p>
    </FONT>
    </FONT>


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

Logged
DanO
Moderator
Full Member
*****

Karma: 13
Offline Offline

Posts: 230

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


WWW
« Reply #26 on: August 03, 2005, 11:05:00 PM »

** the generated html, there is a TON of blank space.
i was looking at the code and couldnt figure out why. **

No?

Dan O.

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

Logged
beneath_the_ashes
New Member
*

Karma: 0
Offline Offline

Posts: 0


WWW
« Reply #27 on: August 05, 2005, 03:11:00 PM »

No? Did it now have a ton of blank lines for you?  i dont know what the no was for  

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

Logged
DanO
Moderator
Full Member
*****

Karma: 13
Offline Offline

Posts: 230

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


WWW
« Reply #28 on: August 05, 2005, 04:57:00 PM »

** i dont know what the no was for **

I was just replying to your previous statement, "i was looking at
the code and couldnt figure out why
". If you wanted an answer
to a specific question, you'd need to ask it.

If you were interested in knowing why there we so many blank lines, I believe
that is answered in the previous forum message "too much white space".

If not, please post your query.

Dan O.

[This message has been edited by DanO (edited August 05, 2005).]

Logged
beneath_the_ashes
New Member
*

Karma: 0
Offline Offline

Posts: 0


WWW
« Reply #29 on: March 02, 2007, 02:04:00 AM »

is there a way this script can work with any field name?  for instance if a field is created called 'venue', the script would be able to see it and you could just append &venue=Fillmore

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

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