We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 4008
    • 13 Posts
    Hello

    I called the snippet, logged in as manager but I can’t see the manage pictures button.
    However, a few things where I’m not sure of. The wiki says:


    Put the extracted assets folder to the site root and the files will go to correct place
    -> I hope so because the extracted files are two folders: galleries and snippets. Those two folders came already with the modx installation. Does this mean I have to overwrite assets/galleries and assets/snippets or do I litterally put galleries en snippets in the site root NEXT to the modx folders? Big difference if you ask me

    Create a new snippet called MaxiGallery and paste the contents of maxigallery.txt to it
    -> I can see a file called maxigallery.txt with some welcome text in it but no code at all. There is also a maxigallery.php which I think I need to create the snippet but really which one is it? If it says the txt file then I use the txt one and not the php one...doesn’t make any sence at all.(of course I used the php one)

    Call the snippet on some document with the parameters you want
    -> this is another thing... some call the snippet as [[MaxiGallery]] and some write it as [!MaxiGallery!] and they all claim it to be working. I used both versions

    I mean, no wondering I can’t get it working
    All help is welcome smiley
    Thanks

      • 18374
      • 69 Posts
      1. The /galleries and /snippets/ directories do belong in the /assets directory. If you’re worried about overwriting your other snippets, just copy the /snippets/maxigallery/ directory into /assets/snippets itself.

      2. The text file IS the correct file to use when creating the snippet. If you look at the bottom there is a bit of code; the rest of it is a comment. This text file will (when the snippet is called) execute the PHP file you’re talking about.

      3. You can use either [[ ]] or [! !]. The former will execute the snippet normally (cached), the latter will execute it uncached. You’ll typically want to call the snippets with the [! !] method if the snippet content changes regularly.
        • 4008
        • 13 Posts
        Thank you!!
        Regards,
        Steve