We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 10608
    • 36 Posts
    @goldsky:

    How can I generate a Gallery dir with thumbnails from the contained subgalleries that can be linked to a "Galleriffic" slideshow?

    Now I have to make "Photobook" container element with the call:
    [!easy2? &gid=`[*galleryID*]` &w=`234` &h=`155` &ecm=`0` &tpl=`galeryTpl` &dir_Tpl=`albumOverviewTpl`!]

    and then create a subpage from "Photobook", named "album" in which I can place the specific Galleriffic call:
    [!easy2? &gid=`[*galleryID*]` &slideshow=`galleriffic` &ss_config=`example-5`!]

    I have to pass the docId within the "albumOverviewTpl" to link to the "album" subpage and start the Galleriffic-slideshow.


    I i use the basic call [!easy2? &gid=`3` &glib=`highslide` &w=`234` &h=`155` &ecm=`0`!], I get the "Highslide" Gallery dir overview with links sends me to the Highslide album-specific slideshow. (Galleriffic has no "glib").

    I want essentially the same behaviour, but the Gallery dir thumbnails should point me to a Galleriffic slideshow. How can I do this without making a subpage?
      • 11055 ☆ A M B ☆
      • 3,112 Posts
      @geertdeg,
      You can add the ’glib’ library more than the default.
      Just search for libs.config.easy2gallery.php file, and add the configuration over there.
      You can just copy+paste+edit the other libs settings, although you might have to prepare first your custom javascript file to run Galleriffic inside an iframe.

      By only change that file, you’ll see the change inside the module AND the snippet call.
        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.
        • 11055 ☆ A M B ☆
        • 3,112 Posts
        Quote from: baadje at Jun 04, 2010, 04:56 AM

        Goldsky,
        We uploaded a (zip)file of 20MB. This was just for a test. The only two problems left are:
        - the script doesn’t make a folder while uploading a ZIP-file.
        - Some things can’t be saved in the config (online).
        I hope you can help me.
        Thanks
        What version are you using?
        The script will unzip the content starting with the first opening ZIP file.
        If you want to make folder, you should ZIP the folder, not the multiple files at once.
          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
          Quote from: goldsky at Jun 04, 2010, 06:42 AM

          Quote from: baadje at Jun 04, 2010, 04:56 AM

          Goldsky,
          We uploaded a (zip)file of 20MB. This was just for a test. The only two problems left are:
          - the script doesn’t make a folder while uploading a ZIP-file.
          - Some things can’t be saved in the config (online).
          I hope you can help me.
          Thanks
          What version are you using?
          The script will unzip the content starting with the first opening ZIP file.
          If you want to make folder, you should ZIP the folder, not the multiple files at once.

          Yet i installed the RC 1. The problem with the config is solved. I zipped a folder and he uploads the dir and files. But now the following structure is there:
            • 11055 ☆ A M B ☆
            • 3,112 Posts
            something with the Operating System.

            Is this your localhost?
            what is the environment?
              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
              No it isn’t localhost. It’s a webserver. Details:

              Database Version 5.0.32-Debian_7etch11-log
              Database Charset utf8
              Database Collation Charset utf8_general_ci

              PHP Version 5.2.0-8+etch16
                • 11055 ☆ A M B ☆
                • 3,112 Posts
                Let’s start by disabling the magic quote.

                please report back.
                  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 04, 2010, 01:29 AM

                  Unzipped as the expected.
                  Not exactly as expected. There should be Gallery folder inside Easy2 folder. Your description says:
                  "Zip’s name will be used as the new folder name."

                  Quote from: goldsky at Jun 04, 2010, 01:29 AM

                  Uhmm... Windows 7...

                  What is your server environment?

                  God ;P I was talking about my workstation. My webserver is running on Linux:
                  Linux kernel - 2.6.33.1-grsec
                  File system - ext3
                  MODx - 1.0.3
                  MySQL - 5.1.47
                  PHP - 5.2.12
                  Apache - 2.2.14

                  I’ll check it out on my localhost webserver on windows7 too. But there is something wrong in the code for sure.


                  Quote from: goldsky at Jun 04, 2010, 01:29 AM

                  My english is not good.
                  So if you want to make the help translation in english to be better, I won’t be offended. grin

                  I’m not a native speaker either smiley So maybe one of our English friends could help with that task?


                  What about encoding. I’m ready with transliteration. So when you upload file with accent characters in its name it transliterate them to the closest one. If you don’t explicitly specify Title it will take the original (not transliterated) name of that file (without extension) and use it as a title in database.

                  But... There is a question: should we do that as a default or just an optional behaviour? If we do not want to transliterate file names and save them on the filesystem with their original names, there is a bunch of additional problems. We must know filesystem encoding (not always utf-8) and original file name encoding. In most cases using locale is pointless. One of the solutions is to encode filenames with Unicode encoded names for URI. In that case we using just legal ASCI letters. That generally safe, but the file name in this case could be really long and even if the user send us file with a legal 255B filename length, after the URI encoding it will be much longer. Of course file names that long are rarely used, and if the filename exceed the 255B limit we could trim it.

                  It’s just my proposition. What do you think? Should there be an option to store files with their original names on the file system or should we transliterate all the names and use UTF-8 characters only in titles in db?

                  There is a need to change the _e2g_decode and _e2g_encode functions - now, when they rely on utf8_decode and utf8_encode they are definitely useless.

                  Read that documents:
                  http://www.phpwact.org/php/i18n/utf-8
                  http://www.phpwact.org/php/i18n/charsets
                    • 11055 ☆ A M B ☆
                    • 3,112 Posts
                    Quote from: fixedmachine at Jun 04, 2010, 10:57 AM

                    Not exactly as expected. There should be Gallery folder inside Easy2 folder. Your description says:
                    "Zip’s name will be used as the new folder name."
                    Ahh... yeah. that one. I should change that description, then.
                    I need to explain that I don’t use the pclzip.lib.php anymore, which creates the new folder from the zip’s name.
                    As I’ll speak more about i18n below, pclzip brought me a headache when I need more call back function for ’_e2g_decode’-ing.
                    So actually I’ve already created my own function.
                    Coincidentally, MODx already has one. So I deleted my own, and used MODx’s for a testing. Several tests (at my side) went succeeded. But I knew that different platforms and character based filename would bring more trouble.
                    I couldn’t identify the problem if I didn’t publish this first, NOT via MODx’s extra package.

                    Quote from: fixedmachine at Jun 04, 2010, 10:57 AM

                    God ;P I was talking about my workstation. My webserver is running on Linux:
                    Linux kernel - 2.6.33.1-grsec
                    File system - ext3
                    MODx - 1.0.3
                    MySQL - 5.1.47
                    PHP - 5.2.12
                    Apache - 2.2.14

                    I’ll check it out on my localhost webserver on windows7 too. But there is something wrong in the code for sure.

                    I believe that this part of code is the thing that bring you troubled:
                    e2g.module.class.php, line 1940:
                    <?php // highlighting
                    // _unzip function
                    
                    // str_replace must be used under windows to convert "/" into "\"
                    $complete_path = $path.str_replace('/','\\',dirname(zip_entry_name($zip_entry)));
                    $complete_name = $path.str_replace('/','\\', zip_entry_name($zip_entry) );
                    


                    If your server has magic_quotes_gpc = On, this is killing you.
                    Better you get it off.
                    Uhmm... should I put the run-time work around?

                    Quote from: fixedmachine at Jun 04, 2010, 10:57 AM

                    What about encoding. I’m ready with transliteration. So when you upload file with accent characters in its name it transliterate them to the closest one. If you don’t explicitly specify Title it will take the original (not transliterated) name of that file (without extension) and use it as a title in database.

                    But... There is a question: should we do that as a default or just an optional behaviour? If we do not want to transliterate file names and save them on the filesystem with their original names, there is a bunch of additional problems. We must know filesystem encoding (not always utf-8) and original file name encoding. In most cases using locale is pointless. One of the solutions is to encode filenames with Unicode encoded names for URI. In that case we using just legal ASCI letters. That generally safe, but the file name in this case could be really long and even if the user send us file with a legal 255B filename length, after the URI encoding it will be much longer. Of course file names that long are rarely used, and if the filename exceed the 255B limit we could trim it.

                    It’s just my proposition. What do you think? Should there be an option to store files with their original names on the file system or should we transliterate all the names and use UTF-8 characters only in titles in db?

                    There is a need to change the _e2g_decode and _e2g_encode functions - now, when they rely on utf8_decode and utf8_encode they are definitely useless.

                    I know that _e2g_decode/_e2g_encode functions is far from perfection, but I need to bring the idea that the encoding should have some selections.
                    Right now you’re talking about the polish’s character, tomorrow Japanese will ask the same question. So that’s the idea of the flexible encoding selection under a config’s variable was born.
                    Need more work? I couldn’t agree more.

                    And that’s why I don’t even use PHP’s zip extractTo() functions.
                    AFAIK, it breaks non latin-1 character.
                    Tested and proven. No chance to insert a callback function in the process.

                    ZipArchive class uses IBM850 encoding for filenames, or also other zip softwares.

                    So I think the better way is to strip down the content one by one, fwrite them, and use their [real] filename by an encoding function.
                    Well, again, I’m incompetence on this, just read them some. tongue

                    So, what you explained above is fit with my purpose.
                    Btw, when you try to create a new selection, please remember to add that new selection too on the easy2/includes/tpl/pane.config.inc.php, line 43.
                    Or for development only, you can change the value directly in the config file.

                    Quote from: fixedmachine at Jun 04, 2010, 10:57 AM

                    Read that documents:
                    http://www.phpwact.org/php/i18n/utf-8
                    http://www.phpwact.org/php/i18n/charsets
                    I’ve read them from top to bottom.
                    No, I still don’t understand, because I don’t have that ’real’ obstacle, yet. tongue

                    PS:
                    Anyway, please test the UTF-8 functions that’re already included in the includes/ folder.
                      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 04, 2010, 11:56 AM

                      If your server has magic_quotes_gpc = On, this is killing you.
                      Better you get it off.
                      Uhmm... should I put the run-time work around?

                      It’s not the magic_quotes_gpc quotes. I turned them off, and there is still the same problem. This function making problems in MODx too, so we should report it in JIRA.