Kod: Tümünü seç
[phpBB Debug] PHP Notice: in file [ROOT]/includes/top_list_topic.php on line 82: Undefined index: 0
satırın denk geldiği kısım:
/includes/top_list_topic.php on line 82:
Kod: Tümünü seç
$phpbb_seo->prepare_iurl($row, 'topic',$phpbb_seo->seo_url['forum'][$forum_id]);
Kod: Tümünü seç
<?php
/**
*
* @package - top_list_topic
* @version $Id: top_list_topic.php 005 20010-01-18 20:58:55 EST+2 Tolga $
* @copyright (c) Tolga ( tolga_.g@windowslive.com )
* @license http://opensource.org/licenses/gpl-license.php GNU Public License
*
*/
/**
* @ignore
*/
if (!defined('IN_PHPBB'))
{
exit;
}
$user->add_lang('mods/top_list_topic');
function top_list_topic($countlimit)
{
global $auth, $cache, $config, $db, $template, $user;
global $phpbb_root_path, $phpEx;
// www.phpBB-SEO.com SEO TOOLKIT BEGIN
global $phpbb_seo;
// www.phpBB-SEO.com SEO TOOLKIT END
$forum_ary = array_unique(array_merge(array_keys($auth->acl_getf('!f_read', true)), array_keys($auth->acl_getf('!f_list', true))));
$izin = '';
if (sizeof($forum_ary))
{
$izin = ' AND ' . $db->sql_in_set('forum_id', $forum_ary, true);
}
//Yeni konular baslar.
$sql = 'SELECT topic_id, forum_id, topic_title, topic_time, topic_poster, topic_first_poster_name, topic_first_poster_colour
FROM ' . TOPICS_TABLE . '
WHERE topic_approved = 1 '. $izin .'
ORDER BY topic_time DESC';
$result = $db->sql_query_limit($sql, $countlimit);
while ($row = $db->sql_fetchrow($result)) {
$forum_id = $row['forum_id'];
// www.phpBB-SEO.com SEO TOOLKIT BEGIN
$phpbb_seo->set_url($forum_id, $phpbb_seo->seo_static['forum']);
$phpbb_seo->prepare_iurl($row, 'topic', $phpbb_seo->seo_url['forum'][$forum_id]);
// www.phpBB-SEO.com SEO TOOLKIT END
$template->assign_block_vars('new_topic',array('POST_USERNAME' => get_username_string('full', $row['topic_poster'], $row['topic_first_poster_name'], $row['topic_first_poster_colour']),
'U_VIEW_TOPIC' => append_sid("{$phpbb_root_path}viewtopic.$phpEx", 'f=' . $row['forum_id'] . '&t=' . $row['topic_id']),
'TOPIC_TITLE' => censor_text($row['topic_title']),
'TOPIC_TIME' => sprintf($user->lang['TOPIC_DATE'], $user->format_date($row['topic_time']))
));
}$db->sql_freeresult($result);
//Yeni konular biter.
//Son cevaplanan konular baslar.
$sql = 'SELECT topic_id, forum_id, topic_title, topic_views, topic_replies, topic_last_poster_id, topic_last_poster_name, topic_last_poster_colour
FROM ' . TOPICS_TABLE . '
WHERE topic_replies > 0 AND topic_approved = 1 '.$izin.'
ORDER BY topic_last_post_time DESC';
$result = $db->sql_query_limit($sql, $countlimit);
while ($row = $db->sql_fetchrow($result)) {
$forum_id = $row['forum_id'];
// www.phpBB-SEO.com SEO TOOLKIT BEGIN
$phpbb_seo->set_url($forum_id, $phpbb_seo->seo_static['forum']);
$phpbb_seo->prepare_iurl($row, 'topic', $phpbb_seo->seo_url['forum'][$forum_id]);
// www.phpBB-SEO.com SEO TOOLKIT END
$template->assign_block_vars('reply_topic',array('POST_USERNAME' => get_username_string('full', $row['topic_last_poster_id'], $row['topic_last_poster_name'], $row['topic_last_poster_colour']),
'U_VIEW_TOPIC' => append_sid("{$phpbb_root_path}viewtopic.$phpEx", 'f=' . $row['forum_id'] . '&t=' . $row['topic_id']),
'TOPIC_TITLE' => censor_text($row['topic_title']),
'TOPIC_REPLY' => sprintf($user->lang['TOPIC_READ'], $row['topic_views']).' - '.sprintf($user->lang['TOPIC_REPLY'], $row['topic_replies'])
));
}$db->sql_freeresult($result);
//Son cevaplanan konular biter.
//En cok okunan konular baslar.
$sql = 'SELECT topic_id, forum_id, topic_title, topic_views
FROM ' . TOPICS_TABLE . '
WHERE topic_approved = 1 '.$izin.'
ORDER BY topic_views DESC';
$result = $db->sql_query_limit($sql, $countlimit);
while ($row = $db->sql_fetchrow($result)) {
$forum_id = $row['forum_id'];
// www.phpBB-SEO.com SEO TOOLKIT BEGIN
$phpbb_seo->set_url($forum_id, $phpbb_seo->seo_static['forum']);
$phpbb_seo->prepare_iurl($row, 'topic',$phpbb_seo->seo_url['forum'][$forum_id]);
// www.phpBB-SEO.com SEO TOOLKIT END
$template->assign_block_vars('read_topic',array(
'U_VIEW_TOPIC' => append_sid("{$phpbb_root_path}viewtopic.$phpEx", 'f=' . $row['forum_id'] . '&t=' . $row['topic_id']),
'TOPIC_TITLE' => censor_text($row['topic_title']),
'TOPIC_READY' => sprintf($user->lang['TOPIC_READ'], $row['topic_views'])
));
}$db->sql_freeresult($result);
//En cok okunan konular biter.
//Populer konular baslar.
$sql = 'SELECT topic_id, forum_id, topic_title, topic_replies
FROM ' . TOPICS_TABLE . '
WHERE topic_replies >= ' .$config['hot_threshold'] . ' AND topic_approved = 1 '.$izin.'
ORDER BY topic_replies DESC';
$result = $db->sql_query_limit($sql, $countlimit);
while ($row = $db->sql_fetchrow($result)) {
$forum_id = $row['forum_id'];
// www.phpBB-SEO.com SEO TOOLKIT BEGIN
$phpbb_seo->set_url($forum_id, $phpbb_seo->seo_static['forum']);
$phpbb_seo->prepare_iurl($row, 'topic', $phpbb_seo->seo_url['forum'][$forum_id]);
// www.phpBB-SEO.com SEO TOOLKIT END
$template->assign_block_vars('pop_topic',array(
'U_VIEW_TOPIC' => append_sid("{$phpbb_root_path}viewtopic.$phpEx", 'f=' . $row['forum_id'] . '&t=' . $row['topic_id']),
'TOPIC_TITLE' => censor_text($row['topic_title']),
'TOPIC_POP' => sprintf($user->lang['TOPIC_REPLY'], $row['topic_replies'])
));
}$db->sql_freeresult($result);
//Populer konular biter.
//Yeni uyeler baslar.
$sql = 'SELECT user_id, username, user_regdate, user_colour
FROM ' . USERS_TABLE . '
WHERE user_type IN (' . USER_NORMAL . ', ' . USER_FOUNDER . ')
ORDER BY user_regdate DESC';
$result = $db->sql_query_limit($sql, $countlimit);
while ($row = $db->sql_fetchrow($result)) {
$template->assign_block_vars('new_users',array(
'USER_NAME' => get_username_string('full', $row['user_id'], $row['username'], $row['user_colour']),
'USER_REG_DATE' => sprintf($user->lang['REG_DATE'], $user->format_date($row['user_regdate']))
));
}$db->sql_freeresult($result);
//Yeni uyeler biter.
//En Cok Mesaj Yazanlar baslar.
$sql = 'SELECT user_id, username, user_posts, user_colour
FROM ' . USERS_TABLE . '
WHERE user_type IN (' . USER_NORMAL . ', ' . USER_FOUNDER . ')
ORDER BY user_posts DESC';
$result = $db->sql_query_limit($sql, $countlimit);
while ($row = $db->sql_fetchrow($result)) {
$template->assign_block_vars('top_users',array(
'USER_NAME' => get_username_string('full', $row['user_id'], $row['username'], $row['user_colour']),
'USER_POSTS' => sprintf($user->lang['USER_POSTS'], $row['user_posts'])
));
}$db->sql_freeresult($result);
//En Cok Mesaj Yazanlar biter.
}
$countlimit = 11; // 10 rakami gosterilecek eleman sayisini belirler isterseniz bu rakami degistirebilirsiniz.
top_list_topic($countlimit);
?>