We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 12684
    • 118 Posts
    I have brought this question to doze in hopes of figuring out this well known, obviously way too complicated, situation. He has asked me to post it here in hopes that some one with enough skill can work this out.

    We have 2 great snippets that need to work together, but some one forgot to include them as so.

    WLPE was abandoned and is in not so great shape so I have been working on trying to figure it out. I am not good at php though. The problem I am dealing with now is how to allow members to have more than 1 photo that has the behaviors like Maxigallery. e.g. lightbox, shadow.

    I have worked with WLPE in allowing more photos and I have nearly accomplished this, but not with the Maxigallery feautres. So therefore now I am looking into using Maxigallery and integrating it into WLPE. doze explains it as quoted below...

    Yes it’s possible, but needs a little custom snippet coding. You need to make a snippet/plugin what creates a gallery document for each web-user when they register an account (or do it manually). In that document, you need to have the maxigallery call what contains &admin_webusers parameter and the value for the parameter should be the username that is just created. So if WLPE has a way to tap in to the registration event with a plugin or custom callback snippet, you need to use that event and create the document with correct snippet call. You also need a (hidden & uneditable) field in the userprofile what contains the document id from the gallery document. The same snippet what creates the document needs to set it.

    Then in the WLPE profile edit template, you need to have a maxigallery call what uses &manage_gallery parameter and the value for that parameter is retrieved from the userprofile from the field that contains the gallery document id.

    So it’s not possible to set it up out-of-the-box, but you can make it happen.

    This really won’t work so well because you need to have a separate document for each user instead of having the gallery show up on their profile page.

    doze says..
    The gallery page needs to be a separate document as each gallery in maxigallery is bound to some document. Only one gallery per document is possible.

    But the managing part can be done in just a single document for all galleries, eg. the snippet call is put in the WLPE profile edit template like I said.

    I am trying everything I can but I really need the communities help on this one. I am sure plenty would agree that this would be a very useful feature.

    Is there any one who has had any luck with doing this?


    refer page....
    http://modxcms.com/forums/index.php/topic,27289.0.html
      • 12684
      • 118 Posts
      During my research I am understanding that there are a couple of ways to make this happen. And I am damn determined to figure it out. Even with all the resistance I have been experiencing. There are a lot of nubs like me that are learning and you would hope that the gurus would be more willing to help. It only makes sense as that is how new great ideas are realized. However, I digress my acrimony.

      I am going to make public my research in hopes that others will contribute. Because I am so not getting this.

      First idea = Project maxi-WLPE #1

      We will be using FDM or an original snippiet.

      First- original snippet would be
      GetUserName
      <?php return $_SESSION['webShortname']; ?>


      The snippet above is to call the users name. This will be either used in combination with a registration form or another form. Like a "Create your photo gallery" form.


      Then in the WLPE "User" page, after the WLPE call we put
      [!MaxiGallery? &display=`embedded` &admin_webusers=`[[GetUserName]]` 
      &embedtype=`slimbox` &pics_per_row=`3` &thumb_use_dropshadow=`1`!].

      *Spaced for easier reading

      I am confused about the next part, but what I understand is that you need to place this code in one of the empty spots on the "User" Create/edit document page.
      <input type="hidden" name="summary" value="[!getWebUsername!]">



        • 12684
        • 118 Posts
        Second idea = Project maxi-WLPE #2

        We create the same snippet above
        GetUserName
        <?php return $_SESSION['webShortname']; ?>


        We place this in the summary field in the Create/edit document of the "User" page of WLPE
        <input type="hidden" name="summary" value="[!GetUserName!]">


        We then install the getField snippet http://modxcms.com/getField-667.html

        We then install this call into the "User" page
         [!MaxiGallery? &display=`embedded` &admin_webusers=`[[getField? &field=`summary`]]` 
        &embedtype=`slimbox` &pics_per_row=`3` &thumb_use_dropshadow=`1`!]

        *Spaced for easier reading

        Let me know if I am even close. sad
          • 12684
          • 118 Posts
          Third idea = Project maxi-WLPE #3

          I am not sure if I understand this one very well but it would work with FDM or eForm so that Maxigallery is called while making a new document(gallery).

          However it involves using the following call
          <?php
          return '[[MaxiGallery? &display=`embedded` &embedtype=`lightboxv2` &pics_in_a_row=`3` 
          &max_thumb_size=`110` &max_pic_size=`400` &thumb_drop_shadow=`1` &manager_webusers=`'.$_SESSION['webShortname'].'`]]';
          ?>

          *spaced for better viewing

          Some one help out with this one please.
            • 4310
            • 2,310 Posts
            It might be worth looking at this thread.
            It seems to be along similar lines to what your looking for, User registers and gets their own pages, should be possible to embed a MaxiGallery call on one of the new pages.
              • 12684
              • 118 Posts
              bunk58,

              Thank you so much. It is really nice to see some one offering ideas. After reading that post I believe it may be a very good route to investigate. It has been proven to work. I have talked with rossco before and we are working on getting together.

              If any one else has some input, please let me know. This thread has tons of views, so where is everyone?