Pro jednoho klienta jsem musel na web doinstalovat novinky.
Při hledání modulu jsme narazil na News_Articles_Management_v2.110_2Pmod1 na www.zencart.cz
Stahl jsem jej ale zjistil jsme že je v CP1250 tak jsme jej musel upravit do UTF-8.
A současně jsem poté musel vyřešit problém s KCFEditorem
Warning: Missing argument 1 for FCKeditor::__construct(), called in /admin/news.php on line 368 and defined in /admin/includes/fckeditor_php5.php on line 42
Fatal error: Call to undefined method FCKeditor::CreateFCKeditor() in /admin/news.php on line 370
Nikde na netu jsem řešení nenašel
Změnil jsem tedy volani FCKeditoru a voala funguje
Níže je popsána úprava a vše zabalené v zipu
News_Articles_Management_v.2110_2Pmod1-utf8
// News Article Headline, Summary, & Content input
// • HTML Editors support for summary input
if (HTML_EDITOR_PREFERENCE == 'FCKEDITOR') {
echo '<td class="dataTableContent" align="left" colspan="4">';
$oFCKeditor = new FCKeditor('news_article_shorttext[' . $lang['id'] . ']') ;
$oFCKeditor->Width = '100%' ;
$oFCKeditor->Height = '130' ;
$oFCKeditor->Create() ;
echo '</td>';
} elseif (HTML_EDITOR_PREFERENCE == 'HTMLAREA') {
echo '<td class="dataTableContent" align="left" colspan="4">' . zen_draw_textarea_field('news_article_shorttext[' . $lang['id'] . ']', 'soft', '70', '10', (($news_article_shorttext[$lang['id']]) ? stripslashes($news_article_shorttext[$lang['id']]) : news_get_news_article_shorttext($nInfo->article_id, $lang['id'])), 'style="width: 100%"') . '</td>';
} else {
echo '<td class="dataTableContent" align="left" colspan="4">' . zen_draw_textarea_field('news_article_shorttext[' . $lang['id'] . ']', 'soft', '70', '5', (($news_article_shorttext[$lang['id']]) ? stripslashes($news_article_shorttext[$lang['id']]) : news_get_news_article_shorttext($nInfo->article_id, $lang['id'])), 'style="width: 100%"') . '</td>';
}
echo
‘<td class=“dataTableContent“ align=“left“> </td>’ .
‘</tr>’ .
‘<tr class=“dataTableRow“>’ .
‘<td class=“dataTableContent“ align=“left“ valign=“top“>’ . TEXT_NEWS_CONTENT . ‘<br /><a href=“javascript:preview(\’news_article_text[' . $lang['id'] . ‘]\’);“><em>’ . TEXT_NEWS_CONTENT_PREVIEW . ‘</em></a></td>’;
// News Article Headline, Summary, & Content input
// • HTML Editors support for content input
if (HTML_EDITOR_PREFERENCE == ‘FCKEDITOR’) {
echo ‘<td class=“dataTableContent“ align=“left“ colspan=“4″>’;
$oFCKeditor = new FCKeditor(‘$news_article_text[' . $lang['id'] . ‘]’) ;
$oFCKeditor->Value = news_get_news_article_text($nInfo->article_id, $lang['id']);
$oFCKeditor->Width = ‘100%’ ;
$oFCKeditor->Height = ‘250′ ;
$oFCKeditor->Create() ;
echo ‘</td>’;