Home Blocks

New blocks can be added to the home of VTE via SDK. The blocks cannot be deleted from the interface. The method for creating a new block is:

SDK::setHomeIframe($size, $url, $title, $userid = null, $useframe = true);

$size : the horizontal size of the block (from 1 to 4)
$url : the address to be shown within the block. It can also have a protocol at the beginning (e.g. http://www.mysite.com/file)
$title : the label of the block (it can be translated via API)
$userid : array containing the ids of the users who can see the block. If you leave null, the block is visible to all users
$useframe: if true the content will be inside an <iframe> otherwise the file is included directly

Users created later will see all previously registered blocks.
Block cancellation is possible via 2 methods:

SDK::unsetHomeIframe($stuffid);

$stuffid : the id of the block

SDK::unsetHomeIframeByUrl($url);

$url : the url of the block

Blocks are removed for all users.

Hooks
modules/Home/HomestuffAjax.php
modules/Home/HomeWidgetBlockList.php
modules/Home/HomeBlock.php
modules/Home/Homestuff.js
modules/Users/Save.php
Smarty/templates/Home/MainHomeBlock.tpl

Back to top