Jump to content

Request: Ability to turn off 1 review per member limit


openfire

Recommended Posts

Posted

I would like the ability to allow members to submit more than one review per item.

The reason is that for some items, such as hotels and restaurants, people often visit more than once and conditions can change over time, warranting a new review by the same member. See Tripadvisor... They allow more than one review of the same hotel.

Is there a simple way to override this limitation?

Posted

Something like that would be great. Or ability to update review (not edit), and under your original one is a new post and stars, and the post background can be a different color and say Updated, or similar.

That and this would be great:

Posted

OK, after digging around in the code, I think I've figured it out... This seems to remove the 1 review restriction:

In Item.php find

return $this->canCommentReview( 'review', $member ) and !$this->hasReviewed( $member );

Remove this part: and !$this->hasReviewed( $member )

So you are left with this:

return $this->canCommentReview( 'review', $member );

 

That seems to work for me so far, but I'm no coder, so YMMV. Note that you may have to repeat this process every time you upgrade as the file may be written over.

edit to add:

In Pages->Templates->Display->reviews

Find

{{if !$record->hasReviewed()}}<hr class='ipsHr'>{{endif}}

and change to

<hr class='ipsHr'>

^That adds back in the spacer line for those who have already reviewed.

 

Posted
22 hours ago, openfire said:

OK, after digging around in the code, I think I've figured it out... This seems to remove the 1 review restriction:

In Item.php find


return $this->canCommentReview( 'review', $member ) and !$this->hasReviewed( $member );

Remove this part: and !$this->hasReviewed( $member )

So you are left with this:


return $this->canCommentReview( 'review', $member );

 

That seems to work for me so far, but I'm no coder, so YMMV. Note that you may have to repeat this process every time you upgrade as the file may be written over.

edit to add:

In Pages->Templates->Display->reviews

Find


{{if !$record->hasReviewed()}}<hr class='ipsHr'>{{endif}}

and change to


<hr class='ipsHr'>

^That adds back in the spacer line for those who have already reviewed.

 

I think it's easier if you extend via code hook the function system/Content/Item.php:hasReviewed() to return 0, thus you don't need to edit any file/template.

Also this is global. You need to use a condition to grab only the app you want, like Downloads or Pages, etc.

Archived

This topic is now archived and is closed to further replies.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...