Documentation :: cBB Blockgets v1.0.3


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 that file (keeping the directory structure) to your server or hosting account.
  3. Make changes into phpBB files as indicated in the file "install.xml"
  4. Using your web browser visit the location you placed phpBB3 adding "/blockgets/install/"
    Examples:
    http://www.mydomain.com/phpBB3/blockgets/install/
    http://www.mydomain.com/forum/blockgets/install/
  5. Click the Install tab and follow the steps and fill out all the requested information.
  6. 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, where it will help as we can.

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/",
    Examples:
    http://www.mydomain.com/phpBB3/blockgets/install/
    http://www.mydomain.com/forum/blockgets/install/
  2. Click on the "Uninstall" tab 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 • 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 http://mydomain.com/forum/ and want to place the file "home.php" in http://mydomain.com/index.php (http://mydomain.com/) 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', '../');

Quick Guide • 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:
$blockgets->set_page('page_1');

Quick Guide • Adapt cBB Blockgets to other pages on the forum

cBB Blockgets offers the possibility of including blocks on all pages on the forum.
By default, the only pages adapted to this are "index", "viewforum" and "viewtopic".

To add other pages only need a few easy steps:
  1. Go to Administration Control Panel >> Blockgets >> Manage Pages >> New page and create a new page by selecting the file that you want to use.
  2. Open the template of the style that relates to the selected file. For example, if choose index.php as file, the template to edit be styles/{the style}/template/index_body.html
  3. Add this code before the main content, where you want to start the blocks.
    <!-- IF BLG_ON_BOARD --><!-- INCLUDE blockgets/board_top_body.html --><!-- ENDIF -->
    <!-- IF not BLG_ON_BOARD or DISPLAY_FORUM_BLOCK -->
  4. Add this code after the main content, where you want to end the blocks.
    <!-- ENDIF -->
    <!-- IF BLG_ON_BOARD --><!-- INCLUDE blockgets/board_bottom_body.html --><!-- ENDIF -->
  5. Go to Administration Control Panel >> General and clear the cache.
Note: The content that is between the codes of steps 3 and 4 appear in the center column. The rest of the content will appear above or below (of all columns).

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.

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: http://mydomain.com/forum/blockgets/calendar.php.

Manage cBB Blockgets • Manage Banners

The banners, which later will be available for use in all blocks that use them, are managed from Administration Control Panel >> Blockgets >> Manage Lists >> Manage Banners.

The banners are grouped into lists for a better organization.
You can create as many lists as you need and integrate into each the banners you needed.

To create a new list you only need enter the name of the list and click on "New list".
Once created, you can add the banners, clicking on the "edit" icon on the list.

From the edit page you can change the name of the list and also add the banners that will be part of it.
To add a new banner, the first thing is click o "Add banner", which will lead to a new section, where you must introduce a few data:

  1. Banner description.
    Text, usually small, which describes the banner or page associated with this.
  2. Banner URL.
    Sets the direction to be opened by clicking in the banner. You must specify an complete address (url), including http://
  3. Actual image.
    The current image of the banner, if defined.
  4. New image.
    Sets the banner image or substituted if the link already has one.

Once created all banners, from the edit page of the list, you can see and modify the order of the links. Simply dragging them into correct position and clicking "Save banner position".

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. Actual image.
    The current icon of the block, if defined.
  3. New image.
    Sets the block icon or substituted if the block already has one.
  4. 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.
  5. 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.
  6. 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.
  7. 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.
  8. 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 move between the pages. Only is neccessary mark the desired blocks, click on "Move" option and select the target page.
The moved blocks will be placed on the end of it respective columns.

Manage cBB Blockgets • Manage Menus

The menus, which later will be available for use in all blocks that use them, are managed from Administration Control Panel >> Blockgets >> Manage Lists >> Manage Menus.

The menus are grouped into lists for a better organization.
You can create as many lists as you need and integrate into each the menus you needed.

To create a new list you only need enter the name of the list and click on "New list".
Once created, you can add the menu items, clicking on the "edit" icon on the list.

From the edit page you can change the name of the list and also add the links that will be part of it.
To add a link, the first thing is click on "Add Link", which will lead to a new section, where you introduce a few data:

  1. Link type.
    You can choose between category and link. A category is like the head of a series of links, can be used to separate a menu in different "groups".
  2. Link title.
    The text to be displayed as a title.
  3. Link URL.
    Sets the direction to be opened by clicking the link. You must specify an complete address (url), including http://
  4. Actual image.
    The current image of the link, if defined.
  5. New image.
    Sets the link image or substituted if the link already has one. This image shows where the link is placed, depending on the block type.
  6. Groups.
    Define the groups will see this link. You can select multiple by using the Ctrl key on the keyboard.
    This helps to create dynamic menus with different options depending on the group to which the user who displayed.
  7. Open in new window.
    Sets whether the link will open in the same or new page.

Once created all links, from the edit page of the list, you can see and modify the order of the links. Simply dragging them into correct position and clicking "Save links position".

Manage cBB Blockgets • Manage Pages

cBB Blockgets allows to manage a Home Page, but also, allows to set options for the board pages and custom pages.

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

The general options are:
  1. Manage page
    1. Page enabled. Enable or disable the page functions completely. This option overrides all others.
    2. Page file. Defines the forum file to load the settings of the page. If select Custom Page you will created an independent page from the forum.
      To adapt this mod a new forum pages, you must read this guide.
      This option only allowed if you create a new page.
    3. Page alias. Sets the internal name of the page. This name is used as id in the URL. In this field only letters, numbers and dashes are allowed.
      This option only allowed for custom pages.
    4. Page title. Sets the title will be displayed on the browser.
      This option only allowed for custom pages.
    5. Groups. Choose groups who can see the blocks of this page. You can select multiple groups using Ctrl key on your keyboard.
    6. Show header. This option lets you decide whether to display the forum header on this page.
    7. Page background. Each page can be configure with a different background. In this field you can set a colour (Ex: white, #FFFFFF) or an image (Ej: http://mydomain.com/image.jpg).
    8. Allow collapse lateral columnsIf enabled, the users can expand/collapse the lateral columns in this page. The with of center column will be adjusted automatically.
  2. Options for the columns
    1. Left column.Left column width, in pixels. If set to 0, the column will be disabled. The recommended value is 180.
    2. Right column.Right column width, in pixels. If set to 0, the column will be disabled. The recommended value is 180.
cron