Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

FCK WYSIWYG HTML editor


spooks

Recommended Posts

I though I`d start this new topic for this contribution as there does'nt appear to be one.

 

This editor can be used to replace any input box and allows many functions normally only seen on commercial packages.

 

It can be easily configured to take the site css files, plus you can add extra fonts, sizes etc. If you need its possible to change a editor instance background colour/image/styles post load.

 

Contribution is at http://addons.oscommerce.com/info/2900.

Sam

 

Remember, What you think I ment may not be what I thought I ment when I said it.

 

Contributions:

 

Auto Backup your Database, Easy way

 

Multi Images with Fancy Pop-ups, Easy way

 

Products in columns with multi buy etc etc

 

Disable any Category or Product, Easy way

 

Secure & Improve your account pages et al.

Link to comment
Share on other sites

Hi Community,

 

I already build FCKEditor 2.5b and "MorePics for FCK-Editor".

I become the Error-Message:

Call to undefined function tep_draw_file_field_image_fckeditor()

i don't find this function in the "general.php" or other data.

Can you help me ?

 

Latux

Link to comment
Share on other sites

I would advise upgrading to 2.6, as 2.5 does have bugs.

 

I`m not sure what you have done to create this error as that call should not appear anywhere within your files, the only calls to fck should be in /html_output.php

 

and they are:

 

function tep_draw_fckeditor($name, $width, $height, $text) {

 

$oFCKeditor = new FCKeditor($name);

$oFCKeditor -> Width = $width;

$oFCKeditor -> Height = $height;

$oFCKeditor -> BasePath = 'fckeditor/';

$oFCKeditor -> Value = $text;

$field = $oFCKeditor->Create($name);

 

return $field;

}

 

As you see, your call is`nt there!!!

 

:huh:

Sam

 

Remember, What you think I ment may not be what I thought I ment when I said it.

 

Contributions:

 

Auto Backup your Database, Easy way

 

Multi Images with Fancy Pop-ups, Easy way

 

Products in columns with multi buy etc etc

 

Disable any Category or Product, Easy way

 

Secure & Improve your account pages et al.

Link to comment
Share on other sites

I though I`d start this new topic for this contribution as there does'nt appear to be one.

 

This editor can be used to replace any input box and allows many functions normally only seen on commercial packages.

 

It can be easily configured to take the site css files, plus you can add extra fonts, sizes etc. If you need its possible to change a editor instance background colour/image/styles post load.

 

Contribution is at http://addons.oscommerce.com/info/2900.

 

 

I might be thick but how do you get this editor to work, I've followed all the instructions and installed FCK Editor but how do you get it to edit your PHP files using the OS Commerce Admin Panel - nothimg seem to have changed

 

Regards

 

Jonellie51

Link to comment
Share on other sites

Are you sure you followed it all?

 

The install adds a new function to html_output.php called tep_draw_fckeditor

 

then where ever you want to use the editor, you call that function, the install gives examples for categories.php and mail.php but the rule is simply where you have the call tep_draw_textarea_field you replace with tep_draw_fckeditor remebering to change the parameters sent to suit

 

those are tep_draw_fckeditor ( forms_referance_id, width_of_window, height_of_window, existing_file_for_edit )

 

Hope that makes things clearer.

 

B)

Sam

 

Remember, What you think I ment may not be what I thought I ment when I said it.

 

Contributions:

 

Auto Backup your Database, Easy way

 

Multi Images with Fancy Pop-ups, Easy way

 

Products in columns with multi buy etc etc

 

Disable any Category or Product, Easy way

 

Secure & Improve your account pages et al.

Link to comment
Share on other sites

Are you sure you followed it all?

 

The install adds a new function to html_output.php called tep_draw_fckeditor

 

then where ever you want to use the editor, you call that function, the install gives examples for categories.php and mail.php but the rule is simply where you have the call tep_draw_textarea_field you replace with tep_draw_fckeditor remebering to change the parameters sent to suit

 

those are tep_draw_fckeditor ( forms_referance_id, width_of_window, height_of_window, existing_file_for_edit )

 

Hope that makes things clearer.

 

B)

 

Sorry I had to go out - then I realised what I was doing wrong - it works perfectly (and always has done) - I foolishly thought it would appear as an editor in the tools section. I did not realise it only edited the products discription - I do now.

 

Thanks anyway for your help and advice

 

Regards

 

John

Link to comment
Share on other sites

Sorry I had to go out - then I realised what I was doing wrong - it works perfectly (and always has done) - I foolishly thought it would appear as an editor in the tools section. I did not realise it only edited the products discription - I do now.

 

Thanks anyway for your help and advice

 

Regards

 

John

 

It does'nt just do product description, it can work anywhere you choose, I use it for admin emails, Newsletters, NewsDesk Articals, reviews & Create / Edit Pages, it can be used anywhere you want to input html content.

 

:D

Sam

 

Remember, What you think I ment may not be what I thought I ment when I said it.

 

Contributions:

 

Auto Backup your Database, Easy way

 

Multi Images with Fancy Pop-ups, Easy way

 

Products in columns with multi buy etc etc

 

Disable any Category or Product, Easy way

 

Secure & Improve your account pages et al.

Link to comment
Share on other sites

I've tried installing this for osc 2.2 rc2a (latest)

 

- It just doens't work the products description page just shows nothing where the wysiwyg should be!!

 

 

I just changed html output.php, and categories.php in osc

and config.php in fck!!

 

Is there any way I can debug or upload something to test???

 

I'm hitting a brick wall --- has it been tested to work in osc 2.2 rc2a?

 

Can anyone give me a url to a wysiwyg that works in 2.2 rc2a?

 

 

help!

 

I though I`d start this new topic for this contribution as there does'nt appear to be one.

 

This editor can be used to replace any input box and allows many functions normally only seen on commercial packages.

 

It can be easily configured to take the site css files, plus you can add extra fonts, sizes etc. If you need its possible to change a editor instance background colour/image/styles post load.

 

Contribution is at http://addons.oscommerce.com/info/2900.

Link to comment
Share on other sites

I think the fact the title of the zip file you downloaded is .... Install for OSC2.2rc1.zip might just perhaps make you think its not been tested with rc2!!

 

That said I can't see why it shouldent work, fck mearly emulates a form input field, but with loads of javascript for all the fancy stuff, on that point you have'nt got javascript disabled have you? What browsers have you tried it with?

 

If your sure you`ve not made any errors, you could add this to the page ( immediatly after an instance of fck) this javascript should report the successful start of FCK

 

<script language="javascript"><!--

function FCKeditor_OnComplete( editorInstance )

{

alert ("editor reports startup complete");

var oEditor;

var oEditor = FCKeditorAPI.GetInstance('products_description[1]') ;

if ( oEditor != null ) alert("editor instance found"); else alert("instance not found");

}

//--></script>

 

You will need to refresh your cache to ensure new code get loaded

This is testing for a english instance so will fail if your using another language.

 

 

;)

Sam

 

Remember, What you think I ment may not be what I thought I ment when I said it.

 

Contributions:

 

Auto Backup your Database, Easy way

 

Multi Images with Fancy Pop-ups, Easy way

 

Products in columns with multi buy etc etc

 

Disable any Category or Product, Easy way

 

Secure & Improve your account pages et al.

Link to comment
Share on other sites

Hello,

 

I just tried to install FCK on my site.

When i go into the categories page, i only see the text: Products Description:

It would seem that no instance of FCK is present.

 

In my config, i am not sure what to put for $Config['UserFilesPath'] = '/catalog/' ;

My site sits in the root.

 

if you could offer some assistance, id be greatfull.

 

If you have a root site put $Config['UserFilesPath'] = '/' ;

 

If your seeing nothing it may be that you`ve done something to create a javascript error, you can see if that's the case by turning off 'disable script debugging' its in advanced settings.

Sam

 

Remember, What you think I ment may not be what I thought I ment when I said it.

 

Contributions:

 

Auto Backup your Database, Easy way

 

Multi Images with Fancy Pop-ups, Easy way

 

Products in columns with multi buy etc etc

 

Disable any Category or Product, Easy way

 

Secure & Improve your account pages et al.

Link to comment
Share on other sites

Hello everyone.

 

Just for the record... IM BLOODY HOPELESS WITH PHP!!!!

 

im trying to install fckeditor onto my server with oscommerce shop.

followed the instructions that were included with the .txt with the download.

 

I sign into the backend (admin)

 

the only way i can see fckeditor is by going to

 

Tools --> Send Email.

 

the editor pops up and recieve this error:

Warning: Missing argument 4 for tep_draw_fckeditor(), called in /public_html/shoponline/catalog/admin/mail.php on line 196 and defined in /public_html/shoponline/catalog/admin/includes/functions/html_output.php on line 272

 

if i use it to send a email, the text that i write comes out with additional code when viewing email at receipent

 

====================================================================

in admin page, if i goto

 

Catalog --> Catergories/Products

 

and add a new product, FCKEditor, comes up... and works perfect!

====================================================================

 

I REALLY WANTED THE EDITOR TO MODIFY INDEX.PHP TO REMOVE THE DEFAULT TEXT, PUT IN A FEW LINES, AND IF I COULD MODIFY THE COLOUR SCHEME ON THE FRONTEND, THAT WOULD BE A PLUS.

 

If someone could guide me how to add the correct code so could get FCKeditor working in:

Tools --> Define Languages

Tools --> File Manager

 

Please Help (P.S. Im hopeless) :)

 

MANY THANKS IN ADVANCE

Edited by allitsolutions
Link to comment
Share on other sites

I don`t know where that error crept in, to correct in /admin/includes/functions/html_output.php

 

Find:

 

function tep_draw_fckeditor($name, $width, $height, $text) {

 

replace with

 

function tep_draw_fckeditor($name, $width, $height, $text='') {

 

 

***

 

There are problems with the admin email when sending html, these are fixed by:

 

Send Admin HTML e-mails http://addons.oscommerce.com/info/5806

 

Don`t use file manager remove it from your tools section, its a security risk, use the cpanel file manager instead.

 

Much of the text on the site defined in the languages section are plain text, or have minimal html elements, you could use TextMaster http://addons.oscommerce.com/info/5927 to edit your text easier, I would use it in plain text mode & not bother with the TinyMCE, its somewhat more complex than FCK & personally I think FCK is the better editor.

 

TextMaster does have some bugs so take care, some language files could be damaged by it, so keep backups.

Sam

 

Remember, What you think I ment may not be what I thought I ment when I said it.

 

Contributions:

 

Auto Backup your Database, Easy way

 

Multi Images with Fancy Pop-ups, Easy way

 

Products in columns with multi buy etc etc

 

Disable any Category or Product, Easy way

 

Secure & Improve your account pages et al.

Link to comment
Share on other sites

thanks for taking the time to address this Contribution...

 

But it still doesn't answer the question of why I get this error...

 

Fatal error: Call to undefined function: tep_draw_file_field_image_fckeditor() in C:\Domains\####.com\wwwroot\NA\catalog\admin\categories.php on line 752

 

Did a global search and was unable to find this function anywhere. Any ideas?

Link to comment
Share on other sites

If you do the change I put up last you wont get the error any more.

Sam

 

Remember, What you think I ment may not be what I thought I ment when I said it.

 

Contributions:

 

Auto Backup your Database, Easy way

 

Multi Images with Fancy Pop-ups, Easy way

 

Products in columns with multi buy etc etc

 

Disable any Category or Product, Easy way

 

Secure & Improve your account pages et al.

Link to comment
Share on other sites

thanks for taking the time to address this Contribution...

 

But it still doesn't answer the question of why I get this error...

 

Fatal error: Call to undefined function: tep_draw_file_field_image_fckeditor() in C:\Domains\####.com\wwwroot\NA\catalog\admin\categories.php on line 752

 

Did a global search and was unable to find this function anywhere. Any ideas?

 

 

Sorry, did'nt read your post properly, your calling a non existant function, hence the error, the editor call should be:

tep_draw_fckeditor not tep_draw_file_field_image_fckeditor

Sam

 

Remember, What you think I ment may not be what I thought I ment when I said it.

 

Contributions:

 

Auto Backup your Database, Easy way

 

Multi Images with Fancy Pop-ups, Easy way

 

Products in columns with multi buy etc etc

 

Disable any Category or Product, Easy way

 

Secure & Improve your account pages et al.

Link to comment
Share on other sites

It does'nt just do product description, it can work anywhere you choose, I use it for admin emails, Newsletters, NewsDesk Articals, reviews & Create / Edit Pages, it can be used anywhere you want to input html content.

 

:D

Hello Sam,

Thanks for starting this thread and giving us a good starting point with this editor.

Is there a chance you could post any code from the newsletter file? I have it working perfect, sending images and populating when going back with emails, and it sends images just fine when using the newsletter, but when I go to review or edit an existing newsletter the content is then deleted.

Thanks

Edited by Glcustoms

Follow the community build:

BS3 to osCommerce Responsive from the Get Go!

Check out the new construction:

Admin Gone to Total BS!

Link to comment
Share on other sites

THANKS EVERYONE.

 

I just removed the code added by myself in mail.php and its solved that problem and just works as a normal text window.

i dont use the admin email from the backend, prefer to use my pop3 account on my computer instead.

 

As anyone got the FCKeditor working in here:

 

Tools --> Define Languages

Tools --> File Manager

 

If someone could guide me how to add the correct code so could get FCKeditor working.

 

im off to try http://addons.oscommerce.com/info/5927

 

THANKS AGAIN

Link to comment
Share on other sites

hello again

 

i installed texteditor 1.2 successful.

 

i left FCKeditor installed aswell.

 

i removed the default text on index.php and it ruined everything.

due to the fckeditor conflicting with the texteditor

 

couldnt access the front end or back end.

 

I didnt backup before doing the install! (Im so angry).

 

im re installing from scratch and only installing text editor and no more addon's without back ups.

Edited by allitsolutions
Link to comment
Share on other sites

hello again

 

i installed texteditor 1.2 successful.

 

i left FCKeditor installed aswell.

 

i removed the default text on index.php and it ruined everything.

due to the fckeditor conflicting with the texteditor

 

couldnt access the front end or back end.

 

I didnt backup before doing the install! (Im so angry).

 

im re installing from scratch and only installing text editor and no more addon's without back ups.

 

FCK cant have conflicted with texteditor, if fck isn`t called by the function call (in categories.php in your case) it does nothing. As I did warn you, texteditor is bugged, specifically if there are variables in the text it confuses the routine which can lead to texteditor creating faulty language files, which will break your site.

 

Its also known that texteditor may have problems with the default index.php text.

Sam

 

Remember, What you think I ment may not be what I thought I ment when I said it.

 

Contributions:

 

Auto Backup your Database, Easy way

 

Multi Images with Fancy Pop-ups, Easy way

 

Products in columns with multi buy etc etc

 

Disable any Category or Product, Easy way

 

Secure & Improve your account pages et al.

Link to comment
Share on other sites

Hi spooks,

 

First of all, thanks for devoting so much of your time to supporting FCK implementations in OSC. I've read through all the previous posts but didn't find a solution to my problem.

 

When I install FCKeditor as per the instructions the text input boxes for product description and mail message just disappear. I got an error message on mail.php at first but the following fix made that go away:

//Find:

function tep_draw_fckeditor($name, $width, $height, $text) {

//replace with 

function tep_draw_fckeditor($name, $width, $height, $text='') {

 

I'm not sure if I'm putting the right path in the following lines:

// in store/admin/fckeditor/editor/filemanager/connectors/php/config.php
$Config['UserFilesPath'] = '/userfiles/';

//and in store/admin/includes/functions/html_output.php
$oFCKeditor -> BasePath	= 'fckeditor/';

 

My OSC installation is without a catalog folder in a folder called '/store/' which is in the site root.

 

www.cleanerway.com/store

 

Also you mentioned removing the file manager as a security enhancement:

Don`t use file manager remove it from your tools section, its a security risk, use the cpanel file manager instead.

How would I go about that?

 

Many thanks, :)

 

Pete.

Link to comment
Share on other sites

I'm not sure if I'm putting the right path in the following lines:

in store/admin/fckeditor/editor/filemanager/connectors/php/config.php

$Config['UserFilesPath'] = '/userfiles/';

 

Looking at your store you do infact have a 'catalog' store, its just that your catalog directory is called 'store', so this should be set to:

$Config['UserFilesPath'] = '/store/' ;

 

 

 

and in store/admin/includes/functions/html_output.php

$oFCKeditor -> BasePath = 'fckeditor/';

 

is correct.

 

 

Also you mentioned removing the file manager as a security enhancement:

 

How would I go about that?

 

in admin/includes/boxes/tools.php find and remove:

 

'<a href="' . tep_href_link(FILENAME_FILE_MANAGER) . '" class="menuBoxContentLink">' . BOX_TOOLS_FILE_MANAGER . '</a><br>' .

 

and remove file_manager.php from the admin folder.

 

Hope that sorts it for you.

 

:)

Edited by spooks

Sam

 

Remember, What you think I ment may not be what I thought I ment when I said it.

 

Contributions:

 

Auto Backup your Database, Easy way

 

Multi Images with Fancy Pop-ups, Easy way

 

Products in columns with multi buy etc etc

 

Disable any Category or Product, Easy way

 

Secure & Improve your account pages et al.

Link to comment
Share on other sites

  • 2 weeks later...

I folowed the set up directions, when I get to the categories/products editor I get this warning:

 

Fatal error: Cannot instantiate non-existent class: fckeditor in /usr/local/home/httpd/vhtdocs/sitename/catalog/admin/includes/functions/html_output.php on line 272

 

Which is odd because the function is there. Any ideas as to why this is happening? All help would be appreciated, it's on a client's site.

 

Thanks

Link to comment
Share on other sites

I folowed the set up directions, when I get to the categories/products editor I get this warning:

 

Fatal error: Cannot instantiate non-existent class: fckeditor in /usr/local/home/httpd/vhtdocs/sitename/catalog/admin/includes/functions/html_output.php on line 272

 

Which is odd because the function is there. Any ideas as to why this is happening? All help would be appreciated, it's on a client's site.

 

Thanks

 

At the very start of html_output after the first <?php have you got:

 

require("fckeditor/fckeditor.php");

 

and made sure its not within the commented out section.

Sam

 

Remember, What you think I ment may not be what I thought I ment when I said it.

 

Contributions:

 

Auto Backup your Database, Easy way

 

Multi Images with Fancy Pop-ups, Easy way

 

Products in columns with multi buy etc etc

 

Disable any Category or Product, Easy way

 

Secure & Improve your account pages et al.

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