ADD sidebar in PHPBB3.x template

To add sidebar in your phpbb3 template you have to edit two files, overall_header.html and overall_footer.html. These files are in the /forum_root/styles/template_name/template/ directory, where forum_root is the directory where you install your PHPBB forum and template_name is the name of template you want to edit. Default template is prosilver.

How to edit PHPBB3 template:

You can edit template files by using conventional FTP program; but in PHPBB3 you have an option to edit them from within your Administration Control Panel. Before you edit anything you should keep a backup copy of original file. Now follow the following steps.
  1. Login to your Administration Control Panel.
  2. At the top of the panel click on the style tab of tabbed menu (see image below).
  3. At the left side vertical menu click on the link template. A list of all templates will appear.
  4. Click on the edit link of the template which you want to edit. A drop-down combo box will appear listing all template files in alphabetical order.
  5. From here you select file overall_header.html or overall_footer.html for editing.
  6. After editing do not forget to save them.

How to add a left sidebar in PHPBB

1. Open file overall_header.html for editing.
2. At the end of that file add the following lines.
Code | Download
<table id="mainbody"><tr><td id="left_sidebar">
<!-- Your sidebar html code here-->
</td><td id="right_column">
3. Add the following style inside the head tag.
Code | Download
<style>
<!--
table#mainbody{ width:100%; }
td#left_sidebar{width:200px;}
//Add style for your sidebar code.
-->
</style>
4. Open file overall_footer.html for editing.
Find the line <div id="page-footer"> at the top of the file.
Before that line add the following line of code.
</td></tr></table>

How to add a right sidebar in PHPBB

1. Open file overall_footer.html for editing.
2. Find the line <div id="page-footer"> at the top of the file.
3. Before that line add the following line of code.
Code | Download
</td> <td id="right_sidebar">
<!-- Your sidebar html code here-->
</td></tr></table>
4. Open file overall_header.html for editing.
5. At the end of that file add the following line.
Code | Download
<table id="mainbody"><tr><td id="forum_body">
//Add the following style inside the head tag.
<style>
<!--
table#mainbody{ width:100%; }
td#left_column{width:200px;}
-->
</style>

Include sidebar page

Although you can directly add your sidebar html code inside overall_header.html or overall_footer.html (incase of right sidebar) but instead you can also include a separate sidebar html page.
  1. Creates an HTML page sidebar.html.
  2. Upload it into the /forum_root/styles/template_name/template/ directory, where forum_root is the directory where you install your PHPBB forum and template_name is the name of template you want to edit
  3. Now replace the line <!-- Your sidebar html code here--> with
    <!-- INCLUDE sidebar.html -->.
Comments:

How to insert an image into the sidebar page?

COMMENT BY: veghelth DATE: Jul 17, 18:31
Very useful article. But i have a question that how to insert an image into the sidebar page?

Reply: How to insert an image link into the sidebar page

COMMENT BY: admin DATE: Jul 17, 18:58
To insert image on sidebar page you have to upload the image file on your server. You can upload it at any directory, but the convension for PHPBB is you upload it in /forum_root/styles/stylename/theme/images/ directory.

If your style is prosilver then stylename=prosilver.

Now to display the image use html img tag with

<span style="color:#000000; font-family:'courier new'; border:1px solid #333333; padding:5px 3px; margin:5px 0; display:block;">src='{T_THEME_PATH}/images/imagefilename.gif'</span>

Here {T_THEME_PATH} is a PHPBB variable which always pointed to your default style directory.

Edit menu in PHPBB3 template

COMMENT BY: trail DATE: Jul 25, 03:17
Cool article. But I'm looking and seeking for a tutorial how to edit menu in PHPBB3 template?
Thanks.

sidebar appears halfway down the screen

COMMENT BY: Joseppi DATE: Oct 07, 22:08
I did everything you said and it worked. But I can't figure out why my sidebar appears halfway down the screen. Is there a way to make it at the top?

Re: sidebar appears halfway down the screen

COMMENT BY: admin DATE: Oct 08, 00:52
Add style for sidebar td#{vertical-align:top;}. For left-sidebar use style
Code
<style>
<!--
table#mainbody{ width:100%; }
td#left_sidebar{width:200px; vertical-align:top;}
//Add style for your sidebar code.
-->
</style>

Sidebar doesn't show

COMMENT BY: Klone DATE: Jan 31, 03:23
For some reason, my sidebar doesn't show up. Where does the following code go on the overall_header page?
Code
<style>
<!--
table#mainbody{ width:100%; }
td#left_sidebar{width:200px;}
//Add style for your sidebar code.
-->
</style>

Where you put your style code

COMMENT BY: admin DATE: Jan 31, 05:27
Actually style should go into the head section of an HTML document. You just find the line "</head>". Put your style code above that line.

right sidebar appears halfway down the screen

COMMENT BY: pickyj DATE: Jul 27, 19:29
i have the same problem with joseppi, but on the left sidebar

i tried to add vertical-align:top; and valign:top; but nothing worked, please help me

NICE POST!!!

Re: right sidebar appears halfway down the screen

COMMENT BY: admin DATE: Jul 28, 09:24
Hello,
You provide a broken link of your site (http://blacklteam.vacau.com). So I remove it. Please provide URL of your forum.
Thanks.

Please help me!

COMMENT BY: pickyj DATE: Jul 28, 11:18
The url is 100% real! I'm the admin! So please help me with the right ads! I want the to be showed at the top (like the left ad)

No title

COMMENT BY: admin DATE: Jul 28, 11:35
I'm examining your source code. Please allow me few hours.
Thanks.

How to put both sidebars in PHPBB3 template

COMMENT BY: admin DATE: Jul 28, 15:43
If you want to include both sidebars then follow the following guidelines.
  1. Open file overall_header.html for editing.
  2. Add the following style code between <head> and </head> tags.
Code
<style>
<!--
table#mainbody{ width:100%; }
#mainbody td{vertical-align:top;}
td#left_sidebar{width:160px;}
td#right_sidebar{width:160px;}
//Add style for your sidebar code.
-->
</style>
3. At the end of that file add the following lines.
Code
<table id="mainbody"><tr><td id="left_sidebar">
<!-- Your sidebar html code here-->
</td><td id="forum_body">
4. Open file overall_footer.html for editing.

Find the line <div id="page-footer"> at the top of the file.

Before that line add the following line of code.
Code
</td><td id=?right_sidebar?>
//Your right sidebar code here.
</td>
</tr></table>

Problem with

COMMENT BY: bob2000 DATE: Aug 09, 14:19
Thank you for "How to put both sidebars in PHPBB3 template", but for me problem with "Board 3 portal".
For me on a forum "Board 3 portal" is set. How to do blocks on both parties that a portal did not affect?

Re: Problem with "Board 3 portal"

COMMENT BY: admin DATE: Aug 09, 18:21
Sorry, I've no idea about Board portal.

How can I add stuff to the new sidebar

COMMENT BY: francessuzanne DATE: Nov 02, 04:22
Sorry for the ignorance, but I can't figure out how to add things (adds, html tables, etc.) inside the sidebar I just created.

Thanks

COMMENT BY: indigo DATE: Mar 15, 15:06
Thank you very much! This was very helpfull and worked immediately!

Only in index

COMMENT BY: micropalla DATE: Aug 22, 15:28
Hello!
Very useful but how to make it appear only in index page?

Add comment