diff --git a/contrib/admin_utils/theme.php b/contrib/admin_utils/theme.php
index bc9f8f82..4e53f158 100644
--- a/contrib/admin_utils/theme.php
+++ b/contrib/admin_utils/theme.php
@@ -1,6 +1,12 @@
";
}
-
-
- public function add_comment_list($page, $image, $comments, $position, $with_postbox) {
- $html = "";
- $html .= "
" . build_thumb_html($image) . "
";
- $html .= $this->comments_to_html($comments);
- $html .= "
";
- if($with_postbox) {
- $html .= "".($this->build_postbox($image->id))."
";
- }
- else {
- $html .= "You need to create an account before you can comment
";
- }
-
- $page->add_block(new Block("{$image->id}: ".($image->get_tag_list()), $html, "main", $position));
- }
}
?>
diff --git a/ext/downtime/theme.php b/ext/downtime/theme.php
index 4f0fabe5..6d81f67e 100644
--- a/ext/downtime/theme.php
+++ b/ext/downtime/theme.php
@@ -1,11 +1,17 @@
add_block(new Block("Downtime",
"DOWNTIME MODE IS ON!", "left", 0));
}
+ /*
+ * Display $message and exit
+ */
public function display_message($message) {
header("HTTP/1.0 503 Service Temporarily Unavailable");
print << $value)
+ */
public function display_info_page($page, $info) {
$page->set_title("System Info");
$page->set_heading("System Info");
diff --git a/ext/ipban/theme.php b/ext/ipban/theme.php
index 785b15c0..e5e3d498 100644
--- a/ext/ipban/theme.php
+++ b/ext/ipban/theme.php
@@ -1,6 +1,16 @@
the banned IP
+ * 'reason' => why the IP was banned
+ * 'date' => when the ban started
+ * 'end' => when the ban will end
+ * )
+ */
public function display_bans($page, $bans) {
$h_bans = "";
foreach($bans as $ban) {
diff --git a/ext/news/theme.php b/ext/news/theme.php
index c651c475..bf7195e9 100644
--- a/ext/news/theme.php
+++ b/ext/news/theme.php
@@ -1,6 +1,9 @@
add_block(new Block("Note", $text, "left", 5));
}
diff --git a/ext/regen_thumb/theme.php b/ext/regen_thumb/theme.php
index 46db77bf..4e3ad357 100644
--- a/ext/regen_thumb/theme.php
+++ b/ext/regen_thumb/theme.php
@@ -1,6 +1,9 @@
@@ -16,6 +19,9 @@ class RegenThumbTheme extends Themelet {
$page->add_block(new Block("Regen Thumb", $html, "left"));
}
+ /*
+ * Show a link to the new thumbnail
+ */
public function display_results($page, $image) {
$page->set_title("Thumbnail Regenerated");
$page->set_heading("Thumbnail Regenerated");
diff --git a/ext/setup/main.php b/ext/setup/main.php
index 661cd605..763a94f4 100644
--- a/ext/setup/main.php
+++ b/ext/setup/main.php
@@ -138,7 +138,7 @@ class Setup extends Extension {
if(is_a($event, 'PageRequestEvent') && ($event->page_name == "setup")) {
global $user;
if(!$user->is_admin()) {
- $this->theme->display_not_admin($event->page);
+ $this->theme->display_error($event->page, "Permission Denied", "This page is for admins only");
}
else {
if($event->get_arg(0) == "save") {
diff --git a/ext/setup/theme.php b/ext/setup/theme.php
index 66424886..2f669afb 100644
--- a/ext/setup/theme.php
+++ b/ext/setup/theme.php
@@ -1,30 +1,23 @@
set_title("Error");
- $page->set_heading("Error");
- $page->add_block(new NavBlock());
- $page->add_block(new Block("Permission Denied", "This page is for admins only"));
- }
-
+ /*
+ * Display a set of setup option blocks
+ *
+ * $panel = the container of the blocks
+ * $panel->blocks the blocks to be displayed, unsorted
+ *
+ * It's recommented that the theme sort the blocks before doing anything
+ * else, using: usort($panel->blocks, "blockcmp");
+ *
+ * The page should wrap all the options in a form which links to setup_save
+ */
public function display_page($page, $panel) {
$setupblock_html1 = "";
$setupblock_html2 = "";
usort($panel->blocks, "blockcmp");
- /*
- $flip = true;
- foreach($panel->mainblocks as $block) {
- if(is_a($block, 'SetupBlock')) {
- if($flip) $setupblock_html1 .= $this->sb_to_html($block);
- else $setupblock_html2 .= $this->sb_to_html($block);
- $flip = !$flip;
- }
- }
- */
-
/*
* Try and keep the two columns even; count the line breaks in
* each an calculate where a block would work best
diff --git a/ext/tag_edit/main.php b/ext/tag_edit/main.php
index c48b0cbc..6facc918 100644
--- a/ext/tag_edit/main.php
+++ b/ext/tag_edit/main.php
@@ -18,7 +18,7 @@ class TagEdit extends Extension {
$page->set_redirect(make_link("post/view/$i_image_id", $query));
}
else {
- $this->theme->display_anon_denied($event->page);
+ $this->theme->display_error($event->page, "Error", "Anonymous tag editing is disabled");
}
}
else if($event->get_arg(0) == "replace") {
diff --git a/ext/tag_edit/theme.php b/ext/tag_edit/theme.php
index 32561fe3..f1db4312 100644
--- a/ext/tag_edit/theme.php
+++ b/ext/tag_edit/theme.php
@@ -1,6 +1,15 @@
get_tag_list()
+ */
public function display_editor($page, $image) {
global $database;
@@ -26,6 +35,10 @@ class TagEditTheme extends Themelet {
$page->add_block(new Block(null, $html, "main", 5));
}
+ /*
+ * Display a form which links to tag_edit/replace with POST[search]
+ * and POST[replace] set appropriately
+ */
public function display_mass_editor($page) {
$html = "