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

How to search reviews contents?

Quote Reply
How to search reviews contents?
I've a growing reviews table that I would like to search with Links SQL, is this possible? I'm an intermediate perl programmer, so I can do it myself I just don't want to reinvent the wheel, it looks to me links can be modified to make searches in other tables possible.
Quote Reply
Re: [jaltuve] How to search reviews contents? In reply to
You can use the 'query' method on a 'table' object'. Have a look at the GT module docs, under GT::SQL::Table.

Ivan
-----
Iyengar Yoga Resources / GT Plugins
Quote Reply
Re: [yogi] How to search reviews contents? In reply to
Hi,

Do you have any more information about this? I've been bugging alex / jack for more help on this issue but I assume they've not been around for the last week or so.
Quote Reply
Re: [jaltuve] How to search reviews contents? In reply to
This is possible if you rewrite the Review.pm file. It needs quite a lot of changing so I made the decision to make the changes directly in this file rather than trying to write a plugin - you just need to be aware that you'll need to make sure that you use this file (or redo the changes) if you upgrade.

I don't have a copy of the original file any more so I'm not quite sure what changes I made.

Firstly you need to add $args->{query} here:

# Return error if no action
($args->{query} or $id)

Then you need to add an extra elsif clause

elsif ($args->{query}) {
$rec = { noLink => 1};
$args->{Review_LinkID} = '';
$args->{Review_Owner} = '';
}

after the elsif ($args->{user}){...} code

I'm sure that there are a few other changes that I've made - if anyone would like to pm me their Review.pm file I'll try comparing them to see what I've done.