MyBB Community Forums

Full Version: How to get Latest Threads on index?
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
I'd like to add a sidebar to my forum displaying the latest threads. I'm currently using this code below to add a Sidebar to my forum and I'd like to know what I need to do to display all the Latest Threads in the sidebar similar to the display in the Portal.

Index Template
<html>
<head>
<title>{$mybb->settings['bbname']}</title>
{$headerinclude}
<script type="text/javascript">
<!--
	lang.no_new_posts = "{$lang->no_new_posts}";
	lang.click_mark_read = "{$lang->click_mark_read}";
// -->
</script>
</head>
<body>
{$header}
<div class="forum">
{$forums}
{$ps_footer_index}
</div>
<div class="sidebar">
{$forumteamonline}
<table border="0" cellspacing="{$theme['borderwidth']}" cellpadding="{$theme['tablespace']}" class="tborder">
<tr>
<td class="thead"><strong><i class="fa fa-pie-chart"></i> Forum Stats</strong></td>
</tr>
<tr>
<td class="trow1">
<span class="smalltext">
Members Registered - {$stats['numusers']}<br />
Newest Member - {$newestmember}<br />
We have total number of Threads {$stats['numthreads']}<br />
We have total number of Posts {$stats['numposts']}
</span>
</td>
</tr>
</table>
<br />
<table border="0" cellspacing="{$theme['borderwidth']}" cellpadding="{$theme['tablespace']}" class="tborder">
<tr>
<td class="thead"><strong><i class="fa fa-globe"></i> Online Users</strong></td>
</tr>
<tr>
<td class="trow1"><span class="smalltext">{$lang->online_note}<br />{$onlinemembers}</span></td>
</tr>
</table>
<br />
</div>
{$boardstats}
{$footer}
</body>
</html>

This is literally the last step to completing my forum. I'm so happy! If I could get some support I would really appreciate it Smile
Did you try looking at the latest threads in index plugins? It might help you out however, i don't have the exact link to the plugin.
(2017-04-26, 01:23 AM)Glunar Wrote: [ -> ]Did you try looking at the latest threads in index plugins? It might help you out however, i don't have the exact link to the plugin.

(2017-04-26, 01:36 AM)Vanz Wrote: [ -> ]https://community.mybb.com/mods.php?action=view&pid=291

I don't know what's been going on with my installation but everytime I activate a plugin there's always some kind of SQL error. So, I'm staying away from plugins until I hire someone to figure out some of my technical problems.

Would like to extend the current free source I'm using as it works with my theme, but I just don't know how to modify it as I'm not a programmer. Trying to learn everything I can and use Google + MyBB for all my help before I hire a dev. Smile
This tutorial can help you do that
https://wallbb.co.uk/adding-sidebar-index-page-mybb/

Regards
WallBB
(2017-04-26, 03:16 AM)WallBB Wrote: [ -> ]This tutorial can help you do that
https://wallbb.co.uk/adding-sidebar-index-page-mybb/

Regards
WallBB

That's the exact same source I'm using in my forum Smile

It's not adding a sidebar that's the problem, it's that I have a little difficulty trying to find out how to display Latest Threads in my sidebar.
(2017-04-26, 11:07 AM)Bull™ Wrote: [ -> ]
(2017-04-26, 03:16 AM)WallBB Wrote: [ -> ]This tutorial can help you do that
https://wallbb.co.uk/adding-sidebar-index-page-mybb/

Regards
WallBB

That's the exact same source I'm using in my forum Smile

It's not adding a sidebar that's the problem, it's that I have a little difficulty trying to find out how to display Latest Threads in my sidebar.
I think you have not added css for the sidebar.
Can you share your forum url ?

Regards
WallBB
(2017-04-26, 12:39 PM)WallBB Wrote: [ -> ]
(2017-04-26, 11:07 AM)Bull™ Wrote: [ -> ]
(2017-04-26, 03:16 AM)WallBB Wrote: [ -> ]This tutorial can help you do that
https://wallbb.co.uk/adding-sidebar-index-page-mybb/

Regards
WallBB

That's the exact same source I'm using in my forum Smile

It's not adding a sidebar that's the problem, it's that I have a little difficulty trying to find out how to display Latest Threads in my sidebar.
I think you have not added css for the sidebar.
Can you share your forum url ?

Regards
WallBB

I did add the CSS 

It isn't the CSS that needs to be changed. The actual code doesn't include a view of the Latest Threads in the sidebar and I'm looking for help from someone that might be able to do a small edit Smile 

My url is https://pixl.ml
(2017-04-26, 11:14 PM)Bull™ Wrote: [ -> ]
(2017-04-26, 12:39 PM)WallBB Wrote: [ -> ]
(2017-04-26, 11:07 AM)Bull™ Wrote: [ -> ]
(2017-04-26, 03:16 AM)WallBB Wrote: [ -> ]This tutorial can help you do that
https://wallbb.co.uk/adding-sidebar-index-page-mybb/

Regards
WallBB

That's the exact same source I'm using in my forum Smile

It's not adding a sidebar that's the problem, it's that I have a little difficulty trying to find out how to display Latest Threads in my sidebar.
I think you have not added css for the sidebar.
Can you share your forum url ?

Regards
WallBB

I did add the CSS 

It isn't the CSS that needs to be changed. The actual code doesn't include a view of the Latest Threads in the sidebar and I'm looking for help from someone that might be able to do a small edit Smile 

My url is https://pixl.ml

Shoot me a PM. I'll help you out. FYI, your forum seems to be down.
My plugin works, but if you want it to display in a sidebar, you'll need to play with the CSS.