Page 1 of 1

Adding A Sidebar

Posted: 1. August 2009 07:46
by Hydrotoast
I've traversed through the forums for a sidebar solution, and I have found topics on how to create a sidebar, but not manage dynamic data within it. So I've taken up some reading into creating templates and took a peek into the inner workings of phpBB. I've come up with a solution, but I was wondering if it could be optimized and also how I would be able to package this as an addon or plugin (First time making a mod for phpBB)?

The general theory is to create a sidebar.html in your templates/ folder and to extract code from your portal/portal_body.html for each block you desire to be in your sidebar. Afterwards, find the template variables respective to the blocks you plan to use in your sidebar within portal.php of your root folder and paste it into: viewtopic.php, viewonline.php, index.php, memberlist.php, ucp.php, etc.

I was wonder how I'd be able to load the the blocks' template vars globally in a single file rather than defining it in each page listed above. Any thoughts?

edit: Sorry if this is wrong forum, I just assumed it belongs in portal blocks