adding to blocks based on module
macieq - December 28, 2008 - 02:11
Hi everyne!
Im wondering about how to add something to every blocks but without ingeration to block.tpl.php
I want to write some module for defferent themes and I started with one and this work (but not module)
I add to template.php:
function marinelli_preprocess_block(&$vars, $hook) {
...
$vars['$generated_content'] = '...';
}and it works when I add
<?php
print $generated_content
?>but how can I do this with adding module? Thx for helping.

I started
I started with:
mymodule_preprocess_block(&$vars, $hook) {
...
$vars['$generated_content'] = '...';
}
And it works but only when i put the
<?phpprint $generated_content
?>
in block.tpl.php
My question:
How to add something to all blocks on page. I tried to change in:
$vars[...] but there is stdClass which couse this problematic and I don't know how to do that. Im a little bit closer...
---
Nothing is impossible, exept that we can imagen or see.
okey - done
Okey. Its done. I simply added at the end of function the:
$block->content .= $vars['edit_links'];
and it works.
If enybody is interested in this module write to me.
This module is to display "edit block" and "conf block" and "edit menu" links to every block, menus. You don't have to go to administration pages and search for editing. Simply this links are in blocks and shows to admins who have perwmissions to edit blocks, menus etc.
Nothing is impossible, exept that we can imagen or see.
Better
My module is better then Block Edit module. My module works on every themes, the Block Edit module is not.