zonamea Posted November 26, 2011 Report Posted November 26, 2011 Care se pricepe cu .tpl ? am nevoie de putin ajutor va rog.am urmatorul cod in fisier .tpl{if $videoarray[0].embedcode != ""} <center> {insert name=get_stripped_phrase3 value=a assign=ecode details=$videoarray[0].embedcode}{$ecode|stripslashes} </center>Acesta cod arata filmu pe care l-am introdus, ei... acum ceea ce incerc eu sa fac este urmatoarea chestie, sa introduc in .tpl un java script care sa afiseze o reclama timp de 15 sec apoi sa apara filmuletu si codu scriptului care vreau sa il introduc este urmatorul :<!-- BEGIN Game--><!-- BEGIN Loading JS --> <script type=text/javascript> setTimeout('hide()',15000); // Time Setting function hide() { var x=document.getElementById('first').style; var y=document.getElementById('second').style; if(x.display=='block') { x.display='none'; y.display='block'; } else { x.display='block'; y.display='none'; } } </script><div id="first" style="display:block;"> <center>RECLAMA ADS <br /><!-- GAMES START HERE --> <div id="prerollad" style="width: 100%;" align="center"> <img src="/ajax-loaderblue.gif"><br> <div id="progressindicator" style="text-align: center;">Loading...Game will start in 9 seconds...</div> <div id="startgametext" style="text-align: center;"> <a href="javascript:showgame();"></a></div> </div> <div id="flashgame" style="visibility: hidden; display: none;"> </div> <script type="text/javascript">for (i = 0; i < 12; i++) { setTimeout("document.getElementById('progressindicator').innerHTML='Jocul Va Incepe In " + (12-i) + " Secunde...';", i * 1200);}function showgame(){ document.getElementById('prerollad').style.display="none"; document.getElementById('flashgame').style.visibility="visible"; document.getElementById('flashgame').style.display="block";}setTimeout("showgame()", 12000);</script> <!-- GAMES END HERE --> </center> </center></div><div id="second" style="display:none;"> <center>{if $videoarray[0].embedcode != ""} <center>[COLOR="Red"]--- Acici e codu care l-am dat mai sus[/COLOR] {insert name=get_stripped_phrase3 value=a assign=ecode details=$videoarray[0].embedcode}{$ecode|stripslashes}[COLOR="Red"]--- Acici e codu care l-am dat mai sus[/COLOR] </center> </center> <center> ADS JOS </center></center> <div class="clear"></div> </div>Cum pot sa introduc si eu acest java script ? va rog ajutati-ma Quote
turnback Posted November 26, 2011 Report Posted November 26, 2011 Ce ai tu acolo e Smarty engine... si ca sa pui javascript in templates trebuie sa pui codul intre {literal}{/literal} l.e. numai javascriptul nu tot codul. Quote
zonamea Posted November 26, 2011 Author Report Posted November 26, 2011 Nu dai un exemplu mai explicit pls? unde bag {literal}{/literal} la inceput si la sfarsit sau la fiecare linie ? Quote
wildchild Posted November 26, 2011 Report Posted November 26, 2011 What the fuck man?!?!Ai 3 warn-uri pentru dublu post, e asa de greu sa te abtii? Quote