Thread Rating:
  • 1 Vote(s) - 5 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Junk: Junk: [Tutorial] Adding a Sidebar to your Forums
#1
Well I'm going to be showing you how to add a sidebar to your forum homepage. This is for people who know how to use HTML and can customize it without the use of a plugin.

First you need to go to your ACP > Templates & Style > Templates > Your Theme > Index Page Templates > index.

When this is open you want to look at find the following;

Code:
{$header}
{$forums}
{$boardstats}

Below your {$header} add the following code;

PHP Code:
<div class="sidebar" style="float: left; width: 20%">

<
table border="0" cellspacing="{$theme['borderwidth']}cellpadding="{$theme['tablespace']}class="tborder">

<
tr>
   <
td class="thead">
        
Title Here
   
</td>
</
tr>

<
tr>
   <
td class="trow2">
    
Text Here
   
</td>
</
tr>
</
table>
</
div

Then add the following tags around your {$forums};

PHP Code:
<div class="forums" style="float: right; width: 79%;">
{
$forums}
</
div

When you're done your index should look a little something like this;

Code:
<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="sidebar" style="float: left; width: 20%">

<table border="0" cellspacing="{$theme['borderwidth']}" cellpadding="{$theme['tablespace']}" class="tborder">

<tr>
   <td class="thead">
        Title Here
   </td>
</tr>

<tr>
   <td class="trow2">
        Text Here
   </td>
</tr>
</table>
</div>

<div class="forums" style="float: right; width: 79%;">
{$forums}
</div>
{$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>

[Image: attachment.php?aid=23241]



Players Tech used this, but altered it to fit the skin!
#2
Nice!!
#3
Pretty cool. It could be useful for some people.
#4
This thread has been junked!
#5
This thread has been junked for a reason, leave it!


Forum Jump:


Users browsing this thread: 1 Guest(s)