RSS Feed

Kau-Boy’s AutoCompleter Plugin

Veröffentlich am Donnerstag, 2. Jul 2009 in WordPress

Dieses Plugin verwendet den script.aculo.us Ajax.Autocompleter um Beiträge zu finden, die den Suchbegriff im Titel oder Inhaltstext enthalten.

Installation:

Installation über die WordPress Adminstrator-Seiten:

  1. Gehe zur Admin-Seite Plugins -> Installieren
  2. Suche nach kau-boy und wähle das Plugin aus
  3. Wähle die Aktion Jetzt installieren
  4. Klicke auf Jetzt installieren
  5. Aktiviere das Plugin über den Plugins Menüpunkt in WordPress
  6. Du musst eventuell die Einstellungen anpassen, gerade wenn dein Suchfeld eine andere ID als s hat

Installation unter Verwendung der WordPress Adminstrator-Seiten:

  1. Lade die zip-Datei des Plugins herunter: kau-boys-autocompleter.2.2.zip
  2. Gehe zur Admin-Seite Plugins -> Installieren
  3. Wähle den Link Hochladen unter Plugins Installieren Überschrift
  4. Wähle die zip-Datei aus und klicke Jetzt installieren
  5. Aktiviere das Plugin über den Plugins Menüpunkt in WordPress
  6. Du musst eventuell die Einstellungen anpassen, gerade wenn dein Suchfeld eine andere ID als s hat

Installation unter Verwendung von FTP

  1. Lade die zip-Datei des Plugins herunter: kau-boys-autocompleter.2.2.zip
  2. Entpacke es und lade es in dein /wp-content/plugins/ Verzeichnis hoch
  3. Aktiviere das Plugin über den Plugins Menüpunkt in WordPress
  4. Du musst eventuell die Einstellungen anpassen, gerade wenn dein Suchfeld eine andere ID als s hat

Screenshots:

Screenshot des Plugins in einem neuen WordPress blog

Screenshot des Plugins

Screenshot der Einstellungsseite (auch in englisch erhältlich)

Screenshot der Einstellungsseite

Versionsgeschichte:

  • 2.2 Deaktivieren der Suche für Suchfelder im Adminbereich und Ermöglichen der Verwendung zusammen mit dem relevanssi Plugin
  • 2.1 Hinzufügen einer neuen Version von jQuery Autocomplete
  • 2.0.1 Entfernen von “short open tags”, die auf blogs die Fehler verursachen die “short_open_tag” nicht auf “On” gesetzt haben
  • 2.0 Autocompleter mit mehreren Textfelder auf einer Seite nutzbar machen, verbessern der Kürzung des Inhalt von Artikeln
  • 1.9 Beheben von Problemen mit PHP4, funktioniert nun auch mit qTranslate im “Query-Modus” (?lang=de)
  • 1.8 Hinzufügen der Einstellung für die Länge des Titels und des Inhalts in den Ergebnissen
  • 1.7 Erstzen von jQuery suggest durch jQuery autocomplete, da das suggest Plugin HTML Auszeichnungen zerstört
  • 1.6.1 Verwendung des id Attributs als Standard anstelle des name Attributs
  • 1.6 Hinzufügen der Möglichkeit das Suchfeldes anhand des name Atrrbiuts auszuwählen
  • 1.5.2 Hinzufügen der richtigen Kodierung zu html_entity_decode() um das Zerteilen von XML Enitäten zu verhindern
  • 1.5.1 Fehler im AJAX repsonse behoben, der die Einstellung für die Ergebnisfelder nicht geladen hat
  • 1.5 Hinzufügen Auswahlmöglichkeiten für die Such- und Ergebnisfelder
  • 1.4.1 Aktualisierung der Übersetzungsdatei
  • 1.4 Kombinieren der Styles für jQuery und script.aculo.us, Hinzufügen  einer Einstellung zur Multibyte-Kodierung
  • 1.3.5 Fehler bei der html_entity_decode() Konvertierung beseitigt
  • 1.3 Enfternen eines Kommentars in autocompleter.js.php, welcher eine PHP header warning  erzeugt hat
  • 1.2 Verwendung von html_entity_decode() um das Zerteilen von Enitäten zu verhindern
  • 1.1 Entfernen von WordPress shortcodes um leere oder falsche Seiten zu verhindern
  • 1.0 Möglichkeit jQuery ODER script.aculo.us zu verwenden, Übersetzen der Einstellungsseite ins Deutsche
  • 0.4 Hinzufügen der Einstellung für die Anzahl der Suchergebnisse und der eigenen CSS Date
  • 0.3 Hinzufügen der Einstellung für die Suchfeld ID
  • 0.2 Erste stabile Version

Wenn dir dieses Plugin gefällt oder dir etwas fehlt, würde ich mich freuen es zu erfahren. Hinterlasse einfach ein Kommentar auf dieser Seiter oder auf meiner WordPress Plugin Seite.

PayPal - The safer, easier way to pay online! PayPal - The safer, easier way to pay online!

  • Twitter
  • email
  • RSS
  • Facebook
  • MySpace
  • Google Bookmarks
  • MisterWong.DE
  • del.icio.us
  • LinkArena
  • Digg
  • Sphinn
  • Mixx
  • Reddit
  • Slashdot
  • Yigg
  • Technorati

Hinterlasse einen Kommentar

  1. We would like to use your plugin on a new wp-site using the latest atahualpa theme. seems not to work. any hints?
    thx marc

    • Bernhard sagt:

      Hi Marc,

      you are just a few hours to quick. I was searching for a diffrent theme for this blog and found out, that many themes doesn’t set the id attribute for the input field. I just installed the Atahualpa 3.4.1 theme to test it. This theme also uses only the name attribute.
      So after realising that many themes doesn’t have the needed id attribute I decided to add another option to be able to select the field by id or by name (or even another CSS selector).

      I have to test the new option with prototype and jQuery but I am pretty sure, that I will release the new version by tomorrow (maybe today).

      I hope this willl help not only you. Do you have any other ideas of how to improve the plugin?

      Bernhard

      • Hello Bernhard
        everthing works perfectly now with tha Atahualpa 3.4.1 theme!
        thank you very much for the great support!

        what i did:
        - updated the plugin to 1.6.1.
        in the plugin configuration:
        - changed the selectortype to name
        - changed the javascript Framework to jQuery

        that’s it. now it works

  2. Hans sagt:

    I have some weird behaviour when searching for either “di” or “no” (without the quotes.)

    It then parses the style of under wrong.

    If you want to reproduce try searching for: (di)splay or no(ne)on my website.

    • Bernhard sagt:

      Hi Hans,

      I could reproduce the problem. I use a default jQuery plugin for the autocomplete feature. This plugin doesn’t provides the feature of an onclick handler so I have to add the link the the article in a hidden span. To make it hidden I used inline formating with display: none. But the jQuery plugin seems to destroy HTML-Markup when hightlighting the found words.

      So I have to either find a new jQuery Plugin or I have to use single character markups and a diffrent CSS Layout for the results.

      I think I can give you an updated version this evening which than should work with jQuery as good as with scriptaculous. Until than you might use scriptaculous to avoid this problem.

      Bernhard

  3. Daniel sagt:

    In v1.8 I still get “Warning: cannot yet handle MBCS in html_entity_decode()! in /htdocs/wp-content/plugins/kau-boys-autocompleter/autocompleter_results.php on line 72″

    It was working great up until v1.5 and then it has stopped. Tried uninstalling / reinstalling – any further ideas?

    • Bernhard sagt:

      Hi Daniel,

      I search the web for your problem and it is a bug in PHP 4 (http://bugs.php.net/bug.php?id=27626). I use html_entity_decode to convert all characters to non-entities to avoid destroying them when limiting the title/content length.

      But as PHP 4 (pre 4.3.3) lacks a full support of UTF-8 it might be a prblem with the encoding. So the first thing you should try is to go to the settings page and change the multibyte encoding to ISO-8859-1.

      If that doesn’t work, try to replace line 72 in autocompleter_results.php. To do so, navigate to Plugins->Installed and click edit on the plugin. From the list at the right choose the autocompleter_results.php. Then replace this line:

      $str = html_entity_decode(trim($str), ENT_NOQUOTES, $encoding);

      with this line:

      $str = utf8_encode(html_entity_decode(trim($str)));

      As I don’t have a running Server with PHP4 I can’t test it myself right now.

      Bernhard

  4. Fiz sagt:

    Hi and thanks for your very beautiful plugin. One only thing about styling of autocompleter.css -> ac_result class:
    * add parameter left:-9999px; to disappear its border (if added) to the bottom of the page
    * add !important to width

    Bye!

  5. Sascha sagt:

    Unfortunately it does not work while Relevanssi is activated! I’s a pitty. Bothe plugins are valuable and nice! :) However, I will have to go for nice search results rather than for autocomplete…

    Anyway thanks for this nice plugin!

  6. [...] sinnvoll sofort den ersten Treffer zu selektieren) ist es ein spitzen Plugin. Außerdem sollte noch der tolle Einsatz des Autoren betont werden und dessen schnelle [...]

Hinterlasse einen Kommentieren