We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 18389
    • 169 Posts
    Put a link to the testing ground too!

    Mine is here: http://markojokic.com/evolutiontests

    look at the source please!

    Also, the maxigallery call I have is this:
    [!MaxiGallery? &debug=`0` &disable_js_libs=`false` &display=`embedded` &embedtype=`codaslider` &codaslider_width=`1024` &codaslider_height=`1024` !]
      www.markojokic.com
      • 10076
      • 1,024 Posts
      I think the problem for us now is that the document ready function seems to do nothing. Plus a few more issues in the scripts. I attached the scripts, and wrote in the head the problems encountered. However:
      You might want to check this post on integrating fancybox in MG.
      A completly different approach, staying well away form the MG php files. What do you think?
      Here s the link to my playground.

      fr
        • 10076
        • 1,024 Posts
        Okay can one of the modx coders or even Doze have a look maybe. We are trying to integrate the Niall Doherty s Codaslider in Maxigallery. It does not seem to start. Are we completly missing it here, or is it just a minor adjustement we need.
        I think the crux is here:
        $().ready(function() {
        $('#coda-slider-1').codaSlider();
        
        });
        We thought it should go in the maxigallery.class.inc.php somethinng like this:
        //-------------------------------------------------------------------------------------------------
            //function to add codaslider styles
        	function regcodasliderCSS($codasliderId){
        		global $modx;
        		$codaslider_css_str = '
        			<style type="text/css">
        			#myGallery'.$codasliderId.'
        			{
        			width: '.$this->mgconfig['codaslider_width'].'px;
        			height: '.$this->mgconfig['codaslider_height'].'px;
        			z-index:5;
        
        			} </style>
        
        
        
           </script>
        
        <script type="text/javascript">
        	$().ready(function() {
        $('#coda-slider-1').codaSlider();
        
        });
        </script>
        ';
        		$modx->regClientCSS($codaslider_css_str);
        		$modx->regClientScript($codaslider_script_str);
        	}
        
        	//-------------------------------------------------------------------------------------------------


        Anyone?
          • 18389
          • 169 Posts
          I had another go at it and got some advice from "photowebmax".

          One big thing that we were missing was the gallerypicturetpl.html and galleryoutertpl.html to place the css from coda slider.

          Here is my test area:

          http://markojokic.com/evolutiontests/

          Look at the source of the page and you can see that the div’s and images are falling in the right places, the javascript is not getting triggered though.

          The problem I see is where we copied the smoothgallery script and pasted it into the coda slider script area of "maxigallery.class.inc.php

          lines 583-586 as we modified the file:
          <
          script type="text/javascript">
          			
          			function startGallery() {
          			var myGallery = new gallery($(\'myGallery'.$codasliderId.'\'), {


          When I looked at the static coda slider html source i found the code as this:

          <script type="text/javascript">
          			$().ready(function() {
          				$('#coda-slider-1').codaSlider();
          			});
          		 </script>


          How do I implement this code into the maxigallery code????

          I have added a zip file of my latest maxigallery modified files.
          the required coda slider folders and files which should be placed in a folder within the maxigallery folder named: codaslider
            www.markojokic.com
            • 10076
            • 1,024 Posts
            Yep it s right irritating. Every time I tried to change that bit, the browser goes in quirks mode, so not much to verify. No output in the page, blank!
              • 18389
              • 169 Posts
              SOME SUCCESS FINALLY!!!

              Starting from scratch, use all the original clean files for maxigallery and coda slider 2...

              pictureTpl chunk:
              <center>[+maxigallery.managebutton+]</center><br />
              
              <div class="panel">
              <div class="panel-wrapper">
              <h2 class="title">[+maxigallery.picture.filename+]</h2>
              <p>
              <img src="[(base_url)][+maxigallery.path_to_gal+][+maxigallery.picture.filename+]"  />
              </p>
              </div></div>


              gallerypictureTpl chunk:
              [+maxigallery.picture.title:htmlent+]


              outergalleryTpl chunk:
              [+maxigallery.pictures+]


              In the template:
              <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
              
              <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
              
              <head>
              <!-- Begin Stylesheets -->
              		<link rel="stylesheet" href="assets/snippets/maxigallery/codaslider/stylesheets/reset.css" type="text/css" media="screen" />
              		<link rel="stylesheet" href="assets/snippets/maxigallery/codaslider/stylesheets/coda-slider-2.0.css" type="text/css" media="screen" />
              	<!-- End Stylesheets -->
              	
              	<!-- Begin JavaScript -->
              		<script type="text/javascript" src="assets/snippets/maxigallery/codaslider/javascripts/jquery-1.3.2.min.js"></script>
              		<script type="text/javascript" src="assets/snippets/maxigallery/codaslider/javascripts/jquery.easing.1.3.js"></script>
              		<script type="text/javascript" src="assets/snippets/maxigallery/codaslider/javascripts/jquery.coda-slider-2.0.js"></script>
              		 <script type="text/javascript">
              			$().ready(function() {
              				$('#coda-slider-1').codaSlider();
              			});
              		 </script>
              </head>
              
              <body class="coda-slider-no-js">
              	
              <noscript>
              	<div>
                      <p>Unfortunately your browser does not hava JavaScript capabilities which are required to exploit full functionality of our site. This could be the result of two possible scenarios:</p>
                      <ol>
                          <li>You are using an old web browser, in which case you should upgrade it to a newer version. We recommend the latest version of <a href="http://www.getfirefox.com">Firefox</a>.</li>
                          <li>You have disabled JavaScript in you browser, in which case you will have to enable it to properly use our site. <a href="http://www.google.com/support/bin/answer.py?answer=23852">Learn how to enable JavaScript</a>.</li>
                      </ol>
                  </div>
              </noscript>
              
              <div class="coda-slider-wrapper">
              	<div class="coda-slider preload" id="coda-slider-1">	
              [!MaxiGallery? &disable_js_libs=`true` &max_pic_size=`800 x 533` &pictureTpl=`codapicture` &gallerypictureTpl=`codagallerypicture`  &outergalleryTpl=`codaoutergallery` &display=`embedded` &embedtype=`codaslider` !]
              
              </div></div>
              
              
              [*content*]
              </body>
              </html>


              My test page for this: http://www.markojokic.com/evolutiontests/index.php?id=4

              Basically, it was all about the templates, special thanks to photowebmax for a few guiding and words and inspiration as a fellow non-programmer.
              The embedtype was named "codaslider" arbitrarily. It does not refer to any actual embed type, but it did the trick so far.

              I changed 2 original files:

              "jquery.coda-slider-2.0.js"
              line 11:
              $(".coda-slider").children('.panel').hide().end().prepend('<p class="loading">Loading...<br /><img src="assets/snippets/maxigallery/codaslider/images/ajax-loader.gif" alt="loading..." /></p>');


              Just to make the loader be found in the right path where I put codaslider.

              "coda-slider-2.0.css"
              line 25:

              .coda-slider-wrapper.arrows .coda-slider, .coda-slider-wrapper.arrows .coda-slider .panel { width: 840px }


              I made the width 840 because most of my images are 800 wide and there is 20px of padding on each side, atleast the way it was designed to be.


              Maybe now we can go back to tweaking the maxigallery files to get some extra parameters for Coda Slider itself. A further addition I would like is to have the tabs that have file names be thumbnails instead, and css them to the bottom instead of the top.

              ADDITIONAL THING I FORGOT WHEN I FIRST POSTED THIS:
              Modified the gallerypicturetpl.html file that goes in "templates" folder. here it is below:
                www.markojokic.com
                • 10076
                • 1,024 Posts
                Great, good work. Position of the tabs is defined by "dynamicTabsPosition bottom/top" defaults to top.
                Changing tabs to thumbs, why not use smoothgallery?
                  • 10076
                  • 1,024 Posts
                  What version of MG are you using? Cause following your guides it does mot run overhere. >:(
                    • 18389
                    • 169 Posts
                    I am using:

                    Evolution 1.0.4

                    Maxigallery 0.5.2

                    Coda Slider 2


                    I am trying it on a different install (same versions) and am having a problem now too. I think it’s the embedtype that is a problem.
                      www.markojokic.com
                      • 10076
                      • 1,024 Posts
                      Ahhh, I am (was) using maxigallery test version 0.6 forgot all about that. STill are you sure you send all because as far as I can see I copied you, still it doe not work. (I am now on MG 0.6) Evo 1.0.4 and codaslide 0.2.
                      http://www.barassoboys.eu/codaslider The images get changed to thumbs and are wrapped in the ul li of MG itself

                      Have to take a brake, working on a diff project. WIll continue later, fr.