We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 10076
    • 1,024 Posts
    Hi,

    a start of a new topic that started to develop just somewhere else and got off topic there.

    So here s the last entry from that other thread:

    markoj:

    QUOTE
    I don’t know if it was Doze that did Gallery for Revo. I have been sticking to Evo because of the early stages of Gallery and lack of front end editing like Quick Manager.

    Exactly though, get it so I don’t have to hard code anything. The maxigallery snippet is awesome for that.
    I have an idea for how to do it... and I have NO idea at the same time.

    Lines 646 - 649 of maxigallery.class.inc.php

    CODE:
    //smoothgallery scripts
    $smoothgallery_css_link = ’<link rel="stylesheet" href="’ . $modx->config[’base_url’] . MAXIGALLERY_PATH . ’smoothgallery/css/jd.gallery.css" type="text/css" media="screen" />’;
    $smoothgallery_script_link1 = $modx->config[’base_url’] . MAXIGALLERY_PATH . ’smoothgallery/js/mootools.js’;
    $smoothgallery_script_link2 = $modx->config[’base_url’] . MAXIGALLERY_PATH . ’smoothgallery/js/jd.gallery.js’;

    copy and paste this and then modify it to the appropriate "other" java gallery ... ?

    Looking through more files, I see that this kind of thing would have to be done in quite a few places.

    um.... anyone out there some hints?
      • 10076
      • 1,024 Posts
      Yep agree,

      but that is just the start, no?
      Because eg in the maxigalley.class.inc.php the real integration in to MG starts for smooth gallery in PHP and in maxigallery.php from line 139 the "translation" to the MG settings are handled. So same would go for other scripts, no? Signing of, need a few closed eyes,

      fr

      PS I miss all that too in Revo + yamms and managermanager, more...
        • 18389
        • 169 Posts
        That’s definitely just the start. Gotta track down every file and line that "smoothgallery" is used for example, or whichever gallery style is being copied and pasted.
        Gonna just sift through it for now and see if this is do-able by me.
          www.markojokic.com
          • 18389
          • 169 Posts
          So this is what I added to maxigallery.class.inc.php and atleast I didn’t get any errors like I was for a while.
          I am trying to implement coda slider 2.

          //codaslider2 scripts
          		$codaslider2_css_link1 = '<link rel="stylesheet" href="' . $modx->config['base_url'] . MAXIGALLERY_PATH . 'codaslider2/stylesheets/reset.css" type="text/css" media="screen" />';
          		$codaslider2_css_link2 = '<link rel="stylesheet" href="' . $modx->config['base_url'] . MAXIGALLERY_PATH . 'codaslider2/stylesheets/coda-slider-2.0.css" type="text/css" media="screen" />';
          		$codaslider2_script_link1 = $modx->config['base_url'] . MAXIGALLERY_PATH . 'codaslider2/javascripts/jquery-1.3.2.min.js'; 
          		$codaslider2_script_link2 = $modx->config['base_url'] . MAXIGALLERY_PATH . 'codaslider2/javascripts/jquery.easing.1.3.js';
          		$codaslider2_script_link3 = $modx->config['base_url'] . MAXIGALLERY_PATH . 'codaslider2/javascripts/jquery.coda-slider-2.0.js';
          
          //register codaslider2 scripts if in use
          		if(($this->mgconfig['display'] == "embedded" && $this->mgconfig['embedtype'] == "codaslider2") || ($this->mgconfig['keep_bigimg'] == "codaslider2")){
          			$modx->regClientCSS($codaslider2_css_link1);
          			$modx->regClientCSS($codaslider2_css_link2);
          			// do not include mootools if javascript libraries are set to be disabled
          			if(!$this->mgconfig['disable_js_libs']) {
          				$modx->regClientStartupScript($codaslider2_script_link1);
          				$modx->regClientStartupScript($codaslider2_script_link2);
          				$modx->regClientStartupScript($codaslider2_script_link3);
          		}


          In my template I have this:

          <!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>
          </head>
          
          <body>
          [!MaxiGallery? &disable_js_libs=`true` &display=`embedded` &embedtype=`codaslider2`  !]
          [*content*]
          </body>
          </html>


          And here’s what is coming out of it on my live testing site: http://markojokic.com/evolutiontests/

          So now I need to work on the maxigallery.php using "$mgconfig" and parameters that coda slider 2 uses....
          Anyone want to chirp in?
            www.markojokic.com
            • 10076
            • 1,024 Posts
            I ll have a look tonight, but busy right now. It s picking up the codaslider css file.
            Do we need thumbs with the codaslider or are that the pics you want to use?
              • 18389
              • 169 Posts
              Ideally I would like the thumbs to appear in the tabs of coda slider and the large image to be displayed in the large box. That might be too much if you have a lot of images in one gallery though. As long as we have the next and previous buttons, that would be a start.

              It is only displaying the thumb size right now. And it is getting css from maxigallery still.
              The large files need to be injected into the layout that comes with the coda slider 2 download, in the index file.
                www.markojokic.com
                • 10076
                • 1,024 Posts
                Well in FF I saw the codalsider css beeing picked up.
                I would just go for the tabs and arrows for the moment, tough enough for me.
                Why not you alter the maxigallery.class.inc.php and I will do the maxigallery.php file.
                See what remains after that, fr.
                  • 18389
                  • 169 Posts
                  Sure.
                  I see right now as I have it: http://markojokic.com/evolutiontests

                  I am not getting any of the js files. I now have them coming up in the script part of the page atleast

                  Trying to get that working now.

                  I am not sure where the tabs and everything would be inserted from. Some of the other maxigallery embedtypes have a "setup" file in addition to the js file.
                  Can’t figure it out.

                    www.markojokic.com
                    • 10076
                    • 1,024 Posts
                    Finnished the maxigallery.php file at 99%, can you testdrive?
                    Rename back to maxigallery.php, backup original.

                    You need to create a chunk like this:
                    <script type="text/javascript">
                    $().ready(function() {
                           $('#coda-slider-[*id*]').codaSlider({
                               dynamicArrows: 1,
                               dynamicTabs: 0,
                    autoHeight:0
                           });
                       });
                    </script>
                    Put a call to that chunk in your header.

                      • 18389
                      • 169 Posts
                      Ok. Had to change all of my "codaslider2" to "codaslider" in maxigallery.class.inc.php
                      Also in the embedtype in the snippet is now "codaslider" as well. Let’s stick with that.

                      so there was one line that I needed in the maxigallery.php file to make some things work:

                      $mgconfig['codaslider_id'] = (isset($codaslider_id)) ? $codaslider_id : -1; // [ number ]


                      I tried putting in your file with and without that line, but it caused the page to come up completely blank.
                      Right now the page is using my maxigallery.php with that one line of code added, nothing else changed from the original. Maybe you want to compare the 2.

                      http://markojokic.com/evolutiontests

                      is the 1% missing what we need to "click" it together?

                      btw, all of the codaslider css and js are injected through what I added in the maxigallery.class.inc.php file lines 658 - 671. I am keeping the snippet call simple:

                      [!MaxiGallery? &disable_js_libs=`true` &display=`embedded` &embedtype=`codaslider`  !]


                      nothing in the header in terms of scripts or css
                        www.markojokic.com