• 0
  • 0 RepliesReplies
  • 3065 ReadTimes Read
  • 0 PointsPoints

Topic: Poner Codigo Javascript en index.template.php

Usuario: ifonchero
Rango: Nuevo Usuario
Mensajes: 102
Points: 22
Mi web: http://www.tusahorros.net
Perfil: View Profile
Pais:
es
Poner Codigo Javascript en index.template.php
July 13, 2013 - 09:23 09:23
Poner Codigo Javascript en index.template.php

Datos importantes:
Url del foro: www.tusahorros.net
Version de SMF: 2.0.4
Theme del foro: Light Theme

Descripcion del problema:
Hola chicos!! De nuevo una consulta. He puesto un banner en la cabecera como aparece en esta imagen:



Para hacerlo he utilizado lo siguiente en index.template.php

Code: [Select]
echo '

<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.6.2/jquery.min.js"></script>
<script type="text/javascript" src="', $settings['default_theme_url'], '/scripts/spoiler.js"></script>
</head>
<div class="banner">
<a href="https://coingeneration.com/auth/new/245694/" target="_blank"><img title="Tus Ahorros" alt="Foro Tus Ahorros" src="https://coingeneration.com/image/promo/banner3_468x60.gif" height ="60px" width="468px"/></a>
</div>
<div class="social_icon">
    <a href="https://www.facebook.com/tusahorros.net" target="_blank"><img src="http://tusahorros.net/facebook.png"></a>
<a href=https://twitter.com/ForoTusAhorros target="_blank"><img src="http://tusahorros.net/twitter.png" ></a>
</div>
<body>';

A partir de <div class="banner"> he puesto el codigo.. luego he ido a index.css he puesto .banner para decirle en que posicion debe estar.

Si se meten pueden ver el banner bien en el centro.. Ahora el problema es el siguiente..

Me gustaria poner un codigo javascript que haga que el banner rote, pero al ponerlo me sale error. El codigo que quiero poner es:

Code: [Select]
<SCRIPT language=JavaScript>
/*
  ---------------------------------------------------------
 | Ad Simple                 Copyright [url=http://www.YugDesign.com]www.YugDesign.com[/url]   |
  ---------------------------------------------------------
 | This program may be used and hosted free of charge by   |
 |anyone for personal purpose as long as this copyright    |
 |notice remains intact.                                   |
  ---------------------------------------------------------
*/

var img_width = "160";
var img_height = "600";
var img_title = "Titulo de la Imagen";


var ad=new Array()
//insert here your images src
ad[0]='http://www.subeimagenes.com/img/tu-publicidad-aquilargo-640208.png';
ad[1]='[url]https://dl.dropboxusercontent.com/u/58220308/imagenes/BANNER/anigif.gif';[/url]

var links=new Array()
//insert here your links
links[0]='http://www.tusahorros.net/t643-sistema-de-creditos-gana-publicidad-gratis';
links[1]='http://www.emoneyspace.com/pat45';

var xy=Math.floor(Math.random()*ad.length);
document.write('<a href="' links[xy] '" target="_blank"><img src="' ad[xy] '" width="' img_width '" height="' img_height '" alt="' img_title '"></a>');
</SCRIPT>

Que tendria que hacer para que quedara en esa posicion que esta ahora pero que se vea el codigo javascript?

Muchas gracias
 

TAGS



top

Smfsimple.com es un sitio destinado a brindar un servicio de soporte y herramientas para foros realizados con el sistema de foros gratuito simplemachines.org. Contamos con un selecto equipo de desarrolladores y conocedores del sistema, sus foros estaran en buenas manos.
This site is not affiliated with or endorsed by Simple Machines