I have tried searching numerous terms, I thought there was an addon that showed a portion of the last post on forumdisplay / threadbit.
Does anyone know of anything that exists? so in the last post box it shows a snip of what the last post was.
**Just went ahead and made the plugin since I wasn't finding anything**
Hook location: threadbit_display
plugin code:
PHP Code:
$query = $db->query_first("
SELECT pagetext
FROM " . TABLE_PREFIX . "post AS post
WHERE post.threadid= $thread[threadid]
AND post.visible = 1
ORDER BY post.dateline DESC
LIMIT 1");
$full = $query['pagetext'];
$snip = strlen($full) > 35 ? substr($full,0,35)."..." : $full;
Place
$snip in threadbit where desired, and change both instances of
35 to accommodate the length of characters you want to display.