1
This is more for webmasters or very active members who want to see x new posts to have a chance to respond to all of them. This can also be used for aesthetic reasons: On my website, I only set it to show 5 new topics and increasing that makes the site look too "busy." This hack will allow the user to specify how many new topics to show.
./modules/newbb/blocks/newbb_new.php ~line 52
$query='SELECT t.topic_id, t.topic_title, t.topic_last_post_id, t.topic_time, t.topic_views, t.topic_replies, t.forum_id, f.forum_name FROM '.$db->prefix('bb_topics').' t, '.$db->prefix('bb_forums').' f WHERE f.forum_id=t.forum_id AND f.forum_type <> 1 ORDER BY '.$order.' DESC';
[b]// edit start: customized block to show the default amount of topics or x results from user input
$options[0] = (is_numeric($_GET['new_topics'])) ? intval($_GET['new_topics']) : $options[0];[/b]
// edit stop
if (!$result = $db->query($query,$options[0],0)) {
./modules/newbb/templates/blocks/newbb_block_new.html ~line 48
<table cellspacing="0" cellpadding="0" border="0">
<tr>
<{* EDIT START *}>
[b]<td align="left" valign="top">
<form method="get" action="<{$xoops_requesturi}>" style="margin:0px;">
Display <input type="text" name="new_topics" value="<{$smarty.get.new_topics}>" size="2" maxlength="3" title="Press Enter to submit" /> new topics
form>
td>[/b]
<{* EDIT END *}>
<td align="right"><a href="<{$xoops_url}>/modules/newbb/"><{$block.lang_visitforums}>a>td>
tr>
table>
Now update the module (or edit your cloned template set) and now you'll see a small textbox like
Display [¯¯] new topics. The user will type in a number, press enter on the keyboard and the page will reload with a new number of recent topics.