odd/even comments
This commit is contained in:
parent
0f950f4716
commit
8a53cecbd7
@ -1,6 +1,8 @@
|
|||||||
<?php
|
<?php
|
||||||
|
|
||||||
class CommentListTheme extends Themelet {
|
class CommentListTheme extends Themelet {
|
||||||
|
var $comments_shown = 0;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Display a page with a list of images, and for each image,
|
* Display a page with a list of images, and for each image,
|
||||||
* the image's comments
|
* the image's comments
|
||||||
@ -132,8 +134,9 @@ class CommentListTheme extends Themelet {
|
|||||||
// $hash = md5(strtolower($comment->owner->email));
|
// $hash = md5(strtolower($comment->owner->email));
|
||||||
// $avatar = "<img src=\"http://www.gravatar.com/avatar/$hash.jpg\"><br>";
|
// $avatar = "<img src=\"http://www.gravatar.com/avatar/$hash.jpg\"><br>";
|
||||||
//}
|
//}
|
||||||
|
$oe = ($this->comments_shown++ % 2 == 0) ? "even" : "odd";
|
||||||
return "
|
return "
|
||||||
<div class='comment'>
|
<div class='$oe comment'>
|
||||||
$h_userlink: $h_comment
|
$h_userlink: $h_comment
|
||||||
$h_dellink
|
$h_dellink
|
||||||
</div>
|
</div>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user