Commit 62615ce0 authored by Dries's avatar Dries

- page.module:

   + we no longer wrap the output in a $theme->box().  If you want it in
     a box, just use $theme->box().
   + increased the sizes of the main "body"-form to make editing larger
     pages easier.
parent 959b77c3
......@@ -16,7 +16,7 @@ function page_view($node, $main = 0) {
$output = check_output($node->body, 1);
}
$theme->box(check_output($node->title), $output);
print $output;
}
function page_status() {
......@@ -27,8 +27,7 @@ function page_form($edit = array()) {
global $format, $REQUEST_URI;
$form .= form_textfield("Subject", "title", $edit[title], 50, 64);
$form .= structure_form("page", $edit);
$form .= form_textarea("Body", "body", $edit[body], 50, 10);
$form .= form_textarea("Body", "body", $edit[body], 80, 30);
$form .= form_select("Type", "format", $edit[format], $format);
$form .= form_hidden("nid", $edit[nid]);
$form .= form_submit("Submit");
......@@ -40,7 +39,7 @@ function page_save($edit) {
global $status, $user;
if (user_access($user)) {
node_save($edit, array(author => $user->id, body, cid, comment => variable_get("page_comment", 0), format, moderate => variable_get("page_moderate", ""), promote => variable_get("page_promote", 0), score => 0, status => $status[posted], tid, timestamp => time(), title, type => "page", votes => 0));
node_save($edit, array(author => $user->id, body, comment => variable_get("page_comment", 0), format, moderate => variable_get("page_moderate", ""), promote => variable_get("page_promote", 0), score => 0, status => $status[posted], timestamp => time(), title, type => "page", votes => 0));
}
}
......
......@@ -16,7 +16,7 @@ function page_view($node, $main = 0) {
$output = check_output($node->body, 1);
}
$theme->box(check_output($node->title), $output);
print $output;
}
function page_status() {
......@@ -27,8 +27,7 @@ function page_form($edit = array()) {
global $format, $REQUEST_URI;
$form .= form_textfield("Subject", "title", $edit[title], 50, 64);
$form .= structure_form("page", $edit);
$form .= form_textarea("Body", "body", $edit[body], 50, 10);
$form .= form_textarea("Body", "body", $edit[body], 80, 30);
$form .= form_select("Type", "format", $edit[format], $format);
$form .= form_hidden("nid", $edit[nid]);
$form .= form_submit("Submit");
......@@ -40,7 +39,7 @@ function page_save($edit) {
global $status, $user;
if (user_access($user)) {
node_save($edit, array(author => $user->id, body, cid, comment => variable_get("page_comment", 0), format, moderate => variable_get("page_moderate", ""), promote => variable_get("page_promote", 0), score => 0, status => $status[posted], tid, timestamp => time(), title, type => "page", votes => 0));
node_save($edit, array(author => $user->id, body, comment => variable_get("page_comment", 0), format, moderate => variable_get("page_moderate", ""), promote => variable_get("page_promote", 0), score => 0, status => $status[posted], timestamp => time(), title, type => "page", votes => 0));
}
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment