Foros del Web » Creando para Internet » Sistemas de gestión de contenidos »

No me funciona el block (php-nuke) de scroll últimos mensajes

Estas en el tema de No me funciona el block (php-nuke) de scroll últimos mensajes en el foro de Sistemas de gestión de contenidos en Foros del Web. Pues bueno amigos, he intentado poner el block de Últimos mensajes en mi web php-nuke www.elnastic.com y cada vez que lo activo me da error ...
  #1 (permalink)  
Antiguo 28/10/2008, 12:41
 
Fecha de Ingreso: octubre-2005
Mensajes: 59
Antigüedad: 18 años, 7 meses
Puntos: 0
No me funciona el block (php-nuke) de scroll últimos mensajes

Pues bueno amigos, he intentado poner el block de Últimos mensajes en mi web php-nuke www.elnastic.com y cada vez que lo activo me da error la página, solo me cargan los bloques de la izquierda.

Aquí teneis el de block-forums.php que viene de serie que sí que va bien:
<?php

if (eregi("block-Forums.php", $_SERVER['PHP_SELF'])) {
Header("Location: index.php");
die();
}

****** $prefix, $db, $sitename;

$content .="<MARQUEE behavior= \"scroll\" align= \"center\" direction= \"up\" height=\"220\" scrollamount= \"2\" scrolldelay= \"20\" onmouseover='this.stop()' onmouseout='this.start()'>";
$result = $db->sql_query("SELECT forum_id, topic_id, topic_title FROM ".$prefix."_bbtopics ORDER BY topic_last_post_id DESC LIMIT 20");
while ($row = $db->sql_fetchrow($result)) {
$forum_id = intval($row['forum_id']);
$topic_id = intval($row['topic_id']);
$topic_title = $row['topic_title'];
$row2 = $db->sql_fetchrow($db->sql_query("SELECT auth_view, auth_read FROM ".$prefix."_bbforums WHERE forum_id='$forum_id'"));
$auth_view = intval($row2['auth_view']);
$auth_read = intval($row2['auth_read']);
if (($auth_view < 2) OR ($auth_read < 2)) {
$content .= "<img src=\"modules/Forums/templates/subSilver/images/icon_mini_message.gif\" border=\"0\" alt=\"\" title=\"\">&nbsp;<a href=\"modules.php?name=Forums&amp;file=viewtopic& amp;t=$topic_id\">$topic_title</a><br>";
}
}

?>


Y el que me da error es este (he quitado el copyright para colgarlo en el foro, xq son bastantes lineas):
<?php

if (eregi("block-Forums.php", $_SERVER['PHP_SELF'])) {
Header("Location: index.php");
die();
}

****** $prefix, $dbi, $sitename, $user, $cookie, $group_id;
$count = 1;
$content = "<A name= \"scrollingCode\"></A>";
$content .="<MARQUEE behavior= \"scroll\" align= \"center\" direction= \"up\" height=\"220\" scrollamount= \"2\" scrolldelay= \"20\" onmouseover='this.stop()' onmouseout='this.start()'>";
$content .="<center> <STYLE=\"text-decoration: none\"><font color=\"#666666\"><b>Ultimos 20 Mensajes en el Foro</b></center>";
$result1 = sql_query("SELECT t.topic_id, t.topic_last_post_id, t.topic_title, f.forum_name, f.forum_id FROM ".$prefix."_bbtopics t, ".$prefix."_bbforums f where t.forum_id=f.forum_id and f.auth_view=0 ORDER BY t.topic_last_post_id DESC LIMIT 20", $dbi);
$content .= "<br>";
while(list($topic_id, $topic_last_post_id, $topic_title, $forum_name, $forum_id) = sql_fetch_row($result1, $dbi)) {
$result2 = sql_query("SELECT topic_id, poster_id, FROM_UNIXTIME(post_time,'%b %d, %Y at %T') as post_time FROM ".$prefix."_bbposts where post_id='$topic_last_post_id'", $dbi);
list($topic_id, $poster_id, $post_time)=sql_fetch_row($result2, $dbi);

$result3 = sql_query("SELECT username, user_id FROM ".$prefix."_users where user_id='$poster_id'", $dbi);
list($username, $user_id)=sql_fetch_row($result3, $dbi);

$topic_title=parseEmoticons($topic_title);
// Remove the comment below to add the counter
//$content .="<STYLE=\"text-decoration: none\"><font color=\"#666666\"><b>Message: $count<br></b>";

$content .= "<img src=\"modules/Forums/templates/subSilver/images/icon_mini_message.gif\" border=\"0\" alt=\"\"><a href=\"modules.php?name=Forums&amp;file=viewtopic& amp;p=$topic_last_post_id#$topic_last_post_id\"STY LE=\"text-decoration: none\"><b> $topic_title </b></a><br><font color=\"#666666\"><i>Ultimo post de <A HREF=\"modules.php?name=Forums&file=profile&mode=v iewprofile&u=$user_id\"STYLE=\"text-decoration: none\"> $username </a> en <a href=\"modules.php?name=Forums&amp;file=viewforum& amp;f=$forum_id\">$forum_name</a> on $post_time</i></font><br><br>";
$count = $count + 1;
}
$content .= "<br><center>[ <a href=\"modules.php?name=Forums\"STYLE=\"text-decoration: none\">$sitename ]</center>";
?>


No consigo encontrar el error, pero creo que estaba por aquí:
$result1 = sql_query("SELECT t.topic_id, t.topic_last_post_id, t.topic_title, f.forum_name, f.forum_id FROM ".$prefix."_bbtopics t, ".$prefix."_bbforums f where t.forum_id=f.forum_id and f.auth_view=0 ORDER BY t.topic_last_post_id DESC LIMIT 20", $dbi);

A ver si me podéis ayudar, un saludo.
  #2 (permalink)  
Antiguo 29/10/2008, 13:30
Avatar de the_scorpion  
Fecha de Ingreso: mayo-2006
Ubicación: Cuba
Mensajes: 696
Antigüedad: 18 años
Puntos: 3
Respuesta: No me funciona el block (php-nuke) de scroll últimos mensajes

hola
que versión de php-nuke estas usando
no obstante cambia las variables del que te da error de
Cita:
$dbi
a
Cita:
$db
fijate en ese detalle entre uno y otro, esa son las variables de conexión a BD y tablas.

prueba y luego dices

suerte
__________________
Que hablen mal de uno es espantoso. Pero hay algo peor: que no hablen.
Quien hace, puede equivocarse. Quien nada hace, ya está equivocado".
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 23:06.