Hi Ping,
I tested your mod but with no success. Nothing happens.
Except for the "Loading..." value the search box code is identical to the original one.
Is there something missing?
[TUTORIAL] Search autocomplete
Moderator: effi
6 posts
• Page 1 of 1
Re: [TUTORIAL] Search autocomplete
Hello,
I "drafted" an autocomplete on my website (http://www.ton-annuaire.fr). The search field doesn't work on Firefox but it works on IE. If you want to try.
It's still under coding and requires lots of changes in Arfooo core to build the index of all words in the directory (I have 5000 sites and 35000 single words...)
I "drafted" an autocomplete on my website (http://www.ton-annuaire.fr). The search field doesn't work on Firefox but it works on IE. If you want to try.
It's still under coding and requires lots of changes in Arfooo core to build the index of all words in the directory (I have 5000 sites and 35000 single words...)
- ben2paris
- Posts: 7
- Joined: Mon May 04, 2009 3:20 pm
- Location: Burgundy, France
Re: [TUTORIAL] Search autocomplete
i think you have typed wrong the data to connect to the mysql DB
also make sure that your table name is arfooo_sites (or whatever_sites)
and also put the right path here to your autocomplete file:
{php}
include ("path/autocomplete.php");
{/php}
btw I tested and it worked
also make sure that your table name is arfooo_sites (or whatever_sites)
and also put the right path here to your autocomplete file:
{php}
include ("path/autocomplete.php");
{/php}
btw I tested and it worked
- ping
- Posts: 23
- Joined: Sat May 02, 2009 12:41 am
Re: [TUTORIAL] Search autocomplete
Hello,
As I said in the French forum, I think this will use lots of Server resources as the php file is called each time you load a page.
I found a way to do this autocomplete in ajax without using too much resources (works on http://www.ton-annuaire.fr).
The problem I have is that I have to customize so much files that I'll not propose a hack but ask Arf to put it on the TO DO list for next version.
How does it work?
I created a table (search) in which I store all the single words in the websites descriptions with the number of occurences of them. Example:
1 sejourner 7
2 au 1229
3 maxime 2
4 est 1289
5 une 1497
6 bien 140
7 ageable 1
8 maniere 13
9 de 11114
10 decouvrir 231
11 auxerre 3
12 cette 131
13 belle 36
14 maison 242
15 caractere 32
16 vous 1756
17 accueille 93
...
Ideally, but not yet coded, the search table would be updated when validating or editing a website.
The search field is linked to a Javascript that posts the keys pressed by the user to a PHP script that queries the database and returns the results in a popup.
Problems
I didn't find how to include accented characters in the search table
The table contains lots of single words (25000 for 5000 sites)
Advantages
PHP script is ran only when a user uses search field.
As I said in the French forum, I think this will use lots of Server resources as the php file is called each time you load a page.
I found a way to do this autocomplete in ajax without using too much resources (works on http://www.ton-annuaire.fr).
The problem I have is that I have to customize so much files that I'll not propose a hack but ask Arf to put it on the TO DO list for next version.
How does it work?
I created a table (search) in which I store all the single words in the websites descriptions with the number of occurences of them. Example:
1 sejourner 7
2 au 1229
3 maxime 2
4 est 1289
5 une 1497
6 bien 140
7 ageable 1
8 maniere 13
9 de 11114
10 decouvrir 231
11 auxerre 3
12 cette 131
13 belle 36
14 maison 242
15 caractere 32
16 vous 1756
17 accueille 93
...
Ideally, but not yet coded, the search table would be updated when validating or editing a website.
The search field is linked to a Javascript that posts the keys pressed by the user to a PHP script that queries the database and returns the results in a popup.
Problems
I didn't find how to include accented characters in the search table
The table contains lots of single words (25000 for 5000 sites)
Advantages
PHP script is ran only when a user uses search field.
- ben2paris
- Posts: 7
- Joined: Mon May 04, 2009 3:20 pm
- Location: Burgundy, France
Re: [TUTORIAL] Search autocomplete
yea you are right, but its more like a concept (i'm using with keywords im the same page, not for the search results)
my future website will use a ajax autocomplete, right now i just dont have the time to make it work but i know that is possible and i think is even more simple from what you say, i remember a script from another directory that only start the autocomplete when the user type the 3th letter (best choise, imo), then he make a custom search base on alphabetical order if that 3 letters so it uses way less queries
my english sucks, dont know if you can understand it
my future website will use a ajax autocomplete, right now i just dont have the time to make it work but i know that is possible and i think is even more simple from what you say, i remember a script from another directory that only start the autocomplete when the user type the 3th letter (best choise, imo), then he make a custom search base on alphabetical order if that 3 letters so it uses way less queries
my english sucks, dont know if you can understand it
- ping
- Posts: 23
- Joined: Sat May 02, 2009 12:41 am
6 posts
• Page 1 of 1
Return to Templates, plugins and tutorials
-
- Related topics
- Replies
- Views
- Last post
-
- Tutorial to fix the sitemap.xml (thanks tobzbz)
by effi » Sun Jul 05, 2009 3:19 pm - 0 Replies
- 2799 Views
- Last post by effi
Sun Jul 05, 2009 3:19 pm
- Tutorial to fix the sitemap.xml (thanks tobzbz)
-
- Need a good HTML tutorial
by jacksoncarrey » Mon Sep 06, 2010 3:08 pm - 1 Replies
- 3244 Views
- Last post by avinmichal
Wed Jul 13, 2011 3:16 pm
- Need a good HTML tutorial
-
- Tutorial: Create a new custom Text
by saidbakr » Sun Jun 21, 2009 12:31 pm - 2 Replies
- 5316 Views
- Last post by saidbakr
Sun Mar 07, 2010 9:42 pm
- Tutorial: Create a new custom Text
-
- Starting from Scretch: video tutorial?
by gastroll » Sun Jan 09, 2011 6:34 am - 2 Replies
- 1921 Views
- Last post by gastroll
Tue Jan 11, 2011 2:48 am
- Starting from Scretch: video tutorial?
-
- Tutorial: Create a new page in Arfooo Directory
by Arf » Sat Aug 09, 2008 11:53 am - 14 Replies
- 21514 Views
- Last post by iHerts
Thu Sep 08, 2011 7:15 pm
- Tutorial: Create a new page in Arfooo Directory
Who is online
Users browsing this forum: No registered users and 0 guests