From 252bea060df4350f9d3f4ebe6735496da9345120 Mon Sep 17 00:00:00 2001 From: shish Date: Sun, 21 Oct 2007 22:35:47 +0000 Subject: [PATCH] things work now git-svn-id: file:///home/shish/svn/shimmie2/trunk@542 7f39781d-f577-437e-ae19-be835c7a54ca --- contrib/numeric_score/main.php | 2 +- contrib/numeric_score/theme.php | 23 +++++++++++++++-------- contrib/text_score/main.php | 2 +- contrib/text_score/theme.php | 2 +- 4 files changed, 18 insertions(+), 11 deletions(-) diff --git a/contrib/numeric_score/main.php b/contrib/numeric_score/main.php index 0fec3a5a..266a1a45 100644 --- a/contrib/numeric_score/main.php +++ b/contrib/numeric_score/main.php @@ -37,7 +37,7 @@ class NumericScore extends Extension { $i_image_id = int_escape($_POST['image_id']); if($i_score >= -1 || $i_score <= 1) { - send_event(new NumericScoreSetEvent($i_image_id, $event->user->id, $i_score)); + send_event(new NumericScoreSetEvent($i_image_id, $event->user, $i_score)); } $event->page->set_mode("redirect"); diff --git a/contrib/numeric_score/theme.php b/contrib/numeric_score/theme.php index 0dda1680..80f7c61c 100644 --- a/contrib/numeric_score/theme.php +++ b/contrib/numeric_score/theme.php @@ -3,21 +3,28 @@ class NumericScoreTheme extends Themelet { public function display_voter($page, $image_id, $score) { $i_image_id = int_escape($image_id); - $i_score = int_escape($score) / 2; + $i_score = int_escape($score); $html = " - Current score is $i_score -
-
- - - -
+ + + + + + +
Current score is $i_score
+
+
+ + + +
+
"; $page->add_block(new Block(null, $html, "main", 7)); } diff --git a/contrib/text_score/main.php b/contrib/text_score/main.php index 8114ce49..dd80ef4a 100644 --- a/contrib/text_score/main.php +++ b/contrib/text_score/main.php @@ -37,7 +37,7 @@ class TextScore extends Extension { $i_image_id = int_escape($_POST['image_id']); if($i_score >= -2 || $i_score <= 2) { - send_event(new TextScoreSetEvent($i_image_id, $event->user->id, $i_score)); + send_event(new TextScoreSetEvent($i_image_id, $event->user, $i_score)); } $event->page->set_mode("redirect"); diff --git a/contrib/text_score/theme.php b/contrib/text_score/theme.php index 0bcdde75..c9046e43 100644 --- a/contrib/text_score/theme.php +++ b/contrib/text_score/theme.php @@ -13,7 +13,7 @@ class TextScoreTheme extends Themelet { $s_score = $words[$score]; $html = " Current score is \"$s_score\" -
+