We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 7923
    • 4,213 Posts
    Hmm.. that change should have such effect.. When you hit manage pictures button, which document id it is using to manage the gallery / galleries?


      "He can have a lollipop any time he wants to. That's what it means to be a programmer."
      • 2912
      • 315 Posts
      A button instead of a hyperlink would take a little more code but can be done.

      When a user first logs in a new document is created in your specified folder ($gallery in the snippet NewGallery).

      The alias name is automatically derived from the username and co-ordinated with the hyperlink after successful log in. The hyperlink should take them directly to their individual user gallery page and display Manage User.

      You can do a few checks to see if things are working as they should.

      Check if a new document exists in your gallery root folder (remember $gallery parameter in NewGallery Snippet).
      If new documents have been created open one and see if the TemplateVariable has populated.

      If you wish to pm a link to your site I’ll spend a little time and see if I can think whats going wrong. If you are happy I could always have a look in the manager too.

      Thanks for the code Change Doze. I’ll make the adjustments and see what happens smiley
        BBloke
        • 2912
        • 315 Posts
        Quote from: doze at Jan 04, 2010, 06:55 PM

        For the case sensitive usernames, add this function to maxigallery class file:
        <?php
            function in_arrayi( $needle, $haystack ) {
                $found = false;
                foreach( $haystack as $value ) {
                    if( strtolower( $value ) == strtolower( $needle ) ) {
                        $found = true;
                    }
                }   
                return $found;
            }
        


        And then in the checkPermissions function, change in_array to in_arrayi when it’s checking for manager_webusers and admin_webusers.

        Thanks doze. I had to change in_array to $this->in_arrayi to prevent it from breaking but it does exactly whats needed.
          BBloke
          • 10076
          • 1,024 Posts
          Hi,

          Quote from: doze at Jan 05, 2010, 05:43 AM

          Hmm.. that change should have such effect.. When you hit manage pictures button, which document id it is using to manage the gallery / galleries?

          EditThere is no button, but just a link "your gallery is ready". The word "gallery" links to the parent folder (47).

          In the site all images are stored in folder "root/asstets/galleries/1". In the modx tree resources are beeig created. I use this caal in the parent resource (TV)
          @INHERIT [!MaxiGallery? &lang=`nl` &admin_webusers=`[*WebUserOwner*]` &manager_webusers=`[*WebUserOwner*]` &manage_gallery=`1` &upload_field_count=`5` &manager_webgroups=`customers` &keep_bigimg=`1` &disable_js_libs=`1`!]
            • 7923
            • 4,213 Posts
            Well.. &manage_gallery=`1` parameter means that MaxiGallery will open up the picture management for document id 1. You don’t want that. If the snippet call is already on the correct document, just delete that parameter.

            Also, are you sure about the &manager_webgroups=`customers` parameter? It means that all web users from customers usergroup can edit the gallery, not just the user defined in &manager_webusers=`[*WebUserOwner*]`.

            And you don’t need both &admin_webusers and &manager_webusers, the parameters behave differently. Just use the one you need.

            Check the parameters and their meanings from MaxiGallery wiki page.


              "He can have a lollipop any time he wants to. That's what it means to be a programmer."