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: List of events with details  (Read 421 times)
0 Members and 1 Guest are viewing this topic.
JackVinson
New Member
*

Karma: 0
Offline Offline

Posts: 0


« on: July 20, 2003, 11:06:00 AM »

Is there an easy way to generate a list of upcoming events with the details?  Has anyone created a template to do this already?  

I am thinking either a two-column table with event on the left and details on the right.  Or a simple list with Event, followed by its details.

If it hasn't been done yet, I understand the code enough to do it myself.  It's just easier to start with someone else's work.

Jack

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: July 20, 2003, 04:17:00 PM »

** Is there an easy way to generate a list of upcoming events with the details? **

The ssi.html template does it, just without the details. All you would need to do is add the appropriate tag to display the event's details field?

** Has anyone created a template to do this already? **

Have you tried looking at what templates are available at the Unofficial CalendarScript - Mods and Plugins site?

Dan O.

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

Logged
JackVinson
New Member
*

Karma: 0
Offline Offline

Posts: 0


« Reply #2 on: September 23, 2003, 12:10:00 PM »

I will need to check this again, but when I looked at first, it appeared that the basic list and the details listing access two completely different files.  No big deal, but this seemed to involve a different set of code that I could not easily modify...

Jack

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

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

** it appeared that the basic list and the details listing access two completely different files. **

Any field which is in the Event database can be printed as long at the template accesses that db. Any template that displays the event title can display the event details, etc. as well.

Dan O.


[This message has been edited by DanO (edited September 23, 2003).]

Logged
JackVinson
New Member
*

Karma: 0
Offline Offline

Posts: 0


« Reply #4 on: September 29, 2003, 05:00:00 PM »

Okay, this was pretty easy, once I looked a little harder.  I don't know what I thought was the problem.  

I am using the fullyear template, so that I can get 90-day and full-year calendars.  But this should work with any template that uses the List style.

Search for the

code:
$STYLE eq "List"

section of code.  Within this is the information for how the list should look.  I have modified the original from simply displaying a bulleted list of events to include the description of each event.  

The new code for the one line is:

code:
<table border=1><tr><td><%= EVENT FIELD(title) %></td><td> <%= EVENT FIELD(description) %></td></tr></table>

Obviously, I am doing this as a table, so that the event and the description attach nicely.  I have also removed the bullet from the ForEach loop (• .

If someone could tell me how to automatically convert url's in the descriptions into clickable URL's, that would be great too.  (It works on the detail view, just not in the list view.)

Thanks!

Jack

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

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: September 30, 2003, 12:23:00 PM »

** If someone could tell me how to automatically convert url's in the descriptions into clickable URL's **

That is done in the "sub getEvent" routine in the calendar.pl file in the lines which follow:
if ($Config->get("auto_link")) {

You can try modifying the "sub getEvents" routine (note the ending "s")
and add similar code there. I don't know exactly where it would go though.

Or you could duplicate the "sub getEvents" routine and make the modifications in
it as a plug-in to be called by the display_before_getEvents CalendarScript
hook so as to not alter the existing calendar.pl file.

Dan O.

[This message has been edited by DanO (edited September 30, 2003).]

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