We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 19534
    • 183 Posts
    First of all: nice work!

    I was planing to realize versioning via an add-on, too. Untill now I haven’t started anything but my ideas where the following (this is brainstorming only, no details at all):

    - Special backup folder (resource) or context in which versions of resources are being stored
    - Plugin which listens to OnDocFormSave: After saving a resource it is dublicated and stored in the backup folder/context. Additionally a link between the orginal resource and this backup resource is stored.
    - Like in my Babel extra where I#m working with linked resources, too, the plugin renders a Box to easily switch between versions and provides buttons to restore an old version.

    Maybe duplicating the whole resource is a little bit too much in some cases, but I think that is not that bad. Furthermore visualising the changes/diffs maybe not that easy...
    But I think this should be doable very easily...

    But as I said these are only thoughts of mine.

    Looking forward to see your project progessing.

    Cheers,
    Jakob
      Add-On to easily manage your multilingual sites: Babel
      • 18373 ☆ A M B ☆
      • 3,141 Posts
      Hi Jakob,

      Thanks for your views!

      I personally think that a resource container as folder wouldn’t work well when you’re thinking about bigger sites that update more often. Or even a site where the client just can’t decide on how they want to write something. In that respect, I think a different table (and later, optionally, a whole different database) would be more scalable and able of handling larger sites and number of revisions.

      The plugin so far indeed triggers on OnDocFormSave, but instead duplicates to a different table in the database. It also looks up the last revision for that specific resource (based on doc ID) and saves that link.


      I came across Babel the other day and I really liked the way you did it with the buttons and perhaps something like that could be used in a release sometime for more advanced features. Definitely keeping it in mind!



      I may have a certain idea in my head about how I want this to get shape, but I really want to hear how people think about it. After all, I can spend a while writing this but if nobody is going to use it I might as well do other things. wink So keep those comments coming! laugh
        Mark Hamstra • Developer spending his days working on Premium Extras and a MODX Site Dashboard with the ability to remotely upgrade MODX and extras to make the MODX world a little better.

        Tweet me @mark_hamstra, check my infrequent blog at markhamstra.com, my slightly more frequent ramblings at MODX.today or see code at Github.
        • 21838
        • 284 Posts
        As this won’t be a native thing before 3.0 (as I’ve heard so far from the devs), I really appreciate your work. Think it would be very useful for some websites where you have to test out another text but won’t loose the current one. And you even can implement a workflow with approvals and so on. Of course, the backup is another point. And the thing with another database (is it really such a big thing in comparison to a different table?) sounds very senseful to me.
        If you need some advice about UI/UX for the plugin, don’t hesitate to write me.
          MODX Free Template Base: MODX-Boilerplate | my blog (lots of MODX stuff) | my gitHub (translations) | MODX User Groups Germany (Facebook)
          • 18373 ☆ A M B ☆
          • 3,141 Posts
          The UI really is bothering me right now. I just can’t seem to make modExt do what I want. Had a breakthrough yesterday when I actually managed to output two tabs and different content on both, but I managed to break that somehow.


          I’m just going to focus on the functionality right now and perhaps when I put it on Git / release as alpha package someone could implement some UI design for it..



          And just for the record: this plugin wont support a publishing workflow (save a draft, original one still visible on the site but preview available somehow, publish draft) from the start, that’s more an expansion I’m looking for later on.

          I’ve not tested it, but I imagine your database could slow down unnecessarily from having one table with, say, 1000 revisions on 50 page site.
            Mark Hamstra • Developer spending his days working on Premium Extras and a MODX Site Dashboard with the ability to remotely upgrade MODX and extras to make the MODX world a little better.

            Tweet me @mark_hamstra, check my infrequent blog at markhamstra.com, my slightly more frequent ramblings at MODX.today or see code at Github.
            • 21838
            • 284 Posts
            Quote from: Mark at Dec 22, 2010, 05:15 PM

            And just for the record: this plugin wont support a publishing workflow (save a draft, original one still visible on the site but preview available somehow, publish draft) from the start, that’s more an expansion I’m looking for later on.
            I’ve not tested it, but I imagine your database could slow down unnecessarily from having one table with, say, 1000 revisions on 50 page site.
            Yeah, should be an additional thing at least. But think it’s the base for sth. like that.
              MODX Free Template Base: MODX-Boilerplate | my blog (lots of MODX stuff) | my gitHub (translations) | MODX User Groups Germany (Facebook)
              • 3749
              • 24,544 Posts
              Quote from: Mark at Dec 22, 2010, 05:15 PM

              And just for the record: this plugin wont support a publishing workflow (save a draft, original one still visible on the site but preview available somehow, publish draft) from the start, that’s more an expansion I’m looking for later on.

              I’ve not tested it, but I imagine your database could slow down unnecessarily from having one table with, say, 1000 revisions on 50 page site.

              I think one way to do that efficiently is to store the first version of the document, then after that, just store the deltas from one version to the next. I know that’s not how you’re doing it, but thought you might want to keep that in the back of your mind as you develop. When you pick a version to revert to, the program starts with the original and applies each delta up to that point. It also makes it possible to display the changes between any two versions.

              As you’re finding, the UI is what kills you for stuff like this.
                Did I help you? Buy me a beer
                Get my Book: MODX:The Official Guide
                MODX info for everyone: http://bobsguides.com/modx.html
                My MODX Extras
                Bob's Guides is now hosted at A2 MODX Hosting
                • 9995
                • 1,613 Posts
                I’ve not tested it, but I imagine your database could slow down unnecessarily from having one table with, say, 1000 revisions on 50 page site.

                A tab (with last 5 revisions or smt.) ánd total list will be very nice if u ask me.
                Really would like this plugin.
                  Evolution user, I like the back-end speed and simplicity smiley
                  • 18373 ☆ A M B ☆
                  • 3,141 Posts
                  I guess I just needed a good nights sleep (and lots of googling) to get modExt working.

                  Posted a lil’ teaser/update on the progress here: http://twitpic.com/3j86dl


                  Now the basic grid is working, I’ll be working on advancing it further.


                  I think one way to do that efficiently is to store the first version of the document, then after that, just store the deltas from one version to the next. I know that’s not how you’re doing it, but thought you might want to keep that in the back of your mind as you develop. When you pick a version to revert to, the program starts with the original and applies each delta up to that point. It also makes it possible to display the changes between any two versions.

                  That is indeed an idea and takes a totally different route then where I’m headed now.. instead of saving the actual data, it saves the actual changes that were made. Thanks for the thoughts.

                  A tab (with last 5 revisions or smt.) ánd total list will be very nice if u ask me.

                  Sounds like a plan. smiley
                    Mark Hamstra • Developer spending his days working on Premium Extras and a MODX Site Dashboard with the ability to remotely upgrade MODX and extras to make the MODX world a little better.

                    Tweet me @mark_hamstra, check my infrequent blog at markhamstra.com, my slightly more frequent ramblings at MODX.today or see code at Github.
                    • 3749
                    • 24,544 Posts
                    If you do end up storing the deltas at some point, there may be a way to leverage the Git or SVN code (or their respective clients).
                      Did I help you? Buy me a beer
                      Get my Book: MODX:The Official Guide
                      MODX info for everyone: http://bobsguides.com/modx.html
                      My MODX Extras
                      Bob's Guides is now hosted at A2 MODX Hosting
                      • 18373 ☆ A M B ☆
                      • 3,141 Posts
                      As I haven’t managed to find out how to work with Git yet, I doubt I’m the right person to develop that laugh

                      The concept is fascinating, but it is also much more complex. In all honesty - I think that’s more then I can handle. undecided This addon will be licensed as GNU/GPL or whatever the correct term is (same like MODx license) and if anybody wants to invest time in changing the way the changes are stored, I’d like to invite them to use my code as a starting point (if that helps at all). But it wont be part of VersionX for the foreseeable future.


                      Maybe I’ll change my mind about that in a while, if this method shows too many drawbacks / resource usage or there is a big demand (and spare time on my hands).



                      As I’m considering adding the option to store data file-based, perhaps that could be configured to be loaded into a repository. But file-based storing will not be in the pl release either. tongue


                      I’d just like to repeat that I do appreciate the feedback and ideas... even if I’m so critical towards implementing them tongue




                      Modified:
                      Since the screenshot posted on Twitter not too long ago, I have updated it:
                      - Change the unix time code to a (to-be) configurable timestamp
                      - Display the editor’s full name from the user profile
                        Mark Hamstra • Developer spending his days working on Premium Extras and a MODX Site Dashboard with the ability to remotely upgrade MODX and extras to make the MODX world a little better.

                        Tweet me @mark_hamstra, check my infrequent blog at markhamstra.com, my slightly more frequent ramblings at MODX.today or see code at Github.

                      This discussion is closed to further replies. Keep calm and carry on.