Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

ckeditor breaking my pages


RAC

Recommended Posts

Hi all.

 

I am running bs edge and have just installed ckeditor full package for the bs version.

 

In my admin side everything looks great, the ckeditor box comes up under all editing planes, however when I edit a page, for example shipping.php, my page shop side breaks.

 

On checking shipping.php through cPanel, there are extra characters added to the start and end of the page :

 

<p><!--?php

/*

  $Id$

 

  osCommerce, Open Source E-Commerce Solutions

  http://www.oscommerce.com

 

  Copyright (c) 2002 osCommerce

 

  Released under the GNU General Public License

*/

 

define('NAVBAR_TITLE', 'Shipping &amp; Returns');

define('HEADING_TITLE', 'Shipping &amp; Returns');

 

define('TEXT_INFORMATION', 'Put here your Shipping &amp; Returns information.');

?--></p>

 

Any suggestions?

 

Shaun

Link to comment
Share on other sites

I am still having issues with this!

Looking back at one of my previous posts, (when I was using 2.3.4 non bs), I was told that ckeditor can't be used to edit the information pages, is this still the case with the edge version?

When I access admin/tools/define languages/shipping.php the ckeditor automatically opens, there seems to be no other way to edit these pages through the define languages route. How can I remove ckeditor from these pages? or do I have to edit through cPanel?

It seems that I can edit my products page without a problem, at least it seems not to break the page.

Link to comment
Share on other sites

The editor will work with any textarea form. But it should not be used when the page contains php. There are ways to make it work but usually not worth the effort, in my opinion.

The ckeditor addon that most use adds code to the template_top file to load the editor for any page. That can cause problems, as you are discovering. The code needs to be changed to exclude pages that you don't want the editor to wok on. If you surround that code with something like this (not tested), it should work.

if (basename($PHP_SELF) === 'define_languages.php') {

...ckeditor block goes here

}

There is a less common method that does away with that code and each textarea to be edited is changed. That gives more control but requires more coding.

If you are just editing language files that don't use php in the text, you can install TextMaster. That will allow you to use the editor on the language files without worrying about the underlying php.

 

Support Links:

For Hire: Contact me for anything you need help with for your shop: upgrading, hosting, repairs, code written, etc.

All of My Addons

Get the latest versions of my addons

Recommended SEO Addons

Link to comment
Share on other sites

OK, thank you Jack.

I already had TextMaster installed, but I hadn't set it up, now I have, I can see how to edit these files.

It is difficult trying to get my head around what I have installed and for what reason, thanks to people like you these things do click into place.

I don't think that I want to change the code as you suggested, I am rather limited here, as I have only basic understanding of coding, hopefully this shouldn't cause problems I just need to REMEMBER what you have said:blink:!

Thanks again Jack.

 

Shaun 

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...