We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 14165
    • 9 Posts
    This is all I entered for the folder content.....

    [!Maxigallery?display=childgalleries!]


    I get the error below....

    « MODx Parse Error »
    MODx encountered the following error while attempting to parse the requested resource:
    « PHP Parse Error »

    PHP error debug
    Error: Invalid argument supplied for foreach()
    Error type/ Nr.: Warning - 2
    File: /home/planesns/www/www/modx/manager/includes/document.parser.class.inc.php(705) : eval()’d code
    Line: 323

    Parser timing
    MySQL: 0.0075 s s (7 Requests)
    PHP: 0.0524 s s
    Total: 0.0599 s s

    Maybe it’s just me, but I am finding ModX’s intro documentation a little lacking in the basic install. undecided
      • 7923
      • 4,213 Posts
      Child galleries display mode is to display a list of already existing documents in top level.. so if the documents below that document does not have any galleries, it’s possible that you are seeing the error..

      Start by using just [!MaxiGallery!] and by looking at the "documentation", do experiments with the parameters one by one if you like. The documentation of snippets has nothing to do with MODx documentation, but if you are referring to the snippet documentation being bad, it’s true. Thanks for input.


        "He can have a lollipop any time he wants to. That's what it means to be a programmer."
        • 14165
        • 9 Posts
        Ok, that was simple stupid.......hmmm

        Anyway......this is a cut/paste from the snippet page.....

        $mgconfig['manager_webgroups'] = (isset($manager_webgroups)) ? explode(",",$manager_webgroups) : array(); // [ array ]
        $mgconfig['manager_webusers'] = (isset($manager_webusers)) ? explode(",",$manager_webusers) : array(); // [ array ]
        $mgconfig['is_target'] = (isset($is_target)) ? $is_target : false; // [ true | false ]
        $mgconfig['picture_target'] = (isset($picture_target)) ? $picture_target : ""; // [ number | empty ]
        $mgconfig['manage_target'] = (isset($manage_target)) ? $manage_target : ""; // [ number | empty ]
        $mgconfig['manage_gallery'] = (isset($manage_gallery)) ? $manage_gallery : ""; // [ number | empty ]
        $mgconfig['display_manage'] = (isset($display_manage)) ? $display_manage : true; // [ true | false ]
        $mgconfig['use_charset'] = (isset($use_charset)) ? $use_charset : $modx->config['etomite_charset']; // [charset]
        $mgconfig['pics_in_a_row'] = (isset($pics_in_a_row)) ? $pics_in_a_row : 3; // [ number ] 
        $mgconfig['pics_per_page'] = (isset($pics_per_page)) ? $pics_per_page : 0; // [ number | 0 for unlimited number ]
        $mgconfig['only_page_numbers'] = (isset($only_page_numbers)) ? $only_page_numbers : false; // [ true | false ]
        $mgconfig['max_thumb_size'] = (isset($max_thumb_size)) ? $max_thumb_size : 130; // [ number ] 
        $mgconfig['max_pic_size'] = (isset($max_pic_size)) ? $max_pic_size : 2048; // [ number | zero for unlimited size ] 
        $mgconfig['order_by'] = (isset($order_by)) ? $order_by : "pos,date"; // [ date | id | filename | title ] 
        $mgconfig['order_direction'] = (isset($order_direction)) ? $order_direction : "DESC"; // [ ASC | DESC ] 
        $mgconfig['gtable'] = (isset($gtable)) ? $gtable : "maxigallery"; // [ text ] 
        $mgconfig['display'] = (isset($display)) ? $display : "embedded"; // [ normal | embedded | childgalleries ]
        $mgconfig['childgalleries_title_field'] = (isset($childgalleries_title_field)) ? $childgalleries_title_field : "pagetitle"; // [ pagetitle | longtitle | description | introtext | menutitle ]
        $mgconfig['childgalleries_level_limit'] = (isset($childgalleries_level_limit)) ? $childgalleries_level_limit : 0; // [ number ]
        $mgconfig['embedtype'] = (isset($embedtype)) ? $embedtype : "lightboxv2"; // [ slidebox | lightboxv2 | popup | external ]
        $mgconfig['max_pic_number'] = (isset($max_pic_number)) ? $max_pic_number : 0; // [ number | 0 for unlimited number ] 
        $mgconfig['display_picno'] = (isset($display_picno)) ? $display_picno : true; // [ true | false ] 
        $mgconfig['quality_thumb'] = (isset($quality_thumb)) ? $quality_thumb : 75; // [ number between 0-100 ] 
        $mgconfig['quality_pic'] = (isset($quality_pic)) ? $quality_pic : 95; // [ number between 0-100 ] 
        $mgconfig['keep_bigimg'] = (isset($keep_bigimg)) ? $keep_bigimg : true; // [ true | false ] 
        $mgconfig['max_big_size'] = (isset($max_big_size)) ? $max_big_size : 2048; // [ number | 0 for original image ] 
        $mgconfig['quality_big'] = (isset($quality_big)) ? $quality_big : 100; // [ number between 0-100 ] 
        $mgconfig['big_img_linkstyle'] = (isset($big_img_linkstyle)) ? $big_img_linkstyle : "external"; // [ slidebox | lightboxv2 | popup | external ]
        $mgconfig['keep_date'] = (isset($keep_date)) ? $keep_date : true; // [true | false ] 
        $mgconfig['titles_in_overview'] = (isset($titles_in_overview)) ? $titles_in_overview : false; // [ true | false ]
        $mgconfig['disable_rightclick'] = (isset($disable_rightclick)) ? $disable_rightclick : false; // [ true | false ]
        $mgconfig['thumb_use_watermark'] = (isset($thumb_use_watermark)) ? $thumb_use_watermark : false; // [ true | false ]
        $mgconfig['thumb_watermark_txt'] = (isset($thumb_watermark_txt)) ? $thumb_watermark_txt : "Copyright ".date("Y"); // [ text ]
        $mgconfig['thumb_watermark_txt_color'] = (isset($thumb_watermark_txt_color)) ? $thumb_watermark_txt_color : "FFFFFF";	// [ RGB Hexadecimal ]
        $mgconfig['thumb_watermark_font'] = (isset($thumb_watermark_font)) ? $thumb_watermark_font : 1; // [ 1 | 2 | 3 | 4 | 5 ]
        $mgconfig['thumb_watermark_txt_vmargin'] = (isset($thumb_watermark_txt_vmargin)) ? $thumb_watermark_txt_vmargin : 2; // [ number ]
        $mgconfig['thumb_watermark_txt_hmargin'] = (isset($thumb_watermark_txt_hmargin)) ? $thumb_watermark_txt_hmargin : 2;	// [ number ]
        $mgconfig['thumb_watermark_img'] = (isset($thumb_watermark_img)) ? $thumb_watermark_img : "assets/snippets/maxigallery/watermark/watermark.png"; //path 
        $mgconfig['thumb_watermark_type'] = (isset($thumb_watermark_type)) ? $thumb_watermark_type : "text"; // [ text | image ]
        $mgconfig['thumb_watermark_valign'] = (isset($thumb_watermark_valign)) ? $thumb_watermark_valign : "bottom"; // [ top | center | bottom ]
        $mgconfig['thumb_watermark_halign'] = (isset($thumb_watermark_halign)) ? $thumb_watermark_halign : "right"; // [ left | center | right ]
        $mgconfig['pic_use_watermark'] = (isset($pic_use_watermark)) ? $pic_use_watermark : false; // [ true | false ]
        $mgconfig['pic_watermark_txt'] = (isset($pic_watermark_txt)) ? $pic_watermark_txt : "Copyright ".date("Y")." ".$modx->config['site_name']; // [ text ]
        $mgconfig['pic_watermark_txt_color'] = (isset($pic_watermark_txt_color)) ? $pic_watermark_txt_color : "FFFFFF";	// [ RGB Hexadecimal ]
        $mgconfig['pic_watermark_font'] = (isset($pic_watermark_font)) ? $pic_watermark_font : 3; // [ 1 | 2 | 3 | 4 | 5 ]
        $mgconfig['pic_watermark_txt_vmargin'] = (isset($pic_watermark_txt_vmargin)) ? $pic_watermark_txt_vmargin : 10; // [ number ]
        $mgconfig['pic_watermark_txt_hmargin'] = (isset($pic_watermark_txt_hmargin)) ? $pic_watermark_txt_hmargin : 10;	// [ number ]
        $mgconfig['pic_watermark_img'] = (isset($pic_watermark_img)) ? $pic_watermark_img : "assets/snippets/maxigallery/watermark/watermark.png"; //path 
        $mgconfig['pic_watermark_type'] = (isset($pic_watermark_type)) ? $pic_watermark_type : "text"; // [ text | image ]
        $mgconfig['pic_watermark_valign'] = (isset($pic_watermark_valign)) ? $pic_watermark_valign : "bottom"; // [ top | center | bottom ]
        $mgconfig['pic_watermark_halign'] = (isset($pic_watermark_halign)) ? $pic_watermark_halign : "right"; // [ left | center | right ]
        $mgconfig['big_use_watermark'] = (isset($big_use_watermark)) ? $big_use_watermark : false; // [ true | false ]
        $mgconfig['big_watermark_txt'] = (isset($big_watermark_txt)) ? $big_watermark_txt : "Copyright ".date("Y")." ".$modx->config['site_name']; // [ text ]
        $mgconfig['big_watermark_txt_color'] = (isset($big_watermark_txt_color)) ? $big_watermark_txt_color : "FFFFFF";	// [ RGB Hexadecimal ]
        $mgconfig['big_watermark_font'] = (isset($big_watermark_font)) ? $big_watermark_font : 5; // [ 1 | 2 | 3 | 4 | 5 ]
        $mgconfig['big_watermark_txt_vmargin'] = (isset($big_watermark_txt_vmargin)) ? $big_watermark_txt_vmargin : 15; // [ number ]
        $mgconfig['big_watermark_txt_hmargin'] = (isset($big_watermark_txt_hmargin)) ? $big_watermark_txt_hmargin : 15;	// [ number ]
        $mgconfig['big_watermark_img'] = (isset($big_watermark_img)) ? $big_watermark_img : "assets/snippets/maxigallery/watermark/watermark.png"; // [ path ]
        $mgconfig['big_watermark_type'] = (isset($big_watermark_type)) ? $big_watermark_type : "text"; // [ text | image ]
        $mgconfig['big_watermark_valign'] = (isset($big_watermark_valign)) ? $big_watermark_valign : "bottom"; // [ top | center | bottom ]
        $mgconfig['big_watermark_halign'] = (isset($big_watermark_halign)) ? $big_watermark_halign : "right"; // [ left | center | right ]
        $mgconfig['thumb_use_dropshadow'] = (isset($thumb_use_dropshadow)) ? $thumb_use_dropshadow : true; // [ true | false ] 
        $mgconfig['thumb_shadow_bgcolor'] = (isset($thumb_shadow_bgcolor)) ? $thumb_shadow_bgcolor : "FFFFFF"; // [ RGB Hexadecimal ]
        $mgconfig['thumb_shadow_path'] = (isset($thumb_shadow_path)) ? $thumb_shadow_path : "assets/snippets/maxigallery/dropshadow/"; // [ path ]
        $mgconfig['pic_use_dropshadow'] = (isset($pic_use_dropshadow)) ? $pic_use_dropshadow : false; // [ true | false ]
        $mgconfig['pic_shadow_bgcolor'] = (isset($pic_shadow_bgcolor)) ? $pic_shadow_bgcolor : "FFFFFF"; // [ RGB Hexadecimal ] 
        $mgconfig['pic_shadow_path'] = (isset($pic_shadow_path)) ? $pic_shadow_path : "assets/snippets/maxigallery/dropshadow/"; // [ path ]
        $mgconfig['big_use_dropshadow'] = (isset($big_use_dropshadow)) ? $big_use_dropshadow : false; // [ true | false ]
        $mgconfig['big_shadow_bgcolor'] = (isset($big_shadow_bgcolor)) ? $big_shadow_bgcolor : "FFFFFF"; // [ RGB Hexadecimal ] 
        $mgconfig['big_shadow_path'] = (isset($big_shadow_path)) ? $big_shadow_path : "assets/snippets/maxigallery/dropshadow/"; // [ path ]
        $mgconfig['thumb_use_imagemask'] = (isset($thumb_use_imagemask)) ? $thumb_use_imagemask : false; // [ true | false ]
        $mgconfig['thumb_mask_bgcolor'] = (isset($thumb_mask_bgcolor)) ? $thumb_mask_bgcolor : "FFFFFF"; // [ RGB Hexadecimal ]
        $mgconfig['thumb_mask_position'] = (isset($thumb_mask_position)) ? $thumb_mask_position : "resize"; // [ top | topleft | topright | left | center | right | bottom | bottomleft | bottomright | resize ]
        $mgconfig['thumb_mask_img'] = (isset($thumb_mask_img)) ? $thumb_mask_img : "assets/snippets/maxigallery/imagemask/demomask-frame1.png"; // [ path ]
        $mgconfig['pic_use_imagemask'] = (isset($pic_use_imagemask)) ? $pic_use_imagemask : false; // [ true | false ]
        $mgconfig['pic_mask_bgcolor'] = (isset($pic_mask_bgcolor)) ? $pic_mask_bgcolor : "FFFFFF"; // [ RGB Hexadecimal ]
        $mgconfig['pic_mask_position'] = (isset($pic_mask_position)) ? $pic_mask_position : "resize"; // [ top | topleft | topright | left | center | right | bottom | bottomleft | bottomright | resize ]
        $mgconfig['pic_mask_img'] = (isset($pic_mask_img)) ? $pic_mask_img : "assets/snippets/maxigallery/imagemask/demomask-frame2.png"; // [ path ]
        $mgconfig['big_use_imagemask'] = (isset($big_use_imagemask)) ? $big_use_imagemask : false; // [ true | false ]
        $mgconfig['big_mask_bgcolor'] = (isset($big_mask_bgcolor)) ? $big_mask_bgcolor : "FFFFFF"; // [ RGB Hexadecimal ]
        $mgconfig['big_mask_position'] = (isset($big_mask_position)) ? $big_mask_position : "resize"; // [ top | topleft | topright | left | center | right | bottom | bottomleft | bottomright | resize ]
        $mgconfig['big_mask_img'] = (isset($big_mask_img)) ? $big_mask_img : "assets/snippets/maxigallery/imagemask/demomask-frame2.png"; // [ path ]


        At first, all I had on the page was.....
        [!Maxigallery!]


        So I tried this, and it still treats it like it’s just opening up the image in the same window.
        [!Maxigallery? &display=`embedded` &embedtype=`slidebox`!]


        What stupid thing am I doing wrong?
          • 7923
          • 4,213 Posts
          There is a bug in MODx 0.9.2.1 that in certain occasions break the javascripts.. this is noted in the installation instructions too, but you should run it using cached snippet call in an uncached page..

          So [[Maxigallery]] and in the document page settings, set to not cacheable.


            "He can have a lollipop any time he wants to. That's what it means to be a programmer."