We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 19164
    • 1,215 Posts
    Another widget that helps to create Maxigallery backend manager. This is a result of discussions here http://modxcms.com/forums/index.php/topic,28708.0.html

    Installation
    Copy mg_backend_manager folder to \assets\plugins\managermanager\widgets subfolder.


    Widget options
    mm_widget_mg_backend_manager($docid, $title , $roles, $templates)

    $docid: document ID with MG manager call [required]
    $title : title of the MG backend manager tab. Leave empty for default (Edit gallery)
    $roles: comma separated list of role IDs this should be applied to. Leave empty (or omit) for all roles [Optional - default is all]
    $templates: comma separated list of template IDs this should be applied to. Leave empty (or omit) for all templates [Optional - default is all]


    Step by step: How to create MG backend manager

    1. Install ManagerManager and this widget

    2. Create document, hide it from frontend users. Template - blank.: uncheck Cacheable
    [!MaxiGallery? &manage_gallery=`[[GetGalleryID]]` !]


    3. Create snippet GetGalleryID with this code

    <?php
    if (isset($_GET['mmgal_id']))
    {
    	$id = $_GET['mmgal_id'];
    	session_start();
    	$_SESSION['mmgal_id'] = $id;
    }
    else
    {
    	$id = $_SESSION['mmgal_id'];
    }
    return $id;
    ?>


    4. In MM rules add your rule (see widget options)
    mm_widget_mg_backend_manager(19);

    where 19 is an ID of the document created in 2nd step.

    5. Hide back_to_normal_view button in MG manageoutertpl.html template. It is not needed in the backend.

      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]
      • 4310
      • 2,310 Posts
      Nice one Metaller.
      I’ll definitely give this a try ASAP.
        • 13385
        • 18 Posts
        I have ManagerManager installed and working perfectly. I created a new tab in the top menubar/frame, to allow the end users a shortcut button for creating new pages. The button works fine if it passes a href like
        /manager/index.php?a=4
        which is pretty standard. I wanted to pass a little more information, including a specific parent(selected form a radio list inside a popup) and a template of my choosing. The expanded href looks something like this
        /manager/index.php?a=4&pid=7&newtemplate=4&published=1
        So, When I pass the top one, everything works fine, ManagerManager hides all the fields it is supposed to, but when I go for the gusto, and pass the second href, ManagerManager fails to hide any of the fields its supposed to. I have narrowed it down to being the "pid" (parentid). Without that, everything works fine. Problem is that I really need to pass the pid, it was the whole reason for creating this mess in the first place. If anyone has any thoughts here I would greatly appreciate them.
          Jad ~ www.benchmark-creative.com
          • 13385
          • 18 Posts
          Update
          If I add all of the templates to the mm_hidefields list, then ManagerManager does hide the correct fields no matter which href string I pass along. Another interesting point, MM still works fine if I apply the hidefields to only the template I am interested in, and then access it via the edit button.
          Can not seem to find the answer to this, hope someone can help.
            Jad ~ www.benchmark-creative.com
            • 19164
            • 1,215 Posts
            It is very intersting idea for document creation shortcuts. But are other than pid and newtemplate parameters (published=1 in your example) parsed from url?
              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]
              • 13385
              • 18 Posts
              I don’t know exactly what your asking, but I’ll give try to provide some more information. /manager/index.php?a=4 is what is passed to create a new document( and that seems to work fine. I works no matter what, except when I add the "pid=(anyvalidnumber)". I’m thinking it probably has more to do with the way the core of Modx handles things than MM, but I am still trying to find a work around. I do not think this is any more helpful, but i’ll keep playing with it, and post if I come up with any other relevant material, or hopefully a fix.
                Jad ~ www.benchmark-creative.com
                • 13385
                • 18 Posts
                Well, I seem to have figured some things out. I can make everything work as I want it to, when I disable the inheritParentTemplate plugin. While this is not exactly the way I would like to go about setting the template for a page, It should work fine to set the site wide default template to the one that I was building the quick links for. The parent selection is working great, and everything seems to be hidden perfectly. Also, if inheritparenttemplate is turned on, MM will work fine as long as the parent of the document being created has the same template as the one being applied.

                Metaller, I do believe that you can pass published as one of the url paramaters, along with template and pid. You may have to dig into the code, but I recall seeing $_REQUEST[’published’] somewhere... I think it was in manager/actions/mutate_content.dynamic.php or one of the action files used in creating new content. So, the finished process goes something like this. I added a new tab along the very top row of the manager, when clicked it calls a new actions php file, which presents a set of radio options to the user, asking them to select a section to put the new document in, after their selection is validated, it calls mutate_content.dynamic.php, and passes all of the relevant values to it in the url. At that point, with a majority of the input options hidden by MM the user quickly fills in the 10 fields that are needed, and clicks save. I don’t have to worry about them putting things in the wrong sections, or messing up and of the "little stuff". Maybe I’ll post a step by step in the wiki.
                  Jad ~ www.benchmark-creative.com
                  • 19164
                  • 1,215 Posts
                  @jad889nb Thanks for your reply, seems that your understand me with my bad English. But i thought that you can pass published parameter without core hacking.
                    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]
                    • 7231
                    • 4,205 Posts
                    My guess is that when passing the pid var it is causing the manager to think that it is in one place while actually in another (MM is not hiding the fields since it thinks that it is in another document). Can you use another var other than pid, like mypid?
                      [font=Verdana]Shane Sponagle | [wiki] Snippet Call Anatomy | MODx Developer Blog | [nettuts] Working With a Content Management Framework: MODx

                      Something is happening here, but you don&#39;t know what it is.
                      Do you, Mr. Jones? - [bob dylan]
                      • 25883
                      • 128 Posts
                      What would be causing this type of error when editing a document?

                      I do use PHx also and I wonder if there’s a conflict.




                      ManagerManager - OnDocFormPrerender
                      An error occurred while loading. Please see the event log for more information.

                      Parse error: syntax error, unexpected T_STRING in /home/mm/public_html/manager/includes/document.parser.class.inc.php(745) : eval()’d code on line 4



                      --------------------------------------------------------------------------------

                      ManagerManager - OnDocFormRender
                      An error occurred while loading. Please see the event log for more information.

                      Parse error: syntax error, unexpected T_STRING in /home/mm/public_html/manager/includes/document.parser.class.inc.php(745) : eval()’d code on line 4


                      --------------------------------------------------------------------------------