[EventCalendar] Re: EventCalendar3, calendar on WP Page

Alex Tingle alex at firetree.net
Mon Nov 14 10:29:07 UTC 2005


That's a neat idea. I've put it on my 'to do' list for a future release.

-Alex

--
Dammit Jim, I'm a programmer... not a mind reader!
On 4 Nov 2005, at 15:25, Mathijs de Meijer wrote:

> Dear Alex,
>
> First of all I would like to say that I find you EventCalendar3 plugin 
> for
> WordPress very usefull, by far the most extensive calendar plugin I've 
> seen
> for WP.
> I found one feature lacking though; putting the calendar on a WP Page 
> instead
> of the sidebar.
> Inserting this code (attached below) into the eventcalendar3.php and 
> adding
>
> 	"<!--ec3_get_calendar_page-->"
>
> to the page where you want the calendar to show, I was able to add the
> feature.
> I have by no means tested it thoroughly, but thought you might be 
> interested.
>
> Let me know what you think, bye,
>
> Mathijs de Meijer
>
> -- code --
>
> define('EC3_CALENDAR_PAGE', '<!--ec3_get_calendar_page-->');
> function ec3_get_calendar_page($data)
> {
> 	$start = strpos($data, EC3_CALENDAR_PAGE);
> 	
> 	if ( $start !== false )
> 	{
> 		ob_start();
> 		
> 		ec3_get_calendar();
> 		
> 		$contents = ob_get_contents();
> 		ob_end_clean();
> 		
> 		$data = substr_replace($data, $contents, $start, 
> strlen(EC3_CALENDAR_PAGE));
> 	}
> 	
> 	return $data;
> }
> add_filter('the_content', 'ec3_get_calendar_page', 10);
>




More information about the EventCalendar mailing list