XF 2.1 Is there a way to custom code in the tooltip area to customize the popup display in XF 2.1.2?

Reid2

Member
We are having a problem with a new install of the latest and greatest version of XenForo. When a member hovers their mouse over a thread title in one of our forums, we want it to display from 1 to some number of photo thumbnails contained in the last post of that thread. In the previous version of XenForo, we used an addon to make this happen. Of course, this no longer functions in version 2.1.15.

In the new version, I believe the tooltip is functioning to display some text and the top half of a thumbnail from the first post of the thread. After what I think is a rather exhaustive search of the community information, I find it necessary to come to the real experts for help on identifying where we should begin to find a place to put some custom code to implement our "thread preview" with one or more thumbnails from the last post in the thread.

Any help or pointers will be appreciated. We have a web programmer who knows PHP and is reading the manual on writing XenForo addons. Thanks in advance for any help.
 
The thread preview is rendered by \XF\Pub\Controller\Thread::actionPreview() (and the corresponding thread_preview template). You should be able to extend it to do whatever you like.
 
Last edited:
Thank you so much for this information. I found I can make the tooltip larger by changing values in template core_tooltip.less. I need to figure out how to make it look at the last post instead of the first post and how to control the number if thumbnails it will display and yes - even where the tooltip is positioned on the window. Thank you again for your pointers.
 
The thread_preview template defines the inner container for the preview, but there is an outer <div class="tooltip tooltip--preview tooltip--top"> that contains styling information. Do you know where that is generated?
 
Back
Top Bottom