Pods UI Column Thumbnail

Version 1.0 added 1 year ago by scottnath

HOW TO INSTALL: To install this package, copy the following code and paste it into your Pods >> Package Manager under the Import tab and follow instructions there.

1.0 Notes

First version

About this Package

This display helper shows a thumbnail column on the manage page when using Pods UI. You will need the following code inside your Pods UI plugin to make this work:


'image'=> array('label'=>'Thumb','display_helper'=>'pods_ui_column_thumbnail' )

to see that in context, it would look like this:

function photo_page(){
$object = new Pod('photo_upload');

$object->ui = array(
'title' => 'Photos',
'item' => 'Photo',
'columns' => array(
'image'=> array('label'=>'Thumb','display_helper'=>'pods_ui_column_thumbnail' ),
'name' => 'Image Name',
'modified' => 'Last Modified'
)
);
pods_ui_manage($object);
}


** NOTE: There is a configuration option to choose a different size of thumbnail. I use the "Additional Image Sizes" plugin (http://wordpress.org/extend/plugins/additional-image-sizes/) and create a 60x60 thumbnail called "thumb_mini" that looks much better. The default for this package is set to "thumb", which is the default thumbnail size you have set in your media settings.