We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 4966
    • 143 Posts
    I am wanting to use SimpleViewer on the front end for images and MaxiGallery on the back for management. How do I go about this. I was wondering if I could add code to a page that would serve up SimpleViewer if I was not logged in as Manager and MaxiGallery if I was. Any help would be appreciated.

    charlie-imac
    in DC waiting the storm of the century
      • 4966
      • 143 Posts
      Anyone? If you have another suggestion on how to do this that would be great.

      charlie-imac
        • 26931
        • 2,314 Posts
        hi charlie-imac,

        found this approach: http://modxcms.com/forums/index.php?topic=43012.0 but i’m sure you could use MaxiGallery with a custom template to manage the images

        btw. why " serve different content based on role"
          • 9496
          • 113 Posts
          Are you trying to have two different types of gallery management? I would think that you’d be better off sticking with one. I don’t know that much about simple viewer, but maxigallery (as well as smoothgallery) do a great job of both management and display of image galleries.

          If you want to serve different content according to roles, then I would use a phx snippet like this (from the wiki)

          [+phx:mo=`myWebgroup`:then=`I’m a member`:else=`I’m NOT a member`+]

            • 4966
            • 143 Posts
            Thanks for the replies. I do have SimpleViewer working on the front end. I created a snippet to server either SimpleViewer or MaxiGallery but it does not work on the backend when I login as admin and select Preview I do not get the MaxiGallery. Here is my snippet:


            <?php
            if (!isset ($_SESSION[’mgrValidated’])) {
            $allowed = false;
            print ("not in admin mode ");
            header("Location: http:/localhost/judy/index.php?id=67");
            } else {
            print("in admin mode ");
            header("Location: http://localhost/judy/index.php?=54");
            }
            ?>

            Is there a easier way. Isn’t there a way to not show the MaxiGallery page to the web visitors and only show it to admin under preview? I’ve been reading about permissions but still don’t understand them enough to know if that would work.