We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 7455
    • 2,204 Posts
    Hello I have a problem getting this right:

    I like to have the last 2 uploaded images on each page. then when you click the image go to that gallery.

    this is my first call for the last 2 images this works great:
    call 1:
    [!MaxiGallery? &gal_query_ids=`all` &order_by=`id` &order_direction=`ASC` &limit=`2`!]
    


    I use this for my gallery, and this works also great on its own.
    call 2:
    [!MaxiGallery? &display=`embedded` &embedtype=`lightboxv2` &max_thumb_size =`150` &max_big_size =`800`!]
    


    but the link that is presented on the first images is not good its this:
    http://www.domain.tld/index.php?id=26&pic=2&from_id=7
    


    I do not want the pic id. or even better maxigallery should not react on that id when I use lightbox or any other embeded type.

    Image 1 shows the setup: left the galley using call 2 and right the last 2 upoaded images. (image 1)
    when i click on the lightbox gallery lightbox works great (image 2)

    when I click one of the images on the right i get 2x the "normal" view. (see image3)
    this also happents on any page i click on one of the 2 images.

    I looked into the galleryPicture template options but there is not a page id placeholder without the image id, something like: [+maxigallery.page_link_url+] would be a good addition maybe?

    I realy like if this could work
    Dimmy
      follow me on twitter: @dimmy01
      • 7455
      • 2,204 Posts
      ok I see that i could use this for the link:
      [~[+maxigallery.picture.gal_id+]~]


      but still why is maxigallery loading the wrong gallery display mode like this?
        follow me on twitter: @dimmy01
        • 7455
        • 2,204 Posts
        could we please a an option to switch of the manager part ?

        just a simple parameter &manage=`0` or something like that. (look one reply down i made a hack to do that.)

        when using more than 1 maxigallery call one one page this is realy anoing it does not save the titles etc because it sees all forms as one somhowe (becose of the post) and managing them on a seperater page is not realy working so well (alway’s switching between pages.

          follow me on twitter: @dimmy01
          • 7455
          • 2,204 Posts
          ok I added this to the maxigallery.php file:

          add this
          $mgconfig['manage'] = (isset($manage)) ? $manage : 1; //[0 | 1] disable picture manager 
          


          after this:
          $mgconfig['debug'] = (isset($debug)) ? $debug : 0; //[0 | 1] display debug trace 
          


          change this:
          	if($_REQUEST['mode']=="admin" || ($mg->mgconfig['manage_gallery']!="" && $mg->mgconfig['manage_target']=="")) {
          


          to this:
          	if($_REQUEST['mode']=="admin" && $mg->mgconfig['manage']=="1" || ($mg->mgconfig['manage_gallery']!="" && $mg->mgconfig['manage_target']=="")) {
          


          I forgot this one, change this:
          // if not in custom query mode, make manage button available
          	if (count($mg->mgconfig['gal_query_ids']) == 0 && count($mg->mgconfig['pic_query_ids']) == 0) {
          


          to this:
          // if not in custom query mode, make manage button available
          	if (count($mg->mgconfig['gal_query_ids']) == 0 && count($mg->mgconfig['pic_query_ids']) == 0 && $mg->mgconfig['manage']=="1") {
          


          now just add &manage=`0` to your call to disable the managepicture part.

          this is very handy when you use maxugallery to show pictures from other gallery’s and do not need to use the managepictures part.

          Dimmy
            follow me on twitter: @dimmy01
            • 7923
            • 4,213 Posts
            Thanks, I’ll add that to the snippet (if I get a chance to finish the next version).. rolleyes


              "He can have a lollipop any time he wants to. That's what it means to be a programmer."
              • 7455
              • 2,204 Posts
              Edited the hack forgot the manage button
                follow me on twitter: @dimmy01