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[] = " &middot; <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 /> &middot; ", $links);
}


A "Collaborative Book Index" block

<code>$output = book_tree();
// munging of the returned html can be done here if required
return $output;

Comments

al’s picture

Priority: Major » Normal

There'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. :)