How do I make a custom block?

Requested by Carnuke and Answered by Mithrandir on 2004/10/30 17:03:24

How do I make a custom block?

Custom Blocks are created in Blocks Administration found in System Admin -> Blocks.

From here, it is possible to create blocks with one of four types:

Regular HTML code can be put in this block

Regular PHP code can be used in this block as if it was a block in a module. Note that you are in a function scope, when creating this block, so any global variables such as $xoopsUser (User object) and $xoopsDB (Database object) must be declared global before use

Autoformat (Smilies enabled)
Normal Xoops code format with linebreaks and XoopsCode tags such as [img ] and [url ] (without spaces)
Smilies are interpreted and converted to the corresponding image

Autoformat (Smilies disabled)
Similar to the other Autoformat, but smilies are not converted, but will be displayed as e.g. : -) (without spaces)

Please also see This flash tutorial for more details.

This Q&A was found on XOOPS Web Application System :