MyBB Community Forums

Full Version: Adding latest threads to a sidebar
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
I know this has been asked , but ive tried doing what ive read but nothing is working, using the1point8 theme and running mybb 1.8 i have the side bar ,perfect.
But now i just need the latest threads in it like the square theme how it uses the portal latest threads.
here is my index template, thanks in advance for any help

<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>
<style type="text/css">
.buttons {
    background: url(images/arrowright.png) no-repeat;
    width: 16px;
    height: 16px;
    display: block;
    cursor: pointer;
}

.clickedbuttons {
    background: url(images/arrowright.png) no-repeat;
    width: 16px;
    height: 16px;
    display: block;
    cursor: pointer;
}
</style>
</head>
<body>
{$header}
<a class="buttons" style="float: right;"></a>
<a class="clickedbuttons" style="float: right;"></a>
<br class="clear" />
<div class="sidebar" style="float: right;width: 19%;">
<table border="0" cellspacing="{$theme['borderwidth']}" cellpadding="{$theme['tablespace']}" class="tborder">
<tr>
<td class="thead"><strong>
Latest News
</strong></td>
</tr>
<tr>
<td class="trow1">
IN TESTING
</td>
</tr>
</table>
</div>
<div class="forums" style="float: left;width: 80%;">
    {$dvz_shoutbox}
{$forums}
</div>
<br class="clear" />
{$boardstats}

<dl class="forum_legend smalltext">
    <dt><img src="{$theme['imgdir']}/on.gif" alt="{$lang->new_posts}" title="{$lang->new_posts}" style="vertical-align: middle; padding-bottom: 4px;" /></dt>
    <dd>{$lang->new_posts}</dd>

    <dt><img src="{$theme['imgdir']}/off.gif" alt="{$lang->no_new_posts}" title="{$lang->no_new_posts}" style="vertical-align: middle; padding-bottom: 4px;" /></dt>
    <dd>{$lang->no_new_posts}</dd>

    <dt><img src="{$theme['imgdir']}/offlock.gif" alt="{$lang->forum_locked}" title="{$lang->forum_locked}" style="vertical-align: middle;" /></dt>
    <dd>{$lang->forum_locked}</dd>
</dl>
<br style="clear: both" />
{$footer}
</body>
</html>
EDIT :
I just noticed i put this in a the 1.6 section , i apologize for that , can a mod plz move to the right section , thanks
Thanks for redirecting this thread to proper location , so any help possible with this issue ?
Try this, but make sure you keep a back up of your original code just in case it doesn't work,
let me know how it goes. It is a shot in the dark.



<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>
<style type="text/css">
.buttons {
    background: url(images/arrowright.png) no-repeat;
    width: 16px;
    height: 16px;
    display: block;
    cursor: pointer;
}

.clickedbuttons {
    background: url(images/arrowright.png) no-repeat;
    width: 16px;
    height: 16px;
    display: block;
    cursor: pointer;
}
</style>
</head>
<body>
{$header}
<a class="buttons" style="float: right;"></a>
<a class="clickedbuttons" style="float: right;"></a>
<br class="clear" />
<div class="sidebar" style="float: right;width: 19%;">
<table border="0" cellspacing="{$theme['borderwidth']}" cellpadding="{$theme['tablespace']}" class="tborder">
<tr>
<td class="thead"><strong>
{$announcements}
{$multipage}
</td>
</strong></td>
</tr>
<tr>
<td class="trow1">
IN TESTING
</td>
</tr>
</table>
</div>
<div class="forums" style="float: left;width: 80%;">
    {$dvz_shoutbox}
{$forums}
</div>
<br class="clear" />
{$boardstats}

<dl class="forum_legend smalltext">
    <dt><img src="{$theme['imgdir']}/on.gif" alt="{$lang->new_posts}" title="{$lang->new_posts}" style="vertical-align: middle; padding-bottom: 4px;" /></dt>
    <dd>{$lang->new_posts}</dd>

    <dt><img src="{$theme['imgdir']}/off.gif" alt="{$lang->no_new_posts}" title="{$lang->no_new_posts}" style="vertical-align: middle; padding-bottom: 4px;" /></dt>
    <dd>{$lang->no_new_posts}</dd>

    <dt><img src="{$theme['imgdir']}/offlock.gif" alt="{$lang->forum_locked}" title="{$lang->forum_locked}" style="vertical-align: middle;" /></dt>
    <dd>{$lang->forum_locked}</dd>
</dl>
<br style="clear: both" />
{$footer}
</body>
</html>
you can make use of this plugin 
(2014-10-30, 09:23 AM)mmadhankumar Wrote: [ -> ]you can make use of this plugin 

I have that plugin but it doesnt work for some reason, it places latest threads on top of forum and not in a sidebar
(2014-11-03, 06:39 AM)ShaneR82 Wrote: [ -> ]I have that plugin but it doesnt work for some reason, it places latest threads on top of forum and not in a sidebar

you can place the variable used by the plugin, in any place you want to display the threads... whats your forum url.. and post your index template here...
(2014-11-03, 07:07 AM)mmadhankumar Wrote: [ -> ]
(2014-11-03, 06:39 AM)ShaneR82 Wrote: [ -> ]I have that plugin but it doesnt work for some reason, it places latest threads on top of forum and not in a sidebar

you can place the variable used by the plugin, in any place you want to display the threads... whats your forum url.. and post your index template here...

theeditorscorner.com/forum 

is the url , but at the moment my hosts is having issues , im unable to use my ftp or cpanel , i deleted the them and was going to upload a fresh install , but at the moment i cant do it just now , although you can view my site and choose the vienna theme, there is an issue with the layout maybe you can help , if need be i can create a new thread.
Thankyou
I was having the same problem. I found the solution to this problem here. More specifically, this post. I am now able to add a sidebar, including "Latest Threads" to every one of my themes.

One little piece of code added to your "portal_latestthreads_thread" template and you're good to go.