I want to extend quicksearch so that it searches comments aswell as entries. At the moment I can't even find the code that powers the search!
So, can someone point me in the direction of the search code, and/or give me some direction on how to achieve extending quicksearch.
Thanks!
Alex
Extending quicksearch
Since I am tweaking on quicksearch too and it certainly is a bad idea to change core files, you might want to do the following:
Grab the quicksearch class from the file posted already, put it in a new file and directory in the plugins folder, give it a new name etc. and start from there ...
Should give you the necessary playground for messing around and extending it ...
if the extensions are interesting, the developers might merge in teh default branch ... but aside from that, I'd rather develop a seperate plugin first ...
Grab the quicksearch class from the file posted already, put it in a new file and directory in the plugins folder, give it a new name etc. and start from there ...
Should give you the necessary playground for messing around and extending it ...
if the extensions are interesting, the developers might merge in teh default branch ... but aside from that, I'd rather develop a seperate plugin first ...
-
garvinhicking
- Core Developer
- Posts: 30022
- Joined: Tue Sep 16, 2003 9:45 pm
- Location: Cologne, Germany
- Contact:
Hi!
The actual routine that does the search is a s9y core function: serendipity_searchEntries(), found in include/functions_entries.inc.php.
It does allow some plugin API hooks which should do the trick to search within comments! It's only a matter of a new LEFT JOIN, just like multilingual search has been introduced some time ago...
Best regards,
Garvin
The actual routine that does the search is a s9y core function: serendipity_searchEntries(), found in include/functions_entries.inc.php.
It does allow some plugin API hooks which should do the trick to search within comments! It's only a matter of a new LEFT JOIN, just like multilingual search has been introduced some time ago...
Best regards,
Garvin
# Garvin Hicking (s9y Developer)
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
-
Wetterfrau
- Posts: 3
- Joined: Fri Apr 28, 2006 7:12 pm
- Location: Oklahoma, USA
We would like comment-searching functionality, too, and I don't see how to add it myself, despite the posts in this topic. My PHP skills are moderately good, but I'm not an expert in object-oriented programming, and I don't have much time to work on software, since my primary job is meteorology. I was also unable to find the reference to multilingual searching that Garvin mentioned.
We're using the PostgreSQL version of S9y v1.0 beta. Thanks in advance for any help you can provide.
We're using the PostgreSQL version of S9y v1.0 beta. Thanks in advance for any help you can provide.
Ich spreche kein Deutsch.
-
garvinhicking
- Core Developer
- Posts: 30022
- Joined: Tue Sep 16, 2003 9:45 pm
- Location: Cologne, Germany
- Contact:
Hi!
Searching the comments as well would take some time for implementing, since it cannot be merged with usuall fulltext entry search. So you would need to add it just like static page searches.
This feature request would be very nice to have; maybe you could please add it to our feature tracker on http://sf.net/projects/php-blog? Then a developer can take care of it as soon as someone has the time for it.
Best regards,
Garvin
Searching the comments as well would take some time for implementing, since it cannot be merged with usuall fulltext entry search. So you would need to add it just like static page searches.
This feature request would be very nice to have; maybe you could please add it to our feature tracker on http://sf.net/projects/php-blog? Then a developer can take care of it as soon as someone has the time for it.
Best regards,
Garvin
# Garvin Hicking (s9y Developer)
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
-
Wetterfrau
- Posts: 3
- Joined: Fri Apr 28, 2006 7:12 pm
- Location: Oklahoma, USA
-
garvinhicking
- Core Developer
- Posts: 30022
- Joined: Tue Sep 16, 2003 9:45 pm
- Location: Cologne, Germany
- Contact:
Hi!
I had some time today, so I solved your wish as a plugin. Read the SF Item for the file
Regards,
Garvin
I had some time today, so I solved your wish as a plugin. Read the SF Item for the file
Regards,
Garvin
# Garvin Hicking (s9y Developer)
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
-
Wetterfrau
- Posts: 3
- Joined: Fri Apr 28, 2006 7:12 pm
- Location: Oklahoma, USA
That was fast! Danke!
When I attempted to add that functionality by guessing what the other posts meant, I managed to kill Quicksearch completely! At that point, I put things back the way they were (and Quicksearch worked again) and posted my original inquiry here.
We have installed the new plug-in and it appears to work well.
Ich spreche kein Deutsch.