Знаю что некоторые используют этот двиг, хочется задать вопрос.. Подскажите, почему не выводит новости из PHPBB 3.0.11 в разделе НОВОСТИ в обвязке? Конфиги настроены, ошибок нет.
status.inc.php
Код:
// последние темы форума
$db->manual_connect($_config['forum_dbhost'], $_config['forum_dbuser'], $_config['forum_dbpass'], $_config['forum_dbname'], 'cp1251', 'forum');
if(!empty($_config['forum_type']))
{
$_forum = array();
if($db->connect('forum') === true)
{
switch($_config['forum_type'])
{
case 'ipb':
$select_items = "SELECT tid,title,description,last_post,last_poster_id,last_poster_name FROM {prefix}_topics ORDER BY last_post DESC LIMIT {items};";
$topic_link = "?showtopic=";
$user_link = "?showuser=";
break;
case 'smf':
$select_items = "SELECT id_topic,subject,id_board,poster_time,id_member,poster_name FROM {prefix}_messages ORDER BY poster_time DESC LIMIT {items};";
$topic_link = "?topic=";
$user_link = "?action=profile;u=";
break;
case 'phpbb':
$select_items = "SELECT topic_id,topic_title,forum_id,topic_last_post_time,topic_last_poster_id,topic_last_poster_name FROM {prefix}_topics ORDER BY topic_last_post_time DESC LIMIT {items};";
$topic_link = "viewtopic.php?f=4&t=";
$user_link = "memberlist.php?mode=viewprofile&u=";
break;
}
if($db->sql_query(sql($select_items, array ("prefix" => $_config['forum_prefix'], "items" => $_config['forum_items'])), 'forum', __FILE__,__LINE__) != false)
{
while($forum = $db->sql_fetchrow())
{
$_forum[$forum[0]]['title'] = (strlen($forum[1]) < $_config['forum_cut']) ? trim($forum[1]) : trim(substr($forum[1], 0, $_config['forum_cut']).'..');
$_forum[$forum[0]]['date'] = date($_config['forum_time'], $forum[3]);
$_forum[$forum[0]]['author'] = trim($forum[5]);
$_forum[$forum[0]]['user_link'] = $user_link.$forum[4];
$_forum[$forum[0]]['topic_link'] = $topic_link.$forum[0];
}
}
}
$parse->set_tpl_pair('forum_items', $_forum);
$parse->set_preg_tpl('forum', "\\1");
}
else
{
$parse->set_preg_tpl('forum', "");
}