We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 21056
    • 327 Posts
    Quote from: totor at May 16, 2008, 01:51 PM

    That’s easy and ok ! smiley

    Thanks

    Great, I’ll include that in the next update.
      Author: ManagerManager plugin - customise your ModX manager interface

      Rckt - web development, Sheffield, UK
      • 29774
      • 386 Posts
      Firstly I’d like to say this is a brilliant plugin - thank you!

      I think I’ve found a bug - using the latest version (0.2.6) I am unable to hide or move any TV fields. Looking at the code I can’t see how the TVs are assigned to the mm_fields array in mm.inc.php. My quick and dirty solution is to simply add my tv fields to the end of the array manually, eg
      'tvfield' => array('fieldtype'=>'input', 'fieldname'=>'tvfield')


      A better solution would be to do a query to retreive the list of existing tvs and matching field type, and push them onto the mm_fields array.
        Snippets: GoogleMap | FileDetails | Related Plugin: SSL
        • 21056
        • 327 Posts
        Quote from: therebechips at May 19, 2008, 10:23 AM

        Firstly I’d like to say this is a brilliant plugin - thank you!

        I think I’ve found a bug - using the latest version (0.2.6) I am unable to hide or move any TV fields. Looking at the code I can’t see how the TVs are assigned to the mm_fields array in mm.inc.php. My quick and dirty solution is to simply add my tv fields to the end of the array manually, eg
        'tvfield' => array('fieldtype'=>'input', 'fieldname'=>'tvfield')


        A better solution would be to do a query to retreive the list of existing tvs and matching field type, and push them onto the mm_fields array.


        Are you prefixing your tv name with ’tv’?

        e.g. if your TV is called "myname", you should put mm_hideFields(’tvmyname’);

        This works here...
          Author: ManagerManager plugin - customise your ModX manager interface

          Rckt - web development, Sheffield, UK
          • 12736
          • 259 Posts
          Hello.
          I have a problem with MM last version run:

          Fatal error: Cannot redeclare mm_default() (previously declared in /var/www/virtual_client/joker/www/assets/plugins/managermanager/mm.inc.php:200) in /var/www/virtual_client/joker/www/assets/plugins/managermanager/mm.inc.php on line 231

          Please, help me fix it.
            • 21056
            • 327 Posts
            Quote from: ikarushka at May 19, 2008, 11:29 PM

            Hello.
            I have a problem with MM last version run:

            Fatal error: Cannot redeclare mm_default() (previously declared in /var/www/virtual_client/joker/www/assets/plugins/managermanager/mm.inc.php:200) in /var/www/virtual_client/joker/www/assets/plugins/managermanager/mm.inc.php on line 231

            Please, help me fix it.
            Are you sure you have the latest version 0.2.6 (both in /plugins folder AND defined in manager plugin setup)? There are only 201 lines in mm.inc.php in the latest version, so unsure how there could be an error on line 231?
              Author: ManagerManager plugin - customise your ModX manager interface

              Rckt - web development, Sheffield, UK
              • 12736
              • 259 Posts
              Oh! I’m sorry. Its my mistake. undecided I used version 0.2.4.1
              Thank you.
                • 29774
                • 386 Posts
                Are you prefixing your tv name with ’tv’?

                e.g. if your TV is called "myname", you should put mm_hideFields(’tvmyname’);

                This works here...

                Yes I did, but it doesn’t seem to work. I’ve tried just a single rule and no joy. My primary browser is Firefox 2.0.0.14 on a Mac. The thing is, I really can’t see in the code how this could work without adding the tv names to the mm_fields array.For example, in mm_functions.inc.php on line 213 (inside the mm_hideFields function) you have this default case defined which would seem to exclude any field not defined in the array.
                	// What type is this field?
                				if (isset($mm_fields[$field])) {
                					$fieldtype = $mm_fields[$field]['fieldtype'];
                					$fieldname = $mm_fields[$field]['fieldname'];
                				} else {
                					break;
                				}
                


                So the question is, when do the tvs get added to the array? What am I missing?
                  Snippets: GoogleMap | FileDetails | Related Plugin: SSL
                  • 21056
                  • 327 Posts
                  Quote from: therebechips at May 20, 2008, 04:16 AM

                  Are you prefixing your tv name with ’tv’?

                  e.g. if your TV is called "myname", you should put mm_hideFields(’tvmyname’);

                  This works here...

                  Yes I did, but it doesn’t seem to work. I’ve tried just a single rule and no joy. My primary browser is Firefox 2.0.0.14 on a Mac. The thing is, I really can’t see in the code how this could work without adding the tv names to the mm_fields array.For example, in mm_functions.inc.php on line 213 (inside the mm_hideFields function) you have this default case defined which would seem to exclude any field not defined in the array.
                  	// What type is this field?
                  				if (isset($mm_fields[$field])) {
                  					$fieldtype = $mm_fields[$field]['fieldtype'];
                  					$fieldname = $mm_fields[$field]['fieldname'];
                  				} else {
                  					break;
                  				}
                  


                  So the question is, when do the tvs get added to the array? What am I missing?

                  Ah - this was a deliberate decision -- mm_hideFields doesn’t allow you to hide TVs because that facility is already built into Modx, and I didn’t want to duplicate existing functionality.

                  To hide by template, don’t associate the TV with the template, and you can hide by document group for role based.

                  You should be able to move TVs though.
                    Author: ManagerManager plugin - customise your ModX manager interface

                    Rckt - web development, Sheffield, UK
                    • 29774
                    • 386 Posts
                    Ah yes, I see you can move TVs - excellent.

                    I think it would also be cool to be able to hide TVs for certain roles, since in the Manager you have to use document groups.
                      Snippets: GoogleMap | FileDetails | Related Plugin: SSL
                      • 21056
                      • 327 Posts
                      I’ve uploaded a new version to the repository (0.2.7), which hopefully addresses all the issues and requests that have been posted on this thread so far.


                      • New: You can now hide and rename sections of the doc editing page (the bits labelled "Access Permissions", "Document Settings" etc) (based on suggestion by Metaller, although implemented differently)
                      • New: You can now set a default value via mm_default for searchable (thanks stefan) and other page settings (container; rich text; log visit; published; cacheable; clear cache)
                      • New: Hide templates from the templates dropdown with mm_hideTemplates (thanks Metaller)
                      • New: Template variables can be hidden with mm_hideFields
                      • Bugfix: Fix bug with tag widget in IE6
                      • Bugfix: Fix bug with template names containing quotes
                      • Bugfix: Incorrectly define current template if templates changed in dropdown list and page is reloaded (thanks Metaller)
                      • Bugfix: Fix JS error with tag editor (thanks ProWebscape)

                      If I have missed any, or there are any further bugs or browser compatibility issues, please post them here!

                      Got some nice new features in the pipeline, and it would be good to get any lingering problems solved first.
                        Author: ManagerManager plugin - customise your ModX manager interface

                        Rckt - web development, Sheffield, UK

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