miniBB ® 

miniBB

®
Support Forums
  
 | Start | Register | Search | Statistics | File Bank | 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
Partaker
#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
Partaker
#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
Partaker
#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 
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=\"12_{$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
Partaker
#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
Partaker
#9 | Posted: 19 Nov 2008 05:53 
Great, works well. Thank you very much.

Author kuopassa
Partaker
#10 | Posted: 21 Feb 2009 09:18 
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
 Share Topic's Link

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


  ?
Post as a Guest, leaving the Password field blank. You could also enter a Guest name, if it's not taken by a member yet. Sign-in and post at once, or just sign-in, bypassing the message's text.


Before posting, make sure your message is compliant with forum rules; otherwise it could be locked or removed with no explanation.

 

 
miniBB Support Forums Powered by Forum Software miniBB ® Home  Features  Requirements  Demo  Download  Showcase  Gallery of Arts
Compiler  Premium Extensions  Premium Support  License  Contact Us
Install the Captcha add-on: protect your miniBB-forums from the automated spam and flood.


  ⇑