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: DIsplaying upcoming events  (Read 682 times)
0 Members and 1 Guest are viewing this topic.
Paul Pittman
New Member
*

Karma: 0
Offline Offline

Posts: 0

Media Rep (IRA Outlaw Sprints)


WWW
« on: January 27, 2003, 08:48:00 PM »

I might be missing something here, but I am trying to set up the calendar so it displays the events for the next 7 days on our club's homepage.  

My server does not allow SSI execution calls but I can include virtual commands along with the normal h aref commands.  

I can understand the basics of scripting, but by no means am I an expert.

Any assistance or direction would be appreciated!

Paul Pittman

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: January 27, 2003, 09:44:00 PM »

** My server does not allow SSI execution calls but I can include virtual commands **

What are virtual commands?

If you can't include a script into your pages via SSI, you could display it in an iframe or I recall reading about some elaborate JavaScript method. You could try searching the forums.

I don't know any other way it would be possible.

Dan O.

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

Logged
Paul Pittman
New Member
*

Karma: 0
Offline Offline

Posts: 0

Media Rep (IRA Outlaw Sprints)


WWW
« Reply #2 on: January 27, 2003, 09:46:00 PM »

I got it doing basiclly what I need it to do with the below html tag:
a
href="http://www.arppix.com/iracal/calendar.pl?selected_datestring=20030201&datestring=20030201&view=Day"
class="text">Saturday, February 1</a></b>                </dt>
             <dd>                                         •                                                                                        <a
href="http://www.arppix.com/iracal/calendar.pl?view=Event&event_id=2"
style="text-decoration: underline;" class="text">WI Motorsports Show</a>

I pulled it from the source of the display.  Don't know if I'm going about this right or not, but at least I got something!

The problem now is calling the displayed text for upcoming events AFTER this.

Hope this helps.

Paul Pittman

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

Logged
Paul Pittman
New Member
*

Karma: 0
Offline Offline

Posts: 0

Media Rep (IRA Outlaw Sprints)


WWW
« Reply #3 on: January 28, 2003, 11:39:00 PM »

A little headway.  I can execute the script via SSI with the following code:
"<!--#exec cgi="/cgi-bin/calendar/calendar.pl"-->"

I have placed it into an shtml file: http://www.arppix.com/home4.shtml

and it displays what I need PLUS.  Is there a way to remove the top and bottom parts of the display so that you ONLY get the scheduled dates?  

I played around with the SSI.HTML but really screwed something up.  Just call me dumb.

At least I was smart enough to save the original 1st and get it working.

Paul

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

Logged
DanO
Moderator
Full Member
*****

Karma: 13
Offline Offline

Posts: 230

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


WWW
« Reply #4 on: January 29, 2003, 09:00:00 PM »

** Is there a way to remove the top and bottom parts of the display so that you ONLY get the scheduled dates? **

That's all the ssi.html template file should produce.

It looks like the calendar does not recognize it is being called via SSI and just loading the regular calendar. This is what the output should look like when called via SSI:
http://www.arppix.com/iracal/calendar.pl?template=ssi.html&duration=365d

You can try using an SSI call like:

"<!--#exec cgi="/iracal/calendar.pl?template=ssi.html&duration=365d"-->

But that won't work on many servers.

Dan O.

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

Logged
eladyar
New Member
*

Karma: 0
Offline Offline

Posts: 0


WWW
« Reply #5 on: January 29, 2003, 10:10:00 PM »

Have you tried this syntax at the spot where you want to put the list of events?

<!--#include virtual="/cgi-bin/calendar.pl?duration=10d&template=ssi.html" -->

You might have to adjust the path to suit your site.


------------------
Dale Ray

[This message has been edited by eladyar (edited August 20, 2004).]

Logged

eladyar
New Member
*

Karma: 0
Offline Offline

Posts: 0


WWW
« Reply #6 on: January 29, 2003, 10:24:00 PM »

I found this information:

virtual

The value is a (%-encoded) URL relative to the current document being parsed. The URL cannot contain a scheme or hostname, only a path and an optional query string. If it does not begin with a slash (/) then it is taken to be relative to the current document.

A URL is constructed from the attribute, and the output the server would return if the URL were accessed by the client is included in the parsed output. Thus included files can be nested.

If the specified URL is a CGI program, the program will be executed and its output inserted in place of the directive in the parsed file. You may include a query string in a CGI url:

<!--#include virtual="/cgi-bin/example.cgi?argument=value" -->
include virtual should be used in preference to exec cgi to include the output of CGI programs into an HTML document.

at:
http://httpd.apache.org/docs/mod/mod_include.html

------------------
Dale Ray
[This message has been edited by eladyar (edited January 29, 2003).]

[This message has been edited by eladyar (edited August 20, 2004).]

Logged

Paul Pittman
New Member
*

Karma: 0
Offline Offline

Posts: 0

Media Rep (IRA Outlaw Sprints)


WWW
« Reply #7 on: January 30, 2003, 04:09:00 PM »

BAMMM!  That got it Dano!  You must have had some experience with this type of server, huh?  Could this explain why I was having trouble to begin with and what can I do (if anything) to avoid future problems (other than simply switch/which I am exploring)?

The script is behaving EXACTLY as I need it to.  I don't know what you did or changed, but it worked!  

I do have a question though concerning the duration.  The "duration=365d" argument in the tag.  Does this mean that it will display all events in the schedule for 365 days or can I just modify it to however many days I need.  (ie 7d, 30d, etc).

Eladyar:  I appreciate your help too.  I knew guys like you were out there to help us uneducated wannabe's trying to do good in our own way.  I did try your tag but nothing happened.  All I got was a blank screen.  As you probably gathered from above, I apparently have a screwy server.  So what else is new.  Thank you anyway!

I appreciate all of you guys help!  If you want to see your work and efforts in action, see http://www.irasprints.com.  

I will definately be in touch with Matt!

Thanks again.

Paul Pittman!
IRA Online

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

Logged
eladyar
New Member
*

Karma: 0
Offline Offline

Posts: 0


WWW
« Reply #8 on: January 30, 2003, 04:38:00 PM »

 
quote:
Does this mean that it will display all events in the schedule for 365 days or can I just modify it to however many days I need. (ie 7d, 30d, etc).

You can change it to what ever duration you want.

I knew that I couldn't use the "<!--#exec cgi" on my server and had to use the "<!--#include virtual=".

Your welcome, I was just trying to pitch in. There are many people here who offer help.


------------------
Dale Ray

[This message has been edited by eladyar (edited August 20, 2004).]

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: January 30, 2003, 07:36:00 PM »

 
quote:
"duration=365d" argument in the tag. Does this mean that it will display all events in the schedule for 365 days or can I just modify it to however many days I need. (ie 7d, 30d, etc).

Yes.

quote:
Could this explain why I was having trouble to begin with and what can I do (if anything) to avoid future problems

Find a host running Apache web server software. JMO

** That got it **

Glad to hear it.

Dan O.

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

Logged
Paul Pittman
New Member
*

Karma: 0
Offline Offline

Posts: 0

Media Rep (IRA Outlaw Sprints)


WWW
« Reply #10 on: January 30, 2003, 07:39:00 PM »

Another dumb question:

How can I show some seperation between the date and the event?

I edited the /default/ssi.html file and tried to put a table between the date and events but saw no difference.

"<!--#include file="preferences.pl"-->
<%
&getEvents( {'duration'=>$in{duration}} );
$DAY = $Grid->{'grid'}->

  • ->
  • ;
    $EVENTS = $DAY->{events};
    $total_events=0;
    %>
    <table><td>
    <DL>
    <%FOREACH EVENTLIST%>
       <%IF EVENTS EXIST%>
       <%$total_events++;%>
       <DT><%=$DAY->{dayname}%>, <%=$DAY->{monthname}%> <%=$DAY->{dd}%>
       <DD></td>
                  <td><%FOREACH EVENT%>
             <% if ($_SHOW_GRID_EVENT_BULLET) {%>•<%}%>
             <% if ($_SHOW_EVENT_TIMES eq "ALL" | | $_SHOW_EVENT_TIMES eq "START") { %>
                <% if ($EVENT->{'schedul e'}->{'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'})) { %> : <% } %>
             <%= $EVENT->{'details'}-> - {'title'} %><BR>
          <%/FOREACH%>
       <%/IF%>
    <%/FOREACH%>
    </DL>
    <%unless($total_events){%>
    <CENTER><I><%= $_NO_EVENTS_LABEL %></I></CENTER>
    <% } %></td></table>

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

Logged
eladyar
New Member
*

Karma: 0
Offline Offline

Posts: 0


WWW
« Reply #11 on: January 30, 2003, 11:39:00 PM »

Here is an ssi.html that will display your upcoming events in a table. There are two columns, the left column is for the date. The right hand column presents that dates events in a bulleted list.

Quote

<%
&getEvents( {'duration'=>$in{duration}} );
$DAY = $Grid->{'grid'}->
  • ->
  • ;
    $EVENTS = $DAY->{events};
    $total_events=0;
    %>
    <table>
    <%FOREACH EVENTLIST%>
       <%IF EVENTS EXIST%>
       <tr>
       <td>
       <%$total_events++;%>
       <%=$DAY->{dayname}%>, <%=$DAY->{monthname}%> <%=$DAY->{dd}%>
       </td>
       <td>
       <ul>
          <%FOREACH EVENT%>
             <li>
             <% if ($EVENT->{'schedule'}->{'start_time'}) { %><%= $EVENT->{'schedule'}->{'start_time'} %><% } %>
             <% if ($EVENT->{'schedule'}->{'end_time'}) { %>-<%= $EVENT->{'schedule'}->{'end_time'} %><% } %>
             <% if ($EVENT->{'schedule'}->{'start_time'}) { %> : <% } %>
             <%= $EVENT->{'details'}->{'title'} %>
             </li>
          <%/FOREACH%>
       </ul>
       </td>
       </tr>
       <%/IF%>
    <%/FOREACH%>
    </table>
    <%unless($total_events){%>
    <p><strong><em>No Events</em></strong></p>
    <% } %>
    Quote

    You should be able to modify it to add any other details you want.


    ------------------
    Dale Ray
    http://www.gavitsports.org

Logged

DanO
Moderator
Full Member
*****

Karma: 13
Offline Offline

Posts: 230

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


WWW
« Reply #12 on: February 01, 2003, 08:52:00 PM »

** I edited the /default/ssi.html file and tried to put a table between the date and events but saw no difference. **

In the ssi.html template file it is the <DL> <DT> <DD> that does the formatting of the data. I don't know what effect putting the table code where you have will effect the layout. You can read about the <DL> tag usage at: http://www.ncdesign.org/html/030text.htm#list

If you went back to the original ssi.html file and just removed those tags, you could add spacing with just <P>, <BR> or <BR><BR> tags or use the template code that eladyar supplied.

Dan O.

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

Logged
DanO
Moderator
Full Member
*****

Karma: 13
Offline Offline

Posts: 230

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


WWW
« Reply #13 on: February 02, 2003, 05:12:00 PM »

I see Dale has made several different SSI templates available (see Modified ssi.html files available). Maybe one of those will look like you want?

Dan O.

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

Logged
Paul Pittman
New Member
*

Karma: 0
Offline Offline

Posts: 0

Media Rep (IRA Outlaw Sprints)


WWW
« Reply #14 on: February 02, 2003, 06:51:00 PM »

By Goerge, I think we have it.  Thanks again.  I don't know exactly WHAT I did to get it.  Just followed Dale's suggestions and it performed perfectly.  Live and learn.

Thanks again guys!

You guys definately know your stuff!

Paul Pittman

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

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