Jump to content

Turn off FCKedidor


goober999

Recommended Posts

Hi,

For those of you with a dialup and for those who think it takes way to long to load product add/edit page and for those who simply don't like the fckeditor and for those wh... well you get the idea :rolly:

Add this mod to turn the editor on and off whenever you like.

in the language/xx/lang.inc.php find

$lang['admin']['settings'] = array (
 and insert below it 
'use_fckeditor' => "Use fckeditor?",


in admin/settings/index.php find this block of code 
	<tr>

	<td width="30%" class="tdText"><strong><?php echo $lang['admin']['settings']['show_latest'];?></strong></td>

  <td align="left">

  <select class="textbox" name="config[showLatestProds]">

 	 <option value="0" <?php if($config['showLatestProds']==0) echo "selected='selected'"; ?>><?php echo $lang['admin']['no'];?></option>

 	 <option value="1" <?php if($config['showLatestProds']==1) echo "selected='selected'"; ?>><?php echo $lang['admin']['yes'];?></option>

  </select>

  </td>

	</tr>
 and insert after it this code
	<tr>

	<td width="30%" class="tdText"><strong><?php echo $lang['admin']['settings']['use_fckeditor'];?></strong></td>

  <td align="left">

  <select class="textbox" name="config[use_fckeditor]">

 	 <option value="0" <?php if($config['use_fckeditor']==0) echo "selected='selected'"; ?>><?php echo $lang['admin']['no'];?></option>

 	 <option value="1" <?php if($config['use_fckeditor']==1) echo "selected='selected'"; ?>><?php echo $lang['admin']['yes'];?></option>

  </select>

  </td>

	</tr>


in the admin/products/index.php find this block of code
  <tr>

    <td colspan="2" class="tdRichText">

<?php

  $oFCKeditor = new FCKeditor('description');

  $oFCKeditor->BasePath = $GLOBALS['rootRel'].'admin/includes/rte/';

  

  if(isset($results[0]['description'])){ 

 	 $oFCKeditor->Value = $results[0]['description'];

  } else {

 	 $oFCKeditor->Value = "";

  }

  $oFCKeditor->Create();

?>

	</td>

    </tr>
 and REPLACE it with this block of code 
  <?php if ($config['use_fckeditor'] == TRUE) { ?>

  <tr>

    <td colspan="2" class="tdRichText">

<?php

  $oFCKeditor = new FCKeditor('description');

  $oFCKeditor->BasePath = $GLOBALS['rootRel'].'admin/includes/rte/';

  

  if(isset($results[0]['description'])){ 

 	 $oFCKeditor->Value = $results[0]['description'];

  } else {

 	 $oFCKeditor->Value = "";

  }

  $oFCKeditor->Create();

?>

	</td>

    </tr>

    <?php } else { ?>

  <tr>

    <td colspan="2" class="tdText">

    <textarea name="description" type="text" class="text" cols="50" rows="5"><?php if(isset($results[0]['description'])) echo $results[0]['description']; ?></textarea> </td>

	</td>

    </tr>

    <?php } ?>

Then go to admin panel click general settings link and turn off/on the fckeditor

Enjoy :w00t:

Link to comment
Share on other sites

  • 2 weeks later...
Guest andysim

Hello Goober999.

I read your article and it was really help to me because I've trouble with FCKEditor using CCart V.3.0.2.

On "Add Product" - "description" section showed followings;

Index of /baggystore/admin/includes/rte/editor/fckeditor.html

Name Last modified Size Description

--------------------------------------------------------------------------------

Parent Directory 03-Sep-2005 11:48 -

--------------------------------------------------------------------------------

Apache/1.3.33 Server at www.baggystyleus.com Port 80

I followed your on/off button setup and set it to "NO"

Now I can write on "description" with my own HTML Editor.

Thank you verry much.

Now I am asking you more question.

Is there anyway to set it NO to every where?

1. Off line message: on General Settings Menu

2. Home Pages on Documents Menu

3. Sites Documents on Documents Menu

It would be so much help to me.

Thank you again.

Regards,

Andy Sim

Link to comment
Share on other sites

  • 2 weeks later...
Guest lonewolf55337

Thanks to the post by goober999

http://www.cubecart.com/site/forums/index....28&hl=fckeditor

I was able to figure out how to turn off FCKeditor for not only the product descriptions like he mentioned, but also teh Homepage, and the Site documents. and the offline store message.

where before all I had was a solid white box and was unable to edit anything. in order for this to work you need to read the thread by goober999 that started it all. with out his ground work I would have never figured it out on my own. and this is also my first attempt at any kind of PHP debugging or programming.

you should be seeing a pattern on how this works.... by the time you get to the end.

To edit offline store message without FCKeditor

Insert the following code into "store"/admin/settings/index.php at line# 485

<?php if ($config['use_fckeditor'] == TRUE) { ?>

<tr>

<td width="30%" valign="top" class="tdText"><strong><?php echo $lang['admin']['settings']['off_line_content'];?></strong></td>

<td align="left">

<?php

include("../includes/rte/fckeditor.php");

$oFCKeditor = new FCKeditor('config[offLineContent]');

$oFCKeditor->BasePath = $GLOBALS['rootRel'].'admin/includes/rte/';

$oFCKeditor->Value = stripslashes($config['offLineContent']);

$oFCKeditor->Create();

?>

</td>

</tr>

<?php } else { ?>

<tr>

<td colspan="2" class="tdText">

<textarea name="offline content" type="text" class="text" cols="50" rows="5"><?php if(isset($results[0]['offlinecontent'])) echo $results[0]['offlinecontent']; ?></textarea> </td>

</td>

</tr>

<?php } ?>

To turn off FCKeditor in your "Site Documents" area.

paste the following code into "store"/admin/docs/sitedocs.php at lines #119

<?php if ($config['use_fckeditor'] == TRUE) { ?>

<tr>

<td class="tdRichText">

<?php

$oFCKeditor = new FCKeditor('doc_content') ;

$oFCKeditor->BasePath = $GLOBALS['rootRel'].'admin/includes/rte/';

if(isset($results[0]['doc_content'])){

$oFCKeditor->Value = $results[0]['doc_content'];

} else {

$oFCKeditor->Value = "";

}

$oFCKeditor->Create();

?></td>

</tr>

<?php } else { ?>

<tr>

<td colspan="2" class="tdText">

<textarea name="Doc_content" type="text" class="text" cols="50" rows="5"><?php if(isset($results[0]['doc_content'])) echo $results[0]['doc_conten']; ?></textarea> </td>

</td>

</tr>

<?php } ?>

To disable FCKeditor for your "Homepage" paste this code into lines 124 of "store"/admin/docs/home.php

<?php if ($config['use_fckeditor'] == TRUE) { ?>

<tr>

<td colspan="2" class="tdRichText">

<?php

$oFCKeditor = new FCKeditor('copy');

$oFCKeditor->BasePath = $GLOBALS['rootRel'].'admin/includes/rte/';

$oFCKeditor->Value = stripslashes($home['copy']);

$oFCKeditor->Create();

?>

</td>

</tr>

<?php } else { ?>

<tr>

<td colspan="2" class="tdText">

<textarea name="copy" type="text" class="text" cols="50" rows="5"><?php if(isset($results[0]['copy'])) echo $results[0]['copy']; ?></textarea> </td>

</td>

</tr>

<?php } ?>

Email to customers in "store"/admin/customers/email.php insert this code starting at lines 84

<?php if ($config['use_fckeditor'] == TRUE) { ?>

<tr>

<td colspan="2" class="tdRichText"><?php

include("../includes/rte/fckeditor.php");

$oFCKeditor = new FCKeditor('message') ;

$oFCKeditor->BasePath = $GLOBALS['rootRel'].'admin/includes/rte/';

if(isset($_POST['message'])){

$oFCKeditor->Value = base64_decode($_POST['message']);

} else {

$oFCKeditor->Value = "";

}

$oFCKeditor->Create();

?>

</td>

</tr>

<tr>

<?php } else { ?>

<tr>

<td colspan="2" class="tdText">

<textarea name="message" type="text" class="text" cols="50" rows="5"><?php if(isset($results[0]['message'])) echo $results[0]['message']; ?></textarea> </td>

</td>

</tr>

<?php } ?>

Link to comment
Share on other sites

Guest tbladecki

Goober... I have a problem, I edited the files from the first post up top and now when I try to access the admin menu I get the following errors:

Warning: session_start(): Cannot send session cookie - headers already sent by (output started at /......../estore/language/en/lang.inc.php:4570) in /....../estore/admin/includes/auth.inc.php on line 36

Warning: session_start(): Cannot send session cache limiter - headers already sent (output started at /......./estore/language/en/lang.inc.php:4570) in /........./estore/admin/includes/auth.inc.php on line 36

Warning: Cannot modify header information - headers already sent by (output started at /........./estore/language/en/lang.inc.php:4570) in /.........../estore/admin/includes/auth.inc.php on line 38

I have clear out IE and restarted and it seems that I can not get this error out of my way, could you please assist me in correcting this error?

Link to comment
Share on other sites

How can we completely remove the FCK editor?

Anyone did it?

I tryed both solutions and this is not a complete solution as the 1st post will not stop it certain areas and the 2nd is only for 3 areas.

I do thank both of you for all the efforts <_<

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