We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 29525
    • 388 Posts
    I could use another set of eyes on this one.

    I’ve moved some TVs to a tab called Admin. I want hide this tab from the content editor role along with a few other tabs.

    So far all is working. The TVs have moved to the new tab. The other tabs, meta, preview etc are hidden from this role, but the Admin tab is still visible to the content editor role.

    All the other rules are working as expected.

    Here’s my mm_rules

    <?php
    
    // MM rules can go in here, instead of a chunk
    // If you copy them to a chunk, don't include the opening and closing PHP tags
    
    // ------------------------ INSERT YOUR RULES HERE --------------------
    // These are example rules -- replace them with your own
    // PHP *is* allowed
    
    // For everyone
    mm_default('pub_date');
    mm_renameField('','');
    
    mm_createTab('Admin','docadmin','');
    mm_createTab('Publication Dates', 'pubdates');
    mm_moveFieldsToTab('tvchunksforhead,tvchunksabovecontent,tvchunksbelowcontent', 'docadmin');
    mm_widget_showimagetvs(); // Always give a preview of Image TVs
    
    // For everyone except administrators
    
    mm_hideFields('alias,description,link_attributes,is_richtext,log,searchable,cacheable,longtitle,clear_cache,parent', '!1');
    mm_moveFieldsToTab('published,pub_date,unpub_date', 'pubdates','!1');
    mm_hideTabs('settings,meta,docadmin,preview',!1');
    
    // ------------------------ END OF RULES --------------------
    
    ?>
      www.terrybarthdesign.com
      • 30223
      • 1,010 Posts
      Looking through .../managermanager/functions/tabs.inc.php it seems you can only hide the standard ’general’, ’settings’, ’meta’ & ’preview’ tabs. MM relies on knowing in what order the tabs are initialized (ie know their index).

      I can only think of 1 way of achieving this without seriously hacking into tabs.inc.php (that’s nto to say there are no more solutions, I juts can’t think of any smiley ) Use one of the existing tabs and rename it to ’Admin’, create a new tab for all the fields that are visible to everyone and do a lot of moving around of fields.You can than hide the existing tab.
        • 29525
        • 388 Posts
        TobyL

        Thank you for taking a look at this. Probably the easiest solution for me would be to simply hide those fields from that role. Having them on that tab isn’t that critical.

        Thanks again.

        Terry
          www.terrybarthdesign.com