Hello, I have been working on this file for several days now but I cannot seem to get it to work. This is a stand alone file (attached file below) that belongs to a PHP script called WebCalendar. I have installed and integrated the program into a non-profit site for ecological landscapers.
What I hope to do is to make this page:
http://melaweb.org/calendar.php
look like this page:
http://melaweb.org/calendar.html
I am trying to modify upcoming.php (the attached file upcoming.zip) so that the actual calendar event description appears beneath the calendar event title. Here's my wish list:
Event Date 1
Event Title 1
Event Description 1
Event Date 2
Event Title 2
Event Description 2
...
On upcoming.php file, I edited the code beginning on line 600 from:
if ( $ev_cnt > 0 ) {
echo "<!-- XXX -->\n";
//print "<dt>" . date_to_str ( $d, translate ( '__month__ __dd__' ), true, true ) . "</dt>\n<dd>";
echo '<dt class=newsdates style="color: #000; font-weight: bold; background: transparent url(../images/underline.gif) repeat-x bottom left;">' . date_to_str ( $d ) . "</dt>\n<dd>";
for ( $j = 0; $j < $ev_cnt && $numEvents < $maxEvents; $j++ ) {
print_upcoming_event ( $ev[$j], $d );
$numEvents++;
}
echo "</dd>\n";
}
To:
if ( $ev_cnt > 0 ) {
echo "<!-- XXX -->\n";
//print "<dt>" . date_to_str ( $d, translate ( '__month__ __dd__' ), true, true ) . "</dt>\n<dd>";
echo '<dt class=newsdates style="color: #000; font-weight: bold; background: transparent url(../images/underline.gif) repeat-x bottom left;">' . date_to_str ( $d ) . "</dt>\n<dd>";
for ( $j = 0; $j < $ev_cnt && $numEvents < $maxEvents; $j++ ) {
print_upcoming_event ( $ev[$j], $d );
$numEvents++;
}
echo "</dd>\n<dd>";
echo $eventinfo;
echo "<br><br></dd>\n";
}
The variable $eventinfo is the event description.
However, this makes the calendar event description repeat itself after the first upcoming event as follows:
Event Date 1
Event Title 1
Event Description 1 (this is good, right?)
Event Date 2
Event Title 2
Event Description 1 (This is NOT good, I don't want the description of the first event here)
Event Description 2
Does anyone have any suggestions? There should be a way to simply call the event description that corresponds to the event title and date.
I hope anyone can help cure my madness.