We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 2762
    • 1,198 Posts
    I’m working on a website with a Userprofile Section that show all user Ditto post and allow to modify and add images to Ditto post with Maxigallery .
    then I need to add manage image buttons in the ditto post list.

    I’ve tried to use manage_target and manage_gallery together, but seems not work at the same time:

    if I use manager_target only - redirect to the right ’manage gallery’ page, but creates the gallery in the user profile page.
    [[MaxiGallery? &manage_target=`494` &manager_webgroups=`utenti registrati`]]


    if I use manager_target and manage_gallery at the same time: - creates the gallery in the right page (ditto post)., but display all buttons to manage images and don’t redirect to ’manage gallery’ page (494)
    [[MaxiGallery? &manage_target=`494` &manage_gallery=`[+id+]` &manager_webgroups=`utenti registrati`]]
      Free MODx Graphic resources and Templates www.tattoocms.it
      -----------------------------------------------------

      MODx IT  www.modx.it
      -----------------------------------------------------

      bubuna.com - Web & Multimedia Design
      • 7923
      • 4,213 Posts
      Yea, i havent thought that someone might use both parameters at the same time.. try this:

      change line 349 from:
      	if($_REQUEST['mode']=="admin" || $mgconfig['manage_gallery']!="") {  //if user is allowed to modify and has entered admin mode:


      to:
      	if($_REQUEST['mode']=="admin" || ($mgconfig['manage_gallery']!="" && $mgconfig['manage_target']=="")) {  //if user is allowed to modify and has entered admin mode:


      let me know if it works..


        "He can have a lollipop any time he wants to. That's what it means to be a programmer."
        • 2762
        • 1,198 Posts
        Thanks Doze
        Sorry but with both parameters still display all buttons to manage images and doesn’t redirect undecided
          Free MODx Graphic resources and Templates www.tattoocms.it
          -----------------------------------------------------

          MODx IT  www.modx.it
          -----------------------------------------------------

          bubuna.com - Web & Multimedia Design
          • 7923
          • 4,213 Posts
          could you pm me with site details and I’ll see what’s going on..


            "He can have a lollipop any time he wants to. That's what it means to be a programmer."
            • 2762
            • 1,198 Posts
            ..another strange issue:

            If you have 2 or more gallery in the same page, with manage buttons (like in a Ditto list), starting from the second post all buttons have missing label.
              Free MODx Graphic resources and Templates www.tattoocms.it
              -----------------------------------------------------

              MODx IT  www.modx.it
              -----------------------------------------------------

              bubuna.com - Web & Multimedia Design
              • 7923
              • 4,213 Posts
              Solved.. I made a mistake in the conditional above, it shouldnt check for &is_target parameter with &manage_gallery, it should check for &manage_target and &manage_gallery.. I edited my post above and it’s ok now..

              The text not appearing is caused by the language file being included using include_once.. I changed it to just normal include and so it will be included every time snippet is called.


                "He can have a lollipop any time he wants to. That's what it means to be a programmer."
                • 2762
                • 1,198 Posts
                Thank you very much Doze, works great wink
                  Free MODx Graphic resources and Templates www.tattoocms.it
                  -----------------------------------------------------

                  MODx IT  www.modx.it
                  -----------------------------------------------------

                  bubuna.com - Web & Multimedia Design