We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 27330
    • 884 Posts
    I do have the chunk with correct case. I’ll try in external js. file and include it in the header and will post back. thanks for noticing it.
      • 27330
      • 884 Posts
      "It will work if you have implemented it correctly. " smiley

      when I have the js in the header it works fine. I couldn’t find yet why and how to change it but when Maxigallery add the js and css files it adds a / to the path:

      <link rel="stylesheet" href="/assets/snippets/maxigallery/css/default.css" type="text/css" media="screen" />
      same with the &js path.

      can you tell me where to overwrite it?

      you can see the progress, i didn’t implement it correctly with hover yet, but i’m half way there smiley

        • 7923
        • 4,213 Posts
        Quote from: sinbad at Mar 14, 2008, 09:24 AM

        when I have the js in the header it works fine. I couldn’t find yet why and how to change it but when Maxigallery add the js and css files it adds a / to the path:

        <link rel="stylesheet" href="/assets/snippets/maxigallery/css/default.css" type="text/css" media="screen" />
        same with the &js path.

        can you tell me where to overwrite it?
        You can modify it with the &css and &js parameters.

        The function itself is regSnippetScriptsAndCSS() in maxigallery.class.inc.php

        it builds the path to the file using:

        $modx->config[’base_url’].$this->mgconfig[’css’]

        So the / to the beginning comes from $modx->config[’base_url’]

        EDIT: what’s wrong in having that / in there btw? have you used <base href="[(site_url)]"></base> tag in the <head> of your template code? I would suggest to use that..


          "He can have a lollipop any time he wants to. That's what it means to be a programmer."
          • 27330
          • 884 Posts
          thanks for the EDIT smiley
          I do have <base href="[(site_url)]"></base> in my headers. doono why I thought it makes a path error. thanks for a good lesson.

          If I set the js path in the &js parameter it gets it fine now.
          If I set the chunk name in the &js the result is this:
          <script type="text/javascript" src="mgJs"></script>

          I don’t have a problem with that since the path method can work and anyway I prefer the .js on external file but interesting it won’t recognize the js in the chunk. I guess that’s why it didn’t work for me the first time.

          btw, for changing this to onHover the only change suppose to be in the chunk "mgGalleryPicture"
          or anywhere else I missed it? can’t get the onHover to work still.
          <li>
                 <a href="javascript:void(0);"
          onHover="javascript:showPic('[(base_url)][+maxigallery.path_to_gal+][+maxigallery.picture.filename+]','[+maxigallery.picture.title:htmlent+]','[+maxigallery.picture.descr:htmlent+]',[+maxigallery.picture_width_normal+],[+maxigallery.picture_height_normal+]);return
          false;">
                         <img src="[(base_url)][+maxigallery.path_to_gal+]tn_[+maxigallery.picture.filename+]"
          class="thumbnail" title="[+maxigallery.picture.title:htmlent+]"
          alt="[+maxigallery.picture.title:htmlent+]" />
                 </a>
          </li>
            • 7923
            • 4,213 Posts
            replace onhover with onmouseover


              "He can have a lollipop any time he wants to. That's what it means to be a programmer."
              • 27330
              • 884 Posts
              Thanks a lot doze. what a great snippet.
              thanks for the fast replies and figuring that for me. I owe you a beer smiley
                • 23299
                • 1,161 Posts
                So do I...
                  • 27330
                  • 884 Posts
                  one more question if I may smiley

                  I was able to have the onMouseHover with the onClick effects on the same gallery. that resulted in the image to open in a new window (like the wiki example).
                  In the first link I posted from newegg if you click the image it open the same gallery just in a bigger window with bigger thumbs & images.
                  IIRC the resizing of the images is done in the upload/sync of the gallery so if I want to have a bigger gallery in the popup I’ll have to upload new images in the popup gallery.
                  is this sounds right?
                    • 7923
                    • 4,213 Posts
                    Quote from: sinbad at Mar 15, 2008, 04:37 PM

                    In the first link I posted from newegg if you click the image it open the same gallery just in a bigger window with bigger thumbs & images.
                    IIRC the resizing of the images is done in the upload/sync of the gallery so if I want to have a bigger gallery in the popup I’ll have to upload new images in the popup gallery.
                    is this sounds right?
                    Yes, or you could use the &keep_bigimg=`1` parameter to have also bigger version of the images (size is controlled with &max_big_size parameter). Then do another document for the popup gallery that uses &view_gallery parameter to view the gallery from the original document, but modify the galleryPictureTpl that instead of showing normal images, show the big images (filename prefixed with "big_").


                      "He can have a lollipop any time he wants to. That's what it means to be a programmer."
                      • 27330
                      • 884 Posts
                      thanks doze I’ll try that and see.
                      on a side note, every time I call the gallery with the thumbs and image on the same page on NEW gallery I get pharse error when it tries to get the thumbnails that are not exist yet. The solution I found is to first create a simple gallery, then after it created the thumbs I can switch to the gallery with the thumbnails javascript.

                      Is there anything I can do to avoid this? could it be a parameter I’m not aware of?