We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 9849
    • 74 Posts
    I tried to change the default content_type to text/plain (for use with FileDownload). Unfortunately I cannot get it to work. I can change boolean variables, but no drop down lists.

    This is what I did without any effect:
    mm_default('content_type', 'text/plain', '', '7');


    Thanks for your help in advance.

    edit: Seems like it’s not supported. Maybe something for 1.0?
      • 21056
      • 327 Posts
      Thanks for pointing it out - I’ve logged it in Jira for fixing in the next version

      http://svn.modxcms.com/jira/browse/ADDON-64
        Author: ManagerManager plugin - customise your ModX manager interface

        Rckt - web development, Sheffield, UK
        • 11316
        • 81 Posts
        (Modified) I am also seeing some minor bugs. If my TV is a check-box it wont move it into a New Tab that I had created, only text/image tv’s seem to be able to move into Tabs.
        Does the sync fields work with tv’s? I am trying to sync the introtext to a text tv but it doesn’t seem to work. Thank’s nic for an awesome plugin!
          • 21056
          • 327 Posts
          Quote from: Ryan at Sep 27, 2009, 08:23 PM

          (Modified) I am also seeing some minor bugs. If my TV is a check-box it wont move it into a New Tab that I had created, only text/image tv’s seem to be able to move into Tabs.
          Does the sync fields work with tv’s? I am trying to sync the introtext to a text tv but it doesn’t seem to work. Thank’s nic for an awesome plugin!
          They should work -- if not it’s a bug. I’ve logged these as ADDON-65 and ADDON-66 in Jira.
            Author: ManagerManager plugin - customise your ModX manager interface

            Rckt - web development, Sheffield, UK
            • 21056
            • 327 Posts
            The latest version (0.3.5, awaiting approval in the repository) now allows you to use content_type with mm_default, and also allows text areas to be synronised with other text areas.
              Author: ManagerManager plugin - customise your ModX manager interface

              Rckt - web development, Sheffield, UK
              • 17884
              • 10 Posts
              I may have come across a bug, though I’m not 100% certain (hence posting here first):

              MODX Evo 1.0.2, ManagerManager 0.3.5, within my MM rules chunk I specify:

              mm_default('content_type', 'text/xml', '1,2,3', '5,8');      // (set the default content type to an xml doc for all roles, templates 5 & 8)


              Under a "set folder" (=8), I have a list of "set" resources (=5) - each generates a dynamic XML file. Creating a new set resource while logged in as an Admin works as expected. However, if I log in as an ’Editor’ or ’Publisher’, any newly created Set defaults to ’text/html’. And since the ’content type’ field is hidden from me when I’m an Editor or Publisher, I have no way of correcting this.

              I have tried giving the Editor role full access (Security > Roles > Editor > check boxes) and have also tried leaving the mm_default role var as ’’ (empty), but nothing seems to work outside of logging in as an Admin....

              Am I missing something or is this a bug? If it is a bug, is there anything I can modify to fix this so my client doesn’t have full access to everything?

              Thx.
                • 17884
                • 10 Posts
                I found a fix to my problem (not a bug, just the way it currently is)

                Within ’manager > actions > mutate_content.dynamic.php’, line 842, you can change the default ’admin-only’ access as follows:

                // proposed policy change: non-admin managers can edit contentType and content_dispo only for resources they create
                // see: http://svn.modxcms.com/jira/browse/MODX-1365
                if ($_SESSION['mgrRole'] == 1 || $_REQUEST['a'] != '27' || $_SESSION['mgrInternalKey'] == $content['createdby']) {
                //if ($_SESSION['mgrRole'] == 1) {


                To set the default content type for a resource, use the line of code in my previous post (above). And if you want to set the default type AND prohibit a non-admin from changing the value for a new resource, add the following line:

                mm_hideFields('content_type',"2,3",'1..n');   // (hide for non-admin roles (2,3), templates (1..n))