diff --git a/modules/block.module b/modules/block.module index a4b29e4656a..e74a80ac831 100644 --- a/modules/block.module +++ b/modules/block.module @@ -1,11 +1,11 @@ Blocks are the boxes visible in the sidebar(s) of your web site. These are usually generated automatically by modules (e.g. recent forum topics), but you can also create your own blocks using either static HTML or dynamic PHP content.

"; $output .= "

The sidebar each block appears in depends on both which theme you're using (some are left-only, some right, some both), and on the settings in block management.

Whether a block is visible in the first place depends on three things:

"; $output .= "

The block management screen also lets you specify the vertical sort-order of the blocks within a sidebar. You do this by assigning a weight to each block. Lighter blocks (smaller weight) \"float up\" towards the top of the sidebar. Heavier ones \"sink down\" towards the bottom of it. Once you've positioned things just so, you can preview what the layout will look like in different types of themes by clicking the preview placement link in the menu to the left.

"; @@ -162,8 +162,8 @@ function block_admin_display() { foreach ($blocks as $block) { if ($block["module"] == "block") { - $edit = l(t("edit"), "admin/block/edit/". $block["delta"]); - $delete = l(t("delete"), "admin/block/delete/". $block["delta"]); + $edit = l(t("edit"), "admin/system/block/edit/". $block["delta"]); + $delete = l(t("delete"), "admin/system/block/delete/". $block["delta"]); } else { $edit = ""; @@ -284,7 +284,7 @@ function block_admin() { if (user_access("administer blocks")) { if (empty($op)) { - $op = arg(2); + $op = arg(3); } switch ($op) { @@ -295,10 +295,10 @@ function block_admin() { $output = block_box_form(); break; case "edit": - $output = block_box_form(block_box_get(arg(3))); + $output = block_box_form(block_box_get(arg(4))); break; case "delete": - $output = status(block_box_delete(arg(3))); + $output = status(block_box_delete(arg(4))); cache_clear_all(); $output .= block_admin_display(); break; diff --git a/modules/block/block.module b/modules/block/block.module index a4b29e4656a..e74a80ac831 100644 --- a/modules/block/block.module +++ b/modules/block/block.module @@ -1,11 +1,11 @@ Blocks are the boxes visible in the sidebar(s) of your web site. These are usually generated automatically by modules (e.g. recent forum topics), but you can also create your own blocks using either static HTML or dynamic PHP content.

"; $output .= "

The sidebar each block appears in depends on both which theme you're using (some are left-only, some right, some both), and on the settings in block management.

Whether a block is visible in the first place depends on three things:

"; $output .= "

The block management screen also lets you specify the vertical sort-order of the blocks within a sidebar. You do this by assigning a weight to each block. Lighter blocks (smaller weight) \"float up\" towards the top of the sidebar. Heavier ones \"sink down\" towards the bottom of it. Once you've positioned things just so, you can preview what the layout will look like in different types of themes by clicking the preview placement link in the menu to the left.

"; @@ -162,8 +162,8 @@ function block_admin_display() { foreach ($blocks as $block) { if ($block["module"] == "block") { - $edit = l(t("edit"), "admin/block/edit/". $block["delta"]); - $delete = l(t("delete"), "admin/block/delete/". $block["delta"]); + $edit = l(t("edit"), "admin/system/block/edit/". $block["delta"]); + $delete = l(t("delete"), "admin/system/block/delete/". $block["delta"]); } else { $edit = ""; @@ -284,7 +284,7 @@ function block_admin() { if (user_access("administer blocks")) { if (empty($op)) { - $op = arg(2); + $op = arg(3); } switch ($op) { @@ -295,10 +295,10 @@ function block_admin() { $output = block_box_form(); break; case "edit": - $output = block_box_form(block_box_get(arg(3))); + $output = block_box_form(block_box_get(arg(4))); break; case "delete": - $output = status(block_box_delete(arg(3))); + $output = status(block_box_delete(arg(4))); cache_clear_all(); $output .= block_admin_display(); break; diff --git a/modules/statistics.module b/modules/statistics.module index ce91eadc913..fbfd3bc3973 100644 --- a/modules/statistics.module +++ b/modules/statistics.module @@ -280,29 +280,9 @@ function statistics_admin() { case "Submit \"top nodes\" block changes": statistics_save_topnodes_block($edit); $output .= status(t("saved 'top nodes' block changes.")); - case "top nodes block": - $output .= statistics_config_topnodes_block(array( - "statistics_block_top_title" => variable_get("statistics_block_top_title", "Top nodes"), - "statistics_block_top_day_head" => variable_get("statistics_block_top_day_head", "Todays top:"), - "statistics_block_top_day_num" => variable_get("statistics_block_top_day_num", 0), - "statistics_block_top_all_head" => variable_get("statistics_block_top_all_head", "All time top:"), - "statistics_block_top_all_num" => variable_get("statistics_block_top_all_num", 0), - "statistics_block_top_last_head" => variable_get("statistics_block_top_last_head" ,"Last:"), - "statistics_block_top_last_num" => variable_get("statistics_block_top_last_num", 0) - )); - break; case "Submit \"who's online\" block changes": statistics_save_online_block($edit); $output .= status(t("saved 'who's online' block changes.")); - case "whos online block": - $output .= statistics_config_online_block(array( - "statistics_block_online_title" => variable_get("statistics_block_online_title", "Who's online"), - "statistics_block_online_subtitle" => variable_get("statistics_block_online_subtitle", "Online users:"), - "statistics_block_online_time" => variable_get("statistics_block_online_time", 2700), - "statistics_block_online_max_len" => variable_get("statistics_block_online_max_len", 15), - "statistics_block_online_max_cnt" => variable_get("statistics_block_online_max_cnt", 10) - )); - break; case "Submit \"top nodes\" page changes": statistics_save_userconfig($edit); $output .= status(t("saved 'top nodes' page changes.")); @@ -317,6 +297,28 @@ function statistics_admin() { "statistics_userpage_last_cnt" => variable_get("statistics_userpage_last_cnt", 0) )); break; + case "block": + if (arg(3) == "top nodes block") { + $output .= statistics_config_topnodes_block(array( + "statistics_block_top_title" => variable_get("statistics_block_top_title", "Top nodes"), + "statistics_block_top_day_head" => variable_get("statistics_block_top_day_head", "Todays top:"), + "statistics_block_top_day_num" => variable_get("statistics_block_top_day_num", 0), + "statistics_block_top_all_head" => variable_get("statistics_block_top_all_head", "All time top:"), + "statistics_block_top_all_num" => variable_get("statistics_block_top_all_num", 0), + "statistics_block_top_last_head" => variable_get("statistics_block_top_last_head" ,"Last:"), + "statistics_block_top_last_num" => variable_get("statistics_block_top_last_num", 0) + )); + } + elseif (arg(3) == "whos online block") { + $output .= statistics_config_online_block(array( + "statistics_block_online_title" => variable_get("statistics_block_online_title", "Who's online"), + "statistics_block_online_subtitle" => variable_get("statistics_block_online_subtitle", "Online users:"), + "statistics_block_online_time" => variable_get("statistics_block_online_time", 2700), + "statistics_block_online_max_len" => variable_get("statistics_block_online_max_len", 15), + "statistics_block_online_max_cnt" => variable_get("statistics_block_online_max_cnt", 10) + )); + break; + } default: $output .= statistics_admin_topnodes(); } diff --git a/modules/statistics/statistics.module b/modules/statistics/statistics.module index ce91eadc913..fbfd3bc3973 100644 --- a/modules/statistics/statistics.module +++ b/modules/statistics/statistics.module @@ -280,29 +280,9 @@ function statistics_admin() { case "Submit \"top nodes\" block changes": statistics_save_topnodes_block($edit); $output .= status(t("saved 'top nodes' block changes.")); - case "top nodes block": - $output .= statistics_config_topnodes_block(array( - "statistics_block_top_title" => variable_get("statistics_block_top_title", "Top nodes"), - "statistics_block_top_day_head" => variable_get("statistics_block_top_day_head", "Todays top:"), - "statistics_block_top_day_num" => variable_get("statistics_block_top_day_num", 0), - "statistics_block_top_all_head" => variable_get("statistics_block_top_all_head", "All time top:"), - "statistics_block_top_all_num" => variable_get("statistics_block_top_all_num", 0), - "statistics_block_top_last_head" => variable_get("statistics_block_top_last_head" ,"Last:"), - "statistics_block_top_last_num" => variable_get("statistics_block_top_last_num", 0) - )); - break; case "Submit \"who's online\" block changes": statistics_save_online_block($edit); $output .= status(t("saved 'who's online' block changes.")); - case "whos online block": - $output .= statistics_config_online_block(array( - "statistics_block_online_title" => variable_get("statistics_block_online_title", "Who's online"), - "statistics_block_online_subtitle" => variable_get("statistics_block_online_subtitle", "Online users:"), - "statistics_block_online_time" => variable_get("statistics_block_online_time", 2700), - "statistics_block_online_max_len" => variable_get("statistics_block_online_max_len", 15), - "statistics_block_online_max_cnt" => variable_get("statistics_block_online_max_cnt", 10) - )); - break; case "Submit \"top nodes\" page changes": statistics_save_userconfig($edit); $output .= status(t("saved 'top nodes' page changes.")); @@ -317,6 +297,28 @@ function statistics_admin() { "statistics_userpage_last_cnt" => variable_get("statistics_userpage_last_cnt", 0) )); break; + case "block": + if (arg(3) == "top nodes block") { + $output .= statistics_config_topnodes_block(array( + "statistics_block_top_title" => variable_get("statistics_block_top_title", "Top nodes"), + "statistics_block_top_day_head" => variable_get("statistics_block_top_day_head", "Todays top:"), + "statistics_block_top_day_num" => variable_get("statistics_block_top_day_num", 0), + "statistics_block_top_all_head" => variable_get("statistics_block_top_all_head", "All time top:"), + "statistics_block_top_all_num" => variable_get("statistics_block_top_all_num", 0), + "statistics_block_top_last_head" => variable_get("statistics_block_top_last_head" ,"Last:"), + "statistics_block_top_last_num" => variable_get("statistics_block_top_last_num", 0) + )); + } + elseif (arg(3) == "whos online block") { + $output .= statistics_config_online_block(array( + "statistics_block_online_title" => variable_get("statistics_block_online_title", "Who's online"), + "statistics_block_online_subtitle" => variable_get("statistics_block_online_subtitle", "Online users:"), + "statistics_block_online_time" => variable_get("statistics_block_online_time", 2700), + "statistics_block_online_max_len" => variable_get("statistics_block_online_max_len", 15), + "statistics_block_online_max_cnt" => variable_get("statistics_block_online_max_cnt", 10) + )); + break; + } default: $output .= statistics_admin_topnodes(); }