Seguindo a minha própria sugestão...
.
Código: Selecionar todos
<?php
define('IN_PHPBB', true);
$phpbb_root_path = (defined('PHPBB_ROOT_PATH')) ? PHPBB_ROOT_PATH : './';
$phpEx = substr(strrchr(__FILE__, '.'), 1);
include($phpbb_root_path . 'common.' . $phpEx);
// Start session management
$user->session_begin();
$auth->acl($user->data);
$user->setup();
if ($user->data['user_id'] == ANONYMOUS)
{
login_box('', $user->lang['LOGIN']);
}
page_header('Animes');
if (!defined('IN_PHPBB'))
{
exit;
}
define('IN_RECENT', true);
// Setup config parameters
// NEWS FORUM ID
$recent_news_forum_id = '3'; // SEPERATE NEWS FORUMS WITH , eg '1,2,3' - SET TO '0' IF YOU DO NOT HAVE A NEWS FORUM
// NUMBER OF NEWS ARTICLES YOU WISH TO DISPLAY
$recent_num_news= 3;
// NUMBER OF RECENT ARTICLES YOU WISH TO DISPLAY
$recent_num_topics = 5;
// FORUMS YOU WISH TO IGNORE IN YOUR RECENT ARTICLES
$recent_forums_ignore = ''; // SEPERATE FORUMS TO IGNORE WITH , eg '1,2,3' - SET TO '' IF YOU WANT ALL DISPLAYED
// SHOW TOPICS THE USER CAN VIEW, BUT NOT READ? (true / false)
$recent_auth_read = true;
// TABLE WIDTH
$recent_table_width = '100%';
// CHANGE THE BULLET IF A TOPIC IS NEW? (true / false)
$recent_show_new_bullets = true;
// MESSAGE TRACKING WILL TRACK TO SEE IF A USER HAS READ THE TOPIC DURING THEIR SESSION (true / false)
$recent_track = true;
// SHOW TOPICS THE USER CAN VIEW, BUT NOT READ? (true / false)
$recent_auth_read = true;
// LIMIT THE NUMBER OF CHARACTERS DISPLAYED FOR TOPIC TITLES
$recent_topic_length = 0; // SET TO ZERO TO DISPLAY THE FULL TITLE
//Do not edit bellow this line
//Images
$recent_news_bullet_old = $user->img('announce_read', 'POST_ANNOUNCEMENT');
$recent_posts_bullet_old = $user->img('topic_read', 'NEW_POSTS');
$recent_news_bullet_new = $user->img('announce_unread', 'POST_ANNOUNCEMENT');
$recent_posts_bullet_new = $user->img('topic_unread', 'NEW_POSTS');
//Images SRC
$recent_news_bullet_old_src = $user->img('announce_read', 'POST_ANNOUNCEMENT', false, '', 'src');
$recent_posts_bullet_old_src = $user->img('topic_read', 'NEW_POSTS', false, '', 'src');
$recent_news_bullet_new_src = $user->img('announce_unread', 'POST_ANNOUNCEMENT', false, '', 'src');
$recent_posts_bullet_new_src = $user->img('topic_unread', 'NEW_POSTS', false, '', 'src');
// Read language definition
$user->add_lang('pg_personal');
if ( !defined('PHPBB_URL') )
{
if (!isset($script_path) || empty($script_path))
{
$script_path = preg_replace('/^\/?(.*?)\/?$/', '\1', trim($config['script_path']));
}
if (!isset($server_name) || empty($server_name))
{
$server_name = trim($config['server_name']);
}
if (!isset($server_protocol) || empty($server_protocol))
{
$server_protocol = ( $config['cookie_secure'] ) ? 'https://' : 'http://';
}
if (!isset($server_port) || empty($server_port))
{
$server_port = ( $config['server_port'] <> 80 ) ? ':' . trim($config['server_port']) . '/' : '/';
}
define('PHPBB_URL', $server_protocol . $server_name . $server_port . $script_path . '/');
}
if ( !function_exists( 'this_recent_url' ) )
{
function this_recent_url($args = '')
{
global $server_protocol, $server_name, $server_port, $script_path, $page_id, $phpEx;
$url = $server_protocol . $server_name . $server_port . $script_path . '/' . 'index.' . $phpEx;
if( is_numeric($page_id) && !empty($page_id) )
{
$url .= '?page=' . $page_id . ($args == '' ? '' : '&' . $args);
}
else
{
$url .= '' . ($args == '' ? '' : '?' . $args);
}
return $url;
}
}
// GET USER LAST VISIT
$recent_last_visit = $user->data['user_lastvisit'];
$recent_forums_offset = request_var('recent_posts_offset', '');
$recent_news_offset = request_var('recent_news_offset', '');
// MESSAGE TRACKING
if ( !isset($tracking_topics) && $recent_track ) $tracking_topics = request_var($config['cookie_name'] . '_t', '', false, true);
// CHECK FOR BAD WORDS
// Define censored word matches
$orig_word = array();
//$replacement_word = array();
//$cache->obtain_word_list($orig_word, $replacement_word);
censor_text($orig_word);
// set the topic title sql depending on the character limit
$sql_title = ($recent_topic_length) ? ", LEFT(t.topic_title, " . $recent_topic_length . ") as topic_title" : ", t.topic_title";
// GET THE LATEST NEWS TOPIC
if ($recent_num_news)
{
$sql_news_limit = $recent_num_news;
$sql_news_start = ($recent_news_offset) ? $recent_news_offset : 0;
$sql = $db->sql_build_query('SELECT', array(
'SELECT' => 'f.forum_id, f.forum_name' . $sql_title . ', t.*, p.post_time, p.poster_id, u.username as last_username, u.username as author_username',
'FROM' => array(
FORUMS_TABLE => 'f',
POSTS_TABLE => 'p',
TOPICS_TABLE => 't',
USERS_TABLE => 'u',
),
'WHERE' => 'f.forum_id IN (' . $recent_news_forum_id . ')
AND t.topic_status <> 2
AND t.forum_id = f.forum_id
AND p.post_id = t.topic_first_post_id
AND t.topic_moved_id = 0
AND p.poster_id = u.user_id
AND t.topic_poster = u.user_id',
'ORDER_BY' => 't.topic_last_post_id DESC',
));
$result = $db->sql_query_limit($sql, $sql_news_limit, $sql_news_start);
$latest_news = array();
while ( $topic_row = $db->sql_fetchrow($result) )
{
$topic_row['topic_title'] = ( count($orig_word) ) ? preg_replace($orig_word, $replacement_word, $topic_row['topic_title']) : $topic_row['topic_title'];
$latest_news[] = $topic_row;
}
$db->sql_freeresult($result);
// obtain the total number of topic for our news topic navigation bit
$sql = "SELECT SUM(forum_topics) as topic_total FROM " . FORUMS_TABLE . " f WHERE f.forum_id IN (" . $recent_news_forum_id . ")";
$result = $db->sql_query($sql);
$row = $db->sql_fetchrow($result);
$overall_news_topics = $row['topic_total'];
$db->sql_freeresult($result);
}
// GET THE LAST 5 TOPICS
if ($recent_num_topics)
{
$unauthed_forums = array();
$sql = "SELECT * FROM " . FORUMS_TABLE . " WHERE forum_id NOT IN (" . $recent_news_forum_id . ")";
$result = $db->sql_query($sql);
$recent_auth_level = ( $recent_auth_read ) ? '!f_read' : true;
$auth_user = array();
$auth_user = $auth->acl_getf($recent_auth_level, true);
//print_r($auth_user);
$recentforumsignore = $recent_news_forum_id;
if ( $num_forums = count($auth_user) )
{
while ( list($forum_id, $auth_mod) = each($auth_user) )
{
$unauthed = false;
if ( !$auth_mod['f_list'] && ( strstr($recent_news_forum_id,$auth_mod['forum_id']) === FALSE ))
{
$unauthed = true;
}
if ( !$recent_auth_read && !$auth_mod['f_read'] && ( strstr($recent_news_forum_id,$auth_mod['forum_id']) === FALSE ) )
{
$unauthed = true;
}
if ( $unauthed )
{
$recentforumsignore .= ($recentforumsignore) ? ',' . $forum_id : $forum_id;
}
}
}
$recentforumsignore .= ($recentforumsignore && $recent_forums_ignore) ? ',' : '';
$sql_forums_limit = $recent_num_topics;
$sql_forums_start = ($recent_forums_offset) ? $recent_forums_offset : 0;
$sql = $db->sql_build_query('SELECT', array(
'SELECT' => 'f.forum_id, f.forum_name' . $sql_title . ', t.*, p.post_time, p.poster_id, u.username as last_username, u.username as author_username',
'FROM' => array(
FORUMS_TABLE => 'f',
POSTS_TABLE => 'p',
TOPICS_TABLE => 't',
USERS_TABLE => 'u',
),
'WHERE' => 'f.forum_id NOT IN (' . $recentforumsignore . $recent_forums_ignore . ')
AND t.topic_status <> 2
AND t.forum_id = f.forum_id
AND p.post_id = t.topic_first_post_id
AND t.topic_moved_id = 0
AND p.poster_id = u.user_id
AND t.topic_poster = u.user_id',
'ORDER_BY' => 't.topic_last_post_id DESC',
));
$result = $db->sql_query_limit($sql, $sql_forums_limit, $sql_forums_start);
$latest_topics = array();
$latest_anns = array();
$latest_stickys = array();
while ( $topic_row = $db->sql_fetchrow($result) )
{
$topic_row['topic_title'] = ( count($orig_word) ) ? preg_replace($orig_word, $replacement_word, $topic_row['topic_title']) : $topic_row['topic_title'];
switch ($topic_row['topic_type'])
{
case POST_ANNOUNCE:
$latest_anns[] = $topic_row;
break;
case POST_STICKY:
$latest_stickys[] = $topic_row;
break;
default:
$latest_topics[] = $topic_row;
break;
}
}
$latest_topics = array_merge($latest_anns, $latest_stickys, $latest_topics);
$db->sql_freeresult($result);
// obtain the total number of topic for our recent topic navigation bit
$sql = "SELECT SUM(forum_topics) as topic_total FROM " . FORUMS_TABLE . " f WHERE f.forum_id NOT IN (" . $recentforumsignore . $recent_forums_ignore . $recent_news_forum_id . ")";
$result = $db->sql_query($sql);
$row = $db->sql_fetchrow($result);
$overall_total_topics = $row['topic_total'];
$db->sql_freeresult($result);
}
if ($recent_num_news)
{
if ( !empty($latest_news) )
{
$bullet_pre = 'recent_news_bullet';
for ( $i = 0; $i < count($latest_news); $i++ )
{
if ( $user->data['user_id'] != 1 )
{
$unread_topics = false;
$topic_id = $latest_news[$i]['topic_id'];
if ( $latest_news[$i]['topic_last_post_time'] > $recent_last_visit )
{
$unread_topics = true;
$topic_tracking_info = get_complete_topic_tracking($latest_news[$i]['forum_id'], $latest_news[$i]['topic_id'], false);
/*
if( !empty($tracking_topics[$topic_id]) && $recent_track )
{
if( $tracking_topics[$topic_id] >= $latest_news[$i]['topic_last_post_time'] )
{
$unread_topics = false;
}
}
*/
if ($latest_news[$i]['topic_status'] == ITEM_MOVED)
{
$topic_id = $latest_news[$i]['topic_moved_id'];
$unread_topics = false;
}
else
{
$unread_topics = (isset($topic_tracking_info[$topic_id]) && $latest_news[$i]['topic_last_post_time'] > $topic_tracking_info[$topic_id]) ? true : false;
}
}
else
{
$unread_topics = false;
}
$shownew = $unread_topics;
}
else
{
$unread_topics = false;
$shownew = true;
}
$bullet_full = $bullet_pre . ( ( $shownew && $recent_show_new_bullets ) ? '_new' : '_old' );
$bullet_src = $bullet_pre . ( ( $shownew && $recent_show_new_bullets ) ? '_new_src' : '_old_src' );
$newest_code = ( $unread_topics && $recent_show_new_bullets ) ? '&view=newest' : '';
$message_date = $user->format_date($latest_news[$i]['topic_time']);
$last_poster = get_username_string('username', $latest_news[$i]['topic_last_poster_id'], $latest_news[$i]['topic_last_poster_name'], $latest_news[$i]['topic_last_poster_colour']);
$last_poster_color = get_username_string('colour', $latest_news[$i]['topic_last_poster_id'], $latest_news[$i]['topic_last_poster_name'], $latest_news[$i]['topic_last_poster_colour']);
$last_poster_full = get_username_string('full', $latest_news[$i]['topic_last_poster_id'], $latest_news[$i]['topic_last_poster_name'], $latest_news[$i]['topic_last_poster_colour']);
$topic_poster = get_username_string('username', $latest_news[$i]['topic_poster'], $latest_news[$i]['topic_first_poster_name'], $latest_news[$i]['topic_first_poster_colour']);
$topic_poster_color = get_username_string('colour', $latest_news[$i]['topic_poster'], $latest_news[$i]['topic_first_poster_name'], $latest_news[$i]['topic_first_poster_colour']);
$topic_poster_full = get_username_string('full', $latest_news[$i]['topic_poster'], $latest_news[$i]['topic_first_poster_name'], $latest_news[$i]['topic_first_poster_colour']);
$last_post_time = $user->format_date($latest_news[$i]['topic_last_post_time']);
if (($recent_news_offset > 0) or ($recent_news_offset+$recent_num_news < $overall_news_topics))
{
$new_url = '<a href="' . append_sid(this_recent_url('recent_news_offset='));
if ($recent_news_offset > 0)
{
$prev_news_url = ($recent_forums_offset > 0) ? $new_url . ($recent_news_offset-$recent_num_news) . '&recent_posts_offset=' . $recent_forums_offset . '" class="th"><< Prev ' . $recent_num_news . '</a>' : $new_url . ($recent_news_offset-$recent_num_news).'" class="th"><< Prev ' . $recent_num_news . '</a>';
}
else
{
$prev_news_url = '';
}
if ($recent_news_offset+$recent_num_news < $overall_total_topics)
{
$next_news_url = ($recent_forums_offset > 0) ? $new_url . ($recent_news_offset+$recent_num_news) . '&recent_posts_offset=' . $recent_forums_offset . '" class="th">Next ' . $recent_num_news . ' >></a>' : $new_url . ($recent_news_offset+$recent_num_news).'" class="th">Next ' . $recent_num_news . ' >></a>';
}
else
{
$next_news_url = '';
}
}
else
{
$prev_news_url = '';
$next_news_url = '';
}
$recent_news_total_info = count($i);
$template->assign_block_vars('latest_news', array(
'NEWEST_POST_IMG' => $$bullet_full,
'TOPIC_FOLDER_IMG_SRC' => $$bullet_src,
'TOPIC_TITLE' => $latest_news[$i]['topic_title'],
'U_LAST_POST' => append_sid( PHPBB_URL . 'viewtopic.' . $phpEx, 'f=' . $latest_news[$i]['forum_id'] . '&t=' . $latest_news[$i]['topic_id'] . '&p=' . $latest_news[$i]['topic_last_post_id'] . '#p' . $latest_news[$i]['topic_last_post_id']),
'TOPIC_TIME' => $message_date,
'LAST_POST_TIME' => $last_post_time,
'TOPIC_POSTER' => $topic_poster,
'TOPIC_VIEWS' => $latest_news[$i]['topic_views'],
'TOPIC_REPLIES' => $latest_news[$i]['topic_replies'],
'LAST_POSTER' => $last_poster,
'LAST_POSTER_COLOUR' => $last_poster_color,
'LAST_POSTER_FULL' => $last_poster_full,
'TOPIC_AUTHOR' => $topic_poster,
'TOPIC_AUTHOR_COLOUR' => $topic_poster_color,
'TOPIC_AUTHOR_FULL' => $topic_poster_full,
'FORUM_TITLE' => $latest_news[$i]['forum_name'],
'U_VIEW_TOPIC' => append_sid( PHPBB_URL . 'viewtopic.' . $phpEx, 'f=' . $latest_news[$i]['forum_id'] . '&t=' . $latest_news[$i]['topic_id'] . $newest_code),
'U_VIEW_FORUM' => append_sid( PHPBB_URL . 'viewforum.' . $phpEx, 'f=' . $latest_news[$i]['forum_id']),
'NEXT_URL' => $next_news_url,
'PREV_URL' => $prev_news_url,
'S_TOPIC_GLOBAL' => (!$latest_news[$i]['forum_id']) ? true : false,
'S_TOPIC_TYPE' => $latest_news[$i]['topic_type'],
'S_USER_POSTED' => (!empty($latest_news[$i]['mark_type'])) ? true : false,
'SWITCH_RECENT_NEWS' => (!empty($recent_num_news)) ? 1 : false,
'S_HAS_POLL' => ($latest_news[$i]['poll_start']) ? true : false,
'S_POST_ANNOUNCE' => ($latest_news[$i]['topic_type'] == POST_ANNOUNCE) ? true : false,
'S_POST_GLOBAL' => ($latest_news[$i]['topic_type'] == POST_GLOBAL) ? true : false,
'S_POST_STICKY' => ($latest_news[$i]['topic_type'] == POST_STICKY) ? true : false,
'S_TOPIC_LOCKED' => ($latest_news[$i]['topic_status'] == ITEM_LOCKED) ? true : false,
'S_TOPIC_MOVED' => ($latest_news[$i]['topic_status'] == ITEM_MOVED) ? true : false,
'S_ROW_COUNT' => $i)
);
}
}
else
{
$recent_news_total_info = 'None';
$template->assign_block_vars('latest_news', array(
'TOPIC_FOLDER_IMG_SRC' => $recent_forums_bullet_old,
'LAST_POSTER' => 'None',
'TOPIC_POSTER' => 'None',
'TOPIC_AUTHOR' => 'None',
'TOPIC_REPLIES' => '0',
'TOPIC_TITLE' => 'None'
));
}
}
if ($recent_num_topics)
{
$recent_info = 'counted recent';
$bullet_pre = 'recent_posts_bullet';
if ( !empty($latest_topics) )
{
for ( $i = 0; $i < count($latest_topics); $i++ )
{
if ( $user->data['user_id'] != 1 )
{
$unread_topics = false;
$topic_id = $latest_topics[$i]['topic_id'];
if ( $latest_topics[$i]['topic_last_post_time'] > $recent_last_visit )
{
$unread_topics = true;
$topic_tracking_info = get_complete_topic_tracking($latest_topics[$i]['forum_id'], $latest_topics[$i]['topic_id'], false);
/*
if( !empty($tracking_topics[$topic_id]) && $recent_track )
{
if( $tracking_topics[$topic_id] >= $latest_topics[$i]['topic_last_post_time'] )
{
$unread_topics = false;
}
}
*/
if ($latest_news[$i]['topic_status'] == ITEM_MOVED)
{
$topic_id = $latest_news[$i]['topic_moved_id'];
$unread_topics = false;
}
else
{
$unread_topics = (isset($topic_tracking_info[$topic_id]) && $latest_topics[$i]['topic_last_post_time'] > $topic_tracking_info[$topic_id]) ? true : false;
}
}
else
{
$unread_topics = false;
}
$shownew = $unread_topics;
}
else
{
$unread_topics = false;
$shownew = true;
}
$topic_date_time = $user->format_date($latest_topics[$i]['topic_time']);
$bullet_full = $bullet_pre . ( ( $shownew && $recent_show_new_bullets ) ? '_new' : '_old' );
$bullet_src = $bullet_pre . ( ( $shownew && $recent_show_new_bullets ) ? '_new_src' : '_old_src' );
$newest_code = ( $unread_topics && $recent_show_new_bullets ) ? '&view=newest' : '';
$last_post_time = $user->format_date($latest_topics[$i]['topic_last_post_time']);
$topic_poster = get_username_string('username', $latest_topics[$i]['topic_poster'], $latest_topics[$i]['topic_first_poster_name'], $latest_topics[$i]['topic_first_poster_colour']);
$topic_poster_color = get_username_string('colour', $latest_topics[$i]['topic_poster'], $latest_topics[$i]['topic_first_poster_name'], $latest_topics[$i]['topic_first_poster_colour']);
$topic_poster_full = get_username_string('full', $latest_topics[$i]['topic_poster'], $latest_topics[$i]['topic_first_poster_name'], $latest_topics[$i]['topic_first_poster_colour']);
$last_poster = get_username_string('username', $latest_topics[$i]['topic_last_poster_id'], $latest_topics[$i]['topic_last_poster_name'], $latest_topics[$i]['topic_last_poster_colour']);
$last_poster_color = get_username_string('colour', $latest_topics[$i]['topic_last_poster_id'], $latest_topics[$i]['topic_last_poster_name'], $latest_topics[$i]['topic_last_poster_colour']);
$last_poster_full = get_username_string('full', $latest_topics[$i]['topic_last_poster_id'], $latest_topics[$i]['topic_last_poster_name'], $latest_topics[$i]['topic_last_poster_colour']);
if (($recent_forums_offset > 0) or ($recent_forums_offset+$recent_num_topics < $overall_total_topics))
{
$new_url = '<a href="' . append_sid(this_recent_url('recent_posts_offset='));
if ($recent_forums_offset > 0)
{
$prev_recent_url = ($recent_news_offset > 0) ? $new_url . ($recent_forums_offset-$recent_num_topics) . '&recent_news_offset=' . $recent_news_offset . '" class="th"><< Prev ' . $recent_num_topics . '</a>' : $new_url . ($recent_forums_offset-$recent_num_topics).'" class="th"><< Prev ' . $recent_num_topics . '</a>';
}
else
{
$prev_recent_url = '';
}
if ($recent_forums_offset+$recent_num_topics < $overall_total_topics)
{
$next_recent_url = ($recent_news_offset > 0) ? $new_url . ($recent_forums_offset+$recent_num_topics) . '&recent_news_offset=' . $recent_news_offset . '" class="th">Next ' . $recent_num_topics . ' >></a>' : $new_url . ($recent_forums_offset+$recent_num_topics).'" class="th">Next ' . $recent_num_topics . ' >></a>';
}
else
{
$next_recent_url = '';
}
}
else
{
$prev_recent_url = '';
$next_recent_url = '';
}
$recent_forums_total_info = count($i);
$template->assign_block_vars('latest_topics', array(
'NEWEST_POST_IMG' => $$bullet_full,
'TOPIC_FOLDER_IMG_SRC' => $$bullet_src,
'U_LAST_POST' => append_sid( PHPBB_URL . 'viewtopic.' . $phpEx, 'f=' . $latest_topics[$i]['forum_id'] . '&t=' . $latest_topics[$i]['topic_id'] . '&p=' . $latest_topics[$i]['topic_last_post_id'] . '#p' . $latest_topics[$i]['topic_last_post_id']),
'TOPIC_POSTS' => $latest_topics[$i]['topic_replies'],
'TOPIC_TIME' => $topic_date_time,
'TOPIC_TITLE' => $latest_topics[$i]['topic_title'],
'TOPIC_VIEWS' => $latest_topics[$i]['topic_views'],
'TOPIC_REPLIES' => $latest_topics[$i]['topic_replies'],
'LAST_POST_TIME' => $last_post_time,
'LAST_POSTER' => $last_poster,
'LAST_POSTER_COLOUR' => $last_poster_color,
'LAST_POSTER_FULL' => $last_poster_full,
'TOPIC_AUTHOR' => $topic_poster,
'TOPIC_AUTHOR_COLOUR' => $topic_poster_color,
'TOPIC_AUTHOR_FULL' => $topic_poster_full,
'FORUM_TITLE' => $latest_topics[$i]['forum_name'],
'U_VIEW_TOPIC' => append_sid( PHPBB_URL . 'viewtopic.' . $phpEx, 'f=' . $latest_topics[$i]['forum_id'] . '&t=' . $latest_topics[$i]['topic_id'] . $newest_code),
'U_VIEW_FORUM' => append_sid( PHPBB_URL . 'viewforum.' . $phpEx, 'f=' . $latest_topics[$i]['forum_id']),
'NEXT_URL' => $next_recent_url,
'PREV_URL' => $prev_recent_url,
'S_TOPIC_GLOBAL' => (!$latest_topics[$i]['forum_id']) ? true : false,
'S_TOPIC_TYPE' => $latest_topics[$i]['topic_type'],
'S_USER_POSTED' => (!empty($latest_topics[$i]['mark_type'])) ? true : false,
'SWITCH_RECENT_POSTS' => (!empty($recent_num_topics)) ? 1 : false,
'S_HAS_POLL' => ($latest_topics[$i]['poll_start']) ? true : false,
'S_POST_ANNOUNCE' => ($latest_topics[$i]['topic_type'] == POST_ANNOUNCE) ? true : false,
'S_POST_GLOBAL' => ($latest_topics[$i]['topic_type'] == POST_GLOBAL) ? true : false,
'S_POST_STICKY' => ($latest_topics[$i]['topic_type'] == POST_STICKY) ? true : false,
'S_TOPIC_LOCKED' => ($latest_topics[$i]['topic_status'] == ITEM_LOCKED) ? true : false,
'S_TOPIC_MOVED' => ($latest_topics[$i]['topic_status'] == ITEM_MOVED) ? true : false,
'S_ROW_COUNT' => $i)
);
}
}
else
{
$recent_forums_total_info = 'None';
$template->assign_block_vars('latest_topics', array(
'BULLET' => $recent_forums_bullet_old,
'LAST_POSTER' => 'None',
'TOPIC_POSTER' => 'None',
'TOPIC_AUTHOR' => 'None',
'TOPIC_REPLIES' => '0',
'TOPIC_TITLE' => 'None'
));
}
}
if ($recent_news_total_info == 'None' && $recent_forums_total_info == 'None')
{
$template->assign_block_vars("no_recent_news_and_recent", array());
}
$template->assign_vars(array(
'PHPBB_URL' => PHPBB_URL,
'BLOCK_SIZE' => ( !empty($recent_table_width) ? $recent_table_width : '100%' )
));
// Output page
$template->set_filenames(array(
'body' => 'animes.html',
));
page_footer();
?>
".
Abraço.