You have to follow these rules when creating a block:
In every block you create you have to insert the following code at the beginning:
if (eregi("block-Name_of_Block.php", $PHP_SELF)) {
Header("Location: index.php");
die();
}
|
By using this code you protect the file avoiding users approaching it directly from the blocks folder, and the block will be displayed only when selected from your site.
In the blocks you can include everything you want, Perl, java, php, flash etc...
All the block output must have a value that can be obtained from the variable $content.
Remember that you have a limited amount of space in the block, pay special attention to the layout!
The background for the tables and font etc., are better left to the style sheet (CSS).
We will now see how to construct a block starting from the beginning.
| Last updated Sun Aug 7 21:14:12 CEST 2005 | Permalink: http://www.karakas-online.de/EN-Book/block-theory.html | All contents © 2004 Chris Karakas, Claudio Erba |