summaryrefslogtreecommitdiff
path: root/modules
diff options
context:
space:
mode:
Diffstat (limited to 'modules')
-rw-r--r--modules/account.module71
-rw-r--r--modules/book.module42
-rw-r--r--modules/book/book.module42
-rw-r--r--modules/comment.module73
-rw-r--r--modules/comment/comment.module73
-rw-r--r--modules/cvs.module5
-rw-r--r--modules/forum.module27
-rw-r--r--modules/forum/forum.module27
-rw-r--r--modules/locale.module37
-rw-r--r--modules/locale/locale.module37
-rw-r--r--modules/module.module2
-rw-r--r--modules/node.module10
-rw-r--r--modules/node/node.module10
-rw-r--r--modules/page.module28
-rw-r--r--modules/page/page.module28
-rw-r--r--modules/settings.module106
-rw-r--r--modules/story.module41
-rw-r--r--modules/story/story.module41
-rw-r--r--modules/structure.module4
-rw-r--r--modules/wishlist.module64
20 files changed, 257 insertions, 511 deletions
diff --git a/modules/account.module b/modules/account.module
index 72687a0e0..6dbf54977 100644
--- a/modules/account.module
+++ b/modules/account.module
@@ -69,7 +69,7 @@ function account_ac() {
$output .= "<TABLE BORDER=\"1\" CELLPADDING=\"3\" CELLSPACING=\"0\">\n";
$output .= " <TR><TH>mask</TH><TH>type</TH><TH>reason</TH><TH>oparations</TH></TR>\n";
while ($rule = db_fetch_object($result)) {
- $output .= " <TR><TD>$rule->mask</TD><TD ALIGN=\"center\">$rule->type</TD><TD>". check_output($rule->reason) ."</TD><TD><A HREF=\"admin.php?mod=account&op=delete+rule&id=$rule->id\">delete rule</A></TD></TR>\n";
+ $output .= " <TR><TD>$rule->mask</TD><TD ALIGN=\"center\">$rule->type</TD><TD>". check_output($rule->reason) ."</TD><TD><A HREF=\"admin.php?mod=account&op=delete&id=$rule->id\">delete rule</A></TD></TR>\n";
}
$output .= " <TR><TD><INPUT TYPE=\"text\" NAME=\"edit[mask]\"></TD><TD><SELECT NAME=\"edit[type]\">\n$type</SELECT></TD><TD><INPUT TYPE=\"text\" NAME=\"edit[reason]\"></TD><TD><INPUT NAME=\"op\" TYPE=\"submit\" VALUE=\"Add rule\"></TD></TR>\n";
$output .= " <TR><TD COLSPAN=\"4\"><SMALL><I>Use <A HREF=\"admin.php?mod=account&op=help\">regular expressions</A> (regexs) to specify the mask pattern.</I></SMALL></TD></TR>\n";
@@ -117,7 +117,7 @@ function account_blocks($id) {
}
function account_nodes($id) {
- $result = db_query("SELECT * FROM node WHERE author = $id ORDER BY timestamp DESC");
+ $result = db_query("SELECT * FROM node WHERE author = $id ORDER BY timestamp DESC LIMIT 30");
while ($node = db_fetch_object($result)) {
$output .= "<LI><A HREF=\"node.php?id=$node->nid\">$node->title</A> ($node->type)</LI>\n";
}
@@ -125,7 +125,7 @@ function account_nodes($id) {
}
function account_comments($id) {
- $result = db_query("SELECT * FROM comments WHERE author = '$id' ORDER BY timestamp DESC");
+ $result = db_query("SELECT * FROM comments WHERE author = '$id' ORDER BY timestamp DESC LIMIT 30");
while ($comment = db_fetch_object($result)) {
$output .= "<LI><A HREF=\"node.php?id=$comment->lid&cid=$comment->cid&pid=$comment->pid#$comment->cid\">$comment->subject</A></LI>\n";
}
@@ -158,33 +158,28 @@ function account_edit($name) {
$access .= "<OPTION VALUE=\"$name\"". (user_access($account, $name) ? " SELECTED" : "") .">$name</OPTION>";
}
- $status = array(0 => "blocked", 1 => "not confirmed", 2 => "open");
+ $status = array("blocked", "not confirmed", "open");
$result = db_query("SELECT * FROM users WHERE userid = '$name'");
if ($account = db_fetch_object($result)) {
- foreach ($status as $key=>$value) {
- $stat .= " <OPTION VALUE=\"$key\"". (($account->status == $key) ? " SELECTED" : "") .">$value</OPTION>\n";
- }
-
module_iterate("access");
- $output .= "<FORM ACTION=\"admin.php?mod=account\" METHOD=\"post\">\n";
- $output .= "<B>ID:</B><BR>$account->id<P>\n";
- $output .= "<B>Username:</B><BR>". check_output($account->userid) ."<P>\n";
- $output .= "<B>Status:</B><BR><SELECT NAME=\"edit[status]\">\n$stat</SELECT><P>\n";
- $output .= "<B>Administrator access:</B><BR><SELECT NAME=\"edit[access][]\" MULTIPLE=\"true\" SIZE=\"10\">$access</SELECT><P>\n";
- $output .= "<B>Real name:</B><BR><INPUT NAME=\"edit[name]\" SIZE=\"55\" VALUE=\"". check_textfield($account->name). "\"><P>\n";
- $output .= "<B>Real e-mail address:</B><BR><INPUT NAME=\"edit[real_email]\" SIZE=\"55\" VALUE=\"". check_textfield($account->real_email) ."\"><P>\n";
- $output .= "<B>Fake e-mail address:</B><BR><INPUT NAME=\"edit[fake_email]\" SIZE=\"55\" VALUE=\"". check_textfield($account->fake_email) ."\"><P>\n";
- $output .= "<B>URL of homepage:</B><BR><INPUT NAME=\"edit[url]\" SIZE=\"55\" VALUE=\"". check_textfield($account->url) ."\"><P>\n";
- $output .= "<B>Bio information:</B><BR><TEXTAREA NAME=\"edit[bio]\" COLS=\"35\" ROWS=\"5\" WRAP=\"virtual\">". check_textarea($account->bio) ."</TEXTAREA><P>\n";
- $output .= "<B>Signature:</B><BR><TEXTAREA NAME=\"edit[signature]\" COLS=\"35\" ROWS=\"5\" WRAP=\"virtual\">". check_textarea($account->signature) ."</TEXTAREA><P>\n";
- $output .= "<INPUT TYPE=\"hidden\" NAME=\"name\" VALUE=\"$account->userid\">\n";
- $output .= "<INPUT TYPE=\"submit\" NAME=\"op\" VALUE=\"View account\">\n";
- $output .= "<INPUT TYPE=\"submit\" NAME=\"op\" VALUE=\"Save account\">\n";
- $output .= "</FORM>\n";
- return $output;
+ $form .= form_item("ID", $account->id);
+ $form .= form_item(t("Username"), check_output($account->userid));
+ $form .= form_select(t("Status"), "status", $account->status, array("blocked", "not confirmed", "open"));
+ $form .= form_item(t("Administrator access"), "<SELECT NAME=\"edit[access][]\" MULTIPLE=\"true\" SIZE=\"10\">$access</SELECT>");
+ $form .= form_textfield(t("Real name"), "name", $account->name, 30, 55);
+ $form .= form_textfield(t("Real e-mail address"), "real_email", $account->real_email, 30, 55);
+ $form .= form_textfield(t("Fake e-mail address"), "fake_email", $account->fake_email, 30, 55);
+ $form .= form_textfield(t("Homepage"), "url", $account->url, 30, 55);
+ $form .= form_textarea(t("Bio"), "bio", $account->bio, 35, 5);
+ $form .= form_textarea(t("Signature"), "signature", $account->signature, 35, 5);
+ $form .= form_hidden("userid", $account->userid);
+ $form .= form_submit("View account");
+ $form .= form_submit("Save account");
+
+ return form("admin.php?mod=account", $form);
}
}
@@ -194,7 +189,10 @@ function account_view($name) {
$result = db_query("SELECT * FROM users WHERE userid = '$name'");
if ($account = db_fetch_object($result)) {
- $output .= "<FORM ACTION=\"admin.php?mod=account\" METHOD=\"post\">\n";
+ $form .= form_hidden("userid", $account->userid);
+ $form .= form_submit("Edit account");
+ $form .= form_submit("Delete account");
+
$output .= "<TABLE BORDER=\"1\" CELLPADDING=\"3\" CELLSPACING=\"0\">\n";
$output .= " <TR><TH>ID:</TH><TD>$account->id</TD></TR>\n";
$output .= " <TR><TH>Username:</TH><TD>$account->userid</TD></TR>\n";
@@ -203,19 +201,19 @@ function account_view($name) {
$output .= " <TR><TH>Real name:</TH><TD>". check_output($account->name) ."</TD></TR>\n";
$output .= " <TR><TH>Real e-mail address:</TH><TD>". format_email($account->real_email) ."</TD></TR>\n";
$output .= " <TR><TH>Fake e-mail address:</TH><TD>". check_output($account->fake_email) ."</TD></TR>\n";
- $output .= " <TR><TH>URL of homepage:</TH><TD>". format_url($account->url) ."</TD></TR>\n";
+ $output .= " <TR><TH>Homepage:</TH><TD>". format_url($account->url) ."</TD></TR>\n";
$output .= " <TR><TH>Last access:</TH><TD>". format_date($account->last_access) ." from ". check_output($account->last_host) ."</TD></TR>\n";
$output .= " <TR><TH>User rating:</TH><TD>". check_output($account->rating) ."</TD></TR>\n";
- $output .= " <TR><TH>Bio information:</TH><TD>". check_output($account->bio) ."</TD></TR>\n";
- $output .= " <TR><TH><B>Signature:</TH><TD>". check_output($account->signature) ."</TD></TR>\n";
+ $output .= " <TR><TH>Bio:</TH><TD>". check_output($account->bio) ."</TD></TR>\n";
+ $output .= " <TR><TH>Signature:</TH><TD>". check_output($account->signature) ."</TD></TR>\n";
$output .= " <TR><TH>Theme:</TH><TD>". check_output($account->theme) ."</TD></TR>\n";
$output .= " <TR><TH>Timezone:</TH><TD>". check_output($account->timezone / 3600) ."</TD></TR>\n";
$output .= " <TR><TH>Selected blocks:</TH><TD>". check_output(account_blocks($account->id)) ."</TD></TR>\n";
- $output .= " <TR><TH>Submitted nodes:</TH><TD>". check_output(account_nodes($account->id)) ."</TD></TR>\n";
- $output .= " <TR><TH>Submitted comments:</TH><TD>". check_output(account_comments($account->id)) ."</TD></TR>\n";
- $output .= " <TR><TD ALIGN=\"center\" COLSPAN=\"2\"><INPUT TYPE=\"hidden\" NAME=\"name\" VALUE=\"$account->userid\"><INPUT TYPE=\"submit\" NAME=\"op\" VALUE=\"Edit account\"><INPUT TYPE=\"submit\" NAME=\"op\" VALUE=\"Delete account\"></TD></TR>\n";
+ $output .= " <TR><TH>Recent nodes:</TH><TD>". check_output(account_nodes($account->id)) ."</TD></TR>\n";
+ $output .= " <TR><TH>Recent comments:</TH><TD>". check_output(account_comments($account->id)) ."</TD></TR>\n";
+ $output .= " <TR><TD ALIGN=\"center\" COLSPAN=\"2\">". form("admin.php?mod=account", $form) ."</TD></TR>\n";
$output .= "</TABLE>\n";
- $output .= "</FORM>\n";
+
return $output;
}
}
@@ -244,13 +242,12 @@ function account_admin() {
print status(account_ac_check($edit));
print account_ac();
break;
- case "delete rule":
+ case "delete":
print status(account_ac_del($id));
print account_ac();
break;
case "Delete account":
- case "delete":
- print status(account_delete(check_input($name)));
+ print status(account_delete($edit[userid]));
print account_overview(account_query($type));
break;
case "Edit account":
@@ -268,8 +265,8 @@ function account_admin() {
print search_data($keys, $mod);
break;
case "Save account":
- print status(account_edit_save(check_input($name), $edit));
- print account_view(check_input($name));
+ print status(account_edit_save(check_input($edit[userid]), $edit));
+ print account_view(check_input($edit[userid]));
break;
case "View account":
case "view":
diff --git a/modules/book.module b/modules/book.module
index 70dcd6da4..78d4e5680 100644
--- a/modules/book.module
+++ b/modules/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 => "&nbsp;"), 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 => "&nbsp;"), 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) {
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 => "&nbsp;"), 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 => "&nbsp;"), 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) {
diff --git a/modules/comment.module b/modules/comment.module
index cee88f998..5c2f9005f 100644
--- a/modules/comment.module
+++ b/modules/comment.module
@@ -15,90 +15,53 @@ function comment_find($keys) {
function comment_edit($id) {
$result = db_query("SELECT c.*, u.userid FROM comments c LEFT JOIN users u ON c.author = u.id WHERE c.cid = '$id'");
-
$comment = db_fetch_object($result);
- $output .= "<FORM ACTION=\"admin.php?mod=comment&op=save&id=$id\" METHOD=\"post\">\n";
-
- $output .= "<B>Author:</B><BR>\n";
- $output .= format_username($comment->userid) ."<P>\n";
-
- $output .= "<B>Subject:</B><BR>\n";
- $output .= "<INPUT TYPE=\"text\" NAME=\"subject\" SIZE=\"50\" VALUE=\"". check_textfield($comment->subject) ."\"><P>\n";
+ $form .= form_item(t("Author"), format_username($comment->userid));
+ $form .= form_textfield(t("Subject"), "subject", $comment->subject, 50, 128);
+ $form .= form_textarea(t("Comment"), "comment", $comment->comment, 50, 10);
+ $form .= form_submit("Save comment");
- $output .= "<B>Comment:</B><BR>\n";
- $output .= "<TEXTAREA WRAP=\"virtual\" COLS=\"50\" ROWS=\"10\" NAME=\"comment\">". check_textarea($comment->comment) ."</TEXTAREA><P>\n";
-
- $output .= "<INPUT TYPE=\"submit\" NAME=\"op\" VALUE=\"Save comment\">\n";
- $output .= "</FORM>\n";
-
- print $output;
+ return form("admin.php?mod=comment&id=$id", $form);
}
-function comment_save($id, $subject, $comment) {
- db_query("UPDATE comments SET subject = '$subject', comment = '$comment' WHERE cid = '$id'");
- watchdog("message", "comment: modified '$subject'");
+function comment_save($id, $edit) {
+ db_query("UPDATE comments SET subject = '". check_input($edit[subject]) ."', comment = '". check_input($edit[comment]) ."' WHERE cid = '$id'");
+ watchdog("message", "comment: modified '$edit[subject]'");
}
-function comment_display($order = "date") {
- // Initialize variables:
- $fields = array("author" => "author", "date" => "timestamp DESC", "subject" => "subject");
-
- // Perform SQL query:
- $result = db_query("SELECT c.*, u.userid FROM comments c LEFT JOIN users u ON u.id = c.author ORDER BY c.$fields[$order] LIMIT 50");
+function comment_display() {
+ $result = db_query("SELECT c.*, u.userid FROM comments c LEFT JOIN users u ON u.id = c.author ORDER BY timestamp DESC LIMIT 50");
- // Display comments:
$output .= "<TABLE BORDER=\"1\" CELLPADDING=\"2\" CELLSPACING=\"2\">\n";
- $output .= " <TR>\n";
- $output .= " <TH ALIGN=\"right\" COLSPAN=\"3\">\n";
- $output .= " <FORM ACTION=\"admin.php?mod=comment\" METHOD=\"post\">\n";
- $output .= " <SELECT NAME=\"order\">\n";
- foreach ($fields as $key=>$value) {
- $output .= " <OPTION VALUE=\"$key\"". ($key == $order ? " SELECTED" : "") .">Sort by $key</OPTION>\n";
- }
- $output .= " </SELECT>\n";
- $output .= " <INPUT TYPE=\"submit\" NAME=\"op\" VALUE=\"Update\">\n";
- $output .= " </FORM>\n";
- $output .= " </TH>\n";
- $output .= " </TR>\n";
-
- $output .= " <TR>\n";
- $output .= " <TH>subject</TH>\n";
- $output .= " <TH>author</TH>\n";
- $output .= " <TH>operations</TH>\n";
- $output .= " </TR>\n";
-
+ $output .= " <TR><TH>subject</TH><TH>author</TH><TH>date</TH><TH COLSPAN=\"2\">operations</TH></TR>\n";
while ($comment = db_fetch_object($result)) {
- $output .= " <TR><TD><A HREF=\"node.php?id=$comment->lid&cid=$comment->cid&pid=$comment->pid#$comment->cid\">". check_output($comment->subject) ."</A></TD><TD>". format_username($comment->userid) ."</TD><TD ALIGN=\"center\"><A HREF=\"admin.php?mod=comment&op=edit&id=$comment->cid\">edit</A></TD></TR>\n";
+ $output .= " <TR><TD><A HREF=\"node.php?id=$comment->lid&cid=$comment->cid&pid=$comment->pid#$comment->cid\">". check_output($comment->subject) ."</A></TD><TD>". format_username($comment->userid) ."</TD><TD>". format_date($comment->timestamp, "small") ."</TD><TD><A HREF=\"admin.php?mod=comment&op=edit&id=$comment->cid\">edit comment</A></TD><TD><A HREF=\"admin.php?mod=comment&op=delete&id=$comment->cid\">delete comment</A></TD></TR>\n";
}
-
$output .= "</TABLE>\n";
- print $output;
+ return $output;
}
function comment_admin() {
- global $op, $id, $mod, $keys, $subject, $comment, $order;
+ global $op, $id, $edit, $mod, $keys, $order;
print "<SMALL><A HREF=\"admin.php?mod=comment\">overview</A> | <A HREF=\"admin.php?mod=comment&op=search\">search comment</A></SMALL><HR>\n";
switch ($op) {
case "edit":
- comment_edit($id);
+ print comment_edit($id);
break;
case "search":
print search_form($keys);
print search_data($keys, $mod);
break;
case "Save comment":
- comment_save(check_input($id), check_input($subject), check_input($comment));
- comment_display();
- break;
- case "Update":
- comment_display(check_input($order));
+ print status(comment_save(check_input($id), $edit));
+ print comment_display();
break;
default:
- comment_display();
+ print comment_display();
}
}
diff --git a/modules/comment/comment.module b/modules/comment/comment.module
index cee88f998..5c2f9005f 100644
--- a/modules/comment/comment.module
+++ b/modules/comment/comment.module
@@ -15,90 +15,53 @@ function comment_find($keys) {
function comment_edit($id) {
$result = db_query("SELECT c.*, u.userid FROM comments c LEFT JOIN users u ON c.author = u.id WHERE c.cid = '$id'");
-
$comment = db_fetch_object($result);
- $output .= "<FORM ACTION=\"admin.php?mod=comment&op=save&id=$id\" METHOD=\"post\">\n";
-
- $output .= "<B>Author:</B><BR>\n";
- $output .= format_username($comment->userid) ."<P>\n";
-
- $output .= "<B>Subject:</B><BR>\n";
- $output .= "<INPUT TYPE=\"text\" NAME=\"subject\" SIZE=\"50\" VALUE=\"". check_textfield($comment->subject) ."\"><P>\n";
+ $form .= form_item(t("Author"), format_username($comment->userid));
+ $form .= form_textfield(t("Subject"), "subject", $comment->subject, 50, 128);
+ $form .= form_textarea(t("Comment"), "comment", $comment->comment, 50, 10);
+ $form .= form_submit("Save comment");
- $output .= "<B>Comment:</B><BR>\n";
- $output .= "<TEXTAREA WRAP=\"virtual\" COLS=\"50\" ROWS=\"10\" NAME=\"comment\">". check_textarea($comment->comment) ."</TEXTAREA><P>\n";
-
- $output .= "<INPUT TYPE=\"submit\" NAME=\"op\" VALUE=\"Save comment\">\n";
- $output .= "</FORM>\n";
-
- print $output;
+ return form("admin.php?mod=comment&id=$id", $form);
}
-function comment_save($id, $subject, $comment) {
- db_query("UPDATE comments SET subject = '$subject', comment = '$comment' WHERE cid = '$id'");
- watchdog("message", "comment: modified '$subject'");
+function comment_save($id, $edit) {
+ db_query("UPDATE comments SET subject = '". check_input($edit[subject]) ."', comment = '". check_input($edit[comment]) ."' WHERE cid = '$id'");
+ watchdog("message", "comment: modified '$edit[subject]'");
}
-function comment_display($order = "date") {
- // Initialize variables:
- $fields = array("author" => "author", "date" => "timestamp DESC", "subject" => "subject");
-
- // Perform SQL query:
- $result = db_query("SELECT c.*, u.userid FROM comments c LEFT JOIN users u ON u.id = c.author ORDER BY c.$fields[$order] LIMIT 50");
+function comment_display() {
+ $result = db_query("SELECT c.*, u.userid FROM comments c LEFT JOIN users u ON u.id = c.author ORDER BY timestamp DESC LIMIT 50");
- // Display comments:
$output .= "<TABLE BORDER=\"1\" CELLPADDING=\"2\" CELLSPACING=\"2\">\n";
- $output .= " <TR>\n";
- $output .= " <TH ALIGN=\"right\" COLSPAN=\"3\">\n";
- $output .= " <FORM ACTION=\"admin.php?mod=comment\" METHOD=\"post\">\n";
- $output .= " <SELECT NAME=\"order\">\n";
- foreach ($fields as $key=>$value) {
- $output .= " <OPTION VALUE=\"$key\"". ($key == $order ? " SELECTED" : "") .">Sort by $key</OPTION>\n";
- }
- $output .= " </SELECT>\n";
- $output .= " <INPUT TYPE=\"submit\" NAME=\"op\" VALUE=\"Update\">\n";
- $output .= " </FORM>\n";
- $output .= " </TH>\n";
- $output .= " </TR>\n";
-
- $output .= " <TR>\n";
- $output .= " <TH>subject</TH>\n";
- $output .= " <TH>author</TH>\n";
- $output .= " <TH>operations</TH>\n";
- $output .= " </TR>\n";
-
+ $output .= " <TR><TH>subject</TH><TH>author</TH><TH>date</TH><TH COLSPAN=\"2\">operations</TH></TR>\n";
while ($comment = db_fetch_object($result)) {
- $output .= " <TR><TD><A HREF=\"node.php?id=$comment->lid&cid=$comment->cid&pid=$comment->pid#$comment->cid\">". check_output($comment->subject) ."</A></TD><TD>". format_username($comment->userid) ."</TD><TD ALIGN=\"center\"><A HREF=\"admin.php?mod=comment&op=edit&id=$comment->cid\">edit</A></TD></TR>\n";
+ $output .= " <TR><TD><A HREF=\"node.php?id=$comment->lid&cid=$comment->cid&pid=$comment->pid#$comment->cid\">". check_output($comment->subject) ."</A></TD><TD>". format_username($comment->userid) ."</TD><TD>". format_date($comment->timestamp, "small") ."</TD><TD><A HREF=\"admin.php?mod=comment&op=edit&id=$comment->cid\">edit comment</A></TD><TD><A HREF=\"admin.php?mod=comment&op=delete&id=$comment->cid\">delete comment</A></TD></TR>\n";
}
-
$output .= "</TABLE>\n";
- print $output;
+ return $output;
}
function comment_admin() {
- global $op, $id, $mod, $keys, $subject, $comment, $order;
+ global $op, $id, $edit, $mod, $keys, $order;
print "<SMALL><A HREF=\"admin.php?mod=comment\">overview</A> | <A HREF=\"admin.php?mod=comment&op=search\">search comment</A></SMALL><HR>\n";
switch ($op) {
case "edit":
- comment_edit($id);
+ print comment_edit($id);
break;
case "search":
print search_form($keys);
print search_data($keys, $mod);
break;
case "Save comment":
- comment_save(check_input($id), check_input($subject), check_input($comment));
- comment_display();
- break;
- case "Update":
- comment_display(check_input($order));
+ print status(comment_save(check_input($id), $edit));
+ print comment_display();
break;
default:
- comment_display();
+ print comment_display();
}
}
diff --git a/modules/cvs.module b/modules/cvs.module
index 5deee6d53..701a377ee 100644
--- a/modules/cvs.module
+++ b/modules/cvs.module
@@ -17,10 +17,7 @@ function cvs_cron() {
}
function cvs_conf() {
- $output .= "<B>Recepient for log messages:</B><BR>\n";
- $output .= "<INPUT NAME=\"edit[cvs_mail]\" MAXLENGTH=\"55\" SIZE=\"30\" VALUE=\"". variable_get(cvs_mail, "root@localhost") ."\"><BR>\n";
- $output .= "<I><SMALL>The e-mail address to mail the CVS log messages to. Multiple recipients can be specified by putting a comma between each address.</SMALL></I><P>\n";
- return $output;
+ return form_textfield(t("CVS digest recepient"), "cvs_mail", variable_get(cvs_mail, "root@localhost"), 30, 55, t("The e-mail address to mail the CVS log messages to. Multiple recipients can be specified by putting a comma between each address."));
}
function cvs_page() {
diff --git a/modules/forum.module b/modules/forum.module
index e5500f7a5..a67c31434 100644
--- a/modules/forum.module
+++ b/modules/forum.module
@@ -14,25 +14,22 @@ function forum_status() {
return array(dumped, posted);
}
+function forum_view($node) {
+ global $theme;
+ $output .= "<P><A HREF=\"module.php?mod=forum\">Forum</A> / <B><A HREF=\"node.php?id=$node->nid\">". check_output($node->title) ."</A></B>:</P><P>". check_output($node->body) ."</P>";
+ $theme->box(t("Discussion forum"), $output);
+}
+
function forum_form($edit = array()) {
global $format;
- $output .= "<FORM ACTION=\"admin.php?mod=forum\" METHOD=\"post\">\n";
-
- $output .= "<B>Subject:</B><BR>\n";
- $output .= "<INPUT NAME=\"edit[title]\" SIZE=\"55\" VALUE=\"". check_textfield($edit[title]) ."\"><P>\n";
-
- $output .= structure_form("forum", $edit);
-
- $output .= "<B>Body:</B><BR>\n";
- $output .= "<TEXTAREA NAME=\"edit[body]\" COLS=\"55\" ROWS=\"10\" WRAP=\"virtual\">". check_textarea($edit[body]) ."</TEXTAREA><P>\n";
-
- $output .= "<INPUT TYPE=\"hidden\" NAME=\"edit[nid]\" VALUE=\"$edit[nid]\">\n";
-
- $output .= "<INPUT TYPE=\"submit\" NAME=\"op\" VALUE=\"Save forum\">\n";
- $output .= "</FORM>\n";
+ $form .= form_textfield(t("Subject"), "title", $edit[title], 50, 64);
+ $form .= structure_form("forum", $edit);
+ $form .= form_textarea(t("Body"), "body", $edit[body], 50, 10);
+ $form .= form_hidden("nid", $edit[nid]);
+ $form .= form_submit("Save forum");
- return $output;
+ return form("admin.php?mod=forum", $form);
}
function forum_save($edit) {
diff --git a/modules/forum/forum.module b/modules/forum/forum.module
index e5500f7a5..a67c31434 100644
--- a/modules/forum/forum.module
+++ b/modules/forum/forum.module
@@ -14,25 +14,22 @@ function forum_status() {
return array(dumped, posted);
}
+function forum_view($node) {
+ global $theme;
+ $output .= "<P><A HREF=\"module.php?mod=forum\">Forum</A> / <B><A HREF=\"node.php?id=$node->nid\">". check_output($node->title) ."</A></B>:</P><P>". check_output($node->body) ."</P>";
+ $theme->box(t("Discussion forum"), $output);
+}
+
function forum_form($edit = array()) {
global $format;
- $output .= "<FORM ACTION=\"admin.php?mod=forum\" METHOD=\"post\">\n";
-
- $output .= "<B>Subject:</B><BR>\n";
- $output .= "<INPUT NAME=\"edit[title]\" SIZE=\"55\" VALUE=\"". check_textfield($edit[title]) ."\"><P>\n";
-
- $output .= structure_form("forum", $edit);
-
- $output .= "<B>Body:</B><BR>\n";
- $output .= "<TEXTAREA NAME=\"edit[body]\" COLS=\"55\" ROWS=\"10\" WRAP=\"virtual\">". check_textarea($edit[body]) ."</TEXTAREA><P>\n";
-
- $output .= "<INPUT TYPE=\"hidden\" NAME=\"edit[nid]\" VALUE=\"$edit[nid]\">\n";
-
- $output .= "<INPUT TYPE=\"submit\" NAME=\"op\" VALUE=\"Save forum\">\n";
- $output .= "</FORM>\n";
+ $form .= form_textfield(t("Subject"), "title", $edit[title], 50, 64);
+ $form .= structure_form("forum", $edit);
+ $form .= form_textarea(t("Body"), "body", $edit[body], 50, 10);
+ $form .= form_hidden("nid", $edit[nid]);
+ $form .= form_submit("Save forum");
- return $output;
+ return form("admin.php?mod=forum", $form);
}
function forum_save($edit) {
diff --git a/modules/locale.module b/modules/locale.module
index 5fd20b48e..1ddde9a7c 100644
--- a/modules/locale.module
+++ b/modules/locale.module
@@ -39,21 +39,16 @@ function locale_save($id, $edit) {
}
function locale_edit($id) {
- global $languages;
+ global $languages, $REQUEST_URI;
+
$result = db_query("SELECT * FROM locales WHERE id = '$id'");
if ($translation = db_fetch_object($result)) {
- $output .= "<FORM ACTION=\"admin.php?mod=locale\" METHOD=\"post\">\n";
- $output .= "<B>Original string:</B><BR>\n";
- $output .= "<PRE>". wordwrap(check_output($translation->string)) ."</PRE><P>";
- foreach ($languages as $code=>$language) {
- $output .= "<B>$language:</B><BR>";
- $output .= (strlen($translation->string) > 30) ? "<TEXTAREA WRAP=\"virtual\" COLS=\"50\" ROWS=\"10\" NAME=\"edit[$code]\">". check_textarea($translation->$code) ."</TEXTAREA><P>" : "<INPUT TYPE=\"text\" NAME=\"edit[$code]\" SIZE=\"50\" VALUE=\"". check_textfield($translation->$code) ."\"><P>";
- }
- $output .= "<INPUT NAME=\"id\" TYPE=\"hidden\" VALUE=\"$id\">\n";
- $output .= "<INPUT NAME=\"op\" TYPE=\"submit\" VALUE=\"Save translations\">\n";
- $output .= "</FORM>\n";
-
- print $output;
+ $form .= form_item(t("Original text"), "<PRE>". wordwrap(check_output($translation->string)) ."</PRE>");
+ foreach ($languages as $code=>$language) $form .= (strlen($translation->string) > 30) ? form_textarea($language, $code, $translation->$code, 50, 10) : form_textfield($language, $code, $translation->$code, 50, 128);
+ $form .= form_hidden("id", $id);
+ $form .= form_submit("Save translations");
+
+ return form($REQUEST_URI, $form);
}
}
@@ -67,6 +62,7 @@ function locale_languages($translation) {
function locale_overview() {
$result = db_query("SELECT * FROM locales ORDER BY string");
+
$output .= "<TABLE BORDER=\"1\" CELLPADDING=\"2\" CELLSPACING=\"2\">\n";
$output .= " <TR><TH>string</TH><TH>languages</TH><TH COLSPAN=\"2\">operations</TH><TR>\n";
while ($locale = db_fetch_object($result)) {
@@ -74,7 +70,8 @@ function locale_overview() {
$output .= " <TR><TD>". check_output($locale->string) ."<BR><SMALL><I>$locale->location</I></SMALL></TD><TD ALIGN=\"center\">$languages</TD><TD><A HREF=\"admin.php?mod=locale&op=edit&id=$locale->id\">edit</A></TD><TD><A HREF=\"admin.php?mod=locale&op=delete&id=$locale->id\">delete</A></TD></TR>";
}
$output .= "</TABLE>\n";
- print $output;
+
+ return $output;
}
function locale_admin() {
@@ -84,20 +81,20 @@ function locale_admin() {
switch ($op) {
case "delete":
- locale_delete(check_input($id));
- locale_overview();
+ print status(locale_delete(check_input($id)));
+ print locale_overview();
break;
case "help":
- locale_help();
+ print locale_help();
break;
case "edit":
- locale_edit(check_input($id));
+ print locale_edit(check_input($id));
break;
case "Save translations":
- locale_save(check_input($id), $edit);
+ print locale_save(check_input($id), $edit);
// fall through
default:
- locale_overview();
+ print locale_overview();
}
}
diff --git a/modules/locale/locale.module b/modules/locale/locale.module
index 5fd20b48e..1ddde9a7c 100644
--- a/modules/locale/locale.module
+++ b/modules/locale/locale.module
@@ -39,21 +39,16 @@ function locale_save($id, $edit) {
}
function locale_edit($id) {
- global $languages;
+ global $languages, $REQUEST_URI;
+
$result = db_query("SELECT * FROM locales WHERE id = '$id'");
if ($translation = db_fetch_object($result)) {
- $output .= "<FORM ACTION=\"admin.php?mod=locale\" METHOD=\"post\">\n";
- $output .= "<B>Original string:</B><BR>\n";
- $output .= "<PRE>". wordwrap(check_output($translation->string)) ."</PRE><P>";
- foreach ($languages as $code=>$language) {
- $output .= "<B>$language:</B><BR>";
- $output .= (strlen($translation->string) > 30) ? "<TEXTAREA WRAP=\"virtual\" COLS=\"50\" ROWS=\"10\" NAME=\"edit[$code]\">". check_textarea($translation->$code) ."</TEXTAREA><P>" : "<INPUT TYPE=\"text\" NAME=\"edit[$code]\" SIZE=\"50\" VALUE=\"". check_textfield($translation->$code) ."\"><P>";
- }
- $output .= "<INPUT NAME=\"id\" TYPE=\"hidden\" VALUE=\"$id\">\n";
- $output .= "<INPUT NAME=\"op\" TYPE=\"submit\" VALUE=\"Save translations\">\n";
- $output .= "</FORM>\n";
-
- print $output;
+ $form .= form_item(t("Original text"), "<PRE>". wordwrap(check_output($translation->string)) ."</PRE>");
+ foreach ($languages as $code=>$language) $form .= (strlen($translation->string) > 30) ? form_textarea($language, $code, $translation->$code, 50, 10) : form_textfield($language, $code, $translation->$code, 50, 128);
+ $form .= form_hidden("id", $id);
+ $form .= form_submit("Save translations");
+
+ return form($REQUEST_URI, $form);
}
}
@@ -67,6 +62,7 @@ function locale_languages($translation) {
function locale_overview() {
$result = db_query("SELECT * FROM locales ORDER BY string");
+
$output .= "<TABLE BORDER=\"1\" CELLPADDING=\"2\" CELLSPACING=\"2\">\n";
$output .= " <TR><TH>string</TH><TH>languages</TH><TH COLSPAN=\"2\">operations</TH><TR>\n";
while ($locale = db_fetch_object($result)) {
@@ -74,7 +70,8 @@ function locale_overview() {
$output .= " <TR><TD>". check_output($locale->string) ."<BR><SMALL><I>$locale->location</I></SMALL></TD><TD ALIGN=\"center\">$languages</TD><TD><A HREF=\"admin.php?mod=locale&op=edit&id=$locale->id\">edit</A></TD><TD><A HREF=\"admin.php?mod=locale&op=delete&id=$locale->id\">delete</A></TD></TR>";
}
$output .= "</TABLE>\n";
- print $output;
+
+ return $output;
}
function locale_admin() {
@@ -84,20 +81,20 @@ function locale_admin() {
switch ($op) {
case "delete":
- locale_delete(check_input($id));
- locale_overview();
+ print status(locale_delete(check_input($id)));
+ print locale_overview();
break;
case "help":
- locale_help();
+ print locale_help();
break;
case "edit":
- locale_edit(check_input($id));
+ print locale_edit(check_input($id));
break;
case "Save translations":
- locale_save(check_input($id), $edit);
+ print locale_save(check_input($id), $edit);
// fall through
default:
- locale_overview();
+ print locale_overview();
}
}
diff --git a/modules/module.module b/modules/module.module
index 2ae3edb81..e4140ce22 100644
--- a/modules/module.module
+++ b/modules/module.module
@@ -5,7 +5,7 @@ $module = array("help" => "module_help",
function module_help() {
?>
- The module administration page provide you a list of all available modules. Moreover, it allows you to "rehash" modules. Whenever you install a new module or when an existing module has been changed or updated, it requires "rehasing": when you rehash a module, the module is registered to the engine and properly initialized.
+ The module administration page provide you a list of all available modules. Moreover, it allows you to "rehash" modules. Whenever you install a new module or when an existing module has been changed or updated, it requires "rehashing": when you rehash a module, the module is registered to the engine and properly initialized.
<?php
}
diff --git a/modules/node.module b/modules/node.module
index af5292fb4..d88f852d7 100644
--- a/modules/node.module
+++ b/modules/node.module
@@ -44,11 +44,11 @@ function node_admin_edit($id) {
$output .= "<FORM ACTION=\"admin.php?mod=node&id=$node->nid\" METHOD=\"post\">\n";
$output .= form_item("Title", check_output($node->title));
- $output .= form_select("Author", "author", array($node->author => $node->userid, $user->id => $user->userid), $node->author);
- $output .= form_select("Status", "status", node_status($node), $node->status);
- $output .= form_select("Comment", "comment", node_comment_status(), $node->comment);
- $output .= form_select("Promote", "promote", node_promote_status(), $node->promote);
- $output .= form_select("Date", "timestamp", array($node->timestamp => format_date($node->timestamp) ." (original)", time() => format_date(time()) ." (current)"), $node->timestamp);
+ $output .= form_select("Author", "author", $node->author, array($node->author => $node->userid, $user->id => $user->userid));
+ $output .= form_select("Status", "status", $node->status, node_status($node));
+ $output .= form_select("Comment", "comment", $node->comment, node_comment_status());
+ $output .= form_select("Promote", "promote", $node->promote, node_promote_status());
+ $output .= form_select("Date", "timestamp", $node->timestamp, array($node->timestamp => format_date($node->timestamp) ." (original)", time() => format_date(time()) ." (current)"));
$output .= form_hidden("nid", $node->nid);
$output .= form_submit("View node");
$output .= form_submit("Save node");
diff --git a/modules/node/node.module b/modules/node/node.module
index af5292fb4..d88f852d7 100644
--- a/modules/node/node.module
+++ b/modules/node/node.module
@@ -44,11 +44,11 @@ function node_admin_edit($id) {
$output .= "<FORM ACTION=\"admin.php?mod=node&id=$node->nid\" METHOD=\"post\">\n";
$output .= form_item("Title", check_output($node->title));
- $output .= form_select("Author", "author", array($node->author => $node->userid, $user->id => $user->userid), $node->author);
- $output .= form_select("Status", "status", node_status($node), $node->status);
- $output .= form_select("Comment", "comment", node_comment_status(), $node->comment);
- $output .= form_select("Promote", "promote", node_promote_status(), $node->promote);
- $output .= form_select("Date", "timestamp", array($node->timestamp => format_date($node->timestamp) ." (original)", time() => format_date(time()) ." (current)"), $node->timestamp);
+ $output .= form_select("Author", "author", $node->author, array($node->author => $node->userid, $user->id => $user->userid));
+ $output .= form_select("Status", "status", $node->status, node_status($node));
+ $output .= form_select("Comment", "comment", $node->comment, node_comment_status());
+ $output .= form_select("Promote", "promote", $node->promote, node_promote_status());
+ $output .= form_select("Date", "timestamp", $node->timestamp, array($node->timestamp => format_date($node->timestamp) ." (original)", time() => format_date(time()) ." (current)"));
$output .= form_hidden("nid", $node->nid);
$output .= form_submit("View node");
$output .= form_submit("Save node");
diff --git a/modules/page.module b/modules/page.module
index 0e188fe19..c6a2fbb86 100644
--- a/modules/page.module
+++ b/modules/page.module
@@ -31,28 +31,16 @@ function page_status() {
}
function page_form($edit = array()) {
- global $format;
+ global $format, $REQUEST_URI;
- $output .= "<FORM ACTION=\"admin.php?mod=page\" METHOD=\"post\">\n";
+ $form .= form_textfield(t("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_hidden("nid", $edit[nid]);
+ $form .= form_submit("Save page");
- $output .= "<B>Subject:</B><BR>\n";
- $output .= "<INPUT NAME=\"edit[title]\" SIZE=\"55\" VALUE=\"". check_textfield($edit[title]) ."\"><P>\n";
-
- $output .= structure_form("page", $edit);
-
- $output .= "<B>Body:</B><BR>\n";
- $output .= "<TEXTAREA NAME=\"edit[body]\" COLS=\"55\" ROWS=\"10\" WRAP=\"virtual\">". check_textarea($edit[body]) ."</TEXTAREA><P>\n";
-
- $output .= "<B>Type:</B><BR>\n";
- foreach ($format as $key=>$value) $options .= "<OPTION VALUE=\"$key\"". ($edit[format] == $key ? " SELECTED" : "") .">$value</OPTION>\n";
- $output .= "<SELECT NAME=\"edit[format]\">$options</SELECT><P>\n";
-
- $output .= "<INPUT TYPE=\"hidden\" NAME=\"edit[nid]\" VALUE=\"$edit[nid]\">\n";
-
- $output .= "<INPUT TYPE=\"submit\" NAME=\"op\" VALUE=\"Save page\">\n";
- $output .= "</FORM>\n";
-
- return $output;
+ return form($REQUEST_URI, $form);
}
function page_save($edit) {
diff --git a/modules/page/page.module b/modules/page/page.module
index 0e188fe19..c6a2fbb86 100644
--- a/modules/page/page.module
+++ b/modules/page/page.module
@@ -31,28 +31,16 @@ function page_status() {
}
function page_form($edit = array()) {
- global $format;
+ global $format, $REQUEST_URI;
- $output .= "<FORM ACTION=\"admin.php?mod=page\" METHOD=\"post\">\n";
+ $form .= form_textfield(t("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_hidden("nid", $edit[nid]);
+ $form .= form_submit("Save page");
- $output .= "<B>Subject:</B><BR>\n";
- $output .= "<INPUT NAME=\"edit[title]\" SIZE=\"55\" VALUE=\"". check_textfield($edit[title]) ."\"><P>\n";
-
- $output .= structure_form("page", $edit);
-
- $output .= "<B>Body:</B><BR>\n";
- $output .= "<TEXTAREA NAME=\"edit[body]\" COLS=\"55\" ROWS=\"10\" WRAP=\"virtual\">". check_textarea($edit[body]) ."</TEXTAREA><P>\n";
-
- $output .= "<B>Type:</B><BR>\n";
- foreach ($format as $key=>$value) $options .= "<OPTION VALUE=\"$key\"". ($edit[format] == $key ? " SELECTED" : "") .">$value</OPTION>\n";
- $output .= "<SELECT NAME=\"edit[format]\">$options</SELECT><P>\n";
-
- $output .= "<INPUT TYPE=\"hidden\" NAME=\"edit[nid]\" VALUE=\"$edit[nid]\">\n";
-
- $output .= "<INPUT TYPE=\"submit\" NAME=\"op\" VALUE=\"Save page\">\n";
- $output .= "</FORM>\n";
-
- return $output;
+ return form($REQUEST_URI, $form);
}
function page_save($edit) {
diff --git a/modules/settings.module b/modules/settings.module
index 8fdd27276..6952bbae6 100644
--- a/modules/settings.module
+++ b/modules/settings.module
@@ -5,85 +5,47 @@ $module = array("admin" => "settings_admin");
function settings_conf() {
global $conf, $cmodes, $corder, $themes;
+ // general settings:
$output .= "<H3>General settings</H3>\n";
-
- $output .= "<B>Sitename:</B><BR>\n";
- $output .= "<INPUT NAME=\"edit[site_name]\" MAXLENGTH=\"55\" SIZE=\"30\" VALUE=\"". variable_get(site_name, "drupal") ."\"><BR>\n";
- $output .= "<I><SMALL>The name of this website.</SMALL></I><P>\n";
-
- $output .= "<B>E-mail address:</B><BR>\n";
- $output .= "<INPUT NAME=\"edit[site_mail]\" MAXLENGTH=\"55\" SIZE=\"30\" VALUE=\"". variable_get(site_mail, "root@localhost") ."\"><BR>\n";
- $output .= "<I><SMALL>A valid e-mail address for this website, used by the auto-mailer to when creating new user accounts.</SMALL></I><P>\n";
-
- $output .= "<B>URL of site:</B><BR>\n";
- $output .= "<INPUT NAME=\"edit[site_url]\" MAXLENGTH=\"55\" SIZE=\"30\" VALUE=\"". variable_get(site_url, "http://drupal/") ."\"><BR>\n";
- $output .= "<I><SMALL>The fully qualified URL of this website: starts with \"http://\" and ends with a trailing slash!</SMALL></I><P>\n";
-
- $output .= "<B>Footer message:</B><BR>\n";
- $output .= "<TEXTAREA NAME=\"edit[site_footer]\" COLS=\"55\" ROWS=\"3\" WRAP=\"virtual\">". variable_get(site_footer, "") ."</TEXTAREA><BR>\n";
- $output .= "<I><SMALL>This text will be displayed at the bottom of each page. Useful to add a copyright notice to your pages.</SMALL></I><P>\n";
-
- $output .= "<B>Anonymous user:</B><BR>\n";
- $output .= "<INPUT NAME=\"edit[anonymous]\" MAXLENGTH=\"55\" SIZE=\"30\" VALUE=\"". variable_get(anonymous, "Anonymous") ."\"><BR>\n";
- $output .= "<I><SMALL>The name displayed for anonymous users.</SMALL></I><P>\n";
-
+ $output .= form_textfield(t("Name"), "site_name", variable_get(site_name, "drupal"), 30, 55, t("The name of this website."));
+ $output .= form_textfield(t("Slogan"), "site_slogan", variable_get(site_slogan, ""), 30, 55, t("The slogan of this website"));
+ $output .= form_textfield(t("URL"), "site_url", variable_get(site_url, "http://drupal/"), 30, 55, t("The fully qualified URL of this website: starts with \"http://\" and ends with a trailing slash!"));
+ $output .= form_textfield(t("E-mail address"), "site_mail", variable_get(site_mail, "root@localhost"), 30, 55, t("A valid e-mail address for this website, used by the auto-mailer to create new user accounts."));
+ $output .= form_textarea(t("Footer message"), "site_footer", variable_get(site_footer, ""), 55, 3, t("This text will be displayed at the bottom of each page. Useful for adding a copyright notice to your pages."));
+ $output .= form_textfield(t("Anonymous user"), "anonymous", variable_get(anonymous, "Anonymous"), 30, 55, t("The name used to indicate anonymous users."));
$output .= "<HR>\n";
- $output .= "<H3>Comment settings</H3>\n";
-
- $output .= "<B>Default display mode:</B><BR>\n";
- foreach ($cmodes as $key=>$value) $options1 .= "<OPTION VALUE=\"$key\"". ($conf[default_comment_mode] == $key ? " SELECTED" : "") .">$value</OPTION>\n";
- $output .= "<SELECT NAME=\"edit[default_comment_mode]\">$options1</SELECT><BR>\n";
- $output .= "<I><SMALL>The default mode in which comments are displayed.</SMALL></I><P>\n";
-
- $output .= "<B>Default display order:</B><BR>\n";
- foreach ($corder as $key=>$value) $options2 .= "<OPTION VALUE=\"$key\"". ($conf[default_comment_order] == $key ? " SELECTED" : "") .">$value</OPTION>\n";
- $output .= "<SELECT NAME=\"edit[default_comment_order]\">$options2</SELECT><BR>\n";
- $output .= "<I><SMALL>The default order in which comments are displayed.</SMALL></I><P>\n";
- $output .= "<B>Default threshold:</B><BR>\n";
- for ($i = -1; $i < 6; $i++) $options3 .= " <OPTION VALUE=\"$i\"". ($conf[default_comment_threshold] == $i ? " SELECTED" : "") .">Filter - $i</OPTION>";
- $output .= "<SELECT NAME=\"edit[default_comment_threshold]\">$options3</SELECT><BR>\n";
- $output .= "<I><SMALL>The default threshold used to filter comments.</SMALL></I><P>\n";
+ // node settings:
+ $output .= "<H3>Node settings</H3>\n";
+ $output .= form_select(t("Default number of nodes to display"), "default_nodes_main", variable_get(default_nodes_main, 10), array(10 => 10, 15 => 15, 20 => 20, 25 => 25, 30 => 30), t("The default maximum number of nodes to display on the main page."));
+ $output .= "<HR>\n";
+ // comment settings:
+ $output .= "<H3>Comment settings</H3>\n";
+ $output .= form_select(t("Default display mode"), "default_comment_mode", $conf[default_comment_mode], $cmodes, t("The default mode in which comments are displayed."));
+ $output .= form_select(t("Default display order"), "default_comment_order", $conf[default_comment_order], $corder, t("The default order in which comments are displayed."));
+ for ($count = -1; $count < 6; $count++) $threshold[$count] = t("Filter") ." - $count";
+ $output .= form_select(t("Default filter threshold"), "default_comment_threshold", $conf[default_comment_threshold], $threshold, t("The default threshold used to filter comments."));
$output .= "<HR>\n";
- $output .= "<H3>Submission settings</H3>\n";
+ // submission settings:
+ $output .= "<H3>Submission settings</H3>\n";
$size = array(1000 => "1.000 characters", 5000 => "5.000 characters", 10000 => "10.000 characters", 15000 => "15.000 characters", 30.000 => "30.000 characters", 50000 => "50.000 characters", 100000 => "100.000 characters");
-
- $output .= "<B>Maximum submission size:</B><BR>\n";
- foreach ($size as $key=>$value) $options4 .= " <OPTION VALUE=\"$key\"". ((variable_get(max_input_size, 10000) == $key) ? " SELECTED" : "") .">$value</OPTION>\n";
- $output .= "<SELECT NAME=\"edit[max_input_size]\">$options4</SELECT><BR>\n";
- $output .= "<I><SMALL>The maximum number of characters someone can enter in a form.</SMALL></I><P>\n";
-
+ $output .= form_select(t("Maximum submission size"), "max_input_size", variable_get(max_input_size, 10000), $size, t("The maximum number of characters someone can enter in a form."));
$rate = array(1 => "Maximum 1 every second", 5 => "Maximum 1 every 5 seconds", 15 => "Maximum 1 every 15 seconds", 30 => "Maximum 1 every 30 seconds", 60 => "Maximum 1 every minute", 300 => "Maximum 1 every 5 minutes", 900 => "Maximum 1 every 15 minutes", 1800 => "Maximum 1 every 30 minutes", 3600 => "Maximum 1 every hour", 21600 => "Maximum 1 every 6 hour", 43200 => "Maximum 1 every 12 hour");
-
- $output .= "<B>Maximum node rate:</B><BR>\n";
- foreach ($rate as $key=>$value) $options5 .= " <OPTION VALUE=\"$key\"". ((variable_get(max_node_rate, 900) == $key) ? " SELECTED" : "") .">$value</OPTION>\n";
- $output .= "<SELECT NAME=\"edit[max_node_rate]\">$options5</SELECT><BR>\n";
- $output .= "<I><SMALL>The maximum submission rate for nodes. Its purpose is to stop potential abuse or denial of service attacks.</SMALL></I><P>\n";
-
- $output .= "<B>Maximum comment rate:</B><BR>\n";
- foreach ($rate as $key=>$value) $options6 .= " <OPTION VALUE=\"$key\"". ((variable_get(max_comment_rate, 120) == $key) ? " SELECTED" : "") .">$value</OPTION>\n";
- $output .= "<SELECT NAME=\"edit[max_comment_rate]\"$options6</SELECT><BR>\n";
- $output .= "<I><SMALL>The maximum submission rate for comments. Its purpose is to stop potential abuse or denial of service attacks.</SMALL></I><P>\n";
-
+ $output .= form_select(t("Maximum node rate"), "max_node_rate", variable_get(max_node_rate, 900), $rate, t("The maximum submission rate for nodes. Its purpose is to stop potential abuse or denial of service attacks."));
+ $output .= form_select(t("Maximum comment rate"), "max_comment_rate", variable_get(max_comment_rate, 120), $rate, t("The maximum submission rate for comments. Its purpose is to stop potential abuse or denial of service attacks."));
$output .= "<HR>\n";
- $output .= "<H3>Theme settings</H3>\n";
-
- $output .= "<B>Default theme:</B><BR>\n";
- foreach ($themes as $key=>$value) $options7 .= "<OPTION VALUE=\"$key\"". (variable_get(theme_default, key($themes)) == $key ? " SELECTED" : "") .">$key</OPTION>\n";
- $output .= "<SELECT NAME=\"edit[theme_default]\">$options7</SELECT><BR>\n";
- $output .= "<I><SMALL>The default theme displayed for anonymous users.</SMALL></I><P>\n";
+ // theme settings:
+ $output .= "<H3>Theme settings</H3>\n";
+ foreach ($themes as $key=>$value) $options .= "<OPTION VALUE=\"$key\"". (variable_get(theme_default, key($themes)) == $key ? " SELECTED" : "") .">$key</OPTION>\n";
+ $output .= form_item(t("Default theme"), "<SELECT NAME=\"edit[theme_default]\">$options</SELECT>", t("The default theme as seen by new visitors and anonymous users."));
$output .= "<HR>\n";
+ // development settings:
$output .= "<H3>Development settings</H3>\n";
-
- $output .= "<B>Display timings:</B><BR>\n";
- foreach (array("Disabled", "Enabled") as $key=>$value) $options8 .= "<OPTION VALUE=\"$key\"". (variable_get(dev_timing, 0) == $key ? " SELECTED" : "") .">$value</OPTION>\n";
- $output .= "<SELECT NAME=\"edit[dev_timing]\">$options8</SELECT><BR>\n";
- $output .= "<I><SMALL>Display the time it took to generate a page: for drupal development only.</SMALL></I><P>\n";
-
+ $output .= form_select(t("Display timings"), "dev_timing", variable_get(dev_timing, 0), array("Disabled", "Enabled"), t("Display the time it took to generate a page: for drupal development only."));
$output .= "<HR>\n";
return $output;
@@ -119,14 +81,12 @@ function settings_overview() {
module_iterate("settings_module");
- $output .= "<FORM ACTION=\"admin.php?mod=settings\" METHOD=\"post\">\n";
- $output .= settings_conf();
- $output .= $settings;
- $output .= "<INPUT TYPE=\"submit\" NAME=\"op\" VALUE=\"Save settings\">\n";
- $output .= "<INPUT TYPE=\"submit\" NAME=\"op\" VALUE=\"Reset to defaults\">\n";
- $output .= "</FORM>\n";
+ $form .= settings_conf();
+ $form .= $settings;
+ $form .= form_submit("Save settings");
+ $form .= form_submit("Reset to defaults");
- return $output;
+ return form("admin.php?mod=settings", $form);
}
function settings_admin() {
diff --git a/modules/story.module b/modules/story.module
index 2a14200fc..665f221b1 100644
--- a/modules/story.module
+++ b/modules/story.module
@@ -55,48 +55,35 @@ function story_view($node, $main = 0) {
function story_form($edit = array()) {
global $allowed_html, $REQUEST_URI, $user;
- $output .= "<FORM ACTION=\"$REQUEST_URI\" METHOD=\"post\">\n";
-
- $output .= "<B>". t("Your name") .":</B><BR>\n";
- $output .= "<INPUT TYPE=\"hidden\" NAME=\"edit[userid]\" VALUE=\"$edit[userid]\">\n";
- $output .= format_username(($edit[userid] ? $edit[userid] : $user->userid)) ."<P>";
-
- $output .= "<B>". t("Subject") .":</B><BR>\n";
- $output .= "<INPUT TYPE=\"text\" NAME=\"edit[title]\" SIZE=\"50\" MAXLENGTH=\"60\" VALUE=\"". check_textfield($edit[title]) ."\"><P>\n";
-
- $output .= structure_form("story", $edit);
-
- $output .= "<B>". t("Abstract") .":</B><BR>\n";
- $output .= "<TEXTAREA WRAP=\"virtual\" COLS=\"50\" ROWS=\"10\" NAME=\"edit[abstract]\">". check_textarea($edit[abstract]) ."</TEXTAREA><BR>\n";
- $output .= "<SMALL><I>". t("Allowed HTML tags") .": ". htmlspecialchars($allowed_html) .".</I></SMALL><P>\n";
-
- $output .= "<B>". t("Body") .":</B><BR>\n";
- $output .= "<TEXTAREA WRAP=\"virtual\" COLS=\"50\" ROWS=\"15\" NAME=\"edit[body]\">". check_textarea($edit[body]) ."</TEXTAREA><BR>\n";
- $output .= "<SMALL><I>". t("Allowed HTML tags") .": ". htmlspecialchars($allowed_html) .".</I></SMALL><P>\n";
+ $form .= form_item(t("Your name"), 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 .= structure_form("story", $edit);
+ $form .= form_textarea(t("Abstract"), "abstract", $edit[abstract], 50, 10, t("Allowed HTML tags") .": ". htmlspecialchars($allowed_html));
+ $form .= form_textarea(t("Body"), "body", $edit[body], 50, 15, t("Allowed HTML tags") .": ". htmlspecialchars($allowed_html));
if (user_access($user, "story")) {
- $output .= "<INPUT TYPE=\"hidden\" NAME=\"edit[timestamp]\" VALUE=\"$edit[timestamp]\">\n";
- $output .= "<INPUT TYPE=\"hidden\" NAME=\"edit[nid]\" VALUE=\"$edit[nid]\">\n";
+ $form .= form_hidden("timestamp", $edit[timestamp]);
+ $form .= form_hidden("nid", $edit[nid]);
}
if (!$edit) {
- $output .= "<INPUT TYPE=\"submit\" NAME=\"op\" VALUE=\"". t("Preview") ."\">\n";
+ $form .= form_submit(t("Preview"));
}
else if (!$edit[title]) {
$output .= "<FONT COLOR=\"red\">". t("Warning: you did not supply a subject.") ."</FONT><P>\n";
- $output .= "<INPUT TYPE=\"submit\" NAME=\"op\" VALUE=\"". t("Preview") ."\">\n";
+ $form .= form_submit(t("Preview"));
}
else if (!$edit[abstract]) {
$output .= "<FONT COLOR=\"red\">". t("Warning: you did not supply an abstract.") ."</FONT><P>\n";
- $output .= "<INPUT TYPE=\"submit\" NAME=\"op\" VALUE=\"". t("Preview") ."\">\n";
+ $form .= form_submit(t("Preview"));
}
else {
- $output .= "<INPUT TYPE=\"submit\" NAME=\"op\" VALUE=\"". t("Preview") ."\">\n";
- $output .= "<INPUT TYPE=\"submit\" NAME=\"op\" VALUE=\"". t("Submit") ."\">\n";
+ $form .= form_submit(t("Preview"));
+ $form .= form_submit(t("Submit"));
}
- $output .= "</FORM>\n";
- return $output;
+ return form($REQUEST_URI, $form);
}
function story_save($edit) {
diff --git a/modules/story/story.module b/modules/story/story.module
index 2a14200fc..665f221b1 100644
--- a/modules/story/story.module
+++ b/modules/story/story.module
@@ -55,48 +55,35 @@ function story_view($node, $main = 0) {
function story_form($edit = array()) {
global $allowed_html, $REQUEST_URI, $user;
- $output .= "<FORM ACTION=\"$REQUEST_URI\" METHOD=\"post\">\n";
-
- $output .= "<B>". t("Your name") .":</B><BR>\n";
- $output .= "<INPUT TYPE=\"hidden\" NAME=\"edit[userid]\" VALUE=\"$edit[userid]\">\n";
- $output .= format_username(($edit[userid] ? $edit[userid] : $user->userid)) ."<P>";
-
- $output .= "<B>". t("Subject") .":</B><BR>\n";
- $output .= "<INPUT TYPE=\"text\" NAME=\"edit[title]\" SIZE=\"50\" MAXLENGTH=\"60\" VALUE=\"". check_textfield($edit[title]) ."\"><P>\n";
-
- $output .= structure_form("story", $edit);
-
- $output .= "<B>". t("Abstract") .":</B><BR>\n";
- $output .= "<TEXTAREA WRAP=\"virtual\" COLS=\"50\" ROWS=\"10\" NAME=\"edit[abstract]\">". check_textarea($edit[abstract]) ."</TEXTAREA><BR>\n";
- $output .= "<SMALL><I>". t("Allowed HTML tags") .": ". htmlspecialchars($allowed_html) .".</I></SMALL><P>\n";
-
- $output .= "<B>". t("Body") .":</B><BR>\n";
- $output .= "<TEXTAREA WRAP=\"virtual\" COLS=\"50\" ROWS=\"15\" NAME=\"edit[body]\">". check_textarea($edit[body]) ."</TEXTAREA><BR>\n";
- $output .= "<SMALL><I>". t("Allowed HTML tags") .": ". htmlspecialchars($allowed_html) .".</I></SMALL><P>\n";
+ $form .= form_item(t("Your name"), 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 .= structure_form("story", $edit);
+ $form .= form_textarea(t("Abstract"), "abstract", $edit[abstract], 50, 10, t("Allowed HTML tags") .": ". htmlspecialchars($allowed_html));
+ $form .= form_textarea(t("Body"), "body", $edit[body], 50, 15, t("Allowed HTML tags") .": ". htmlspecialchars($allowed_html));
if (user_access($user, "story")) {
- $output .= "<INPUT TYPE=\"hidden\" NAME=\"edit[timestamp]\" VALUE=\"$edit[timestamp]\">\n";
- $output .= "<INPUT TYPE=\"hidden\" NAME=\"edit[nid]\" VALUE=\"$edit[nid]\">\n";
+ $form .= form_hidden("timestamp", $edit[timestamp]);
+ $form .= form_hidden("nid", $edit[nid]);
}
if (!$edit) {
- $output .= "<INPUT TYPE=\"submit\" NAME=\"op\" VALUE=\"". t("Preview") ."\">\n";
+ $form .= form_submit(t("Preview"));
}
else if (!$edit[title]) {
$output .= "<FONT COLOR=\"red\">". t("Warning: you did not supply a subject.") ."</FONT><P>\n";
- $output .= "<INPUT TYPE=\"submit\" NAME=\"op\" VALUE=\"". t("Preview") ."\">\n";
+ $form .= form_submit(t("Preview"));
}
else if (!$edit[abstract]) {
$output .= "<FONT COLOR=\"red\">". t("Warning: you did not supply an abstract.") ."</FONT><P>\n";
- $output .= "<INPUT TYPE=\"submit\" NAME=\"op\" VALUE=\"". t("Preview") ."\">\n";
+ $form .= form_submit(t("Preview"));
}
else {
- $output .= "<INPUT TYPE=\"submit\" NAME=\"op\" VALUE=\"". t("Preview") ."\">\n";
- $output .= "<INPUT TYPE=\"submit\" NAME=\"op\" VALUE=\"". t("Submit") ."\">\n";
+ $form .= form_submit(t("Preview"));
+ $form .= form_submit(t("Submit"));
}
- $output .= "</FORM>\n";
- return $output;
+ return form($REQUEST_URI, $form);
}
function story_save($edit) {
diff --git a/modules/structure.module b/modules/structure.module
index 8bcc21978..2f5138431 100644
--- a/modules/structure.module
+++ b/modules/structure.module
@@ -105,9 +105,9 @@ function topic_overview() {
$tree = topic_tree();
$output .= "<TABLE BORDER=\"1\" CELLPADDING=\"2\" CELLSPACING=\"2\">\n";
- $output .= " <TR><TH>name</TH><TH>read access</TH><TH>write access</TH><TH>operations</TH></TR>\n";
+ $output .= " <TR><TH>name</TH><TH>operations</TH></TR>\n";
foreach ($tree as $id=>$name) {
- $output .= " <TR><TD>". check_output($name) ."</TD><TD ALIGN=\"center\">all</TD><TD ALIGN=\"center\">all</TD><TD><A HREF=\"admin.php?mod=structure&type=topic&op=edit&id=$id\">edit topic</A></TD></TR>\n";
+ $output .= " <TR><TD>". check_output($name) ."</TD><TD><A HREF=\"admin.php?mod=structure&type=topic&op=edit&id=$id\">edit topic</A></TD></TR>\n";
}
$output .= "</TABLE>\n";
return $output;
diff --git a/modules/wishlist.module b/modules/wishlist.module
deleted file mode 100644
index a1d789a38..000000000
--- a/modules/wishlist.module
+++ /dev/null
@@ -1,64 +0,0 @@
-<?php
-
-$module = array("page" => "wishlist_page",
- "help" => "wishlist_help");
-
-function wishlist_page() {
- ?>
- <H1>Wishlist</H1>
- <SMALL><I>$Id$</I></SMALL>
-
- <H3>Users</H3>
- <UL>
- <LI>auto-set default theme according to popularity or date</LI>
- <LI>allow users to change their e-mail address: this will require validation through our confirmation procedure</LI>
- <LI><I>see section "Modules" for more user oriented features</I></LI>
- </UL>
-
- <H3>Adminstration</H3>
- <UL>
- <LI>auto-backup functionality</LI>
- <LI>auto-clean-up functionality (e.g. user's history field)</LI>
- </UL>
-
- <H3>Engine</H3>
- <UL>
- <LI>post/edit hash - magic cookie: to prevent malicious external access and to prevent duplicate posts because of hitting the "reload" button</LI>
- <LI>URL validator</LI>
- <LI>archive function</LI>
- <LI>caching</LI>
- <LI>more configuration options:</LI>
- <UL>
- <LI>enable/disable anonymous users</LI>
- <LI>enable/disable comments - pending comments</LI>
- </UL>
- </UL>
-
- <H3>Modules</H3>
- <UL>
- <LI>messaging between administrators/users</LI>
- <LI>links/bookmarks manager</LI>
- <LI>public userlist</LI>
- <LI>visitor/referals statistics</LI>
- <LI>banner ad/rotation/tracking or affiliate program</LI>
- <LI>voting polls</LI>
- <LI>daily/weekly e-mail digest - mailing list</LI>
- <LI>daily/weekly site reports - mailing list</LI>
- <LI>featured stories - story index grouped by category</LI>
- <LI>review system</LI>
- </UL>
-
- <H3>Themes</H3>
- <UL>
- <LI>create a theme with topic icons - graphical theme</LI>
- <LI>create a theme with black background - darker theme</LI>
- <LI>try to get existing themes HTML validated</LI>
- </UL>
- <?php
-}
-
-function wishlist_help() {
- print "See <A HREF=\"module.php?mod=wishlist\">feature wishlist</A>.";
-}
-
-?> \ No newline at end of file