[phpBB Debug] PHP Notice: in file /includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Notice: in file /includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Notice: in file /includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Notice: in file /includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Notice: in file /includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Notice: in file /includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Notice: in file /includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Notice: in file /includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Notice: in file /includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Notice: in file /includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Notice: in file /includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Notice: in file /includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Notice: in file /includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Notice: in file /includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Notice: in file /includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Notice: in file /includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Notice: in file /includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Notice: in file /includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Notice: in file /includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Notice: in file /includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Notice: in file /includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Notice: in file /includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Notice: in file /includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Notice: in file /includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Notice: in file /includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Notice: in file /includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Notice: in file /includes/bbcode.php on line 112: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Notice: in file /includes/bbcode.php on line 112: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Notice: in file /includes/functions.php on line 4363: Cannot modify header information - headers already sent by (output started at /includes/functions.php:3542)
[phpBB Debug] PHP Notice: in file /includes/functions.php on line 4365: Cannot modify header information - headers already sent by (output started at /includes/functions.php:3542)
[phpBB Debug] PHP Notice: in file /includes/functions.php on line 4366: Cannot modify header information - headers already sent by (output started at /includes/functions.php:3542)
[phpBB Debug] PHP Notice: in file /includes/functions.php on line 4367: Cannot modify header information - headers already sent by (output started at /includes/functions.php:3542)
[TUTORIAL] Search autocomplete

[TUTORIAL] Search autocomplete

Propose here your templates, your plugins or ask one.
All tutorials available for Arfooo Directory are available in this category.

Moderator: effi

[TUTORIAL] Search autocomplete

Postby ping » Mon May 04, 2009 1:10 am

ping
 
Posts: 23
Joined: Sat May 02, 2009 12:41 am

Re: [TUTORIAL] Search autocomplete

Postby chadon » Mon May 04, 2009 9:45 am

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?
chadon
 
Posts: 59
Joined: Mon Jan 19, 2009 10:29 pm
Location: NB Canada

Re: [TUTORIAL] Search autocomplete

Postby ben2paris » Mon May 04, 2009 3:32 pm

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...)
ben2paris
 
Posts: 7
Joined: Mon May 04, 2009 3:20 pm
Location: Burgundy, France

Re: [TUTORIAL] Search autocomplete

Postby ping » Mon May 04, 2009 7:12 pm

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
ping
 
Posts: 23
Joined: Sat May 02, 2009 12:41 am

Re: [TUTORIAL] Search autocomplete

Postby ben2paris » Tue May 05, 2009 4:18 am

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.
ben2paris
 
Posts: 7
Joined: Mon May 04, 2009 3:20 pm
Location: Burgundy, France

Re: [TUTORIAL] Search autocomplete

Postby ping » Tue May 05, 2009 3:06 pm

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 :oops:
ping
 
Posts: 23
Joined: Sat May 02, 2009 12:41 am


Return to Templates, plugins and tutorials

 


  • Related topics
    Replies
    Views
    Last post

Who is online

Users browsing this forum: No registered users and 2 guests

 
Copyright © arfooo.net  2007 - 2010  -  All rights reserved.
Arfooo website group: petites annonces gratuites   voyance en direct - tirage tarot   Consultant en référencement
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group | phpBB SEO
cron