1 |
2
|
Manuela
|
//:Display one defined WYSIWYG section
|
2 |
|
|
//:Use [[ShowWysiwyg?section=10]]
|
3 |
|
|
global $database, $section_id, $module;
|
4 |
|
|
$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 |
|
|
$section_id = $iOldSectionId; // restore old SectionId
|
15 |
|
|
}
|
16 |
|
|
}
|
17 |
|
|
return $content;
|