Revision 1640
Added by Luisehahne over 13 years ago
| modify.php | ||
|---|---|---|
| 31 | 31 |
}else {
|
| 32 | 32 |
$content = ''; |
| 33 | 33 |
} |
| 34 |
if(!isset($wysiwyg_editor_loaded)) {
|
|
| 35 |
$wysiwyg_editor_loaded=true; |
|
| 36 | 34 |
|
| 37 |
if (!defined('WYSIWYG_EDITOR') OR WYSIWYG_EDITOR=="none" OR !file_exists(WB_PATH.'/modules/'.WYSIWYG_EDITOR.'/include.php')) {
|
|
| 38 |
function show_wysiwyg_editor($name,$id,$content,$width,$height) {
|
|
| 35 |
if(!function_exists('show_wysiwyg_editor'))
|
|
| 36 |
{
|
|
| 37 |
if (!defined('WYSIWYG_EDITOR') OR WYSIWYG_EDITOR=="none" OR !file_exists(WB_PATH.'/modules/'.WYSIWYG_EDITOR.'/include.php'))
|
|
| 38 |
{
|
|
| 39 |
function show_wysiwyg_editor($name,$id,$content,$width,$height) |
|
| 40 |
{
|
|
| 39 | 41 |
echo '<textarea name="'.$name.'" id="'.$id.'" style="width: '.$width.'; height: '.$height.';">'.$content.'</textarea>'; |
| 40 | 42 |
} |
| 41 | 43 |
} else {
|
| 42 |
$id_list = array(); |
|
| 43 |
$sql = 'SELECT `section_id` FROM `'.TABLE_PREFIX.'sections` '; |
|
| 44 |
$sql .= 'WHERE `page_id`='.(int)$page_id.' AND `module`=\'wysiwyg\''; |
|
| 45 |
if (($query_wysiwyg = $database->query($sql))) {
|
|
| 46 |
while($wysiwyg_section = $query_wysiwyg->fetchRow()) {
|
|
| 47 |
$entry='content'.$wysiwyg_section['section_id']; |
|
| 48 |
$id_list[] = $entry; |
|
| 49 |
} |
|
| 50 |
require(WB_PATH.'/modules/'.WYSIWYG_EDITOR.'/include.php'); |
|
| 51 |
} |
|
| 44 |
require(WB_PATH.'/modules/'.WYSIWYG_EDITOR.'/include.php'); |
|
| 52 | 45 |
} |
| 53 | 46 |
} |
| 54 | 47 |
|
| ... | ... | |
| 57 | 50 |
<input type="hidden" name="page_id" value="<?php echo $page_id; ?>" /> |
| 58 | 51 |
<input type="hidden" name="section_id" value="<?php echo $section_id; ?>" /> |
| 59 | 52 |
<?php |
| 60 |
echo $admin->getFTAN()."\n";
|
|
| 61 |
show_wysiwyg_editor('content'.$section_id,'content'.$section_id,$content,'100%','350');
|
|
| 53 |
echo $admin->getFTAN()."\n"; |
|
| 54 |
echo show_wysiwyg_editor('content'.$section_id,'content'.$section_id,$content,'100%','350');
|
|
| 62 | 55 |
?> |
| 63 | 56 |
<table summary="" cellpadding="0" cellspacing="0" border="0" width="100%" style="padding-bottom: 10px;"> |
| 64 | 57 |
<tr> |
Also available in: Unified diff
! optimize modules WYSIWYG for editors