[EventCalendar] Several months display?

Rick Boatright rboatright at gmail.com
Thu Oct 16 22:14:56 UTC 2008


it _is_ possible to edit template_functions.php to provide multiple
calendars.

If you don't CARE about valid xhtml (bad idea, but some people may not) you
can just comment out the if statement that kills multiple instances.

If you _do_ care, the following diff will add a "uniqifier" to each id in a
calender for each call.  -- this works and verifies, although it's a little
ugly....

(this diff is against 3.2.dev)

Rick

---
>   echo "\t    <a id='ec3_publish' href='$webcal'"
98c98
<   echo "\t<td id='next_n$ec3->call_count'><a
id='ec3_next_n$ec3->call_count' href='" . $next->month_link() . "'"
---
>   echo "\t<td id='next'><a id='ec3_next' href='" . $next->month_link() .
"'"
207c207
<   echo "<table id='" . $date->month_id() . "_n" . $ec3->call_count .
"'>\n<caption>"
---
>   echo "<table id='" . $date->month_id() . "'>\n<caption>"
236c236
<     echo "<td id='$day_id" . "_n$ec3->call_count'";
---
>     echo "<td id='$day_id'";
289a290,294
>   if($ec3->call_count>1)
>   {
>     echo "<!-- You can only have one Event Calendar on each page. -->\n";
>     return;
>   }
291,300c296
<  //Attempt to fix multiple calendar identity problems - RBoatright
<  // if($ec3->call_count>1)
<  // {
<  //   echo "<!-- You can only have one Event Calendar on each page.
-->\n";
<  //   return;
<  // }
<
<   echo "<div class='wp-calendar'>\n";
<   //add unique dive for each call
<   echo "<div id='Calendar-number_n$ec3->call_count'>\n";
---
>   echo "<div id='wp-calendar'>\n";
329,330c325,326
<   echo "</div>\n"; //calendar-count
<   echo "</div>\n"; //wp-calendar
---
>   echo "</div>\n";
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://penguin.firetree.net/pipermail/eventcalendar/attachments/20081016/933a016e/attachment-0001.html


More information about the EventCalendar mailing list