Skip to content

Forums Theme Installation

tresf edited this page Nov 14, 2014 · 1 revision

THIS THEME HAS BEEN REPLACED WITH PROBOOT3. THIS TUTORIAL IS NO LONGER VALID

See here instead: https://github.com/LMMS/lmms.io/tree/master/forum/style/template


Steps to edit phpBB3 to allow a bootstrap theme with integrated boostrap navbar.

  1. Install proBoot BootStrap theme into phpBB3

  2. Remove existing header:

    • Open /forum/styles/proboot/template/overall_header.html
    • Remove entire page-header and headerbar divs, lines 99 - 211
  3. Replace page div wrapper:

    • Locate <div class="container-fluid">
    • Replace with (including comments)

1. Restore user control links:
* Locate `<ul class="breadcrumb">`
* Insert before `</ul>` (including comments)
```html
<!-- IF not S_IS_BOT and S_USER_LOGGED_IN -->
<!-- IF S_DISPLAY_PM --> 
<li style="float:right;"><a href="{U_PRIVATEMSGS}"><i class="icon-envelope "></i> <span class="label label-important">{PRIVATE_MESSAGE_INFO}</span>
<!-- IF PRIVATE_MESSAGE_INFO_UNREAD -->, {PRIVATE_MESSAGE_INFO_UNREAD}<!-- ENDIF -->
</a></li>
<!-- ENDIF -->
<!-- IF S_DISPLAY_SEARCH --> 
<li style="float:right;"><a href="{U_SEARCH_SELF}"><i class="icon-file "></i> {L_SEARCH_SELF}</a></li>
<!-- ENDIF -->
<li style="float:right;" class="bb-ucp"><a href="{U_PROFILE}" title="{L_PROFILE}" accesskey="e"><i class="icon-wrench "></i> {L_PROFILE}</a></li>
<li style="float:right;" class="divider"></li>
<!-- ENDIF -->				
<li style="float:right;" class="bb-logout"><a href="{U_LOGIN_LOGOUT}" title="{L_LOGIN_LOGOUT}" accesskey="x"><i class="icon-minus-sign "></i> {L_LOGIN_LOGOUT}</a></li>
<!-- IF not S_USER_LOGGED_IN and S_REGISTER_ENABLED and not (S_SHOW_COPPA or S_REGISTRATION) -->
<li class="bb-register"><a href="{U_REGISTER}"><i class="icon-user "></i> {L_REGISTER}</a></li>
<!-- ENDIF -->
  1. Fix stylesheets:
    • Insert above {T_THEME_PATH}
```
  • Insert above <!-- IF S_CONTENT_DIRECTION eq 'rtl' -->
<link rel="stylesheet" type="text/css" href="/css/style.css">
  • Open /forum/styles/proboot/theme/bootstrap.css

  • Comment out caret class, lines 3235 - 3240

  • Comment out .navbar .nav > li class, lines 3775 - 3778

  • Comment out navbar class, lines 3780 - 3787

  • Open /forum/styles/proboot/theme/bootstrap-responsive.css

  • Comment out padding: 0; line 695

  • Comment out navbar-fixed-top, .navbar-fixed-bottom classes lines 143 - 148

  • Comment out navbar-fixed-top class, lines 687 - 691

  1. Give table headers a gradient

  2. Disable the fixed footer toolbar

    • Open /forum/styles/proboot/template/overall_header.html
    • Comment out <div class="navbar ...> block lines 55 - 77
    • Optionally add any custom footers from the main page before </body>, i.e.



1. Enable php code to be processed by templates engine
* Login to phpBB Administration Control Panel, General Tab, Security Settings, Scroll To Bottom, Allow php in templates, yes, submit

1. Refresh template cache and theme cache:
* Login to phpBB Administration Control Panel, General Tab, Purge Cache, Run Now
* Styles, Themes, proBoot, Refresh

1. Refresh the page and the navbar should be visible.

1. FastCGI/phpBB/nginx caching fix issue [#48](../issues/48) 
```bash
sudo vi  /home/deploy/lmms.io/public/forum/includes/functions_posting.php


Find:

// Instantiate BBCode class
if (!isset($bbcode) && $bbcode_bitfield !== '')
{
   include_once($phpbb_root_path . 'includes/bbcode.' . $phpEx);
   $bbcode = new bbcode(base64_encode($bbcode_bitfield));            
}


Replace with:

// Instantiate BBCode class
if (!isset($bbcode) && $bbcode_bitfield !== '')
{
   if (!class_exists('bbcode'))
   {
      include_once($phpbb_root_path . 'includes/bbcode.' . $phpEx);
   }
   $bbcode = new bbcode(base64_encode($bbcode_bitfield));            
}
Clone this wiki locally