Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

ckeditor


Recommended Posts

Well before i start i see there has been a lot of questions regarding image upload with ckeditor but after a few hours reading i dont seem to be getting anywhere so hope someone may have solved the problem and can give me a solution. Some time ago i installed ckeditor on my site and everything seemed to work fine until i tried to upload some images and found that there was no upload tab or browse server button. After reading something on the ckeditor site i found how to enable the upload tab but receive a error after pressing the send to server button. I have not found a way of enabling the browse server button. Has anybody found a way round this that will enable them to upload pictures from the local hard drive or do you need a licence from ckeditor to do this. Is there another wysiwyg editor other than ckeditor that has these functions as i read fckeditor used to have all these functions. Some help with this would be appreciated.

Link to comment
Share on other sites

Tony,

 

 

This is more common when you have Windowz hosting as some Windowz hosting providers will not allow the feature to function by default. If you have Windowz hosting, check with your hosting provider. If you do not, check the config.php file setting and alternately the php.ini file.

 

 

 

 

 

Chris

Link to comment
Share on other sites

I have the 2.3 and it very simple to adapt!

 

Just one difference on

4) Open file admin/categories.php

 

find:

</head>

Above add:

<script type="text/javascript" src="./ckeditor/ckeditor.js"></script>

 

this part must be in admin==>includes==>template_top

 

all is same

 

Francois

Link to comment
Share on other sites

Francois & Dunweb thanks for the replies, i installed the filemanager (already had ckeditor installed) and made the edits to the code as described in the pdf file with the exception of the one in the catagories.php (head) this was made in the includes/template_top as pointed out by francois. Now i have another problem, before making the change to the template_top file the ckeditor was showing when adding a product and all the buttons where visible (browse server, upload) but it did not function correctly and after making the edit to the template_top the ckeditor is no longer shown when adding a product have i done something wrong now or should i remove everything and do the install again cleanly without using the ckeditor that was previously installed ?

Link to comment
Share on other sites

Correction to my last post the reason for not seeing ckeditor was my fault and where i had placed the files in the wrong folder. This has been corrected now and the ckeditor is showing up but when i try to upload a file/photo i get the following error do i have something configured wrong in these files. the error is:-

Warning: require(C:/XAMPP/htdocs/catalog/admin/includes/configure.php) [function.require]: failed to open stream: No such file or directory in C:\XAMPP\htdocs\mammoth\admin\ckeditor\Filemanager\config.php on line 64

 

Fatal error: require() [function.require]: Failed opening required 'C:/XAMPP/htdocs/catalog/admin/includes/configure.php' (include_path='.;C:\XAMPP\php\PEAR') in C:\XAMPP\htdocs\mammoth\admin\ckeditor\Filemanager\config.php on line 64

Link to comment
Share on other sites

Hi, now i have looked at the file config in the filemanager and changed the line 64 to read 'C:/XAMPP/htdocs/mammoth/admin/includes/configure.php' and i now get the filemanager to open when selecting browse server however i still have a few problems. First i cannot get thumbnails to display just small red crosses and when i use the upload button i cannot see anything that allows me to select files so i am still wrong somewhere with this. Also if i use the upload tab from the image insert popup it allows me to select a image but when i press send to server the url box clears and then nothing happens, if i go to the browse server button the file i just sent to the server is not there

Link to comment
Share on other sites

Well here i am again, upto now i have been making the changes and tests on my local pc but just made a change to the site and can no longer get into the admin of the shop but just keep receiving this error

Parse error: syntax error, unexpected '<' in /home/mammot15/public_html/admin/includes/template_top.php on line 39

I cannot seem to find what the problem is and even when i replace the file with the backup i get the same error

Sorry to have to keep asking for assistance but this programming is very new to me and i am obviously doing something wrong can any body assist me with the problem so i can at least get the admin of my shop working again. The code from the template_top.php is:-

<?php

/*

$Id$

 

osCommerce, Open Source E-Commerce Solutions

http://www.oscommerce.com

 

Copyright © 2010 osCommerce

 

Released under the GNU General Public License

*/

 

$oscTemplate->buildBlocks();

 

if (!$oscTemplate->hasBlocks('boxes_column_left')) {

$oscTemplate->setGridContentWidth($oscTemplate->getGridContentWidth() + $oscTemplate->getGridColumnWidth());

}

 

if (!$oscTemplate->hasBlocks('boxes_column_right')) {

$oscTemplate->setGridContentWidth($oscTemplate->getGridContentWidth() + $oscTemplate->getGridColumnWidth());

}

?>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml" <?php echo HTML_PARAMS; ?>>

<?php

if (!defined('USE_CKEDITOR_ADMIN_TEXTAREA')) {

tep_db_query("insert into " . TABLE_CONFIGURATION . " (configuration_id, configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, date_added, set_function) values ('', 'Use CKEditor', 'USE_CKEDITOR_ADMIN_TEXTAREA','true','Use CKEditor for WYSIWYG editing of textarea fields in admin',1,99,now(),'tep_cfg_select_option(array(\'true\', \'false\'),' )");

define ('USE_CKEDITOR_ADMIN_TEXTAREA','true');

}

if (USE_CKEDITOR_ADMIN_TEXTAREA == "true") {

?>

<script type="text/javascript" src="<?php echo tep_href_link('ext/ckeditor/ckeditor.js'); ?>"></script>

<script type="text/javascript" src="<?php echo tep_href_link('ext/ckeditor/adapters/jquery.js'); ?>"></script>

<script type="text/javascript">

$(function() {

var $editors = $('textarea');

if ($editors.length) {

$editors.each(function() {

var editorID = $(this).attr("id");

var instance = CKEDITOR.instances[editorID];

if (instance) { CKEDITOR.remove(instance); }

CKEDITOR.replace(editorID);

});

}

});

</script>

<?php

}

?>

<head>

<meta http-equiv="Content-Type" content="text/html; charset=<?php echo CHARSET; ?>" />

<title><?php echo tep_output_string_protected($oscTemplate->getTitle()); ?></title>

<base href="<?php echo (($request_type == 'SSL') ? HTTPS_SERVER : HTTP_SERVER) . DIR_WS_CATALOG; ?>" />

<link rel="stylesheet" type="text/css" href="ext/jquery/ui/redmond/jquery-ui-1.8.6.css" />

<script type="text/javascript" src="ext/jquery/jquery-1.4.2.min.js"></script>

<script type="text/javascript" src="ext/jquery/ui/jquery-ui-1.8.6.min.js"></script>

 

<?php

if (tep_not_null(JQUERY_DATEPICKER_I18N_CODE)) {

?>

<script type="text/javascript" src="ext/jquery/ui/i18n/jquery.ui.datepicker-<?php echo JQUERY_DATEPICKER_I18N_CODE; ?>.js"></<script>

<script type="text/javascript">

$.datepicker.setDefaults($.datepicker.regional['<?php echo JQUERY_DATEPICKER_I18N_CODE; ?>']);

</script>

<?php

}

?>

 

<script type="text/javascript" src="ext/jquery/bxGallery/jquery.bxGallery.1.1.min.js"></script>

<link rel="stylesheet" type="text/css" href="ext/jquery/fancybox/jquery.fancybox-1.3.4.css" />

<script type="text/javascript" src="ext/jquery/fancybox/jquery.fancybox-1.3.4.pack.js"></script>

<link rel="stylesheet" type="text/css" href="ext/960gs/<?php echo ((stripos(HTML_PARAMS, 'dir="rtl"') !== false) ? 'rtl_' : ''); ?>960_24_col.css" />

<link rel="stylesheet" type="text/css" href="stylesheet.css" />

<?php echo $oscTemplate->getBlocks('header_tags'); ?>

</head>

<body>

 

<div id="bodyWrapper" class="container_<?php echo $oscTemplate->getGridContainerWidth(); ?>">

 

<?php

// BOF: WebMakers.com Added: Down for Maintenance

if ((DOWN_FOR_MAINTENANCE == 'false') ||

((DOWN_FOR_MAINTENANCE == 'true') && (DOWN_FOR_MAINTENANCE_HEADER_OFF == 'false')) ) {

require(DIR_WS_INCLUDES . 'header.php');

}

// EOF: WebMakers.com Added: Down for Maintenance

?>

 

<div id="bodyContent" class="grid_<?php echo $oscTemplate->getGridContentWidth(); ?> <?php echo ($oscTemplate->hasBlocks('boxes_column_left') ? 'push_' . $oscTemplate->getGridColumnWidth() : ''); ?>">

Link to comment
Share on other sites

Looks like a template_top from the catalog side, not the admin, to me.

 

Well... For the most part.

If I suggest you edit any file(s) make a backup first - I'm not perfect and neither are you.

 

"Given enough impetus a parallelogramatically shaped projectile can egress a circular orifice."

- Me -

 

"Headers already sent" - The definitive help

 

"Cannot redeclare ..." - How to find/fix it

 

SSL Implementation Help

 

Like this post? "Like" it again over there >

Link to comment
Share on other sites

You upload last ckeditor and last filemanager.

You put dezip filemanager in ckeditor.

You put in admin.

 

and you do all is explain in adobe file.

 

For exemple admin==>includes==>template_top

 

before </head>

 

just

<script type="text/javascript" src="./ckeditor/ckeditor.js"></script>

 

 

 

 

Francois

Edited by francois21
Link to comment
Share on other sites

Back again and still with install problems. I have now deleted all installed files / folders & edits of ckeditor download the current versions of ckeditor and filemanager from the web, and setup the folder as described in the install file. I have uploaded the folder to the admin and made the changes as described in the install, the only differance i noted was that the file in the phpthumb folder (phpThumb.config) is spelled different than the original (phpthumb.config, no capital T) is this meant to be so as copying it to the folder creates another file and does not overwrite the original. Now when i try to enter a product i do not get the ckeditor displayed under product description but just get a smaller input box with 15 in the left corner. When i originally had ckeditor running (without filemanager) it was installed slightly differently and in the admin/ext folder not directly under admin, this way everything worked ok without the file upload function. How can i find out what the problem is with the ckeditor and filemanager install so i can get it to work correctly

Link to comment
Share on other sites

I have temporally removed the code changes addins from the files that where modified and this as at least give me back the original product description box without the ckeditor. I really need to know now if this ckeditor and filemanager can be configured for osc 2.3 by just using the changes shown in the pdf install file or have other changes also to be made. Francois did you simply make the changes in pdf file for it to work correctly in version 2.3 or where there some changes made previously for ckeditor ? because i dont seem to be able to get it to work unless i am doing something incorrect.

I uploaded the folder with ckeditor and filemanager to the admin folder then made the change to admin/includes/functions/html_output.php by adding the extra code. Then in admin/categories.php changed the entries of tep_draw_textarea_field to tep_draw_textarea_ckeditor. Added <script type="text/javascript" src="./ckeditor/ckeditor.js"></script> to admin/includes/template_top.php over the <head> position. Installed the files from the admin folder overwriting existing files, then mad the mods to the admin/ckeditor/filemanager/config.php and admin/ckeditor/filemanager/phpthumb/phpthumb.config.php and added the line in admin/includes/configure.php but it will not work and do not know the reason why like i said in previous post just get a small product description box with no ckeditor and 15 in the left corner.

Urgent help required !!

Link to comment
Share on other sites

Sorry Francois i posted incorrectly, i have installed before </HEAD> and not <HEAD> as i said but ckeditor will still not work !. I get the same results when i make all the changes the product discription entry box changes to a small size with 15 in the top left corner, as soon as i remove the added code in the admin/includes/functions/html_output.php the product description box returns to it normal state without ckeditor installed (default osc). As i said in previous posts i previously had ckeditor installed and working ok without file upload function. This was installed from a previous contribution and the version of ckeditor was 3.5.2, i have (i think ) removed all mods and additions that where made to install the ckeditor and filemanager but still cannot get either ckeditor or filemanager to function. The only difference from the instructions is that the version of ckeditor i have now downloaded and installed is 3.6 will this make a difference ?. the only part of the instructions i am not sure about is the changes to the paths but i think i have set these correct.

So can anyone tell me why ckeditor will not show and why it simply changes the size of the product description box to very small and place 15 in the top left corner.

Link to comment
Share on other sites

In admin==>categories

tep_draw_textarea_ckeditor('products_description[' . $languages[$i]['id'] . ']', 'soft', '70', (isset($products_description[$languages[$i]['id']]) ? stripslashes($products_description[$languages[$i]['id']]) : tep_get_products_description($pInfo->products_id, $languages[$i]['id'])));

 

Francois

Link to comment
Share on other sites

Hi Francois, not sure what you are showing me in your last post. As i am still not able to get this to run in my live shop i have installed a clean copy of oscommerce 2.3 on my local drive with no contributions added and then installed the ckeditor and filemanager with code mods etc. When i run this using xampp i get the ckeditor to display and the filemanager to open when using the browse server button but the filemanager does not work correctly as there are some errors shown at the top of the window. The only thing i can see now is that there must be something in my live shop that is stopping ckeditor and filemanager from working but i dont know what it is. If i can get it to work on the local server then maybe i can compare the edited files with the shop files and see if there are any differences that may be the problem. All failing this i will have to try and go back to the earlier version of ckeditor 3.5.2 without the upload and browse server buttons as at least with this i had some functionality. If there is someone on the forum that offers a install service of ckeditor and filemanager on osc 2.3 please pm me with the details.

Link to comment
Share on other sites

my latest finds with my install on a clean osc 2.3 are that there is no difference with the results i get using ckeditor 3.5.2 or 3.6 so this is not the reason. When i run new product i get the ckeditor and all buttons are there (browse server & upload tab) however if i use the upload tab i can browse and select a file but after pressing 'upload to server' the url window clears but i cannot find the file anywhere on the server. Secondly if i use the browse server button then the filemanager window opens and i can select a image and insert it into the product description box, however the images will not display as thumbs and there is a fault described across the top of the filemanager window that says:- Strict Standards: Redifining already defined constructor for class Minify in C:\XAMPP\htdocs\osctest\admin\ckeditor\Filemanager\minify.php on line 275. what does this mean ?

It seems lots of people have this contribution running and went through the setup no problem so i cannot understand why i am having no luck

:'(

Link to comment
Share on other sites

Problems have been solved by removing completely this contribution (ckeditor & filemanager) and re-installing ckeditor in the old folder which was admin/ext/ckeditor and making the mods as per a older contribution, then downloading and adding the file manager from core five. After a little configuration of ckeditor and core five file manager everything seems to be working ok. Thanks everybody for the assistance pity i could not get it to work.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...