We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 21056
    • 327 Posts
    Just to let you know I’ve uploaded 0.3.7 of ManagerManager. This is just a bugfix / tidy up release. Download from:

    http://modxcms.com/extras/package/255
      Author: ManagerManager plugin - customise your ModX manager interface

      Rckt - web development, Sheffield, UK
      • 17883
      • 1,039 Posts
      Just tried it, but mm_default seems to be broken.

      mm_default('unpub_date', 'return date("d-m-Y H:i:s", now();');
      mm_createTab('Categories','HrCats');
      mm_default('pub_date'); 
      mm_default('cacheable','false'); 


      The creation of the tab succeeds, but none of the default settings. Will try 0.36 now to see if this is the problem or my 1.0.0. version.
        • 17883
        • 1,039 Posts
        Nevermind, my (and your ;-) ) fault. The documentation has an error, it should be:

        mm_default('unpub_date', 'return date("d-m-Y H:i:s", time()+(60*60*24*28));', '', '4', true); // Automatically set the unpublish date to be four weeks in the future for documents with a template ID of "4"


        instead of

        mm_default('unpub_date', 'return date("d-m-Y H:i:s", now()+(60*60*24*28);', '', '4', true); // Automatically set the unpublish date to be four weeks in the future for documents with a template ID of "4"


        edit: But unfortunately I can`t set a default value for a TV:

        mm_default(’newsdatum’, ’return date("d-m-Y H:i:s", time()+(60*60*24*28));’, ’’, ’’, true); // Automatically set the unpublish date to be four weeks in the future for documents with a template ID of "4"

        doesn`t work, while

        mm_default(’pub_date’, ’return date("d-m-Y H:i:s", time()+(60*60*24*28));’, ’’, ’’, true); // Automatically set the unpublish date to be four weeks in the future for documents with a template ID of "4"

        does. Any idea? Okay, read again, this feature is only provided for the standard fields.