[evolvis-commits] r11302: Forums changed to use the FCKeditor plugi?==?UTF-8?Q?n↵
mirabilos at evolvis.org
mirabilos at evolvis.org
Thu Feb 24 18:07:12 CET 2011
Author: mirabilos
Date: 2011-02-24 18:07:12 +0100 (Thu, 24 Feb 2011)
New Revision: 11302
Modified:
trunk/gforge_base/evolvisforge-5.1/gforge/www/forum/admin/index.php
trunk/gforge_base/evolvisforge-5.1/gforge/www/forum/include/ForumHTML.class
Log:
Forums changed to use the FCKeditor plugin
Modified: trunk/gforge_base/evolvisforge-5.1/gforge/www/forum/admin/index.php
===================================================================
--- trunk/gforge_base/evolvisforge-5.1/gforge/www/forum/admin/index.php 2011-02-24 17:07:10 UTC (rev 11301)
+++ trunk/gforge_base/evolvisforge-5.1/gforge/www/forum/admin/index.php 2011-02-24 17:07:12 UTC (rev 11302)
@@ -273,8 +273,10 @@
}
$subject = getStringFromRequest('subject');
$body = getStringFromRequest('body');
+
$sanitizer = new TextSanitizer();
$body = $sanitizer->SanitizeHtml($body);
+
$is_followup_to = getStringFromRequest('is_followup_to');
$form_key = getStringFromRequest('form_key');
$posted_by = getStringFromRequest('posted_by');
Modified: trunk/gforge_base/evolvisforge-5.1/gforge/www/forum/include/ForumHTML.class
===================================================================
--- trunk/gforge_base/evolvisforge-5.1/gforge/www/forum/include/ForumHTML.class 2011-02-24 17:07:10 UTC (rev 11301)
+++ trunk/gforge_base/evolvisforge-5.1/gforge/www/forum/include/ForumHTML.class 2011-02-24 17:07:12 UTC (rev 11302)
@@ -495,15 +495,17 @@
<strong><?php echo $Language->getText('forum_utils','message'); ?></strong><?php echo notepad_button('document.forms[1].body') ?><?php echo utils_requiredField(); ?><br />
<?php //$text_support->displayTextField('body',$body); ?>
<?php
- //plugin_hook("text_editor");
- $oFCKeditor = new FCKeditor('body') ;
- $oFCKeditor->BasePath = $http . $sys_default_domain . '/include/fckeditor/';
- $oFCKeditor->Value = $body;
- $oFCKeditor->Width = "800";
- $oFCKeditor->Height = "500";
- $oFCKeditor->Create() ;
+ $params['body'] = $body;
+ $params['width'] = "800";
+ $params['height'] = "500";
+ $params['group'] = $group_id;
+ plugin_hook("text_editor",$params);
+ if (!$GLOBALS['editor_was_set_up']) {
+ //if we don´t have any plugin for text editor, display a simple textarea edit box
+ echo '<textarea name="body" rows="10" cols="50" wrap="soft">' . $body . '</textarea>';
+ }
+ unset($GLOBALS['editor_was_set_up']);
?>
-<!-- <textarea name="body" rows="10" cols="50" wrap="soft"><?php //echo $body; ?></textarea> -->
<br><br>
<p>
@@ -526,7 +528,7 @@
}
function showPostForm($thread_id=0, $is_followup_to=0, $subject="") {
- global $Language,$sys_default_domain;
+ global $Language,$sys_default_domain,$group_id;
if (strtoupper(getStringFromServer('HTTPS')) == 'ON') {
$http = "https://";
@@ -563,15 +565,16 @@
<strong><?php echo $Language->getText('forum_utils','message'); ?></strong><?php echo notepad_button('document.forms[1].body') ?><?php echo utils_requiredField(); ?><br />
<?php
- //plugin_hook("text_editor");
- $oFCKeditor = new FCKeditor('body') ;
- $oFCKeditor->BasePath = $http . $sys_default_domain . '/include/fckeditor/';
- $oFCKeditor->Value = '';
- $oFCKeditor->Width = "800";
- $oFCKeditor->Height = "500";
- $oFCKeditor->Create() ;
-
- //echo '<textarea name="body" rows="10" cols="50" wrap="soft">' . $body . '</textarea>';
+ $params['body'] = $body;
+ $params['width'] = "800";
+ $params['height'] = "500";
+ $params['group'] = $group_id;
+ plugin_hook("text_editor",$params);
+ if (!$GLOBALS['editor_was_set_up']) {
+ //if we don´t have any plugin for text editor, display a simple textarea edit box
+ echo '<textarea name="body" rows="10" cols="50" wrap="soft">' . $body . '</textarea>';
+ }
+ unset($GLOBALS['editor_was_set_up']);
?>
<?php //$text_support->displayTextField('body'); ?>
<br><br>
More information about the evolvis-commits
mailing list