MyBB Community Forums

Full Version: Recent Threads in side-bar.
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
I used this Tut:
http://community.mybb.com/thread-73062.html

I was wondering is there a code i can use to get my forums recent threads within the side bar?
I quote myself, hope you understand me Toungue

(2014-03-16, 08:08 AM)eNvy Wrote: [ -> ]1 - Index template:

You need to separate the forum and the latest threads:

Quote:<div class="sidebar" style="float: right; width: 250px;">

<script type="text/javascript">
jQuery(function(){
jQuery(".latestthreads").load("{$mybb->settings['bburl']}/portal.php .latestthreads_portal");
}); </script>

<table border="0" cellspacing="{$theme['borderwidth']}" cellpadding="{$theme['tablespace']}" class="tborder">
<tr>
<td class="thead">
<div class="expcolimage"><img src="{$theme['imgdir']}/collapse.gif" id="ths_img" class="expander" alt="[-]" title="[-]" /></div>
Latest Threads
</td>
</tr>
<tr>
<td class="trow3" style="{$collapsed['ths_e']}" id="ths_e">

<div class="latestthreads float_left">
</div>

</td>
</tr>
</table>

</div>

<div class="forums" style="float: left; width: 714px;">
{$forums}
</div>

If you see there, I have 2 divs, the jQuery script to import the data and the table for the sidebar where you put the latest threads.

I use the class "latestthreads_portal" to import the data from the portal, so...

2- Portal templates > portal_latestthreads_thread

Quote:<tr class="latestthreads_portal">

You simply add the class we use before in the start of the <tr> tag.

And I think that's all. Of course you need to have jQuery in your forum for this to work.

Greetings.

I use my own handmade sidebars, so, you don't even need to use that, you can simply put the div "latestthreads" where you want and then, style it.

This code only imports the latest threads from the portal to the index, so... if you use your own portal and display the latest threads there, if you style it, both (index and portal) will be styled.
Thanks for the Help Guys!
This thread is a life-saver. Thanks for your help, eNvy!