Documentation :: cBB Blockgets v1.0.4

Quick Guide • Requirements

cBB Blockgets needs very few requirements to run correctly.

The basic requirements are:
  1. A phpBB forum whose version is greater than 3.0.8 (3.0.11 is recommended).
  2. The getimagesize() function must be enabled.
  3. The Javascript must be enabled on your browser to manage and use the mod.

Quick Guide • Install

If you already have basic knowledge of FTP and are sure that your system will run smoothly cBB Blockgets, just follow these simple steps to install it.

  1. Unzip the cBB Blockgets zip file in a local folder on your computer.
  2. Upload all files contained in the root directory (keeping the directory structure) to your server or hosting account.
  3. Make changes into phpBB files as indicated in the file "install.xml"
  4. Set writable permissions to the folder /blockgets/images/upload/ with your FTP client (chmod 777)
  5. Using your web browser visit the location you placed phpBB3 adding "/blockgets/install/"
  6. Click the Install button and follow the steps and fill out all the requested information.
  7. cBB Blockgets should now be available.
If you experienced problems or do not know how to proceed with any of the steps above, you can put your problem in the correct section of this web forum and we help you to solve the problem.

Quick Guide • Uninstall

cBB Blockgets can be uninstalled in a few steps:

  1. Using your web browser visit the location you placed phpBB3 adding "/blockgets/install/",
  2. Click on the "Uninstall" button and follow the steps and fill out all the requested information.
  3. When finished, You have to edit the phpBB files following the steps of "install.xml" file, but in reverse, to remove the mod code. This is not essential, the forum works well even if you don't delete the mod codes.

Quick Guide • Update

To update cBB Blockgets from a oldest version follow this steps:

  1. Unzip the cBB Blockgets zip file in a local folder on your computer.
  2. Upload all files contained in the root directory (keeping the directory structure) to your server or hosting account.
  3. Make changes into phpBB files as indicated in the file "/contrib/update/1.0.x_to_1.0.4/update.xml"
  4. Using your web browser visit the location you placed phpBB3 adding "/blockgets/install/"
  5. Click the Update button and follow the steps and fill out all the requested information.
The version 1.0.4 does not use edits in styles so, to update the styles you must:
  1. Delete the mod files of the earlier version of this mod in all styles.
  2. Delete the editions of earlier version of this mod in all styles.

Manage cBB Blockgets • MOD preferences

cBB Blockgets provides global preferences with which you can configure the behavior of the mod.

To handle these options and others in the mod, you must have the necessary permissions.
The founder of the forum will set those permissions after install the mod and can set it to other groups from the section "Permissions" of Administration Control Panel.

The main options are in Administration Control Panel >> Blockgets >> General and are:

  1. Mod enabled.
    This option sets whether the mod and all its functions will be active or not.
  2. Blocks within the forum.
    Enabling this option can add blocks to the forum pages.
  3. Home page as site main page.
    This option sets the home page as the default page to enter the domain, overwriting the General Index which is usually the default page.
  4. Allow collapse blocks.
    This option shows or hides the option to collapse in blocks, thus preventing the collapse from users. This option overrides the individual configuration of each block.
  5. AutoFit Blocks.
    This option can be set if the blocks are presented equally regardless of the column in which they are, or whether on the contrary, its contents will be adapted to the type of column.
  6. Hit counter.
    From here you can set general options for the main visitors counter.
    1. Counter interval.
      Minimun time (in secondes) to wait to see the user as a "new visit", and counted it.
    2. Reset hit counter.
      This option resets the counter globally. Establishing the number of visits to 0 and the counter start date at the current date.
  7. Resize images.
    From here you can configure the maximum size of the images shown within the block pages. Useful to avoid the mismatch of the blocks. (Clicking on the images can be viewed at real size)
    1. Resize enabled.
      This option enables or disables the size limit for "img" tags and attachments.
    2. Resize images in posts.
      This option lets you decide if resizing affect forum posts. (Useful if you have another mod resize and do not want to use this mod).
    3. Images max size.
      The maximum size for images. All exceeding this size will be resized.
    4. Avatar size.
      The maximum size allowed for avatars. If specified 0, will be used the value set to the images.

Manage cBB Blockgets • Manage calendar and events

This version of cBB Blockgets includes a "calendar" block that lets you add events to display on the calendar days.
For more information about manage the blocks see Manage cBB Blockgets • MAnage Blocks.

To have access to this option, you must have the necessary permissions (default only has this leave the role of "full user").
To add or edit events you can do it from the Manage Events and Add Event options that found in the dialog of events, clicking on calendar day.
You can also access this screen by the url /blockgets/calendar.php. For example:

Manage cBB Blockgets • Manage Blocks

cBB Blockgets cBB Portal allows set endless blocks on predefined and custom pages tanto, that may be established in the place you want.

Each block has its custom settings, so you can repeat the same type of block but with diferent options in the same page.

The blocks are managed from Administration Control Panel >> Blockgets >> Manage Blocks.
To add a new block only needs click on Add block and select the block you want.
On the page that appears, you may set general options for the block and additional options that each block may have.

The general options are:
  1. Block title.
    The title of the block to be displayed in the header of this.
  2. Block icon.
    The current icon that has the block, if defined.
  3. Groups.
    Define which groups will see the block. You can select as many as you wish using the Ctrl key on the keyboard.
    With this option you can generate dynamic pages with different content according to the group that the user is viewing it.
  4. Block enabled.
    Defines whether the block is activated or not. You can disable a block without removing it completely, so it is not visible but do not lose it settings.
  5. Allow collapse the block.Enable or disable the ability for each user to collapse/expand this block. This option is overwritted by the general option Allow collapse blocks in the main page of the configuration.
  6. Look of the block.With this option you can choose the look of each block individually. Can use the default style, the alternate style (if the board style allowed it), show only the content and block title or show only the content.
  7. Block position.
    Defines the column that will position the block, adding at the end of it, after the column blocks.
    This option is only available when adding a new block.

Once created all the blocks, from the block administration page, You can see how be placed and change their order and/or column where are located dragging them to the desired position and clicking on "Save block position".

Some block functions as "Enable", "Disable" or "Delete", can do in masive mode by mark the desired blocks.

The blocks can be copy or move between the pages. Only is neccessary mark the desired blocks, click on "Copy" or "Move" option and select the target page.
The copied or moved blocks will be placed on the end of it respective columns.

Manage cBB Blockgets • Manage Lists

The lists contain the banners, links or images that are subsequently used in the blocks. Each block makes a different use of the lists according to the information it needs.
You can create as many lists as you need and integrate on them all the necessary elements.

To create a new list just need to click on "New List" and enter the name of the list.
Once created, you can add banners, links or pictures to the list by clicking on the link Edit of the list.

To add an item, you must first click on "New Item", which will take you to a new section, where we introduce a set of data:

  1. Type.
    You can choose between Category and link. One category is like the head of a series of links, can be used to separate a menu into different "blocks".
  2. Title.
    The text to be displayed as a title.
  3. Description.
    Text to be displayed in some blocks as additional information of the link.
  4. Link.
    Sets the direction that opens when you click the item. You must specify the full address (url) including http://. If left blank, a few blocks use the image as a link element.
  5. Image.
    The image has the element, if defined.
  6. Groups.
    Define the groups that may view this item. You can select multiple groups using the Ctrl key of your keyboard.
    This helps to create dynamic menus with different options depending on the group to which the user who displayed.

Once all elements created, from the edit page of the list you can see and modify the order, simply dragging them to the correct position and click on "Save elements position."

Manage cBB Blockgets • Manage Pages

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

All pages are managed from Administration Panel >> Blockgets >> Manage Pages.
To create a new page, you just need to click on New page button. In the screen that appears, you can set general options of the page.

The general options are:
  1. Manage page
    1. Page enabled. Enables or disables the page completely. This option overrides all others.
    2. Page file. Defines the file that will be load this page. If you select Custom Page will create a separate page to the forum.
      This option is only available when creating a new page.
    3. Page alias. You can set the path to a file (relative to the forum) to use, or an alias (letters, numbers and dashes) to create a separate page. If you leave this field blank, it will create a separate page and the ID will be used as the alias.
      This option is only available for custom pages.
    4. Page title. Sets the title to be displayed in the browser.
      In forum pages you can leave this field blank to use the default title.
    5. Groups. Define the groups of users who can view this page. You can select multiple groups using the Ctrl of your keyboard.
    6. Filters. Sets the required parameters (GET and POST) for the page is loaded.
      For more information see Advanced Configuration • Set filters to the pages.
    7. Show header. Set whether the head of the forum page is displayed.
    8. Logo. Lets set a different logo for the page. If left blank the default logo will be used.
    9. Theme. Select the appearance of the page. The available options are:
      1. Set background. Lets you set a color (white, # FFFFFF) or an image ( as page background.
      2. Set style. Lets you define which style (of which are installed on the forum) will use the page.
      3. Custom theme. With this option you can set one or more files. * Css to give style to the page (one file per line). You can directly set the CSS text to be used.
  2. Column options
    1. Allow hide lateral columns. If enabled, users can show or hide the side column of this page. Columns are hidden sideways adjusting the width of the central content.
    2. Left column. Left column width in pixels. If 0 is specified, the column is disabled. The recommended value is 190.
    3. Right column. Right column width in pixels. If 0 is specified, the column is disabled. The recommended value is 190.
    4. Responsive width. Sets the minimum wider than can have the page. If this value is exceeded, the behavior of the side columns shifting, overlapping on the central content instead of taking space. Set 0 to disable this feature.
    5. Block spacing. Lets you set the spacing (in pixels) between the blocks.

Manage cBB Blockgets • Manage Plugins

Plugins are small complements that can be used both to add compatibility between cBB Blockgets with another mod to add small changes to the forum without editing templates and using the cBB Blockgets structure.
All plugins are available on this website for download.

To install a new plugin just follow these steps:
  1. Unzip the plugin package to a local directory (on your computer).
  2. Upload all files in the root directory (keeping the directory structure) to your server or hosting account.
  3. Form the Administration Panel >> Blockgets >> Manage Plugins page locate the plugin uploaded and click on "Install".
Once installed, the plugin can be disabled or uninstalled at any time and, in addition, you can set your settings (if pugin requires additional configuration).

Advanced Configuration • Change the homepage directory

You can change the folder and filename of "home.php" file to run the home page from another directory.
To achieve this, you just have to make a few simple steps:
  1. Move the file "home.php" to the directory you want (relative to the forum) and rename the file if desired, for example, to "index.php".
  2. Open the file you just moved, and find this line:
    $phpbb_root_path = (defined('PHPBB_ROOT_PATH')) ? PHPBB_ROOT_PATH : './';
    and replace ./ y path of the forum, relative to the file.
  3. Open the "includes/hooks/hook_blockgets.php" file and find:
    //$blockgets->set_home('Home filename (home.php)', 'Directory relative to the forum path (./)');
    and replace "Home filename (home.php)" for the name of the moved file and "Directory relative to the forum path (./)" for the path where the moved file is placed (Relative to the forum).
    After, delete "//" from the line.

    For example, if the forum is in and want to place the file "home.php" in ( the result would be:

    File to move (home.php)
    $phpbb_root_path = (defined('PHPBB_ROOT_PATH')) ? PHPBB_ROOT_PATH : './forum/';
    File "includes/hooks/hook_blockgets.php"
    $blockgets->set_home('index.php', '../');

Advanced Configuration • Create custom pages

For default, cBB Blockgets loads all the custom pages using "home.php" file but, you can create a separate file for each custom page.
To achieve this, you only need a few easy steps:
  1. Create a copy of the file "home.php" renaming it with the name you want.
  2. Open the file you just created, and find this line:
    //$blockgets->set_page('put here alias or id of the page');
    Replace 'put here alias or id of the page' by numerical ID or alias (if defined) of the page you want to display.
    After, delete "//" from this line.
For example, to display a page whose alias is "page_1" the result is:

Advanced Configuration • Set filters to the 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: "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" (loaded) (no load) (no load)
  2. Simple: Sets only if a variable exists, ignoring their value. Example, filter GET "mode" (loaded) (loaded) (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" (no load) (no load) (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:
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.