forum.coppermine-gallery.net

Support => cpg1.4 plugins => cpg1.4.x Support => Older/other versions => cpg1.4 plugin contributions => Topic started by: Sami on June 16, 2007, 06:23:24 pm

Title: Active Search (Live AJAX Search)
Post by: Sami on June 16, 2007, 06:23:24 pm
Active Search beta

What is this:
=========
This plugin add a AJAX search/suggestion to your gallery
you can search
- Album's Title
- File's Title
by using this plugin

Installation:
=========
1. Copy "active_search" folder to your "plugins" folder
2. Copy "cpls.php" to your gallery root (You can find it inside active_search folder)
2. Go to "plugin manager" and install "Active Search"

Usage:
========
1.Select your desire search mode (Files/Album) by clicking on button
2.Type the title ;D
3.Select suggested result

Licence:
========
  Orginal Javascript (AJAX suggestion) (http://www.brandspankingnew.net/specials/ajax_autosuggest/ajax_autosuggest_autocomplete.html) and CSS : Coded by Timothy Groves,
  a designer based in Munich, Germany
  Under Creative Commons License.

Special thanks to dreams83 (http://forum.coppermine-gallery.net/index.php?action=profile;u=32815) who code this (http://forum.coppermine-gallery.net/index.php?topic=42180.0) nice mod
  

[Edit GauGau 2010-03-03]
This plugin has been added to the subversion repository: http://coppermine.svn.sourceforge.net/viewvc/coppermine/branches/cpg1.4.x/plugins/active_search

It has been updated as well to reflect the version checking routines in the plugin manager that are meant to make sure that galleries don't break because of plugins installed that aren't meant for that particular version of the gallery.

Download: https://sourceforge.net/projects/coppermine/files/Plugins/1.4.x/cpg1.4.x_plugin_active-search_v1.1.zip/download
[/Edit]
Title: Re: Active Search (Live AJAX Search)
Post by: searchforme on June 16, 2007, 07:01:07 pm
i get a 500 internal server error when i hit install button :(

but when click search link does it suppose to look like this? :
Title: Re: Active Search (Live AJAX Search)
Post by: Sami on June 16, 2007, 07:05:24 pm
try new one ;)
Title: Re: Active Search (Live AJAX Search)
Post by: searchforme on June 16, 2007, 07:22:04 pm
ok it works now.. i was just never able to find this tho :

"Configure plugin using button on Admin toolbar."



i was never able to find the button on Admin toolbar, was it suppose to have a button of its own ?
Title: Re: Active Search (Live AJAX Search)
Post by: Sami on June 16, 2007, 07:26:45 pm
Not at this version , sorry it's beta version Yet!
I'll remove that notice,
Thank you for testing
Title: Re: Active Search (Live AJAX Search)
Post by: searchforme on June 16, 2007, 10:19:18 pm
a couple of things.. im able to find albums. no matter where i am on my gallery. but i caint find 'files'
i always get no results, even if im in the same album as the file. i tried the exact file name etc.

& secondly , the search bar is on every page.. even when im on 'config' page as the admin
Title: Re: Active Search (Live AJAX Search)
Post by: Sami on June 16, 2007, 10:25:10 pm
Yes it loads on every pages , think of it as a header object that comes with menu items
can you post a link to your gallery?
I want to test search file ...
Title: Re: Active Search (Live AJAX Search)
Post by: searchforme on June 17, 2007, 01:06:47 am
http://pictures.hitdafreewayfast.com/

maybe instead of header it can be footer? or something? dunno up to you im just thinking outloud. im  trying to think of a way to make sure the gallery stays pretty to the eye..

edit-
foundt another bug.. when i log out I cant log back in. the login button wont work, im using netscape 8.1.3 using the firefox engine.... and same goes for regular search. if i were to click on 'search' at top right.. type in what i wanna search for.. & press the button , nothin happens

edit -
yea.. i had to uninstall the active search. to log back in as admin. & now i re-installed it so you can check it out
Title: Re: Active Search (Live AJAX Search)
Post by: Sami on June 17, 2007, 06:21:23 am
Search files is working type "d" , it search image's title and you didn't have title for most images

If you try it with classic theme or any other standard theme then you don't have login issue
I'll add a setting option for positioning to stable version
Title: Re: Active Search (Live AJAX Search)
Post by: François Keller on June 17, 2007, 12:47:28 pm
Hi Sami,

attached french.php file for your plugin  ;)

but i have a problem with your plugin, it doesn't work on my gallery (http://f.keller.free.fr/index.php)
Did i miss something ?
Title: Re: Active Search (Live AJAX Search)
Post by: Sami on June 17, 2007, 01:32:19 pm
I've got XML parse error !
this plugin use js & xml but it seems your server doesn't like simple xml format , maybe I should validate it
thanks for comment and language
Title: Re: Active Search (Live AJAX Search)
Post by: François Keller on June 17, 2007, 02:09:37 pm
oups, forgotten to attach french.php file :-\
 Just another thing, can you include button name and label in the language file (search, albums, files) for the stable version ?

Title: Re: Active Search (Live AJAX Search)
Post by: Sami on June 17, 2007, 02:29:24 pm
sure I will
Title: Re: Active Search (Live AJAX Search)
Post by: searchforme on June 17, 2007, 06:10:49 pm
oh yeah. for most my images i have no picture titles  :) , i did type in 'd' & it worked
Title: Re: Active Search (Live AJAX Search)
Post by: Sami on June 17, 2007, 07:05:16 pm
@Frantz: it seems that the probelm is on your side !
XML code created by cpls.php is valid !
Do you have any other XML on your server ?
Title: Re: Active Search (Live AJAX Search)
Post by: François Keller on June 17, 2007, 08:36:30 pm
I don't know. How can i find this out ?
(if you want i can send you an admin login/password by PM)
But I had the same problem on my local server (wamp5) :-\
Title: Re: Active Search (Live AJAX Search)
Post by: Davide Renda on June 17, 2007, 10:02:21 pm
working like a charm on my modded gallery 1.4.10 - great work Sami!!
Italian translation attached
Title: Re: Active Search (Live AJAX Search)
Post by: Sami on June 18, 2007, 08:55:36 am
@ Frants:
Can you try this:
Edit cpls.php and change this
Code: [Select]
header("Content-Type: text/xml");
echo "<?xml version=\"1.0\" encoding=\"UTF-8\" ?><results>";

To this:

Code: [Select]
header("Content-Type:text/xml;charset=utf-8");
echo '<?xml version="1.0" encoding="UTF-8"?><results>';

and also if those doesn't help then try

Code: [Select]
header('Content-Type: application/xml;charset=utf-8');
echo '<?xml version="1.0" encoding="UTF-8" ?><results>';

and let me know the result

@Lontano: thanks for translation and thanks for feedback :)
Title: Re: Active Search (Live AJAX Search)
Post by: François Keller on June 18, 2007, 07:03:44 pm
Sami,

I've foud the problem: it's a compatibillity problem with others plugins: on the moment, your plugin work's only with the contact, captcha and calendar plugins (i will test with others...)
Title: Re: Active Search (Live AJAX Search)
Post by: Sami on June 18, 2007, 07:18:48 pm
can you list all enabled plugins on you gallery ?
Title: Re: Active Search (Live AJAX Search)
Post by: Davide Renda on June 18, 2007, 10:21:00 pm
Sami,

I've foud the problem: it's a compatibillity problem with others plugins: on the moment, your plugin work's only with the contact, captcha and calendar plugins (i will test with others...)

Sounds weird to me, as I do have a few ones (:-D) installed on my gallery: Gallery Alphabetic Tabbing, MiniCMS, Full-Size Photos Access Control, Pic Poster, Copy Paste BB Code image, HighSlide, Master Template, Onlinestats, Upload Announcement, Movie Download Link and Calendar.
Title: Re: Active Search (Live AJAX Search)
Post by: François Keller on June 19, 2007, 08:12:35 am
Sami,

plugins which poses problem:
-keywords_add
-Update_history
-album_summary
-keyword_list
-Photo_summary
-Backup
-final_extract (works on my local gallery but not on my server)
-mini_cms
-stats

I haven't test others plugin's, but i've seen that the position of some plugin's change the compatibility with others. For my test, i've install  active_search first an then the others...
Title: Re: Active Search (Live AJAX Search)
Post by: Sami on June 19, 2007, 08:50:51 am
Yes , position ( Priority ) is important , this is just a beta version
I'll change the method of placing search field and JS script ,currently it's using filter page html
thank you for testing beta :)
Title: Re: Active Search (Live AJAX Search)
Post by: Davide Renda on June 20, 2007, 12:08:25 am
I've been notified from one of my gallery's user that, apparently, IE7.0 browser find conflictual this plugin. A visualisation error is shown while using upload.php (no further specification shown, just this!).
Unfortunately I can't repeat the same error, I work on a Linux machine and the IE7.0 emulator is only on a beta release and does not accept cookies (so I can't log in!)
I've currently removed this plugin to check whether the conflict comes from it  (and asked my user to do some test for us!) and will keep you posted on the outcome.
Any other did experience conflicts using IE7.0?
Title: Re: Active Search (Live AJAX Search)
Post by: will on June 20, 2007, 12:30:11 am
I've installed this plugin and I get: AJax error: 404

I've been waiting for this kind of plugin for a while and it would be great to get this to work, here's a link to my test gallery

http://cdcoverhideout.com/x

Thanks ;D
Title: Re: Active Search (Live AJAX Search)
Post by: Sami on June 20, 2007, 06:59:00 am
will you should Copy plugins/activesearch/cpls.php to gallery root
Title: Re: Active Search (Live AJAX Search)
Post by: will on June 20, 2007, 07:49:45 pm
when I go back to reinstalling it I get:

There was an error while processing a database query ???
Title: Re: Active Search (Live AJAX Search)
Post by: Sami on June 20, 2007, 08:38:06 pm
- You don't need to re-install it ! just copy cpls.php to your gallery root
- Enable debug mode to see the actual error
Title: Re: Active Search (Live AJAX Search)
Post by: will on June 20, 2007, 08:56:46 pm
but I uninstalled it when I saw I was getting the error, this is what error I get with debug enabled:

While executing query "

INSERT INTO `cpg1410_plugin_active_search` (name,value)VALUES ( 'minchars','1')" on 0

mySQL error: Duplicate entry 'minchars' for key 1 ???
Title: Re: Active Search (Live AJAX Search)
Post by: Sami on June 20, 2007, 09:07:27 pm
you should manually drop cpg1410_plugin_active_search and re-install plugin
Title: Re: Active Search (Live AJAX Search)
Post by: will on June 20, 2007, 09:25:40 pm
Thank you that works great, been waiting for this one ;D
Title: Re: Active Search (Live AJAX Search)
Post by: will on June 20, 2007, 10:11:55 pm
Come across another problem with IE, I cannot log into my gallery, when you click files to change it to albums and vice versa, it doesn't, but strangely it works perfect in Firefox ???
Title: Re: Active Search (Live AJAX Search)
Post by: Sami on June 21, 2007, 06:06:59 am
I see , it is a bug
As I said before I'll change the way search field show on gallery and that will fix this issue
Title: Re: Active Search (Live AJAX Search)
Post by: Hein Traag on June 21, 2007, 09:38:59 am
Installed this little puppy on my cpg. Im running the following list of plugins:
CAPTCHA v1.7     
CPG MiniCMS v1.6    
Final_Extract v2.3
CPGPicdownload v1.1
Full-Size Photos Access Control v1.4    
Contact v1.3    
Stats v1.1    
CPGMassImport v2.0
Backup v1.0    
Onlinestats v1.7    
Update History v1.1
Keywords_add v1.1    
Calendar v1.0    
Active Search v1.0.0 (Beta)

Which poses no problem with this plugin. I do have one or two suggestions. Add Categories as a search option. And it now displays the search bar automaticly in my page. Can it be arranged that you place the search bar where you want on the page by adding for example ajax_search on the content of the mainpage part of the config ?

Here's the language file. Can you update the package with the language files which have been submitted so far ? I only found the english file in the package.

Hein
Title: Re: Active Search (Live AJAX Search)
Post by: will on June 21, 2007, 08:36:34 pm
Is there any time span on fixing this bug has I really want this plugin ;D
Title: Re: Active Search (Live AJAX Search)
Post by: Hein Traag on June 22, 2007, 07:31:50 am
Is there any time span on fixing this bug has I really want this plugin ;D

Will,

Sami is not being paid for this. He is doing it as a hobby. Don't think days for bug fixing but rather think in weeks. The bug fix will come, if Sami says he will fix it then he will.  ;)
Title: Re: Active Search (Live AJAX Search)
Post by: will on June 22, 2007, 05:42:01 pm
ok thanks ;)
Title: Re: Active Search (Live AJAX Search)
Post by: jmnetje on March 06, 2009, 12:39:36 pm
Works great, But would it be possible to build in the catagory search into this plugin. I have over 200 catagorys and one wish from the visitors is search on category.
Title: Re: Active Search (Live AJAX Search)
Post by: Fabricio Ferrero on March 06, 2009, 02:01:00 pm
Your request it's the same as Hein Traag's request. And Sami (plugin creator) doesn't reply yet.

Let's wait for his reply and maybe he consider to add the feature.
Title: Re: Active Search (Live AJAX Search)
Post by: skmdd on March 28, 2009, 06:05:32 pm
Thanks for the nice plugin.
I wanted to get the Albums search by default instead of File search. Where should I make the changes?
Title: Re: Active Search (Live AJAX Search)
Post by: skmdd on March 28, 2009, 06:13:30 pm
I was able to make the Albums search by default.
Made changes in codebase.php
Changed value as "Albums" instead of "Files"

Code: [Select]
<label for="testinput_xml">{$lang_plugin_as['search']} <input type="button" value="Albums" onclick="togglesearch();" name="stype" id="stype"/> :</label>
Title: Re: Active Search (Live AJAX Search)
Post by: cooling2005 on January 24, 2010, 01:21:41 pm
how can i translate this words:Search, files, albums, No results!
i dont find this in the language file
thank you very much