ghizlanebel Posted September 24, 2013 Share Posted September 24, 2013 hi gus plz i wnt to insert javascript on CMS page but this message show up .Le champ contenu (Français (French)) est invalide (frensh version of perstashop). Link to comment Share on other sites More sharing options...
vekia Posted September 24, 2013 Share Posted September 24, 2013 check this: http://mypresta.eu/en/art/developer/prestashop-product-page-full-rich-editor.html follow part related to "Validate.php" file, nothing more 3 Link to comment Share on other sites More sharing options...
ghizlanebel Posted September 24, 2013 Author Share Posted September 24, 2013 (edited) thnx for helping but i want to add the script in cms page not product page thx again Edited September 24, 2013 by ghizlanebel (see edit history) Link to comment Share on other sites More sharing options...
vekia Posted September 24, 2013 Share Posted September 24, 2013 i know, but there is a "validate.php file modification" part, just follow it, and you will be able to add scripts to cms page 1 Link to comment Share on other sites More sharing options...
bbgun91 Posted January 6, 2014 Share Posted January 6, 2014 It works perfect for me on the version 1.4.10.Thanks Vekia ! Here is what is necessary (for Below v1.5.5) : public static function isCleanHtml($html){ // We comment the following lines to prevent the check of the content /* $events = 'onmousedown|onmousemove|onmmouseup|onmouseover|onmouseout|onload|onunload|onfocus|onblur|onchange'; $events .= '|onsubmit|ondblclick|onclick|onkeydown|onkeyup|onkeypress|onmouseenter|onmouseleave|onerror|onselect|onreset|onabort|ondragdrop|onresize|onactivate|onafterprint|onmoveend'; $events .= '|onafterupdate|onbeforeactivate|onbeforecopy|onbeforecut|onbeforedeactivate|onbeforeeditfocus|onbeforepaste|onbeforeprint|onbeforeunload|onbeforeupdate|onmove'; $events .= '|onbounce|oncellchange|oncontextmenu|oncontrolselect|oncopy|oncut|ondataavailable|ondatasetchanged|ondatasetcomplete|ondeactivate|ondrag|ondragend|ondragenter|onmousewheel'; $events .= '|ondragleave|ondragover|ondragstart|ondrop|onerrorupdate|onfilterchange|onfinish|onfocusin|onfocusout|onhashchange|onhelp|oninput|onlosecapture|onmessage|onmouseup|onmovestart'; $events .= '|onoffline|ononline|onpaste|onpropertychange|onreadystatechange|onresizeend|onresizestart|onrowenter|onrowexit|onrowsdelete|onrowsinserted|onscroll|onsearch|onselectionchange'; $events .= '|onselectstart|onstart|onstop'; return (!preg_match('/<[ \t\n]*script/ims', $html) && !preg_match('/('.$events.')[ \t\n]*=/ims', $html) && !preg_match('/.*script\:/ims', $html)); */ return $html; // We add this line to return at least the original parameter } For more recent versions ( from Prestashop v1.5.5) please see the link Vekia posted. Link to comment Share on other sites More sharing options...
freemall Posted May 19, 2014 Share Posted May 19, 2014 (edited) now it is showing HTML code check it here http://qyntra.com/content/9-pincode thanks Edited May 19, 2014 by freemall (see edit history) Link to comment Share on other sites More sharing options...
vekia Posted May 19, 2014 Share Posted May 19, 2014 to paste code you have to paste it with "source code" tool i recorder shot video which shows how to do it in proper way 1 Link to comment Share on other sites More sharing options...
freemall Posted May 19, 2014 Share Posted May 19, 2014 thanks Vekia I have done that, but I want to run ajax from other site it is not working it calls xmlhttp.open("GET","http://qyntra.in/getpin.php?q="+str,true); <?php $q = intval($_GET['q']);$con = mysqli_connect('localhost','xxx','xxx','xxx');if (!$con) { die('Could not connect: ' . mysqli_error($con));}mysqli_select_db($con,"chatport_qyntra");$sql="SELECT * FROM fedex WHERE pin_code = "."$q";$result = mysqli_query($con,$sql);echo "<table border='0'>";while($row = mysqli_fetch_array($result)) { echo "<tr>"; echo "<td>" . $row['cod'] . "</td>"; echo "</tr>";}echo "</table>";mysqli_close($con);?> please help me Link to comment Share on other sites More sharing options...
kognito Posted July 7, 2014 Share Posted July 7, 2014 check this: http://mypresta.eu/en/art/developer/prestashop-product-page-full-rich-editor.html follow part related to "Validate.php" file, nothing more Hi Vekia, do you already have a solution for embedding code in v1.6? I have followed your post above and changed the Validate.php, but I only ever end up with an empty <p></p> tag instead of the code... Thanks for your help! Cheers Clemens Link to comment Share on other sites More sharing options...
vekia Posted July 7, 2014 Share Posted July 7, 2014 Hi Vekia, do you already have a solution for embedding code in v1.6? I have followed your post above and changed the Validate.php, but I only ever end up with an empty <p></p> tag instead of the code... Thanks for your help! Cheers Clemens here it is, especially for 1.6: http://www.prestashop.com/forums/topic/318425-tutorial-tinymce-rich-text-editor-extended-version/ 2 Link to comment Share on other sites More sharing options...
CHEF Angélina Posted March 6, 2015 Share Posted March 6, 2015 Bonjour, Je voudrais insérer ce code sur une de mes pages CMS comment puis-je faire SVP ? : <script type="text/javascript" src="http://services.supportduweb.com/comments/12040.js"></script><a href="http://www.supportduweb.com/service-module-commentaires-gratuit-messages-visiteurs-module-script-systeme-commentaires-gratuit.html">Module de Commentaires</a> Link to comment Share on other sites More sharing options...
Recommended Posts