We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 25307
    • 114 Posts
    Quote from: The at Jun 12, 2007, 06:18 PM

    As far as an update timeline, I’ve recently been told that 0.9.7 will obsolete this, so I’m going to wait a very short while to make sure I’m not fighting the future.

    In that case, I hope that only the method becomes obsolete - and not the functionality being achievable somehow. The ability to entirely customize manager elements beyond the core users/roles framework is something that I will undoubtedly use on almost every MODx project that I work on. Could you expand on "what you’ve been told?"
      • 25307
      • 114 Posts
      Would executing this plugin when a different system event fired work ok? For instance, say you want to hide/rename some elements of the Form in the Tools -> Configuration -> Site section of the Manager. Could you execute the plugin when OnSiteSettingsRender occurs? Thanks much.
        • 25307
        • 114 Posts
        Ok, so I got started using CustomizeManagerFields elsewhere in the Manager - and its kinda working. I’m at the point now where I’m limited by my novice level of DOM/JQuery knowledge. sad

        I’m running the plugin the plugin when OnSiteSettingsRender is triggered, that much is cool - works as it should. So to test let’s say I want to hide the Site Start row. So this line handles that.

            $output .= '
                <script type="text/javascript" charset="utf-8">
                    $(document).ready(function() {
        
        [b]                 $("input[@name=site_start]").parents("tr").hide();[/b]		
        


        Here’s where I’m stuck. I’m able to address that row fine and tell it to go away. But the ’comment’ line below it
        (that reads "Enter the ID of the document you want to use as homepage here. NOTE: make sure this ID you enter belongs to an existing document, and that it has been published!") is in the next table row.

        I’m not sure how to hide it without hacking up the core code of how that area of the Manager is output, can anybody help? Once I get started the rest is busy work, and who knows - I’ll probably feel a little less dumb. Thanks much.
          • 29635
          • 361 Posts
          Without digging too deep, it looks like you’re trying to use "parents()" to get a sibling of the (singular) parent.

          You’d probably want to do something like this:
          $("input[@name=site_start]").parent("tr").hide().next("tr").hide();
          

          Use the Firebug js console and get to know www.visualjquery.com (particularly the DOM traversing section). There’s also a really good cheat sheet (#2 here) that might help.

          Quote from: robot at Jun 14, 2007, 03:28 PM

          Could you expand on "what you’ve been told?"
          *Tons* of cool stuff coming: http://modxcms.com/roadmap.html
          I’ll very likely rebuild this plugin for 0.9.7, but it’ll probably be a complete rewrite to address new issues.
            Need MODx Ecommerce? Try FoxyCart!
            • 25307
            • 114 Posts
            Perfect, working great. Big thanx for the quick help.. And holy crackers that list of mods is nuts. I knew the framework has getting a remix, but didn’t realize how much of an overhaul is really gonna happen with 0.9.7.. Anyway, on all topics - appreciate the info/links. =]
            • It’s not a list of mods, it’s a complete rewrite from scratch. smiley
                Ryan Thrash, MODX Co-Founder
                Follow me on Twitter at @rthrash or catch my occasional unofficial thoughts at thrash.me
                • 25307
                • 114 Posts
                yeah, seriously. please excuse. maybe you should go from 0.9.6 straight to like version 7 point million zillion or something. you guys are doing a killer job with a great concept/product. any thought on approximate scope of your next phase?
                • It will likely go to eleven. tongue
                    Ryan Thrash, MODX Co-Founder
                    Follow me on Twitter at @rthrash or catch my occasional unofficial thoughts at thrash.me
                  • Quote from: Dimmy at Jun 08, 2007, 07:52 PM

                    I like to see an option to split up (make tabs) from the tv’s
                    I didn’t go the tabs route, but ’rearranged’ TV’s on the page - I moved some up to the tab fields and created another region on the page for another set. Here’s how I did that bit:
                    // Create a new field area
                     // Create containing div, insert before$("div:contains(\'Contact Details\')")
                    $(\'<div class="sectionHeader">Location Details (eg where the church meets)</div><div class="sectionBody tmplvars"><table id="locationdetails" style="position:relative" border="0" cellspacing="0" cellpadding="3" width="96%"></table></div></div>\').insertBefore($("div:contains(\'Contact Details\')"));
                    $("textarea[@name=tvDirectoryLocationAddress]").parents("tr").appendTo($("#locationdetails"));
                    $("input[@name=tvDirectoryLocationPostcode]").parents("tr").appendTo($("#locationdetails"));
                    $("input[@name=tvDirectoryLatitude]").parents("tr").appendTo($("#locationdetails"));
                    $("input[@name=tvDirectoryLongitude]").parents("tr").appendTo($("#locationdetails"));

                    There’s probably a better way than pasting in all the HTML like that, but it worked and I couldn’t find a better way smiley
                      MAPLEDESIGN MODX development and MODX web design and custom development. Proud to serve UK and International clients!
                      • 28676
                      • 136 Posts
                      I want to remove fields in the cms for an admin user, as I am the only one that is editing at the moment, do I change the role session to admin and the template to content page as that is my template? any help would be great


                      // Set variables
                      global $content;
                      $template = $content[’content page’];
                      $output = ’’;
                      $role = $_SESSION[’admin’];
                        I made my first site with modx
                        ------------------------
                        http://www.shop-bright.com | Uk shopping blog