Código PHP:
function get_last_posts_emm($by, $sdate)
{
global $DB, $mklib, $mkportals, $db_prefix, $user_info, $modSettings;
$limit = 20;
$taglio = 17;
$db_prefix = DBPREFIX;
//$noshow = '53,82,89,90'; // Don't show posts from these forums - seperate IDs with commas, eg: "2,8"
$scroll = '1'; // Scroll - 1=On, 0=Off
$sql = "SELECT
m.posterTime, m.subject, m.ID_TOPIC, m.ID_MEMBER, m.ID_MSG,
IFNULL(mem.realName, m.posterName) AS posterName, t.ID_BOARD, b.name AS bName,
m.body, m.smileysEnabled
FROM {$db_prefix}messages AS m, {$db_prefix}topics AS t, {$db_prefix}boards AS b WHERE ID_TOPIC = ID_TOPIC
LEFT JOIN {$db_prefix}members AS mem ON (mem.ID_MEMBER = m.ID_MEMBER)
WHERE t.ID_TOPIC = m.ID_TOPIC
AND b.ID_BOARD = t.ID_BOARD" . (!empty($modSettings['recycle_enable']) && $modSettings['recycle_board'] > 0 ? "
AND b.ID_BOARD != $modSettings[recycle_board]" : '') . "
AND $user_info[query_see_board]
ORDER BY m.ID_MSG DESC
LIMIT $limit";
$DB->query($sql);
$Count = 1;
if ($scroll=="1") {
$content = "<center><marquee id='recent_topics' behavior='scroll' direction='up' height='400' scrolldelay='100' scrollamount='2' loop='true' onmouseover='this.stop()' onmouseout='this.start()'>";
}
$count = 1;
while ( $post = $DB->fetch_row() ) {
$title = strip_tags($post['subject']);
$title = str_replace( "!" , "!" ,$title );
$title = str_replace( """, "\"", $title );
// if (strlen($title) > $taglio) {
// $title = substr( $title,0,($taglio - 3) ) . "...";
// $title = preg_replace( '/&(#(\d+;?)?)?(\.\.\.)?$/', '...',$title );
// }
$date = $mklib->create_date($post['posterTime']);
$tid = $post['ID_TOPIC'];
$mid = $post['ID_MEMBER'];
$mname = $post['posterName'];
$id = $board['ID_BOARD'];
$titleboard = $board['name'];
$content .= "
<tr>
<td width=\"100%\" class=\"tdblock\">
<a class=\"uno\" href=\"$mkportals->forum_url/index.php?topic=$tid\">$title</a>
</td>
</tr>
<tr>
<td class=\"tdglobal\">
<a class=\"uno\" href=\"$mkportals->forum_url/index.php?action=profile;u=$mid\">$by: $mname</a><br /> $sdate: $date
</td>
</tr>
";
$count++;
}
if ($scroll=="1") {
$content .= "</MARQUEE></center>";
}
return $content;
}
Gracias por su ayuda....
Saludos.....