We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 16892
    • 107 Posts
    I have not been able to get it working either; I get the same parse error. I am not using the stopwords chunk at all.
      • 3098
      • 37 Posts
      Hello,

      The new version of this snippet is available in MODx ressources :
      http://modxcms.com/HyperFlexSeachForm-0.1a-0.html
      (the url should change with the version number, I don’t know if it’s a bug or so)

      This version get rid of several bugs and improve the presentation of the results.
      Let me know of any problems you could encounter.

      Thank you.


      Benjamin


      PS: I’m working on the documentation of the snippet, so I you could ask me every little things that are not clear for you, it would be great !
        • 4295
        • 98 Posts
        Hi Benjamin,

        I’ve noticed the enhanced feature you added called ParentSearch. Does this mean that HyperFlexSearchForm can be setup to search only specified folders? If so, a short explanation on how to set this up would be appreciated. Thank you.

        // $parentSearch [ csv ]
           // Allow parent categories to be searched in
           // Idea from Wendy Novianto
           $parentSearch = '';
           
           // $parentSearchMode [ 0 | 1 ]
           // Indicates whether we exclude or include the parent categories list
           $parentSearchMode = 1;
        
          • 3098
          • 37 Posts
          Yes and I will explain how to use this parameter and all other ones in the coming soon documentation.
            • 24414
            • 45 Posts
            I have just installed the new HyperFlexSearch form. Found a couple of holes:

            1) ?hl=querystring

            in result URL is falling outside of the quotes in the outputted html links.

            2) Raw snippet calls are being exposed in search results.

            3) HTML formatted elements getting included within search results description occassionally.
              • 3098
              • 37 Posts
              1) "?hl=querystring" was used in a previous version of the snippet, it has been replaced by "?search="
              2) snippet/chunk/... calls are now stripped off of the results
              3) could you give me an example of html code appearing in the results ?

              Those above changes has been included in the second release of the snippet (v2r2).
              http://modxcms.com/HyperFlexSeachForm-0.1a-0.html

              Thanks for your interest.
                • 24414
                • 45 Posts
                Sorry I didn’t leave more details - 5 a.m., it was time for bed!

                The HTML formatted text may not be an issue anymore - I had created a plugin to search & replace snippet calls appearin in description text, the effect only happened in one case where the result description was cropped.

                Will try again with update and without the hack and report back.
                  • 24414
                  • 45 Posts
                  The issue with the snippet output is still there - I have tracked that down - around line 860 we have:

                  foreach ($modRegExArray as $mReg){
                  	$searchString = preg_replace($mReg, '', $content);
                  }
                  


                  We should be working on the string contained within $content - not $searchString.

                  I was playing around a bit and came up with a regex to clean snippets & chunks in results in one go. Not a regex wizard, but this seems to work in my test case:

                  <?php
                  
                  $content .= '<p>Snippets: [[snippets]]</p>';
                  $content .= '<p>Snippets - nocache: [!noCacheSnippets!]</p>';
                  $content .= '<p>Links: [~links~]</p>';
                  $content .= '<p>Settings: [(settings)]</p>';
                  $content .= '<p>Chunks: {{chunks}}</p>';
                  $content .= '<p>Attributes: [*attributes*]</p>';
                  
                  $killTheseStrings = '~(\[[\[\!\*\(\~]|\{\{)(.*?)(\}\}|[\~\)\*\!\]]\])~';
                  		
                  $thisStringInstead = '';
                  		
                  $content = preg_replace($killTheseStrings, $thisStringInstead, $content);
                  
                  echo $content;
                  		
                  ?>
                  


                  HTML formatted characters haven’t appeared since last post.
                    • 3098
                    • 37 Posts
                    Quote from: ram at Nov 09, 2006, 04:38 PM

                    The issue with the snippet output is still there - I have tracked that down - around line 860 we have:
                    foreach ($modRegExArray as $mReg){
                    	$searchString = preg_replace($mReg, '', $content);
                    }
                    

                    We should be working on the string contained within $content - not $searchString.
                    Yes, of course. This is what I meant to do. The snippet has been updated with "$content".

                    Thank you.
                      • 16892
                      • 107 Posts
                      Any hints on how to use document and webgroups?

                      Thanks! Great snippet.