| 1 |
<?php |
<?php |
| 2 |
// $Id: booktree.module,v 1.4.2.2 2007/02/09 13:37:25 uccio Exp $ |
// $Id: booktree.module,v 1.4.2.2 2007/03/05 20:47:08 uccio Exp $ |
| 3 |
// Tested with drupal 4.7.3 over IIS with PHP 4 and Mysql 4.18nt |
// Tested with drupal 4.7.3 over IIS with PHP 4 and Mysql 4.18nt |
| 4 |
// Tested with drupal 4.7.6 over APACHE with PHP 5 and Mysql 5 |
// Tested with drupal 4.7.6 over APACHE with PHP 5 and Mysql 5 |
| 5 |
|
|
| 78 |
|
|
| 79 |
function booktree_indice() { |
function booktree_indice() { |
| 80 |
$node = node_load(array('nid' =>variable_get('booktree_start', 1))); |
$node = node_load(array('nid' =>variable_get('booktree_start', 1))); |
| 81 |
$content = "<p>$node->body</p>"; |
drupal_set_title(check_plain($node->title)); |
| 82 |
|
$content = '<p>'. check_markup($node->body, $node->format, $check = FALSE) .'</p>'; |
| 83 |
$content .="<ul>"; |
$content .="<ul>"; |
| 84 |
$children = db_query(db_rewrite_sql('SELECT n.nid, b.weight, n.title FROM {node} n INNER JOIN {book} b ON n.nid = b.nid and n.vid =b.vid WHERE b.parent = %d ORDER BY b.weight, n.title'), $node->nid); |
$children = db_query(db_rewrite_sql('SELECT n.nid, b.weight, n.title FROM {node} n INNER JOIN {book} b ON n.nid = b.nid and n.vid =b.vid WHERE b.parent = %d ORDER BY b.weight, n.title'), $node->nid); |
| 85 |
$ricursione=1; |
$ricursione=1; |