diff options
author | Dries Buytaert <dries@buytaert.net> | 2001-04-30 17:13:08 +0000 |
---|---|---|
committer | Dries Buytaert <dries@buytaert.net> | 2001-04-30 17:13:08 +0000 |
commit | fead09a8de391e2419bdac150a8b63c0228d16a2 (patch) | |
tree | 44b7b853340e8b67ad366674e98339d394700607 /modules/book/book.module | |
parent | c8d16d76f9ca0aa760435388a84482ec29258639 (diff) | |
download | brdo-fead09a8de391e2419bdac150a8b63c0228d16a2.tar.gz brdo-fead09a8de391e2419bdac150a8b63c0228d16a2.tar.bz2 |
Welp. Large commit ahead.
CHANGES:
- Added "read" and "write" permissions into drupal but removed
it again because - when finished after 3 hours of work - it
was considered nothing but added complexity that didn't buy
us anything. :I
(I'll explain this in detail on the mailing list, I guess.)
- Added a very simple help.module to group all available
documentation on a single page.
- Fixed bug in node_control(), book.module: UnConeD forgot to
global $user when updating the combobox code.
- Removed static wishlist.module: in future, the wishlist can
be maintained as a page in our collaborative book.
- Revised most of settings.module: tidied up the code and the
descriptions to accompany the settings and introduced a new
"default maximum number of nodes to display on the main page"
variable.
- Revised most of comment.module: the administration interface
looks better now, integrated node permissions, and -finally-
made it possible to delete comments.
- Polished on:
+ account.module
+ structure.module
+ locale.module
+ module.module
+ forum.module
- Form-ified:
+ account.php
+ account.module
+ setting.module
+ cvs.module
+ submit.php
+ comment.module
+ forum.module
+ book.module
+ page.module
+ locale.module
- Updated CHANGELOG
INFO:
- Designed a "generic tracker system with optional backends"
on paper. The idea is to allow registered users to hot-list
certain topics, individual nodes or threads (comments) and
to "plug-in" output backends like - for instance - an e-mail
digest. The design requires "intelligent blocks" though.
TODO:
- I want to tidy up the headline.module and backend.class as
well as merge in headlineRSS10.module. Julian spent quite
some time working on headline.module but I'm not sure what
he changed and whether he'd contribute it back?
Diffstat (limited to 'modules/book/book.module')
-rw-r--r-- | modules/book/book.module | 42 |
1 files changed, 19 insertions, 23 deletions
diff --git a/modules/book/book.module b/modules/book/book.module index 70dcd6da4..78d4e5680 100644 --- a/modules/book/book.module +++ b/modules/book/book.module @@ -94,47 +94,43 @@ function book_toc($parent = 0, $indent = "", $toc = array()) { function book_form($edit = array()) { global $allowed_html, $PHP_SELF, $REQUEST_URI, $user; - $output .= "<FORM ACTION=\"$REQUEST_URI\" METHOD=\"post\">\n"; - - $output .= form_item(t("Author"), format_username(($edit[userid] ? $edit[userid] : $user->userid))); - $output .= form_hidden(userid, $edit[userid]); - $output .= form_textfield(t("Subject"), "title", $edit[title], 50, 128); - $output .= form_item(t("Category"), category_form_select("book", $edit)); + $form .= form_item(t("Author"), format_username(($edit[userid] ? $edit[userid] : $user->userid))); + $form .= form_hidden(userid, $edit[userid]); + $form .= form_textfield(t("Subject"), "title", $edit[title], 50, 64); + $form .= form_item(t("Category"), category_form_select("book", $edit)); if ($edit[pid]) { $node = node_get_object("nid", $edit[pid]); - $output .= form_item(t("Parent"), "<A HREF=\"node.php?id=$node->id\">". check_output($node->title) ."</A>", t("The parent subject or category the page belongs in.")); - $output .= form_hidden("parent". $edit[parent]); + $form .= form_item(t("Parent"), "<A HREF=\"node.php?id=$node->id\">". check_output($node->title) ."</A>", t("The parent subject or category the page belongs in.")); + $form .= form_hidden("parent". $edit[parent]); } else { - $output .= form_select(t("Parent"), "parent", user_access($user, "book") ? array_merge(array(0 => " "), book_toc()) : book_toc(), $edit[parent], t("The parent subject or category the page belongs in.")); + $form .= form_select(t("Parent"), "parent", $edit[parent], user_access($user, "book") ? array_merge(array(0 => " "), book_toc()) : book_toc(), t("The parent subject or category the page belongs in.")); } - $output .= form_textarea(t("Content"), "body", $edit[body], 50, 10, t("Allowed HTML tags") .": ". htmlspecialchars($allowed_html)); - $output .= form_textarea(t("Log message"), "log", $edit[log], 50, 5, t("An explanation of the additions or updates being made to help the group understand your motivations.")); + $form .= form_textarea(t("Content"), "body", $edit[body], 50, 10, t("Allowed HTML tags") .": ". htmlspecialchars($allowed_html)); + $form .= form_textarea(t("Log message"), "log", $edit[log], 50, 5, t("An explanation of the additions or updates being made to help the group understand your motivations.")); if (user_access($user, "book")) { - $output .= form_select(t("Weight"), "weight", array(0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30), $edit[weight], t("The heavier nodes will sink and the lighter nodes will be positioned nearer the top.")); + $form .= form_select(t("Weight"), "weight", $edit[weight], array(0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30), t("The heavier nodes will sink and the lighter nodes will be positioned nearer the top.")); } + $form .= form_hidden("pid", $edit[pid]); + $form .= form_hidden("nid", $edit[nid]); + if (!$edit) { - $output .= form_submit(t("Preview")); + $form .= form_submit(t("Preview")); } else if (!$edit[title]) { - $output .= "<FONT COLOR=\"red\">". t("Warning: you did not supply a title.") ."</FONT><P>\n"; - $output .= form_submit(t("Preview")); + $form .= "<FONT COLOR=\"red\">". t("Warning: you did not supply a title.") ."</FONT><P>\n"; + $form .= form_submit(t("Preview")); } else { - $output .= form_submit(t("Preview")); - $output .= form_submit(t("Submit")); + $form .= form_submit(t("Preview")); + $form .= form_submit(t("Submit")); } - $output .= form_hidden("pid", $edit[pid]); - $output .= form_hidden("nid", $edit[nid]); - - $output .= "</FORM>\n"; - - return $output; + return form($REQUEST_URI, $form); } function book_save($edit) { |