We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 3749
    • 24,544 Posts
    MaxiGallery is a fantastic addition to ModX. I was able to get it running almost exactly as I wanted with multiple photo galleries in about an hour.

    I still have one problem that I’m hoping to get some help with.

    I’ve set up a web user who can manage (and create new) multiple galleries.

    I created a Gallery folder and severl galleries under it. All works as it should and my web user can manage the photos in the gallery.

    I made an "Add New Photo Gallery" page that uses NewsPublisher to create a new gallery and uses $PostID to send the user to it. It works like a charm except that the new gallery has no photos in it. As a result, it doesn’t show a "manage photos" button so the web user can’t upload any photos.

    Is there any way around this?

    Bob
      Did I help you? Buy me a beer
      Get my Book: MODX:The Official Guide
      MODX info for everyone: http://bobsguides.com/modx.html
      My MODX Extras
      Bob's Guides is now hosted at A2 MODX Hosting
      • 3749
      • 24,544 Posts
      Doh!

      Wrong:
      [!NewsPublisher? &folder=`25` &canpost=`Photo Admins` &headertpl=’MyPhotoGalleryChunk’!]

      Right:
      [!NewsPublisher? &folder=`25` &canpost=`Photo Admins` &headertpl=MyPhotoGalleryChunk!]

      Using the first version put {{’MyPhotoGalleryChunk’}} in the new gallery document rather then the correct:
      {{MyPhotoGalleryChunk}}. It might be a useful modification of the core to make either one work since the first version above is what a lot of people would enter.

      BTW, it’s a tribute to the power and flexibility of ModX and the fabulous coders that produced the MaxiGallery and NewsPublisher snippets that I was able to use the unmodified snippets to set up way for a web user to create new photo galleries (complete with publish and unpublish dates) and populate them. It took about 20 minutes and I’m a ModX newbie.

      Bob the idiot



        Did I help you? Buy me a beer
        Get my Book: MODX:The Official Guide
        MODX info for everyone: http://bobsguides.com/modx.html
        My MODX Extras
        Bob's Guides is now hosted at A2 MODX Hosting
        • 5727
        • 160 Posts
        Nice, that had me troubled for a while!!!
          Olivier Deland
          Montreal, Canada - Web Developer
          • 28042 ☆ A M B ☆
          • 24,524 Posts
          Yes, always make sure you enclose your values with backticks `...` instead of single-quotes ’...’

          You can get away with no enclosing marks most of the time, but it’s better to use the backticks.
            Studying MODX in the desert - http://sottwell.com
            Tips and Tricks from the MODX Forums and Slack Channels - http://modxcookbook.com
            Join the Slack Community - http://modx.org
            • 3749
            • 24,544 Posts
            Quote from: sottwell at Apr 26, 2007, 11:44 PM

            Yes, always make sure you enclose your values with backticks `...` instead of single-quotes ’...’

            You can get away with no enclosing marks most of the time, but it’s better to use the backticks.

            I hesitate to disagree with the guru, but I discovered that the call wouldn’t work unless I LEFT OUT the backticks.

            Bob
              Did I help you? Buy me a beer
              Get my Book: MODX:The Official Guide
              MODX info for everyone: http://bobsguides.com/modx.html
              My MODX Extras
              Bob's Guides is now hosted at A2 MODX Hosting
              • 28042 ☆ A M B ☆
              • 24,524 Posts
              I’m no guru. If it works that way, then that’s the way it has to be done. And I’m certainly no MaxiGallery guru!
                Studying MODX in the desert - http://sottwell.com
                Tips and Tricks from the MODX Forums and Slack Channels - http://modxcookbook.com
                Join the Slack Community - http://modx.org
                • 3749
                • 24,544 Posts
                I’ve got to get more sleep before I post undecided

                Looking back at my second post in this thread, I realized that you were absolutely right. My code didn’t work because I used single quotes instead of backticks.

                My fix worked because the chunk name had no spaces in it. If it had spaces, I would have been forced to do things correctly, with backticks.

                Bob the total idiot

                When I have a minute, I’ll correct the original post and try to delete the confusing followups.



                  Did I help you? Buy me a beer
                  Get my Book: MODX:The Official Guide
                  MODX info for everyone: http://bobsguides.com/modx.html
                  My MODX Extras
                  Bob's Guides is now hosted at A2 MODX Hosting