We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 21056
    • 327 Posts
    Which version of ModX / ManagerManager are you using?
      Author: ManagerManager plugin - customise your ModX manager interface

      Rckt - web development, Sheffield, UK
      • 27749
      • 53 Posts
      Quote from: ncrossland at Jul 22, 2008, 11:01 AM

      Which version of ModX / ManagerManager are you using?

      modx 0.9.6.1p2
      managermanager 0.3

      I even tried now to let the rules come from file instead of a chunk. No change again sad
      I turned off directresize plugin and tinyMCE and still the problems remain.
        • 10487 MODX Staff
        • 1,535 Posts
        @smiley: Is your MODx install in a sub-directory?

        Looking at these two lines:
        $("head").append(' <script src="/assets/plugins/managermanager/widgets/tags/tags.js" type="text/javascript"></scr'+'ipt> '); 
        $("head").append(' <link href="/assets/plugins/managermanager/widgets/tags/tags.css" rel="stylesheet" type="text/css" /> '); 

        Wouldn’t the absolute links in these tags cause a few issues if the MODx install was in a sub-directory (hence the JS error)? Just thinking out loud, as I haven’t used ManagerManager before wink
          Garry Nutting
          Senior Developer
          MODX, LLC

          Email: [email protected]
          Twitter: @garryn
          Web: modx.com
          • 27749
          • 53 Posts

          Looking at these two lines:
          $("head").append(' <script src="/assets/plugins/managermanager/widgets/tags/tags.js" type="text/javascript"></scr'+'ipt> '); 
          $("head").append(' <link href="/assets/plugins/managermanager/widgets/tags/tags.css" rel="stylesheet" type="text/css" /> '); 

          Wouldn’t the absolute links in these tags cause a few issues if the MODx install was in a sub-directory (hence the JS error)? Just thinking out loud, as I haven’t used ManagerManager before wink

          Whohoo...! Of course it IS  wink and I was trying to change the paths whereever i could. But not in the tags.php file.
          The strange thing is - I can’t get the path relative.. except maybe adding a modx variable into the tags.php code. However - when it is hardcoded everything works just fine!

          Thank you very much ncrossland & garryn

          UPDATE:
          To make it work for a modx installataion in a subdirectory the lines:
          $("head").append(' <script src="/assets/plugins/managermanager/widgets/tags/tags.js" type="text/javascript"></scr'+'ipt> '); 
          $("head").append(' <link href="/assets/plugins/managermanager/widgets/tags/tags.css" rel="stylesheet" type="text/css" /> ');
          

          Needs to be changed into:
          $output .= includeJs(''. $modx->config['base_url'] .'assets/plugins/managermanager/widgets/tags/tags.js');
          $output .= includeCss(''. $modx->config['base_url'] .'assets/plugins/managermanager/widgets/tags/tags.css');
          

          Et voila! smiley
            • 21056
            • 327 Posts
            Quote from: smiley at Jul 22, 2008, 11:58 AM

            UPDATE:
            To make it work for a modx installataion in a subdirectory the lines:
            $("head").append(' <script src="/assets/plugins/managermanager/widgets/tags/tags.js" type="text/javascript"></scr'+'ipt> '); 
            $("head").append(' <link href="/assets/plugins/managermanager/widgets/tags/tags.css" rel="stylesheet" type="text/css" /> ');
            

            Needs to be changed into:
            $output .= includeJs(''. $modx->config['base_url'] .'assets/plugins/managermanager/widgets/tags/tags.js');
            $output .= includeCss(''. $modx->config['base_url'] .'assets/plugins/managermanager/widgets/tags/tags.css');
            

            Et voila! smiley
            Thanks - had forgotten that some people may use subdirs.

            I’ve fixed this in the next version, and also in the colours plugin, which does the same thing.
              Author: ManagerManager plugin - customise your ModX manager interface

              Rckt - web development, Sheffield, UK
              • 4456
              • 9 Posts
              Quote from: MarcelF at Aug 18, 2007, 12:21 PM

              I had the same JavaScript error like Metalle. The solution is to write the string in line.

              Just change this in "mm.inc.php" (line 605) :
              $empty_tab = '		
              <div class="tab-page" id="tab'.$id.'">
              	<h2 class="tab">'.$name.'</h2>
              	<div class="tabIntro" id="tab-intro-'.$id.'">'.$intro.'</div>
              	<table width="'.$width.'" border="0" cellspacing="0" cellpadding="0" id="table-'.$id.'">
              	</table>
              </div>
              ';
              


              to:

              $empty_tab = '<div class="tab-page" id="tab'.$id.'"><h2 class="tab">'.$name.'</h2><div class="tabIntro" id="tab-intro-'.$id.'">'.$intro.'</div><table width="'.$width.'" border="0" cellspacing="0" cellpadding="0" id="table-'.$id.'"></table></div>';
              


              Without any linebreaks!

              greez from Germany
              MarcelF
              I ran into this problem elsewhere a while ago, and the problem is the newline at the start of the (single) quoted string - you really only need to eliminate the initial newline, you can leave the rest.

              Terry
                • 27541
                • 29 Posts
                Hello & thank you for creating this plugin.
                I’ve got the latest releases of MODx and ManagerManager installed, and my rules are only partially working. I get new tabs as specified, but the hideSections and moveFieldsToTab don’t seem to be working as I’d thought -- All the same fields still appear on the General tab, and then all TVs (not just the specified ones) also appear on both the new tabs. Any way to solve this? Here’s the full set of rules:

                // Hide Content section for templates that do not use it
                mm_hideSections(’content’, ’’, ’1,2’);

                // Create new tabs to organize template variable editing
                $pageTabIntro = ’<p>This page uses a template that defines edit-able areas. Edit these here.</p>’;
                mm_createTab(’Page Content’, ’pageTVs’, ’’, ’’, $pageTabIntro);

                $sbTabIntro = ’<p>If you want custom sidebar text for this page only, edit sidebar content here. Note that the change will not be made on all pages -- for that, you must make edits in the Chunks section.</p>’;
                mm_createTab(’Sidebar Content’, ’sbTVs’, ’’, ’’, $sbTabIntro);

                // Move TVs to appropriate tabs
                $pageTVs = ’homeText, tagline, sidebarFirst, sidebarSecond, newsitem1, newsitem2, newsitem3’;
                mm_moveFieldsToTab($pageTVs, ’pageTVs’);

                $sidebarTVs = ’sbaCustomHead, sbaCustomText, sbaSocialHead, sbaSocialText, sbbCustomHead, sbbCustomText, sbbMerchHead, sbbMerchText, sbbXmasCDHead, sbbXmasCDText’;
                mm_moveFieldsToTab($sidebarTVs, ’sbTVs’);
                  • 21056
                  • 327 Posts
                  Quote from: skt at Aug 19, 2008, 10:26 AM

                  I’ve got the latest releases of MODx and ManagerManager installed, and my rules are only partially working. I get new tabs as specified, but the hideSections and moveFieldsToTab don’t seem to be working as I’d thought -- All the same fields still appear on the General tab, and then all TVs (not just the specified ones) also appear on both the new tabs. Any way to solve this?
                  Which version numbers of ModX / ManagerManager?

                  Can you do the following:
                  1) Edit a document which the hideSections and moveFieldsToTab should work for.
                  2) Right click in the document editing frame
                  3) View source
                  4) Locate where MM’s Javascript starts - denoted by <!-- ManagerManager Plugin :: Start -->
                  5) As each rule is executed, there is a JS comment. Are hideSections and moveFieldsToTab appearing in here?

                    Author: ManagerManager plugin - customise your ModX manager interface

                    Rckt - web development, Sheffield, UK
                    • 25483
                    • 741 Posts
                    Could I use ManagerManager for a "tag" field where I want to be able to select predefined tags and be able to input some new as I need some?
                      with regards,

                      Ronald Lokers
                      'Front-end developer' @ h2o Media

                      • 21056
                      • 327 Posts
                      Quote from: MediaGuy at Aug 20, 2008, 07:02 AM

                      Could I use ManagerManager for a "tag" field where I want to be able to select predefined tags and be able to input some new as I need some?
                      Yes - if you use the Tag widget, it will allow you to input new tags, or choose from previously entered ones.
                        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.