1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Autocomplete 0.4

Discussion in 'Plugins' started by ties, Mar 3, 2010.

  1. ties

    ties Theme & Plugin Development

    Autocomplete 0.4
    Version: 0.4
    Author: Matthis de Wit
    Created: 2010/03/03
    Last Updated: 2013/04/25
    Tested on: Hotaru 1.4.2 ~
    Plug & Play: No
    Supported: Yes

    Description
    Add autocompletion to any text input you want

    Instructions
    0. If header contains link to older jQuery or jQueryUI js files, please remove them
    0. Add jQuery v1.4 or higher to your theme (in header.php)
    0. Add jQueryUI v1.8 or higher to your theme (in header.php)
    0. Most themes should already have these included. The default theme does
    1. Upload the "autocomplete" folder to your plugins folder. Install it from Plugin Management in Admin.
    2. Access it from the Admin sidebar
    3. Enable autocomplete where you want

    Notes
    The search beginning or all field does only apply on the remote field
    To create a custom theme http://hotarucms.org/showthread.php?495-Style-the-autocomplete-plugin
    For a guide how to make a lib click here
    For autocomplete lib request go here

    Changed in 0.2
    Bugfix: IE doesnt show box properly (or even at all), but keyboard works so its probably a css issue
    Solution: Added line to css to prevent this
    Note: if you use a custom style sheet add this line to it​
    HTML:
    .widget_body.search_box { overflow: visible; }
    Bugfix: Link not working
    Change: Admin settings panel changed (removed delay and min length, hardcoded to 200ms and 1)
    Change: New itemcode, use the NEW box (in the bottom)to create a new item
    Change: Stored settings
    Change: Install with predefined autocompletes -> plug and play (if jQuery 1.4.+ and jQueryUI 1.8.+)

    Revision History
    v.0.4 2013/03/25 - shibuya246 - change javascript error notice to trigger jquery as >= 1.4 rather than == 1.4, same for UI 1.8
    v.0.3 2010/07/03 - Ties - replaced getRaw with getHtmLawed, load script by a xhr instead of document.write (=IE bug fixed), included autocomplete for messaging (usernames) and google autocomplete
    v.0.2 2010/04/03 - Ties - Settings menu more user friendly (less items but for a good cause), integrated a template in the code
    v.0.1 2010/03/03 - Ties - Released first version

    Please click "Rate Thread" and give this plugin a rating. Thank you.

    200 downloads on version 0.3 before updating
     

    Attached Files:

    Last edited: Mar 7, 2010
    webstrike, JonH, baadier and 2 others like this.
  2. nothingman

    nothingman Active Member

    Hi ties,

    You've mentioned the following in readme.txt

    Just wondering how do we go about adding jQuery v1.4 and jQueryUI v1.8 to hotaru? Which folder do we need to place the files? where do we download jquery from? which components of jquery etc. :confused:

    Also, I 'blindly' installed the plugin (ignoring the above instructions, of course) and accessed it from the Admin sidebar. On that page, when I click the Add button, I noticed a link that says, "Data to fill your autocomplete list, more info here" The "here" in this link points to a link which is like http://www.mysite.com/\"http://jqueryui.com/demos/autocomplete/#option-source\" Do you think this link needs to be corrected? :confused:
     
    Last edited: Mar 4, 2010
  3. ties

    ties Theme & Plugin Development

    oeh bug!
    you need to open the header.php of you theme, and more info should point to http://jqueryui.com/demos/autocomplete/#option-source
    Im creating a new settings page because i think a simpler version is possible,
    im thinking ditch the min_length and delay and set it in hardcode the min_length to 1 or 2, and the delay to 200, any objections?
    als make a remote only, and make a litte tutorial about static data instead of adding ["val1","val2","val3","val4","val5" etc ... ]

    Adding jQuery and jQueryUI
    Open header.php of your theme, remove the jQuery (and probably the jQuery script)
    You can get jQuery directly from google :p : here, to include in your script:
    HTML:
    <script type='text/javascript' src='http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js'></script>
    Google doesnt have jQuery UI 1.8.+ yet because its still a release client but you can use my jQuery for the time being:
    HTML:
    <script type='text/javascript' src='http://limoen.student.utwente.nl/jquery/jquery-ui-1.8rc3.custom.min'></script>
    Does this help?
    Bye
    Ties
     
  4. ties

    ties Theme & Plugin Development

    Version 0.2 online
    the what 0.1 should have been version, in my opinion
    if you upgrade: remove settings first, it changed
     
    Last edited: Mar 4, 2010
  5. ties

    ties Theme & Plugin Development

    Autocomplete 0.3

    v.0.3 2010/07/03 - Ties
    2 New libs:
    usernames (with support for messaging)
    google suggestions (i dont know why its usefull, but felt like making it)

    IE bugfix and clean up code in one with the jQuery $.getScript() instead of document.write which was more complicated and ugly now it goes by a xhr

    did i mention usernames on messaging plugin?!? :p
     
  6. rushnp774

    rushnp774 New Member

    Fantastic work Ties! I just got around to testing it, and noticed a few things:

    1) I tried changing the search criteria to "all" instead of "begin" for the search widget, and now it doesn't work at all. The data source is constantly changing back to "Google", and won't change back to "post_title" no matter what I do.

    2) Any tags with spaces in them have the spaces replaced by underscores. Is there any way to change that? I don't know if the submit plugin is smart enough to swap the underscores with spaces upon story submission, but if it's not, I could see that becoming an issue.

    3) Just a minor issue, but the formatting of the autocomplete box has no padding on the right side when used from the search widget. It looks fine on the tags autocomplete box though. Could just be my browser (Firefox 3.5.8).

    All in all, awesome work! Look forward to future versions.
     
  7. ties

    ties Theme & Plugin Development

    hmm i'll look into it
     
  8. baadier

    baadier Well-Known Member

    has this been upgraded for use with 1.3? cheers
     
  9. Nick

    Nick Well-Known Member

    Says it has...
     
  10. mabujo

    mabujo Designer

    Slightly confusing since last version/OP update is listed as 03-07-2010 - almost 3 months before 1.3 was released...
     
  11. nothingman

    nothingman Active Member

    In the Datasource, select an autocomplete lib.. section of this plugin's settings page I just can't change the datasource to post_titles.

    [​IMG]

    If I set the datasource to google or tags and click Save, the data source can be changed. But if I select post_titles, the data source for the Auto-complete is saved to google by default. As a workaround, I changed the field name from the widget settings database table to post_titles but still no luck - when I do this, the Autocomplete is removed from the list of auto-complete(s) I have created from this plugin's setting page.

    I know ties hasn't been around but just wondering if anyone can help?
     

Share This Page