We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 20054
    • 21 Posts
    Cool, I replaced the last line with

    return strpos($url, '&') ? $url : str_replace("&","&",$url);
    


    and it works a treat. That code should only do the str_replace if needed. Thanks for your help!
      • 20054
      • 21 Posts
      Oh, I didn’t find anything in debug.class.inc.php that looked like it wanted changing... should there be?
        • 11975
        • 2,542 Posts
        The proper file is modxDebugConsole.class.php located in the debug folder

        :-)

          Made with MODx : [url=http://www.copadel.com]copadel, fruits et l
          • 20054
          • 21 Posts
          Cool, I see that there is mention of the bug in ditto.modxcms.com, in fact it is noted as fixed in r1459. Oh well, hopefully shouldn’t have to modify it on the next site I make wink
            • 20054
            • 21 Posts
            By the way, I have to mention that this is a brilliantly useful module. Thanks so much!
              • 11975
              • 2,542 Posts
              Thx for your kind comment.

              I’m working on a new version of tvexplorer but have no idea when It will be avalaible.
              I’ve added PHx support in formTPL and input chunk.
              Fixed some bugs like multiple range.

              Will keep you posted.

              :-)
                Made with MODx : [url=http://www.copadel.com]copadel, fruits et l
                • 4002
                • 64 Posts
                related to one of my recent posts:
                http://modxcms.com/forums/index.php/topic,21312.msg131683.html#msg131683

                using your advice, i have attempted to implement tvExplorer for my site. great module/snippet!!

                i am having some trouble though:
                1. i have 2 select boxes in my form. when the first is left blank and the second one is selected, i get the following error:

                PHP error debug 
                  Error:  strpos() [function.strpos]: Empty delimiter.   
                  Error type/ Nr.:  Warning - 2   
                  File:  /home/mcnei5/public_html/dev-crosscountycoc/assets/snippets/ditto/classes/filter.class.inc.php   
                  Line:  85   
                  Line 85 source:  if (strpos($value[$this->array_key], $this->filterValue)!==FALSE)  
                


                the form chunk i am using is as follows:
                <form action="[~[*id*]~]" method="get" >
                <fieldset>
                [+tve.tmplvar_business_city: type->dropdown:filter->7:addBlank->0+]
                </fieldset>
                <fieldset>
                [+tve.tmplvar_business_state: type->dropdown:filter->7:addBlank->0+]
                </fieldset>
                <fieldset class="sendForm">
                <input type="submit" name="search" value="Search" />
                </fieldset>
                </form>
                


                isn’t the filter supposed to return an "OR" results - which would be any document with tmplvar_business_state = value regardless of tmplvar_business_city?

                2. when i clear out both fields (select the first blank option at top of select), ditto returns all docs. i need it to return no docs (essentially clearing out the result set). how can i accomplish this?

                3. what does the addBlank parameter do? i tried setting it to 1 and 0 - but both seem to result in a "blank" option at the top of the select box.

                thanks in advance.
                  • 11975
                  • 2,542 Posts
                  Hi,

                  the addBlank is supposed to allow you to add a blank value as the first option.
                  I guess this feature is a little buggy at this time.

                  About the filter error, could you try to use the filter number 9 (I ’ve added this one) it’s similar to the Ditto tagMode onlyTags.

                  To get more relevant result, tvExplorer createscomplementary filter (to view them set the debug to 1 in dittoSnippetParameters)
                  That way if you have severl tvs it returns AND AND results.

                  If you want to disable this complementary filters, add to your tv tags, filterOff->false or filterOff->0 (don’t remeber exactly the rigth syntax).

                  Let me know if this worked for you.

                  :-)
                    Made with MODx : [url=http://www.copadel.com]copadel, fruits et l
                    • 4002
                    • 64 Posts
                    this is a awesome snippet, but unfortunately, i think i am going to have to write a custom solution for my purposes b/c i can’t seem to get this just right.

                    with that said, can you tell me how i can generate the drop-down tvs (with all the available values for the tv) on my custom front-end form (just as you have accomplished with tvExplorer? i can’t seem to find an explanation in the forums on how to do this. if it matters, my tv’s that i am using in my form are @CHUNK bindings.

                    thanks
                      • 4002
                      • 64 Posts
                      also, once more question about tvExplorer for my future knowledge. can it also incorporate search on a standard document variable like ’pagetitle’ (ie. have a search form with pagetitle, TV1 and TV2)?