We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 4095
    • 372 Posts
    Anyone got this working?

    I copied and pasted the text as per above and set it to OnWebPageRender but get no colours in the search results.

    Am I missing another step?
      [img]http://www.emanz.ac.nz/assets/images/logo/emanz-icon_16x16.gif[/img] Emergency Management Academy of New Zealand [br] http://www.emanz.ac.nz[br][br]MODx Sandbox Login: sandbox Password: castle [br]
      Admin Sandbox Login: sandbox Password: castle
      • 25663 MODX Staff
      • 12,272 Posts
      Actually, this would be a great addition/upgrade to FlexSearch. You out there Jared? wink
        Ryan Thrash, MODX Co-Founder
        Follow me on Twitter at @rthrash or catch my occasional unofficial thoughts at thrash.me
        • 4095
        • 372 Posts
        Another thing Jared if you have spare time smiley is can it be made to search EPG2 tables and return links to the photos, even cooler would be a checkbox or radio button choosing if you want to search pages, photos or both.
          [img]http://www.emanz.ac.nz/assets/images/logo/emanz-icon_16x16.gif[/img] Emergency Management Academy of New Zealand [br] http://www.emanz.ac.nz[br][br]MODx Sandbox Login: sandbox Password: castle [br]
          Admin Sandbox Login: sandbox Password: castle
          • 13577
          • 302 Posts
          Quote from: rthrash at Jan 03, 2006, 03:29 AM

          Actually, this would be a great addition/upgrade to FlexSearch. You out there Jared? wink
          Yeah I’m here. This is something I would like to have in FSF for sure. That snippet is aching for an upgrade... but it’s going to be a while before I can dedicate the kind of time it will take to do all the things I want (hint: search term highlighting is only the beginning).
            Standard Disclaimer
            I could be totally wrong.
            • 3098
            • 37 Posts
            hello,

            I’ve tried to enhance the plugin in retrieving search engines keywords in parsing the $_SERVER["HTTP_REFERER"] string but
            that string is — for a reason that I ignore — modified by MODx : "file.php?search=keyword" becomes "file.phpsearchkeyword"

            could anyone tell me what’s wrong ?

            thank you
              • 33497
              • 30 Posts
              Please add / quoting in preg_quote call on line 68. Otherwise doc parsing will result in ModX error when search term contains slashes.

                  $pattern = '/' . preg_quote($word, '/') . '(?=[^>]*<)/i';
              
                • 33497
                • 30 Posts
                Should I open a bug report for this issue?
                  • 25663 MODX Staff
                  • 12,272 Posts
                  Yes please do. See my signature or the "Bugs & Reports" link in the header for the new bug tracker location. Thanks!
                    Ryan Thrash, MODX Co-Founder
                    Follow me on Twitter at @rthrash or catch my occasional unofficial thoughts at thrash.me
                    • 33497
                    • 30 Posts