• 0
  • 8 RepliesReplies
  • 3222 ReadTimes Read
  • 0 PointsPoints

Topic: Parse error index con un script

Usuario: Pulsar
Rango: Friend de SMFSimple
Mensajes: 603
Points: 62
Mi web: http://www.imagenesyfondos.net/foro
Perfil: View Profile
Parse error index con un script
April 18, 2012 - 03:28 15:28
Hola, trato de colocar este popup en mi foro:

<script>

var popunder=new Array()

popunder[0]="http://hostpic.com.ar"

var width = '960';
var height = '700';

var p = 'scrollbars=yes,resizable=yes,toolbar=no,'   
'menubar=yes,status=yes,location=no,left=0,top=0,height='   
height   ',width='   width;

var one_time=0

function get_cookie(Name) {
var search = Name   "="
var returnvalue = "";
if (document.cookie.length > 0) {
offset = document.cookie.indexOf(search)
if (offset != -1) { // if the cookie exists
offset  = search.length
end = document.cookie.indexOf(";", offset); // set the index of beginning value
if (end == -1) // set the index of the end of cookie value
end = document.cookie.length;
returnvalue=unescape(document.cookie.substring(offset, end))
}
}
return returnvalue;
}
function loadornot(){
if (get_cookie('popunder')==''){
load_pop_power()
document.cookie="popunder=yes"
}
}
function load_pop_power(){
win2=window.open(popunder[Math.floor(Math.random()*(popunder.length))],"bw",p)
win2.blur()
window.focus()
}
if (one_time==0)
load_pop_power()
else
loadornot()
</script>

En muchos blogs me funciona perfecto, pero aqiu no me funciona, siempre parse error! debe ir en el HEADER y nose donde colocarla o como colocarlo para que no me de error de parse!

Alguno sabria ? Si va un echo o algo antes o despues?

GRACIAS
Usuario: Lean
Rango: Fundador
Mensajes: 6782
Points: 236
Perfil: View Profile
Pais:
ar
Re:Parse error index con un script
Reply #1 April 18, 2012 - 03:57 15:57
Si lo vas a poner en el index.template.php adjuntalo
Usuario: Pulsar
Rango: Friend de SMFSimple
Mensajes: 603
Points: 62
Mi web: http://www.imagenesyfondos.net/foro
Perfil: View Profile
Re:Parse error index con un script
Reply #2 April 18, 2012 - 04:07 16:07
Lo necesito que salga en el head de cada pagina que se abre....
Usuario: Lean
Rango: Fundador
Mensajes: 6782
Points: 236
Perfil: View Profile
Pais:
ar
Re:Parse error index con un script
Reply #3 April 18, 2012 - 05:00 17:00
Por eso, en el index.template.php
Usuario: Pulsar
Rango: Friend de SMFSimple
Mensajes: 603
Points: 62
Mi web: http://www.imagenesyfondos.net/foro
Perfil: View Profile
Re:Parse error index con un script
Reply #4 April 18, 2012 - 06:38 18:38
no no digo en el header....

jajaja re terco aca adjunto!

Usuario: Lean
Rango: Fundador
Mensajes: 6782
Points: 236
Perfil: View Profile
Pais:
ar
Re:Parse error index con un script
Reply #5 April 18, 2012 - 07:02 19:02
Aver...

Busca esto en el index.template.php
Code: [Select]
// Output any remaining HTML headers. (from mods, maybe?)
Y abajo de eso copias esto:
Code: [Select]
echo'<script type="text/javascript">

var popunder=new Array()

popunder[0]="http://hostpic.com.ar"

var width = \'960\';
var height = \'700\';

var p = \'scrollbars=yes,resizable=yes,toolbar=no,\'   
\'menubar=yes,status=yes,location=no,left=0,top=0,height=\'   
height   \',width=\'   width;

var one_time=0

function get_cookie(Name) {
var search = Name   "="
var returnvalue = "";
if (document.cookie.length > 0) {
offset = document.cookie.indexOf(search)
if (offset != -1) { // if the cookie exists
offset  = search.length
end = document.cookie.indexOf(";", offset); // set the index of beginning value
if (end == -1) // set the index of the end of cookie value
end = document.cookie.length;
returnvalue=unescape(document.cookie.substring(offset, end))
}
}
return returnvalue;
}
function loadornot(){
if (get_cookie(\'popunder\')==''){
load_pop_power()
document.cookie="popunder=yes"
}
}
function load_pop_power(){
win2=window.open(popunder[Math.floor(Math.random()*(popunder.length))],"bw",p)
win2.blur()
window.focus()
}
if (one_time==0)
load_pop_power()
else
loadornot()
</script>
';
Usuario: Pulsar
Rango: Friend de SMFSimple
Mensajes: 603
Points: 62
Mi web: http://www.imagenesyfondos.net/foro
Perfil: View Profile
Re:Parse error index con un script
Reply #6 April 18, 2012 - 10:20 22:20
Nop, template parse, puse abajo de eso abriendo un echo'

Codigo

';

Y nop , parse error en el template.... que puede ser ? ¬¬ Utilice el mod /Head and /Body y no tira erro pero tampoco fucniona el popup!

Me esta comiendo el cerebro esto...
Usuario: Lean
Rango: Fundador
Mensajes: 6782
Points: 236
Perfil: View Profile
Pais:
ar
Re:Parse error index con un script
Reply #7 April 18, 2012 - 10:41 22:41
No das mucha informacion tampoco, dejame la url para ver en que linea te tira el error... ¬¬
Usuario: DinamicoBoys
Rango: Nuevo Usuario
Mensajes: 95
Points: 1
Mi web: http://DinamicoBoys.com
Perfil: View Profile
Re:Parse error index con un script
Reply #8 April 19, 2012 - 12:33 00:33
-.- .. yo coloco ese tipo de publicidad con el mod de publicidad "Ad Management mod", y escojo arriba del parte superior de temas.. y salen  ..  ;)    es mas facil que estar editando los archivos ..
 

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