Advertisement:

Navigation

SMF Mod Site

Mod Name:
Custom blocks
Created By:
davidhs
Type:
New Feature
First Created:
May 08, 2013, 08:57:07 AM
Last Modified:
October 01, 2015, 04:17:55 PM
Latest Version:
2.4
Compatible With:
1.1.18, 1.1.19, 1.1.20, 1.1.21, 2.0.4, 2.0.6, 2.0.7, 2.0.8, 2.0.9, 2.0.10, 2.0.11
Total Downloads:
2771

Download this mod

CustomBlocks_1.0.tar.gz (8kB) [423]
CustomBlocks_2.0.tar.gz (17kB) [167]
CustomBlocks_2.1.tar.gz (19kB) [234]
CustomBlocks_2.2.tar.gz (19kB) [190]
CustomBlocks_2.3.tar.gz (20kB) [446]
CustomBlocks_2.3.1.tar.gz (20kB) [297]
CustomBlocks_2.3.2.tar.gz (20kB) [425]
CustomBlocks_2.4.tar.gz (22kB) [564]
Manual Install Instructions for SMF

Description:

Custom blocks

ABOUT...

Custom blocks, 2.4
© 2013-2015 by davidhs
© Polish language 2014-2015 by FishingManMatt


This work is licensed under a Creative Commons Attribution 3.0 Unported License.

DESCRIPTION

Allows to show custom blocks:
  • Above the forum header.
  • Instead of default header of forum.
  • Below the forum header.
  • Above the forum footer.
  • Instead of default footer of forum.
  • Below the forum footer.

Can be define any number of blocks through several parameters:
  • Frame: HTML code with attributes for DIV tag which skirts the content of the block. If left empty is not put DIV tag. Through style or class attributes (CSS styles and classes) may indicate position, size and others characteristics of the block.
  • Type: A block can contain HTML code (the default option), BBC or PHP.
  • Content: Content of the block. Position, size and others characteristics of the block may be indicated here or in frame. Can be used the following variables:
    • {COPYRIGHT} - Copyright of the forum.
    • {BOARDURL} - URL to forum folder.
    • {SCRIPTURL} - Web address of forum.
    • {IMAGES_URL} - URL to the images folder in the users current theme.
    • {DEFAULT_IMAGES_URL} - URL to the images folder in the default theme.
    Variable {COPYRIGHT} must be on some block of forum footer. If it is not, will be create a block with the text of copyright.
  • Order: Position of the block in relation to the other blocks from left to right.
  • Permissions: Indicates the user group that can see the block. By default none.
  • Active: Indicates if a block is active. By default active.

     

EXAMPLE

Quote
Blocks above the forum header

Frame: style="height: 50px; border: 5px solid red;"
Type: BBC
Content: [size=12pt]Block above the header[/size] [color=red]- Block above the header - Block above the header[/color]
Order: 1
Permissions: Guest:View, User:View, Local moderator:View, Global moderator:View, Administrator:View
Active: Yes

Blocks in the forum header

Frame: style="float: left; width: 250px; height: 50px; border: 5px solid red;"
Type: HTML
Content: <span style="font-size: 12pt;">Block header 1</span> <span style="color: red;">- Block header 1 - Block header 1</span>
Order: 1
Permissions: User:View, Local moderator:View, Global moderator:View, Administrator:View
Active: Yes

Frame: style="float: left; width: 10%; height: 50px; border: 5px solid red;"
Type: BBC
Content: [size=12pt]Block header 2[/size] [color=red]- Block header 2[/color]
Order: 2
Permissions: User:View, Local moderator:View, Global moderator:View, Administrator:View
Active: Yes

Frame: style="float: center; height: 50px; border: 5px solid red;"
Type: PHP
Content: $bl = 'Block header 3';
echo '<span style="font-size: 12pt;">', $bl, '</span> <span style="color: red;">- ', $bl, ' - ', $bl, '</span>';

Order: 4
Permissions: User:View, Local moderator:View, Global moderator:View, Administrator:View
Active: Yes

Frame: style="float: right; width: 150px; height: 50px; border: 5px solid red;"
Type: BBC
Content: [size=12pt]Block header 4[/size] [color=red]- Block header 4[/color]
Order: 3
Permissions: User:View, Local moderator:View, Global moderator:View, Administrator:View
Active: Yes

Frame: style="height: 50px; border: 5px solid red;"
Type: BBC
Content: [size=12pt]Block header guest[/size] [color=red]- Block header guest - Block header guest[/color]
Order: 1
Permissions: Guest:View
Active: Yes

Blocks below the forum header

Frame: style="height: 50px; border: 5px solid red;"
Type: BBC
Content: [size=12pt]Block below the header[/size] [color=red]- Block below the header - Block below the header[/color]
Order: 1
Permissions: Guest:View, User:View, Local moderator:View, Global moderator:View, Administrator:View
Active: Yes

Blocks above the forum footer

Frame: style="height: 50px; border: 5px solid red;"
Type: BBC
Content: [size=12pt]Block above the footer[/size] [color=red]- Block above the footer - Block above the footer[/color]
Order: 1
Permissions: Guest:View, User:View, Local moderator:View, Global moderator:View, Administrator:View
Active: Yes

Blocks in the forum footer

Frame: style="float: left; width: 33%; height: 50px; border: 5px solid red;"
Type: HTML
Content: <span style="font-size: 12pt;">Block footer all</span> <span style="color: red;">- Block footer all - Block footer all</span>
Order: 1
Permissions: Guest:View, User:View, Local moderator:View, Global moderator:View, Administrator:View
Active: Yes

Frame: style="float: right; width: 50%; height: 50px; border: 5px solid red;"
Type: BBC
Content: [size=12pt]Block footer user[/size] [color=red]- Block footer user - Block footer user[/color]
{COPYRIGHT}

Order: 2
Permissions: User:View, Local moderator:View, Global moderator:View, Administrator:View
Active: Yes

Frame: style="float: right; width: 200px; height: 50px; border: 5px solid red;"
Type: PHP
Content: $bl = 'Block footer guest';
echo '<span style="font-size: 12pt;">', $bl, '</span> <span style="color: red;">- ', $bl, ' - ', $bl, '</span>';

Order: 2
Permissions: Guest:View
Active: Yes

Blocks below the forum footer

Frame: style="height: 50px; border: 5px solid red;"
Type: BBC
Content: [size=12pt]Block below the footer[/size] [color=red]- Block below the footer - Block below the footer[/color]
Order: 1
Permissions: Guest:View, User:View, Local moderator:View, Global moderator:View, Administrator:View
Active: Yes

Users, moderators and administrators see this:

Guests see this:

SMF COMPATIBILITY

  • SMF 1.1 to 1.1.21.
  • SMF 2.0 to 2.0.11.

This MOD is installed without errors in default theme and similars. For others themes is necessary to make changes at hand:

LANGUAGES

  • english, english_british.
  • polish (incomplete).
  • spanish, spanish_es, spanish_latin.

If you want help translating it into other languages, you can add the translation in http://www.simplemachines.org/community/index.php?topic=506711.0

DOWNLOAD

Link to MOD

MANUAL INSTALLATION

See http://wiki.simplemachines.org/smf/Manual_installation_of_mods

SUPPORT AND COMMENTS

In English: http://www.simplemachines.org/community/index.php?topic=506711.0
In Spanish: http://www.simplemachines.org/community/index.php?topic=503400.0

CHANGE LOG

Code: [Select]
Legend:   ! Fixed   + Added   - Removed   * Changed   @ Note

2.4     2015-05-15
------------------
+ Field in administration panel to edit the position of the block.
+ Languages: polish, polish-utf8, thanks to FishingManMatt.
+ SMF compatibility: 1.1.21 and 2.0.10.

2.3.2   2014-10-08
------------------
+ SMF 1.1.x: Implemented a generic form of displaying lists, similar to SMF 2.0.x.
+ SMF compatibility: 1.1.20 and 2.0.9.

2.3.1   2014-06-24
------------------
! Use HTML entities in ISO-8859-1 languages.
+ Functions to get/update/delete data check the parameters before using them.
* Big multi-line text input fields are wider.
* Submit buttons have shortcut key to get focus.
+ SMF compatibility: 2.0.8.

2.3     2014-01-25
------------------
+ Upgrade code to the configuration variables from versions 2.1-2.2 to 2.3.
* Permissions for local moderator and global moderator instead of moderator.
+ Checkbox to select all users of permissions.
+ SMF compatibility: 2.0.7.

2.2     2013-12-20
------------------
! SMF 2.0.x: Functions of administration area must return settings variables for the Quick Search of the Administration Center.
+ SMF 2.0.x: The Quick Search of the Administration Center look for in settings variables of MOD.
+ Variable in content of the block to insert URL to forum folder.

2.1     2013-11-02
------------------
! There was a PHP error when the list of blocks was empty.
! Error in source code.
+ Upgrade code to the configuration variables from version 2.0.x to 2.1.
+ Field to indicate if a block is active.
+ Custom blocks above and below the forum header and above and below the forum footer.

2.0     2013-10-23
------------------
! SMF 2.0.x: Integration hooks functions parameters must be passed by reference.
! If user does not have permission to view any block of forum header (or footer), default forum header (or footer) must be displayed.
+ Upgrade code to the configuration variables from version 1.x to 2.0.
+ Variable in content of the block to insert web address of forum.
+ Variable in content of the block to insert url to the images folder in the users current theme.
+ Variable in content of the block to insert url to the images folder in the default theme.
* Permissions for user, moderator and administrator instead of user (not guest).
+ Parameter frame of block, where writing the block border characteristics.
+ SMF compatibility: 1.1.19, 2.0.5 and 2.0.6.

1.0     2013-05-06
------------------
@ This work is licensed under a Creative Commons Attribution 3.0 Unported License http://creativecommons.org/licenses/by/3.0/
+ Custom blocks instead of default header and footer of forum.
+ Administration panel.
+ SMF compatibility: 1.1 to 1.1.18.
+ SMF compatibility: 2.0 to 2.0.4.
+ Languages: english, english-utf8, spanish_es, spanish_es-utf8, spanish_latin, spanish_latin-utf8.