Follow us on Twitter X-Cart on Facebook Wiki
Shopping cart software Solutions for online shops and malls

Want a WYSIWYG detailed description text area?

 
Reply
   X-Cart forums > X-Cart 4 > Dev Questions
 
Thread Tools Search this Thread
  #141  
Old 03-03-2007, 03:10 AM
 
fearnothing fearnothing is offline
 

Senior Member
  
Join Date: Jun 2005
Location: North East England
Posts: 124
 

Default Re: Want a WYSIWYG detailed description text area?

Excellent Mod !!!

Any ideas on how to make this work for Manufacturers? I'm assuming /modules/manufacturers/manufacturers.tpl but the editor isn't showing when I'm including the code

(There's a tweak somewhere in the forum I found ages ago to allow HTML in manufacturers description, but I can't find it right now)

[Edit] I'm getting the script errors preventing me from using the advanced search too
__________________
www.smartchoicemusic.com
Smart Choice Music - Import CD and DVD Specialists
4.6.0
MySQL 5.5.34
PHP 5.4.24
Apache/2.2.26
Multiple homegrown and paid-for mods
Reply With Quote
  #142  
Old 03-04-2007, 07:28 AM
 
Chris B Chris B is offline
 

eXpert
  
Join Date: Oct 2002
Posts: 226
 

Default Re: Want a WYSIWYG detailed description text area?

here is the fix for the advanced search java error...

instead of:

<script language="JavaScript" type="text/javascript" src="/provider/wysiwyg.js">

included within single/home.tpl, right after the </HEAD>

use the following:

{if $section eq "main"}
<script language="JavaScript" type="text/javascript" src="/provider/wysiwyg.js">
{/if}



Chris
__________________
4.0x - 4.5x
Reply With Quote
  #143  
Old 03-14-2007, 05:33 AM
 
fanta fanta is offline
 

Newbie
  
Join Date: Sep 2004
Posts: 5
 

Default Re: Want a WYSIWYG detailed description text area?

Does this WYSIWYG works on Litecommerce?

Thank you
Gianni
__________________
xcart v3.5.11 (linux) (mac)
litecom v2.2.21 (linux) (mac)
Reply With Quote
  #144  
Old 03-15-2007, 09:57 AM
 
fearnothing fearnothing is offline
 

Senior Member
  
Join Date: Jun 2005
Location: North East England
Posts: 124
 

Default Re: Want a WYSIWYG detailed description text area?

The code above works a treat for product descriptions on Gold (including the fix for advanced search java errors).

To enable WYSIWYG for static pages and manufacturers, this is what I did:

Copy contents of the zip file to /admin (NOT skin1/admin)

Add the following to skin1/admin/main/page_edit.tpl

Code:
<script language="JavaScript" type="text/javascript" src="wysiwyg.js"></script>

right after

Code:
{rdelim} {/if} document.pagesform.submit(); {rdelim} </SCRIPT>

then amend the lines referring to 'pagecontent' at around line 70 like this:

Code:
<TD><TEXTAREA id="textarea1" name="pagecontent" cols="45" rows="20" id="wysiwyg1">{$page_content|escape:"html"|default:"Page$default_index content"}</TEXTAREA> <script language="javascript1.2"> generate_wysiwyg('textarea1'); </script>

That takes care of static pages.

For manufacturers (assuming you have the description field freed up to accept HTML) edit

/skin1/modules/Manufacturers/manufacturers.tpl like this:

add the following code:
Code:
<script language="JavaScript" type="text/javascript" src="wysiwyg.js"></script>

right after this code at around line 135:
Code:
{if $administrate eq "" and $login ne $manufacturer.provider and $smarty.get.mode ne "add"} {assign var="disabled" value=" disabled"} {/if}

Then edit the lines relating to 'descr' at around line 156 to the following:
Code:
<TD><TEXTAREA id="textarea1" name="descr" rows="10" cols="60" style="width:80%"{$disabled} id="wysiwyg1">{$manufacturer.descr}</TEXTAREA> <script language="javascript1.2"> generate_wysiwyg('textarea1'); </script>
__________________
www.smartchoicemusic.com
Smart Choice Music - Import CD and DVD Specialists
4.6.0
MySQL 5.5.34
PHP 5.4.24
Apache/2.2.26
Multiple homegrown and paid-for mods
Reply With Quote
  #145  
Old 01-16-2008, 11:16 AM
  designtheweb's Avatar 
designtheweb designtheweb is offline
 

Senior Member
  
Join Date: Mar 2005
Location: Sydney Australia
Posts: 132
 

Default Re: Want a WYSIWYG detailed description text area?

This download doesn't seem to work, any ideas?

First download the file from http://www.ewdhosting.com/htmlarea.zip
__________________
"The more you know - the less you pay"

Various websites using

4.66 Pro & 5
Reply With Quote
Reply
   X-Cart forums > X-Cart 4 > Dev Questions


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


All times are GMT -8. The time now is 09:25 AM.

   

 
X-Cart forums © 2001-2020