Difference between revisions of "Block Types"

From GeeklogWiki
Jump to: navigation, search
m
Line 19: Line 19:
 
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.
 
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 < characeter (for an opening tag). If it is any other character, Geeklog assumes the content to be plain text and will translate linebreaks to HTML BR tags.
+
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 BR tags.

Revision as of 15:17, 10 July 2004

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.

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 BR tags.