but i see image in Catalog Area Screenshots, they used editor in new articles management success.
i want made same this
http://www.dream-scape.com/pub/zenca...s/Admin009.jpg
Printable View
but i see image in Catalog Area Screenshots, they used editor in new articles management success.
i want made same this
http://www.dream-scape.com/pub/zenca...s/Admin009.jpg
Hi! I just installed the news & article management. Good stuff, thank you! I have two questions.
The bit that says Recent Zen Cart News is rather huge, and it gets overlapped by the date bar. Can you tell me what I need to edit in the stylesheet to fix that?
Also, how do I change 'Recent Zen Cart News' to something more appropriate for my site?
Thanks!
I have no idea why?
my zc is 1.3.7
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):
and replace with: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');
}
Find (around line 366):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');
}
and replace with: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') {
Find (around line 386)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') {
and replace with: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') {
That should do it!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') {
Best regards to the zen community!
I found another error that was making my news edit page take almost 5 minutes to show.
Everytime you want to insert or edit an article, the "Store product link" gets all the products from the database. I have 12 languages in my store (s) and almost 600 products.
The problem is that the 1st language was getting 600 produtcs, the 2nd language 1200, the 3rd 1800 products and so on... when the page finished loading i had 46800 product links in dropdown menus on a single page.
A big problem with an easy solution
Find:
and move it before:Code:$dropdown_products = $db->Execute("select p.products_id, pd.products_name from " . TABLE_PRODUCTS . " p, " . TABLE_PRODUCTS_DESCRIPTION . " pd where pd.products_id = p.products_id and pd.language_id = '" . (int)$lang['id'] . "' order by pd.products_name");
$dropdown_products_array[] = array(
'id' => '',
'text' => TEXT_PLEASE_SELECT,
);
while (!$dropdown_products->EOF) {
$dropdown_products_array[] = array(
'id' => $dropdown_products->fields['products_id'],
'text' => $dropdown_products->fields['products_name'],
);
$dropdown_products->MoveNext();
}
This way it's outside the loop!Code:foreach ($languages as $i => $lang) {
I'm attaching the file "news.php" in zip format.
Regards
If you wish to use FCKeditor for newsletters, there is a one line fix here:
http://www.zen-cart.com/forum/showthread.php?t=58779
I've had this installed for a while now, and working fine, until I upgraded to 1.3.7.
Now, it looks like this: http://play2winbilliards.com/index.php?main_page=news
My right column is pushed way to the bottom, and I can't for the life of me figure out where this is falling apart.........
Any ideas?
Thanks a_berezin, that's what i was looking for!
The method i used was for the "old days"... :)