RM 2.0 Thumbnail dimensions

ChrisTERiS

Well-known member
Hello,

In xF1 version, in file library/XenResource/Model/Resource.php there was a variable:
Code:
public static $iconSize = 96;
which I was able to edit for changing thumbnail width.

Where this variable is locating for xF2 version?

Thank you
Chris
 
It's mapped to avatar sizes in XF2:
Code:
$targetSize = $this->app->container('avatarSizeMap')['m'];
In src/addons/XFRM/Service/ResourceItem/Icon.php.
 
Yeah it will need some CSS/Less too. In extra.less try:
Less:
.structItem.structItem--resource
{
   .structItem-cell--icon.structItem-cell--iconExpanded
   {
      width: 116px;

      .structItem-iconContainer
      {
         .avatar:not(.structItem-secondaryIcon)
         {
            .m-avatarSize(100px);
         }
      }
   }
}
 
Perfect @Chris D (as always from you)

Although personally I think it is much better placed in the xfrm.less with a xf:comment. This way it only gets pulled up when using the RM instead of so much extra baggage that is pulled up when a user access any and every page in a site when always placing stuff in the extra.less. For example if placed in the extra.less, this code would be pulled up when looking at the Forum List Page, the Thread List page etc etc etc even though it is not needed at all. So many people put so much in the extra.less and they don't realise that they are always pulling all that stuff up on every single site page load yet 90% of it is not relevant to that page thus increasing load times, site bandwidth, user data etc. plus how do they know if something is fixed/changed in a template at an update that would effect the code in the extra.less...a real headache. The inclusion/use of the extra.less is very bad in just my humble opinion

Thanks again Chris
 
what is the code for xfrm_overview_macros
Yeah it will need some CSS/Less too. In extra.less try:
Less:
.structItem.structItem--resource
{
   .structItem-cell--icon.structItem-cell--iconExpanded
   {
      width: 116px;

      .structItem-iconContainer
      {
         .avatar:not(.structItem-secondaryIcon)
         {
            .m-avatarSize(100px);
         }
      }
   }
}
 
Top Bottom