We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 16610
    • 634 Posts
    Quote from: Mar at Aug 13, 2009, 02:08 AM

    I’m trying to build a website where a privileged user is able to create new documents, but not sub-childs (restricting creation to level 1 in the crude illustration below). It seems as if QM+ overrules the ’container’ property of the parent document and activates it if I try to create a document at any Level 2 node.

    I’m afraid this is not possible (now). QM+ only checks that if user can edit Level 1 document the user can also make a new sub-document under it.

    Maybe you could get around this by disabling general "Show add document here button". Instead of that you could make a custom add button, e.g. ’New root document’,’new’,’0’,’3’,’’. Look more instructions at QM+ / readme.html.
      Mikko Lammi, Owner at Maagit
      • 16610
      • 634 Posts
      Quote from: AspenDew at Aug 13, 2009, 02:37 AM

      I’ve noticed a couple of posts in this thread regarding the QM interface. Just wondering if the idea in my post over in the Evo discussion has any merit? (Regarding placement of the Cancel & Delete buttons)

      http://modxcms.com/forums/index.php/topic,38613.msg232927.html#msg232927

      Yes, this is actually linked to a larger problem that affects also changing template and many other things. The problem is that I haven’t figured out a way to detect if the user is editing a document in manager or in QM+. Refreshing the document removes the "quickmanager=true" parameter from URL. I have tried to circumvent the problem with PHPs $_SERVER[’REQUEST_URI’] and $_SERVER[’HTTP_REFERER’] variables. But these won’t help if user makes more than one change in QM+ that requires refreshing the document, such as changing the template or RTE.

      If anyone has an idea how to detect parent frame in PHP or how get the "quickmanager=true" parameter to stay in URL after refreshing document let me know.
        Mikko Lammi, Owner at Maagit
        • 18206
        • 59 Posts
        Hello again! laugh

        I found that the logout code wasn’t alias-friendly, so I took the liberty of changing row 401 of qm.inc.php from
        $this->modx->sendRedirect($this->modx->config['base_url'].'?id='.$_REQUEST['logoutid'] , 0, 'REDIRECT_HEADER', 'HTTP/1.1 301 Moved Permanently');
        

        to
        $this->modx->sendRedirect($this->modx->makeUrl($_REQUEST['logoutid']), 0, 'REDIRECT_HEADER', 'HTTP/1.1 301 Moved Permanently');
        


        that seems to work well. Feel free to use this in a future update if you like.
          • 16162
          • 14 Posts
          Hi, all.
          Am I alone who has problem with sub-directory qm styling?? Can’t find the solution. Qm links to "assets/plugins/qm/css/style.css" trying to find its stylesheet, that’s the reason it doesn’t work properly in sub-directories.


          Modx 1.0.0.0
          qm 1.3++

          --
          Best regards..
            • 28042 ☆ A M B ☆
            • 24,524 Posts
            I have several installations in subdirectories in my local development setup, and they all work just fine.
              Studying MODX in the desert - http://sottwell.com
              Tips and Tricks from the MODX Forums and Slack Channels - http://modxcookbook.com
              Join the Slack Community - http://modx.org
              • 16162
              • 14 Posts
              Hi..
              Thanks for your reply.
              What do you mean by saying ’I have several installations in subdirectories’?? I have one installation for my local project. Am i doing smth wrong??

              See the attachments. It’s my qm panel view (on russian):
              1 - I am on http://mydomain.com/Blogs.html
              2 - I am on http://mydomain.com/Blogs/12.html
                • 25663 MODX Staff
                • 12,272 Posts
                Quick update to make language selection a bit more robust and offer a level of fallback, in qm.inc.php near line 44 (from the Evo distro, anyway):

                        include_once($this->modx->config['base_path'].'manager/includes/lang/'.
                			(file_exists(MODX_MANAGER_PATH."includes/lang/".$manager_language.".inc.php") ? 
                			$this->modx->config['manager_language'] : 'english').'.inc.php');
                
                  Ryan Thrash, MODX Co-Founder
                  Follow me on Twitter at @rthrash or catch my occasional unofficial thoughts at thrash.me
                  • 28042 ☆ A M B ☆
                  • 24,524 Posts
                  What do you mean by saying ’I have several installations in subdirectories’??
                  On my MAMP installation, the web root is htdocs. In that directory I have several subdirectories, each one containing a distinct MODx installation. These are subject to change as I install various versions for various purposes. I usually have one or two older 0.9.6.x versions taken from a site I’m developing a snippet or module for and want the exact installation that the client is using, as well as one or two of the latest from SVN. I try to keep one pristine bleeding-edge installation that I keep updated from SVN and one likewise prisine installation of the latest "stable" release for reference when I check something for posting on the forums.
                    Studying MODX in the desert - http://sottwell.com
                    Tips and Tricks from the MODX Forums and Slack Channels - http://modxcookbook.com
                    Join the Slack Community - http://modx.org
                    • 28042 ☆ A M B ☆
                    • 24,524 Posts
                    The problem is that I haven’t figured out a way to detect if the user is editing a document in manager or in QM+.
                    Can’t you use one of the $_SERVER variables to determine if there’s a /manager/ in the request path? Or use a hidden field in the form and use POST?
                      Studying MODX in the desert - http://sottwell.com
                      Tips and Tricks from the MODX Forums and Slack Channels - http://modxcookbook.com
                      Join the Slack Community - http://modx.org
                      • 16610
                      • 634 Posts
                      Quote from: sottwell at Aug 18, 2009, 10:19 AM

                      Can’t you use one of the $_SERVER variables to determine if there’s a /manager/ in the request path? Or use a hidden field in the form and use POST?

                      $_SERVER variables work only once but not twice. After that it’s impossible to determine if we are editing document in manager or in QM+. QM+ uses the same frame for editing the document as manager so there is /manager/ in url in both cases.

                      Hidden form field could actually do it by injecting first the hidden field in edit documet page with OnDocFormPrerender event. I have to investigate this further how MODx manager is actually handling the template an RTE change. I dont’t know if manager handles nicely "unknown" form fields.

                      Thank you for the ideas!
                        Mikko Lammi, Owner at Maagit