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 CommunityEverything ElseGeneral Use (Moderators: scott, DanO, Marty)Linking from Event ID to Details on SSI Page
Pages: [1]   Go Down
Print
Author Topic: Linking from Event ID to Details on SSI Page  (Read 307 times)
0 Members and 1 Guest are viewing this topic.
pPittman
New Member
*

Karma: 0
Offline Offline

Posts: 0

Public relations


WWW
« on: March 07, 2005, 01:49:00 PM »

I am not having any problems with the installation, execution of reporting of the script, but I do have a question that I can't seem to find an answer to:

When displaying my upcoming events on my SSI pages, I have them set up as links to the default calendar (which is set to grid/month).  Can I set up those event IDs to the event details?  You would think I should be able to but for the life of me, I cannot find where to edit the SSI.html file or templates to direct it to the actual event field.

EX:

Mar 13, 2005 - Brat Fry  [displayed verbage]

Click to ->    Mar 13, 2005
[details       ELKS Racing Brat Fry Benefit
entered       VFW Hall, Kiel, WI
when adding]  Admission: ----
              Directions:

This is not a big thing, just something that I think should be able to happen that I can't quite grasp.  

Any thing I am missing here would be helpful.

Paul

Logged

Don't ask a question if your afraid of the answer!
DanO
Moderator
Full Member
*****

Karma: 13
Offline Offline

Posts: 230

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


WWW
« Reply #1 on: March 07, 2005, 05:00:00 PM »

** When displaying my upcoming events on my SSI pages, I have them set up as links to the default calendar. Can I set up those event IDs to the event details? **

Yes, it is possible to link the event titles on the SSI template to the 'Event View' display of the main calendar.

**  cannot find where to edit the SSI.html file or templates to direct it to the actual event field. **

It is the SSI template which would have to be edited if that's where you want the links to be. The area of it needing editing would be where the titles are printed out.

Before you ask what code to use, it would likely be almost (if not exactly) identical to that which is used in the default.html template for the same purpose.

JFYI

Dan O.

[This message has been edited by DanO (edited March 07, 2005).]

Logged
pPittman
New Member
*

Karma: 0
Offline Offline

Posts: 0

Public relations


WWW
« Reply #2 on: March 07, 2005, 07:34:00 PM »

Getting closer.  Thanks.

Here is my ssi.html file at this point.  Currently, I can get it to the correct view (detail), but I am unable to have the code "identify" the event_id:

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

  • ->
  • ;
    $EVENTS = $DAY->{events};
    $total_events=3;
    %>
    <table border="0" font size="-2">
    <%FOREACH EVENTLIST%>
    <%IF EVENTS EXIST%>
    <tr>
    <td><a href="http://www.arppix.com/schedule.shtml">
    <%$total_events++;%>
    <b><%=$DAY->{monthname}%>  <%=$DAY->{dd}%></a> </b>
    </td>
    <td>
    <%FOREACH EVENT%>
    <li></u><a href="http://arppix.com/iracal/calendar.pl?view=Event&event_id=($in{'event_id'})&view=Event&event_id={'event_id'}">
    <small><b><%= $EVENT->{'details'}->{'title'} %> </a></B> <%= $EVENT->{'details'}->{'eventtitle'} %>
    <i><%= $EVENT->{'details'}->{'location'} %> </i></B>  <i>
    <% if ($EVENT->{'schedule'}->{'start_time'}) { %><%= $EVENT->{'schedule'}->{'start_time'} %><% } %></small>

    <% if ($EVENT->{'schedule'}->{'start_time'}) { %>  <% } %></li></i></small>
    <%/FOREACH%>
    </td>
    </tr>
    <%/IF%>
    <%/FOREACH%></font>
    </table>
    <%unless($total_events){%>
    <p><strong><em>No Events</em></strong></p>
    <% } %>

    If I stop it directly AFTER the ...calendar.pl link, it calls for the entire month.  How bad am I messing this up?

    Paul

    ------------------
    Don't ask a question if your afraid of the answer!

Logged

Don't ask a question if your afraid of the answer!
pPittman
New Member
*

Karma: 0
Offline Offline

Posts: 0

Public relations


WWW
« Reply #3 on: March 07, 2005, 07:48:00 PM »

Nevermind.  I got it!  It was a matter of identifying the following statement:  &event_id=<%= EVENT FIELD(id) %>.

The ssi.html file now looks like this:

<!--#include file="preferences.pl"-->
<%
# Begin the code...
# -----------------
$STYLE = $in{style} | | $_DEFAULT_LIST_GRID;
$VIEW = $in{view};
if (!$in{duration} && !$in{range} && !$in{startdate} && !$in{enddate}) {
   $VIEW | |= $_DEFAULT_VIEW;
   }
if ($VIEW eq "Month") { &getEvents( { 'range'=>'month' , 'month'=>$MONTH } ); }
elsif ($VIEW eq "Week") { &getEvents( { 'range'=>'week' } ); }
elsif ($VIEW eq "Two-Week") { &getEvents( { 'range'=>'twoweek' } ); }
elsif ($VIEW eq "Three-Week") { &getEvents( { 'range'=>'threeweek' } ); }
elsif ($VIEW eq "Four-Week") { &getEvents( { 'range'=>'fourweek' } ); }
elsif ($VIEW eq "Day") {
   &getEvents( { 'range'=>'day','startdate'=>$DATESTRING } );
   }
elsif ($VIEW eq "Event") {
   $EVENT->{'details'} = &getEvent($in{'event_id'});
   $db = $main: BEvents;
   $fields = &main: BGetFieldsInDisplayOrder($db);
   }
elsif ($VIEW eq "Search") {
   $db = $main: BEvents;
   # Keep form values to populate form fields
   foreach (keys %in) {$name = $_; if ($name =~ s/^FIELD_//) { $search_params->{$name} = $in{$_}; } }
   }
else {
   &getEvents( {'duration'=>$in{duration}, 'range'=>$in{range}, 'startdate'=>$in{startdate}, 'enddate'=>$in{enddate} } );
   }
if ($GRID_ROW_COUNT > 0) {
   $rowheight = "HEIGHT=\"".int(90/$GRID_ROW_COUNT)."%\"";
   }

&getEvents( {'duration'=>$in{duration}} );
$DAY = $Grid->{'grid'}->

  • ->
  • ;
    $EVENTS = $DAY->{events};
    $total_events=3;
    %>
    <table border="0" font size="-2">
    <%FOREACH EVENTLIST%>
    <%IF EVENTS EXIST%>
    <tr>
    <td><a href="http://arppix.com/iracal/calendar.pl?view=Event&event_id=($in{'event_id'})&event_id=<%= EVENT FIELD(id) %>">
    <%$total_events++;%>
    <b><%=$DAY->{monthname}%>  <%=$DAY->{dd}%></a> </b>
    </td>
    <td>
    <%FOREACH EVENT%>
    <li></u><a href="http://arppix.com/iracal/calendar.pl?view=Event&event_id=($in{'event_id'})&event_id=<%= EVENT FIELD(id) %>">
    <small><b><%= $EVENT->{'details'}->{'title'} %> </a></B> <%= $EVENT->{'details'}->{'eventtitle'} %>
    <i><%= $EVENT->{'details'}->{'location'} %> </i></B>  <i>
    <% if ($EVENT->{'schedule'}->{'start_time'}) { %><%= $EVENT->{'schedule'}->{'start_time'} %><% } %></small>

    <% if ($EVENT->{'schedule'}->{'start_time'}) { %>  <% } %></li></i></small>
    <%/FOREACH%>
    </td>
    </tr>
    <%/IF%>
    <%/FOREACH%></font>
    </table>
    <%unless($total_events){%>
    <p><strong><em>No Events</em></strong></p>
    <% } %>

    You can see the results over at www.irasprints.com.   Thanks for your direction.

    ------------------
    Don't ask a question if your afraid of the answer!

Logged

Don't ask a question if your afraid of the answer!
DanO
Moderator
Full Member
*****

Karma: 13
Offline Offline

Posts: 230

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


WWW
« Reply #4 on: March 07, 2005, 09:48:00 PM »

** Nevermind. **

You still have this is your code in 2 places which shouldn't be:

&event_id=($in{'event_id'})

JFYI

Dan O.

[This message has been edited by DanO (edited March 08, 2005).]

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