gklsmykker Posted October 4, 2016 Share Posted October 4, 2016 Hi I have some cool animations made in adobe edge animate, and I would like to put them on my webshop. They are in HTML5 and Javascript. I'm not at all smart enough to figure out how to add them into the raw code, so I thought the easiest way would be to make an iframe. I have enabled iframes and disabled HTML purifier in preferences. And I've found some discussions that suggest, that I should also "comment out" the following lines in "Classes / validate.php": if (preg_match('/<[\s]*script/ims', $html) || preg_match('/('.$events.')[\s]*=/ims', $html) || preg_match('/.*script\:/ims', $html)) { return false; } if (!$allow_iframe && preg_match('/<[\s]*(i?frame|form|input|embed|object)/ims', $html)) { return false; } But no matter what, it seems like I'm only able display media content in iframes, like Youtube videoes or regular images - but not html content. Can anyone please help? I use Prestashop version 1.6.1.5. Best regards Grete Lauridsen Link to comment Share on other sites More sharing options...
Bill Dalton Posted October 4, 2016 Share Posted October 4, 2016 You don't mention if you are trying to put the html in the small description or the large description. Most themes have code that will stripe out html from the small discrption because it is used in multiple areas such as category pages. HTML may look great on your product page but not so good on a category page. Here is an example of a line in the theme of product.tpl, <p class="product_descr" class="product_description">{$accessory.description_short|strip_tags|truncate:170:'...'}</p> Look at the line, "strip_tags" will take out all html, and truncate:170:'...' will limit what is display to the first 170 characters. Link to comment Share on other sites More sharing options...
gklsmykker Posted October 7, 2016 Author Share Posted October 7, 2016 Hello Bill Thank you very much for your reply - and sorry for my late reply. I've been away for the last couple of days. Actually I want it on the frontpage (https://www.gklsmykker.dk/) - on the top hook in the standard theme (the two pictures to the right in the top). I've also tried on a CMS page with the same result. Actually I haven't tried it on product pages. Is the iframe option only for product pages? If no, could you please tell me where to look for the code you gave me an example of? Thank you very much Best regards Grete Link to comment Share on other sites More sharing options...
Bill Dalton Posted October 7, 2016 Share Posted October 7, 2016 Grete, take a look at this free module, https://www.prestashop.com/forums/topic/189039-module-html-box-for-free/ Link to comment Share on other sites More sharing options...
musicmaster Posted October 7, 2016 Share Posted October 7, 2016 In the settings there is an option whether I frames are allowed. The default is not.. Link to comment Share on other sites More sharing options...
vekia Posted October 7, 2016 Share Posted October 7, 2016 They are in HTML5 and Javascript. javascripts are not allowed because of this - you have to extend tinymce editor, only then it will support iframes / jscripts 1 Link to comment Share on other sites More sharing options...
gklsmykker Posted October 15, 2016 Author Share Posted October 15, 2016 (edited) Thanks everyone - and especially Vekia I tried to install tinymce editor but it doesnt' seem to make the iframes work. I can see the content of the iframe in preview mode when I edit the html in backoffice - but not anywhere else (please see the attachements: Iframe_1 is the preview mode in the backoffice - Iframe_2 is what I see in front office - which is just blank) Am I doing something wrong? - The iframe settings is still on allowed and the html purifier is disabled UPDATE: tinymce treats the content as a video - it is an animation, so I guess that's right. I was thinking if there is anywhere where I can specify which video formats is allowed? Edited October 15, 2016 by gklsmykker (see edit history) Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now