diff --git a/contrib/image_hash_ban/theme.php b/contrib/image_hash_ban/theme.php index fdf108c8..8dc4efe1 100644 --- a/contrib/image_hash_ban/theme.php +++ b/contrib/image_hash_ban/theme.php @@ -22,12 +22,14 @@ class ImageBanTheme extends Themelet { */ public function display_image_hash_bans(Page $page, $page_number, $bans) { $h_bans = ""; + $n = 0; foreach($bans as $ban) { + $oe = ($n++ % 2 == 0) ? "even" : "odd"; $h_bans .= " - - {$ban['hash']} + + {$ban['hash']} {$ban['reason']} - +
@@ -37,16 +39,16 @@ class ImageBanTheme extends Themelet { "; } $html = " - - +
HashReasonAction
+ $h_bans - + - +
HashReasonAction
"; diff --git a/contrib/ipban/theme.php b/contrib/ipban/theme.php index ba8ff6f8..095aaea7 100644 --- a/contrib/ipban/theme.php +++ b/contrib/ipban/theme.php @@ -14,15 +14,17 @@ class IPBanTheme extends Themelet { public function display_bans(Page $page, $bans) { global $user; $h_bans = ""; + $n = 0; foreach($bans as $ban) { $end_human = date('Y-m-d', $ban['end_timestamp']); + $oe = ($n++ % 2 == 0) ? "even" : "odd"; $h_bans .= " - - {$ban['ip']} + + {$ban['ip']} {$ban['reason']} - {$ban['banner_name']} - {$end_human} - + {$ban['banner_name']} + {$end_human} +
@@ -32,10 +34,10 @@ class IPBanTheme extends Themelet { "; } $html = " - - +
IPReasonByUntilAction
+ $h_bans - + @@ -43,7 +45,7 @@ class IPBanTheme extends Themelet { - +
IPReasonByUntilAction
"; $page->set_title("IP Bans"); diff --git a/ext/alias_editor/theme.php b/ext/alias_editor/theme.php index 470bb476..b8a72194 100644 --- a/ext/alias_editor/theme.php +++ b/ext/alias_editor/theme.php @@ -9,7 +9,7 @@ class AliasEditorTheme extends Themelet { */ public function display_aliases(Page $page, $aliases, $is_admin) { if($is_admin) { - $action = "Action"; + $action = "Action"; $add = "
@@ -26,10 +26,13 @@ class AliasEditorTheme extends Themelet { } $h_aliases = ""; + $n = 0; foreach($aliases as $old => $new) { $h_old = html_escape($old); $h_new = html_escape($new); - $h_aliases .= "$h_old$h_new"; + $oe = ($n++ % 2 == 0) ? "even" : "odd"; + + $h_aliases .= "$h_old$h_new"; if($is_admin) { $h_aliases .= " @@ -43,8 +46,8 @@ class AliasEditorTheme extends Themelet { $h_aliases .= ""; } $html = " - - $action +
FromTo
+ $action $add $h_aliases $add diff --git a/ext/setup/theme.php b/ext/setup/theme.php index 73e562b0..41449fae 100644 --- a/ext/setup/theme.php +++ b/ext/setup/theme.php @@ -54,25 +54,28 @@ class SetupTheme extends Themelet { public function display_advanced(Page $page, $options) { $rows = ""; + $n = 0; foreach($options as $name => $value) { $h_value = html_escape($value); $len = strlen($h_value); + $oe = ($n++ % 2 == 0) ? "even" : "odd"; + $box = ""; - if($len < 50) { - $box .= ""; - } - else { + if(strpos($value, "\n") > 0) { $box .= ""; } + else { + $box .= ""; + } $box .= ""; - $rows .= ""; + $rows .= ""; } $table = " -
FromTo
$name$box
$name$box
- - $rows - +
NameValue
+ + $rows +
NameValue
";