We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 10365
    • 11 Posts
    got this:
    Parse error: syntax error, unexpected $end in /.../.../.../.../assets/snippets/HyperFlexSearchForm/HyperFlexSearchForm.inc.php on line 86

    HFSF 3r4
    MODx 0.9.6
      • 3098
      • 37 Posts
      Please remove every files in "assets/snippets/HyperFlexSearchForm" and upload snippet files again.
        • 21772
        • 69 Posts
        Hi Benjamin

        A new version(3r4) was tried.

        A Japanese (multi byte) problem that includes the problem in the
        following part.
        The value of $_POST[’search’] is set even if there is no $_POST[’search’]

        Line 342
        $searchString = (isset($_POST['search']))? $_POST['search'] : urldecode($_GET['FSF_search']) ;
        

        Then, it added and it dealt with the following code.
        $searchString = (isset($_POST['search']))? $_POST['search'] : urldecode($_GET['FSF_search']) ;
        // add code
        if (!strlen($_POST['search'])) {
        $searchString = $_GET['FSF_search'];
        }
        

        The problem has not occurred because of this correction.

        I think it is unquestionable in basic operation of the retrieval
        though some problems of other multi bytes remain.

        It satisfies it very much.
        Thank you.
          • 3098
          • 37 Posts
          Hi nori,

          Do you mean that your problem in now solved and that the search works good after you addition ?


          Benjamin
            • 21772
            • 69 Posts
            Hi Benjamin

            It is so.

            When I opened up the second page, the third page in the Japanese environment unless I add cord, $searchString empties.

            Of course the query string is normal. (Example : http://www.~/124?FSF_offset=10&FSF_search=%E3%81%9F)
            In the Japanese environment.
            isset($_POST[’search’]) Judgment is wrong.

            But I contributed it as my revision report
            This does not become the problem in the environment of the problem English in the Japanese environment
              • 16450
              • 15 Posts
              I’m sorry ... I’m thoroughly confused ... I found the README utterly useless.
              Is there a more detailed description of what each of the parameters do??
              For example `documentgroupSearchMode` means nothing to me, and what should be entered for `templateSearch`??
              Furthermore, I’ve seen it written that it requires FlexSearchForm, but for the life of me I can’t find this add-on except for on etomite.com

              Obviously there’s something that I’m missing because others say they’re getting it going very quickly. Anyone have real instructions?!?
                • 3098
                • 37 Posts
                Hi kumazatheef,


                Here is the list of all available parameters :
                // comma-separated list of templates names
                // only documents using the specified templates will be searched in
                // example : &templateSearch=`beautifulSunday,rainbow,blackAndWhite`
                &templateSearch
                
                // do we include (1) or exclude (0) the defined templates from the search ?
                // example : &templateSearchMode=`1`
                &templateSearchMode
                
                // comma-separated list of parents IDs
                // only documents whose parent is in the list are searched in
                // example : &parentSearch=`1,4,18`
                &parentSearch
                
                // do we include (1) or exclude (0) the defined parents IDs from the search ?
                // example : &parentSearchMode=`1`
                &parentSearchMode
                
                // comma-separated list of documents groups names
                // only documents whose group(s) is (are) in the list are searched in
                // example : &documentgroupSearch=`private,myPages`
                &documentgroupSearch
                
                // do we include (1) or exclude (0) the defined documents groups from the search ?
                // example : &documentgroupSearchMode=`0`
                &documentgroupSearchMode
                
                // comma-separated list of webgroups names
                // only documents whose groups are allowed in the specified webgroups are searched in
                // example : &webgroupSearch=`users`
                &webgroupSearch
                
                // do we include (1) or exclude (0) the defined webgroups from the search ?
                // example : &webgroupSearchMode=`1`
                &webgroupSearchMode
                
                // do we show an extract (1) of each result or not (0) ?
                // example : &showResultExtract=`1`
                &showResultExtract
                	
                // do we show each result content length (1) or not (0) ?
                // example : &showExtractCharCount=`0`
                &showExtractCharCount

                This will be included in the README file.

                The FlexSearchForm snippet is included in HyperFlexSearchForm, there is no need to add it manually.
                HyperFlexSearchForm is based on FlexSearchForm and adds advanced search features to it.

                So, you can use HyperFlexSearchForm with the same parameters as in FlexSearchForm, but also with new advanced search parameters.

                You will find Etomite FlexSearchForm page here :
                http://www.etomite.org/browsesnippets.html?int_snipid=11


                Thanks for your interest,


                Benjamin
                  • 7231
                  • 4,205 Posts
                  `documentgroupSearchMode` = this makes the documentgroup more flexible, the group can either included or excluded from the search. For example if you only want to exclude a few files than the exclude method would be better than including all the other files.

                  `templateSearch` = makes it so that you can limit the search only to pages using the defined templates.

                  I have never used this snippet, have only used the AjaxSearch snippet, but this one looks like it has some great additional features. I think I will give it a try.
                    [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]
                    • 27086
                    • 37 Posts
                    Hello, Benjamin and Nori.

                    Nori’s report
                    isset($_POST[’search’]) Judgment is wrong.

                    I recognized this issue and traced the code.

                    near line 290.
                    // protecting the searchString (for the searchbox value)
                    $_POST['search'] = str_replace("\"", """, $_POST['search']);

                    This code set value to $_POST[’search’] always...
                    If $_POST[’search’] is not set, the result is "". And I have another solution .
                    $searchString = ($_POST['search'] !=="")  ? $_POST['search'] : urldecode($_GET['FSF_search']) ; 

                    In case $_POST[’search’] is "" , $searchString is set urldecode($_GET[’FSF_search’]).
                    In case $_POST[’search’] is not "" , $searchString is set $_POST[’search’].

                    thx rgds.
                      • 5810
                      • 5 Posts
                      Is 3r4 the latest version? If so it doesn’t work correctly for $searchStyle = ’relevance’. The SQL with MATCH ... AGAINST syntax is overwritten later in the code and never gets executed. Then, the SQL that is used only seems to search for exact matches on search words, like this:

                      SELECT 
                          cnt.`id`, cnt.`pagetitle`, cnt.`description`, cnt.`content` 
                      FROM 
                          `mobilemodx`.`modx_site_content` AS cnt 
                      WHERE 
                          cnt.`published`='1' AND cnt.`searchable`='1' AND cnt.`deleted`='0' 
                      AND 
                          ( (LOWER(cnt.`pagetitle`) = 'SEARCHTERM' OR LOWER(cnt.`description`) = 'SEARCHTERM' OR LOWER(cnt.`content`) = 'SEARCHTERM') ) 
                      ORDER BY `editedon` DESC, `createdon` DESC LIMIT 200;
                      


                      ... and this means it can never work unless pagetitle, description and content are all exactly equal to your search term.