Skip to main content

This site requires you to update your browser. Your browsing experience maybe affected by not having the most up to date version.

General Questions /

General questions about getting started with SilverStripe that don't fit in any of the categories above.

Moderators: martimiz, Sean, biapar, Willr, Ingo, swaiba, simon_w

Changing Assets Section


Reply


390 Views

Avatar
Stef87

Community Member, 66 Posts

23 November 2012 at 11:48pm

SilverStripe 2.4.7

Hi

I got a request from my client to enlarge the thumbnails in the assets section. After looking through the code I found this which I assumed was the right line to change.

/**
    * The width of an image thumbnail in a strip.
    * @var int
    */
   public static $strip_thumbnail_width = 50;
   
   /**
    * The height of an image thumbnail in a strip.
    * @var int
    */
   public static $strip_thumbnail_height = 50;
   
   /**
    * The width of an image thumbnail in the CMS.
    * @var int
    */
   public static $cms_thumbnail_width = 100;
   
   /**
    * The height of an image thumbnail in the CMS.
    */
   public static $cms_thumbnail_height = 100;
   
   /**
    * The width of an image thumbnail in the Asset section.
    */
   public static $asset_thumbnail_width = 100;
   
   /**
    * The height of an image thumbnail in the Asset section.
    */
   public static $asset_thumbnail_height = 100;
   
   /**
    * The width of an image preview in the Asset section.
    */
   public static $asset_preview_width = 400;
   
   /**
    * The height of an image preview in the Asset section.
    */
   public static $asset_preview_height = 200;

But no matter which value I changed it seemed to have no effect. Can anyone shed some light on this? Can I misunderstanding something fundamental?

The other request I got was to only allow the admin to upload or delete files from the assets section. Again I looked through the code and found if blocks which specified things like

<% if Can(delete) %>

My questions is where do I set these permissions to say that only the admin can delete, edit, etc?

Thanks