We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 18453
    • 66 Posts
    I would realy love this snippet to work! laugh

    Bugs?

    It doesn’t create any thumbs when I use the "gallery name" argument.
    When I use the "gallery name argument" it only displays the name of the first image.

    And when I don’t specify the "gallery name argument" it displays the names of my images next to the images (< thats not supposed to happen is it?)

    Snippet call:
    [!AutoGallery?itemchunk=`galItemChunk`&gallery=`creebles`&quality=`100`&tnwidth=`125`&tnheight=`125`!]

    Chunk:
    <a href="[+imgpath+]" rel="lightbox" title="[+title+]"/><img src="[+tnpath+]" alt="[+title+]" /></a>

      • 24449
      • 81 Posts
      Hi Martenh,

      I’m not sure why it isn’t displaying thumbs for you but I’m about to test it here using the gallery name argument so I’ll se what happens.

      As for displaying names next to images, that sounds like a lightbox issue. You lightbox call looks ok except that you have got a bit carried away with closing tags and put a / at the end of the first <a>. Other than that I can’t think what’s up with it.

      Like I say, I’ll try this version that I’m working on now and maybe the update will solve the problem?


      Ramsay
        • 24449
        • 81 Posts
        Ok,

        Well, this might go horribly wrong...

        I have just updated the version of AutoGallery on our site (http://www.zombietuesday.com/autogallery) to v2.4 and added a set of example stuff for doing file uploads and db data modifications. I hope its self explainatory but it almost certainly isn’t. There are some instructions on the site.

        The short version: I have created a snippet called AutoGalMod (Which is a bit dodgy in a few places so feel free to make condescending comments about coding styles and correct use of the MODx DBAPI...). This should be called all alone on a page (which I have imaginatively called AutoGalMod on my sites). Then I have provided an Add and a Modify form that have AutoGalMod as their submit action. They have a hidden "action" fields that can be "Add", "Mod", or "Delete". They also have hidden fields for "gallery" and "entity" to specify what is to be messed with.

        There is also a galGet snippet to load data into the Modify form. I also use a one line snippet called "setter" that just sets a placeholder from a request variable (Please, someone tell me if there’s a nice way to do this? Its handy for chunks, though, since they can’t call snippets).

        NEEDLESS TO SAY THESE WANT TO BE BEHIND SOME KIND OF ADMIN-ONLY ACCESS CONTROL. I HAVEN’T DONE ANYTHING CLEVER WITH CHECKING THE VALUES THEY PASS AND THEY CAN CREATE AND DELETE FILES ON YOUR SITE. Ahem. Don’t sue me, Etc. My attitude has been: if the clients want to break their own site there is a limit to the amount of effort I’m going to go to to stop them. You would have to actually try with these forms, but it wouldn’t be hard if you did. I should probably filter out filenames like "../../index.html" but its dinner time now.

        Anyway, let me know how it goes and post on here when the instructions make no sense and I will refine them!


        Ramsay


        P.s. Please let me know if its just me that has strange issues with the upload form? It only bothers to upload files every other time for me. I have to watch my net usage display and make sure its spiked or hit the upload button again until it does. Weird. If there’s a glaring error in the HTML form let me know that too...
          • 24449
          • 81 Posts
          Slight update to the files on zombietuesday.com:

          I’ve added one line to getGal. We are having odd issues with one of our sites’ database, so getGal will now set the [+img+] placeholder even if it doesn’t get anything from the db - its a shame not to be able to look at the picture just because the title can’t be displayed.

          I’ve added a little bit to AutoGallery.inc.php too. If you are logged in as an admin and go to a gallery that doesn’t exist (i.e. the folder doesn’t exist under assets/galleries) it will be created in the filesystem. If you are using a single gallery display page that uses a request arg to specify the gallery this can reduce making new galleries to just adding a weblink somewhere with the right URL. The admins will then be presented with a blank page and a nice Add button to start uploading content.



          Ramsay
            • 18453
            • 66 Posts
            Hi Ramsay,

            Thank you for your quick response!!
            It still doesn’t work for me.

            1. It display’s the same thumb (thumb of the first picture) for each picture.
            The fix that Wyleyrabbit posted makes it work oke, mayb you should use it to.

            2. When using the "gallery name argument" it displays an error that the folder doesn’t exist, but the path that is displayed within the error message was correct.

            Thanx for your time! but I have to go with maxiGallery for now because I don’t have time to troubleshoot this problem right now.

            If you need my help testing it again then give me a call..
              • 24449
              • 81 Posts
              Hi Martenh,

              I’m afraid I can’t really offer much help without more detail. Wylerabbit’s fix is in the latest version (released yesterday and updated this morning). It also has the ability to create folders that don’t exist if you are logged in as an admin. Its odd that you say it does exist but it says it doesn’t. Could be a permissions issue?

              As I say, you’d need to tell us a bit more. No idea whats happening with the thumbnails, but you may have to clear out the tn_ files and try again. I think fixedmachine’s updates mean you will have to clear out the db too to get it to rebuild the thumbnails - I’ll change that and update the file on our server again.

              Ramsay
                • 32756
                • 25 Posts
                Hi Ramsay,

                Thank you for your hard work on this project. Since Maxigallery has apparently been abandoned by the developer, I think AutoGallery is going to get very popular because of its simplicity and compatibility with various lightboxes and such.

                I haven’t yet tried your latest version, but will this morning, and am very much looking forward to it.

                Maxigallery had some similar functionality to what it sounds like your latest version has. If logged in as admin, there was a nice screen that allowed uploading of images, deleting images, changing display order, description editing, etc. Since it’s all open source, maybe have a look to see how it was done in that project.

                I will help wherever I can, however I’m no php wiz. For me, I consider php to be my second language while Perl is my first. When working in MODx I constantly have to resist just writing whatever I need in Perl then hacking an interface to it in MODx (I’ve done precisely this before). smiley

                Cheers,
                Wyleyrabbit

                  • 5340
                  • 1,624 Posts
                  HI,

                  Does autoGallery manages the pictures and albums the same way as maxigallery?

                  Can somebody post a link to a working autoGallery


                  Thx
                    • 24449
                    • 81 Posts
                    Hi All,

                    I consider php about my 9th langauge (after Java, C, Haskell, etc.) and I hate it, but I like MODx so I persevere. Having worked as a safety critical systems specialist I find it very scary to use a language that lets you just start using variables without declaring them, and which has a really quite serious use of the word "global"...

                    I haven’t really looked at MaxiGallery in detail. AutoGallery started because my business partner was sick of having to install the huge do-everything system that is MaxiGallery and wanted something really quick and simple. Its got less simple in the back end but I hope AutoGallery has retained its simple frontend. It is deliberately designed to just produce MODx placeholders and process chunks so ALL of the output formatting is up to you - I get the impression that MaxiGallery comes with a big block of AJAX that you kinda have to live with?

                    I have planned to do an AJAXy frontend for AutoGallery. In fact I did a rudimentary version a few months back if anyone is interested. I like to think its a cool example of AutoGallery’s flexibility that the XML data feed for the AJAX is actually just AutoGallery called with a chunk that produces XML instead of flashy divs. From there it was just a bit of JS to dump the values returned into the images presented on the page.

                    Anyway, paying work needs to take priority over flashyness. That said, I use AutoGallery for lots of paying projects so I have a vested interest in fixing bugs in it as people find them!

                    As for links to working AutoGalleries:

                    Our Shared World is quite out of date now (in AutoGallery version terms) but works:

                    http://www.oursharedworld.com/showgallery?gallery=Interview%20with%20Norberto%20Cardenas


                    Nigel Wingrove has eclectic taste in imagery that is probably not safe for a lot of offices, but he is using an up to date version behind all the Wayfinder business:

                    http://www.nigelwingrove.com/Imagery.html

                    LoonyRecords uses AutoGallery too:

                    http://www.loonyrecords.com/Gallery.html


                    Obviously I’m not going to post the uname and password that you’d need to see the management options on any of them. They all display using GreyBox (that’s slightly modded - crudely). Martyn likes it. I got bored of arguing wink


                    Ramsay



                      • 5340
                      • 1,624 Posts
                      I have a few questions before I start. I do not need working solutions, just some ideas on how would you do it and if it’s possible


                      1. How do I upload images from the website? Do I have to build an upload form?

                      2. How do I add image description?

                      3. How do I sort the images?

                      4. Will the thumbnail for all the galleries be automatically generated? What image will be used for the gallery thumbnail(maxigallery uses the fors one)

                      Thank You