On Wednesday 19 November 2003 18:08, Shane wrote:
> On Nov 19, 2003, at 3:10 PM, Christopher Winn wrote:
> > Hi,
> >
> > I've been playing around with Slash::Search lately. I'm trying
> > to compile some data into a template that effectively says,
> > "Here are all the users who have a maxcommentsize of 1048." For
> > example. Or, "Here are all the users who have entered a
> > nickname in their preferences." And then spew out that list.
> >
> > However, I'm having trouble calling the correct search call. Is
> > there a way to specifically search for all the users who have,
> > for example, selected that they live in California? (an option
> > which of course was added into users_param)..
>
> Take a look at
>
> http://cvs.slashcode.com/cgi-bin/cvsweb/slash/plugins/Search/Searc
>h.pm? rev=1.61&content-type=text/x-cvsweb-markup
>
> sub findUsers
>
> It only searchs against the users table:
>
> my $tables = 'users';
>
> So you'd have to add a join on users_param (that table name might
> not be right) inorder to get the behavior you want.
Here's a suggestion:
Instead of trying to hack this on to search, it might be better to
create a plugin (and the code) to do such advanced user searches.
Once you get into creating custom queries, it's always a good idea to
think about creating a plugin, unless you think MOST sites are going
to want to use the functionality.
- Cliff
|