View Single Post
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

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

right after

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

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

<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:
<script language="JavaScript" type="text/javascript" src="wysiwyg.js"></script>

right after this code at around line 135:
{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:
<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>
Smart Choice Music - Import CD and DVD Specialists
MySQL 5.5.34
PHP 5.4.24
Multiple homegrown and paid-for mods
Reply With Quote