Difference between revisions of "Block Types"

From GeeklogWiki
Jump to: navigation, search
 
Line 1: Line 1:
There are three different Block types that have completely independent funcitonalities:
+
There are four different Block types that have completely independent functionalities:
 +
 
 +
<h2>Default Blocks</h2>
 +
These blocks are built-in and cannot be deleted. They can be deactivated however. Usually, only their name, helpfile and position can be changed.
  
 
<h2>PHP Block</h2>
 
<h2>PHP Block</h2>
This block usually calls a function that is provided by a plugin or standart functionality of geeklog. The name of the php function is entered in the "Block Function:"-Field, withouth any "()" or ";" at the end.  
+
This block usually calls a function that is provided by a plugin or standart 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.
 
These blocks can provide a very large variety of functions, only depending on the function used.

Revision as of 11:47, 7 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 and position can be changed.

PHP Block

This block usually calls a function that is provided by a plugin or standart 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.

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.