Ajax Live Search Extension Updated 18/5/2010

In this section you can share self-made extensions with other users of WYSIWYG Web Builder.
There is a dedicated section for commercial extensions.
Post Reply
User avatar
kevinp
 
 
Posts: 96
Joined: Wed Feb 21, 2007 2:51 pm
Location: Preston, Lancashire, England

Ajax Live Search Extension Updated 18/5/2010

Post by kevinp »

Hi

Ive updated my Live search Extension to now work with WB6. As you type in your search term results appear below it (Google Style).

You can see it working here in the top right corner named Quick Product Find. You can see another example here. Click 'Search by Keyword' on the menu or main page.

You can download the extension here
http://www.mediafire.com/?d36a368rh7kz0d9

The code is taken from a lesson at http://www.w3schools.com/php/php_ajax_livesearch.asp and is free to use.

I'll try to add a dataset within the extension asap.
Hope you find it useful
Last edited by kevinp on Sun Nov 21, 2010 10:59 pm, edited 15 times in total.
User avatar
BaconFries
 
 
Posts: 5328
Joined: Thu Aug 16, 2007 7:32 pm

Post by BaconFries »

This is nice... :D could be very useful thanks for this....
jordan
 
 
Posts: 831
Joined: Tue Jun 26, 2007 1:56 pm
Contact:

Post by jordan »

looks very nice and handy indeed ... thank you . :D .
User avatar
Eddy
 
 
Posts: 473
Joined: Tue Nov 27, 2007 1:52 am
Location: Nederland.

Post by Eddy »

Nice search tool!

Please read this posting if you build extensions.
viewtopic.php?t=17899

Thank you.
User avatar
me.prosenjeet
 
 
Posts: 1265
Joined: Mon Dec 24, 2007 1:50 pm
Location: Lucknow
Contact:

Post by me.prosenjeet »

Is this a search engine in itself or uses "Live Search" like we were using Google otherwise?
Check the new Chat GPT and Malware detect extensions at the link below

Check my WB Extensions
Check my WB Templates
---------------------------------------------------------
www.Lucknowwebs.com
User avatar
zinc
 
 
Posts: 2146
Joined: Sat Dec 08, 2007 3:06 pm
Location: London, United Kingdom
Contact:

Post by zinc »

Kev;
This is very nice but is it poss to be able to go through the results as they appear using the keyboard (Arrows) I tried and it does not seem to like it.
Running WYSIWYG Web Builder since 2007...
haakoo
 
 
Posts: 189
Joined: Fri Apr 25, 2008 8:02 am
Location: Groningen/NL

Post by haakoo »

Actually i don't find this to be live search,
I would call this an autofill form.


Hans
User avatar
kevinp
 
 
Posts: 96
Joined: Wed Feb 21, 2007 2:51 pm
Location: Preston, Lancashire, England

Post by kevinp »

I supose it is more like an autofill form really but it emulates the Live Search effect.

It currently only searches a predefined file as that has been my main use for it (as you'll see from the examples) but the possibility of searching the web would be an interesting option.

You can't currently scroll through the results with the keyboard due to the fluid way the info is presented but I'll look into it and see if it's possible. It would also be nice to have the chosen result placed in the Search Box on selection (for use on forms etc).
User avatar
kevinp
 
 
Posts: 96
Joined: Wed Feb 21, 2007 2:51 pm
Location: Preston, Lancashire, England

Post by kevinp »

Thanks for the error report. It seems my server had gone a bit strange. I was planning an update to re captcha and have done this tonight plus I've also improved the email format. I will update the forms so they don't lose data if a wrong code is input.
As for the home page link, that was entirely my fault.

Thanks again.
User avatar
kevinp
 
 
Posts: 96
Joined: Wed Feb 21, 2007 2:51 pm
Location: Preston, Lancashire, England

Post by kevinp »

Hi

Not sure why this is happening, never come across it before. It actually sounds like a problem with the server and is most likely the result of something triggering a rule in the server's "mod_security" rules.

A quick way to resolve this is to put the following in a .htaccess file in your web site's /home/username/public_html directory:

Code: Select all

SecFilterEngine Off
This will disable mod_security for your domain.

You may have to contact your host in order to have this disabled.

Hope this helps
User avatar
protectourlands
 
 
Posts: 443
Joined: Sat May 24, 2008 2:16 am
Contact:

Post by protectourlands »

kevinp

Thank you for this extension. I can really use this. Any plans to soon add the capability to compse the xml list through the extension? This would really make the extension helpful.
User avatar
kevinp
 
 
Posts: 96
Joined: Wed Feb 21, 2007 2:51 pm
Location: Preston, Lancashire, England

Post by kevinp »

I am looking at updating with this functionality but just have'nt had the time lately. Its quite easy to do by setting the variable in the XML file but that would only give you a defined number of entries with no way of adding more. For this I would imagine you'd have to use the dataset option which I'm not totally familiar with just yet.
User avatar
kevinp
 
 
Posts: 96
Joined: Wed Feb 21, 2007 2:51 pm
Location: Preston, Lancashire, England

Post by kevinp »

The links XML file will only be uploaded if that is the file you choose otherwise it will be your chosen file. Make sure the xml file is formatted properly.

At some stage I hope to make this possible from within the extension but it's quite a time consuming job and I haven't had the time lately.

Hope this helps
User avatar
kevinp
 
 
Posts: 96
Joined: Wed Feb 21, 2007 2:51 pm
Location: Preston, Lancashire, England

Post by kevinp »

Mmmmmm. That's unusual. I'm using WB 6.5.7 and it seems to work OK so I'm sure that's not the problem.

I'll have a play around with it and see if I can come up with an answer.
User avatar
kevinp
 
 
Posts: 96
Joined: Wed Feb 21, 2007 2:51 pm
Location: Preston, Lancashire, England

Post by kevinp »

I've rebuilt the extension with version 2.2.

Re download and try the new version to see if it works.

You can get it here http://www.mediafire.com/?5zjjkzdyz3y

Hope this helps
gp2727
 
 
Posts: 130
Joined: Fri Nov 04, 2005 12:40 pm
Location: USA

Post by gp2727 »

kevinp, here is the dataset .xsl file below you are looking for to update your extension at your leisure:

<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
version="1.0">
<xsl:output method="xml" indent="yes"/>
<xsl:template match='/'>
<pages>
<xsl:for-each select="DATASET/ITEM">
<title><xsl:value-of select="TITLE"/></title>
<url><xsl:value-of select="FILENAME"/></url>
</xsl:for-each>
</pages>
</xsl:template>
</xsl:stylesheet>
User avatar
kevinp
 
 
Posts: 96
Joined: Wed Feb 21, 2007 2:51 pm
Location: Preston, Lancashire, England

Post by kevinp »

I'll run a few tests and see what I can come up with. Sorry for the delay in replying but I've been away a lot lately.
User avatar
kevinp
 
 
Posts: 96
Joined: Wed Feb 21, 2007 2:51 pm
Location: Preston, Lancashire, England

Post by kevinp »

Hi Ian

I think I've cracked it. It seemed to have lost the link with the control files for some unknown reason.

I've re-built the whole thing, tested it on my server and it seems to work OK so i've updated the link at the beggining of the post to point at the new file.

To let the css file control the font size etc you need to set the document type to 'none' on the page properties 'General' tag.

Give it a try and let me know how you go on.

I'll hopefully be adding a internal dataset soon and possibly (if I can get it to work) a simple database.

Hope this helps

Kev
User avatar
kevinp
 
 
Posts: 96
Joined: Wed Feb 21, 2007 2:51 pm
Location: Preston, Lancashire, England

Post by kevinp »

Looks like a problem with the CSS file which controls the backgroung colour among other things. You need to set the document type to 'none' on the page properties 'General' tag.

I'll have a look and see what Ican come up with to overide this setting.
Post Reply