'#description'=>t("If <em>Show block on all pages</em> is selected, the block will contain the automatically generated menus for all of the site's books. If <em>Show block only on book pages</em> is selected, the block will contain only the one menu corresponding to the current page's book. In this case, if the current page is not in a book, no block will be displayed. The <em>Page specific visibility settings</em> or other visibility settings can be used in addition to selectively display this block."),
$result2=db_query(db_rewrite_sql("SELECT n.type, n.title, b.*, ml.* FROM {book} b INNER JOIN {node} n on b.nid = n.nid INNER JOIN {menu_links} ml ON b.mlid = ml.mlid WHERE n.nid IN (".implode(',',$nids).") AND n.status = 1 ORDER BY ml.weight, ml.link_title"));
while($link=db_fetch_array($result2)){
...
...
@@ -269,11 +281,14 @@ function book_get_books() {
}
}
}
return$all_books;
}
/**
* Implementation of hook_form_alter(). Adds the book fieldset to the node form.
@@ -1008,9 +1045,12 @@ function book_help($path, $arg) {
$output.='<p>'.t("Users with the <em>administer book outlines</em> permission can add a post of any content type to a book, by selecting the appropriate book while editing the post or by using the interface available on the post's <em>outline</em> tab.").'</p>';
$output.='<p>'.t('Administrators can view a list of all books on the <a href="@admin-node-book">book administration page</a>. The <em>Outline</em> page for each book allows section titles to be edited or rearranged.',array('@admin-node-book'=>url('admin/content/book'))).'</p>';
$output.='<p>'.t('For more information, see the online handbook entry for <a href="@book">Book module</a>.',array('@book'=>'http://drupal.org/handbook/modules/book/')).'</p>';
return$output;
case'admin/content/book':
return'<p>'.t('The book module offers a means to organize a collection of related posts, collectively known as a book. When viewed, these posts automatically display links to adjacent book pages, providing a simple navigation system for creating and reviewing structured content.').'</p>';
case'node/%/outline':
return'<p>'.t('The outline feature allows you to include posts in the <a href="@book">book hierarchy</a>, as well as move them within the hierarchy or to <a href="@book-admin">reorder an entire book</a>.',array('@book'=>url('book'),'@book-admin'=>url('admin/content/book'))).'</p>';
}
...
...
@@ -1026,6 +1066,7 @@ function book_link_load($mlid) {
_menu_link_translate($item);
return$item;
}
returnFALSE;
}
...
...
@@ -1048,14 +1089,17 @@ function book_menu_subtree_data($item) {
if(!isset($tree[$cid])){
$cache=cache_get($cid,'cache_menu');
if($cache&&isset($cache->data)){
// If the cache entry exists, it will just be the cid for the actual data.
// This avoids duplication of large amounts of data.
$cache=cache_get($cache->data,'cache_menu');
if($cache&&isset($cache->data)){
$data=$cache->data;
}
}
// If the subtree data was not in the cache, $data will be NULL.
if(!isset($data)){
$match=array("menu_name = '%s'");
...
...
@@ -1079,6 +1123,7 @@ function book_menu_subtree_data($item) {