We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 7455
    • 2,204 Posts
    This is very handy when you use maxigallery to show pictures from other gallery’s and do not need to use the managepictures part.

    ok I added this to the maxigallery.php file:

    add this
    $mgconfig['manage'] = (isset($manage)) ? $manage : 1; //[0 | 1] disable picture manager 
    


    after this:
    $mgconfig['debug'] = (isset($debug)) ? $debug : 0; //[0 | 1] display debug trace 
    


    change this:
    	if($_REQUEST['mode']=="admin" || ($mg->mgconfig['manage_gallery']!="" && $mg->mgconfig['manage_target']=="")) {
    


    to this:
    	if($_REQUEST['mode']=="admin" && $mg->mgconfig['manage']=="1" || ($mg->mgconfig['manage_gallery']!="" && $mg->mgconfig['manage_target']=="")) {
    


    I forgot this one, change this:
    // if not in custom query mode, make manage button available
    	if (count($mg->mgconfig['gal_query_ids']) == 0 && count($mg->mgconfig['pic_query_ids']) == 0) {
    


    to this:
    // if not in custom query mode, make manage button available
    	if (count($mg->mgconfig['gal_query_ids']) == 0 && count($mg->mgconfig['pic_query_ids']) == 0 && $mg->mgconfig['manage']=="1") {
    


    now just add &manage=`0` to your call to disable the managepicture part.



    Dimmy
      follow me on twitter: @dimmy01
      • 4172
      • 5,888 Posts
      another hack for this:

      in maxigallery.php:
      $mgconfig['formprocessing'] = isset($formprocessing) ? $formprocessing : '1';
      
      ///////////////////////////////////////////////////////////////////////////////////////////////////
      //-------------------------------------------------------------------------------------------------
      //  SNIPPET LOGIC CODE STARTS HERE
      //-------------------------------------------------------------------------------------------------

      in maxigallery.class.inc.php:
      	function checkPermissions($userid,$docid){
      		global $modx;
      		//add by Bruno
      		if ($this->mgconfig['formprocessing']=='0'){
      			return false;
      		}


      parameter in the call for the gallery, which you want prevent formprocessing:
      &formprocessing=`0`

      should work

      Bruno
        -------------------------------

        you can buy me a beer, if you like MIGX

        http://webcmsolutions.de/migx.html

        Thanks!
        • 7923
        • 4,213 Posts
        But you can also do &manageOuterTpl=`@CODE:` and &manageButtonTpl=`@CODE:` to disable picture management from some call without any hacking needed...


          "He can have a lollipop any time he wants to. That's what it means to be a programmer."
          • 4172
          • 5,888 Posts
          Thanks, doze for replying.....and for that great snippet what maxigallery is.
          But what is with uploading pictures for example, when you have more calls at one page and you don’t want to have a new document for managing with manage_target/is_target. Isn’t it that each instance of maxigallery will work with the requested datas, as long you have permission to that?
            -------------------------------

            you can buy me a beer, if you like MIGX

            http://webcmsolutions.de/migx.html

            Thanks!