We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 8643
    • 271 Posts
    Please test!

    Сhanged syntax for template variables names.
    You need to change the names of template variables in your MM rules.
    It must be template variable IDs, prefixed by ’tv’.


    //mm_widget_showimagetvs('tv4');
    mm_widget_tags('tv3');// Adds the tag editing widget to the TV with ID=3
    mm_widget_colors('tv5');// Adds the color picker widget to the TV with ID=5 
    
    mm_createTab('Categories', 'mycats');
    mm_moveFieldsToTab('tv3', 'mycats');//move TV with ID=3 to tab 'mycats'
    mm_hideFields('tv6');//hide TV  with ID=6
    mm_renameField('tv3', 'myTags');
    mm_changeFieldHelp('tv3', 'Field Help bla bla bla', '1');
    mm_synch_fields('pagetitle,menutitle,tv6'); // Make the contents of these three fields always equal for all users and all documents 
    


    Solved conflikts with plugins "Image TV Preview" and "ContentHistory".jQuery now work in no-conflict mode.

    mm_renameSection('history', 'История изменений документа');
    mm_hideSections('history', '', '6'); 


    Instructions:
    Replace original files in assets/plugins to these from archive
    • Thank you elastic. One of the items we wanted checked off prior to launching 1.0
        Ryan Thrash, MODX Co-Founder
        Follow me on Twitter at @rthrash or catch my occasional unofficial thoughts at thrash.me
        • 30223
        • 1,010 Posts
        Great to see this working in evo... sort of anyway.
        I’m having a few problems.. Firstly I didn’t see an extra "Roles & templates" tab in the edit plugin pane. Turns out there’s a typo in mm.inc.php on line 179. the $ is not escaped and so $j is parsed as a php variable instead of being printed as is.
        //<?php
        $output .= "var $j = jQuery.noConflict(); \n"; //produces var  = jQuery.noConflict();
        

        should be
        //<?php
        $output .= "var \$j = jQuery.noConflict(); \n"; //produces var  $j = jQuery.noConflict();
        


        The second problem I’m experiencing is when editing a document. All I get is the error message: "ManagerManager: An error has occurred: undefined - undefined". I have disabled the "Image TV Preview" plugin and for testing I only have one rule in mm_rules.inc.php: mm_hideFields(’link_attributes’); . I’m using the local assets/js/jquery-1.3.2.min.js file.

        Here’s the ManagerManager output copied from the page source.
        <!-- ManagerManager Plugin :: 0.3.2 -->
        <!-- This document is using template: 3 -->
        <!-- You are logged into the following role: 1 -->
        
        <script type="text/javascript" charset="UTF-8">
        var $j = jQuery.noConflict();
        
        mm_lastTab = "tabGeneral";
        mm_sync_field_count = 0;
        synch_field = new Array();
        
        $j(document).ready(function() {
        
        	// Lets handle errors nicely...
        	try {
        
        		// Give IDs to the sections of the form
        		// This assumes they appear in a certain order
        		//$j("div.sectionHeader:eq(0)").attr("id", "sectionDocSettingsHeader");
        		$j("div.sectionHeader:eq(0)").attr("id", "sectionContentHeader");
        		$j("div.sectionHeader:eq(1)").attr("id", "sectionTVsHeader");
        		$j("div.sectionHeader:eq(2)").attr("id", "sectionAccessHeader");
        
        		$j("div.sectionBody:eq(0)").attr("id", "sectionDocSettingsBody");
        		$j("div.sectionBody:eq(1)").attr("id", "sectionContentBody");
        		$j("div.sectionBody:eq(2)").attr("id", "sectionTVsBody");
        		$j("div.sectionBody:eq(3)").attr("id", "sectionAccessBody");
        			// Getting rules from file: D:/www/evolution/assets/plugins/managermanager/mm_rules.inc.php 
        
         // ----------- Hide fields -------------- 
        $j("input[@name=link_attributes]").parents("tr").hide(); 
        
        
        		// Misc tidying up
        
        		// General tab table container is too narrow for receiving TVs -- make it a bit wider
        		$j("div#tabGeneral table").attr("width", "550");
        
        		// if template variables containers are empty, remove their section
        		if ($j("div.tmplvars :input").length == 0) {
        			$j("div.tmplvars").hide();	// Still contains an empty table and some dividers
        			$j("#sectionTVsHeader").hide();
        		}
        
        	} catch (e) {
        		// If theres an error, fail nicely
        		alert("ManagerManager: An error has occurred: " + e.name + " - " + e.message);
        
        	} finally {
        
        		// Whatever happens, hide the loading mask
        		$j("#loadingmask").hide();
        	}
        });
        </script>
        <!-- ManagerManager Plugin :: End -->
        

        Hope this helps...
          • 31178
          • 128 Posts
          The second problem I’m experiencing is when editing a document. All I get is the error message: "ManagerManager: An error has occurred: undefined - undefined". I have disabled the "Image TV Preview" plugin and for testing I only have one rule in mm_rules.inc.php: mm_hideFields(’link_attributes’); . I’m using the local assets/js/jquery-1.3.2.min.js file.
          I have it working with jQuery 1.2.6. I think there is a compatibility issue with MM and jQuery 1.3.2 it has come up before with MODx 0.9.6.3 too:

          Quote from: ChuckTrukk at Jan 14, 2009, 10:54 PM

          jquery1.3 doesnt work with it. Need to use 1.2.6 or 1.2.3
            • 30223
            • 1,010 Posts
            Well, that’s a big no no for me then because jQuery 1.3.2 is the version that comes with the modx evolution (RC-2) distribution. I certainly wouldn’t want to maintain multiple version of jQuery in the one manager.
            • MM needs to be updated indeed.
                Ryan Thrash, MODX Co-Founder
                Follow me on Twitter at @rthrash or catch my occasional unofficial thoughts at thrash.me
                • 8643
                • 271 Posts
                Quote from: TobyL at Jul 24, 2009, 04:17 PM

                I’m having a few problems.. Firstly I didn’t see an extra "Roles & templates" tab in the edit plugin pane. Turns out there’s a typo in mm.inc.php on line 179. the $ is not escaped and so $j is parsed as a php variable instead of being printed as is.
                Fixed.
                Quote from: TobyL at Jul 24, 2009, 04:17 PM

                The second problem I’m experiencing is when editing a document. All I get is the error message: "ManagerManager: An error has occurred: undefined - undefined". I have disabled the "Image TV Preview" plugin and for testing I only have one rule in mm_rules.inc.php: mm_hideFields(’link_attributes’); . I’m using the local assets/js/jquery-1.3.2.min.js file.
                Fixed. jQuery sintax changed. Now by default MM uses http://ajax.googleapis.com/ajax/libs/jquery/1.3.2/jquery.min.js

                Download fixed version from the first post.
                  • 21056
                  • 327 Posts
                  Thanks for your work on this - I have been so busy I haven’t been able to look at modifying for 1.0.

                  One thing I would like to solve before release would be to try and ensure that the MM rules don’t have to be changed to add ’tv’ to them. My original intention was for MM to behave as an API/abstraction layer, regardless of whether the underlying terminology was a tv, or a standard field, or whatever. I believe I fixed this originally, so perhaps it could be fixed again??

                  I think it might be good if I was to share my current (mental) road map of where I see MM going:

                  0.4 - compatibility with Evo 1.0
                  0.5 - change of syntax to make code / setting rules more object oriented, easier to read, and easier to interface with a GUI in the future e.g.

                  $news = new mmRuleset();
                  $news->addTemplate(2);
                  $news->addRole(3);
                  $news->hideTab(’preview’);

                  0.6 - add GUI for rule creation
                    Author: ManagerManager plugin - customise your ModX manager interface

                    Rckt - web development, Sheffield, UK
                  • I’ve installed the version of ManagerManager in this thread but even before I’ve made any definitions I’m getting the following errors in the Manager when editing a page:

                    Warning: implode() [function.implode]: Invalid arguments passed in /domain/public_html/assets/plugins/managermanager/functions/utilities.inc.php on line 127
                    \n \n
                     
                    \n \n '; var boxHtml = new MooPrompt('System Alert', sysAlert, { buttons: 1, button1: 'Ok', width: 500 }); }); 
                      • 11186
                      • 38 Posts
                      0.3.2.1 works, but only moves most of the tvs to their tabs.

                      The version from the forum here gives a type error popup, no tvs are moved, and I get the implode error cited above at the bottom of the page.

                      All in Evo 1.0.0


                      Ok, I got it to work finally.

                      Pointed the js url to the local copy of jquery that came with Evo 1.0.0 and the implode errors mentioned above went away.

                      Still seems a bit screwy, but it works (version downloaded from the first post).

                      It’s very particular about the order in which rules are made. In some instances it would display the wrong field in the wrong tab, not move the field to the tab it was assigned to, or not display certain fields altogether.

                      After much rearranging I’ve finally gotten to a combination that works, although on one of the templates the ’Template Variable’ section heading doesn’t display when editing (although it is present in the output). I have no idea why. It does share two tabs with another template.

                      On another note I’m using maxigallery backend manager with managermanager. When I add the widget:

                      mm_widget_mg_backend_manager('4','Gallery','','8');


                      I get a popup with this error when editing a document:

                      ManagerManager: An error has occurred: TypeError - $("iframe") is null


                      Although the gallery works after I OK it and move on. If I remove the widget the error doesn’t appear. I’ve looked around in the forum for this issue to no avail. Any ideas?