MyBB Hacks

Full Version: Preview In Latest Threads In Portal
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
A simple template modification for displaying thread preview for each thread in Latest Threads block in our Portal page.

We need Thread Tooltip Preview plugin for this.

Find this code in our portal_latestthreads_thread template:

HTML Code
<td class="{$altbg}">


Replace it with:

HTML Code
<td class="{$altbg}" title="{$thread['postpreview']}">


And find this code in the template too:

HTML Code
<span class="smalltext">


Replace it with:

HTML Code
<span class="smalltext" title="{$thread['lastpostpreview']}">


Basically, we need to put {$thread['postpreview']} variable for displaying the first post message, and {$thread['lastpostpreview']} variable for displaying the last post message.

Very neat RateU - I always hated that we could not see what a thread was about from portal. Thank you.
Nice trick Smile
Very useful Smile
With a little more modification, we can use it as a "contents" in Portal (Conditional needed - optional).
Reference URL's