Type: New feature Software: shimmie2 Module: upload/rating Reference: http://trac.shishnet.org/shimmie2/browser/branches/branch_2.2/ext/upload/theme.php http://trac.shishnet.org/shimmie2/browser/branches/branch_2.2/ext/image/main.php Verified: Yes Solved: Yes, but needs event-addition at the uploader-extension (*) Official res.: Unknown Author: Daniel Marschall Date: 2008-10-28 There is a big problem with the rating feature. We can only set the rating if we already upload the image because there is only an edit-box in the edit-frame. 1. Add the rating radio boxes into the upload theme. ! Warnung: Hard coding (*) ~ ext/upload/theme.php # Search Source # Replace with Source"; $tmp_rating_themlet = new RatingsTheme; $html .= $tmp_rating_themlet->get_rater_html(-1, 'q'); $html .= " # Lines 41, 42 2. And now add a event, so that the rating feature is activated... ~ contrib/rating/main.php # Find last event handler is_a($event, ... # Add after this if(is_a($event, 'ImageAdditionEvent')) { if (($_POST['rating'] == 's') || ($_POST['rating'] == 'q') || ($_POST['rating'] == 'e')) { global $database; $database->Execute("UPDATE images SET rating = ? WHERE id = ?", array($_POST['rating'], $event->image->id)); } } Further improvements: - (*) Remove hard coding for the graphical inclusion at the upload form. There should be something like $editor_parts in the ext/view/theme.php (build_image_editor). - Better rights managment like the rating for explicit pictures for anonymous/user/admin.