We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 16545
    • 358 Posts
    I’ve just skiped magic_quote warning and continue module installation.

    I can confirm it really works now and viewer navigations are showing up.
      • 29641
      • 13 Posts
      Quote from: goldsky at Jan 23, 2011, 10:59 PM

      Quote from: the.kobold at Jan 22, 2011, 03:55 AM

      Quote from: goldsky at Jan 18, 2011, 12:11 PM

      hm...
      i’ll check it out.
      thx for reporting.

      upgraded to 1.4.0-RC5 (aka PL), the problem is same

      fixed here.

      working, thank you very much smiley
        • 10608
        • 36 Posts
        1. The menu-interface of Easy 2 Gallery 1.4.0-RC doesn’t seem to work well in Internet Explorer. Is there a solution for this?

        2. It would be nice to have an ajaxed multiple file uploader as here: http://aquantum-demo.appspot.com/file-upload Will this be implemented in future versions?
          • 11055 ☆ A M B ☆
          • 3,112 Posts
          1. I don’t test this against IE. You can help with this, if you want to.
          2. You can have it right away, with E2G’s plugin. I had the Uploadify working well on RC2.
          I just don’t have time to write the tutorial, but Susan wrote about it http://sottwell.com/e2g-plugin.html based on RC2, if i’m not wrong.
          But you should dig the current code, because there were some changes between RC2 to RC3 and beyond.
            Rico
            Genius is one percent inspiration and ninety-nine percent perspiration. Thomas A. Edison
            MODx is great, but knowing how to use it well makes it perfect!

            www.virtudraft.com

            Security, security, security! | Indonesian MODx Forum | MODx Revo's cheatsheets | MODx Evo's cheatsheets

            Author of Easy 2 Gallery 1.4.x, PHPTidy, spieFeed, FileDownload R, Upload To Users CMP, Inherit Template TV, LexRating, ExerPlan, Lingua, virtuNewsletter, Grid Class Key, SmartTag, prevNext

            Maintainter/contributor of Babel

            Because it's hard to follow all topics on the forum, PING ME ON TWITTER @_goldsky if you need my help.
            • 18913
            • 654 Posts
            Hi,
            I haven’t played around with the latest release yet, but I’ve got a potential Evo project where I need to create one image by "gluing together" a number of smaller images (probably 10 at most).

            The idea would be to select from a grid of thumbnails and drag them to an area to be sorted, much like the jQuery drag-and-drop puzzles one can find on the ’net.

            I’m wondering how to accomplish this?

            @goldsky : thanks for your reply to the question I mistakenly posted on the 1.3.5 thread :
            http://modxcms.com/forums/index.php/topic,44591.msg343238.html#msg343238
            Can you envision how I could take an images from your grid output and drag them to an area where I could line them up next to each other?

            The reason for wanting to do this is to be able to create one image which shows steps in a process, e.g. steps in completing a recipe.

            In any case, if you have code you could make available for your "sortable" demo, that would be a start!

            Thanks in advance!
            Matt
              • 11055 ☆ A M B ☆
              • 3,112 Posts
              [!easy2? &slideshow=`sortable` &gid=`11` &ss_limit=`9` &ss_orderby=`random`!]

              Ignore why I use slideshow parameter.
              I just didn’t realize that this parameter was very useful for other implementation.

              You need to create/register the new slideshow from the module > menu > slideshow > add: sortable, indexfile:
              <?php
              
              /**
               * @link http://tom.leapwing.co.uk/tech/jquery-puzzle-demo/
               */
              $ssParams = $this->_getSlideShowParams();
              
              // actually this become useless since the files are called hardcoded as below.
              $ssFiles = $this->_getSlideShowFiles();
              
              //echo __LINE__ . ' : $slideshow = ' . $slideshow . '<br />';
              //echo __LINE__ . ' : $ssParams = ' . $ssParams . '<br />';
              //echo '<pre>';
              //print_r($ssParams);
              //echo '</pre>';
              //echo __LINE__ . ' : $ssFiles = ' . $ssFiles . '<br />';
              //echo '<pre>';
              //print_r($ssFiles);
              //echo '</pre>';
              //die();
              
              $modx->regClientStartupHTMLBlock('
                  <script type="text/javascript"
                          src="http://ajax.googleapis.com/ajax/libs/jquery/1.3.2/jquery.min.js"></script>
                  <script type="text/javascript"
                          src="http://ajax.googleapis.com/ajax/libs/jqueryui/1.7.2/jquery-ui.js"></script>
                  <style type="text/css">
                  .w {
                      background-color: #999;
                      height: 130px;
                      width: 130px;
                      border: 1px solid #333;
                      margin: 7px;
                  }
                  .wa {
                      float: left;
                      margin-right: 3px;
                      margin-left: 3px;
                      border: 1px dashed #999;
                      width: 145px;
                      height: 500px;
                  }
                  #w6 {
                      background-image: url(' . $ssParams['gdir'] . 'sortable/ball-puzzle_06.gif);
                  }
                  #w2 {
                      background-image: url(' . $ssParams['gdir'] . 'sortable/ball-puzzle_02.gif);
                  }
                  #w1 {
                      background-image: url(' . $ssParams['gdir'] . 'sortable/ball-puzzle_01.gif);
                  }
                  #w3 {
                      background-image: url(' . $ssParams['gdir'] . 'sortable/ball-puzzle_03.gif);
                  }
                  #w8 {
                      background-image: url(' . $ssParams['gdir'] . 'sortable/ball-puzzle_08.gif);
                  }
                  #w4 {
                      background-image: url(' . $ssParams['gdir'] . 'sortable/ball-puzzle_04.gif);
                  }
                  #w5 {
                      background-image: url(' . $ssParams['gdir'] . 'sortable/ball-puzzle_05.gif);
                  }
                  #w7 {
                      background-image: url(' . $ssParams['gdir'] . 'sortable/ball-puzzle_07.gif);
                  }
                  #w9 {
                      background-image: url(' . $ssParams['gdir'] . 'sortable/ball-puzzle_09.gif);
                  }
                  </style>
              
              	<script type="text/javascript">
              	$(function() {
              		$("#wa1, #wa2, #wa3").sortable({
              			connectWith: \'.wa\'
              
              		});
              
              	});
              	</script>
              ');
              
              $w_ids = array('wa1', 'wa2', 'wa3');
              $w = array('w1', 'w2', 'w3', 'w4', 'w5', 'w6', 'w7', 'w8', 'w9');
              shuffle($w);
              
              $output = '';
              foreach ($w_ids as $w_id) {
                  $output .= '
                  <div id="' . $w_id . '" class="wa">
              
              ';
                  $i = 0;
                  foreach ($w as $k => $v) {
                      $output .= '
                      <div id="' . $v . '" class="w"></div>
              ';
                      unset($w[$k]);
                      $i++;
                      if ($i % 3 == 0) {
                          break;
                      }
                  }
                  $output .= '
              
                  </div>
              
              ';
              }
              
              echo $output;
              
                Rico
                Genius is one percent inspiration and ninety-nine percent perspiration. Thomas A. Edison
                MODx is great, but knowing how to use it well makes it perfect!

                www.virtudraft.com

                Security, security, security! | Indonesian MODx Forum | MODx Revo's cheatsheets | MODx Evo's cheatsheets

                Author of Easy 2 Gallery 1.4.x, PHPTidy, spieFeed, FileDownload R, Upload To Users CMP, Inherit Template TV, LexRating, ExerPlan, Lingua, virtuNewsletter, Grid Class Key, SmartTag, prevNext

                Maintainter/contributor of Babel

                Because it's hard to follow all topics on the forum, PING ME ON TWITTER @_goldsky if you need my help.
                • 18913
                • 654 Posts
                @goldsky : Thanks for that code. Can you point me to the file that needs the change you referenced? I looked for config settings but didn’t see anything obvious. Apologies if I’m overlooking something or being particularly dense wink
                Matt

                Skip that. I would have helped myself by downloading the latest version wink
                Matt
                  • 18913
                  • 654 Posts
                  @goldsky : Thanks very much for the code snippet you provided. Here’s where I am so far :
                  <?php
                  
                  $ssParams = $this->_getSlideShowParams();
                  
                  $ssFiles = $this->_getSlideShowFiles();
                  
                  $modx->regClientStartupHTMLBlock('
                    <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.3.2/jquery.min.js"></script>
                    <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jqueryui/1.7.2/jquery-ui.min.js"></script>
                  
                      <style type="text/css">		
                  		#actioninfo {
                  			width: 400px;
                  			background: gray; 
                  			color: white; 
                  			overflow:auto;
                  		}
                  		.drag {
                  			position:relative;
                  			display:block;
                  			float: left; 
                  			width: 400px;
                  		}
                  		#sortlist { 
                  			width: 400px; 
                  			height: 135px; 
                  			background: gray; 
                  			color: white; 
                  			overflow:auto;
                  		}
                  		.listitem {
                  			position:relative;
                  			display:block;
                  			float: left;    
                  			list-style-type: none;
                  			height: 130px;    
                  			width: 130px;    
                  			background: green;
                  			text-align: center;
                  		}		
                      </style>
                  	
                  	<script type="text/javascript"> 
                  	$(document).ready(function() {
                  		$(".drag > div").draggable({
                  			helper:"clone",
                  			cursor: "move",
                  			connectToSortable:"#sortlist"
                  			});
                  		$("#sortlist").sortable({
                  			cursor: "move"
                  			});
                  		$("#updatelist").click(function () {
                  			var order = $("#sortlist").sortable("toArray");
                  			$("#actioninfo").load("index.php?id=58&"+Math.random()*99999+"&outlist="+order);
                  			});
                  		});
                  	</script>
                  
                  ');
                  
                  $output = '';
                  $output .='<div>
                  Select from these by dragging ...</div>';
                  
                  $imgs = $ssFiles['src'];
                  $output .= "<div class='drag'>";
                  foreach ($imgs as $k => $v) {
                  $output .= "
                      <div id='" . $v . "' class='listitem'>
                      <img src='" . $v . "' title='".$v."' />
                      </div>
                  ";
                      unset($imgs[$k]);
                  }
                  $output .= "</div>";
                  
                  $output .= '<div>...and dropping here :<br/>
                  <div id="sortlist"></div> 
                  <div id="updatelist"><input type="submit" value="Update"></div>
                  <!--<div id="clearlist"><input type="submit" value="Update"></div>-->
                  <div id="actioninfo">PHP output will show up here</div>
                  </div>
                  ';
                  
                  echo $output;
                  ?>
                  


                  Snippet call :
                  [ ! easy2? &slideshow=`sortable` &gid=`1` &ss_limit=`5` &ss_orderby=`random` ! ]
                  


                  The document that is called uses a blank template and only has a call to a snippet, like this :
                  [ ! getlist ! ]
                  


                  And the snippet getlist loops through the array passed from "sortable" and - for now - outputs examples of SQL calls that could be used to update a database. I drew heavily from the work found here http://www.wil-linssen.com/musings/entry/extending-the-jquery-sortable-with-ajax-mysql/

                  So what this is supposed to do is allow for the selection and ordering of a set of images by dragging and dropping, after which they’ll be glued together into one image.

                  Here are a few questions I’ve got, most of which are jQuery oriented, I guess.
                  How select thumbnails from gallery using a checkbox and then create image pool from that?
                  How remove from drop area?
                  How limit drop area content to, say, 3 images?
                  How glue together into one image?
                  How clear drop area to start over with existing selection of images?

                  Relevant to E2G, though, would be a) how can I feed a gallery grid/list to this and b) is there any utility already available in E2G (or MODX) that would help be glue the images together? (I know in the E2G manager you have some editing/resizing ability.)

                  Alternatively, having perhaps a better idea of what I’m trying to accomplish, is there an easier way to do it with what is in E2G???

                  Any thoughts would be appreciated. I wouldn’t say I’m stuck in any particular spot yet as needing a sounding board.

                  TIA,
                  Matt

                  EDIT : Looks like PHP’s GD functions might do the trick re: gluing images together .....
                    • 11055 ☆ A M B ☆
                    • 3,112 Posts
                    interesting.
                    are you talking about back-end or front-end?
                      Rico
                      Genius is one percent inspiration and ninety-nine percent perspiration. Thomas A. Edison
                      MODx is great, but knowing how to use it well makes it perfect!

                      www.virtudraft.com

                      Security, security, security! | Indonesian MODx Forum | MODx Revo's cheatsheets | MODx Evo's cheatsheets

                      Author of Easy 2 Gallery 1.4.x, PHPTidy, spieFeed, FileDownload R, Upload To Users CMP, Inherit Template TV, LexRating, ExerPlan, Lingua, virtuNewsletter, Grid Class Key, SmartTag, prevNext

                      Maintainter/contributor of Babel

                      Because it's hard to follow all topics on the forum, PING ME ON TWITTER @_goldsky if you need my help.
                      • 18913
                      • 654 Posts
                      @goldsky : I got the PHP routine running to glue the images together and serve it up as a forced download. At least it works in the case of two pre-specified images. Now I just need to adapt it to glue N-images together using the info passed in the array. Nothing that a beer and an hour of goofing around won’t take care of smiley

                      My bigger issues are actually related to the jQuery sortable/droppable/draggable functions. I’m really not that familiar with how they work, so at the moment I still need to figure out how to remove an item from the list, clear the list, etc.

                      As best as I can tell the remaining E2G issue is how to take a grid of thumbnails and make them draggable as in the above example. I *think* I know how to accomplish that but haven’t tried it out.

                      I guess one other issue might be how to pair down a large universe of thumbnails into a smaller, temporary, on-the-fly gallery from which to drag and drop. Here’s an example of what I mean :

                      Let’s say you have individual images of the characters in a bunch of different alphabets/languages. You’d like to create a montage of just, say, all the characters that have the property/tag of being the "first" in the alphabet. But you really don’t want all of them in the montage, just some. And you don’t know their names, or ahead of time which ones will look best in the montage. So you’d like to have a subset created based on that tag from which you would *then* drag-and-drop. That mini-universe might still span a couple of document pages (i.e. it may need pagination), but they still need to be droppable into a work area.

                      Hopefully that makes some sense wink
                      Matt