xpserkan hocam ben bu son mesajlar pluginin içini açtım biraz göz attım sanki bunun bir yerinde hangi forumlardan bilgi çekeceği yazıyor gibi aklıma şu geldi mesela bu eklentideki Tüm forumlardan son konuları çekme yerini ayarlayıp sadece id numarasını verdiğimiz forumlardan çekme şeklinde yapabiliriz gibime geliyor. Sonuçta pluginin mantığı konu çekmek ve bu tüm forumlar olarak ayarlanmış biz bunu nasıl özelleştiririz.? Bu konuda sen ne dersin? Kodları ekliyorum hocam belki bu ayarın nerden olduğunu bilirsiniz:
Kod:
<?php
/*
Recent Topics
by: vbgamer45
http://www.mybbhacks.com
Copyright 2010 MyBBHacks.com
############################################
License Information:
Links to http://www.mybbhacks.com must remain unless
branding free option is purchased.
#############################################
*/
if(!defined('IN_MYBB'))
die('This file cannot be accessed directly.');
$plugins->add_hook("index_end", "recenttopicsindex_show");
function recenttopicsindex_info()
{
return array(
"name" => "Ana Sayfada Son Konular Gösterimi",
"description" => "Bu Eklenti Ana Sayfada Son Konu ve Yorumları Göstermenizi Sağlar.<br /><img src=\"http://destek.mybb.com.tr/turkey.gif\" border=\"0\" alt=\"MCTR\" title=\"MCTR\" /> Türkçe Çeviri: <a title=\"MyBB.Com.TR - XpSerkan\" href=\"http://www.mybb.com.tr\" target=\"_blank\"><b>MyBB.Com.TR</b></a>",
"website" => "http://destek.mybb.com.tr",
"author" => "vbgamer45",
"authorsite" => "http://www.mybbhacks.com",
"version" => "1.0",
"guid" => "3244972b3e44b82b52b12594a6af9261",
"compatibility" => "14*,16*"
);
}
function recenttopicsindex_install()
{
global $mybb, $db;
// Create Tables/Settings
$db->query("INSERT INTO ".TABLE_PREFIX."settings (sid, name, title, description, optionscode, value, disporder, gid) VALUES (NULL, 'recenttopicslimit', 'Recent Topics To Show', 'The number of recent topics you wish to display on the main index page', 'text', '10', 1, 6);");
rebuild_settings();
}
function recenttopicsindex_is_installed()
{
global $db;
$query = $db->write_query("SELECT * FROM " . TABLE_PREFIX . "settings WHERE `name` = 'recenttopicslimit'");
if($db->num_rows($query) > 0)
return true;
else
return false;
}
function recenttopicsindex_uninstall()
{
global $mybb, $db;
$db->query("DELETE FROM ".TABLE_PREFIX."settings WHERE name = 'recenttopicslimit'");
rebuild_settings();
}
function recenttopicsindex_activate()
{
require_once MYBB_ROOT."/inc/adminfunctions_templates.php";
$returnStatus1 = find_replace_templatesets("index", "#".preg_quote('{$forums}') . "#i", '{$forums}' . "\n" . '{$recenttopics}');
}
function recenttopicsindex_deactivate()
{
require_once MYBB_ROOT."/inc/adminfunctions_templates.php";
$returnStatus1 = find_replace_templatesets(
"index", "#".preg_quote('{$forums}' . "\n" . '{$recenttopics}') . "#i",
'{$forums}',0);
}
function recenttopicsindex_show()
{
global $db, $mybb, $page, $recenttopics, $theme, $lang;
$lang->load('recenttopicsindex');
require_once MYBB_ROOT."inc/functions_search.php";
if (empty($mybb->settings['recenttopicslimit']))
$mybb->settings['recenttopicslimit'] = 10;
$recenttopics .= '<table border="0" cellspacing="' . $theme['borderwidth'] . '" cellpadding="' . $theme['tablespace'] . '" class="tborder">
<thead>
<tr>
<td class="thead" colspan="2">
<div><strong>' . $lang->recenttopics . '</strong></div>
</td>
</tr>
</thead>';
// Run the Query
$unsearchforums = get_unsearchable_forums();
if($unsearchforums)
$where_sql .= " AND t.fid NOT IN ($unsearchforums)";
$inactiveforums = get_inactive_forums();
if ($inactiveforums)
$where_sql .= " AND t.fid NOT IN ($inactiveforums)";
$query = $db->query("
SELECT
t.tid, t.fid, t.subject, t.lastposteruid, t.lastposter, t.lastpost, f.name
FROM ".TABLE_PREFIX."threads as t, ".TABLE_PREFIX."forums as f
WHERE f.fid = t.fid AND t.visible = 1 $where_sql
ORDER BY t.lastpost DESC LIMIT " . $mybb->settings['recenttopicslimit']);
while($threadRow = $db->fetch_array($query))
{
$recenttopics .= '<tr>';
$subject = my_substr($threadRow['subject'], 0, 50);
$postdate = my_date($mybb->settings['dateformat'], $threadRow['lastpost']);
$posttime = my_date($mybb->settings['timeformat'], $threadRow['lastpost']);
$recenttopics .= '<td class="trow1">
<a href="showthread.php?fid=255' . $threadRow['tid'] . '&action=lastpost">' . $subject .'</a> ' . $lang->recenttopics_by . (!empty($threadRow['lastposteruid']) ? ' <a href="member.php?action=profile&uid=' . $threadRow['lastposteruid'] . '">' . $threadRow['lastposter'] . '</a>' : $threadRow['lastposter']) . ' (<a href="forumdisplay.php?fid=255' . $threadRow['fid'] . '">' . $threadRow['name'] . '</a>)
</td>
<td class="trow1">' .
$postdate . ' ' . $posttime . '
</td>
</tr>';
}
$recenttopics .= "</table><br />";
}
?>