Merhaba adminim İçinden cıkamadıgım bir konu var.
Forumdan son konular blogunda bir iki istegim olacak;
1-Resimde göründüğü gibi konunun üzerine gelince son yazılan mesajı görmek daha iyi oldugu için konu acılıs tarihi değil son yazılan mesajı görmek istiyorum.
2-Başlıktan önce Yeni bir yer açıp Mesajın hangi kategoriye ait oldugunu görmek istiyorum.
Değerli zamanında buna ayıracagın zamanın varsa cok sevinirim adminim. şimdiden teşekkür ederim

<?php
/*-------------------------------------------------------------------------
| MKPortal SMF Last Posts Table 1.0 (for center block) 16.05.2006
| for MKP M1.x x SMF 1.x
| by visiblesoul <visiblesoul.net>
| Support: http://www.visiblesoul.net/resources/forum/viewforum.php?id=52
| Edit : http://www.erkaplan.net
| Edit : WEYCELL
+--------------------------------------------------------------------------
Want to show your appreciation for this block?
Link to me on your website using the link code below:
Get free <a href="http://www.visiblesoul.net/" target="_blank">MKPortal modules, blocks, hacks, and skins</a> at <a href="http://www.visiblesoul.net/" target="_blank">Visible Soul Web Design - Corpus Christi, Texas</a>!
---------------------------------------------------------------------------
Config:
--------------------------------------------------------------------------*/
$limit = 30; // Number of forum posts to show in block
$cuttitle = 49; // Number of characters to display in title
$startformat = "normal"; // Formats the topic start date.
// Options are 'short', 'time', 'small', 'normal', or leave blank for default.
$lastformat = "short"; // Formats the last post date.
// Options are 'short', 'time', 'small', 'normal', or leave blank for default.
$showprev = 0; // Show post preview? Yes=1 No=0
$cutpost = "199"; // Number of characters to display in post preview
/*------------------------------------------------------------------------*/
global $mklib, $mkportals, $db_prefix, $user_info, $modSettings;
$content = "
<tr>
<td>
<table class=\"moduleborder\" cellspacing=\"1\" width=\"100%\">
<tr>
<th class=\"modulex\" width=\"45%\" style=\"padding-left: 10px;\">Başlık</th>
<th class=\"modulex\" width=\"20%\" style=\"padding-left: 10px;\">Son Cevap</th>
<th class=\"modulex\" width=\"25%\" style=\"padding-left: 10px;\">Tarih</th>
<th class=\"modulex\" width=\"5%\" style=\"text-align: center;\">Okunma</th>
<th class=\"modulex\" width=\"5%\">Cevap</th>
</tr>
";
$db_prefix = DBPREFIX;
$sql = "
SELECT
m.posterTime AS lastPosterTime, m.ID_TOPIC, m.ID_MSG, m.ID_MEMBER, m.smileysEnabled,
m2.ID_MEMBER AS ID_FIRST_MEMBER, m2.subject, m2.posterTime, m2.body,
t.ID_BOARD, t.ID_LAST_MSG, t.numReplies, t.numViews, b.name AS bName,
IFNULL(mem2.realName, m2.posterName) AS posterName, t.ID_FIRST_MSG,
IFNULL(mem.realName, m.posterName) AS lastPosterName, t.ID_LAST_MSG
FROM ({$db_prefix}messages AS m, {$db_prefix}messages AS m2, {$db_prefix}topics AS t, {$db_prefix}boards AS b)
LEFT JOIN {$db_prefix}members AS mem ON (mem.ID_MEMBER = m.ID_MEMBER)
LEFT JOIN {$db_prefix}members AS mem2 ON (mem2.ID_MEMBER = m2.ID_MEMBER)
WHERE m2.ID_MSG = t.ID_FIRST_MSG
AND m.ID_MSG = t.ID_LAST_MSG
AND t.ID_TOPIC = m.ID_TOPIC
AND m.ID_MSG >= " . max(0, $modSettings['maxMsgID'] - 20 * $limit) . "
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]
GROUP BY m.ID_TOPIC
ORDER BY t.ID_LAST_MSG DESC
LIMIT $limit";
$DB->query($sql);
while ( $post = $DB->fetch_row() ) {
$title = strip_tags($post['subject']);
$title = str_replace( "&#38;#33;" , "!" ,$title );
$title = str_replace( """, "\"", $title );
if (strlen($title) > $cuttitle) {
$title = substr( $title,0,($cuttitle - 3) ) . "...";
$title = preg_replace( '/&(#(\d+;?)?)?(\.\.\.)?$/', '...',$title );
}
$starter = $post['posterName'];
$lastname = $post['lastPosterName'];
$lastid = $post['ID_MEMBER'];
$last_postid = $post['ID_LAST_MSG'];
$posts = $post['numReplies'];
$views = $post['numViews'];
$tid = $post['ID_TOPIC'];
$title = $post['subject'];
$prepost = $post['body'];
$prepost = strip_tags($post['body']);
$prepost = str_replace( "&#38;#33;" , "!" , $prepost );
$prepost = str_replace( """, "\"", $prepost );
if (strlen($prepost) > $cutpost) {
$prepost = substr( $prepost,0,($cutpost - 3) ) . "...";
$prepost = preg_replace( '/&(#(\d+;?)?)?(\.\.\.)?$/', '...',$prepost );
}
$startdate = $mklib->create_date($post['posterTime'],$startformat);
$lastdate = $mklib->create_date($post['lastPosterTime'], $lastformat);
if ($showprev == 1) {
$preview = "<tr><td style=\"padding: 2px 20px\" class=\"modulecell\" colspan=\"5\">$prepost</td></tr>";
}
else
$preview = "";
$content .= "
<!-- topic begin -->
<tr>
<td class=\"modulecell\" style=\"padding-left: 10px; text-align: left;\"><img src=\"$mklib->images/wxy.gif\" border=\"0\" alt=\"\">
<a style=\"text-decoration: none; font-weight: bold;\" href=\"{$mkportals->forum_url}/index.php?topic={$tid}\" title=\"Konu $starter tarafından $startdate tarihinde açıldı\">$title</a>
</td>
<td class=\"modulecell\" style=\"padding-left: 10px; text-align: left;\">
<a href=\"{$mkportals->forum_url}/index.php?action=profile;u={$lastid}\" title=\"Son Cevap Gönderen: $lastname\"><b>$lastname</b></a>
</td>
<td class=\"modulecell\" style=\"padding-left: 10px; text-align: left;\">$lastdate</td>
<td class=\"modulecell\" style=\"padding-right: 10px; text-align: right;\">$views</td>
<td class=\"modulecell\" style=\"padding-right: 10px; text-align: right;\">$posts</td>
</td>
</tr>
$preview
<!-- topic end -->
";
}
$content .= "
</table>
</td>
</tr>
";
unset($limit);
unset($cuttitle);
unset($startformat);
unset($lastformat);
unset($showprev);
unset($cutpost);
unset($post);
unset($tid);
unset($title);
unset($views);
unset($posts);
unset($startdate);
unset($starter);
unset($last_postid);
unset($sql);
unset($lastname);
unset($lastid);
unset($prepost);
unset($lastdate);
unset($preview);
unset($prepost);
?>