Thread Thumbnail by AddonsLab

Thread Thumbnail by AddonsLab 2.10.0

No permission to buy ($29.99)
Question: How to change the size of thread thumbnails?
Answer: The thumbnails are added to the page using the default CSS class "avatar" and can be styled just like usual avatars would be styled to appear bigger in thread list. The following CSS rule shows an example how to increase the size of thread thumbnails (and do not change the size of avatars in other parts of XenForo):

CSS:
div[data-type=thread] .structItem-cell.structItem-cell--icon {
    width: 90px;
}

div[data-type=thread] .structItem-iconContainer .threadThumbnailWrapper .avatar {
    width: 74px;
    height: 100px;
}

Typical place to put the rules would be altt_thread_thumbnail.less which loads only in forums where thread thumbnails are enabled. The rule may not work for some custom themes. Just consult your theme provider or any XenForo designer for further design suggestions.

Question: Is it possible to show thread thumbnails on locations other than forum view, for example widgets?
Answer: Yes, it is possible and easy to implement. By default, we don't show the thumbnails on lists when we see the thumbnail information is not loaded from the database, as it would cause one or two additional queries per thumbnail. We enhanced forum view page to pre-load all thumbnails at once without causing additional queries. To make thumbnails appear on custom lists and widgets the developer needs to call a method to load threads with their thumbnail information, using method $threadFinder->forFullView() if they did not do so already. It is quite a simple change and any XenForo 2.x developer should be able to do it easily in their add-on/widget. Once the method is called it will ensure the finder loads thread thumbnails along with thread information. Once the information is available, you can load the thumbnail including the template <xf:include template="altt_thumbnail"/> Please note, that the template assumes there is a $thread variable available in the scope which is an instance of \XF\Entity\Thread class.
Top Bottom