Gossamer Forum
Home : Products : Gossamer Links : Development, Plugins and Globals :

[RELEASED] Search by first letter

Quote Reply
[RELEASED] Search by first letter
I put a plug-in on the FAQ site.

It handles a start-of-word search. The upshot is, that you can set up a field in your links record with a name, a word, or a phrase you want to search by, and you can allow searches in alphabetical order. This was supposed to be the start of a letter bar, but I expanded it to allow any number of start-of-word chracters.

You can see how it works on the Domains site I have, where I wanted to be able to search by first letter, or starting characters of the Domain_Name field, rather than by substring or exact match.

http://pugdog.com/Domains/

This is shareware, $5 or more.

Note: I left a bit of debugging code in you can remove by editing the plug-in and deleting the 'print' statements in the Alpha_Bar.pm file. The reason I left them in, is it will help to make sure you set up your searches correctly. Normal searches will only see the plugin start, a plug-in search will show the terms it's working on.

NOTE2: It seems you can install directly from http://LinkSQL.com/FAQ/pages/files/Alpha_Bar.tar

But there is an install problem Alex will have to address (remote installs install both into Uninstalled, and Installed).





PUGDOGŪ
PUGDOGŪ Enterprises, Inc.
FAQ: http://LinkSQL.com/FAQ


Quote Reply
Re: [RELEASED] Search by first letter In reply to
Anyone have any problems with this one?

Any using it??

Noone has said anything at all about this one.

PUGDOGŪ Enterprises, Inc.
FAQ:http://LinkSQL.com/FAQ
Forum:http://LinkSQL.com/forum
Quote Reply
Re: [RELEASED] Search by first letter In reply to
IF there was someway to convert this into a true alphabar type thing then that would be really cool, but i don't think it really works like that and would probably be a completly different mod wouldn't it?

http://www.ASciFi.com/ - The Science Fiction Portal
Quote Reply
Re: [RELEASED] Search by first letter In reply to
Well, that was the original intent.

Problem is that everyone expects something different from the alphabet bar (it means something different to them).

It would be farily easy to create an AlphaBar tag that would allow searching.

What this mod does allow, is if you enter "a" into the box, then all links begining with "a" will show up. If you enter "Angle" then only links beginning with angel will show up.

It's different from the standard search, since the standard search _SHOULD_ show up anything with "angel" in it, like "Prettyangels", or just " Angels ".

It's not limited by category, but it would be fairly easy to also allow a user to select which field to search by radio buttons (I don't know if multiple column searches are allowed by the links search routine or not).

At any rate, it's a good starting place for people to add functionality.

It would be neat, if during category generation, a new field in the Category table was set up that showed what letters should be "active" on the letter bar. (Generating that sort of stat dynamically would kill a server). That way, when a category was displayed, only the letters that had "hits" would be active.


PUGDOGŪ Enterprises, Inc.
FAQ:http://LinkSQL.com/FAQ
Forum:http://LinkSQL.com/forum
Quote Reply
Re: [RELEASED] Search by first letter In reply to
well basically i just want exactly the same as what dmoz.com use, ie not for searching but for category management so that you don't have to have A, B, C, D etc going down a page that just looks stupid.

I think that is perhaps what you mean but the last line but not sure. There was quite a long discussion about alphabar and dmoz.com implementation of it somewhere but i guess it got dropped. Someone also made the mod for the old links by adding a field inside category so that it was a different type of category and then just a different routine to build those categories differently. I had no luck trying to get it to work for NG

http://www.ASciFi.com/ - The Science Fiction Portal
Quote Reply
Re: [RELEASED] Search by first letter In reply to
You can search within a category by using the:

<%if category_id%>
<input type="radio" name="catid" value="<%category_id%>"> only this category
<%endif%>

To pass in catid=nnn. You can do that with the AlphaBar I have now, just edit the template output.

If I have time, I plan to work on this, but really, at the moment it's a low priority. I can see it as part of the image/gallery management program, but that is still 4-6 weeks away.

PUGDOGŪ Enterprises, Inc.
FAQ:http://LinkSQL.com/FAQ
Forum:http://LinkSQL.com/forum