5
Still searching for a solution... As proposed, now I tried to hack the systems module (in some other thread someone proposed the systems module for this) and add a block as part of the module. Unfortunately I don't have any idea if this could be working, because the block is not shown anywhere. Anybody's got an idea why?
This is what I did:
I added the following in the system xoops_version.php
$modversion['blocks'][13]['file'] = "werbung_button.php";
$modversion['blocks'][13]['name'] = "Werbung";
$modversion['blocks'][13]['description'] = "Button-Werbung aus phpAdsNew";
$modversion['blocks'][13]['show_func'] = "getAds_button";
$modversion['blocks'][13]['template'] = 'system_block_button.html';
Then I created the file werbung_button.php with the following function:
function getAds_button()
{
if (@include(getenv('DOCUMENT_ROOT').'/xoops/html/modules/phpAdsNew/phpadsnew.inc.php')) {
if (!isset($phpAds_context)) $phpAds_context = array();
$phpAds_raw3 = view_raw ('zone:3', 0, '_blank', '', '0', $phpAds_context);
$phpAds_context[] = array('!=' => 'bannerid:'.$phpAds_raw3['bannerid']);
}
$block = array();
$block['ads'] = $phpAds_raw3['html'];
return $block;
}
?>
Finally I created the file system_block_button.html with the following content:
<div style="text-align: center;">
<{$block}>
div>
I uploaded all files, updated the module in the system administration and changed the permissions in the groups section, giving anonymous users group rights for the created block - but still: the block is not shown... Did I forget anything???
Thanks for your help!!!!
Ana_T