Board3 Portal / Hot-Topics erweitern?
Verfasst: 17.04.2010 11:02
Hallo
Auf dem Portal werden mir die beliebtesten Threads angezeigt (wenn ichs im acp eingestellt habe). Die beliebtesten Threads sind die mit den meisten Beiträgen. Ich will aber das es nicht die meisten Beiträge sind die ein beliebtes Thema ausmachen sondern die meisten Klicks auf das Thema.
Ich hab mich jetzt durch viele Datein durchgeklick. Aber ich komm nicht sehr weit.
Das ist die recent.html (gehört zum portal) :
Dort steht:
latest_hot_topics.FULL_TITLE
Dann brauch ich doch eigt nur diese "hot_topics" gegen etwas anderen ersetzen ,oder?
Aber wie/wo die "meisten klicks" abgespeichert werden , find ich einfach nicht.
Hier mal die recent.php (gehört auch zum portal):
Dort findet man auch "latest_hot_topics". In welcher Datei muss ich den suchen nach den "meisten klicks thread" ? Dann könnte ich das doch einfach ersetzen , oder? Ich hoffe mir kann jemand bisschen weiterhelfen der sich damit besser auskennt
.
Auf dem Portal werden mir die beliebtesten Threads angezeigt (wenn ichs im acp eingestellt habe). Die beliebtesten Threads sind die mit den meisten Beiträgen. Ich will aber das es nicht die meisten Beiträge sind die ein beliebtes Thema ausmachen sondern die meisten Klicks auf das Thema.
Ich hab mich jetzt durch viele Datein durchgeklick. Aber ich komm nicht sehr weit.
Das ist die recent.html (gehört zum portal) :
Code: Alles auswählen
<!--version $Id: recent.html 503 2009-04-20 18:34:29Z kevin74 $ //-->
<!-- IF .latest_announcements or .latest_hot_topics or .latest_topics -->
{$C_BLOCK_H_L}{L_RECENT_TOPIC}{$C_BLOCK_H_R}
<table class="tablebg" cellspacing="1" width="100%">
<tr>
<!-- IF .latest_announcements --><td class="row1"><strong>{L_RECENT_ANN}</strong></td><!-- ENDIF -->
<!-- IF .latest_hot_topics --><td class="row1"><strong>{L_RECENT_HOT_TOPIC}</strong></td><!-- ENDIF -->
<!-- IF .latest_topics --><td class="row1"><strong>{L_RECENT_TOPIC}</strong></td><!-- ENDIF -->
</tr>
<tr>
<!-- IF .latest_announcements -->
<td class="row1" width="33%" valign="top">
<!-- BEGIN latest_announcements -->
<a href="{latest_announcements.U_VIEW_TOPIC}" title="{latest_announcements.FULL_TITLE}">{latest_announcements.TITLE}</a><br />
<!-- END latest_announcements -->
</td>
<!-- ENDIF -->
<!-- IF .latest_hot_topics -->
<td class="row1" width="33%" valign="top">
<!-- BEGIN latest_hot_topics -->
<a href="{latest_hot_topics.U_VIEW_TOPIC}" title="{latest_hot_topics.FULL_TITLE}">{latest_hot_topics.TITLE}</a><br />
<!-- END latest_hot_topics -->
</td>
<!-- ENDIF -->
<!-- IF .latest_topics -->
<td class="row1" width="33%" valign="top">
<!-- BEGIN latest_topics -->
<a href="{latest_topics.U_VIEW_TOPIC}" title="{latest_topics.FULL_TITLE}">{latest_topics.TITLE}</a><br />
<!-- END latest_topics -->
</td>
<!-- ENDIF -->
</tr>
</table>
{$C_BLOCK_F_L}{$C_BLOCK_F_R}
<!-- ENDIF -->
latest_hot_topics.FULL_TITLE
Dann brauch ich doch eigt nur diese "hot_topics" gegen etwas anderen ersetzen ,oder?
Aber wie/wo die "meisten klicks" abgespeichert werden , find ich einfach nicht.
Hier mal die recent.php (gehört auch zum portal):
Code: Alles auswählen
<?php
/**
*
* @package - Board3portal
* @version $Id: recent.php 589 2009-12-04 21:11:16Z marc1706 $
* @copyright (c) kevin / saint ( www.board3.de/ ), (c) Ice, (c) nickvergessen ( www.flying-bits.org/ ), (c) redbull254 ( www.digitalfotografie-foren.de ), (c) Christian_N ( www.phpbb-projekt.de )
* @based on: phpBB3 Portal by Sevdin Filiz, www.phpbb3portal.com
* @license http://opensource.org/licenses/gpl-license.php GNU Public License
*
*/
if (!defined('IN_PHPBB') || !defined('IN_PORTAL'))
{
exit;
}
//
// Exclude forums
//
$sql_where = '';
if ($portal_config['portal_recent_forum'] > 0)
{
$exclude_forums = explode(',', $portal_config['portal_recent_forum']);
$sql_where = ' AND ' . $db->sql_in_set('forum_id', $exclude_forums, ($portal_config['portal_exclude_forums']) ? true : false);
}
// Get a list of forums the user cannot read
$forum_ary = array_unique(array_keys($auth->acl_getf('!f_read', true)));
// Determine first forum the user is able to read (must not be a category)
$sql = 'SELECT forum_id
FROM ' . FORUMS_TABLE . '
WHERE forum_type = ' . FORUM_POST;
$forum_sql = '';
if (sizeof($forum_ary))
{
$sql .= ' AND ' . $db->sql_in_set('forum_id', $forum_ary, true);
$forum_sql = ' AND ' . $db->sql_in_set('t.forum_id', $forum_ary, true);
}
$result = $db->sql_query_limit($sql, 1);
$g_forum_id = (int) $db->sql_fetchfield('forum_id');
//
// Recent announcements
//
$sql = 'SELECT topic_title, forum_id, topic_id
FROM ' . TOPICS_TABLE . ' t
WHERE topic_status <> ' . FORUM_LINK . '
AND topic_approved = 1
AND (topic_type = ' . POST_ANNOUNCE . ' OR topic_type = ' . POST_GLOBAL . ')
AND topic_moved_id = 0
' . $sql_where . '' . $forum_sql . '
ORDER BY topic_time DESC';
$result = $db->sql_query_limit($sql, $portal_config['portal_max_topics']);
while(($row = $db->sql_fetchrow($result)) && ($row['topic_title']))
{
// auto auth
if (($auth->acl_get('f_read', $row['forum_id'])) || ($row['forum_id'] == '0'))
{
$template->assign_block_vars('latest_announcements', array(
'TITLE' => character_limit($row['topic_title'], $portal_config['portal_recent_title_limit']),
'FULL_TITLE' => censor_text($row['topic_title']),
'U_VIEW_TOPIC' => append_sid("{$phpbb_root_path}viewtopic.$phpEx", 'f=' . (($row['forum_id'] == 0) ? $g_forum_id : $row['forum_id']) . '&t=' . $row['topic_id'])
));
}
}
$db->sql_freeresult($result);
//
// Recent hot topics
//
$sql = 'SELECT topic_title, forum_id, topic_id
FROM ' . TOPICS_TABLE . ' t
WHERE topic_approved = 1
AND topic_replies >=' . $config['hot_threshold'] . '
AND topic_moved_id = 0
' . $sql_where . '' . $forum_sql . '
ORDER BY topic_time DESC';
$result = $db->sql_query_limit($sql, $portal_config['portal_max_topics']);
while(($row = $db->sql_fetchrow($result)) && ($row['topic_title']))
{
// auto auth
if (($auth->acl_get('f_read', $row['forum_id'])) || ($row['forum_id'] == '0'))
{
$template->assign_block_vars('latest_hot_topics', array(
'TITLE' => character_limit($row['topic_title'], $portal_config['portal_recent_title_limit']),
'FULL_TITLE' => censor_text($row['topic_title']),
'U_VIEW_TOPIC' => append_sid("{$phpbb_root_path}viewtopic.$phpEx", 'f=' . (($row['forum_id'] == 0) ? $g_forum_id : $row['forum_id']) . '&t=' . $row['topic_id'])
));
}
}
$db->sql_freeresult($result);
//
// Recent topic (only show normal topic)
//
$sql = 'SELECT topic_title, forum_id, topic_id
FROM ' . TOPICS_TABLE . ' t
WHERE topic_status <> ' . ITEM_MOVED . '
AND topic_approved = 1
AND topic_type = ' . POST_NORMAL . '
AND topic_moved_id = 0
' . $sql_where . '' . $forum_sql . '
ORDER BY topic_time DESC';
$result = $db->sql_query_limit($sql, $portal_config['portal_max_topics']);
while(($row = $db->sql_fetchrow($result)) && ($row['topic_title']))
{
// auto auth
if (($auth->acl_get('f_read', $row['forum_id'])) || ($row['forum_id'] == '0'))
{
$template->assign_block_vars('latest_topics', array(
'TITLE' => character_limit($row['topic_title'], $portal_config['portal_recent_title_limit']),
'FULL_TITLE' => censor_text($row['topic_title']),
'U_VIEW_TOPIC' => append_sid("{$phpbb_root_path}viewtopic.$phpEx", 'f=' . $row['forum_id'] . '&t=' . $row['topic_id'])
));
}
}
$db->sql_freeresult($result);
$template->assign_var('S_DISPLAY_RECENT', true);
?>
