On March 26, 2019 we launched new MODX Forums. Please join us at the new MODX Community Forums.
Subscribe: RSS
  • Quote from: ncrossland at Nov 12, 2008, 09:03 AM

    If you view the source of the Manager (bottom right frame) do you see the following comments:

    <!-- ManagerManager Plugin :: 0.3.2 -->
    

    which indicate the plugin is working (and what version)?

    Are you using a chunk, or file for your rules? Can you paste the contents here?

    When I view the source of the Managers’ lower right frame I see the following:

    <!-- ManagerManager Plugin :: 0.3.2 -->
    <!-- This document is using template: 5 -->
    <!-- You are logged into the following role: 1 -->
    


    I have also attached a screenshot of what the editor looks like.

    I do have my rules set up in a chunk for the time being (will move them to a file once I set up everything as needed.) The content of my chunk is:

    // 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('introtext','Summary');
    mm_changeFieldHelp('alias', 'The URL that will be used to reach this story. Only numbers, letters and hyphens can be used');
    mm_widget_showimagetvs(); // Always give a preview of Image TVs
    
    // For everyone except administrators
    mm_hideFields('link_attributes', '!1');
    //mm_moveFieldsToTab('tvcolour', 'general');

    • Quote from: betoranaldi at Nov 12, 2008, 04:19 PM


      I do have my rules set up in a chunk for the time being (will move them to a file once I set up everything as needed.) The content of my chunk is:


      In the plugin text, have you set $config_chunk to the name of your chunk?
        Author: ManagerManager plugin - customise your ModX manager interface

        Rckt - web development, Sheffield, UK
      • Quote from: ncrossland at Nov 12, 2008, 04:22 PM

        In the plugin text, have you set $config_chunk to the name of your chunk?

        Yes, I named it as suggested ’mm_rules’

        $config_chunk = 'mm_rules';


        I also tried to leave the plugin with all default values and still had no result (should default to the example file)

        I have the following plugins installed.

        # Bottom Button Bar
        # Forgot Manager Login
        # Google Analytics
        # ManagerManager
        # QuickEdit
        # Search Highlighting (disabled)
        # TinyMCE

        I read somewhere in this thread that it doesn’t play nice with mootools. I noticed in the same frame that has the ManagerManager comments, it does call in the mootools.js file. Could that be interfering with it? I think that it is used by the manager itself.
        • Quote from: betoranaldi at Nov 12, 2008, 04:19 PM

          <!-- ManagerManager Plugin :: 0.3.2 -->
          <!-- This document is using template: 5 -->
          <!-- You are logged into the following role: 1 -->
          

          Anything after this?
            Author: ManagerManager plugin - customise your ModX manager interface

            Rckt - web development, Sheffield, UK
          • Quote from: ncrossland at Nov 12, 2008, 04:43 PM

            Anything after this?

            Yes, I have also included a few lines before and after.

            <input type="submit" name="save" style="display:none" />
            <div class="subTitle" style="width:100%">
            	<span class="right"><img src="media/style/MODxLight/images/_tx_.gif" width="1" height="5" /><br />"<a href='javascript:scroll(0,0);'>Scroll up</a>"</span>
            
            	<table cellpadding="0" cellspacing="0" class="actionButtons">
            		<tr>
            			<td id="Button1__"><a href="#" onclick="documentDirty=false; document.mutate.save.click();"><img src="media/style/MODxLight/images/icons/save.gif" align="absmiddle" /> Save</a></td>
            			<td id="Button2__"><a href="#" onclick="deletedocument();"><img src="media/style/MODxLight/images/icons/delete.gif" align="absmiddle" /> Delete</span></a></td>
            
            							<td id="Button5__"><a href="index.php?a=3&id=4"><img src="media/style/MODxLight/images/icons/cancel.gif" align="absmiddle" /> Cancel</a></td>
            		</tr>
            	</table>
            </div>
            
            <!-- ManagerManager Plugin :: 0.3.2 -->
            <!-- This document is using template: 5 -->
            <!-- You are logged into the following role: 1 -->
            		
            <script type="text/javascript" charset="UTF-8">
            		
            mm_lastTab = "tabGeneral"; 
            mm_sync_field_count = 0;
            synch_field = new Array();
            
            $(document).ready(function() {
            	
            	// Lets handle errors nicely...
            	try {
            						   					
            		// Give IDs to the sections of the form
            		// This assumes they appear in a certain order
            		$("div.sectionHeader:eq(0)").attr("id", "sectionDocSettingsHeader");
            		$("div.sectionHeader:eq(1)").attr("id", "sectionContentHeader");
            		$("div.sectionHeader:eq(2)").attr("id", "sectionTVsHeader");
            		$("div.sectionHeader:eq(3)").attr("id", "sectionAccessHeader");
            		
            		$("div.sectionBody:eq(0)").attr("id", "sectionDocSettingsBody");
            		$("div.sectionBody:eq(1)").attr("id", "sectionContentBody");
            		$("div.sectionBody:eq(2)").attr("id", "sectionTVsBody");
            		$("div.sectionBody:eq(3)").attr("id", "sectionAccessBody");								   
            			// Getting rules from chunk: mm_rules 
            
             // ----------- Rename field -------------- 
            $("textarea[@name=introtext]").parents("td").prev("td").children("span.warning").empty().prepend("Summary");
             // ----------- Change field help -------------- 
            $("input[@name=alias]").siblings("img[@style:contains('cursor:help')]").attr("alt", "The URL that will be used to reach this story. Only numbers, letters and hyphens can be used"); 
            // ---------------- mm_widget_showimagetvs: Add image preview ------------- 
            
            			// Adding preview for section-image
            			$("#tvsection-image").bind( "change load", function() {
            				
            				// Get the new URL
            				$(this).addClass("imageField");
            				var url = $(this).val();
            				url = (url != "" && url.search(/http:\/\//i) == -1) ? ("http://76.12.186.195/" + url) : url;
            				
            					
            				// Remove the old preview
            				$("#section-imagePreviewContainer").remove();
            				
            				if (url != "") {
            					// Create a new preview
            					$("#tvsection-image").parents("td").append("<div class=\"tvimage\" id=\"section-imagePreviewContainer\"><img src=\""+url+"\" style=\""+'max-width:300px; max-height:100px; margin: 4px 0; cursor: pointer;'+"\" id=\"section-imagePreview\"/></div>");	
            					
            					// Attach a browse event to the picture, so it can trigger too
            					$("#section-imagePreview").click( function() {
            														BrowseServer("tvsection-image");		 
            																 });
            				}
            				
            			}).trigger("load"); // Trigger a change event on load
            	
            			
            			
            		
            			// If we have imageTVs on this page, modify the SetUrl function so it triggers a "change" event on the URL field
            			if (typeof(SetUrl) != "undefined") {
            				OriginalSetUrl = SetUrl; // Copy the existing Image browser SetUrl function						
            				SetUrl = function(url, width, height, alt) {	// Redefine it to also tell the preview to update
            					OriginalSetUrl(url, width, height, alt);
            					$(".imageField").trigger("change");
            				}
            			}
            		
            	
            	
            		// Misc tidying up
            		
            		// General tab table container is too narrow for receiving TVs -- make it a bit wider
            		$("div#tabGeneral table").attr("width", "550");
            		
            		// if template variables containers are empty, remove their section
            		if ($("div.tmplvars :input").length == 0) {
            			$("div.tmplvars").hide();	// Still contains an empty table and some dividers
            			$("#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
            		$("#loadingmask").hide();
            	}
            });
            </script>
            <!-- ManagerManager Plugin :: End -->
            
            		</form>
            
            <script type="text/javascript">//setTimeout('showParameters()',10);</script>
            <script language="javascript" type="text/javascript" src="/assets/plugins/tinymce3101/jscripts/tiny_mce/tiny_mce.js"></script>
            <script language="javascript" type="text/javascript" src="/assets/plugins/tinymce3101/xconfig.js"></script>
            <script language="javascript" type="text/javascript">
            
            • Quote from: betoranaldi at Nov 12, 2008, 04:48 PM

              Yes, I have also included a few lines before and after.
              Well that’s all the MM code I’d expect to see there. Are you getting any javascript errors? What browser are you using? Have you tried in other browsers? What version of ModX?

              None of the other plugins you have installed are anything unusual, so I wouldn’t expect them to interfere>
                Author: ManagerManager plugin - customise your ModX manager interface

                Rckt - web development, Sheffield, UK
              • Quote from: ncrossland at Nov 12, 2008, 04:53 PM

                What browser are you using? Have you tried in other browsers? What version of ModX?

                IE6, FF3 and Safari 3
                Modx 0.9.6.2

                FF displays these errors:

                Error: $("div#" + mm_lastTab) is null
                Source File: http://domain.com/manager/index.php?id=9&a=102
                Line: 449


                Error: $(document).ready is not a function
                Source File: http://domain.com/manager/index.php?id=4&a=27
                Line: 742


                IE6 displays two errors:

                Line:429
                Char: 4
                Error: 'null' is null or not an object
                Line from file: $("#loadingmask").css( {width: "100%", height: $("body").height(), position: "absolute", zIndex: "1000", backgroundColor: "#ffffff"} ); 


                This one appears in the ManagerManager plugin part of the code...

                Line:742
                Char: 1
                Error: Object doesn't support this property or method
                Line from file: $(document).ready(function() {



                --EDIT--

                I just wiped my rules chunk and put in two new rules and it started to work. Don’t know why but thank you for your time and effort in helping me with this problem. Much appreciated.
                • I found an error in MM version 0.3.2, widget accessdenied.php. It works but when i try to close some documents, js-error appears.

                  I think that is becouse widget removes all frame content with this code

                  $("input, div, form[@name=mutate]").remove(); // Remove all content from the page

                  but other rules trying to operate with this removed content.
                    DirectResize 0.9 beta. PHPThumb, sets of configurations, configuration, binded to specific path. No backward compatibility. | DirectResize 0.9. PHPThumb, наборы параметров, параметры, привязанные к определенным путям. Без обратной совместимости.

                    Unfortunately, DirectResize project is closed. If you want to continue development, PM me for access to project page on Google Code. К сожалению, проект DirectResize закрыт. Если вы желаете продолжить разработки, обращайтесь через ПМ для получения доступа к репозиторию на Google Code.

                    [PLUGIN] DirectResize - as Maxigallery but for single images :: Download :: [url=http://modxcms.com/forums/index.php/topic,21490]
                  • Quote from: Metaller at Nov 18, 2008, 10:07 AM

                    I found an error in MM version 0.3.2, widget accessdenied.php. It works but when i try to close some documents, js-error appears.

                    I think that is becouse widget removes all frame content with this code

                    $("input, div, form[@name=mutate]").remove(); // Remove all content from the page

                    but other rules trying to operate with this removed content.

                    ah, good point. It should stop processing any more rules at that point.
                      Author: ManagerManager plugin - customise your ModX manager interface

                      Rckt - web development, Sheffield, UK
                    • Quick question.

                      I would really like to have only one document ID use a certain set of MM settings.
                      It would make it easier for my customers if they can only see the exact fields they need, and nothing else.

                      As it is now I need to make a template for each and every docID I need to style with MM, and that creates alot of duplicated templates.
                      If I need to change a template, then I have alot of work to do.

                      Or is there any other way to accomplish this?

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