Announcement: Be excellent to each other.


Caravel Forum : Caravel Boards : The Site : Advanced search options
New Topic New Poll Post Reply
Poster Message
Maurog
Level: Smitemaster
Avatar
Rank Points: 1501
Registered: 09-16-2004
IP: Logged
icon Advanced search options (0)  
I think we need some improvements on the Search feature of the forum. The immediate things that come to mind are AND and NOT logic signs (can be substituted with Google searching the site, but preferred as a feature of the forum itself), and searching in thread starter posts only (cannot be substituted with anything).

For example if you want to search for threads concerning Google, you cannot do it effectively (try it yourself). A search in starters only would give you half a dozen results, a search in all posts gives 16 pages.

I'm pretty sure people can come up with more features. So, which changes are possible to implement?

____________________________
Slay the living! Raise the dead!
Paint the sky in crimson red!
09-27-2007 at 02:08 PM
View Profile Send Private Message to User Send Email to User Show all user's posts Quote Reply
NiroZ
Level: Smitemaster
Rank Points: 1302
Registered: 02-12-2006
IP: Logged
icon Re: Advanced search options (+1)  
This is the one feature request that is forgivable when it has been posted multiple times.

Anyway, Schik's response has thus far been 'If I can find a way to improve it, I will. Any ideas how?' (my words)

Of course, you can always use the google coop search of this forum. Irony, no?
09-27-2007 at 03:42 PM
View Profile Send Private Message to User Send Email to User Show all user's posts This architect's holds Quote Reply
Syntax
Level: Smitemaster
Rank Points: 1218
Registered: 05-12-2005
IP: Logged
icon Re: Advanced search options (0)  
I would gladly help out if I could get hold of the source which builds the actual sql. I spend most of my days building UIs and search functionality is a common widget.

I'd presume that since Schik hasn't changed it so far though, that there's a greater underlying issue.
09-27-2007 at 03:47 PM
View Profile Send Private Message to User Show all user's posts Quote Reply
jbluestein
Level: Smitemaster
Avatar
Rank Points: 1670
Registered: 12-23-2005
IP: Logged
icon Re: Advanced search options (+1)  
NiroZ wrote:
This is the one feature request that is forgivable when it has been posted multiple times.


Is that because it's so hard to search for previous requests of this type?

;)

Josh

____________________________
"Rings and knots of joy and grief, all interlaced and locking." --William Buck
09-27-2007 at 03:47 PM
View Profile Send Private Message to User Send Email to User Show all user's posts High Scores This architect's holds Quote Reply
Syntax
Level: Smitemaster
Rank Points: 1218
Registered: 05-12-2005
IP: Logged
icon Re: Advanced search options (0)  
Well, looking at the code I found this which would enable more features search features. Could be a start. I'll take a further look when I get home:

Pass "action" as "advanced" to the search page and also

On the actual page, change:

<input type="hidden" name="action" value="Search">

To:

<input type="hidden" name="action" value="advancedsearch">

--

Maybe. Needs a further look.

[EDIT]

Fixed the action to pass in (should be "advanced")

[Last edited by Syntax at 09-27-2007 04:14 PM]
09-27-2007 at 04:07 PM
View Profile Send Private Message to User Show all user's posts Quote Reply
Schik
Level: Legendary Smitemaster
Avatar
Rank Points: 5383
Registered: 02-04-2003
IP: Logged
icon Re: Advanced search options (0)  
Syntax wrote:
On the actual page, change:

<input type="hidden" name="action" value="Search">

To:

<input type="hidden" name="action" value="advancedsearch">
Um.

So, the "action" variable tells the PHP what action it's supposed to be performing, since one PHP file (in this case search.php) performs more than one function. So what we need is to rewrite the "Search(Author, Topic, Message, Boards)" function. If I *had* some "AdvancedSearch(...)" function, then sure, changing the action to something else might make sense, but rather that support two searches, I'd probably just edit the existing "Search(...)" function.

So what we need is a PHP function that will parse the search string and turn it into some fantastically fast and good SQL.


____________________________
The greatness of a nation and its moral progress can be judged by the way it treats its animals.
--Mahatma Gandhi
09-27-2007 at 05:03 PM
View Profile Send Private Message to User Send Email to User Show all user's posts High Scores Quote Reply
Syntax
Level: Smitemaster
Rank Points: 1218
Registered: 05-12-2005
IP: Logged

File: search.php (11.2 KB)
Downloaded 43 times.
License: Public Domain
icon Re: Advanced search options (0)  
Schik wrote:
So what we need is a PHP function that will parse the search string and turn it into some fantastically fast and good SQL.

Long post deleted

We're not looking at the same code. I'll email you the file to replace your search.php with :)

[EDIT]

Attached

[Last edited by Syntax at 09-27-2007 08:10 PM : Can't attach files]
09-27-2007 at 07:50 PM
View Profile Send Private Message to User Show all user's posts Quote Reply
Schik
Level: Legendary Smitemaster
Avatar
Rank Points: 5383
Registered: 02-04-2003
IP: Logged
icon Re: Advanced search options (0)  
Syntax wrote:
Schik wrote:
So what we need is a PHP function that will parse the search string and turn it into some fantastically fast and good SQL.
It already does this. If the initial post is with "action" set to "advanced", it will display a form with some textboxes with AND|OR dropdowns between them as well as a case sensitive toggle (and other stuff)...
We must be talking about different things. The forum source code that I'm looking at (i.e. the stuff that's live on the server right now) does not do this. It never did. It does not have a BuildSearchQuery function.

If there's a tForumHacks extension to do better searching, then perhaps I can try to hook it into our very customized forum.

____________________________
The greatness of a nation and its moral progress can be judged by the way it treats its animals.
--Mahatma Gandhi
09-27-2007 at 08:10 PM
View Profile Send Private Message to User Send Email to User Show all user's posts High Scores Quote Reply
Syntax
Level: Smitemaster
Rank Points: 1218
Registered: 05-12-2005
IP: Logged
icon Re: Advanced search options (0)  
Yeah, I was presuming we were looking at the same code version. Hopefully not too many changes have been made to this particular file...
09-27-2007 at 08:11 PM
View Profile Send Private Message to User Show all user's posts Quote Reply
Schik
Level: Legendary Smitemaster
Avatar
Rank Points: 5383
Registered: 02-04-2003
IP: Logged
icon Re: Advanced search options (+2)  
Yeah, this is *way* different than ours. So while there's absolutely no way this will just plug in, maybe I can take some stuff from it and retrofit it to ours. We'll see.

____________________________
The greatness of a nation and its moral progress can be judged by the way it treats its animals.
--Mahatma Gandhi
09-27-2007 at 08:16 PM
View Profile Send Private Message to User Send Email to User Show all user's posts High Scores Quote Reply
Syntax
Level: Smitemaster
Rank Points: 1218
Registered: 05-12-2005
IP: Logged
icon Re: Advanced search options (0)  
No wonder we couldn't quite work out a quick solution then ;)
09-27-2007 at 08:24 PM
View Profile Send Private Message to User Show all user's posts Quote Reply
bflatjeff
Level: Delver
Rank Points: 93
Registered: 04-04-2006
IP: Logged
icon Re: Advanced search options (+1)  
If we can't improve the forum search function, at least not just yet, can we at least add some information about using the current function? I know I've tried various strategies to improve my results, but I simply don't know what is allowable. Some sort of written search help would be... helpful. I'd like to be told:
If boolean operators are allowed,
If commas fuction as search term separators,
If enclosing strings in "" does anything,
Anything else that will help me search more effectively!
The search page is rather bare and user unfriendly now. Perhaps some explanation of this sort could be added?

BbJ

____________________________
"Stupid, stupid roach creatures!"
- Beethro Bonekin
02-07-2008 at 05:19 AM
View Profile Send Private Message to User Show all user's posts Quote Reply
New Topic New Poll Post Reply
Caravel Forum : Caravel Boards : The Site : Advanced search options
Surf To:


Forum Rules:
Can I post a new topic? No
Can I reply? No
Can I read? Yes
HTML Enabled? No
UBBC Enabled? Yes
Words Filter Enable? No

Contact Us | CaravelGames.com

Powered by: tForum tForumHacks Edition b0.98.8
Originally created by Toan Huynh (Copyright © 2000)
Enhanced by the tForumHacks team and the Caravel team.