Project

General

Profile

1 1621 darkviper
//:Display one defined WYSIWYG section
2 1657 Luisehahne
//:Use [[ShowWysiwyg?section=10]]
3 1686 darkviper
global $database, $section_id;
4 1621 darkviper
	$content = '';
5
	$section = isset($section) ? intval($section) : 0;
6
	if ($section) {
7
		if (is_readable(WB_PATH.'/modules/wysiwyg/view.php')) {
8
		// if valid section is given and module wysiwyg is installed
9
			$iOldSectionId = intval($section_id); // save old SectionID
10
			$section_id = $section;
11
			ob_start(); // generate output by regulary wysiwyg module
12
			require(WB_PATH.'/modules/wysiwyg/view.php');
13
			$content = ob_get_clean();
14 1686 darkviper
			$section_id = $iOldSectionId; // restore old SectionId
15 1621 darkviper
		}
16
	}
17
return $content;