Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
Re: [plugin] [ORPHAN] ob1_advanced_search
Well you know I only mentioned ob1_googlenav just to give you a little push. Seems to have worked. ;)
In the mean time I’m having a slight problem with ob1_advanced_search. I have upgraded to 1.02b just in case it cured it but I’m afraid not. According to the source code everything is working fine but I have a blank page. None of the forms are displaying. Here’s the source if it helps:-
<txp:ob1_advanced_search set="allowed_usage;occurrences;show_search_form;search_custom;allowed_words_usage_name;occurrences_name;results;error_search_short" value="results_per_page,words,without_words;*,Title,Body;empty,no_results;1;with at least one of the words,with all the words,with the exact phrase;from any field in an article,from the title of an article,from the body of an article;results;Your search parameter must be at least 2 characters." />
[SQL (0.004174): select name from txp_section where `name` = ‘search’ limit 1]
[SQL (0.007540): select Form from txp_form where name=‘ob1_search_advanced_form’]
[SQL (0.004640): select Form from txp_form where name=‘ob1_search_advanced_header’]
[SQL (0.004682): select Form from txp_form where name=‘ob1_search_form’]
[SQL (0.005541): select Form from txp_form where name=‘search_results’]
[ob1_advanced_search initialize: Ok]
[ob1_advanced_search set: ‘allowed_usage’ to ‘results_per_page,words,without_words’: Ok]
[ob1_advanced_search set: ‘occurrences’ to ‘*,Title,Body’: Ok]
[ob1_advanced_search set: ‘show_search_form’ to ‘empty,no_results’: Ok]
[ob1_advanced_search set: ‘search_custom’ to ‘1’: Ok]
[ob1_advanced_search set: ‘allowed_words_usage_name’ to ‘with at least one of the words,with all the words,with the exact phrase’: Ok]
[ob1_advanced_search set: ‘occurrences_name’ to ‘from any field in an article,from the title of an article,from the body of an article’: Ok]
[ob1_advanced_search set: ‘results’ to ‘results’: Ok]
[ob1_advanced_search set: ‘error_search_short’ to ‘Your search parameter must be at least 2 characters.’: Ok]
Stuart
In a Time of Universal Deceit
Telling the Truth is Revolutionary.
Offline
Re: [plugin] [ORPHAN] ob1_advanced_search
The set/value call to the plugin just does the setting and no displaying this since you can have multiple set calls to the plugin before you want any output done. You need another call to the plugin just after it.
Example:
<txp:ob1_advanced_search set="show_search_form" value="empty,no_results"/>
<txp:ob1_advanced_search set="search_custom" value="3" />
<txp:ob1_advanced_search />
I know that the manual probably needs work with some more examples and a bit more in-depth but I felt it was time to release the plugin and continue writing on the documentation on a later stage. Any pointers regarding the documentation are ofcourse also of interest.
Edit: Incorrect call to the plugin in the example code. Bad Henrik, baaad Henrik. slaps my own hand
Last edited by obeewan (2007-09-22 15:14:04)
Plugins:
ob1_advanced_search 1.032b, ob1_search_score 1.0, ob1_pagination 2.5, ob1_title 4.1, ob1_modified 2.1
“Let your plans be dark and as impenetratable as night, and when you move, fall like a thunderbolt.”
— Sun Tzu
Offline
Re: [plugin] [ORPHAN] ob1_advanced_search
Done that. Still blank and those new calls aren’t showing in the source code at all.
Stuart
In a Time of Universal Deceit
Telling the Truth is Revolutionary.
Offline
Re: [plugin] [ORPHAN] ob1_advanced_search
Stuart,
I sent you an e-mail through the forum requesting you to send me some more info for study.
Last edited by obeewan (2007-09-19 12:02:16)
Plugins:
ob1_advanced_search 1.032b, ob1_search_score 1.0, ob1_pagination 2.5, ob1_title 4.1, ob1_modified 2.1
“Let your plans be dark and as impenetratable as night, and when you move, fall like a thunderbolt.”
— Sun Tzu
Offline
Re: [plugin] [ORPHAN] ob1_advanced_search
Ok.
Stuart
In a Time of Universal Deceit
Telling the Truth is Revolutionary.
Offline
#54 2007-09-19 19:16:33
- Logoleptic
- Plugin Author
- From: Kansas, USA
- Registered: 2004-02-29
- Posts: 482
Re: [plugin] [ORPHAN] ob1_advanced_search
I’m a little unclear about something in your documentation. You cite all_words
as being the equivalent of vanilla Textpattern search, but doesn’t the built-in search work by phrase? For example, a search of my site for textpattern wrap (without quotes) returns no results, even though this article contains both words.
Given that, what exactly does all_words
do? Is it the same as the built-in search feature, or does it find all articles that contain all the words searched for?
Offline
Re: [plugin] [ORPHAN] ob1_advanced_search
Given that, what exactly does all_words do? Is it the same as the built-in search feature, or does it find all articles that contain all the words searched for?
You are correct, the manual is not. all_words
searches for articles that contain just that, ALL the words where TXP does, as you said, an exact phrase match for what you have entered.
So in the future manual it will state that exact_phrase
is the built-in search feature, not all_words
. [Makes mental note]
Last edited by obeewan (2007-09-22 15:18:57)
Plugins:
ob1_advanced_search 1.032b, ob1_search_score 1.0, ob1_pagination 2.5, ob1_title 4.1, ob1_modified 2.1
“Let your plans be dark and as impenetratable as night, and when you move, fall like a thunderbolt.”
— Sun Tzu
Offline
Re: [plugin] [ORPHAN] ob1_advanced_search
I have some problems,
the first depends maybe on the fact I’m not a mother tongue english, so I didn’t understand this: Is it possible with this plugin to perform a search only in a particular section of the website? that is: the visitor type a word in a searchbox put in a partiular section, and the results include only occurrences from that section’
The second problem is: I put the setup=“1” argument chunk before performing the pre check, and I suppose I have the database in a mess. I’d like to uninstall completely and start back the process, may I have some detailed information in doing this.
Most of the errors I got in installing the plugin, were because of the fact, during the original install of txp, i added a prefix to my db tables, instead of “textpattern” I have for instance the table “ats_textpattern”. How can i modify the plugin to fit the differences between the basic textpattern install of txp and mine with custom table prefixes?
Thank you very much in advance
Simone (Italy)
In the meantime i kept searching and found the way to search in a particular section with the built in search engine of txp… I need anyway help on the other matters… anyone there?
Last edited by midmood (2007-10-03 21:46:19)
Offline
Re: [plugin] [ORPHAN] ob1_advanced_search
the first depends maybe on the fact I’m not a mother tongue english, so I didn’t understand this: Is it possible with this plugin to perform a search only in a particular section of the website? that is: the visitor type a word in a searchbox put in a partiular section, and the results include only occurrences from that section’
The plugin currently uses the same sections as defined for the normal search. No sectionspecific searches are currently available. Might be a feature to add though.
The second problem is: I put the setup=“1” argument chunk before performing the pre check, and I suppose I have the database in a mess. I’d like to uninstall completely and start back the process, may I have some detailed information in doing this.
All the plugin adds are indexes in the textpattern table, all starting with the words searching_
. I have thought of a uninstall feature so if you do not have any database software like PHPMyAdmin or simular (and knowledge of it) it might be tricky.
Most of the errors I got in installing the plugin, were because of the fact, during the original install of txp, i added a prefix to my db tables, instead of “textpattern” I have for instance the table “ats_textpattern”. How can i modify the plugin to fit the differences between the basic textpattern install of txp and mine with custom table prefixes?
Oups! Bug found. I don’t add the prefix when creating the indexes. My bad. Will be fixed in the upcoming version (destined this weekend).
Plugins:
ob1_advanced_search 1.032b, ob1_search_score 1.0, ob1_pagination 2.5, ob1_title 4.1, ob1_modified 2.1
“Let your plans be dark and as impenetratable as night, and when you move, fall like a thunderbolt.”
— Sun Tzu
Offline
Re: [plugin] [ORPHAN] ob1_advanced_search
New version out and about. Say hello to v1.03b.
See first post for details.
v1.03b [2007-10-05]
Bug fix
- Didn’t add table prefix to the textpattern table when creating indexes
- Didn’t filter out the sections not to search in a standard search
New features
- Uninstall attribute for removing the indexes created by the plugin (forms etc you have to remove by the TXP interface)
- Sections attribute for limiting the search to specified sections
Plugins:
ob1_advanced_search 1.032b, ob1_search_score 1.0, ob1_pagination 2.5, ob1_title 4.1, ob1_modified 2.1
“Let your plans be dark and as impenetratable as night, and when you move, fall like a thunderbolt.”
— Sun Tzu
Offline
Re: [plugin] [ORPHAN] ob1_advanced_search
I don’t believe it!!!! A plugin on demand :-)
Thank you for your reply, anyway, and glad to be one of your debugger :-)
now it fits perfects my needs
Offline
Re: [plugin] [ORPHAN] ob1_advanced_search
now it fits perfects my needs
Glad I could help. And do note that it’s best to set up this plug in in a debug mode. If you can’t set the whole site to debug add the following to the page template you are going to test in:
<txp:php>
global $production_status;
$production_status='debug';
</txp:php>
which will make just that page/section go into debug mode and report errors that might occur.
Plugins:
ob1_advanced_search 1.032b, ob1_search_score 1.0, ob1_pagination 2.5, ob1_title 4.1, ob1_modified 2.1
“Let your plans be dark and as impenetratable as night, and when you move, fall like a thunderbolt.”
— Sun Tzu
Offline