X-Cart: shopping cart software

X-Cart forums (https://forum.x-cart.com/index.php)
-   Dev Questions (https://forum.x-cart.com/forumdisplay.php?f=20)
-   -   Want a WYSIWYG detailed description text area? (https://forum.x-cart.com/showthread.php?t=7407)

g0t0pless 03-27-2005 02:46 PM

A copy/paste of your code resulted in the same thing... page not found for both text areas.

I am at my wits end, so for now, I will just wait until someone fixes it.

And the samples DO work, as can be seen here: https://www.sarversystems.com/FCKeditor/_samples/php/sample01.php

zardos 03-28-2005 05:45 AM

Hi g0t0pless

Here is my meta.tpl
Code:

{* $Id: meta.tpl,v 1.18.2.4 2004/12/23 12:50:34 svowl Exp $ *}
<script type="text/javascript" src="http://www.megapcs4u.co.uk/fckeditor/fckeditor.js"></script>
<META http-equiv="Content-Type" content="text/html; charset={$default_charset|default:"iso-8859-1"}">
{if $usertype eq "P" or $usertype eq "A"}
<META name="ROBOTS" content="NOINDEX">
<META name="ROBOTS" content="NOFOLLOW">
{else}


All in lowercase:

Here is my product_details.tpl
Code:

{if $active_modules.Extra_Fields ne ""}
{include file="modules/Extra_Fields/product_modify.tpl"}
{/if}

<TR>
  <TD colspan="3" align="center">
<INPUT type="submit" value=" {$lng.lbl_save} "></TD>
</TR>
<script type="text/javascript">
  var oFCKeditor = new FCKeditor( 'descr' ) ;
        oFCKeditor.ToolbarSet = "Default" ;
  oFCKeditor.ReplaceTextarea() ;
</script>
<script type="text/javascript">
  var oFCKeditor = new FCKeditor( 'fulldescr' ) ;
        oFCKeditor.ToolbarSet = "Default" ;
  oFCKeditor.ReplaceTextarea() ;
</script>
</FORM>

</TABLE>

{/capture}
{include file="dialog.tpl" title=$lng.lbl_product_details content=$smarty.capture.dialog extra="width=100%"}


The fckeditor in the above code starts in caps, and is ok. You can replace the "Default" with "Basic" as in Vulcan-works code above.

I also uploaded fckeditor to my root into a directory called "fckeditor" in lowercase, and all seems to work well.

Hope this help you and thanks to vulcan-work for his help.

PhilJ 03-30-2005 02:00 PM

well, after scratching my head for a while... :-k

assuming your fckeditor directory is in the root...

in fckeditor.js

change

Code:

this.BasePath        = '/fckeditor/' ;

to

Code:

this.BasePath        = '../fckeditor/' ;

...worked for me anyway. Thanks!

g0t0pless 03-30-2005 03:35 PM

Thank you. I will try that as soon as I get a chance.

I just upgraded to 4.0.13 last night, and bought the X-Compare module, so got a little work to do before I jump back into this.

nfc5382 03-30-2005 07:33 PM

great mod, thanks!

mustang 04-02-2005 09:25 PM

Quote:

Originally Posted by mpj
How can I remove the default "

" and " </P>" tags.

I use CSS for my site and the default tags interfers with this code.



TEXT</P>

the only place I found the

tags was in the editor.js file.

I've taken that out and it still exist. Please help!


mpj,

Try this to remove the

</P> tags.

In editor.js, replace:
Code:

    // fix placeholder URLS - remove absolute paths that IE adds
    if (tagName == 'img') { tagBody = tagBody.replace(/(src\s*=\s*.)[^*]*(\*\*\*)/, "$1$2"); }
    if (tagName == 'a')  { tagBody = tagBody.replace(/(href\s*=\s*.)[^*]*(\*\*\*)/, "$1$2"); }


With:
Code:

    // fix placeholder URLS - remove absolute paths that IE adds
    if (tagName == 'img') { tagBody = tagBody.replace(/(src\s*=\s*.)[^*]*(\*\*\*)/, "$1$2"); }
    if (tagName == 'a')  { tagBody = tagBody.replace(/(href\s*=\s*.)[^*]*(\*\*\*)/, "$1$2"); }
        if (tagName == 'p') { tagBody = ""; }
        if (tagName == 'P') { tagBody = ""; }


That *should* remove the

</P>tags. :)

ETInteractive.com 04-06-2005 08:04 AM

in the fckeditor.js

this.BasePath = '/FCKeditor/' ;

make sure /FCK/ matches the folder name you created on your server

FCKeditor and fckeditor wont match up.

g0t0pless 04-09-2005 08:52 PM

Thanks to all that helped me to get this working... It works!!!!

Now, how do I add/remove toolbar buttons?

I am messing around in fckconfig.js and I see where they buttons are called up under "basic" and "default", but adding/removing anything in there has no results. I even tried creating a new toolbar set called custom, and then changing my toolbar settings in main/product_modify.tpl to request the custom toolbar. Doing so results in an error saying the toolbar doesn't exist.

vulcan-works 04-11-2005 05:58 PM

Quote:

Originally Posted by g0t0pless
Thanks to all that helped me to get this working... It works!!!!

Now, how do I add/remove toolbar buttons?

I am messing around in fckconfig.js and I see where they buttons are called up under "basic" and "default", but adding/removing anything in there has no results. I even tried creating a new toolbar set called custom, and then changing my toolbar settings in main/product_modify.tpl to request the custom toolbar. Doing so results in an error saying the toolbar doesn't exist.


Add this line
Code:

oFCKeditor.ToolbarSet = "Basic(or whatever u have)" ;
between
Code:

var oFCKeditor = new FCKeditor( 'fulldescr' ) ;
and
Code:

oFCKeditor.ReplaceTextarea() ;
in the product_details.tpl

so..
Code:

<script type="text/javascript">
        var oFCKeditor = new FCKeditor( 'fulldescr' ) ;
        oFCKeditor.ToolbarSet = "Basic" ;
        oFCKeditor.ReplaceTextarea() ;
</script>


g0t0pless 04-11-2005 06:19 PM

That's exactly what I did. No matter what I do, it won't make any changes to the toolbars.


All times are GMT -8. The time now is 01:36 PM.

Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.