From b0448eba6f73ff1a94c7cfeab27a8e1d181a3c76 Mon Sep 17 00:00:00 2001 From: Shish Moom Date: Mon, 6 Jul 2009 04:29:55 -0700 Subject: [PATCH] theme changes --- ext/comment/theme.php | 5 +++-- ext/index/theme.php | 23 +++-------------------- ext/user/theme.php | 2 +- themes/default/style.css | 6 ++++++ themes/default/themelet.class.php | 2 +- themes/futaba/style.css | 5 +++++ themes/futaba/themelet.class.php | 2 +- themes/minimal/style.css | 5 +++++ themes/minimal/themelet.class.php | 2 +- 9 files changed, 26 insertions(+), 26 deletions(-) diff --git a/ext/comment/theme.php b/ext/comment/theme.php index b1e767d8..cc411424 100644 --- a/ext/comment/theme.php +++ b/ext/comment/theme.php @@ -60,7 +60,7 @@ class CommentListTheme extends Themelet { public function add_comment_list(Page $page, Image $image, $comments, $position, $with_postbox) { $html = "
"; $html .= "
" . $this->build_thumb_html($image) . "
"; - $html .= $this->comments_to_html($comments); + $html .= "
" . $this->comments_to_html($comments) . "
"; $html .= "
"; if($with_postbox) { $html .= "
".($this->build_postbox($image->id))."
"; @@ -80,10 +80,11 @@ class CommentListTheme extends Themelet { protected function comments_to_html($comments, $trim=false) { - $html = ""; + $html = "
"; foreach($comments as $comment) { $html .= $this->comment_to_html($comment, $trim); } + $html .= "
"; return $html; } diff --git a/ext/index/theme.php b/ext/index/theme.php index 83d35990..5408bf85 100644 --- a/ext/index/theme.php +++ b/ext/index/theme.php @@ -91,27 +91,10 @@ EOD; } protected function build_table($images, $query) { - global $config; - - $width = $config->get_int('index_width'); - $height = $config->get_int('index_height'); - - $table = "\n"; - for($i=0; $i<$height; $i++) { - $table .= "\n"; - for($j=0; $j<$width; $j++) { - $image = isset($images[$i*$width+$j]) ? $images[$i*$width+$j] : null; - if(!is_null($image)) { - $table .= "\t\n"; - } - else { - $table .= "\t\n"; - } - } - $table .= "\n"; + $table = ""; + foreach($images as $image) { + $table .= $this->build_thumb_html($image, $query); } - $table .= "
" . $this->build_thumb_html($image, $query) . " 
\n"; - return $table; } } diff --git a/ext/user/theme.php b/ext/user/theme.php index 525a3abf..d73f3420 100644 --- a/ext/user/theme.php +++ b/ext/user/theme.php @@ -76,7 +76,7 @@ class UserPageTheme extends Themelet { global $config; $html = "
- +
diff --git a/themes/default/style.css b/themes/default/style.css index ceb29259..e72b2456 100644 --- a/themes/default/style.css +++ b/themes/default/style.css @@ -175,4 +175,10 @@ UL { background: #FAA; } +.thumb { + width: 220px; + display: inline-block; + margin-bottom: 16px; +} + diff --git a/themes/default/themelet.class.php b/themes/default/themelet.class.php index 93e3c5f9..506a1b86 100644 --- a/themes/default/themelet.class.php +++ b/themes/default/themelet.class.php @@ -32,7 +32,7 @@ class Themelet { $h_tip = html_escape($image->get_tooltip()); $h_thumb_link = $image->get_thumb_link(); $tsize = get_thumbnail_size($image->width, $image->height); - return "$h_tip$h_tip"; } diff --git a/themes/futaba/style.css b/themes/futaba/style.css index 1af5de0e..e8bf74ab 100644 --- a/themes/futaba/style.css +++ b/themes/futaba/style.css @@ -105,3 +105,8 @@ TD { display: inline; padding: 5px; } +.thumb { + width: 220px; + display: inline-block; + margin-bottom: 16px; +} diff --git a/themes/futaba/themelet.class.php b/themes/futaba/themelet.class.php index 5c97778f..79778d86 100644 --- a/themes/futaba/themelet.class.php +++ b/themes/futaba/themelet.class.php @@ -22,7 +22,7 @@ class Themelet { $h_tip = html_escape($image->get_tooltip()); $h_thumb_link = $image->get_thumb_link(); $tsize = get_thumbnail_size($image->width, $image->height); - return "$h_tip$h_tip"; } diff --git a/themes/minimal/style.css b/themes/minimal/style.css index 329c3cac..2a0fc4c1 100644 --- a/themes/minimal/style.css +++ b/themes/minimal/style.css @@ -165,3 +165,8 @@ UL { } +.thumb { + width: 220px; + display: inline-block; + margin-bottom: 16px; +} diff --git a/themes/minimal/themelet.class.php b/themes/minimal/themelet.class.php index 93e3c5f9..506a1b86 100644 --- a/themes/minimal/themelet.class.php +++ b/themes/minimal/themelet.class.php @@ -32,7 +32,7 @@ class Themelet { $h_tip = html_escape($image->get_tooltip()); $h_thumb_link = $image->get_thumb_link(); $tsize = get_thumbnail_size($image->width, $image->height); - return "$h_tip$h_tip"; }
Name
Password