We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 7923
    • 4,213 Posts
    Quote from: Marc at Apr 16, 2006, 05:19 AM

    I have to insert the following lines in the templates to make function the snippet:

    <SNIPPED SLIDEBOX CODE>

    If I change the parameter &big_img_linkstyle=`slidebox` by &big_img_linkstyle=`lightboxv2`, I do not obtain anything any more on the increased images.
    Yes, because you had only slidebox scripts in the template.

    Quote from: Marc at Apr 16, 2006, 05:19 AM

    If I add the following lines in the template:

    <SNIPPED SLIDEBOX AND LIGHTBOX AND OTHER SCRIPTS MIXED>

    I obtain a posting of the lightbox but with a bad application of the style.
    But if I want to return to the intitiaux parameters, that does not function any more.
    If I remove the last lines, I find a correct operation.
    You can’t have all slidebox/lightbox/popup scripts at the template at the same time, because slidebox/lightbox share the same class and id names, etc.

    You don’t have to put the scripts manually to the template. They are added to the template automatically if needed, but you have to patch your MODx document parser class to get it working or wait for the next MODx release (0.9.2).

    EDIT: Also if you’re using watermarking and wan’t to use image as a watermark, you should add &thumb_watermark_type=`image` or &pic_watermark_type=`image` or &big_watermark_type=`image` to your snippet call, because text is used by default.


      "He can have a lollipop any time he wants to. That's what it means to be a programmer."
      • 8382
      • 253 Posts
      Hi, doze.

      I inform it of the result that carried out this snippet.
      I have specified $language="ja".

      [[MaxiGallery]]
      Good, All of Japanese encodings are OK.

      [[MaxiGallery?display=`embedded` &embedtype=`lightboxv2`]]
      I tested with UTF-8 and EUC-JP.
      Good.
      I have no time to test with Shift_JIS encoding.

      [[MaxiGallery?display=`embedded` &embedtype=`slidebox`]]
      I tested with UTF-8 and EUC-JP. Results of both encodings are identical.
      Windows client browser Firefox(1.5.0.2) and IE6SP1 OK.
      Mac OSX client browser Firefox(1.5.0.2) and safari(1.3.2) not displayed both caption and description.
      I wonder that a result does not change even if I input English words to both.

      And, I often received error message below.

      MODx encountered the following error while attempting to parse the requested resource:
      ≪ Execution of a query to the database failed - MySQL server has gone away ≫
      SQL: SELECT sc.id,sc.parent FROM `modx`.modx_site_content sc LEFT JOIN `modx`.modx_document_groups dg on dg.document = sc.id WHERE (sc.id=46 ) AND (sc.privateweb=0) LIMIT 1

      I want to solve these issues, too.
      Thank you very much for these excellent codes.

      Regards
        • 7923
        • 4,213 Posts
        Quote from: eastbind at Apr 16, 2006, 11:43 AM

        [[MaxiGallery?display=`embedded` &embedtype=`slidebox`]]
        I tested with UTF-8 and EUC-JP. Results of both encodings are identical.
        Windows client browser Firefox(1.5.0.2) and IE6SP1 OK.
        Mac OSX client browser Firefox(1.5.0.2) and safari(1.3.2) not displayed both caption and description.
        I wonder that a result does not change even if I input English words to both.
        Slidebox uses AJAX to get the picture title/descriptions, so I wonder if there’s something needed to be done with it what you guys did with the "FlexSearchForm with Ajax" snippet.. I’m not going to take a look at it, because I’m not able to test it, but if someone wants to do something with it, that’s great. I’m happy to hear that the character encodings are working ok at the php side of the snippet now. Thanks alot for doing the tests and for reporting your findings!

        Quote from: eastbind at Apr 16, 2006, 11:43 AM

        And, I often received error message below.

        MODx encountered the following error while attempting to parse the requested resource:
        ≪ Execution of a query to the database failed - MySQL server has gone away ≫
        SQL: SELECT sc.id,sc.parent FROM `modx`.modx_site_content sc LEFT JOIN `modx`.modx_document_groups dg on dg.document = sc.id WHERE (sc.id=46 ) AND (sc.privateweb=0) LIMIT 1
        I think that the snippet is not the culprit here.. It says on the error that "MySQL server has gone away", maybe the mysql server is overloaded at your enviroment or something? Don’t know..


          "He can have a lollipop any time he wants to. That's what it means to be a programmer."
          • 8382
          • 253 Posts
          Thank doze for your suggestion.

          I found the MySQL error caused by insufficient resource of PHP.

          I examine js source codes closely from now on.
          And hack so that slidebox works with Japanese strings on Mac OSX.
            • 7923
            • 4,213 Posts
            Just attatched new version to the first post (v04). This version has the following new parameters to use:

            &manager_webgroups
            Comma delimitted web groups that can also post pictures to this gallery and manage own pics

            &manager_webusers
            Comma delimitted web usernames that can also post pictures to this gallery and manage own pics

            &use_charset [ ISO-8859-1 | ISO-8859-15 | UTF-8 | Shift_JIS | EUC-JP | cp866 | cp1251 | cp1252 | KOI8-R | BIG5 GB2312 BIG5-HKSCS ]
            Charset to use in picture titles and descriptions. Uses charset from MODx settings by default.

            &childgalleries_title_field [ pagetitle | longtitle | description | introtext | menutitle ]
            Field name to use for the the title of the galleries when using childgalleries display mode. Default: pagetitle

            &childgalleries_level_limit [ number ]
            Level limit for looking for chilgalleries under this document, zero for unlimited. Default: 0

            I have done quick test to all the new features and they should work ok. The charset feature has been tested by Marc and eastbind with UTF-8 and EUC-JP encodings and they seem to be working also. The childgalleries display mode goes now through the whole hierarchy by default and there is a parameter to set a level limit for it.

            There is also parameters to allow webusers/usergroups to post pictures to a gallery. They can only see/manage their own pictures at the picture management. Administrator user logged in from backend can see all pics in the picture management.

            There is also a HTML page showing the parameters in a more organized fashion, thanks to PeterH for this! BTW, There is one new line at the language files, translators should translate them. It would be also good to have the German language file with htmlentities in place for the German characters!

            That is all for now. smiley ("disclaimer": beware, there might be some bugs, post your issues if you come across any)


              "He can have a lollipop any time he wants to. That's what it means to be a programmer."
              • 13736
              • 345 Posts
              Wow! The little HTML parameters file is a kick butt awesome addition. To bad the snippet manager doesn’t automaticly recognize something like this from the snippet and give a link to it.

                • 26435
                • 1,193 Posts
                Doze...
                You are the golden triscuit of this MODx cheeze tray. you are so damn cheddar.
                I love this snippet more than I love my own mother.
                (please don’t tell her I said that if you see her wink )

                all seriousness aside, this snippet rocks more than... well... more than I do!
                And I frickin’ ROCK!

                later

                -sD-
                  Husband, Father, Brother, Son, Programmer, Atheist, Nurse, Friend, Lover, Fighter.
                  All of the above... in no specific order.


                  I send pointless little messages
                  • 18219
                  • 826 Posts
                  Ola, already a new version. great work doze wink

                  For my part, I seek the possibility of making a catalogue of product. I think that this snippet but it can be appropriate would have to add a function :
                  It is a question of giving the possibility, overside each image, of putting a link towards a page of the site, a piece of music, a film, etc.

                  Just to add a link with a button ’Parcourir’ which opens the interface of file management to make it possible to select the URL of the object.

                  Example : catalogue of music or film, link for another page in shopx, etc.

                  Thanks for contributions

                  @doze : I added the translated file lang.fr
                    Marc
                    I&#39;m French... Sorry for my bad English, I use &#39; Google Translator&#39; or other... but that remains that tools wink
                    • 28434
                    • 3 Posts
                    Hello - my first post!  grin 

                    Firstly:
                    I’ve been playing with ModX for a couple of weeks so far and have really fallen for it.
                    It was a massive learning curve for me but I feel I’m finally starting to get the hang of it (I’m not a ’web guy’ by any means). I find it so much more versitle and less confining than any other CMS I’ve tried. Not being driven down the typical one track, modular, portal type of ’this is how a CMS website looks’ road is a breath of fresh air. Basically I think my imagination and creative use of CSS is the limit! –one cool product!  laugh

                    Secondly:
                    Doze,
                    I think your work with MaxiGallery is awesome - just the kind of thing of ModX needs... nice one, I really appreciate your efforts.

                    There’s one thing however I wish I could figure out how to do with the lightbox part of MaxiGallery – you did mention that feature requests are welcome!
                    I’d like if possible to be able to use MaxiGallery to create a Lightbox gallery with an ’image set’ or ’group’ but with only the first thumbnail of that ’set’ being visible. I’m not the best at describing things so have included a link to hopefully help demonstrate (non ModX, sorry) : http://steftock.com/stuff/imageset/

                    It may well be possible to do this with MaxiGallery already, but my code skills are minimal and my ModX and MaxiGallery knowledge limited. Anything to do with the childgallery parameters ??

                    With thanks and hope!
                    Stef

                      • 32926
                      • 8 Posts
                      @Stef: Welcome!

                      I needed the very same thing and created a second snippet which uses the maxi-gallery data:

                      // call like [!MaxiGallerySolo? &galID=`yourID`!]
                      // &galID has to be the id of the page you are calling yor [!MaxiGallery!] from...
                      $path_to_gal = "/assets/galleries/".$galID."/";
                      
                      $pics=$modx->getIntTableRows("*","maxigallery", "gal_id='" . $galID . "'","pos,date","DESC");
                      $i=0;
                      
                      for($i = 0; $i < count($pics); $i++) {
                      	$pic = $pics[$i];
                      	$file = $path_to_gal . $pic['filename'];
                      	$tn_file = $path_to_gal . "tn_" . $pic['filename'] ;
                      	$returnstring .= "<a href=\"$file\" rel=\"lightbox[".$galID."]\" title=\"<b>".htmlentities(stripslashes($pic['title']))."</b><br />".htmlentities(stripslashes($pic['descr']))."\">".
                      			($i > 0 ? "" : "<img src=\"$tn_file\" class=\"thumbnail\">" ) .
                      			"</a>";
                      }
                      return $returnstring;
                      


                      So I create a page with the MaxiGallery, either don’t publish it, or just don’t let it show in the menu. I then take this page-id and use it with MaxiGallerySolo. This allows you to have links to several different gallerys from one page...

                      Of course it may be well possible to integrate this behaviour into MaxiGallery itself (actually I tried, but stopped when I realised that some function used in MaxiGallery may not be called several times in one page), but this snippet serves most of my needs.

                      Greetz XriS

                      This discussion is closed to further replies. Keep calm and carry on.