Closed (won't fix)
Project:
Drupal core
Component:
block.module
Priority:
Normal
Category:
Feature request
Assigned:
Unassigned
Reporter:
Created:
27 Sep 2002 at 04:08 UTC
Updated:
11 Jul 2012 at 15:26 UTC
Here's a couple of custom block entries that you might like to include in the sql that sets up the database (both of type PHP).
Don't have these entries enabled, merely listed so they can be enabled if people want to. It gives them a couple of ideas regarding what can be done with the blocks.
A "Site Administration" box
<code>if (user_access("access administration pages")) {
$links[] = " · <a href='index.php'>home</a>";
foreach (module_list() as $name) {
if (module_hook($name, "link")) {
$links = array_merge($links, module_invoke($name, "link", "admin"));
}
}
return implode(" <br /> · ", $links);
}
A "Collaborative Book Index" block
<code>$output = book_tree();
// munging of the returned html can be done here if required
return $output;
Comments
Comment #1
al commentedThere's now plenty of documentation on the Drupal site regarding how to make blocks.
If you want to have the ability to put a particular collaborative book in a block, please create a _block hook for book.module with appropriate admin forms and submit a patch to the devel list, where it will be received with enthusiasm. :)