1
smart2
Ajax autocompletion feeded with isearch module
  • 2007/11/6 1:48

  • smart2

  • Not too shy to talk

  • Posts: 129

  • Since: 2007/1/19


I've made a hack to isearch module by instant zero.
I've added a class and a block.
This hack requires prototype and scriptaculous.
The block ajax search will show a search form with autocompletion feeded with most searched words in populatiry order.

The hack working can be viewed here:
http://www.s-martinez.com

I've implemented it also to the xoops-theme-web-2-0 at
http://xoops-theme.s-martinez.com
But with this theme it's buggy. I'll try to find where's the problem.

Thanks to instant-zero for this pretty useful module (I couldn't register at xoops.instant-zero.com -> blank page so I post here).

Hack can be downloaded here:
http://www.s-martinez.com/uploads/isearch.zip

Add these lines to your css file:

div.autocomplete {
      
position:absolute;
      
width:250px;
      
background-color:white;
      
border:1px solid #888;
      
margin:0px;
      
padding:0px;
      
z-index:1000;
    }
    
div.autocomplete ul {
      list-
style-type:none;
      
margin:0px;
      
padding:0px;
    }
    
div.autocomplete ul li.selected background-color#ffb;}
    
div.autocomplete ul li {
      list-
style-type:none;
      
display:block;
      
margin:0;
      
padding:1px;
      
height:15px;
      
cursor:pointer;
    }


Enjoy :)

2
kurak_bu
Re: Ajax autocompletion feeded with isearch module
  • 2007/11/9 16:47

  • kurak_bu

  • Quite a regular

  • Posts: 342

  • Since: 2005/9/5 1


Thank you for releasing this, very useful

3
suico
Re: Ajax autocompletion feeded with isearch module
  • 2007/11/9 17:43

  • suico

  • Friend of XOOPS

  • Posts: 374

  • Since: 2003/7/24


Great job thanks.

May i suggest to make all search terms to be capitalized or the contrary so we don t have in search options LikE ThiS?
Yogurt Social Network Service
Visit:http://www.marcellobrandao.eti.br/

4
Cozzie
Re: Ajax autocompletion feeded with isearch module
  • 2008/3/31 9:42

  • Cozzie

  • Not too shy to talk

  • Posts: 133

  • Since: 2007/7/13


This is a great hack, thanks a lot!

But my auto-complete only works when users are logged in, if they have not yet logged in, the auto-complete box does not appear (although the 'working image' sign does appear).

I've checked and re-checked that all permissions are set for anonymous users, so that's not the problem and I am stumped!!!

Does anyone know why this might be happening??

Thanks

5
blueteen
Re: Ajax autocompletion feeded with isearch module
  • 2008/3/31 13:06

  • blueteen

  • Quite a regular

  • Posts: 379

  • Since: 2004/7/16


Great hack !
(And cool xoops-theme-web-2-0

6
slyss
Re: Ajax autocompletion feeded with isearch module
  • 2008/3/31 15:10

  • slyss

  • Quite a regular

  • Posts: 343

  • Since: 2006/1/26


hi smart2

your hack is very cool... but your theme is wonderful! Why do you not go to XOOPS Theme Team ?

A real great theme for XOOPS !
[size=x-large]2008 Xoops Book[/size]

7
Mamba
Re: Ajax autocompletion feeded with isearch module
  • 2008/3/31 16:25

  • Mamba

  • Moderator

  • Posts: 11366

  • Since: 2004/4/23


Nice job!!! Congratulations!

And thank you for supporting XOOPS!
Support XOOPS => DONATE
Use 2.5.10 | Docs | Modules | Bugs

8
Eskimo-mo
Re: Ajax autocompletion feeded with isearch module
  • 2008/9/8 7:24

  • Eskimo-mo

  • Just popping in

  • Posts: 22

  • Since: 2008/3/12


Hi there

I really need to have this great autocompleter working on the main search.php page as well as on the isearch block - can anyone tell me how to do this, i tried but can't do it

thank you!

9
trabis
Re: Ajax autocompletion feeded with isearch module
  • 2008/9/8 8:26

  • trabis

  • Core Developer

  • Posts: 2269

  • Since: 2006/9/1 1


You can use mysearch module. It is a mix of isearch, autocompleter and other hacks submited in xoops.org forums.

http://code.google.com/p/xuups/

10
tzvook
Re: Ajax autocompletion feeded with isearch module
  • 2008/11/1 18:41

  • tzvook

  • Just can't stay away

  • Posts: 875

  • Since: 2003/2/1 2


Just want to let you know I found a bug in mpmanager when using it with mysearch.

I get this fatal error with a blank page (just for anonimus users)
Fatal errorCall to a member function on a non-object in /srv/www/virtual/gifts45.com/htdocs/modules/mpmanager/include/search.inc.php on line 51


if (!empty($user)) {

 if (
strlen($user) < ) {
  
$onglet 0;
   }       
} else { 
$onglet 0; }


line 51 is $onglet = 0;

I turned
$modversion['hasSearch'] = 1;
into
$modversion['hasSearch'] = 0;
at xoops_version.php in mpmanager - solved the issue for now, since I don't need the mpmanager results in the site search .
it might help one that get the blank screen understand where the problem comes from.
Now I understand why anonimus users have issues also in the site search...

Login

Who's Online

163 user(s) are online (90 user(s) are browsing Support Forums)


Members: 0


Guests: 163


more...

Donat-O-Meter

Stats
Goal: $100.00
Due Date: Mar 31
Gross Amount: $0.00
Net Balance: $0.00
Left to go: $100.00
Make donations with PayPal!

Latest GitHub Commits