Foros del Web » Programando para Internet » PHP »

alguien m puede ayudar alguien con noktemplate?

Estas en el tema de alguien m puede ayudar alguien con noktemplate? en el foro de PHP en Foros del Web. mira mi pagina es www.nsdnet.tk y tngo en la portada un sistama de noticias m dice el debug: Variable "NOTICIAS" definida en el Template, no ...
  #1 (permalink)  
Antiguo 20/12/2005, 09:11
 
Fecha de Ingreso: julio-2004
Mensajes: 51
Antigüedad: 19 años, 9 meses
Puntos: 0
alguien m puede ayudar alguien con noktemplate?

mira mi pagina es www.nsdnet.tk
y tngo en la portada un sistama de noticias m dice el debug: Variable "NOTICIAS" definida en el Template, no está inicializada.
como soluciono eso?

el codigo php es este
home.php
Código PHP:
<?
$html
->cargar('tHome','home.html');
$html->cargar('tNews','noticias.html');
$html->cargar('tIndex','index2.html'); 
$html->definirBloque('notTabla''tNews');
if(
$conectar = @mysql_connect(xxx,xxx,xxx)) {
@
mysql_select_db(xxx,$conectar) ;
}
$query=mysql_query("select * from noticias order by fecha Desc LIMIT 10"$connect);
$resp mysql_query($query) or die("Error en consulta"); 
 
while (
$row mysql_fetch_array($resp)) { 
$titulonot $row[titulo];
$categorianot $row[categoria];
$fechanot $row[fecha];
$noticia nl2br($row[noticia]);
$autornot $row[autor];
 
$html->asignar('TITULONOT'$titulonot); 
$html->asignar('FECHANOT'$fechanot); 
$html->asignar('NOTICIA'$noticia); 
$html->asignar('AUUTORNOT'$autornot); 
$html->asignar('FECHANOT'$fechanot); 
$html->asignar('CATEGORIANOT'$categoriano); 
$html->expandir('NOTICIAS''+tNews');
}
$html->expandir('FINAL''tHome'); 
$html->imprimir('FINAL'); 
?>
el de home.html
Código PHP:
<table
{
NOTICIAS}
</
table
el de noticias.html
Código PHP:
<tr align=left
<
td align=center height=25 width=500 CELLPADDING=14 background=img/topnoticias.gif>
<
b>{TITULONOT}<b>
<
tr align=left>
<
td height=25 background=img/bgnoticias.gif width=500 CELLPADDING=14>
<
table width=95align=center><tr><td>
<
p>{NOTICIA}</p>
</
td></tr></table>
</
td></tr>
<
tr align=center>
<
td background=img/downnoticias.gif align=center height=25 width=500 CELLPADDING=1>
{
AUTORNOT}|{FECHANOT}|{CATEGORIANOT}|
</
td></tr
  #2 (permalink)  
Antiguo 20/12/2005, 10:41
O_O
 
Fecha de Ingreso: enero-2002
Ubicación: Santiago - Chile
Mensajes: 34.417
Antigüedad: 22 años, 3 meses
Puntos: 129
No sé si ese es el código completo que usas de tus plantillas .. pero falta la definición de "bloques" de NokTemplate para que sepa cual debe ir repitiendo.

Revisa este tema:
http://www.forosdelweb.com/f18/noktemplate-problema-con-bloques-348167/

Pero lo mejor es que veas la documentación oficial, ejemplo y consultes directamente a Nok en su sitio oficial:

sobre todo este ejemplo:
http://www.jpw.com.ar/?lugar=fuente&...o=ejemplo3.php

Un saludo,
Atención: Estás leyendo un tema que no tiene actividad desde hace más de 6 MESES, te recomendamos abrir un Nuevo tema en lugar de responder al actual.
Respuesta




La zona horaria es GMT -6. Ahora son las 20:30.