From 554d9b080b4be1c3ddfae75d79a0789da8c80cf2 Mon Sep 17 00:00:00 2001 From: Dries Buytaert Date: Sun, 7 Jan 2001 19:21:28 +0000 Subject: - fixed 2 small bugs in account.php - drastically improved administration section - drastically revamped story administration: added new feature to schedule the publishing of stories - applied correct naming conventions to submission.php - fixed 1 small glitch in boxes - somewhat expanded the documentation = changed one SQL table - updated the faq with info on drupal - ... and more things I forgot about --- modules/box.module | 19 ++++++++++++++++--- 1 file changed, 16 insertions(+), 3 deletions(-) (limited to 'modules/box.module') diff --git a/modules/box.module b/modules/box.module index d4f352567..70124bc31 100644 --- a/modules/box.module +++ b/modules/box.module @@ -39,7 +39,7 @@ function box_block() { $i = 0; while ($block = db_fetch_object($result)) { $blocks[$i]["subject"] = check_output($block->subject); - $blocks[$i]["content"] = ($block->type == 2) ? eval($block->content) : check_output($block->content); + $blocks[$i]["content"] = ($block->type == 2) ? eval($block->content) : check_output($block->content, ($block->type == 1) ? 0 : 1); $blocks[$i]["info"] = check_output($block->info); $blocks[$i]["link"] = check_output($block->link); $i++; @@ -58,13 +58,19 @@ function box_admin_display() { $output .= " Subject:". format_data($block->subject) ."\n"; $output .= " Content:". nl2br(htmlentities($block->content)) ."\n"; $output .= " Type:". $type[$block->type] ."\n"; - $output .= " Description:". format_data($block->info) ."\n"; + $output .= " Description:". format_data($block->info) ."\n"; $output .= " Link:". format_url($block->link) ."\n"; $output .= " Operations:id\">edit, id\">delete\n"; $output .= "\n"; $output .= "

\n"; } + print $output; +} + +function box_admin_new() { + $type = array(0 => "ASCII", 1 => "HTML", 2 => "PHP"); + foreach ($type as $key=>$value) { $selection .= " \n"; } @@ -79,7 +85,6 @@ function box_admin_display() { $output .= " Operations:\n"; $output .= "\n"; $output .= "\n"; - print $output; } @@ -146,6 +151,8 @@ function box_admin_save($id, $subject, $content, $info, $link, $type) { function box_admin() { global $op, $id, $subject, $content, $info, $link, $type; + print "add new box | overview | help
\n"; + switch ($op) { case "Add box": box_admin_add($subject, $content, $info, $link, $type); @@ -157,6 +164,12 @@ function box_admin() { box_admin_display(); box_admin_rehash(); break; + case "help": + box_help(); + break; + case "add": + box_admin_new(); + break; case "edit": box_admin_edit($id); break; -- cgit v1.2.3