15 years on The Web
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
#1 | Posted: 18 Nov 2008 06:23 

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
#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

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
#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($td=db_simpleSelect(0, $Tt, 'topic_title, topic_id', 'forum_id', '=', $forum, 'topic_id DESC', 10)){
$list.="<li><a href=\"12_{$td[1]}_0.html\">{$td[0]}</a></li>";

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

Author feuman
#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
#9 | Posted: 19 Nov 2008 05:53 
Great, works well. Thank you very much.

Author kuopassa
#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=\"12_{$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:

You are welcome to post anonymously, by entering a nickname with no password (if the similar Username has not been taken yet), or by leaving both fields empty. If you have a forums account, you can also sign in from this page without posting a message, or sign in and post at once.

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
Get the Captcha add-on: protect your miniBB-forums from the automated spam and flood.
Captcha Addon for miniBB