We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 18913
    • 654 Posts
    I’ve put up a little demo of my image tagging + Easy2Gallery efforts here
    http://www.considine.net/recaptcha/e2gimage-tagging.html
    (I’m reusing the space I had the Recaptcha code on, so ignore that little cognitive disconnect ...)

    For sake of familiarity, I’m using the images goldsky put on his site. The slideshow being used is "smoothgallery" with a sliding transition. When clicking on an image from the gallery, you are taken to a full size version of the image served up by a landingpage. By clicking on the blue bar at the top, one can use the mouse to draw a rectangle around an area and then give it a tag. When the tag is submitted, you are returned to that same page. In this particular landing page, I’m not using any styling, so you need to look down to the bottom of the page.

    There you will see an updated list of tags appearing in the image, as well as an updated tag "cloud" (just a list of area tags found in the full database, with font size varying by frequency of use).

    By clicking on a tag in the "cloud" you will be brought to a gallery of just those images which have an area tag matching that selection.

    For sanity sake, I restricted the tags that can be used in the demo to "test1", "test2" ... "test10", allowing people to play with it a bit. In reality, this could be unrestricted.

    More importantly, this will also point out a glitch I have experienced. In the case of "test1", there is only one image with that tag. So clicking on that will bring up a gallery of one image. And that image only is visible in the thumbnail, not the gallery itself. But in the case of tag "test2" - which is associated with two images - both images show correctly. I don’t know what the cause of this is.

    Anyway, I’ll keep this up for a little while so others can see the idea.
    Matt
      • 11055 ☆ A M B ☆
      • 3,112 Posts
      hummm... looks like this time the arising problems come from server settings in the installation process.

      [table]
      [tr]
      [td]settings[/td]
      [td]required[/td]
      [td]recommended[/td]
      [td]purpose[/td]
      [/tr]
      [tr]
      [td]iconv_set_encoding()[/td]
      [td][/td]
      [td]V[/td]
      [td]translation[/td]
      [/tr]
      [tr]
      [td]mb_detect_encoding()[/td]
      [td][/td]
      [td]V[/td]
      [td]translation[/td]
      [/tr]
      [tr][td]set_time_limit()[/td]
      [td]V[/td]
      [td][/td]
      [td]images processing[/td]
      [/tr]
      [/table]

      Quote from: mconsidine at Jun 06, 2010, 07:51 AM

      Installed locally on XAMPP/Vista as well as remotely on Bluehost. Installs went fine. Only two issues I have noticed are
      - friendly urls need to be on
      and
      - a slideshow that ends up with only one image does not display the image. For example, the smoothgallery/slidingtransitions slideshow will correctly show the images filename as well as show it in the "pictures" thumbnail strip. But the main gallery image will be blank.

      Not sure yet if one or both of these issues are specific to me. I don’t believe the second one is a result of anything I’m doing though.

      OK, I will hunt the bug.

      Quote from: fixedmachine at Jun 06, 2010, 09:25 AM

      Goldsky. Still the same problem with installer. If there is no /assets/images/gallery/ folder than installer throw an error:
      folder "assets/images/gallery/" empty

      Uhmm... yes, I’ve changed the default gallery path, as sottwell mention about it on the EvoGallery forum.
      But looks like the installer needs to display the options selection, rather than throw this error.
      I will make the change.
      Quote from: fixedmachine at Jun 06, 2010, 09:25 AM

      Unzip function now works for me smiley
      YES!! Then I will post this as a patch to the MODx’s unzip function. laugh

      Quote from: mconsidine at Jun 06, 2010, 09:30 AM

      I’ve put up a little demo of my image tagging + Easy2Gallery efforts here
      http://www.considine.net/recaptcha/e2gimage-tagging.html
      (I’m reusing the space I had the Recaptcha code on, so ignore that little cognitive disconnect ...)
      YES!! That’s what I talked about!!
      Fantastic mconsidine !! Thx for sharing.
      What’s the snippet call on the landingpage, then (only to give a sight)?

      Wow, E2G will have so many plugins developers then. laugh
        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
        I’ve updated the pages to show what call is used in each case.

        The "tagpics" snippet is a combination of the "searchpics" and "easy2_wrapper" snippets mentioned earlier in this thread. The only other changes I’ve made in earlier-posted code is (I think) a deletion of a link associated with each area tag (clicking on the tag would have sent one off to a page dedicated to that tag. I could have kept it, sending one off to a gallery for that tag. But this function was already covered by the tag "cloud" code).

        One other change was to append "rec_id" to "title" in code which styles the area tag. This allows for more than one "title" of the same name to be correctly displayed.

        Matt
          • 18913
          • 654 Posts
          By the way, the above code is nearly the same as what I originally posted. So any new capability to create a plugin (or otherwise do a better job of accomplishing the same thing) hasn’t been tested yet. I need to look at how the starrating plugin is set up ...
          Matt
            • 9757
            • 82 Posts
            Modified version of module class in the attachment.

            Now it using UTF8 encoding for file names. There are some weird problems with images unpacked from zip. I don’t know why, but when file name starts with "Zaż", "Taź" or something like that mb_detect_encoding return false. If the name is:
            ŻaÁ᥹ÄäÉéĘęĚěÍíÓóÔôÚúŮůÝýČčďťĹĺŇňŔŕŘřŠšŽžĄąĘęÓóĆ棳ŃńŚśŹźŻżAaÂâAaÇçEeÉéEeËëÎîIiÔôOoUuUuÜü«»€_ÄäÉéÖöÜüß°€L.jpg


            everything is absolutely fine. If a file name inside zip is "Zaż"... than mb_detect_encoding return false and encoding is unknown. WTF? I really don’t know. I think that there is a bug inside ZipArchive.

            OK. But now, when unicode for file names works quite well, there are problems with displaying preview image and thumbnails inside gallery. Maybe you’ll be able to fix this much faster than I. There is a problem with ZIP download too.

            Check it out anyway.

              • 11055 ☆ A M B ☆
              • 3,112 Posts
              thanks, man
              what about the remove_accents() and utf8_uri_encode() functions?
              You don’t use them in the file.

              btw, from unzip function:
              <?php // highlighting
              
              $r = UTF8::substr($zip_entry_name,UTF8::strlen($zip_entry_name)-1,1);
              if ($r == '/') {
                 // creates directory
              }
              

              We don’t have to run the UTF8’s method to look for the slash, do we?

              Quote from: mconsidine at Jun 06, 2010, 07:51 AM

              and
              - a slideshow that ends up with only one image does not display the image. For example, the smoothgallery/slidingtransitions slideshow will correctly show the images filename as well as show it in the "pictures" thumbnail strip. But the main gallery image will be blank.

              Not sure yet if one or both of these issues are specific to me. I don’t believe the second one is a result of anything I’m doing though.

              http://smoothgallery.jondesign.net/forums/viewtopic.php?id=2685
              That’s the smoothgallery’s bug. smiley
                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.
                • 9757
                • 82 Posts
                Quote from: goldsky at Jun 07, 2010, 01:01 AM

                what about the remove_accents() and utf8_uri_encode() functions?
                You don’t use them in the file.

                Oh, I forgot to delete them. I planned to use them. remove_accents might be useful if we wanna add ’transliteration’ smiley So user could choose: transliterate file names or not.

                Quote from: goldsky at Jun 07, 2010, 01:01 AM

                We don’t have to run the UTF8’s method to look for the slash, do we?

                I think that we need, because if there will be an unicode characters, than strlen return wrong length and we cut that string in a wrong place. You could test it with standard functions, but I’m afraid that it might be buggy.

                  • 11055 ☆ A M B ☆
                  • 3,112 Posts
                  Quote from: fixedmachine at Jun 07, 2010, 01:14 AM

                  Oh, I forgot to delete them. I planned to use them. remove_accents might be useful if we wanna add ’transliteration’ smiley So user could choose: transliterate file names or not.
                  Oh, my...
                  so after conversion, the best option is also providing the transliterating? Or vice verse?
                    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.
                    • 2618
                    • 18 Posts
                    Hello there,

                    In the config you can set a width and height to a file. When uploading a ZIP-file this function doesn’t work?

                    Maybe i can help with the translation to dutch..

                    Greets,

                    baadje
                      • 11055 ☆ A M B ☆
                      • 3,112 Posts
                      isn’t that supposed to be like this?
                      <?php // highlighting
                      
                      $mb_detect_encoding = mb_detect_encoding($zip_entry_name);
                      
                      if($mb_detect_encoding != 'ASCII' && $mb_detect_encoding != 'UTF-8'){
                        if(!$mb_detect_encoding){
                          $zip_entry_name = UTF8::convert_from( $zip_entry_name, "ASCII" );
                        }
                        else {
                          $zip_entry_name = UTF8::convert_from( $zip_entry_name, $mb_detect_encoding );
                        }
                      }
                      



                      <?php // highlighting
                      
                      $mb_detect_encoding = mb_detect_encoding($zip_open);
                      
                      // $zip_entry_name = UTF8::convert_from( $zip_entry_name, $mb_detect_encoding );
                      // fixedmachine -- http://modxcms.com/forums/index.php/topic,49266.msg292206.html#msg292206
                      if($mb_detect_encoding == 'ASCII' || $mb_detect_encoding == 'UTF-8') {
                          $zip_entry_name = UTF8::convert_from( $zip_entry_name, "ASCII" );
                      } else {
                          $zip_entry_name = UTF8::convert_from( $zip_entry_name, $mb_detect_encoding );
                      }
                      


                      Quote from: baadje at Jun 07, 2010, 05:21 AM

                      Hello there,

                      In the config you can set a width and height to a file. When uploading a ZIP-file this function doesn’t work?
                      If it’s smaller, it won’t.
                      The resizing not inside the unzip function, but the synchronization after the unzipping.

                      Quote from: baadje at Jun 07, 2010, 05:21 AM

                      Maybe i can help with the translation to dutch..
                      Greets,
                      baadje
                      Sure... There is already a nederlands language in the newest revision.
                      Perhaps you can update it.
                      Thanks ahead.
                        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.