Tenho em um fórum a mod: Last Post on Index 1.9.1 que mostra as todas as últimas postagens no index.
Porém eu queria que ele não mostrasse as últimas postagem postada em uma determinada Categoria do fórum. Pelo que vi na mod seria no arquivo last_post.php (no SELECT), porém não consegui realizar a alteração. Segue o arquivo:
Código: Selecionar todos
<?php
/*
*****************************************************************************
* Name last_post.php *
* Last Post on index *
* Copyright (c) Cronos Design - TimeZone Edition - *
* License http://opensource.org/licenses/gpl-license.php GNU Public License *
*****************************************************************************
*/
define('IN_PHPBB', true);
global $db, $cache, $lp, $user, $read;
//global $user;
$user->session_begin();
/////////////////////////////////////////////////////////////////////////////
/////////////////////////////////////CODE////////////////////////////////////
/////////////////////////////////////////////////////////////////////////////
if (!defined('IN_PHPBB'))
{
exit;
}
//
// Recent Posts
//
/////////////////////////////////////////////////////////////////////////////
///////////////////////////////////// CONFIGS ///////////////////////////////
/////////////////////////////////////////////////////////////////////////////
$template->assign_block_vars('lp_config', array(
'LP_ENABLE' => $config['lp_enabled'],
'LP_SLIDE' => $config['lp_slide'],
'LP_AVATAR' => $config['lp_avatar'],
)
);
$sql = "SELECT topic_title, {$table_prefix}topics.forum_id, topic_id, topic_time, topic_type, topic_status, poll_start, topic_last_post_id, topic_poster, topic_last_poster_id, topic_first_poster_colour, topic_last_poster_colour, topic_first_poster_name, topic_last_poster_name, topic_last_post_time, topic_last_post_subject, forum_name, topic_views, topic_replies, icon_id
FROM " . TOPICS_TABLE . " LEFT JOIN {$table_prefix}forums ON {$table_prefix}topics.forum_id = {$table_prefix}forums.forum_id
LEFT JOIN {$table_prefix}icons ON {$table_prefix}topics.icon_id = {$table_prefix}icons.icons_id
WHERE topic_status <> 2
AND topic_approved = 1
ORDER BY topic_last_post_time DESC";
$result = $db->sql_query_limit($sql, $config['lp_amount']);
while( ($row = $db->sql_fetchrow($result)) && ($row['topic_title'] != ''))
{
if ( ($auth->acl_get('f_read', $row['forum_id'])) || ($row['forum_id'] == '0') )
{
$template->assign_block_vars('latest_topics', array(
'LP_FULL_TITLE' => censor_text($row['topic_title']),
'LP_TITLE_REPLY' => censor_text($row['topic_last_post_subject']),
'LP_U_VIEW_TOPIC' => append_sid("{$phpbb_root_path}viewtopic.$phpEx", 'f=' . $row['forum_id'] . '&t=' . $row['topic_id'] . '&p=' . $row['topic_last_post_id'] . '#p' . $row['topic_last_post_id']),
'LP_TOPIC_STARTER' => get_username_string('full', $row['topic_poster'], $row['topic_first_poster_name'], $row['topic_first_poster_colour']),
'LP_POSTER_AVATAR' => get_avatar_by_user($row['topic_poster']),
'LP_TOPIC_POSTTIME' => $user->format_date($row['topic_time']),
'LP_TOPIC_LASTPOSTBY' => get_username_string('full', $row['topic_last_poster_id'], $row['topic_last_poster_name'], $row['topic_last_poster_colour']),
'LP_TOPIC_POSTER_AVATAR' => get_avatar_by_user($row['topic_last_poster_id']),
'LP_TOPIC_LASTPOSTTIME' => $user->format_date($row['topic_last_post_time']),
'LP_FORUM_NAME' => $row['forum_name'],
'LP_T_VIEWS' => $row['topic_views'],
'LP_T_REPLIES' => $row['topic_replies'],
'LP_F_ID' => $row['forum_id'],
'LP_T_MARK' => $user->format_date($topic_mark),
'LP_AVATAR' => $config['lp_avatar'],
)
);
}
}
$db->sql_freeresult($result);
?>
Obrigado.
Micael