1 |
1621
|
darkviper
|
//:Display one defined WYSIWYG section
|
2 |
1657
|
Luisehahne
|
//:Use [[ShowWysiwyg?section=10]]
|
3 |
1871
|
Luisehahne
|
global $database, $section_id, $module;
|
4 |
1745
|
Luisehahne
|
$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 |
|
|
$sectionAnchor = (defined('SEC_ANCHOR') && SEC_ANCHOR!='') ? SEC_ANCHOR.$section_id : 'section_'.$section_id;
|
13 |
1746
|
Luisehahne
|
echo PHP_EOL.'<div id="'.$sectionAnchor.'" class="wb_'.$module.'" >'.PHP_EOL;
|
14 |
1745
|
Luisehahne
|
require(WB_PATH.'/modules/wysiwyg/view.php');
|
15 |
|
|
echo PHP_EOL.'</div><!-- '.$module.$section_id.' -->'.PHP_EOL;
|
16 |
|
|
$content = ob_get_clean();
|
17 |
|
|
$section_id = $iOldSectionId; // restore old SectionId
|
18 |
|
|
}
|
19 |
|
|
}
|
20 |
1621
|
darkviper
|
return $content;
|