Block Types

From GeeklogWiki
Jump to: navigation, search

There are four different Block types that have completely independent functionalities:

Default Blocks

These blocks are built-in and cannot be deleted. They can be deactivated however. Usually, only their name, helpfile, position, and permissions can be changed.

PHP Block

This block usually calls a function that is provided by a plugin or standard functionality of geeklog. The name of the PHP function is entered in the "Block Function:" field. Concerning the function entered, there is the following text displayed in the standard layouts:

If you would like to have one of your blocks use PHP code, enter the name of the function above. Your function name must start with the prefix "phpblock_" (e.g. phpblock_getweather). If it does not have this prefix, your function will not be called. We do this to keep people who may have hacked your Geeklog installation from putting arbitrary function calls that may be harmful to your system. Be sure not to put empty parenthesis "()" after your function name. Finally, it is recommended that you put all your PHP Block code in /path/to/geeklog/system/lib-custom.php. That will allow the code to stay with you even when you upgrade to a newer version of Geeklog."

These blocks can provide a very large variety of functions, only depending on the function used.

A PHP block will only be displayed if the function actually returned any content to be displayed in the block. This can be used to create blocks that only show up on certain conditions.

Portal Block

The Portal Block is diplaying an RSS/RDF feed. The content can not be changed since it is completely determined by the content of the RSS/RDF file. For a new block, at least the complete URL of the RSS/RDF-file has to be given.

Also see Limit Portal Block Entry.

Normal Block

The Normal Block usually is a simple HTML text, that can contain announcements, links and even advertising. It can be used as a navigation tool and link to static pages as well as external sites.

Geeklog assumes that a normal block contains HTML formatted content when the very first character of the block content is a < character (for an opening tag). If it is any other character, Geeklog assumes the content to be plain text and will translate linebreaks to HTML
tags.