Gossamer Forum
Home : Products : Gossamer Links : Development, Plugins and Globals :

More than one review from the same user

Quote Reply
More than one review from the same user
I'm using the review system for comments on my site.
Since a logged in user can not add more than one review to a link, I'd like to find a way to bypass this. There is on part in Review.pm which checks if the user has already added a review:

Code:
300 # Check if this user already added review for the link, it could be an invalid adding action
301 if ($USER and $db->count({ Review_LinkID => $id, Review_Owner => $USER->{Username} })) {
302 return { error => Links::language('REVIEW_ADD_WAIT', $id) };
303 }

Would it be enough to remove that block? Will there be any side effects if a user has multiple reviews for a link in the database? I can not test this at the moment, so I'm hesitating to screw up my production system. Wink
Quote Reply
Re: [Volker] More than one review from the same user In reply to
Hi,

The one possible problem, is when they go to "modify" the review. AFAIK, this only does a single "select", which would cause problems (as they would only be able to modify one of the reviews).

However, if you're not looking at allowing people to make changes to their reviews, then that should be fine =)

Cheers

Andy (mod)
andy@ultranerds.co.uk
Want to give me something back for my help? Please see my Amazon Wish List
GLinks ULTRA Package | GLinks ULTRA Package PRO
Links SQL Plugins | Website Design and SEO | UltraNerds | ULTRAGLobals Plugin | Pre-Made Template Sets | FREE GLinks Plugins!
Quote Reply
Re: [Andy] More than one review from the same user In reply to
Splendid.
Quote Reply
Re: [Volker] More than one review from the same user In reply to
Hi,

I just thought I'd let you know that I had a custom made plug-in created by GT that allows users to post more than one review about a link. I have a site that is more like a magazine than a directory and my aim was to allow users to be able to enter into a discussion about articles. Briefly (if you're not interested I'm wasting my time) the system allows user to modify reviews during a specific amount of time (set by admin in minutes ex 240) and then reviews are validated by the admin, as well as modified ones (also an option for the admin). There are other options and visual options etc. but this should give you an idea of what is available.

I had discussed this with GT. Both this plug-in and another one I worked on them with, that I will be posting about later, are plug-ins I feel would be interesting for other Links users. Therefore I'd like to let people know that they exist and have both been tested in different configurations (both LinksSQL and Links).

John
Significant Media
Quote Reply
Re: [Jag] More than one review from the same user In reply to
Hi Jag,

basically I just need the "more reviews/comments per link" thingy. If this could be done via a plugin -- great. What's the name of the plugin you have mentioned? Is it free?

On the other hand, if a three line comment in a single file achieves the same result... well, then I'm going to stick with it.
Quote Reply
Re: [Volker] More than one review from the same user In reply to
Hi,

The plug-in wasn't free no Wink, a few hundred bucks, I'll do a more complete post about it soon. But in view of your response it might be a bit more complex than what you are looking for...

It's called ReviewMod (very sexy name at the moment Cool )

John

PS : I like your site, cool design
Significant Media

Last edited by:

Jag: Oct 24, 2005, 3:22 PM
Quote Reply
Re: [Jag] More than one review from the same user In reply to
Thanks. Smile
Quote Reply
Re: [Volker] More than one review from the same user In reply to
I've found another issue with multiple reviews by the same user. Besides of the code part mentioned in my first posting there is another part which must be stripped out in order to make it work. In add_review() at the end of that function comment out these lines:
(line numbers may vary)

Code:
241 # if ($USER) {
242 # my $review = $DB->table('Reviews')->select({ Review_LinkID => $id, Review_Owner => $USER->{Username} })-
243 # if ($review) {
244 # print $IN->header();
245 # if (not $CFG->{review_allow_modify}) {
246 # print Links::SiteHTML::display('error', { error => Links::language('REVIEW_MODIFY_DENIED'), main
247 # }
248 # elsif ($review->{Review_Validated} eq 'No') {
249 # print Links::SiteHTML::display('error', { error => Links::language('REVIEW_ADD_WAIT', $id), main
250 # }
251 # else {
252 # print Links::SiteHTML::display('review_edit', {
253 # %$rec,
254 # %title,
255 # confirm => 1,
256 # main_title_loop => Links::Build::build('title', Links::language('LINKS_REVIEW_EDIT'), "$CFG-
257 # });
258 # }
259 # return;
260 # }
261 # }