[EventCalendar] Re: big calendar error

firetree_ec3 at spamex.com firetree_ec3 at spamex.com
Wed Dec 12 20:48:11 UTC 2007


On Dec 12, 2007, at 3:07 PM, admin at vancouverfolk.com wrote:
> one other question: when these minor issues get resolved, i'm not  
> clear exactly how to invoke the full-page calendar. do i create a  
> new page with the style tags you've mentioned? i see nothing on the  
> plugin page or the wordpress options that reference the big calendar.

I don't know if the full-page calendar has been integrated into the  
regular trunk yet. If it has, here is how I do it:

There is a horrible, horrible plugin out there, called "Inline PHP",  
and another called "Exec-PHP" that people say you need to run these in  
pages.

DON'T DO IT! These plugins are like mooning a mad bull! They let  
anyone with posting privileges (or anyone that can figure out how to  
hack them) to execute raw PHP in your blog! You might as well save  
yourself the trouble and post your root password.

Do this instead:

I made these mods to my theme's "functions.php" file:

---

add_filter ('the_content','check_for_big_calendar',20);	// Intercepts  
page and post content.

// Add the text "<!-- BIG_ASS_CALENDAR -->" using the code view on any  
page. It will be replaced by the calendar.

function check_for_big_calendar ( $in_thecontent )
{
	if ( preg_match ( "/<!-- BIG_ASS_CALENDAR -->/", $in_thecontent ) )
		{
		ob_start();
		ec3_get_calendar ( '', 1 );
		$calendar = ob_get_contents();
		ob_end_clean();
		$in_thecontent = preg_replace ( "/(<p[^>]*>)<!-- BIG_ASS_CALENDAR -- 
 >(<\/p[^>]*>)/", $calendar, $in_thecontent );
		}
	return $in_thecontent;
}

Chris



More information about the EventCalendar mailing list