diff options
author | Dries Buytaert <dries@buytaert.net> | 2001-06-04 15:40:39 +0000 |
---|---|---|
committer | Dries Buytaert <dries@buytaert.net> | 2001-06-04 15:40:39 +0000 |
commit | c75057bb0fc99d56e1b7a48c5fecfe0cf0f6498d (patch) | |
tree | 5408a2b8da93dd9aa8057c542ccecbc8a5b287f9 /modules/page | |
parent | 2ecc3e4c78d032bf3f05018da6522437ffca3906 (diff) | |
download | brdo-c75057bb0fc99d56e1b7a48c5fecfe0cf0f6498d.tar.gz brdo-c75057bb0fc99d56e1b7a48c5fecfe0cf0f6498d.tar.bz2 |
CHANGES:
- Added improved node scheduler:
+ Automatically post node at date 'xx/xx/xx, xx:xx'.
+ Automatically queue node at date 'xx/xx/xx, xx:xx'.
+ Automatically dump node at date 'xx/xx/xx, xx:xx'.
Requires a database update, see ./updates/2.00-to-x.xx.sql!
- Refactored the admin interface of node.module. It is only a start
but it should show the direction we are going.
+ The new interface is easier to extend with new functionality
and operations. New "edit xxx" links can easily be added on
our way.
+ The new interface tries to cover all content- or node-related
functions. Thus making a special admin interface for each new
node type redundant. To demonstrate this, I removed the admin
hook from page.module and forum.module. This removes quite a
bit of logic from the invidual modules which is a good sign if
you ask me.
A centralized GUI or interface covering all node-related
administration should make Drupal easier to administer.
TODO:
- All node-related nodes need updating. This should be trivial and
I'll hapilly tackle this later tonight.
- There will be bugs, and I'm still working on this but I would like
to get some feedback (from Natrak et all) on both user-friendliness
and usability of this new interface. I'm still working on it as we
speak ...
Diffstat (limited to 'modules/page')
-rw-r--r-- | modules/page/page.module | 43 |
1 files changed, 4 insertions, 39 deletions
diff --git a/modules/page/page.module b/modules/page/page.module index 9af1b2c9c..99b6c7954 100644 --- a/modules/page/page.module +++ b/modules/page/page.module @@ -26,12 +26,12 @@ function page_status() { function page_form($edit = array()) { global $format, $REQUEST_URI; - $form .= form_textfield(t("Subject"), "title", $edit[title], 50, 64); + $form .= form_textfield("Subject", "title", $edit[title], 50, 64); $form .= structure_form("page", $edit); - $form .= form_textarea(t("Body"), "body", $edit[body], 50, 10); - $form .= form_select(t("Type"), "format", $edit[format], $format); + $form .= form_textarea("Body", "body", $edit[body], 50, 10); + $form .= form_select("Type", "format", $edit[format], $format); $form .= form_hidden("nid", $edit[nid]); - $form .= form_submit(t("Submit")); + $form .= form_submit("Submit"); return form($REQUEST_URI, $form); } @@ -44,39 +44,4 @@ function page_save($edit) { } } -function page_query($type = "") { - global $status; - $queries = array(array("recent pages", "WHERE n.type = 'page' ORDER BY n.timestamp DESC"), array("posted pages", "WHERE n.type = 'page' AND n.status = '$status[posted]' ORDER BY n.timestamp DESC"), array("dumped pages", "WHERE n.type = 'page' AND n.status = '$status[dumped]' ORDER BY n.timestamp DESC")); - return ($queries[$type] ? $queries[$type] : $queries); -} - -function page_overview($query = array()) { - return node_overview($query); -} - -function page_admin() { - global $id, $op, $edit, $type; - - print "<SMALL><A HREF=\"admin.php?mod=page&op=add\">add new page</A> | <A HREF=\"admin.php?mod=page&op=listing\">page listing</A> | <A HREF=\"admin.php?mod=page\">overview</A></SMALL><HR>\n"; - - $type = ($type ? $type : 0); - - switch ($op) { - case "add": - print page_form(); - break; - case "edit": - print page_form(node_get_array(array(nid => $id))); - break; - case "listing": - print node_listing(page_query()); - break; - case t("Submit"): - print status(page_save($edit)); - // fall through: - default: - print page_overview(page_query($type)); - } -} - ?>
\ No newline at end of file |