forum.coppermine-gallery.net

No Support => General discussion (no support!) => Topic started by: flux on June 27, 2006, 11:57:27 am

Title: ajax quick search, been done already ? (demo inside)
Post by: flux on June 27, 2006, 11:57:27 am
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/ (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
Title: Re: ajax quick search, been done already ? (demo inside)
Post by: affeee on June 27, 2006, 02:06:34 pm
Hi

Looks great!!!

Could you share this code? Would really like to try it out.
Title: Re: ajax quick search, been done already ? (demo inside)
Post by: flux on June 28, 2006, 10:02:42 am
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..
Title: Re: ajax quick search, been done already ? (demo inside)
Post by: Joachim Müller on July 03, 2006, 06:35:45 pm
We're currently discussing which AJAX library to use in the future, no decision has been made yet.
Title: Re: ajax quick search, been done already ? (demo inside)
Post by: flux on July 04, 2006, 03:21:07 pm
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..
Title: Re: ajax quick search, been done already ? (demo inside)
Post by: n3n on August 29, 2006, 11:45:05 am
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 :)
Title: Re: ajax quick search, been done already ? (demo inside)
Post by: flux on August 29, 2006, 02:11:21 pm
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..