cdmafra Posted March 26, 2014 Share Posted March 26, 2014 Hello. I have TinyMCE installed in my website. Locally, it is working perfectly. However, when I upload to the server, it returns a normal textarea, without TinyMCE. Above the code. <!DOCTYPE html> <html> <head> <meta charset="utf-8" /> <meta lang="en_US" /> <meta name="viewport" content="width=device-width" /><!-- Set the viewport width to device width for mobile --> <title>Publicar notícia MRN</title> <link href="../stylesheets/foundation.min.css" rel="stylesheet" type="text/css" /> <link href="../stylesheets/app.css" rel="stylesheet" type="text/css" /> <link href="../stylesheets/admin.css" rel="stylesheet" type="text/css" /> <link rel="stylesheet" href="http://code.jquery.com/ui/1.10.3/themes/smoothness/jquery-ui.css" /> <link rel="shortcut icon" href="../images/logobar.ico" type="image/x-icon"> <!--SCRITPS --> <script type="text/javascript" src="../javascripts/jquery-1.10.2.min.js"></script> <script type="text/javascript" src="tinymce/tinymce.min.js"></script> <script type="text/javascript"> tinymce.init({ selector: "textarea", theme: "modern", plugins: [ "advlist autolink link image lists charmap print preview hr anchor pagebreak spellchecker", "searchreplace wordcount visualblocks visualchars code fullscreen insertdatetime media nonbreaking", "save table contextmenu directionality emoticons template textcolor colorpicker paste", ], image_advtab: true, font_size_style_values: "9px,10px,11px,12px,13px,14px,16px,18px,20px", toolbar1: "sizeselect | bold italic | insertfile undo redo | styleselect | alignleft aligncenter alignright alignjustify | bullist numlist outdent indent | link image | print preview media",//used font size for showing font size toolbar toolbar2: "fontselect | fontsizeselect | colorpicker",//used font size for showing font size toolbar style_formats: [ {title: 'Bold text', inline: 'b'}, {title: 'Red text', inline: 'span', styles: {color: '#ff0000'}}, {title: 'Red header', block: 'h1', styles: {color: '#ff0000'}}, {title: 'Example 1', inline: 'span', classes: 'example1'}, {title: 'Example 2', inline: 'span', classes: 'example2'}, {title: 'Table styles'}, {title: 'Table row 1', selector: 'tr', classes: 'tablerow1'} ], resize: false, inline_styles : true, }); </script> <?php if (get_magic_quotes_gpc()) { function stripslashes_gpc(&$value) { $value = stripslashes($value); } array_walk_recursive($_GET, 'stripslashes_gpc'); array_walk_recursive($_POST, 'stripslashes_gpc'); array_walk_recursive($_COOKIE, 'stripslashes_gpc'); array_walk_recursive($_REQUEST, 'stripslashes_gpc'); } ?> <?php if (isset($_POST["publish-p"])) { $categoria= mysql_real_escape_string($_POST['categoria']); $categoria2= mysql_real_escape_string($_POST['categoria2']); $destaque= mysql_real_escape_string($_POST['destaque']); $publicado= mysql_real_escape_string($_POST['publicado']); $news_title= mysql_real_escape_string($_POST['news_title']); $news_subtitle= mysql_real_escape_string($_POST['news_subtitle']); $news_desc= mysql_real_escape_string($_POST['news_desc']); $news_post= mysql_real_escape_string($_POST['news_post']); $news_date= mysql_real_escape_string($_POST['news_date']); $hour= mysql_real_escape_string($_POST['hour']); $news_image= mysql_real_escape_string($_POST['news_image']); $copyright= mysql_real_escape_string($_POST['copyright']); $publish="INSERT INTO news(news_guid,categoria,categoria2,destaque,publicado,news_title,news_subtitle,news_desc,news_post,news_date,hour,news_image,copyright) VALUES(uuid(),'$categoria','$categoria2','$destaque','$publicado','$news_title','$news_subtitle','$news_desc','$news_post','$news_date','$hour','$news_image','$copyright')"; mysql_query($publish) OR DIE(mysql_error()); //mensagem após submeter dados echo "<script>alert('Notícia publicada!');</script>"; } ?> <script src="http://code.jquery.com/ui/1.10.3/jquery-ui.js"></script> <script> $(function() { $( "#datepicker" ).datepicker({ changeYear: true, dateFormat: "dd'-'mm'-'yy", showButtonPanel: true, }); }); </script> <!-- script para Toogle Menu --> <script src="../js/toogle-menu.js"></script> /**FIM DE SCRIPTS **/ </head> <body > <div class="bo-header"><div class="row"><div class="twelve columns"> <p>Olá <?php echo "<strong>".$_SESSION["name"]."</strong>."; ?><br/><strong><a href="?logout">Logout</a></strong></p> </div></div></div> <!--MENU--> <!-- Navigation --> <nav class="top-bar fixed"> <div class="twelve columns" ><div style="background:url(../images/carbonback.png); margin-top:2px;"><img src="../images/cabecresize.png" alt="Cabeçalho"></div></div> <ul> <li class="name"><h1 class="menu_dp">Menu</h1></li> <li class="toggle-topbar"><a href="#"></a></li> </ul> <section> <ul class="left"> <!--<li class="menu"><a href="?perfil" title="Ver perfil">Perfil</a></li>--> <li class="menu"><a href="?submit-news" title="Publicar notícia MRN">Publicar notícia MRN</a></li> <li class="menu"><a href="?listar-news" title="Todas as notícias">Todas as notícias</a></li> </ul> </section></nav> <hr class="linha"/> <!--CONTEUDO--> <div class="row"> <div class="twelve columns"> <form action="#" method="post" onsubmit="return $(this).validate()" name="publish" > <h3 class="n3">Publicar notícia</h3> <div class="publish-content"> <div> <h3 class="n3v4">Categoria</h3> <select name="categoria"> <option value="Autos/Pistas">Autos/Pistas</option> <option value="Autos/Ralis-TT">Autos/Ralis-TT</option> <option value="Motos/Pistas">Motos/Pistas</option> <option value="Motos/Ralis-TT">Motos/Ralis-TT</option> <option value="Outros">Outros</option> <option value="Entrevistas">Entrevistas</option> <option value="ci">C&I: OnTheRoad</option> <option value="Multimedia">Multimédia</option> </select> </div> <br/> <div> <h3 class="n3v4">Categoria 2 (opcional)</h3> <select name="categoria2"> <option value="">Nenhuma</option> <option value="Autos/Pistas">Autos/Pistas</option> <option value="Autos/Ralis-TT">Autos/Ralis-TT</option> <option value="Motos/Pistas">Motos/Pistas</option> <option value="Motos/Ralis-TT">Motos/Ralis-TT</option> <option value="Outros">Outros</option> <option value="Entrevistas">Entrevistas</option> <option value="ci">C&I: OnTheRoad</option> <option value="Multimedia">Multimédia</option> </select> </div> <br/> <h3 class="n3v4">Destaque?</h3> <label class="cbox"> <input type="radio" name="destaque" value="sim" checked>Sim</input> <input type="radio" name="destaque" value="não">Não</input> </label> <br/> <h3 class="n3v4">Publicar já?</h3> <label class="cbox"> <input type="radio" name="publicado" value="sim" checked>Sim</input> <input type="radio" name="publicado" value="não">Não</input> </label> <br/> <input name="news_title" type="text" class="title" placeholder="(título)" data-validation="required" title="required"/> <input name="news_subtitle" type="text" class="title" placeholder="(subtítulo)" data-validation="required" maxlength="40" /> <input name="news_desc" type="text" class="description" placeholder="(descrição)" data-validation="required" title="required" maxlength="165"/> <textarea name="news_post" class="post" placeholder="(notícia)" style="width:100%;" ></textarea> <input name="news_date" type="text" class="date" placeholder="(data)" data-validation="required" title="required" id="datepicker" /> <input name="hour" type="text" class="description" placeholder="(hora HH:MM)" data-validation="required" title="required" maxlength="5" data-format="hh:mm:ss" id="datetimepicker3" /> <input name="news_image" type="text" class="description" placeholder="(link imagem)" data-validation="required" title="required"/> <input name="copyright" type="text" class="description" placeholder="(Copyright da/s Imagem/ns)" data-validation="required" title="required"/></div> <div class="publish-footer"> <input type="submit" name="publish-p" value="Publicar" class="button"> <input type="submit" name="cancel" value="Cancelar" class="secondary button" onclick="window.location='../login/?submit-news'" > </div> </form> </div> </div> <?php include ("rodape.php") ?> </body> </html> Quote Link to comment Share on other sites More sharing options...
Ch0cu3r Posted March 26, 2014 Share Posted March 26, 2014 Are you sure you have uploaded all files correctly? Are there any JavaScript errors reported in your browsers console (F12 > console tab)? Quote Link to comment Share on other sites More sharing options...
Solution cdmafra Posted March 26, 2014 Author Solution Share Posted March 26, 2014 Are you sure you have uploaded all files correctly? Are there any JavaScript errors reported in your browsers console (F12 > console tab)? Yes, I reuploaded all files twice to ensure that are correctly inserted. Quote Link to comment Share on other sites More sharing options...
Auldstampguy Posted July 5, 2015 Share Posted July 5, 2015 I'm sure you will have solved this already, but the reference to: "tinymce/tinymce.min.js" should have an "/" at the start so that it is: "/tinymce/tinymce.min.js" Regards ... Tim Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.