We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 7923
    • 4,213 Posts
    I haven’t tried the snippet what bakalek posted above, but to me it seems that you should call it simply by using: [!snippetname? &galid=`idofthegallery`!]

    If you have changed the path where maxigallery generates images or maxigallery’s database table name, then you should add those to the snippet call also.


      "He can have a lollipop any time he wants to. That's what it means to be a programmer."
      • 31671
      • 13 Posts
      Thank you for your reply doze. But I can´t get it to work. Now there is that error:

      Parse error: syntax error, unexpected ’{’ in ....../manager/includes/document.parser.class.inc.php(772) : eval()’d code on line 7

      A lot of huh? for me.

      If someone could help me with that, I´d like to put that in the Maxigallery wiki.
        • 7923
        • 4,213 Posts
        Quote from: vittel at Oct 31, 2008, 09:21 AM

        Parse error: syntax error, unexpected ’{’ in ....../manager/includes/document.parser.class.inc.php(772) : eval()’d code on line 7
        That error is saying that php parser encountered an unexpected { character on line 7 in some snippet that you are running on that document. When I look at the code that bakalek posted above, I don’t see any { character on line 7.. So are you sure you are running the same code? Or do you possibly have some other snippet running on the page that has a bug in line number 7?


          "He can have a lollipop any time he wants to. That's what it means to be a programmer."
          • 31671
          • 13 Posts
          you are right, my mistake. I mixed that up to much.
          is there another (easier) way to make that:

          _____
          | |
          |_____| an image that is changed by the thumbnails
          ______ the title and description of the picture showed above

          |_| |_| |_| tumbnails to change the bigger img above

          ?
          without javascript and without iframes?
            • 7923
            • 4,213 Posts
            The snippet that bakalek posted above should do it.. What is the problem? what it is doing and what not? how are your galleries setup? snippet calls, document ids? Pretty hard to help with the information what you have given..


              "He can have a lollipop any time he wants to. That's what it means to be a programmer."
              • 11518
              • 7 Posts
              Hy guys ... i cant tell how much u helped me with this litle tut i just want to make, ijust want to make clear a litle thisng out for the upper code

              u have a line that had a little mistake .. i gess.. for me at least..
              OLD LINE: <a href="[~[*id*]~]?pic=’.$.......

              change this part for this one: <a href="[~[*id*]~]&pic=’.$.......

              and thats it smiley

              on more thing and here im going to ask.... is there any chance to order 3 or 4 thumbs by row?? cause for me at least its order in a single column all the thumbnails.
              like this :
              Thumb1
              Thumb2
              Thumb3

              and i want like this:
              Thumb1 Thumb2 Thumb3
              any help would be apreciated smiley:):):)
                • 31671
                • 13 Posts
                Thank you very very much Gurthang. That little "&"!!!

                and to change the tumbs to order by row you have to put

                .thumbnail {
                display: block;
                float: right;
                }

                to your css.
                My question for that is can I call the Maxigallery css (&css=`PATHtoMaxiGallerycss`) in the snippet?
                  • 31671
                  • 13 Posts
                  My first (not working) structure was like that:
                  Site
                  -Doc1
                  -Doc2
                  -.
                  -.
                  -Galleries
                  --Gallery1
                  --Gallery2
                  And I tried to call Gallery1 in Doc1.

                  Now the working setup is:
                  Site
                  -Doc1
                  -Doc2
                  -.
                  -.

                  And in Doc1
                  for the big image:
                  [!MaxiGallery? &display=`pictureview`  &pictureTpl=`@FILE:/PATHtoMaxiGalleryTEMP`  &css=`@FILE:/PATHtoMaxiGalleryTEMP` !]

                  for the tumbnail:
                  [!get_pic? &galid=`Doc1` !]

                  the get_pic snippet:
                  <?php
                  //snippet: get_pic
                  //by bakalek, bruno17, Gurthang
                  $galid= isset($galid)?$galid:$modx->documentIdentifier;
                  $gtable = (isset($gtable)) ? $gtable : "maxigallery"; // [ text ]
                  $orderby = "pos,date";
                  $offset=0;
                  $path_to_galleries="assets/galleries/"; // [ path ]
                  $path_to_gal=$path_to_galleries.$galid."/";
                  $order_direction="ASC";
                  
                  $result = $modx->db->select("id,filename", $modx->db->config['table_prefix'].$gtable, "(gal_id='" . $galid . "' AND NOT hide='1')",$orderby.' '.$order_direction, $offset);
                  
                  if($modx->db->getRecordCount($result) >= 1) {
                  		$output .= '<div class="thumbscontainer">';
                  		while( $row = $modx->db->getRow( $result ) ) {
                  			$output .= '<div class="thumbnail"><a href="[~[*id*]~]&pic='.$row['id'].'"><img src="'.$path_to_gal.'tn_'.$row['filename'].'" border="0" ></a></div>';
                  		}
                  		$output .= '</div>';
                  	}
                  	else {
                  		$output = 'There are no records to show.';
                  	}
                  	return $output;
                  ?>


                    • 31671
                    • 13 Posts
                    And my picturetpl.html to format the big img that way
                    _____
                    | |
                    |_____| image that is changed by the thumbnails
                    ______ the title and description of the picture showed above

                    is:
                    [+maxigallery.config.display:is=`pictureview`:then=`
                    	[+maxigallery.managebutton:isnot=``:then=`
                    
                    		<center>[+maxigallery.managebutton+]</center>
                    		<br />
                    	
                    	`+]
                    `+]
                    
                    <div class="picturecontainer">
                        <img src="[(base_url)][+maxigallery.path_to_gal+][+maxigallery.picture.filename+]" />
                    </div>
                    <div>
                    <div class="tx_bold"> [+maxigallery.picture.title+] </div>
                    <div class="tx_thin"> | [+maxigallery.picture.descr+] </div>
                    </div>