We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 28434
    • 3 Posts
    @Xris >>  Many, many thanks!

    Unfortunately I can’t get your snippet to work as I think it should and I can’t figure out where I’m going wrong.
    I’ve spent the past 2 hours fiddling around, making things cacheable or not, checking paths & tweaking bits of code with no luck.
    I wish I was more adept at this kind of stuff.

    Can u please confirm if I am doing things correctly or not?
    Here’s a step by step of what I did in the most basic way I tried;

    1) I used the MaxiGallery snippet by inserting [!MaxiGallery!] in its basic form on a page of my site (eg. h**p://www.mywebsiteaddrerss.com/index.php?id=1)

    2) I upload pictures and check that the gallery works, which it does.

    3) I create a new page (eg. h**p://www.mywebsiteaddrerss.com/index.php?id=2) and insert your snippet [!MaxiGallerySolo &galID=’1’!] ensuring the ID is the same as the MaxiGallery page id from step 1.

    4) view webpage containing your MaxiGallerySolo snippet. Nothing happens...  when I check the source code of the page nothing is pulled into the ’content’ div... its empty..

    5) realise that I’ve probably made a really fundamental and stupid mistake somewhere between steps 1 and 3.   huh

    I’d really appreciate any help!
    thanks again
    Stef
      • 25663 MODX Staff
      • 12,272 Posts
      Stef, try to use backtics, not single-quotes, for your parameters. That’s the key just to the left of the `1`.
        Ryan Thrash, MODX Co-Founder
        Follow me on Twitter at @rthrash or catch my occasional unofficial thoughts at thrash.me
        • 32926
        • 8 Posts
        Ahh... I hate MySQL for that... thank you rthrash

        Edit: Spelling wink
          • 25663 MODX Staff
          • 12,272 Posts
          That’s rthrash, and you’re very much welcome. laugh
            Ryan Thrash, MODX Co-Founder
            Follow me on Twitter at @rthrash or catch my occasional unofficial thoughts at thrash.me
            • 18219
            • 826 Posts
            @Doze : I renew my request, please: Do you think that this snippets will be able to integrate soon the possibility of adding a link towards a file pdf, a film, a music or another page of the site?

            I wish to create a catalogue of product where under each image a link can open a file.

            I think that this functionalities would be usable with the snippet shopx.
              Marc
              I'm French... Sorry for my bad English, I use ' Google Translator' or other... but that remains that tools wink
              • 7923
              • 4,213 Posts
              Quote from: Marc at Apr 19, 2006, 12:05 PM

              @Doze : I renew my request, please: Do you think that this snippets will be able to integrate soon the possibility of adding a link towards a file pdf, a film, a music or another page of the site?
              It’s all doable, but I’m not gonna do it for now. In quick, you could do it by your self by editing your code and remove the htmlentities calls what converts the characters to html entities, so you would be able to put html code straight to the title/description fields to build your links. But then you would have to put all french characters as entities by your self if you need valid source code. Or then tie up some light wysiwyg editor to the text areas, that’s easy too.. Like this or tie the modx fckeditor to the textareas like UserComments snippets does. Haven’t taken a look at so don’t know how it’s done.

              I just started a new job this week and I’ll be very busy trying to learn all the new things there, so I don’t have the energy to develope this right now. I really wanted to finish the templating ability to this snippet before I started the job, but didn’t have enough time to get around to it. If anyone else want to do some work with this in the mean time, it would be more than welcome. And you can also contact me if you need any coding help/advice/something. The next thing I will do to this snippet is build the templating ability to it by using Wendys chunktpl library, unless someone beats me to it smiley ..But don’t expect that to happen very soon.

              I’ll still be around here, but the developement of this snippet from my part will be slow for atleast a while. Sorry!


                "He can have a lollipop any time he wants to. That's what it means to be a programmer."
                • 18219
                • 826 Posts
                @doze : I understand this situation and I thank you for the work already carried out on this snippet. It is really a superb work.

                And I wish you much success for your new job wink
                Thanks
                  Marc
                  I'm French... Sorry for my bad English, I use ' Google Translator' or other... but that remains that tools wink
                  • 28434
                  • 3 Posts
                  @--> XriS & rthrash

                  thanks for the pointers guys... really grateful!
                  finally got the MaxiGallerySolo snippet figured out and running smoothly.
                  I’ve learnt soo much today - yay!  laugh

                  Incase it helps anyone else there were 3 things I needed to fix...

                  • Using back-ticks in the snippet parameters instead of single quote (as rthrash mentioned)

                  • Inserting a ’?’ after the snippet name and before the page ID parameter.  Like this -->   [!MaxiGallerySolo? &galID=`pageID`!]

                  • Realising that since I had upgraded to Doze’s MaxiGallery 0.4, the various <script>javascript call-ups were no longer hardcoded into my template (I’d removed them) but called up into the page by the MaxiGallery snippet instead when the snippet loaded.
                  Using Xris’s MaxiGallerySOLO snippet doesnt load Doze’s MaxiGallery snippet onto the page, so for my scenario I got around this by creating a another snippet to load up the javascripts and lightbox CCS for that particular page. I presumed this was better than including them in the MaxiGallerySolo snippet as I intend to use that snippet more than once on the page. I guess I could also just have duplicated my template and included the <script> links between the <head> and </head> tags instead. Would that be a better, cleaner way to do it?

                  Hope that all makes sense and maybe helps another newbie like me!
                  thanks again
                  Stef

                  p.s. thanks Doze for putting MaxiGallery together in the first place! wink
                    • 2690
                    • 148 Posts
                    wow ..nice stuff !

                    Can anybody point me in the right direction for setup like this:

                    FrontPage - Display 1 Thumbnail of the last gallery

                    Galleries Selection Page - Display Thubmnails for all child galleries (already done with &display=`childgalleries` call)
                    Gallery Page - Display 1 Thumbnail for all images for this gallery ( i understand this can be done with MaxiGallerySolo)

                    so basicaly the question is: how to display 1 thumb for the latest gallery added on the front page ? smiley


                    Thanks !!!

                    Aleksey
                      MODx Revo 2.0.6-pl (Traditional) | Apache 2.2.3 | PHP 5.2.14 | MySQL 5.0.77 | MAC OS 10.6.5 | FF 3.6/Chrome 9.0.5
                      • 7923
                      • 4,213 Posts
                      Quote from: bakalek at Apr 20, 2006, 11:36 AM
                      so basicaly the question is: how to display 1 thumb for the latest gallery added on the front page ? smiley
                      Create a duplicate of the MaxiGallerySolo snippet and do search and replace:

                      Replace:
                      "gal_id='" . $galID . "'"


                      with
                      ""


                      Then it should just get the newest pic from the database table.


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

                      This discussion is closed to further replies. Keep calm and carry on.