We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 3749
    • 24,544 Posts
    Is it still necessary in Revo to use $_POST[’snippet’] to modify the content of a chunk in a plugin triggered by OnBeforeChunkFormSave or is there a way around this legacy quirk?
      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
      • 22303 MODX Staff
      • 10,725 Posts
      Quote from: BobRay at Sep 20, 2009, 12:50 AM

      Is it still necessary in Revo to use $_POST[’snippet’] to modify the content of a chunk in a plugin triggered by OnBeforeChunkFormSave or is there a way around this legacy quirk?
      Yes, still necessary as no table columns were harmed in the development of Revolution to maintain compatibility where possible. But that does bring up the issue that all of the form-related events should be modified to pass in references to the objects for manipulation, rather than having to work with the $_POST variables (at least that’s my opinion).
        • 3749
        • 24,544 Posts
        Quote from: OpenGeek at Sep 20, 2009, 10:25 AM

        Quote from: BobRay at Sep 20, 2009, 12:50 AM

        Is it still necessary in Revo to use $_POST[’snippet’] to modify the content of a chunk in a plugin triggered by OnBeforeChunkFormSave or is there a way around this legacy quirk?
        Yes, still necessary as no table columns were harmed in the development of Revolution to maintain compatibility where possible. But that does bring up the issue that all of the form-related events should be modified to pass in references to the objects for manipulation, rather than having to work with the $_POST variables (at least that’s my opinion).
        Right, it would be really nice to have some way to use getContent() and setContent() in plugins
        (and easier and less embarassing to explain).
          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