We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 27749
    • 53 Posts
    Quote from: heliotrope at Jul 28, 2008, 08:09 AM

    Could you remove the Jot Call ?
    It seems that the error comes from it

    :-)

    I removed it - didn’t help. BUT - then I realized the form is sent by GET and not POST (don’t ask me why.. rolleyes ) and that was what caused the mess.
    Now it works with Jot call etc. Second problem was the input/checkbox template which didn’t reflect my prettyforms.jc styling. So when JS turned off - everything was fine.
    Now I had to tweak the "tvEditor-InputCheckbox" template since any other template changing didn’t work sad

    I have other questions:
    - Is there a simple way to show all the results first and and filter them after this?
    - the changes done to ditto.class.inc.php should be done to the file in tvEditor/class/ or to the ditto snippet files?

    Thanks again.
      • 27749
      • 53 Posts
      Hello again,
      now I managed to have it working using GET and figured out that the id prefix must be also in the ?_search name button.

      Whats not working now is the pagination. When nothing is selected and i submit the form i get all the results and the pagination works fine.
      But when I select any of the checkboxes the pagination stops working. It shows the buttons but the URLs dont get the filter params.
      It says: No documents found. Page 0 of 0.
      Basicly - what I can see, is that the filter variables are not apended to the URL, but WHY?

      I am soooo close to finishing the project..

      Any idea?
      THX
        • 11975
        • 2,542 Posts
        Hi,

        could you post more information about such as:
        - snippet call

        have you modified ditto buildUrl function as required?

        :-)
          Made with MODx : [url=http://www.copadel.com]copadel, fruits et l
          • 11975
          • 2,542 Posts
          Ok

          add an hidden input in your form
          As you don’t use FURLS you need to pass the id param.
          <input type="hidden" name="id" value="[*id*]" />

          should work

          :-)
            Made with MODx : [url=http://www.copadel.com]copadel, fruits et l
            • 27749
            • 53 Posts
            Hi,
            sorry - i needed to leave kbd..

            This is my call (triped down to the bone)
            [[tvExplorer? &tveID=`X` &dittoName=`Ditto` &dittoSnippetParameters=`parents:1|display:1|paginate:1|id:X` &formTPL=`form` ]]

            [+X_tve.searchForm+]

            [+X_tve.dittoList+]
            [+X_previous+] [+X_pages+] [+X_next+]

            I even tried to pass a ditto ID..
            And I added the hidden id..

            http://bdl-cee.com/2.0/domu.html << here at the top right side is the form. (’fcourse its a mess now) but if you hit the "Nastavit" button the pagination (and any other on the page) work fine. But afer selectin one (or both) checkboxes the documents are output, but the pagination does not pass the variable. It is set to 1 and not to i.e. X_tagy[]=tisk&X_tagy[]=kina

              • 11975
              • 2,542 Posts
              I guess that Ditto does not allow to set the id param. // See BuildUrl function
              Your only solution is to use FURLS

              :-)

              EDIT: I’m wrong the issue comes from the buildUrl but not about the id param
              As you can see in the pagination links
              http://bdl-cee.com/2.0/domu.html?X_tagy=1&X_search=Nastavit&X_start=1

              The X_tagy doesn’t match with the sent values X_tagy=tisk



                Made with MODx : [url=http://www.copadel.com]copadel, fruits et l
                • 11975
                • 2,542 Posts
                Could you post your formTPL?
                If you can, create an account and send me the details through PM

                I’ll have a look.

                :-)
                  Made with MODx : [url=http://www.copadel.com]copadel, fruits et l
                  • 27749
                  • 53 Posts
                  HA! I seems I got it. Since downgrading to ditto 2.0.2 helped but was not the best solution I added a line:
                  $keyvalue = $value;

                  to the loop code:
                           foreach ($_GET as $param=>$value) {
                              if ($param != 'id' && $param != 'q') {
                                 $keyparam =htmlspecialchars($param, ENT_QUOTES);
                                 $keyvalue = (is_array($value)) ? array_walk($value,"ditto::applyHsc") : htmlspecialchars($value, ENT_QUOTES);
                                 $keyvalue = $value;
                  			   $query[$keyparam] = $keyvalue;               
                              }
                  			}

                  And now it works within Ditto 2.1. The line makes the two above probably useless, but - hey - after a day or two of tweaking stuff..

                  Anyway - Heliotrope - Thank you very much for your help and for a very, very useful module/snippet! I cannot wait the next version.

                  :D
                    • 11481
                    • 26 Posts
                    Sorry for the language of the English translator of Google

                    I am a novice in modx and I am developing a directory of companies, will it be possible to link the result of a filter tvExplorer by locality, and Googlemaps?
                      • 29076
                      • 615 Posts
                      Hey, I got tvExplorer to work! (I’m a little proud of my self). Thank you again for a superb modx solution! laugh I’ll present the result here as soon as I finished the styling.

                      One question; Is there a way I can use the ajax-load-gif in tvExplorer on front end as you use in tvEditor/tvExplorer in the manager? I tried to find it in the .js files and in the snippets, chunks that follows tvEditor/tvExplorer, but I just couldn’t find it.

                      To explain, when I click the search button on my front-end tvExplorer-form, the load-gif comes up on the screen ( a banal explanation, I know smiley ).
                        I think, thererfor I am! But what I am, and why...?