We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 25663 MODX Staff
    • 12,272 Posts
    And the ability to search also in TVs of course. wink
      Ryan Thrash, MODX Co-Founder
      Follow me on Twitter at @rthrash or catch my occasional unofficial thoughts at thrash.me
      • 6726
      • 7,075 Posts
      Quote from: rthrash at Mar 20, 2006, 02:15 PM
      This is so gonna be in the 0.9.2. smiley

      ;D

      Quote from: rthrash at Mar 21, 2006, 09:11 AM
      And the ability to search also in TVs of course. wink

      Oh yeahhhhhh !

      Now that would be something !
        .: COO - Commerce Guys - Community Driven Innovation :.


        MODx est l'outil id
        • 15914
        • 145 Posts
        Fantastic Snippet! This is simply brilliant. Have a few ideas though:

        Do you think it’d be possible to throw in something like Google Suggest functionality or maybe highlighting like in this thread: http://modxcms.com/forums/index.php/topic,2762.0.html

        Great work.
          Kunal Kapoor
          Technical Director
          Limesharp Internet Limited - Effective, Functional, Standards Compliant

          IRC Nick: KingKoopa
          Skype ID: KingKoopa16
          • 15987
          • 786 Posts
          I will definatly give a look at adding the link highlighting. Marcs work looks great on that so I bet it wouldn’t be to hard to integrate it. The tv searching, that sounds a little more complicated. I will not be able to get to this for a while though, I am taking a much needed vacation, and will be away from the computer next week smiley

          But when I get back I will definatly look into these two things.

          Kyle
            • 32241
            • 1,495 Posts
            Ah, that’s too bad.
            I would love to see this search snippet to have 1 more parameter to search from specific template. I might the only one who need this feature maybe, but if you could add it to the snippet, it will saves me ton of time.

            Thanks
              Wendy Novianto
              [font=Verdana]PT DJAMOER Technology Media
              [font=Verdana]Xituz Media
              • 25663 MODX Staff
              • 12,272 Posts
              The template addition would not be much more than an extra AND to the WHERE clause for Templates, no?

              TVs are a different beast however...
                Ryan Thrash, MODX Co-Founder
                Follow me on Twitter at @rthrash or catch my occasional unofficial thoughts at thrash.me
                • 15987
                • 786 Posts
                Quote from: Djamoer at Mar 21, 2006, 10:09 PM

                Ah, that’s too bad.
                I would love to see this search snippet to have 1 more parameter to search from specific template. I might the only one who need this feature maybe, but if you could add it to the snippet, it will saves me ton of time.

                Thanks

                Wendy,
                I’m not sure I understand what you mean by this. Do you want the search to only search documents that have a certain template assigned to them? I don’t think that would be to hard to add, if thats what you want.

                Jaredc - If you see this, I saw in one of your posts from a while back that there were some features that you want to add and work you were going to do on this. Since this is your code and I have just modified it, I was wondering if you had been working on this at all, and some of what I am doing has already been done by you? I don’t want to re-invent the wheel smiley
                  • 6540
                  • 1 Posts
                  how do u close the results?
                    • 3505
                    • 9 Posts
                    IE fieldset bug

                    After reading through the whole snippet and a little looking through google I came across this site. http://www.bubblessoc.net/index.php?p=182. It suggests wrapping the fieldset in an arbitrary div.

                    It seems to work rather well and fixes the bug for me to make it strict compliant.

                    I changed this
                    // establish form
                    if (($validSearch && ($showSearchWithResults)) || $showSearchWithResults){
                      $SearchForm .= '<form '.$searchFormId.' class="FSF_form" action="'.$searchAction.'" method="post">';
                      $SearchForm .= ($xhtmlStrict)? '<fieldset><legend>Search</legend>' : '' ;
                      // decide what goes in search box
                      $searchBoxVal = ($searchString == '' && $boxText != '')? $boxText : $searchString ;
                      $SearchForm .= '<input class="FSF_input" type="text" name="search" id="search" value="'.$searchBoxVal.'"  ';
                      $SearchForm .= ($boxText)? 'onfocus="this.value=(this.value==\''.$boxText.'\')? \'\' : this.value ;" />' : '/>';
                      $SearchForm .= '<input class="FSF_submit" type="submit" name="sub" id="sub" value="'.$searchButtonText.'" />';
                      $SearchForm .= ($xhtmlStrict)? '</fieldset>' : '';
                      $SearchForm .= '</form>'.$newline;
                    }


                    To this
                    // establish form
                    if (($validSearch && ($showSearchWithResults)) || $showSearchWithResults){
                      $SearchForm .= '<form '.$searchFormId.' class="FSF_form" action="'.$searchAction.'" method="post">';
                      $SearchForm .= ($xhtmlStrict)? '<div class="arbitrary"><fieldset><legend>Search</legend>' : '' ;
                      // decide what goes in search box
                      $searchBoxVal = ($searchString == '' && $boxText != '')? $boxText : $searchString ;
                      $SearchForm .= '<input class="FSF_input" type="text" name="search" id="search" value="'.$searchBoxVal.'"  ';
                      $SearchForm .= ($boxText)? 'onfocus="this.value=(this.value==\''.$boxText.'\')? \'\' : this.value ;" />' : '/>';
                      $SearchForm .= '<input class="FSF_submit" type="submit" name="sub" id="sub" value="'.$searchButtonText.'" />';
                      $SearchForm .= ($xhtmlStrict)? '</fieldset></div>' : '';
                      $SearchForm .= '</form>'.$newline;
                    }
                      • 25663 MODX Staff
                      • 12,272 Posts
                      In the code:
                      function connectForAjax() {
                          $database = '';
                          $tblPrefix = '';
                          $dbuser = '';
                          $dbpass = '';
                          $dbhost = 'localhost';
                          $db = mysql_connect($dbhost,$dbuser,$dbpass) or die("cannot connect to database");
                          $selected = @mysql_select_db($database, $db) or die ("cannot select database");
                          return $tblPrefix;
                      }
                      


                      Why would you not use the $modx->dbconfig[’configPieceHere’] stuff so there’s no manual intervention required?
                        Ryan Thrash, MODX Co-Founder
                        Follow me on Twitter at @rthrash or catch my occasional unofficial thoughts at thrash.me

                      This discussion is closed to further replies. Keep calm and carry on.