Dana Ross
Forum Replies Created
-
The PHP code runs when the browser requests the Javascript file and sticks the URL in there. It’s a hard-coded string as far as Javascript is concerned.
That sounds about right. Thanks for catching that, and thanks for the patch!
Forum: Plugins
In reply to: [Plugin: Dave’s WordPress Live Search] Only Search after 3 ChactersAre you kidding? I was running 2.9 when it was a release candidate ??
Unfortunately, WordPress doesn’t offer a way for plugins to gracefully refuse to turn on. I’ve made some changes to how the plugin behaves under PHP4, and they can be found in the “trunk” (development) version of the plugin. But, the best I can do is nag every time an admin page is displayed.
If possible, you should seriously consider upgrading to PHP 5. The 4.x versions aren’t being supported anymore, and 5.x offers a ton of enhancements – not the least of which is better performance.
Forum: Plugins
In reply to: [Plugin: Dave’s WordPress Live Search] Only Search after 3 ChactersViewclips, I’d be happy to add you as a maintainer if you want to take a crack at making this plugin better. It runs pretty snappily on my site (csixty4.com), but I could see it being slow elsewhere. Let me know if you’re interested.
I could swear I fixed the apostrophe thing. Damn. I wonder if something was changed in WP 2.9 that broke it again.
As for making it faster, one thing that springs to mind is caching usernames somewhere. The standard WordPress search only returns user IDs, which I have to do a separate query to turn into names. That information doesn’t change much, so we might as well dump the names to a file somewhere (unless that’s a security issue). It has to be faster than a DB query.
Forum: Plugins
In reply to: [Plugin: Dave’s WordPress Live Search] Only Search after 3 ChactersSince viewclips did half (25% maybe?) of the work, I went ahead & implemented this in the “trunk” (development) version. It’ll be part of the 3.0 release, unless I decide to do a 2.10. I’m not even sure www.remarpro.com’s system will let me do a 2.10, so probably 3.0.
Alright, now you guys have to explain to Mrs. Csixty4 why I didn’t work on the gift basket web site tonight ??
Forum: Plugins
In reply to: [Plugin: Dave’s WordPress Live Search] Only Search after 3 ChactersThat’s basically it, yeah. I’m tied up re-doing a web site in my off-hours right now, so I haven’t gotten around to making the change. Thanks for finding that – it’ll make the actual change a snap.
I think I’m going to make it configurable, with a dropdown for picking “right away”, “1 character”, “2 characters”, or “3 characters”.
I hate adding another configuration option, but I could see someone wanting that kind of control.
Thanks, guys.
Forum: Plugins
In reply to: [Plugin: Dave’s WordPress Live Search] Only Search after 3 ChactersI’d like to do something like that. I’m not sure how I want to cut back on queries, but I like your idea. I mean, how useful are results for a two-character search anyway?
Forum: Fixing WordPress
In reply to: [Plugin: Dave’s WordPress Live Search] How to exclude pages?SANR,
Thanks for getting in touch with me about this. When trying to diagnose something like this over the Internet, it’s always helpful to have a link to your site so I can get an idea of what’s going on.
Just to make sure it’s clear, as I’ve had some questions since releasing this feature: the “exclude” option just means you wont get a Live Search box appearing when you search on a certain page. I this is the effect you’re trying to get, post a link to your site along with the permalink as you entered it in the setup page, and I’ll take a look.
If you’re actually looking to exclude a certain page from the search results, you will need to find another plugin. The “Dave’s WordPress Live Search” plugin uses WordPress’s normal search functionality, and any plugin which filters certain pages out of the WordPress search results should filter pages out of my plugin’s results too. I believe the “Search Everything” plugin does this.
Thanks,
DaveForum: Plugins
In reply to: [Plugin: Dave’s WordPress Live Search] Doesn’t work with Web OptimizerI found out there’s an AJAX API built into WP that I should probably be piggy-backing onto. Maybe that would fix it?
I’ll try to investigate this week.
Forum: Plugins
In reply to: [Plugin: Dave’s WordPress Live Search] Few optimisationsI made most of the changes you recommended. I’m still on the fence about getting rid of the dynamic positioning. I can certainly do something with CSS, but the point of doing it that way was to eventually be able to ditch the requirement of only having one search box on the page.
I’d actually like to get that working at some point, although it doesn’t affect many themes. Go ahead & grab the latest development version if you want and let me know how it performs for you.
Thanks again!
DaveForum: Plugins
In reply to: [Plugin: Dave’s WordPress Live Search] Few optimisationsScrew it, handleClicks has been replaced with a closure passed to click(). Goodbye, old friend.
Forum: Plugins
In reply to: [Plugin: Dave’s WordPress Live Search] Few optimisationshandleClicks can actually be one line shorter at that point, as we don’t need that target variable anymore.
The exceptions list is in the development version now, too. The functionality works great, but I need to figure out how I’m going to describe it. Right now, the description sounds like something a programmer threw together before running out the door to work…
Well, that was easy. I added an is_admin() check to the current development version. It’ll get included in the next release, probably around the beginning of the year.