Closed (won't fix)
Project:
userreview
Version:
5.x-1.x-dev
Component:
Miscellaneous
Priority:
Normal
Category:
Feature request
Assigned:
Unassigned
Reporter:
Created:
7 Jan 2008 at 00:30 UTC
Updated:
3 Feb 2013 at 18:00 UTC
It would be really nice to be able to allow certain roles to create more than one review.
Specifically I am trying to allow anonymous users to create reviews. It would be nice to allow them to enter a username as well, however I can get by with turning the title field into that.
Since this is a must for my site and this module is the closest thing I have found to what I need, I am going to try and hack the code to get the results I need. If I succeed I will post the hack here.
Comments
Comment #1
jereme.guenther commentedOk, here is the hack to allows users to make multiple reviews.
To get the needed variable into the admin GUI so this feature can be turned on or off at will...
below this code (which ends at line 237 of the userreview.module)
$form['current review']['userreview_show_currentuser_review'] = array(
'#type' => 'checkbox',
'#title' => t('Show current user\'s review'),
'#description' => t('When showing a reviewed node (in full page view), should current\'s user review be shown?'),
'#default_value' => variable_get('userreview_show_currentuser_review', true)
);
add these lines:
$form['current review']['userreview_allow_multiple_reviews'] = array(
'#type' => 'checkbox',
'#title' => t('Allow multiple reviews of one node.'),
'#description' => t('Should a user be allowed to make more than one review per node? (disables "Show current user\'s review")'),
'#default_value' => variable_get('userreview_allow_multiple_reviews', false)
);
-----------------
Then (to actually allow multiple reviews)
in the fuction:
function userreview_nodeapi(&$node, $op, $teaser = NULL, $page = NULL) {
replace:
//get the current user's review for this content node
$userreviewnode = get_userreview_node($node, $user->uid);
with:
//get the current user's review for this content node
if (variable_get('userreview_allow_multiple_reviews', false)) {
$userrewviewnode = null;
} else {
$userreviewnode = get_userreview_node($node, $user->uid);
}
Comment #2
csc4 commentedThis seems like a great enhancement - it would be even better if it could be committed as a feature to the module.
Would it also make sense to link it to a permission so that the feature could be given to or withheld from certain roles?
Comment #3
pomliane commentedThis version of userreview is not supported anymore. The issue is closed for this reason.
Please upgrade to a supported version and feel free to reopen the issue on the new version if applicable.
This issue has been automagically closed by a script.