summaryrefslogtreecommitdiff
path: root/modules/block.module
diff options
context:
space:
mode:
authorDries Buytaert <dries@buytaert.net>2002-12-24 15:40:32 +0000
committerDries Buytaert <dries@buytaert.net>2002-12-24 15:40:32 +0000
commit22fa9ed70a512feb6d603d24218e9a7db7610a0e (patch)
tree16b69a177c1645a7d3474bfe06e0571d7280b5d9 /modules/block.module
parentca07ff36d600e778a71dbe52dce9e82c3f1ebd92 (diff)
downloadbrdo-22fa9ed70a512feb6d603d24218e9a7db7610a0e.tar.gz
brdo-22fa9ed70a512feb6d603d24218e9a7db7610a0e.tar.bz2
- Refactored the administration pages.
Diffstat (limited to 'modules/block.module')
-rw-r--r--modules/block.module16
1 files changed, 6 insertions, 10 deletions
diff --git a/modules/block.module b/modules/block.module
index 406314ab5..be7ac7644 100644
--- a/modules/block.module
+++ b/modules/block.module
@@ -49,10 +49,13 @@ function block_perm() {
function block_link($type) {
if ($type == "admin" && user_access("administer blocks")) {
- $links[] = la(t("blocks"), array("mod" => "block"));
- }
+ $help["block"] = "Blocks are the boxes visible in the side bars on the left- and right-hand side of the website. They are either exported by the Drupal or by any of the active modules. Adminstrators can enable or disable block, as well control the block placement by assigning them a region and/or by assigning each block (within a region) a weight to sort them vertically. The path setting lets you define which pages you want the specific blocks to be shown.";
- return $links ? $links : array();
+ menu_add("block management", "admin.php?mod=block", "Block management", $help["block"], NULL, 2);
+ menu_add("add new block", "admin.php?mod=block&op=add", "Create a new block", $help["block"], "block management", 2);
+ menu_add("preview placement", "admin.php?mod=block&op=preview", "Preview the block placement", $help["block"], "block management", 3);
+ menu_add("help", "admin.php?mod=block&op=help", "More information about blocks", NULL, "block management", 5);
+ }
}
function block_block($op = "list", $delta = 0) {
@@ -267,13 +270,6 @@ function block_admin() {
if (user_access("administer blocks")) {
- $links[] = la(t("configure"), array("mod" => "block"));
- $links[] = la(t("add block"), array("mod" => "block", "op" => "add"));
- $links[] = la(t("preview"), array("mod" => "block", "op" => "preview"));
- $links[] = la(t("help"), array("mod" => "block", "op" => "help"));
-
- print "<small>". implode(" | ", $links) ."</small><hr />";
-
switch ($op) {
case "help":
block_help();