Mod Nam Gelişmiş Yeni Konular/Başlıklar
Mod's Links :
Mod |
ManuelCompatible With: 1.1.4
Created By:
Marook Translated by tarık for SMFGrupThis mod alters the recent posts. Now you will see the message icon, the number of views additional to the standard items (Author, Categorie, Date and Subject).
Installation Instructions for 1.1.x series$Sourcedir/Recent.php
Find global $scripturl, $txt, $db_prefix, $user_info, $modSettings, $func; // Find all the posts. Newer ones will have higher IDs. (assuming the last 20 * number are accessable...) // !!!SLOW This query is now slow, NEEDS to be fixed. Maybe break into two? $request = db_query(" SELECT m.posterTime, m.subject, m.ID_TOPIC, m.ID_MEMBER, m.ID_MSG, IFNULL(mem.realName, m.posterName) AS posterName, t.ID_BOARD, b.name AS bName, LEFT(m.body, 384) AS body, m.smileysEnabled FROM ({$db_prefix}messages AS m, {$db_prefix}topics AS t, {$db_prefix}boards AS b) LEFT JOIN {$db_prefix}members AS mem ON (mem.ID_MEMBER = m.ID_MEMBER) WHERE m.ID_MSG >= " . max(0, $modSettings['maxMsgID'] - 20 * $showlatestcount) . " AND t.ID_TOPIC = m.ID_TOPIC AND b.ID_BOARD = t.ID_BOARD" . (!empty($modSettings['recycle_enable']) && $modSettings['recycle_board'] > 0 ? " AND b.ID_BOARD != $modSettings[recycle_board]" : '' . " AND $user_info[query_see_board] ORDER BY m.ID_MSG DESC LIMIT $showlatestcount", __FILE__, __LINE__);Replace With: global $scripturl, $txt, $db_prefix, $user_info, $modSettings, $func, $settings, $ID_MEMBER; // Find all the posts. Newer ones will have higher IDs. (assuming the last 20 * number are accessable...) // !!!SLOW This query is now slow, NEEDS to be fixed. Maybe break into two? if (!empty($modSettings['recent_topics']) && $modSettings['recent_topics']){ $request = db_query(" SELECT m.posterTime, ms.subject, m.ID_TOPIC, m.ID_MEMBER, m.ID_MSG, b.ID_BOARD, b.name AS bName, IFNULL(mem.realName, m.posterName) AS posterName, " . ($user_info['is_guest'] ? '1 AS isRead, 0 AS new_from' : ' IFNULL(lt.ID_MSG, IFNULL(lmr.ID_MSG, 0)) >= m.ID_MSG_MODIFIED AS isRead, IFNULL(lt.ID_MSG, IFNULL(lmr.ID_MSG, -1)) + 1 AS new_from' . ", LEFT(m.body, 384) AS body, m.smileysEnabled, m.icon, t.numReplies, t.numViews FROM ({$db_prefix}messages AS m, {$db_prefix}topics AS t, {$db_prefix}boards AS b, {$db_prefix}messages AS ms) LEFT JOIN {$db_prefix}members AS mem ON (mem.ID_MEMBER = m.ID_MEMBER)" . (!$user_info['is_guest'] ? " LEFT JOIN {$db_prefix}log_topics AS lt ON (lt.ID_TOPIC = t.ID_TOPIC AND lt.ID_MEMBER = $ID_MEMBER) LEFT JOIN {$db_prefix}log_mark_read AS lmr ON (lmr.ID_BOARD = b.ID_BOARD AND lmr.ID_MEMBER = $ID_MEMBER)" : '' . " WHERE t.ID_LAST_MSG >= " . ($modSettings['maxMsgID'] - 35 * min($showlatestcount, 5)) . " AND t.ID_LAST_MSG = m.ID_MSG AND b.ID_BOARD = t.ID_BOARD" . (empty($exclude_boards) ? '' : " AND b.ID_BOARD NOT IN (" . implode(', ', $exclude_boards) . " " . " AND $user_info[query_see_board] AND ms.ID_MSG = t.ID_FIRST_MSG ORDER BY t.ID_LAST_MSG DESC LIMIT $showlatestcount", __FILE__, __LINE__); } else { $request = db_query(" SELECT m.posterTime, m.subject, m.ID_TOPIC, m.ID_MEMBER, m.ID_MSG, IFNULL(mem.realName, m.posterName) AS posterName, t.ID_BOARD, b.name AS bName, LEFT(m.body, 384) AS body, m.smileysEnabled, m.icon, t.numViews, t.numReplies FROM ({$db_prefix}messages AS m, {$db_prefix}topics AS t, {$db_prefix}boards AS b) LEFT JOIN {$db_prefix}members AS mem ON (mem.ID_MEMBER = m.ID_MEMBER) WHERE m.ID_MSG >= " . max(0, $modSettings['maxMsgID'] - 20 * $showlatestcount) . " AND t.ID_TOPIC = m.ID_TOPIC AND b.ID_BOARD = t.ID_BOARD" . (!empty($modSettings['recycle_enable']) && $modSettings['recycle_board'] > 0 ? " AND b.ID_BOARD != $modSettings[recycle_board]" : '' . " AND $user_info[query_see_board] ORDER BY m.ID_MSG DESC LIMIT $showlatestcount", __FILE__, __LINE__); }Find ), 'topic' => $row['ID_TOPIC'], Add After 'icon' => file_exists($settings['theme_dir'] . '/images/post/' . $row['icon'] . '.gif' ? $settings['images_url'] . '/post/' . $row['icon'] . '.gif' : $settings['default_images_url'] . '/post/' . $row['icon'] . '.gif', 'views' => $row['numViews'], 'replies' => $row['numReplies'], $Themedir/BoardIndex.template.php
Find <table cellpadding="0" cellspacing="0" width="100%" border="0">';Replace With <table cellpadding="0" cellspacing="1" width="100%" border="0"> <tr> <td class="catbg2" style="text-align:left;" colspan="2">', $txt[70] ,'</td> <td class="catbg2" style="text-align:center;">', $txt[110] ,'</td> <td class="catbg2" style="text-align:center;">', $txt[301] ,'</td> <td class="catbg2" style="text-align:center;">', $txt[20] ,'</td> <td class="catbg2" style="text-align:center;">', $txt[29] ,'</td> <td class="catbg2" style="text-align:right;">', $txt[317] ,'</td> </tr>'; Find foreach ($context['latest_posts'] as $post) echo ' <tr> <td class="middletext" valign="top"><b>', $post['link'], '</b> ', $txt[525], ' ', $post['poster']['link'], ' (', $post['board']['link'], ' </td> <td class="middletext" align="right" valign="top" nowrap="nowrap">', $post['time'], '</td> </tr>';Replace With $cnt = 0; foreach ($context['latest_posts'] as $post){ $cnt++; $class = ($cnt % 2) ? 'windowbg' : 'windowbg2'; echo ' <tr> <td class="', $class, '"><img src="', $post['icon'] , '" alt="" /></td> <td class="', $class, '"" title="', $post['preview'] ,'">', $post['link'], '</td> <td class="', $class, '"" style="text-align:center;">', $post['replies'], '</td> <td class="', $class, '"" style="text-align:center;">', $post['views'], '</td> <td class="', $class, '"" style="text-align:center;">',$post['board']['link'], '</td> <td class="', $class, '"" style="text-align:center;">',$post['poster']['link'], '</td> <td class="', $class, '"" style="text-align:right;" nowrap="nowrap">', $post['time'], '</td> </tr>'; } $Sourrcedir/ModSettings.php
Find // Who's online. array('check', 'who_enabled' ,Add After '', // Recent topics ? array('check', 'recent_topics',null, &$txt['recent_topics']), $Themedir/languages/modsettings.turkish.php
Find?>Add Before$txt['recent_topics'] = 'Son konular yerine son başlıkları göster';