function testContent()
 {
     $tmpFlag = BlogEntry::$allow_wysiwyg_editing;
     BlogEntry::$allow_wysiwyg_editing = true;
     $entry = $this->objFromFixture('BlogEntry', 'testpost');
     $entry->Content = '<a href="admin">the CMS</a>';
     $this->assertEquals('<a href="admin">the CMS</a>', $entry->Content());
     BlogEntry::$allow_wysiwyg_editing = $tmpFlag;
 }
Beispiel #2
0
	/**
	 * Call this to enable WYSIWYG editing on your blog entries.
	 * By default the blog uses BBCode
	 */
	static function allow_wysiwyg_editing() {
		self::$allow_wysiwyg_editing = true;
	}
// Default administrator account for the CMS
Security::setDefaultAdmin('admin', 'password');

// Theme should be located in /themes/<themename> (Default folder: '/themes/mysite')
SSViewer::set_theme('mysite');

// Recipe: Taggable
DataObject::add_extension('SiteTree', 'Taggable');

// Recipe: Redirection of legacy URLs
Director::addRules(1, array(
	'$URLSegment//$Action/$ID/$OtherID' => 'CustomModelAsController',
));

// Recipe: Branding the CMS
LeftAndMain::setApplicationName(
	'My Kiwi CMS',
	'My Kiwi CMS',
	'http://mykiwicms.com'
);
LeftAndMain::setLogo(
	'mysite/images/kiwicmslogo.gif',
	'width: 62px; height: 32px;'
);
LeftAndMain::set_loading_image(
	'mysite/images/kiwicmslogo_loading.png'
);
LeftAndMain::require_css('mysite/css/kiwicms.css');

BlogEntry::$allow_wysiwyg_editing = true;
?>