We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 5811
    • 1,717 Posts
    Find enclosed the version 1.8.0 beta0 of AjaxSearch.

    Changelog:

    -- All the AjaxSearch code is now objectified
    -- Extended place holder templating and template parameters
    -- Improvement of the extract algorithm
    -- Define the number of extracts displayed in the search results
    -- Use of &advSearch parameter available from the front-end by the end user. Template provided
    -- Choose your search term from a predefined search word list. Template provided
    -- stripInput user function
    -- stripOutput user function
    -- Configuration file and $__ global parameters
    -- Highligthing plugin updated to take into account of the &advSearch parameter
    -- Bugfixes regarding Quoted searchstring

    Look at the ajaxSearch_version_180.txt for more informations.

    This current beta version is running here. I will add some new tests in the following days.
    Thanks for your feedbacks and suggestions for any improvement before to release this new version.

    [Edit: version 1.8.0 released and available here

      • 10487 MODX Staff
      • 1,535 Posts
      Cool news, Corioco smiley I’ll check it out when I get a few minutes ... keep up the good work!
        Garry Nutting
        Senior Developer
        MODX, LLC

        Email: [email protected]
        Twitter: @garryn
        Web: modx.com
        • 7231
        • 4,205 Posts
        This looks like a nice update, very nice grin
          [font=Verdana]Shane Sponagle | [wiki] Snippet Call Anatomy | MODx Developer Blog | [nettuts] Working With a Content Management Framework: MODx

          Something is happening here, but you don't know what it is.
          Do you, Mr. Jones? - [bob dylan]
          • 25663 MODX Staff
          • 12,272 Posts
          :D

            Ryan Thrash, MODX Co-Founder
            Follow me on Twitter at @rthrash or catch my occasional unofficial thoughts at thrash.me
            • 29076
            • 615 Posts
            Very nice. Great work! laugh
              I think, thererfor I am! But what I am, and why...?
              • 4749
              • 623 Posts
              I’ve been having some strange issues with 1.7.1 and I’m very excited to try this beta!
                The MODx has you...
                Utah Web Design
                • 5811
                • 1,717 Posts
                Some tests have been added on the AjaxSearch demo site.

                Ajax mode tests (&ajaxSearch=`1`):

                - Base test: basic test with the default parameters

                - Show more results : use the optionSearch template to select the &advSearch parameter. Try it with "primary school" as search terms and test "one word", "all words" and "exact phrase" options.

                - Option multiple list : use the optionMultipleList template to choose the &advSearch parameter and select the searchTerm from a multiple drop down list of terms. Select all the terms you want (with CTRL key) ...

                - Results with images : define your own stripOutput function. In this example, filter of all html tags except <img > tags. Try it with several terms again ...

                Non ajax mode tests (&ajaxSearch=`0`):

                Look at "GrabMax" test (&advSearch radio box selection) and "Results with images" test (searchList and stripOutput function) for some tests in this mode.

                If you find some issues on this site, feel free to tell me.
                Keep care of the language of documents, don’t select French documents with "English" search terms ...
                  • 6726
                  • 7,075 Posts
                  Nice upgrade !
                  I’ll have a look next week smiley
                    .: COO - Commerce Guys - Community Driven Innovation :.


                    MODx est l&#39;outil id
                    • 24495
                    • 407 Posts
                    What do you think about a template-able search form?
                    There are many features in AS but the code is not accessible for disabled people. The problem is the label including the input field. For better accessibility it should be
                    <label for="ajaxSearch_input">Label text</label>
                          <input id="ajaxSearch_input" name="search" value="Search here..." onfocus="this.value=(this.value=='Search here...')? '' : this.value ;" type="text">
                    

                    For XHTML a correct closing input field is required (..."text" />). And some pages wish to have a visible label. All of this can be solved by a template-able form which was asked for some times by some modx users. Is there a timetable to implement this?
                      • 5811
                      • 1,717 Posts
                      For XHTML a correct closing input field is required (..."text" />). And some pages wish to have a visible label. All of this can be solved by a template-able form which was asked for some times by some modx users. Is there a timetable to implement this?
                      I am not sure to fully understand the remark. The version 1.8.0 beta0 is provided with template-able forms. Look at the template folder you will find templates.

                      The current template provided with the 1.8.0, regarding the input form is now:
                      [+as.showForm:is=`1`:then=`
                      <form [+as.formId+] action="[+as.formAction+]" method="post">
                      		<input type="hidden" name="advSearch" value="[+as.advSearch+]" />
                          <fieldset>
                          <label for="ajaxSearch_input">
                            <input id="ajaxSearch_input" type="text" name="search" value="[+as.inputValue+]"[+as.inputOptions+] />
                          </label>
                          <label for="ajaxSearch_submit">
                            <input id="ajaxSearch_submit" type="submit" name="sub" value="[+as.submitText+]" />
                          </label>
                          </fieldset>
                      </form>
                      `+]
                      [+as.showIntro:is=`1`:then=`
                      <p class="ajaxSearch_intro" id="ajaxSearch_intro">[+as.introMessage+]</p>
                      `+]
                      [+as.showResults:is=`1`:then=`
                      [+as.results+]
                      `+]

                      So now everybody could change the template.
                      And I provide some others templates like:

                      - optionSearch/layout.tpl.html : to offer the selection of the advSearch parameter by clicking a radiobox
                      - multipleInputList/layout.tpl.html : to offer the selection of search term from an input drop down list
                      - optionMultipleList/layout.tpl.html : a mix of the two above templates.

                      As I am not strongly competent regarding accessibility, your help is welcome. Could you look to these others templates under and advise me on some necessary changes regarding accessibility. It will be an an estimate contribution.