We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 12236
    • 48 Posts
    Digital Butter - MODX Premiere Partners Reply #11, 15 years, 8 months ago
    Thanks Thomas, we’ll check on this for the next release.
      • 18453
      • 66 Posts
      This plugin is just great.
      I couldn’t find it on the roadmap, so I’ll ask it here: is there going to be some multiple image upload function just like evogallery?
        • 32412
        • 21 Posts
        Quote from: Thomas108 at Jan 19, 2011, 02:38 AM

        Thanks for quick answer. I reinstalled revo 2.0.7 and Gallery again.
        Still the error remained.
        Then I uninstalled a few extras, when I uninstalled Upfront Editor, the Fatal Error was gone.

        Anyone else has this combination running successfully ?

        PS: I will give them a note anyway on the upfront website.


        I got the same error. Also when I uninstalled upfront the error message was gone.
        Do you already have find a solution?
          • 17249 ☆ A M B ☆
          • 165 Posts
          What's the easiest way to call the front picture of an album having only the album ID, lets say in a TV?
          I need that for making a call for that picture in a getResources list of resources.
            • 17249 ☆ A M B ☆
            • 165 Posts
            Just in case you're interested, i figured out the solution to my question creating this Snippet:
            I don't know if is the best solution, but it works good. That way cms users can select an album using galleryalbumlist TV to associate an Gallery Album with a Post and show the image using getResources for example.

            /* Get Cover Album Pic by Album Id */
            
            $gallery = $modx->getService('gallery','Gallery',$modx->getOption('gallery.core_path',null,$modx->getOption('core_path').'components/gallery/').'model/gallery/',$scriptProperties);
            if (!($gallery instanceof Gallery)) return '';
            
            $files_url = $modx->getOption('gallery.files_url',null,$modx->getOption('core_path').'assets/components/gallery/files/');
            $gid = (int)$modx->getOption('gid',$scriptProperties,2);
            
            $output ='';
            
            /* setup thumb properties */
            $thumbProperties = array(
                'w' => (int)$modx->getOption('thumbWidth',$params,150),
                'h' => (int)$modx->getOption('thumbHeight',$params,120),
                'zc' => (boolean)$modx->getOption('thumbZoomCrop',$params,1),
                'far' => (string)$modx->getOption('thumbFar',$params,'C'),
                'q' => (int)$modx->getOption('thumbQuality',$params,90),
                'f' => 'jpeg',
            );
            
            	$c = $modx->newQuery('galItem');
            	$c->innerJoin('galAlbumItem','AlbumItems');
            	$c->where(array(
            		'AlbumItems.album' => $gid,
            	));
            	$c->sortby('rank','ASC');
            	$c->limit(1);
            	$coverItem = $modx->getObject('galItem',$c);
            	
            $output .= $coverItem->get('thumbnail',$thumbProperties);
            
            return $output;
            
            


            Sure it needs some sanity checks yet, in that line for example:
            $gid = (int)$modx->getOption('gid',$scriptProperties,2);
            You will need to update to an existing gallery to use as default in case no album is selected in the cms.

            Assuming you created an 'image' TV with input type galleryalbumlist you can use the snippet in a normal getResources call of posts:

            <img src="[[GalleryCoverPic? gid=`[[+tv.image]]`]]" />



            Why not just use galleryItem input type?
            For editors its easier to just select from the drop down the gallery you want using the galleryalbumlist input type instead of cropping everytime, etc. If you want to change the cover pic, just drag the image to the first position in the Update Album page.

            Then you use a fixed parameters in the snippet call for consistency. Hope it helps.


            [ed. note: lithiumlab last edited this post 14 years, 10 months ago.]