We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 24495
    • 407 Posts
    I think it’s possible to use both jQuery and Mootools with a noconflict option. MM uses jQuery and therefore I can’t use ContentHistory using Mootools. MM works but CH is hidden. Changing plugin order don’t solve this problem.

    Is it possible to get a MM version working together with a plugin using Mootools? I don’t know how to change MM to a noconflict mode.
      • 30223
      • 1,010 Posts
      You’ll need to hack mm.inc.php. You can try the following but as far as I understand for jQuery.noConflict() to work depends on when each library is executed. (see http://docs.jquery.com/Core/jQuery.noConflict) Try and see if it works

      Around line 216 replace these lines
      	// Create a mask to cover the page while the fields are being rearranged
      	echo '
      		<div id="loadingmask"> </div>
      		<script type="text/javascript">
      			$("#loadingmask").css( {width: "100%", height: $("body").height(), position: "absolute", zIndex: "1000", backgroundColor: "#ffffff"} );
      		</script>
      	';
      	break;
      

      with
      	// Create a mask to cover the page while the fields are being rearranged
      	echo '
      		jQuery.noConflict();
      		<div id="loadingmask"> </div>
      		<script type="text/javascript">
      			jQuery("#loadingmask").css( {width: "100%", height: $("body").height(), position: "absolute", zIndex: "1000", backgroundColor: "#ffffff"} );
      		</script>
      	';
      	break;
      


      And around line 245 replace
      $(document).ready(function() {
      

      With

      jQuery(document).ready(function($) {
      


      As far a I know these are the only places in MM where ’$’ is used outside the document.ready function.
        • 24495
        • 407 Posts
        Thanks for reply but it doesn’t work as expected.

        No deviant behavior but it doesn’t work together with ContentHistory. CH doesn’t show any buttons or lines.

        On the other hand I get a text "jQuery.noconflict" above the "Save / Delete / Cancel" buttons in edit mode of a document.


        Modified the code in positioning the noConflict function:
        // Create a mask to cover the page while the fields are being rearranged
        	echo '
        		<div id="loadingmask"> </div>
        		<script type="text/javascript">
        			jQuery.noConflict();
        			jQuery("#loadingmask").css( {width: "100%", height: $("body").height(), position: "absolute", zIndex: "1000", backgroundColor: "#ffffff"} );
        		</script>
        	';
        	break;
        instead of
        	// Create a mask to cover the page while the fields are being rearranged
        	echo '
        		jQuery.noConflict();
        		<div id="loadingmask"> </div>
        		<script type="text/javascript">
        			jQuery("#loadingmask").css( {width: "100%", height: $("body").height(), position: "absolute", zIndex: "1000", backgroundColor: "#ffffff"} );
        		</script>
        	';
        	break;
        and this is working!
        Doesn’t work. It shows the line for Content History but clicking "show" has no effect. Can’t see the history. Deactivating MM the CH plugin works as expected. Would be nice using both plugins together.
          • 30223
          • 1,010 Posts
          Modified the code in positioning the noConflict function:
          Oops,.. my mistake. I’d copied the code to my message without the noConflict and pasted it in separately,.. in the wrong place smiley

          Have you tried fiddling with the plugin order?
            • 24495
            • 407 Posts
            Changing plugin order doesn’t change anything in CH sad

            Must be a part in MM that "covers" ability to open the version list in CH. huh