Gossamer Forum
Home : Products : Gossamer Links : Discussions :

Review search results

Quote Reply
Review search results
I believe this is bug in the review system which is present in the Links SQL 2.1.2 and also in version 2.2.0

Example:

Searching/results for reviews owned by user 'admi' (../review.cgi?user=admi)
will also display reviews owned by user 'admin'.

When searching for reviews owned by user 'admin' (../review.cgi?user=admin)
this is not the case.
Quote Reply
Re: [Payooo] Review search results In reply to
When displaying reviews for link (../review.cgi?ID=1)
span pages toolbar doesn't work as expected.

Example:

Link with ID '1' has 2 reviews.
reviews_per_page is set to '1'

Both reviews will be available on one page + span page toolbar is also available
(with the same reviews on page 2).

Also, 'Unknown Tag: 'Num'' is displayed instead of actual number.

If you vote for review, thank you text is not available.
(*** Thanks for the valuable feedback you provided to other readers and reviewers.
Your vote will be counted. ***)

Since everything is 'normal' when displaying users reviews I have removed

<%Links::Utils::load_link_info%>
<%include link.html%>

and everything is back to 'normal'
(spaning is fine, thank you text is available, so is <%Num%> tag)




Explanation of 'normal':

review_search_results.html should contain:
<%if nh%>
<input type="hidden" name="nh" value="<%nh%>" />
<%endif%>

to return the user to the right page after voting.

Back to testing ...
Quote Reply
Re: [Payooo] Review search results In reply to
Am I the only one having this problem or ...?
Quote Reply
Re: [Payooo] Review search results In reply to
I'll address these one at a time, as I check up on them.

In Reply To:
Searching/results for reviews owned by user 'admi' (../review.cgi?user=admi) will also display reviews owned by user 'admin'.

This is because Links SQL by default searches substrings, so 'admi' will match 'admi', 'admin', 'abcadmi', 'abcadmin', etc. You ought to be able to correct it by specifying a 'ww' value of '1' (e.g. through an input type=hidden form parameter, or by changing the link): ../review.cgi?user=admi;ww=1




Jason Rhinelander
Gossamer Threads
jason@gossamer-threads.com

Last edited by:

Jagerman: May 6, 2004, 4:00 PM
Quote Reply
Re: [Payooo] Review search results In reply to
I use a completely rewritten Review.pm file as it wasn't doing what I wanted. This is what I have for the user check:


# If we have a user to list
elsif ($args->{user}) {
$rec = { noLink => 1};# , Username => $args->{user} };
$args->{Review_LinkID} = '' ;
$args->{Review_Owner} = $args->{user} ;
$args->{ww} = 1; # Makes sure exact match is used
}

I have no idea why Username is set to be the searched for username - this just seems wrong.
Quote Reply
Re: [afinlr] Review search results In reply to
Thanks afinlr Wink
Quote Reply
Re: [Payooo] Review search results In reply to
In Reply To:
Link with ID '1' has 2 reviews.
reviews_per_page is set to '1'

Both reviews will be available on one page + span page toolbar is also available
(with the same reviews on page 2).

Also, 'Unknown Tag: 'Num'' is displayed instead of actual number.

I have a potential fix for this problem - look in the Links/SiteHTML.pm file for 'sub site_tags_link {' - a few lines into this subroutine is a line:
my @columns = qw/title title_linked grand_total next prev next_url prev_url/;
Add Review_Loop onto this list, so that it looks like:
my @columns = qw/title title_linked grand_total next prev next_url prev_url Review_Loop/;

Without that it erroneously overwrites the Review_Loop when retrieving the link information. I've attached the fixed admin/Links/SiteHTML.pm to this post.


In Reply To:
review_search_results.html should contain:
<
%if nh%>
<input type="hidden" name="nh" value="<%nh%>" />
<%endif%>

I've added it to the template to fix it.

(The SiteHTML.pm attached to this post is now included in the LinksSQL-2.2.0.tar.gz available for download)


Jason Rhinelander
Gossamer Threads
jason@gossamer-threads.com

Last edited by:

Jagerman: May 10, 2004, 5:27 PM
Quote Reply
Re: [Jagerman] Review search results In reply to
In Reply To:
I'll address these one at a time, as I check up on them.

In Reply To:
Searching/results for reviews owned by user 'admi' (../review.cgi?user=admi) will also display reviews owned by user 'admin'.

This is because Links SQL by default searches substrings, so 'admi' will match 'admi', 'admin', 'abcadmi', 'abcadmin', etc. You ought to be able to correct it by specifying a 'ww' value of '1' (e.g. through an input type=hidden form parameter, or by changing the link): ../review.cgi?user=admi;ww=1




Thanks for looking into this.


I think that default should be just ../review.cgi?user=admi (show just reviews owned by one user) and if someone wants to add other parameters, their choice.
Quote Reply
Re: [Jagerman] Review search results In reply to
That fixed review search results but at the same time brings new bug:

In link.html

<%if Review_Count %>
<%body_font%><small><a href="<%db_cgi_url%>/review.cgi?ID=<%ID%>">Read <%Review_Count%> Reviews</a></small></font><br>
<%endif%>

doesn't work (on category pages, search results) Crazy
Quote Reply
Re: [Payooo] Review search results In reply to
Try also adding Review_Count onto the SiteHTML.pm line (I've updated the attachment above with this change).

Jason Rhinelander
Gossamer Threads
jason@gossamer-threads.com