Documentation :: cBB Blockgets


Quick Guide • Requirements

The basic requirements are:
  1. A phpBB forum previously installed, whose version is equal to or greater than 3.2.0.
  2. The browser must support Javascript in order to use and manage the extension.

Quick Guide • Install

  1. Unzip the cBB Blockgets file to a local directory (on your computer).
  2. Upload all the files contained in the upload folder of that file (maintaining the directory structure) to the ext directory located in the root directory of your forum.
  3. Using your web browser, navigate to Admin Panel >> Personalize >> Extensions
  4. Find cBB Blockgets and click on the Enable option.

Quick Guide • Update

  1. Using your web browser, navigate to the Administration Panel and go to Customize >> Extensions, Find cBB Blockgets and click in the Disable option.
  2. Delete the folder blockgets which is within the directory /ext/canidev/ in the server.
  3. Download and unzip the cBB Blockgets zip file in a local folder on your computer.
  4. Upload all files contained in the upload directory in that file (keeping the directory structure) to the ext directory in the root of your forum.
  5. Using your web browser, navigate to the Administration Panel and go to Customize >> Extensions, Find cBB Blockgets and click in the Enable option.

Quick Guide • Uninstall

  1. Using your web browser, navigate to Admin Panel >> Customize >> Extensions.
  2. Find cBB Blockgets and click on the Disable option.
  3. Once disabled, if you want to completely delete it, click on Delete Data and then delete the directory /ext/canidev/blockgets from your server.

Manage cBB Blockgets • Preferences

cBB Blockgets has global preferences with which you can configure the behavior of the extension with respect to the forum.

To handle these and other options, you need to have the necessary permissions.
The forum founder will have these permissions set when installing the extension and can set it for other groups from the "Permissions" section on the ACP.

The main options are found in Administration Panel >> Extensions >> Blockgets >> General Settings and they are:

  1. Blocks within the forum.
    Set how the blocks will be displayed within the forum pages. This option prevails over the individual configuration of each page.
    1. Not show: It does not show blocks on any page.
    2. Individual pages: It shows the blocks on the pages configured for it.
    3. Equal pages: The blocks of the "General Index" page are shown on all pages.
  2. Behavior of the Home page.
    This option allows you to set the behavior of the Home page (Portal). There are 3 options:
    1. Domain Home: This option is only available if the forum is within a subfolder (For example: /forum/) and the server allows route rewriting. It allows users, when accessing the domain, to view the portal without having to enter into that folder.
      For this option to work correctly, both the main directory of the domain and the .htaccess file in this directory (if it exists) have permissions so that the forum can modify them.

      Perform this process manually
      If you do not want to change the permissions mentioned above you can do the process manually.
      To do this, you must perform these steps:
      1. Copy the file {base folder}/{forum directory}/ext/canidev/blockgets/index.bak to {base folder}/blockgets.php
      2. In the copied file (blockgets.php) find the line: $phpbb_root_path = (defined('PHPBB_ROOT_PATH')) ? PHPBB_ROOT_PATH : '{ROOT_PATH}'; And replace {ROOT_PATH} with the path relative to our forum directory. For example, if the forum is in the forum folder the line would look like this: $phpbb_root_path = (defined('PHPBB_ROOT_PATH')) ? PHPBB_ROOT_PATH : './forum/';
      3. Copy the file {base folder}/{forum directory}/ext/canidev/blockgets/htaccess.bak to {base folder}/.htaccess
        If this file already exists, copy only the content, without overwriting the entire file.
      Once these steps are done, go to the extension settings and choose the option "Domain Home"
    2. Forum Home: Displays the portal as the main page when entering the forum instead of the "General Index" displayed by default.
    3. Forum secondary page: The "General Index" remains the main page when entering the forum, the portal remains as a secondary page.
  3. Allow collapse blocks.
    This option shows or hides the option of collapsing blocks, thus preventing users from collapsing. This option overrides the individual settings for each block.
  4. Adapt blocks automatically.
    With this option you can set whether the blocks will be presented the same regardless of the column in which they are, or if, on the contrary, their content will be adapted depending on the type of column.
  5. Show quick access bar.
    If enabled, a bar will be displayed at the top of the forum that will allow you to quickly access the options of the page you are on.
  6. Reset visit counter.
    With this option the counter is reset globally. Setting the number of visits to 0 and the start date of the counter on the current date.


It also has certain additional options found in Administration Panel >> Extensions >> Blockgets >> Additional Configuration

  1. Resize images
    This function is mainly used to avoid blocking the blocks, adjusting the size of the images.
    It can also be adjusted to resize the images of the messages of the forum, provided that this page has been activated in the configuration of the pages.
  2. Calendar
    From here the calendar's characteristics are controlled, in its personalized page (Ex: http://yourforum.com/calendar)
    Attention: If you disable the calendar from these options will not work in the blocks either.
  3. Redirects
    It controls the pages to which the users will be redirected at certain occasions.
    In this version you can choose the page when a user login, when logout and also when accessing a page that does not exist, being able to choose between any of the pages added to the extension.

Manage cBB Blockgets • Manage calendar and events

This version of cBB Blockgets includes a calendar that can be accessed through your custom page (eg: http://yourforum.com/calendar) or through the "calendar" block. In this calendar you can add events that will be displayed on their respective days.
For more information on Managing Blocks, see Manage Blocks.

To add a new event you can do it by clicking on the button that appears when you hover over a day of the month.
To add a new event from the calendar block, you must click on the desired day and then on the "Add Event" button.

To edit or delete an event, you must click on the desired event. In the dialog that appears, in addition to displaying the content of that event, the buttons to edit/delete appear.

Note: To access calendar options you must have the necessary permissions.

Manage cBB Blockgets • Manage Pages

cBB Blockgets allows you to manage a Home Page (Portal), but also allows you to also set options for the pages belonging to the forum, as well as create custom pages (from scratch).

All pages are managed from Administration Panel >> Extensions >> Blockgets >>Pages and Blocks.
To create a new page, you only need to select the type of page you want to create and click on New Page. In the screen that shows, the general options of the page can be established.

These options are:
  1. Page enabled. Enable or disable the page completely. This option overwrites all others.
  2. Page alias. You can set an alias (letters, numbers and dashes) to use in the url of this page. If you leave this field blank, a separate page will be created and the ID will be used as an alias.
  3. Page Title. Sets the title to display in the browser.
    In the forum pages you can leave this field blank to use the default title.
  4. Groups. Defines the groups of users that can view this page. Multiple groups can be selected using the Ctrl key on the keyboard.
  5. Filters. Defines the necessary parameters (GET and POST) for the page to be loaded.
    For more information check Set filters on pages.
  6. Show header. Allows you to define whether to display the forum header on the page.
  7. Show footer. Allows you to decide whether to display the default content at the bottom of the page.
  8. Logo. Lets you set a different logo for the page. If left blank, the default logo will be used.
  9. Theme. Allows you to select the appearance of the page. The available options are:
    1. Define background. Set a color (white, #FFFFFF) or image (http://mydomain.com/picture.jpg) as the background of the page.
    2. Define Style. Allows you to define which style (of those installed in the forum) will display the page.
    3. Custom theme. With this option you can set one or more * .css files to style the page (each file must be set to one line). You can also directly set the CSS text to be used.
  10. Left column. Left column width, in pixels or percentage. If 0 is specified, the column will be disabled.
    The recommended value is 200px.
  11. Right column. Right column width, in pixels or percentage. If 0 is specified, the column will be disabled.
    The recommended value is 200px.
  12. Space between blocks. Set the separation (in pixels or percentage) between blocks.
  13. Link position. et the forum zone where a link to the page will appear.
  14. Link icon. Allows you to set an icon for the link defined in the previous option.

Some of the options mentioned are only available on a specific type of page, so they may not all appear in certain cases.

Manage cBB Blockgets • Manage Blocks

cBB Blockgets allows you to set infinite blocks in both predefined and custom pages, which can be set to the desired location.

Each block has its own custom configuration, so you can repeat the same type of block but with other options within the same page.

Blocks are managed from Administration Panel >> Extensions >> Blockgets >> Pages and Blocks.

To add a new block you only need to click on Add block. A menu will be displayed with all available blocks.
By moving the mouse over each block, you can see a small description of it.
To add it you only have to drag it to the column you want. In the page that is shown on drag it you will be able to establish the general options of the block, as well as the additional options that each block can have.

The general options are:
  1. Block title.
    The title of the block, which will be displayed in the header of this.
  2. Block icon.
    The current icon of the block, if defined.
  3. Groups.
    Define which groups will be able to see the block. You can select as many as you want using the Ctrl key on your keyboard.
    With this option you can generate dynamic pages, with different content depending on the group in which the user who is viewing it.
  4. Block enabled.
    Defines whether the block is enabled. It is possible to deactivate a block without deleting it completely, so that it is not visible but not lose its configuration.
  5. Allow block collapse.
    It allows to decide if the users will be able to hide the content of this block or not and their initial status. This option is overwritten with the general Allow block collapse option of the extension.
    1. Not allow: Users will not be able to collapse the block.
    2. Allow (displayed by default): Users will be able to collapse the block. By default it will be displayed.
    3. Allowed (collapsed by default): Users will be able to collapse the block. By default it will show collapsed.
  6. Appearance of the block.
    This option allows you to define a different style for each block. You can use the default style, alternate style (if the style installed in the forum allows it), display only the content and title, or display only content.

Once all the blocks are created, from the block management page, you can see how they will be located and change their order and/or the column in which they are by simply dragging them to the desired position.

Some functions of the blocks, such as "Activate", "Deactivate" and "Delete", can be done in bulk by marking the desired blocks.

Blocks can be copied and moved between pages. It is only necessary to mark the desired blocks, click on the "Copy" or "Move" option and select the destination page.
The blocks copied or moved will each be placed in its respective column, at the end of it.

Groups:
Groups are used to create additional columns within a given area. They can be added at the top, center and bottom.
Within these groups you can drag as many blocks as you want, but at most they will have three columns. This means that if you add 3 or fewer blocks to a group, the number of columns will be adjusted to the number of blocks. However, if you add more than 3 blocks it will fit to 3 columns and leftover blocks will be placed in additional rows.

To add a group just drag the button to the desired area.

Manage cBB Blockgets • Set filters on pages

The filters are used to having complete control over the pages and decide which environments or situations will be loaded. These filters are configured through a page parameters obtained at the time of its charge. There are two kinds of parameters:
  1. GET: These parameters are defined directly in the URL of the page.
  2. POST: These parameters are set via a form from another page.

We see an example.
Suppose we want to put a block on the login page to users. The login page uses the "ucp.php" file so, if you create a page on this file, the block appears in the login, but also on all pages use the "ucp.php" file (User Control Panel, registry, etc. ..)
To avoid this and just load the block only in the login we use the filters.

The login page of a phpBB3 forum is like this: http://mydomain.com/forum/ucp.php?mode=login "Parameters" are considered the content located after "?" (in this case mode=login) and these parameters are we will use for the filters.
If when you create the page establish a filter type GET with content "mode=login" we may all blocks of that page is loaded only on the login page.

There are three ways to set a filter:
  1. Full: Sets the variable and the value it should have. Example, filter GET "mode=login"

    http://mydomain.com/forum/ucp.php?mode=login (loaded)
    http://mydomain.com/forum/ucp.php?mode=otromodo (no load)
    http://mydomain.com/forum/ucp.php (no load)
  2. Simple: Sets only if a variable exists, ignoring their value. Example, filter GET "mode"

    http://mydomain.com/forum/ucp.php?mode=login (loaded)
    http://mydomain.com/forum/ucp.php?mode=otromodo (loaded)
    http://mydomain.com/forum/ucp.php (no load)
  3. Negated: We define a variable, preceded by "!". This ensures just the opposite, that the page is loaded when the variable is not present. Example, filter GET "!mode"

    http://mydomain.com/forum/ucp.php?mode=login (no load)
    http://mydomain.com/forum/ucp.php?mode=otromodo (no load)
    http://mydomain.com/forum/ucp.php (loaded)
This works for both GET and POST parameters and can combine multiple filters to a single page. For example:
If we show a block on the registration page, but not on the page accepting the terms of use, we use a POST filter combined with a GET filter.

Consider URL: http://mydomain.com/forum/ucp.php?mode=register
The first to appear are the terms of use (where we do not want our block appears) and once accepted leads to the registration page.
This form provides the parameter "agreed" once the terms are accepted and we will use this parameter.
In our page we use a GET filter (mode=register) combined with the POST filter (Agreed) to forcing the page to be loaded only when both parameters are present.