bside2234 Posted October 3, 2013 Share Posted October 3, 2013 I'm not sure why but there seems to be a lot less editing choices in the Long and Short description text areas as of lately. Is it just me or have there been a lot more choices in the past and if I'm correct in thinking this, is there a way to get it all back? See? This is from the 1.5 documentation. I don't have this many choices. Link to comment Share on other sites More sharing options...
Paulito Posted October 3, 2013 Share Posted October 3, 2013 Good morning I would read this great Tutorial to get back the missing TinyMce buttons http://nemops.com/enable-tinymce-commands-prestashop-1-5/ Hope this helps Paul Link to comment Share on other sites More sharing options...
bside2234 Posted October 3, 2013 Author Share Posted October 3, 2013 Thanks Paul but that code isn't there anymore. It's either moved somewhere I can't find or it has changed. Link to comment Share on other sites More sharing options...
Paulito Posted October 3, 2013 Share Posted October 3, 2013 Good morning Have just checked and it is there on about Line 409 Are you following the correct path public_html/your url/admin/themes/default/template/helpers/form/form.tpl Paul Link to comment Share on other sites More sharing options...
bside2234 Posted October 3, 2013 Author Share Posted October 3, 2013 That's exactly the path I'm taking. Here's my form.tpl {** 2007-2013 PrestaShop** NOTICE OF LICENSE** This source file is subject to the Academic Free License (AFL 3.0)* that is bundled with this package in the file LICENSE.txt.* It is also available through the world-wide-web at this URL:* http://opensource.org/licenses/afl-3.0.php* If you did not receive a copy of the license and are unable to* obtain it through the world-wide-web, please send an email* to [email protected] so we can send you a copy immediately.** DISCLAIMER** Do not edit or add to this file if you wish to upgrade PrestaShop to newer* versions in the future. If you wish to customize PrestaShop for your* needs please refer to http://www.prestashop.com for more information.** @author PrestaShop SA <[email protected]>* @copyright 2007-2013 PrestaShop SA* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)* International Registered Trademark & Property of PrestaShop SA*}{if $show_toolbar} {include file="toolbar.tpl" toolbar_btn=$toolbar_btn toolbar_scroll=$toolbar_scroll title=$title} <div class="leadin">{block name="leadin"}{/block}</div>{/if}{if isset($fields.title)}<h2>{$fields.title}</h2>{/if}{block name="defaultForm"}<form id="{if isset($fields.form.form.id_form)}{$fields.form.form.id_form|escape:'htmlall':'UTF-8'}{else}{$table}_form{/if}" class="defaultForm {$name_controller}" action="{$current}&{if !empty($submit_action)}{$submit_action}=1{/if}&token={$token}" method="post" enctype="multipart/form-data" {if isset($style)}style="{$style}"{/if}> {if $form_id} <input type="hidden" name="{$identifier}" id="{$identifier}" value="{$form_id}" /> {/if} {foreach $fields as $f => $fieldset} <fieldset id="fieldset_{$f}"> {foreach $fieldset.form as $key => $field} {if $key == 'legend'} <legend> {if isset($field.image)}<img src="{$field.image}" alt="{$field.title|escape:'htmlall':'UTF-8'}" />{/if} {$field.title} </legend> {elseif $key == 'description' && $field} <p class="description">{$field}</p> {elseif $key == 'input'} {foreach $field as $input} {if $input.type == 'hidden'} <input type="hidden" name="{$input.name}" id="{$input.name}" value="{$fields_value[$input.name]|escape:'htmlall':'UTF-8'}" /> {else} {if $input.name == 'id_state'} <div id="contains_states" {if !$contains_states}style="display:none;"{/if}> {/if} {block name="label"} {if isset($input.label)}<label>{$input.label} </label>{/if} {/block} {block name="field"} <div class="margin-form"> {block name="input"} {if $input.type == 'text' || $input.type == 'tags'} {if isset($input.lang) AND $input.lang} <div class="translatable"> {foreach $languages as $language} <div class="lang_{$language.id_lang}" style="display:{if $language.id_lang == $defaultFormLanguage}block{else}none{/if}; float: left;"> {if $input.type == 'tags'} {literal} <script type="text/javascript"> $().ready(function () { var input_id = '{/literal}{if isset($input.id)}{$input.id}_{$language.id_lang}{else}{$input.name}_{$language.id_lang}{/if}{literal}'; $('#'+input_id).tagify({addTagPrompt: '{/literal}{l s='Add tag' js=1}{literal}'}); $({/literal}'#{$table}{literal}_form').submit( function() { $(this).find('#'+input_id).val($('#'+input_id).tagify('serialize')); }); }); </script> {/literal} {/if} {assign var='value_text' value=$fields_value[$input.name][$language.id_lang]} <input type="text" name="{$input.name}_{$language.id_lang}" id="{if isset($input.id)}{$input.id}_{$language.id_lang}{else}{$input.name}_{$language.id_lang}{/if}" value="{if isset($input.string_format) && $input.string_format}{$value_text|string_format:$input.string_format|escape:'htmlall':'UTF-8'}{else}{$value_text|escape:'htmlall':'UTF-8'}{/if}" class="{if $input.type == 'tags'}tagify {/if}{if isset($input.class)}{$input.class}{/if}" {if isset($input.size)}size="{$input.size}"{/if} {if isset($input.maxlength)}maxlength="{$input.maxlength}"{/if} {if isset($input.readonly) && $input.readonly}readonly="readonly"{/if} {if isset($input.disabled) && $input.disabled}disabled="disabled"{/if} {if isset($input.autocomplete) && !$input.autocomplete}autocomplete="off"{/if} /> {if !empty($input.hint)}<span class="hint" name="help_box">{$input.hint}<span class="hint-pointer"> </span></span>{/if} </div> {/foreach} </div> {else} {if $input.type == 'tags'} {literal} <script type="text/javascript"> $().ready(function () { var input_id = '{/literal}{if isset($input.id)}{$input.id}{else}{$input.name}{/if}{literal}'; $('#'+input_id).tagify(); $('#'+input_id).tagify({addTagPrompt: '{/literal}{l s='Add tag'}{literal}'}); $({/literal}'#{$table}{literal}_form').submit( function() { $(this).find('#'+input_id).val($('#'+input_id).tagify('serialize')); }); }); </script> {/literal} {/if} {assign var='value_text' value=$fields_value[$input.name]} <input type="text" name="{$input.name}" id="{if isset($input.id)}{$input.id}{else}{$input.name}{/if}" value="{if isset($input.string_format) && $input.string_format}{$value_text|string_format:$input.string_format|escape:'htmlall':'UTF-8'}{else}{$value_text|escape:'htmlall':'UTF-8'}{/if}" class="{if $input.type == 'tags'}tagify {/if}{if isset($input.class)}{$input.class}{/if}" {if isset($input.size)}size="{$input.size}"{/if} {if isset($input.maxlength)}maxlength="{$input.maxlength}"{/if} {if isset($input.class)}class="{$input.class}"{/if} {if isset($input.readonly) && $input.readonly}readonly="readonly"{/if} {if isset($input.disabled) && $input.disabled}disabled="disabled"{/if} {if isset($input.autocomplete) && !$input.autocomplete}autocomplete="off"{/if} /> {if isset($input.suffix)}{$input.suffix}{/if} {if !empty($input.hint)}<span class="hint" name="help_box">{$input.hint}<span class="hint-pointer"> </span></span>{/if} {/if} {elseif $input.type == 'select'} {if isset($input.options.query) && !$input.options.query && isset($input.empty_message)} {$input.empty_message} {$input.required = false} {$input.desc = null} {else} <select name="{$input.name}" class="{if isset($input.class)}{$input.class}{/if}" id="{if isset($input.id)}{$input.id}{else}{$input.name}{/if}" {if isset($input.multiple)}multiple="multiple" {/if} {if isset($input.size)}size="{$input.size}"{/if} {if isset($input.onchange)}onchange="{$input.onchange}"{/if}> {if isset($input.options.default)} <option value="{$input.options.default.value}">{$input.options.default.label}</option> {/if} {if isset($input.options.optiongroup)} {foreach $input.options.optiongroup.query AS $optiongroup} <optgroup label="{$optiongroup[$input.options.optiongroup.label]}"> {foreach $optiongroup[$input.options.options.query] as $option} <option value="{$option[$input.options.options.id]}" {if isset($input.multiple)} {foreach $fields_value[$input.name] as $field_value} {if $field_value == $option[$input.options.options.id]}selected="selected"{/if} {/foreach} {else} {if $fields_value[$input.name] == $option[$input.options.options.id]}selected="selected"{/if} {/if} >{$option[$input.options.options.name]}</option> {/foreach} </optgroup> {/foreach} {else} {foreach $input.options.query AS $option} {if is_object($option)} <option value="{$option->$input.options.id}" {if isset($input.multiple)} {foreach $fields_value[$input.name] as $field_value} {if $field_value == $option->$input.options.id} selected="selected" {/if} {/foreach} {else} {if $fields_value[$input.name] == $option->$input.options.id} selected="selected" {/if} {/if} >{$option->$input.options.name}</option> {elseif $option == "-"} <option value="">--</option> {else} <option value="{$option[$input.options.id]}" {if isset($input.multiple)} {foreach $fields_value[$input.name] as $field_value} {if $field_value == $option[$input.options.id]} selected="selected" {/if} {/foreach} {else} {if $fields_value[$input.name] == $option[$input.options.id]} selected="selected" {/if} {/if} >{$option[$input.options.name]}</option> {/if} {/foreach} {/if} </select> {if !empty($input.hint)}<span class="hint" name="help_box">{$input.hint}<span class="hint-pointer"> </span></span>{/if} {/if} {elseif $input.type == 'radio'} {foreach $input.values as $value} <input type="radio" name="{$input.name}"id="{$value.id}" value="{$value.value|escape:'htmlall':'UTF-8'}" {if $fields_value[$input.name] == $value.value}checked="checked"{/if} {if isset($input.disabled) && $input.disabled}disabled="disabled"{/if} /> <label {if isset($input.class)}class="{$input.class}"{/if} for="{$value.id}"> {if isset($input.is_bool) && $input.is_bool == true} {if $value.value == 1} <img src="../img/admin/enabled.gif" alt="{$value.label}" title="{$value.label}" /> {else} <img src="../img/admin/disabled.gif" alt="{$value.label}" title="{$value.label}" /> {/if} {else} {$value.label} {/if} </label> {if isset($input.br) && $input.br}<br />{/if} {if isset($value.p) && $value.p}<p>{$value.p}</p>{/if} {/foreach} {elseif $input.type == 'textarea'} {if isset($input.lang) AND $input.lang} <div class="translatable"> {foreach $languages as $language} <div class="lang_{$language.id_lang}" id="{$input.name}_{$language.id_lang}" style="display:{if $language.id_lang == $defaultFormLanguage}block{else}none{/if}; float: left;"> <textarea cols="{$input.cols}" rows="{$input.rows}" name="{$input.name}_{$language.id_lang}" {if isset($input.autoload_rte) && $input.autoload_rte}class="rte autoload_rte {if isset($input.class)}{$input.class}{/if}"{/if} >{$fields_value[$input.name][$language.id_lang]|escape:'htmlall':'UTF-8'}</textarea> </div> {/foreach} </div> {else} <textarea name="{$input.name}" id="{if isset($input.id)}{$input.id}{else}{$input.name}{/if}" cols="{$input.cols}" rows="{$input.rows}" {if isset($input.autoload_rte) && $input.autoload_rte}class="rte autoload_rte {if isset($input.class)}{$input.class}{/if}"{/if}>{$fields_value[$input.name]|escape:'htmlall':'UTF-8'}</textarea> {/if} {elseif $input.type == 'checkbox'} {foreach $input.values.query as $value} {assign var=id_checkbox value=$input.name|cat:'_'|cat:$value[$input.values.id]} <input type="checkbox" name="{$id_checkbox}" id="{$id_checkbox}" class="{if isset($input.class)}{$input.class}{/if}" {if isset($value.val)}value="{$value.val|escape:'htmlall':'UTF-8'}"{/if} {if isset($fields_value[$id_checkbox]) && $fields_value[$id_checkbox]}checked="checked"{/if} /> <label for="{$id_checkbox}" class="t"><strong>{$value[$input.values.name]}</strong></label><br /> {/foreach} {elseif $input.type == 'file'} {if isset($input.display_image) && $input.display_image} {if isset($fields_value[$input.name].image) && $fields_value[$input.name].image} <div id="image"> {$fields_value[$input.name].image} <p align="center">{l s='File size'} {$fields_value[$input.name].size}kb</p> <a href="{$current}&{$identifier}={$form_id}&token={$token}&deleteImage=1"> <img src="../img/admin/delete.gif" alt="{l s='Delete'}" /> {l s='Delete'} </a> </div><br /> {/if} {/if} {if isset($input.lang) AND $input.lang} <div class="translatable"> {foreach $languages as $language} <div class="lang_{$language.id_lang}" id="{$input.name}_{$language.id_lang}" style="display:{if $language.id_lang == $defaultFormLanguage}block{else}none{/if}; float: left;"> <input type="file" name="{$input.name}_{$language.id_lang}" {if isset($input.id)}id="{$input.id}_{$language.id_lang}"{/if} /> </div> {/foreach} </div> {else} <input type="file" name="{$input.name}" {if isset($input.id)}id="{$input.id}"{/if} /> {/if} {if !empty($input.hint)}<span class="hint" name="help_box">{$input.hint}<span class="hint-pointer"> </span></span>{/if} {elseif $input.type == 'password'} <input type="password" name="{$input.name}" size="{$input.size}" class="{if isset($input.class)}{$input.class}{/if}" value="" {if isset($input.autocomplete) && !$input.autocomplete}autocomplete="off"{/if} /> {elseif $input.type == 'birthday'} {foreach $input.options as $key => $select} <select name="{$key}" class="{if isset($input.class)}{$input.class}{/if}"> <option value="">-</option> {if $key == 'months'} {* This comment is useful to the translator tools /!\ do not remove them {l s='January'} {l s='February'} {l s='March'} {l s='April'} {l s='May'} {l s='June'} {l s='July'} {l s='August'} {l s='September'} {l s='October'} {l s='November'} {l s='December'} *} {foreach $select as $k => $v} <option value="{$k}" {if $k == $fields_value[$key]}selected="selected"{/if}>{l s=$v}</option> {/foreach} {else} {foreach $select as $v} <option value="{$v}" {if $v == $fields_value[$key]}selected="selected"{/if}>{$v}</option> {/foreach} {/if} </select> {/foreach} {elseif $input.type == 'group'} {assign var=groups value=$input.values} {include file='helpers/form/form_group.tpl'} {elseif $input.type == 'shop'} {$input.html} {elseif $input.type == 'categories'} {include file='helpers/form/form_category.tpl' categories=$input.values} {elseif $input.type == 'categories_select'} {$input.category_tree} {elseif $input.type == 'asso_shop' && isset($asso_shop) && $asso_shop} {$asso_shop} {elseif $input.type == 'color'} <input type="color" size="{$input.size}" data-hex="true" {if isset($input.class)}class="{$input.class}" {else}class="color mColorPickerInput"{/if} name="{$input.name}" value="{$fields_value[$input.name]|escape:'htmlall':'UTF-8'}" /> {elseif $input.type == 'date'} <input type="text" size="{$input.size}" data-hex="true" {if isset($input.class)}class="{$input.class}" {else}class="datepicker"{/if} name="{$input.name}" value="{$fields_value[$input.name]|escape:'htmlall':'UTF-8'}" /> {elseif $input.type == 'free'} {$fields_value[$input.name]} {/if} {if isset($input.required) && $input.required && $input.type != 'radio'} <sup>*</sup>{/if} {/block}{* end block input *} {block name="description"} {if isset($input.desc) && !empty($input.desc)} <p class="preference_description"> {if is_array($input.desc)} {foreach $input.desc as $p} {if is_array($p)} <span id="{$p.id}">{$p.text}</span><br /> {else} {$p}<br /> {/if} {/foreach} {else} {$input.desc} {/if} </p> {/if} {/block} {if isset($input.lang) && isset($languages)}<div class="clear"></div>{/if} </div> <div class="clear"></div> {/block}{* end block field *} {if $input.name == 'id_state'} </div> {/if} {/if} {/foreach} {hook h='displayAdminForm' fieldset=$f} {if isset($name_controller)} {capture name=hookName assign=hookName}display{$name_controller|ucfirst}Form{/capture} {hook h=$hookName fieldset=$f} {elseif isset($smarty.get.controller)} {capture name=hookName assign=hookName}display{$smarty.get.controller|ucfirst|htmlentities}Form{/capture} {hook h=$hookName fieldset=$f} {/if} {elseif $key == 'submit'} <div class="margin-form"> <input type="submit" id="{if isset($field.id)}{$field.id}{else}{$table}_form_submit_btn{/if}" value="{$field.title}" name="{if isset($field.name)}{$field.name}{else}{$submit_action}{/if}{if isset($field.stay) && $field.stay}AndStay{/if}" {if isset($field.class)}class="{$field.class}"{/if} /> </div> {elseif $key == 'desc'} <p class="clear"> {if is_array($field)} {foreach $field as $k => $p} {if is_array($p)} <span id="{$p.id}">{$p.text}</span><br /> {else} {$p} {if isset($field[$k+1])}<br />{/if} {/if} {/foreach} {else} {$field} {/if} </p> {/if} {block name="other_input"}{/block} {/foreach} {if $required_fields} <div class="small"><sup>*</sup> {l s='Required field'}</div> {/if} </fieldset> {block name="other_fieldsets"}{/block} {if isset($fields[$f+1])}<br />{/if} {/foreach}</form>{/block}{block name="after"}{/block}{if isset($tinymce) && $tinymce} <script type="text/javascript"> var iso = '{$iso}'; var pathCSS = '{$smarty.const._THEME_CSS_DIR_}'; var ad = '{$ad}'; $(document).ready(function(){ {block name="autoload_tinyMCE"} tinySetup({ editor_selector :"autoload_rte" }); {/block} }); </script>{/if}{if $firstCall} <script type="text/javascript"> var module_dir = '{$smarty.const._MODULE_DIR_}'; var id_language = {$defaultFormLanguage}; var languages = new Array(); var vat_number = {if $vat_number}1{else}0{/if}; // Multilang field setup must happen before document is ready so that calls to displayFlags() to avoid // precedence conflicts with other document.ready() blocks {foreach $languages as $k => $language} languages[{$k}] = { id_lang: {$language.id_lang}, iso_code: '{$language.iso_code}', name: '{$language.name}', is_default: '{$language.is_default}' }; {/foreach} // we need allowEmployeeFormLang var in ajax request allowEmployeeFormLang = {$allowEmployeeFormLang}; displayFlags(languages, id_language, allowEmployeeFormLang); $(document).ready(function() { {if isset($fields_value.id_state)} if ($('#id_country') && $('#id_state')) { ajaxStates({$fields_value.id_state}); $('#id_country').change(function() { ajaxStates(); }); } {/if} if ($(".datepicker").length > 0) $(".datepicker").datepicker({ prevText: '', nextText: '', dateFormat: 'yy-mm-dd' }); }); {block name="script"}{/block} </script>{/if} Link to comment Share on other sites More sharing options...
bside2234 Posted October 3, 2013 Author Share Posted October 3, 2013 Around line 409 it mentions a block TinyMCE: {block name="after"}{/block}{if isset($tinymce) && $tinymce} <script type="text/javascript"> var iso = '{$iso}'; var pathCSS = '{$smarty.const._THEME_CSS_DIR_}'; var ad = '{$ad}'; $(document).ready(function(){ {block name="autoload_tinyMCE"} tinySetup({ editor_selector :"autoload_rte" }); {/block} Link to comment Share on other sites More sharing options...
Paulito Posted October 3, 2013 Share Posted October 3, 2013 OK, you have found the correct place $(document).ready(function(){ {block name="autoload_tinyMCE"} tinySetup({ editor_selector :"autoload_rte" YOU NEED TO ENTER CODE HERE }); {/block} Please have a look at this tutorial by vekia http://mypresta.eu/en/art/tag/tinymce/ scroll to the bottom of the page to find it Paul Link to comment Share on other sites More sharing options...
bside2234 Posted October 3, 2013 Author Share Posted October 3, 2013 I couldn't get any of that to work. It just stayed the same. I even changed the validate.php. I tried everything I could think of and it didn't change anything. Link to comment Share on other sites More sharing options...
vekia Posted October 5, 2013 Share Posted October 5, 2013 hello i've got two tutorials. one for cms page, second for product page. which one you followed? Link to comment Share on other sites More sharing options...
bside2234 Posted October 5, 2013 Author Share Posted October 5, 2013 (edited) I did this: http://mypresta.eu/en/art/developer/prestashop-product-page-full-rich-editor.html I take it back. This is what I did: http://mypresta.eu/en/art/know-how/tinymce-editor-full-options-all-html-tags.html I tried both an neither worked. I did notice the validation.php code needed to be commented out was a little different though. Edited October 5, 2013 by bside2234 (see edit history) Link to comment Share on other sites More sharing options...
vekia Posted October 6, 2013 Share Posted October 6, 2013 really weird that tutoriales doesn't work for you. can you show how your ADMIN_DIR/themes/default/template/controllers/product/helpers/form.tpl file looks like? Link to comment Share on other sites More sharing options...
bside2234 Posted October 6, 2013 Author Share Posted October 6, 2013 (edited) I already did in post #5. I'll try it again. It should show up instantly after I refresh the page right? I force compiled last time too. Edited October 6, 2013 by bside2234 (see edit history) Link to comment Share on other sites More sharing options...
vekia Posted October 7, 2013 Share Posted October 7, 2013 yes you pasted coe but it looks like: tinySetup({ editor_selector :"autoload_rte" }); and this is not the same code as code in tutorials mentioned by Paulito Link to comment Share on other sites More sharing options...
bside2234 Posted October 7, 2013 Author Share Posted October 7, 2013 Sorry. I wasn't giving this my full attention. I was helping my son with his homework. Here is the code you requested: {** 2007-2013 PrestaShop** NOTICE OF LICENSE** This source file is subject to the Academic Free License (AFL 3.0)* that is bundled with this package in the file LICENSE.txt.* It is also available through the world-wide-web at this URL:* http://opensource.org/licenses/afl-3.0.php* If you did not receive a copy of the license and are unable to* obtain it through the world-wide-web, please send an email* to [email protected] so we can send you a copy immediately.** DISCLAIMER** Do not edit or add to this file if you wish to upgrade PrestaShop to newer* versions in the future. If you wish to customize PrestaShop for your* needs please refer to http://www.prestashop.com for more information.** @author PrestaShop SA <[email protected]>* @copyright 2007-2013 PrestaShop SA* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)* International Registered Trademark & Property of PrestaShop SA*}{extends file="helpers/form/form.tpl"}{block name="autoload_tinyMCE"} // Execute when tab Informations has finished loading tabs_manager.onLoad('Informations', function(){ tinySetup({ editor_selector :"autoload_rte", setup : function(ed) { ed.onInit.add(function(ed) { if (typeof ProductMultishop.load_tinymce[ed.id] != 'undefined') { if (typeof ProductMultishop.load_tinymce[ed.id]) ed.hide(); else ed.show(); } }); ed.onKeyUp.add(function(ed, e) { tinyMCE.triggerSave(); textarea = $('#'+ed.id); max = textarea.parent('div').find('span.counter').attr('max'); if (max != 'none') { textarea_value = textarea.val(); count = stripHTML(textarea_value).length; rest = max - count; if (rest < 0) textarea.parent('div').find('span.counter').html('<span style="color:red;">{l s='Maximum'} '+max+' {l s='characters'} : '+rest+'</span>'); else textarea.parent('div').find('span.counter').html(' '); } }); } }); });{/block}{block name="defaultForm"} <div> <div class="productTabs" style="display:none;"> <ul class="tab"> {*todo href when nojs*} {foreach $product_tabs key=numStep item=tab} <li class="tab-row"> <a class="tab-page {if $tab.selected}selected{/if}" id="link-{$tab.id}" href="{$tab.href}&updateproduct">{$tab.name}</a> </li> {/foreach} </ul> </div> </div> <script type="text/javascript"> var token = '{$token}'; var id_product = {if isset($product->id)}{$product->id}{else}0{/if}; var id_lang_default = {$id_lang_default}; var product_type_pack = {Product::PTYPE_PACK}; var product_type_virtual = {Product::PTYPE_VIRTUAL}; var product_type_simple = {Product::PTYPE_SIMPLE}; var has_combinations = {$has_combinations}; var toload = new Array(); var empty_pack_msg = '{l s='This pack is empty. You will need to add at least one product to the pack before you can save.' slashes=1}'; var empty_name_msg = '{l s='The product name is empty. You will at least need to enter a name for the default language before you can save the product.' slashes=1}'; var empty_link_rewrite_msg = '{l s='The friendly URL is empty. You will at least need to enter a friendly URL for the default language before you can save the product.' slashes=1}'; var reload_tab_title = '{l s='Confirmation' slashes=1}'; var reload_tab_description = '{l s='Some tabs was not loaded correctly. Would you like to reload them?' slashes=1}'; $('#product-tab-content-wait').show(); var post_data = {$post_data}; var save_error = {if $save_error}true{else}false{/if}; var product_type = {$product_type}; {*var mce_maximum = '{l s='Maximum'}';*} {if isset($display_multishop_checkboxes) && $display_multishop_checkboxes} var display_multishop_checkboxes = true; {else} var display_multishop_checkboxes = false; {/if} $(document).ready(function() { $('#product-tab-content-wait').show(); //product_type = $("input[name=type_product]:checked").val(); if (product_type == product_type_pack) { $('li.tab-row a[id*=VirtualProduct]').hide(); } else if (product_type == product_type_virtual) { $('li.tab-row a[id*=Pack]').hide(); $('li.tab-row a[id*=Shipping]').hide(); } else { $('li.tab-row a[id*=Pack]').hide(); $('li.tab-row a[id*=VirtualProduct]').hide(); } $('#desc-product-newCombination').hide(); {* submenu binding *} $(".tab-page").click(function(e){ e.preventDefault(); // currentId is the current product tab id currentId = $(".productTabs a.selected").attr('id').substr(5); // id is the wanted producttab id id = $(this).attr('id').substr(5); // Update submit button value var split_position = id.indexOf('-') + 1; var btn_name = id.substr(split_position); $('#key_tab').val(btn_name); if ($(this).attr("id") != $(".productTabs a.selected").attr('id')) { $(".tab-page").removeClass('selected'); $("#product-tab-content-"+currentId).hide(); } // if the tab has not already been loaded, load it now tabs_manager.display(id, true); tabs_manager.onLoad(id, function(){ $("#product-tab-content-"+id).show(0, function(){ $(this).trigger('displayed'); }); $("#link-"+id).addClass('selected'); }); var languages = new Array(); if (btn_name == "Combinations") { $('#desc-product-new').hide(); $('#desc-product-newCombination').show(); populate_attrs(); } else if (btn_name == "Attachments") { handleSaveButtons(); } else { $('#desc-product-newCombination').hide(); // if pack is enabled, save button are visible only if pack is valid handleSaveButtons(); } }); $(".productTabs a.selected").click(); // disable save if Associations tab is not loaded if ($('#product-tab-content-Associations').hasClass('not-loaded')) disableSave(); tabs_manager.onLoad('Associations', function(){ handleSaveButtons(); }); $('.confirm_leave').live('click', function(){ // Double quotes are necessary when the translated string has single quotes return confirm("{l s='You will lose all unsaved modifications. Are you sure that you\'d like to proceed?' js=1}"); }); }); var tabs_preloaded = new Array(); // Listen to the load event that is fired each time an ajax call to load a tab has completed $(window).bind("load", function() { {* Fill an array with tabs that need to be preloaded *} var tabs_to_preload = new Array(); {foreach $tabs_preloaded as $tab_name => $value} {* If the tab was not given a loading priority number it will not be preloaded *} {if (is_numeric($value))} if ($("#product-tab-content-"+'{$tab_name}').hasClass('not-loaded')) tabs_to_preload.push('{$tab_name}'); {/if} {/foreach} // Recursively load tabs starting with the first element of stack tabs_manager.displayBulk(tabs_to_preload); $('.productTabs').show(); $('#product_form').show(); $('#product-tab-content-wait').hide(); }); </script> {***********************************************} {********** TO CHECK !!!!!!!!!!!!!!! ***********} <script type="text/javascript"> // <![CDATA[ ThickboxI18nImage = "{l s='Image'}"; ThickboxI18nOf = "{l s='of'}"; ThickboxI18nClose = "{l s='Close'}"; ThickboxI18nOrEscKey = "{l s='(or "Esc")'}"; ThickboxI18nNext = "{l s='Next >'}"; ThickboxI18nPrev = "{l s='< Previous'}"; tb_pathToImage = "../img/loadingAnimation.gif"; //]]> </script> <div id="product-tab-content-wait" style="display:none"><div id="loading">{l s='Loading...'}</div></div> <form id="product_form" action="{$form_action}" method="post" enctype="multipart/form-data" name="product" style="display:none;"> <input type="hidden" name="id_product" value="{$id_product}" /> <input type="hidden" id="is_virtual" name="is_virtual" value="{$product->is_virtual|escape:html:'UTF-8'}" /> <div class="tab-pane" id="tabPane1"> {if !$product->active && $product->isAssociatedToShop()} <div class="warn draft" > <p> <span style="float: left"> {l s='Your product will be saved as a draft.'}</span> <span style="float:right"><a href="#" class="button" style="display: block" onclick="submitAddProductAndPreview()" >{l s='Save and preview.'}</a></span> <input type="hidden" name="fakeSubmitAddProductAndPreview" id="fakeSubmitAddProductAndPreview" /> <br /> </p> </div> {/if} {* all input are here *} {foreach $product_tabs key=numStep item=tab} <div id="product-tab-content-{$tab.id}" class="{if !$tab.selected}not-loaded{/if} product-tab-content" {if !$tab.selected}style="display:none"{/if}> {if $tab.selected} {$custom_form} {/if} </div> {/foreach} </div> <input type="hidden" name="id_product_attribute" id="id_product_attribute" value="0" /> <input type="hidden" name="key_tab" id="key_tab" value="Informations" /> <input id="product_form_submit_btn" type="submit" value="{l s='Save'}" name="submitAddproduct" class="button" /> </form> <br/>{/block} Link to comment Share on other sites More sharing options...
vekia Posted October 7, 2013 Share Posted October 7, 2013 your code isn't modified. you need to add code mentioned in the tutorials to extend tinymce features. editor_selector :"autoload_rte", theme_advanced_buttons1 : "save,newdocument,bold,italic,underline,strikethrough,justifyleft,justifycenter,justifyright,justifyfull,styleselect,formatselect, fontselect,fontsizeselect", theme_advanced_buttons2 : "cut,copy,paste,pastetext,pasteword,search,replace,bullist,numlist,outdent,indent,blockquote,undo,redo,link,unlink,anchor,image,cleanup,help,codemagic,insertdate,inserttime,preview,forecolor,backcolor", theme_advanced_buttons3 : "code,tablecontrols,hr,removeformat,visualaid,sub,sup,charmap,emotions,iespell,media,advhr,print,ltr,rtl,fullscreen", theme_advanced_buttons4 : "styleprops,cite,abbr,acronym,del,ins,attribs,visualchars,nonbreaking,template,pagebreak,restoredraft,visualblocks", theme_advanced_toolbar_location : "top", theme_advanced_toolbar_align : "left", theme_advanced_statusbar_location : "bottom", theme_advanced_resizing : false, extended_valid_elements: 'pre[*],script[*],style[*]', valid_children: "+body[style|script],pre[script|div|p|br|span|img|style|h1|h2|h3|h4|h5],*[*]", valid_elements : '*[*]', force_p_newlines : false, cleanup: false, forced_root_block : false, force_br_newlines : true, Link to comment Share on other sites More sharing options...
bside2234 Posted October 7, 2013 Author Share Posted October 7, 2013 (edited) I know. I undid it. I'll try it again though. Do I have to do anything to the Validate.php? Edit: OMG! I was following the wrong path! I was going to: /.../admin/themes/default/template/helpers/form/form.tpl which I saw in this tutorial: http://mypresta.eu/en/art/know-how/tinymce-editor-full-options-all-html-tags.html I don't know what possessed me to keep following that path. Once I really looked at the path you gave and the path I took, I slapped my head. The extra buttons showed up. Do I still need to do the Validate.php comment out? My validate.php looked a little different. I wonder if I'm going to the right file? Here's the path I took: /griffineffects.com/store/classes/validate.php and here's the only code I can find that is close: if (preg_match('/<[\s]*script/ims', $html) || preg_match('/('.$events.')[\s]*=/ims', $html) || preg_match('/.*script\:/ims', $html)) return false; Edited October 7, 2013 by bside2234 (see edit history) Link to comment Share on other sites More sharing options...
vekia Posted October 8, 2013 Share Posted October 8, 2013 hello validate function change is only necessary when you want to use <script> tags (and other tags too), instead of: if (preg_match('/<[\s]*script/ims', $html) || preg_match('/('.$events.')[\s]*=/ims', $html) || preg_match('/.*script\:/ims', $html)) return false; just use: return $html; Link to comment Share on other sites More sharing options...
bside2234 Posted October 8, 2013 Author Share Posted October 8, 2013 Just to be clear. I comment out: if (preg_match('/<[\s]*script/ims', $html) || preg_match('/('.$events.')[\s]*=/ims', $html) || preg_match('/.*script\:/ims', $html)) return false; And type in: return $html; Link to comment Share on other sites More sharing options...
Recommended Posts