We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 6726
    • 7,075 Posts
    Well, sorry can’t help you with the coding, still didn’t get time to go past the php basics despite the fact I am willing (and hopefully, able tongue). If business is good, I’ll have myself a good php training with Anaska, this might help... it’s next on my list of investment. I am usually self-taught but a bit of help to quickstart me won’t hurt...

    But I’ll definitely help with the testing smiley
      .: COO - Commerce Guys - Community Driven Innovation :.


      MODx est l'outil id
      • 15987
      • 786 Posts
      I may have some time to lend a hand if needed, looks like a great project.
        • 11975
        • 2,542 Posts
        To have read most of the you wrote, I can say that you are a great developper kylej.
        I’m afraid of not being such a good coder.
        You will certainly find mine "amateur".

        I will post tomorrow the source.

        I hope it will not be too scary

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

          sorry for the delay.
          I’m very close to a working version.
          I hope I could finish tonight and will post it asap.

          Stay tuned.

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

            here is the First beta version of TvEditor.

            First of All, consider this beta as a draft.
            The code is dirty and needs improvements.
            I’ll rewrite most of it in the weeks to be.


            This code must not be used in production environment, it could mess up your content.

            known issue:
            FIXED
            If you’re adding a new option to a tv which already has options. The module does not check if the new is already in the list.
            (In fact it does but there is a bug in the process which follows the duplicate checking)
            I haven’t been able to write a satisfying function to filter the duplicate in this case.
            If so, all existing options will be deleted and replaced by the new one



            It’s been tested with beta 3 and seems to work(except for the case mentioned above) and is released without any guarantee.

            INSTALLATION:

            1/Extract the archive in assets/modules


            2/ Install required chunk:
            Use phpMyAdmin and execute tvEditor-chunk.sql
            If your db prefix is not "modx_", first search and replace "modx_" with your custom prefix.

            3/ create a new Module named tvEditor
            copy and paste in content

            include_once($modx->config['base_path'] . "/assets/modules/tvEditor/tveditor.snippet.php");
            


            NOTE: You can set $debug=true and changes won’t be stored in db
            default is $debug=false; // line 36 file:tveditor.snippet.php

            TODO:

            - bug fixes
            - improve code quality
            - remove harcoded string for multilingual purpose

            :-)

            EDIT : See first post for files
              Made with MODx : [url=http://www.copadel.com]copadel, fruits et l
              • 15987
              • 786 Posts
              Great, I’m glad to see this you have put this out there. I will try to give this a test run later today.
                • 6726
                • 7,075 Posts
                I’ll also install it on my test install and report, great work Helio grin
                  .: COO - Commerce Guys - Community Driven Innovation :.


                  MODx est l'outil id
                  • 11975
                  • 2,542 Posts
                  Thanks for being volunteers.

                  There is at least one known issue.
                  If you’re adding a new option to a tv which already has options. The module does not check if the new is already in the list.
                  I haven’t been able to write a satisfying function to filter the duplicate in this case.
                  If so, all existing options could be deleted and replaced by the new one

                  I’m working on it and will update the module when done.

                  :-)
                    Made with MODx : [url=http://www.copadel.com]copadel, fruits et l
                    • 15987
                    • 786 Posts
                    heliotrope,
                    I gave this a quick test run using the latest build from svn and am getting an error, heres my setup:

                    I created a tv named test3 with the following options:
                    Input Type: CheckBox
                    Input Option Values: option1==value1||option2==value2||option3==value3

                    when I run the snippet I see the tv listed. I can click on the view link and it brings up the list of tv option values and the delete option works as well. Those are the only links that work, all links to add or edit are giving me the following error:

                    Warning: array_merge() [function.array-merge]: Argument #1 is not an array in C:\xampp\xampp\htdocs\rev1656\assets\modules\tvEditor\class\makeform.class.inc.php on line 83
                    


                    I have not had time to investigate this further, but will let you know if I can find the problem.
                      • 11975
                      • 2,542 Posts
                      Hi kyle,

                      thanks for reporting this error.
                      I’ve made a quick fix which should do the trick.

                      Here are the new files.

                      :-)


                      EDIT : I’ve corrected the known issue with adding new options.
                      Files are now attached to first post.
                        Made with MODx : [url=http://www.copadel.com]copadel, fruits et l