Adapt cBB Blockgets to a forum pages

  5 / 5 (3 Votes)
Usually, to adapt cBB Blockgets to a forum page, you only need to make changes as indicated in the Online Guide.

But there are exceptions such as the User Control Panel (UCP) and the Moderation Panel (MCP).
To include cBB Blockgets in these pages is necessary to perform more changes than usual and in more files.

In this tutorial we will use the User Control Panel (UCP) as an example, we will build on Prosilver (although changes in subsilver2 are similar).

Before you begin, we consider the structure of the template file that uses the User Control Panel (ucp.php).

The resulting page consists of:
  1. A header file. ucp_header.html
  2. A footer file. ucp_footer.html
  3. The different files of the body of the page. In this case all files are all style files that start with ucp_.


To adapt the mod to page ucp.php we have to make changes in all the above files.
The changes to be made are as follows:

ucp_header.html
  1. Find: <h2>{L_UCP}</h2>
  2. After add: <!-- IF BLG_ON_BOARD --><!-- INCLUDE blockgets/board_top_body.html --><!-- ENDIF -->
    <!-- IF not BLG_ON_BOARD or DISPLAY_FORUM_BLOCK -->
  3. Find: <div id="cp-main" class="ucp-main">
  4. After add: <!-- ENDIF -->
ucp_footer.html
  1. Find:         </div>
        <div class="clear"></div>
  2. Before add: <!-- IF not BLG_ON_BOARD or DISPLAY_FORUM_BLOCK -->
  3. Find: <!-- INCLUDE jumpbox.html -->
  4. After add: <!-- ENDIF -->
    <!-- IF BLG_ON_BOARD --><!-- INCLUDE blockgets/board_bottom_body.html --><!-- ENDIF -->
All files in the body of the page. (ucp_*****.html)
Note: In this adaptation we exclude the files that do not have the lines indicated to find.

  1. Find: <!-- INCLUDE ucp_header.html -->
  2. After add: <!-- IF not BLG_ON_BOARD or DISPLAY_FORUM_BLOCK -->
  3. Find: <!-- INCLUDE ucp_footer.html -->
  4. Before add: <!-- ENDIF -->

Note: After completing the changes you need to clean the cache of the forum for the changes to take effect.

Then only we will add the ucp.php page from mod options:
ACP >> Blockgets >> Manage pages >> New page






Comments


Write comment