| Author |
Message |
redhairz Worker


Joined: Nov 17, 2006 Posts: 216
|
Posted:
Sat Jun 23, 2007 2:52 am |
|
Hi ravan team i notice forum with last 5 post or recent post had help poster to look out on the recent post, can anyone tell me where to find this mod forum similar to raven site.? Thanks alot manz.  |
|
|
|
 |
kguske Site Admin

Joined: Jun 04, 2004 Posts: 4872
|
Posted:
Sat Jun 23, 2007 10:00 am |
|
Do you mean stickys? If not, can you give a link or screenshot? |
|
|
|
 |
Loki Moderator

Joined: Oct 05, 2003 Posts: 102 Location: Illinois
|
Posted:
Sun Jun 24, 2007 4:46 pm |
|
I think red is referring to the Recent Posts v2.3.3. |
|
|
|
 |
redhairz Worker


Joined: Nov 17, 2006 Posts: 216
|
Posted:
Tue Jun 26, 2007 3:17 pm |
|
No no i mean the forum mod called recent post mod. what it does is in the forum index can show a recent post of 5 or 10. To save user time to seach for the latest discussion topic.
recent post v2.3.3? whats that? |
|
|
|
 |
Gremmie Former Moderator in Good Standing

Joined: Apr 06, 2006 Posts: 2401 Location: Iowa, USA
|
Posted:
Tue Jun 26, 2007 5:54 pm |
|
This isn't a forum mod, it is a center block. Is that what you mean?
| Code: |
<?php
// By Gremmie
if (!defined('BLOCK_FILE'))
{
Header("Location: ../index.php");
die();
}
global $prefix, $db, $sitename;
$sql = 'SELECT t.topic_title, p.post_time, p.post_id, u.username ' .
"FROM {$prefix}_bbtopics AS t, {$prefix}_bbforums AS f, {$prefix}_bbposts AS p, {$prefix}_users as u " .
'WHERE t.forum_id = f.forum_id AND f.auth_view = 0 AND p.topic_id = t.topic_id AND p.post_id = t.topic_last_post_id ' .
'AND p.poster_id = u.user_id ' .
'ORDER BY p.post_time DESC LIMIT 0, 10';
$result = $db->sql_query($sql);
if ($db->sql_numrows($result) > 0)
{
$forumLink = 'forums.html';
$forumPostLink = $forumLink . '&file=viewtopic&p=';
$content = '<center>Join us in our forums for some lively discussions. Here are the latest forum threads with ' .
'new posts:<br /><br /><table border="0">';
while ($row = $db->sql_fetchrow($result))
{
$title = $row['topic_title'];
$time = strftime('%I:%M %p %b %d', intval($row['post_time']));
$pid = intval($row['post_id']);
$pidStr = $pid . '#' . $pid;
$uname = $row['username'];
$content .= '<tr><td align="left"><img src="images/arrow.gif" border="0" alt="arrow" /> ';
$content .= '<a href="' . $forumPostLink . $pidStr . '">' . $title . '</a> by ' . $uname .
' at ' . $time . '</td></tr>';
}
$content .= '</table>';
$content .= "<br /><a href=\"$forumLink\"><b>$sitename Forums</b></a><br /><br /></center>";
}
else
{
$content = '<center><i>No forum info available at this time.</i></center>';
}
?>
|
Unfortunately it won't work as is because the forums software here keeps changing: (spaces added by me)
$forumLink = 'modules . php ? name = Forums';
Into
$forumLink = 'forums.html';
So make that change before you try it.
 |
|
|
|
 |
redhairz Worker


Joined: Nov 17, 2006 Posts: 216
|
Posted:
Tue Jun 26, 2007 8:51 pm |
|
haha Gremmie i was talking abt the forum mod, i had the forum center block for the index. Anyway your help is thanksful  |
|
|
|
 |
|
|
|
|