Textpattern CMS support forum

You are not logged in. Register | Login | Help

#11 2004-12-26 01:48:06

obeewan
Plugin Author
From: Stockholm, Sweden
Registered: 2004-08-12
Posts: 319
Website

Re: [plugin] [ORPHAN] ob1_advanced_search

I discovered a bug today with the search. I can not currently release a new version but you can fix it easily by yourself.

Find the three rows with the following code:

<code>$SQLQuery = join(” “,$fieldQuery);</code>

Alter them to instead read:

<code>$SQLQuery = “(” . join(” “,$fieldQuery) . “)”;</code>

The bug was that it searched (for instance) for draft articles etc when using the OR clause in the search (this OR that word).


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

#12 2005-04-12 14:50:47

ArbinShire
Member
From: Tallahassee, FL
Registered: 2004-03-23
Posts: 31
Website

Re: [plugin] [ORPHAN] ob1_advanced_search

It would be just dandy if one didn’t have to pick through this plugin trying to weed out the unneeded class information. It’s all nicely hidden away and a royal pita to do.

Any way to get a version without the class information for each input and destroy all those extra unneeded divs?

Offline

#13 2005-07-27 18:16:22

obeewan
Plugin Author
From: Stockholm, Sweden
Registered: 2004-08-12
Posts: 319
Website

Re: [plugin] [ORPHAN] ob1_advanced_search

The new version is on the drawing board at the moment but I need some feedback on how to continue on with this plugin. Any help is appriciated!

New features

  • Custom fields searchable
  • Able to set what the user may use in the admin panel
  • Able to set what is default for the different settings

Preferences

  • search type visible [y/n] (this is the all the words/exact match/any word)
  • search type default [1-3]
  • search results one (now 10) (might be stored finally in search plugin language)
  • search results two (now 20)
  • search results three (now 50)
  • search results four (now 100)
  • search results default [1-4]
  • search results save cookie [y/n] (save a cookie what the user has specified for number of results)
  • search without visible [y/n]
  • search custom fields [y/n]
  • search which custom fields [1-10] (multiple select)
  • search occurences default [1-13] (4-13 beeing custom fields)
  • search date visible [y/n]
  • search date between visible [y/n]
  • search date between format (default beeing %Y-%m-%d but can be set to any format)
  • search plugin language (comma separated list with all text that is used in the plugin)
  • search display excerpt [y/n] (instead of doing like google, just show the excerpt of the article, if any)

Problem one

So far my thought is to create a admin tab for the plugin settings. Not that hard to do in what I’ve seen. The only problem I see here is that I would really like to just have one tab for all my plugins (if there will be more that needs administration that is). Is it possible to create one tab for all of your plugins? On the examples I’ve downloaded and tried (like quikpik for instance) all I see that the tab calls on a function that needs to be included in the plugin. So do I need to first create a ob1-adminconfig plugin or can I later on tie more plugins to the same tab without the first beeing installed?

Problem two

Every custom field you add to be searchable creates another FULLTEXT index to the database and updating the “all” one too meaning I will have to do some writing to the database, especially if the user changes this often. Maybe not a problem but hmmm .. Anyone know how much strain a fulltext index does to the database?

That’s it for now I guess. It’s a start.

So, point away where you think it should be done differently.


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

#14 2005-07-27 18:35:46

obeewan
Plugin Author
From: Stockholm, Sweden
Registered: 2004-08-12
Posts: 319
Website

Re: [plugin] [ORPHAN] ob1_advanced_search

And in reply to ArbinShire,

All <code>div</code>s etc are stored in the forms, you are welcome to remove as much as you like. And as I stated earlier, the old version is released as-is meaning that I released as I myself used it and I’m not releasing another version of it. Whatever you get, it’s up to yourself to alter it to fit your needs.

How the new version will look “out-of-the-box” is still under development.

Last edited by obeewan (2005-07-27 18:36:15)


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

#15 2005-07-27 19:02:03

thebombsite
Plugin Author
From: Exmouth, England
Registered: 2004-08-24
Posts: 3,251
Website

Re: [plugin] [ORPHAN] ob1_advanced_search

Not being a coder I might be on the wrong track here but relating to “Problem one” does Manfre’s latest mem_admin_parse – Admin Side Plugin tags work along those lines?

I like the cookie idea and will it still work with “Googlenav”?

Have you settled in now? :) On pain of repeating myself I consider that the 2 most important things that TXP lacks is proper 404 processing and a proper search facility so go devs and go Henrik. Let’s get this application rocking!!!


Stuart

In a Time of Universal Deceit
Telling the Truth is Revolutionary.

Offline

#16 2005-07-28 11:51:50

obeewan
Plugin Author
From: Stockholm, Sweden
Registered: 2004-08-12
Posts: 319
Website

Re: [plugin] [ORPHAN] ob1_advanced_search

thebombsite,

  • I don’t exactly get what mem admin parse does but I’ll ask Manfre about that and see if it can help. Thanks for the heads-up.
  • Yes, it will still use ob1-googlenav. Since that plugin is working fine I see no need to re-invent the wheel.
  • No problem that you ain’t a coder, a lot of easy solutions come from non-coders since you don’t think in code and don’t see any problems in implementing something that a coder would think impossible.

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

#17 2005-07-28 13:39:20

thebombsite
Plugin Author
From: Exmouth, England
Registered: 2004-08-24
Posts: 3,251
Website

Re: [plugin] [ORPHAN] ob1_advanced_search

I never see any problems but that’s MY problem. :) As for being a non-coder I’m sort of in between. I can read what the code is doing and find the part that does something I want to look at and then I can probably hack it or create a new function that is similar but just tweaks something my way. As for writing something from scratch……. maybe next year. :grin:


Stuart

In a Time of Universal Deceit
Telling the Truth is Revolutionary.

Offline

#18 2005-07-28 13:45:35

obeewan
Plugin Author
From: Stockholm, Sweden
Registered: 2004-08-12
Posts: 319
Website

Re: [plugin] [ORPHAN] ob1_advanced_search

I never see any problems but that’s MY problem. :)

That in my eyes is not a problem as long as you have some people that at times hold your wildest dreams back some notches to get in touch with reality :). But ideas are good even if they are “way out there”.


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

#19 2005-08-12 18:41:17

tinyfly
Member
From: Dallas, Texas
Registered: 2004-05-10
Posts: 462
Website

Re: [plugin] [ORPHAN] ob1_advanced_search

Hi obeewan,

Has there been any progress on the new version? I hate textpattern’s built-in search and would love what you have proposed. My main needs right now are to be able to search links. Maybe have it search all by default and then a dropdown to search only links or only articles. Kind of like Amazon’s search.

Once you get this finished you should submit it to Dean and try to get the code built-in.

Last edited by tinyfly (2005-08-12 18:43:33)

Offline

#20 2005-08-12 22:05:26

tinyfly
Member
From: Dallas, Texas
Registered: 2004-05-10
Posts: 462
Website

Re: [plugin] [ORPHAN] ob1_advanced_search

I am using this with rc5. When I use it to filter out stuff (like in “without the words” or “date”) the search results count might say 0 results but it still list the articles as if I hadn’t filtered them out.

example: search for “global warming” without the word “kyoto” it still brings up the atricles that have the word kyoto in them.

Has anybody else run into this problem, and if so do you know how to fix it?

Offline

Board footer

Powered by FluxBB