3
Hi
This is how to add a custom block
Let's say that XXX is the module you want to add a block to.
1. Go to modules/XXX/templates/blocks and create a myblock.html with the following content:
<{$block.mycontent}>
go to modules/XXX/blocks and add a myblock.php with the following content:
function myblock_show($options)
{
$block = array();
$block['mycontent'] = 'This is my content';
return $block;
}
function myblock_edit($options)
{
return "Here I could write my own block editor";
}
?>
3. Add the following entry to modules/XXX/xoops_version.php
$modversion['blocks'][] = array(
'file' => "myblock.php",
'show_func' => "myblock_show",
'edit_func' =>"myblock_edit",
'options' => '',
'name' => 'Hello Block!',
'description' => 'This jenny from the block',
'template' => 'myblock.html');
Have fun!
greetings
birdseedmusic