ajax quick search, been done already ? (demo inside) ajax quick search, been done already ? (demo inside)
 

News:

CPG Release 1.6.26
Correct PHP8.2 issues with user and language managers.
Additional fixes for PHP 8.2
Correct PHP8 error with SMF 2.0 bridge.
Correct IPTC supplimental category parsing.
Download and info HERE

Main Menu

ajax quick search, been done already ? (demo inside)

Started by flux, June 27, 2006, 11:57:27 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

flux

lo,

made a few searches on the forum but i didn't really find anything mentionning the same thing so far, so i was wondering if an ajax quick search had already been done.

made a quick test on my remote hack demo and must say it's neat.. I guess i could be made as a plugin.. Don't even know if i used a good ajax lib or not but well it works, right ?

http://capsnscans.free.fr/cpg/

please point me out to current cpg(ng)/ajax talks if there are any so i can see what's been planned..
thx

.flux

affeee

Hi

Looks great!!!

Could you share this code? Would really like to try it out.

flux

the original code is here http://ajax.zervaas.com.au/examples/GoogleSuggestCloneJax/

releasing my code asis would probably not produce the desired effect on your cpg gallery..
For one it's not really complete, the search is made to match the start of the category name and that's not extremely flexible for a search engine.. but that can be easily modified.
I'm also using categories thumbnails which aren't used in a default cpg if i'm not mistaken, those thumbs are selected/updated on the fly by my custom theme so with your cpg data would probably lack the thumbnails but maybe that's not so important..

But i'm especially not experienced at all with ajax so i have no idea if the original code i've used is up to date or even compliant with ajax specifications and above all that i'm also quite poor at css/dhtml and i probably did something real ugly to make thoses DIV elements (drop down list and thumbnail display) stay in their place and i'm quite sure there are other better ways to handle the css part of my code..

i know some cpg devs are working with ajax on cpgng so maybe they can point me out to better, more apropriate, ajax libs..

Joachim Müller

We're currently discussing which AJAX library to use in the future, no decision has been made yet.

flux

thx for your answer

i've made what i wanted to, with that somehow "out of nowhere" ajax code and my main concern was that it would be browser/javascript friendly and it seems it is, so i'm quite satisfied with it..

n3n

Looks very nice :) Like that it also shows the amount of images and a previes. Should be nice to make a plugin from this code :)

flux

yeah well i didn't really check cpg plugin interface at the time so i just decided to throw the code and see what happens...

unfortunately the thumbnail and picture statistic displayed there are static and are not available in cpg out of the box..
In order for such ajax system to be quick enough, the databse query has to be as short as possible so the additional statistical data have to be generated separately..
here, it's done each time a remote update is made to the gallery..

And the ajax lib i've used isn't that great so i guess it'll be something better adapted to cpg2 with its own ajax support..