G2 Image Chooser + Gallery search

mjrensen

Joined: 2007-12-17
Posts: 4
Posted: Fri, 2008-05-16 15:08

Aloa,

I understand that you, capt_kirk would like to finish your stability-tests before working on new features, such as Gallery search. Problem is for a client I have a gigantic gallery (5000+ items) which serves as a base for images in news items, reviews etc.
So I started working on a rudimentary search function. I added a search function in g2image.php which seems like it might work (combined code from Gallery native search function with functions already present in g2image.php for retrieving images). I'm however unable to test it because I can't get my head around the javascript-part of the code (I know, ironic).

Can anybody take a quick peek at my functions and try to point me in the right direction as to get this monster working? I've attached my version of g2image.php for you reference.
For the record, I've added these functions:
g2ic_make_html_search() (line:917)
g2ic_search_gallery() (line:1010)

and I modified the Main HTML Generation (line:34) code to add the html for the search function.

Any help no matter how small is highly appreciated!

AttachmentSize
g2image.php_.zip8.55 KB
 
capt_kirk

Joined: 2006-01-24
Posts: 492
Posted: Fri, 2008-05-16 15:19

mjrensen,

Thanks. I'm swamped today, and I'll be camping this weekend with the Boy Scouts, so I won't have time to really look at this until Sunday at the earliest.

One note, you based this on version 3.0.2 (rightly so, since it's the stable version). But for version 3.1, I've almost totally rewritten large sections of code. I'm not sure how those changes will affect the search function. At first glance, it will definitely affect the variables that you're pulling the info from.

Also at first glance, it looks like it should work. But I'll have to load it up and test it out on Sunday to really help troubleshoot it.

Assuming we can get it working, I'll be happy to roll it into 3.1.

Kirk
____________________________________
G2Image Documentation, G2Image Demo Page, My Family Website

 
mjrensen

Joined: 2007-12-17
Posts: 4
Posted: Thu, 2008-06-05 23:08

Hi capt_kirk,

I've managed so far to get a perliminary search function working. You can enter a search word and it will give you back results. There's a couple of bugs: ordering doesn't work anymore for example. But I think this is something we can work from. Looking forward to your feedback :)
I didn't realize about the 3.1 version. Is there a beta-release that I missed? I hope we'll be able to implement this nicely since for me and I can imagine for loads of other people it's a huge improvement...

 
mjrensen

Joined: 2007-12-17
Posts: 4
Posted: Thu, 2008-09-25 10:47

Just "compiled" a new version of my implementation of gallery search in gallery2imagechooser. It's definitely usable, with some minor bugs still waiting to be fixed (sorting, pagination)

Enjoy!