Jump to:

23490 Posts in 18996 Topics by 2878 members

General Questions

SilverStripe Forums » General Questions » Changing Assets Section

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

Page: 1
Go to End
Author Topic: 328 Views
  • Stef87
    Avatar
    Community Member
    66 Posts

    Changing Assets Section Link to this post

    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

    328 Views
Page: 1
Go to Top

Want to know more about the company that brought you SilverStripe? Then check out SilverStripe.com

Comments on this website? Please give feedback.