We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 29091
    • 88 Posts
    Hi...

    What is the best "Search" Module for MODx version 1.0.2?

    I ask because AjaxSearch doesn’t seem to work (according to its specs/info page) for version 1.0.2.

    I just need a good reliable search function on the website.

    Thanks!
    -Doug
      Doug Peters, Symbiotic Design. (605) 251-8973
      http://W3DN.com | http://www.DomainHostmaster.com
      • 5811
      • 1,717 Posts
      I ask because AjaxSearch doesn’t seem to work (according to its specs/info page) for version 1.0.2.
      What is your concern with ajaxSearch. The version 1.8.4 runs with MODx 0.9.6 to 1.0.2 Here is the ajaxSearch demo site.
        • 29091
        • 88 Posts
        Cool.

        My concern stems from the MODx Extras page where the AjaxSearch module wasn’t indicated to be supporting 1.0.2:

        http://modxcms.com/extras/package/8

        But, if it works with 1.0.2, great. I guess someone just needs to update the MODx info.

        Thanks for the update, I need a good search function. wink

        -Doug
          Doug Peters, Symbiotic Design. (605) 251-8973
          http://W3DN.com | http://www.DomainHostmaster.com
          • 29091
          • 88 Posts
          OK, I’m just trying to get a handle on things, so forgive my stupidity... But, I’m still learning MODx.

          I see that under MODx Manager’s Manage Elements - Search:

          Search Highlight (6) - 1.4a Used with AjaxSearch to show search terms highlighted on page linked from search results

          But AjaxSearch isn’t installed by default, right?

          I feel super dumb asking all these beginner questions, but why would this be installed (AjaxSearch highlighting) if AjaxSearch isn’t installed in the default distribution?

          Please forgive me as I try to figure out MODx, once I get a handle on all this I hope to be a help, not such a burden.

          -Doug
            Doug Peters, Symbiotic Design. (605) 251-8973
            http://W3DN.com | http://www.DomainHostmaster.com
            • 29091
            • 88 Posts
            OK, it’s installed.

            AjaxSearch is a "snippet", not a "plugin".

            I have no idea what the difference between a module, a plugin and a snippet is. I know a snippet is a php script, but not much more.

            What’s the real difference in each of these?

            Thanks
            -Doug
              Doug Peters, Symbiotic Design. (605) 251-8973
              http://W3DN.com | http://www.DomainHostmaster.com
              • 29091
              • 88 Posts
              OK...

              So now I have a search form. But I want to style it. The default layout has a search box that is larger than I would like, has a border around it & there is a string of text underneath it.

              The default layout can be replaced, and I understand that I can style this stuff in CSS.

              I don’t need the results string underneath it that I see in the Template, but where is the "Please enter a search term to begin your search." text loading in from? The default layout has...

              $dcfg[’tplLayout’] = ’@FILE:’ . AS_SPATH . ’templates/layout.tpl.html’;

              ...but the templates/layout.tpl.html file doesn’t show that text I mentioned. And I can’t seem to find a chunk that has it.

              Or is it this line of the config file

              $dcfg[’tplComment’] = ’@FILE:’ . AS_SPATH . ’templates/comment.tpl.html’;

              ...I don’t think so.

              What am I missing, here?

              Thanks...
              Doug



                Doug Peters, Symbiotic Design. (605) 251-8973
                http://W3DN.com | http://www.DomainHostmaster.com
                • 28042 ☆ A M B ☆
                • 24,524 Posts
                A snippet is PHP code whose output is displayed on the final web page. It is inserted into HTML code with [[...]] tags or [! ... !] tags. It basically replaces the <?php ... ?> tags in HTML.

                A plugin is PHP code that is inserted into the MODx core code at specified points during processing called "events". These can be events in the document parsing process, or during a login process, or just about any of the core processes. Some snippets include their own events, such as the eForm snippet for validating and emailing form posts. This way you can change the behavior of MODx itself without hacking the core code.

                A module is an addition to the Manager features. A commonly used module is the DocManager module, which provides more ways to manipulate the documents, particularly in bulk operations. Another module I always add to my sites is a full backup module that zips up all the MODx files along with a database dump, making the resulting zip file available for download/upload/extraction.

                You may find this interesting http://www.sottwell.com/modx-from-the-inside.html

                The text in the AjaxSearch form is in the assets/snippets/ajaxSearch/lang/<your-language-file>. Most complex snippets will have a directory for language files that hold any text the snippet displays.
                  Studying MODX in the desert - http://sottwell.com
                  Tips and Tricks from the MODX Forums and Slack Channels - http://modxcookbook.com
                  Join the Slack Community - http://modx.org
                  • 29091
                  • 88 Posts
                  Awesome. Things are easier when you understand them a little.

                  I just used "" as the argument for the as intro text. I think I may set that <p> to display:none; by the id. I have an ad I want to put under the search.

                  I also have to figure out how to get rid of the border and set the size of the input box. But I can’t figure out what CSS is doing that. It doesn’t seem like AjaxSearch is loading a default CSS file, but it does act that way (as I don’t use an inset border anywhere on the site).

                  I’ll take a look at that link, thanks! -Doug

                    Doug Peters, Symbiotic Design. (605) 251-8973
                    http://W3DN.com | http://www.DomainHostmaster.com
                    • 28042 ☆ A M B ☆
                    • 24,524 Posts
                    You have to style AjaxSearch yourself in your .css file. A list of classes and IDs used is provided somewhere, but I just use a View Source and go by what’s there.
                      Studying MODX in the desert - http://sottwell.com
                      Tips and Tricks from the MODX Forums and Slack Channels - http://modxcookbook.com
                      Join the Slack Community - http://modx.org
                      • 29091
                      • 88 Posts
                      Cool.

                      OK, then I screwed-up somewhere. I can’t believe I have a border, maybe it’s a default. Still, I am trying to get rid of it with no luck sofar. LOL...

                      #search {
                      position:absolute;
                      top: 300px;
                      left:14px;
                      width:173px;
                      text-align:right;
                      border:none;
                      }
                      #search #ajaxSearch_form {
                      border:none;
                      }
                      #ajaxSearch_input {
                      width:143px;
                      border:none;
                      }

                      Thanks again! -Doug
                        Doug Peters, Symbiotic Design. (605) 251-8973
                        http://W3DN.com | http://www.DomainHostmaster.com