We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 11975
    • 2,542 Posts
    Hi Folks,

    Here are tvEditor and tvExplorer

    I’m posting in this forum because I need help to figure out an issue with browse document feature in tvEditor.
    The handleValue Function (in class/functions.class.php) returns an array to string conversion error but it happens only in the backend.
    I’ve tried to fix it but without any success.

    Any Help would be really appreciated.
    Fixed


    WARNING:
    This is still beta so I release this version without any warranty
    Back up your datas First
    The @BINDINGS are now displayed in tveditor module and I’ve not finished their integration So do not edit the options value fot this TV or else the @BINDINGS will be replaced by option|| ....


    How to install tvEditor (if you already use the last beta see upgrade section)

    - unzip tveditor_beta-08.zip
    - Upload in assets/modules/ tvEditor folder
    - create a new module named tvEditor (you have to refresh the page to see the new module in menu bar)
    Copy and paste this code line in text area
    Code:
    include_once($modx->config[’base_path’] . "/assets/modules/tvEditor/tveditor.module.php");
    - Run « tvEditor » et click install button

    You ’ll have to define settings in configuration tab to define ditto params


    How to upgrade

    - unzip tveditor_beta-08.zip
    - Upload in assets/modules/ tvEditor folder
    - In configuration tab set tve installed to 0.
    Run the Module and Click Install
    in configuration tab, define ditto params

    tvExplorer

    Create a new a new snippet
    Copy and paste the content of tvexplorer.php
    I’ve written a little how to in the code

    :-)

    P.S: I will improve the html code of chunks in the public version

    EDIT: I’ve updated the attachment

    I forgot to mention that you ’ll have to modify in ditto.class.inc.php 1 line in buildUrl Function

    Change:
    $url = $modx->makeURL($cID, ’’, $queryString);
    To:
    $url = (isset($modx->documentObject[’id’])) ? $modx->makeURL($cID, ’’, $queryString) : ’index.php?id=’.$GLOBALS[’modID’].$queryString;


    EDIT2: files updated see post below smiley
      Made with MODx : [url=http://www.copadel.com]copadel, fruits et l
      • 11975
      • 2,542 Posts
      Here is a sample Call of tvExplorer


      Note: Ditto 2.0 is obligatory
      and tvEditor must be installed

      Sample Call

      [!tvExplorer?
      &dittoName=`Ditto`
      &dittoSnippetParameters=`tpl:myTpl|depth:5|parents:10,20|summarize:25|extenders:date,summary`
      &chunkExtra=`myExtraChunk`
      &selectTV=`tv1,tv2`
      &searchLabel=`Search`
      !]

      Sample extraChunk (each tv in a row) filter is obligatory

      tv1::filter==1::question==Select a value for tv1
      tv2::filter==1::question==Select a value for tv2


      In your document or in your template
      [!tvExplorerCallWithParams!]
      [+tve.searchForm+]
      [+dittoList+]


      Know issues:

      If you have enabled the PHx plugins, you ll have to call the snippet cached in an uncached page to make it work.

      :-)
        Made with MODx : [url=http://www.copadel.com]copadel, fruits et l
        • 6726
        • 7,075 Posts
        Great work !

        I missed quite a few steps since you got started on this apparently I have to catch up there. Great to have this interact with Ditto smiley Now what I need is TIME to give this and Ditto2 a run rolleyes
          .: COO - Commerce Guys - Community Driven Innovation :.


          MODx est l'outil id
          • 11975
          • 2,542 Posts
          Thx David,

          It seems that some bugs remains  tongue

          Will post fixes asap.

          :-)

          The browse feature doesnot work anymore with dittoRC2 :-/
            Made with MODx : [url=http://www.copadel.com]copadel, fruits et l
            • 11975
            • 2,542 Posts
            Hi,

            Will post a final version in a few hours
            Several bug fixed

            What’s nice with ditto is that we can access QE from the result listing




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

              here is new beta which is much more reliable.

              The installation process is still the same except that you’ll have to add an extender to ditto (named tve.extender.inc.php located in tvEditor/ditto_extender)

              Don’t forget to modify the line mentionned in the first post in ditto class.

              It seems that dittoRC2 does not contain anymore the date.extender.inc.php
              If so remove it in the module configuration tab in the in ditto extenders field

              :-)

              IMPORTANT NOTICE:

              There is at least one think I could not solve
              If you switch option position (by copy and paste) in the editing screen and then change the values.
              Every values attached to document to value 1 which be replaced by value 2
              Does it make sense :-D

              For instance:
              option1=>value1
              option2=>value2

              I’m changing the position
              option1=>value2
              option2=>value1

              And then Changing the values
              option1=>newvalue2
              option2=>newvalue1

              $Then doc with option1 which had value1 will now have newvalue2 and so on

              :-)


              P.S: It seems the css does not render correctly in IE so please test it with FF
                Made with MODx : [url=http://www.copadel.com]copadel, fruits et l
                • 11975
                • 2,542 Posts
                Sorry I forgot to update the tvexplorer snippet
                Here is the new file
                The placeholder name for ditto result is now called tve.dittoList



                [!tvExplorerCallWithParams!]
                [+tve.searchForm+]
                [+tve.dittoList+]
                  Made with MODx : [url=http://www.copadel.com]copadel, fruits et l
                  • 11975
                  • 2,542 Posts
                  No one is interested grin

                  :-)
                    Made with MODx : [url=http://www.copadel.com]copadel, fruits et l
                    • 7923
                    • 4,213 Posts
                    I am! laugh


                      "He can have a lollipop any time he wants to. That's what it means to be a programmer."