miniBB ® miniBB®
miniBB Support Forums
 | Forums | Register | Reply | Search | Statistics | Manual |
Custom Tutorials and Modifications miniBB Support Forums / Custom Tutorials and Modifications /   

Displaying recent discussions of a certain forum on the threads page

Author feuman
Registered
#1 | Posted: 18 Nov 2008 06:23 
Hi,

How can i display a number of actual discussed topics in the template? what is the variable for this? Currently i do this with an rss feed, but i would like to have only the topics of the actual forum... Is this possible?

Author Paul
Lead Developer
#2 | Posted: 18 Nov 2008 08:14 
I guess you should take a look at our 1st page news add-on (if I understood the problem properly - if not, please explain it different way).

Author feuman
Registered
#3 | Posted: 18 Nov 2008 08:28 
Hi Paul

Can i call the Include with a Parameter to display only Messages from a particular Subforum?

Check this: http://www.ignoranz.ch/forum/4_0.html on the right hand side below the Ad, are some Links to topics called "Aktuelle Themen". Actually thats a parsed RSS Feed. But i would like to have only messages from the actual Subforum (#4)... This should be dynamic in every Forum...

Best Regards
Sandro

Author Paul
Lead Developer
#4 | Posted: 18 Nov 2008 12:17 
I don't quite understand - why do you need to duplicate topics on the same forums page? I think if you care of SEO this is not really correct approach.

In your case I also don't understand by which criteria "Aktuelle Themen" are selected/sorted?

I think, in general, this could be a very simple add-on to bb_plugins.php (yet custom), but only if I know the algorithm to display such topics there.

Author feuman
Registered
#5 | Posted: 19 Nov 2008 03:08 
Hi Paul

Sorry, was a bad example. Its especially for the detail Pages, e.g: http://www.ignoranz.ch/forum/6_3182_20.html
Its not an SEO issue, its more for the users, to see whats also in the actual subforum.

regards sandro

Author Paul
Lead Developer
#6 | Posted: 19 Nov 2008 03:40 | Edited by: Paul 
I think you could put in bb_plugins.php kind of that code (then put {$list} in your template):

if($action=='vthread'){
$list='<ul>';
if($td=db_simpleSelect(0, $Tt, 'topic_title, topic_id', 'forum_id', '=', $forum, 'topic_id DESC', 10)){
do{
$list.="<li><a href=\"{$forum}_{$td[1]}_0.html\">{$td[0]}</a></li>";
}
while($td=db_simpleSelect(1));
$list.='</ul>';
}
}

I didn't test it so it's in your own hands to make it happen ;-)

Author feuman
Registered
#7 | Posted: 19 Nov 2008 05:01 
Wow, great. Thanks.

Thats it, two little things:

1) The sorting is the wrong way around, the oldest is on top.
2) Would be nice to give a limit of items. atm i think it displays all of them, its a little too much... :-)

Author Paul
Lead Developer
#8 | Posted: 19 Nov 2008 05:15 
I have updated the code above, now sorted by newest topics first and limited to 10.

Author feuman
Registered
#9 | Posted: 19 Nov 2008 05:53 
Great, works well. Thank you very much.

Author kuopassa
Registered
#10 | Posted: 21 Feb 2009 09:18 | Edited by: kuopassa 
A little update for this code which Paul kindly presented is this:

$list.="<li><a href=\"{$forum}_{$td[1]}_0.html\">".substr($td[0], 0, 50)."</a></li>";

This should be injected to the original code. This will just cut away too long link text if it's longer than 50 characters. I don't yet know how to add a suffix (like hellips) to the link text, but maybe later. :-)

Custom Tutorials and Modifications miniBB Support Forums / Custom Tutorials and Modifications / Displaying recent discussions of a certain forum on the threads page Top

Your Reply Click this icon to move up to the quoted message

 Short link for this topic:

 ?
Only registered users are allowed to post here. Please, enter your username/password details upon posting a message, or register first.


Before posting, make sure your message is compliant with our forum posting rules. If not, it may be locked or deleted with no explanation.
 
miniBB Support Forums Powered by Forum Software miniBB ® Features  Requirements  Demo  Download  Showcase  Gallery of Arts
Compiler  Premium Extensions  Premium Support  License  Contacts
Install the Captcha add-on: protect your miniBB-forums from the automated spam and flood.
Captcha Addon for miniBB