Jump to content
Sign in to follow this  
www.in.no

[Contribution] CKEditor [wyswyg]

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

Share this post


Link to post
Share on other sites

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.

Share this post


Link to post
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

Share this post


Link to post
Share on other sites

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.

Share this post


Link to post
Share on other sites

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

 

Thanks for your reply.

 

No image upload selection TAB.

 

Best Regards,

Share this post


Link to post
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.

Share this post


Link to post
Share on other sites

Hello,

 

i've installed the contribution but it doesn't work. the editor will not be shown in the products.

 

i've installed a few of contribs but

if i load the categories.php (without changes) from osc and only make the changes in categorie.php

it doesn't work.

 

bye

Share this post


Link to post
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.

Share this post


Link to post
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

 

 

Share this post


Link to post
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/' );
};

Share this post


Link to post
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

Share this post


Link to post
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.

Share this post


Link to post
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

Share this post


Link to post
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.

Share this post


Link to post
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://forums.oscommerce.com/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

Share this post


Link to post
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

Share this post


Link to post
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

Share this post


Link to post
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',

Share this post


Link to post
Share on other sites

ok

it works on a clean osc

i'm going to check the diffrence

and let you know if i have with which contrib there is a conflict

Share this post


Link to post
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

Share this post


Link to post
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) {

Share this post


Link to post
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 ^_^

Share this post


Link to post
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 ***/ //-->

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×