Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

[Contribution] CKEditor [wyswyg]


www.in.no

Recommended Posts

There was an update for this contribution on Jan 29, 2010 regarding changes to turn ckeditor on/off in admin. In the instructions:

 

 

 

I do not have such a file in sdmin or includes. So does one need this file to make this change?

 

Thanks.

 

Bennett

 

Note: I did remove the the FCKEditor and installed the new ver.

 

The update is what I am working with also and also do not have a file names information_manager.php (as best I can tell, that is a file that would be added with another contribution (info unlimited that adds unlimited pages in the info box - I tried that contrib and couldn't make it work)

 

If www.in.no is on line - can you please respond as my client is getting antsy on this one. Thanks

 

Sue

Link to comment
Share on other sites

  • Replies 84
  • Created
  • Last Reply

Top Posters In This Topic

Hi,

Thanks for your reply.

I do it according to your guide, but image upload still can't work.

 

Best Regards,

Sunrise99

Check folder permission, you may alter them. Also check your server log to se what error you get when trying to upload.

Link to comment
Share on other sites

Thanks to www.in.mo for emailing me the solution to my problem (add-in for on and off in admin not working) In case others get stuck, I had the following code in the header and then entered the add-in code, which duplicated the script and kept the editor on all the time. (I assume I entered the following when doing the full install, then added the on/off afterwards)

 

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

 

Sue

Link to comment
Share on other sites

  • 2 weeks later...

Then you would have to merge the code into the addon you use for editing front page. It is to add the ckeditor class to the textarea and make sure the javascript is loaded.

 

or use information page unlimited.

Link to comment
Share on other sites

Se the post before about testing the domo version of ckfinder.

One thing i forget to say there is that you also have to add

 

echo '<script type="text/javascript" src="./ckfinder/ckfinder.js"></script>';

 

to the javascript sections in the files you want ckeditor to work in.

Link to comment
Share on other sites

Make sure to check if the javascript is loaded as supposed.

 

Check page source.

 

Otherwise it should only be to add the ckeditor class as details in instructions.

 

If you are using the more advanced options with admin on/off, make sure it is set as on in admin.

Link to comment
Share on other sites

Se the post before about testing the domo version of ckfinder.

One thing i forget to say there is that you also have to add

 

echo '<script type="text/javascript" src="./ckfinder/ckfinder.js"></script>';

 

to the javascript sections in the files you want ckeditor to work in.

 

yes, I have add it under <script type="text/javascript" src="./ckeditor/ckeditor.js">.

 

example:

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

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

 

Best Regards,

sunrise99

 

 

Link to comment
Share on other sites

Check your ckfinder config.php

 

$baseUrl = 'http://www.xxxx.no/';
$baseDir = '/home/inno/public_html/xxxx/';

 

I also had some problems with the folders inside images folder. You have to create and set correct permission to

/images/_thumbs/

/images/_thumbs/Images/

 

And in ckeditor folder check config.js

 

CKEDITOR.editorConfig = function( config )
{
// Define changes to default configuration here. For example:
// config.language = 'fr';
// config.uiColor = '#AADC6E';
config.width = 800;
config.entities = false;
entities = false ;
config.enterMode = CKEDITOR.ENTER_BR;
config.contentsCss = 'contents.css';
CKFinder.SetupCKEditor( null, '../admin/ckfinder/' );
};

Link to comment
Share on other sites

hi,

 

i just installed Site Monitor, done the check for hacked files and i got this:

 

10 suspected hacked files found.

Hacked Files Found

admin/ckeditor/ckeditor.js

admin/ckeditor/_source/plugins/clipboard/dialogs/paste.js

admin/ckeditor/_source/plugins/dialog/plugin.js

admin/ckeditor/_source/plugins/dialogui/plugin.js

admin/ckeditor/_source/plugins/panel/plugin.js

admin/ckeditor/_source/plugins/wsc/dialogs/wsc.js

admin/ckeditor/_source/plugins/wysiwygarea/plugin.js

admin/ckeditor/plugins/clipboard/dialogs/paste.js

admin/ckeditor/plugins/wsc/dialogs/wsc.js

includes/modules/payment/paypal_standard.php

 

why?

Edited by ivagarfitt
Link to comment
Share on other sites

FIrst of all you may get more luck asking this in the sitemonitor forum. But normaly you may se files found as they may have code that can look susipisius.

 

You downnloaded ckeditor from a secure site.

 

You did run the "Delete Reference File" after installing ckeditor

The _source files you may delete.

You can also try to download again and replace the files and se if you get the same result.

Link to comment
Share on other sites

hi

im trying to install this contrib and make it works

but here's the problem :

When i try to make a new product,

the CKEditor appears on the edit page

when i click on preview the text is well formatted

but then when i click save

and look at the front-office, the text is not formatted.

so then i go back to the back-office and edit the new product i've made

and the text is unformated into the ckeditor area.

do you have any idea why it happens?

 

thanks

Link to comment
Share on other sites

I dont know what is happening here. It may be conflict with other addon.

 

I have had some problem when the textarea is set to hard, check if your textarea is set to hard, change to soft and test.

Link to comment
Share on other sites

Hi everyone,

 

I've been using FCKeditor and recently upgraded to CKEditor. It came to my attention that and links made with this (image links, anchor text links, etc) don't use tep_href_links and therefore don't hold the osCsid.

 

http://www.oscommerce.com/forums/topic/330479-what-is-the-oscsid-why-you-must-not-loose-it/page__st__120

 

Is there any way to alter a page made with CKEditor (a product page or index.php) so that whatever links I create are tep_href_link compatible?

 

Thanks,

 

Nick

Link to comment
Share on other sites

I think maybe you have to alter some of the ckeditor code to manage this. I will think you may find something in the plugin folder (image or link) or in some basic functions. But this is over my head at the moment.

Maybe there are some javascript gurus who is using ckeditor who want to check it out.

 

Is FCkeditor using the correct functions?

Edited by www.in.no
Link to comment
Share on other sites

I dont know what is happening here. It may be conflict with other addon.

 

I have had some problem when the textarea is set to hard, check if your textarea is set to hard, change to soft and test.

 

what do you mean???

where do i have to set it ?

in the /admin/includes/functions/html_output.php ?

where and how?

 

i'm going to test it on a clean osc

Link to comment
Share on other sites

in categories.php or in any file you have form for editing with ckeditor.

 

It is with the tep_draw_textarea function there is a value for soft/hard.

 

tep_draw_textarea_field('products_description[' . $languages[$i]['id'] . ']', 'soft', '70', '10',

Link to comment
Share on other sites

ok i've found the problem

there is a conflict with a security fix by TiM-SE

about the XSS issue in

/includes/functions/database.php

/admin//includes/functions/database.php

 

*** Find ***

 

function tep_db_input($string, $link = 'db_link') {

global $$link;

 

if (function_exists('mysql_real_escape_string')) {

return mysql_real_escape_string($string, $$link);

} elseif (function_exists('mysql_escape_string')) {

return mysql_escape_string($string);

}

 

return addslashes($string);

}

 

*** Replace with ***

 

// Added below for [TiM's osC Solutions] Safer Database Input Method: $allowable_tags = false

// To allow tags, either pass (boolean)true for all tags or example (string)'<b><i>' for certain tags.

function tep_db_input($string, $link = 'db_link', $allowable_tags = false) {

global $$link;

 

// BOF: [TiM's osC Solutions] Safer Database Input Method

if ($allowable_tags === false || is_string($allowable_tags)) {

$string = strip_tags($string, $allowable_tags);

}

// EOF: [TiM's osC Solutions] Safer Database Input Method

 

if (function_exists('mysql_real_escape_string')) {

return mysql_real_escape_string($string, $$link);

} elseif (function_exists('mysql_escape_string')) {

return mysql_escape_string($string);

}

 

return addslashes($string);

}

 

i'm going to send a message to TiM and see with him if he can fix that.

Thanks

Link to comment
Share on other sites

I think the solution is to put in the tags here.

 

Just change to true and se if it helps, then you can define what tags you allow.

 

// To allow tags, either pass (boolean)true for all tags or example (string)'<b><i>' for certain tags.

function tep_db_input($string, $link = 'db_link', $allowable_tags = false) {

Link to comment
Share on other sites

I think the solution is to put in the tags here.

 

Just change to true and se if it helps, then you can define what tags you allow.

 

// To allow tags, either pass (boolean)true for all tags or example (string)'<b><i>' for certain tags.

function tep_db_input($string, $link = 'db_link', $allowable_tags = false) {

 

yes that's what TiM-SE answered me ^_^

Link to comment
Share on other sites

If you are using ckeditor with information pages unlimited and have changed the file to use $_GET/POST you have to change the code for including javascript.

Se included code and compare to old. Only change from $action to $_GET[action]

 

<!-- /*** START CKEditor for product description and information page unlimites 2.07 ***/ //-->
<?php
if (CKEditor_use == 'true') { 
 if ($action == 'new_product' || $_GET['information_action'] == 'Added' || $_GET['information_action'] == 'Edit' || $action == 'new_category' || $action == 'edit_category') { 
   echo '<script type="text/javascript" src="./ckeditor/ckeditor.js"></script>'; 
   echo '<script type="text/javascript" src="./ckfinder/ckfinder.js""></script>'; 
}
}
?>
<!-- /*** END CKEditor for product description and information page unlimites 2.07 ***/ //-->

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...