Hi everyone,
I was having the same problem with FCKeditor as many of you so i took a look at the code. This is for zen 1.3.7, i don't know if it's retro compatible.
You need to change the file /admin/news.php
Find (around line 205):
Code:
// HTML Editors support
if (HTML_EDITOR_PREFERENCE == 'FCKEDITOR') {
require(DIR_WS_INCLUDES . 'fckeditor.php');
} elseif (HTML_EDITOR_PREFERENCE == 'HTMLAREA') {
require(DIR_WS_INCLUDES . 'htmlarea.php');
}
and replace with:
Code:
// HTML Editors support
if ($_SESSION['html_editor_preference_status']== "FCKEDITOR") {
require(DIR_WS_INCLUDES . 'fckeditor.php');
} elseif ($_SESSION['html_editor_preference_status']== "HTMLAREA") {
require(DIR_WS_INCLUDES . 'htmlarea.php');
}
Find (around line 366):
Code:
if (HTML_EDITOR_PREFERENCE == 'FCKEDITOR') {
echo '<td class="dataTableContent" align="left" colspan="4">';
$oFCKeditor = new FCKeditor;
$oFCKeditor->Value = (($news_article_shorttext[$lang['id']]) ? stripslashes($news_article_shorttext[$lang['id']]) : news_get_news_article_shorttext($nInfo->article_id, $lang['id']));
$oFCKeditor->CreateFCKeditor('news_article_shorttext[' . $lang['id'] . ']', '100%', '130') ; //instanceName, width, height (px or %)
echo '</td>';
} elseif (HTML_EDITOR_PREFERENCE == 'HTMLAREA') {
and replace with:
Code:
if ($_SESSION['html_editor_preference_status']=='FCKEDITOR') {
echo '<td class="dataTableContent" align="left" colspan="4">';
$oFCKeditor = new FCKeditor('news_article_shorttext[' . $lang['id'] . ']') ;
$oFCKeditor->Value = (($news_article_shorttext[$lang['id']]) ? stripslashes($news_article_shorttext[$lang['id']]) : news_get_news_article_shorttext($nInfo->article_id, $lang['id']));
$oFCKeditor->Width = '97%' ;
$oFCKeditor->Height = '150' ;
$output = $oFCKeditor->CreateHtml() ;
echo '<br />' . $output . '</td>';
} elseif ($_SESSION['html_editor_preference_status']=='HTMLAREA') {
Find (around line 386)
Code:
if (HTML_EDITOR_PREFERENCE == 'FCKEDITOR') {
echo '<td class="dataTableContent" align="left" colspan="4">';
$oFCKeditor = new FCKeditor;
$oFCKeditor->Value = (($news_article_text[$lang['id']]) ? stripslashes($news_article_text[$lang['id']]) : news_get_news_article_text($nInfo->article_id, $lang['id']));
$oFCKeditor->CreateFCKeditor('news_article_text[' . $lang['id'] . ']', '100%', '250') ; //instanceName, width, height (px or %)
echo '</td>';
} elseif (HTML_EDITOR_PREFERENCE == 'HTMLAREA') {
and replace with:
Code:
if ($_SESSION['html_editor_preference_status']=='FCKEDITOR') {
echo '<td class="dataTableContent" align="left" colspan="4">';
$oFCKeditor = new FCKeditor('news_article_text[' . $lang['id'] . ']') ;
$oFCKeditor->Value = (($news_article_text[$lang['id']]) ? stripslashes($news_article_text[$lang['id']]) : news_get_news_article_text($nInfo->article_id, $lang['id']));
$oFCKeditor->Width = '97%' ;
$oFCKeditor->Height = '400' ;
$output = $oFCKeditor->CreateHtml() ;
echo '<br />' . $outtut . '</td>';
} elseif ($_SESSION['html_editor_preference_status']=='HTMLAREA') {
That should do it!
Best regards to the zen community!
Bookmarks