PDA

View Full Version : Hover preview LAST post in thread?


northernstar
05-14-2004, 12:09 AM
I did a search and couldn't find anything...
So, is there anyway to preview the last post in a thread when you hover over the link instead of the first post? Thanks

sabret00the
08-12-2004, 08:21 AM
i wanted a version of this, i wanted to keep the existing system but wanted it so that when you hover over the go to last post button it shows the last post.

kall
08-12-2004, 09:36 AM
Ah, that's what I wanted actually, preview first and last post hovers.

;)
Me too.

I believe it is possible, and even think that it is done with one of the 'latest threads on forumhome' hacks...but can't remember details.

:)

Giveit2u43
08-12-2004, 11:47 PM
> Thanks to Mini2 for noticing I'd missed out a the limiting of a preview to the set value in the admincp :)

Does still need testing, but here ya go:

edit forumdisplay.php and find:
$previewfield = "post.pagetext AS preview,";
$previewjoin = "LEFT JOIN " . TABLE_PREFIX . "post AS post ON(post.postid = thread.firstpostid)";


change that to:
$previewfield = "post.pagetext AS preview, post2.pagetext AS preview2,";
$previewjoin = "LEFT JOIN " . TABLE_PREFIX . "post AS post ON(post.postid = thread.firstpostid)
LEFT JOIN " . TABLE_PREFIX . "post AS post2 ON(post2.threadid = thread.threadid)AND(post2.dateline = thread.lastpost)";

edit functions_forumdisplay.php and find:
$thread['preview'] = strip_quotes($thread['preview']);/code]

and add below it:
[code] $thread['preview2'] = strip_quotes($thread['preview2']);
$thread['preview2'] = htmlspecialchars_uni(fetch_trimmed_title(strip_bbc ode($thread['preview2'],false,true),$vboptions['threadpreview']));


edit the template threadbit find:
<phrase 1="member.php?find=lastposter&amp;t=$thread[threadid]" 2="$thread[lastposter]">$vbphrase[by_x]</phrase> <a href="showthread.php?$session[sessionurl]goto=lastpost&amp;t=$thread[threadid]"><img class="inlineimg" src="$stylevar[imgdir_button]/lastpost.gif" alt="$vbphrase[go_to_last_post]" border="0" />

and change it to:
<phrase 1="member.php?find=lastposter&amp;t=$thread[threadid]" 2="$thread[lastposter]">$vbphrase[by_x]</phrase> <a href="showthread.php?$session[sessionurl]goto=lastpost&amp;t=$thread[threadid]"><img class="inlineimg" src="$stylevar[imgdir_button]/lastpost.gif" alt="$vbphrase[go_to_last_post]" border="0" title="$thread[preview2]" />

and voila on mousing over the last post button you`ll now have a preview of the message..

kall
08-13-2004, 12:11 AM
Does still need testing, but here ya go:

edit forumdisplay.php and find:
$previewfield = "post.pagetext AS preview,";
$previewjoin = "LEFT JOIN " . TABLE_PREFIX . "post AS post ON(post.postid = thread.firstpostid)";


change that to:
$previewfield = "post.pagetext AS preview, post2.pagetext AS preview2,";
$previewjoin = "LEFT JOIN " . TABLE_PREFIX . "post AS post ON(post.postid = thread.firstpostid)
LEFT JOIN " . TABLE_PREFIX . "post AS post2 ON(post2.threadid = thread.threadid)AND(post2.dateline = thread.lastpost)";

edit functions_forumdisplay.php and find:
$thread['preview'] = strip_quotes($thread['preview']);/code]

and add below it:
[code] $thread['preview2'] = strip_quotes($thread['preview2']);

edit the template threadbit find:
<phrase 1="member.php?find=lastposter&amp;t=$thread[threadid]" 2="$thread[lastposter]">$vbphrase[by_x]</phrase> <a href="showthread.php?$session[sessionurl]goto=lastpost&amp;t=$thread[threadid]"><img class="inlineimg" src="$stylevar[imgdir_button]/lastpost.gif" alt="$vbphrase[go_to_last_post]" border="0" />

and change it to:
<phrase 1="member.php?find=lastposter&amp;t=$thread[threadid]" 2="$thread[lastposter]">$vbphrase[by_x]</phrase> <a href="showthread.php?$session[sessionurl]goto=lastpost&amp;t=$thread[threadid]"><img class="inlineimg" src="$stylevar[imgdir_button]/lastpost.gif" alt="$vbphrase[go_to_last_post]" border="0" title="$thread[preview2]" />

and voila on mousing over the last post button you`ll now have a preview of the message..
Sweet!

Thank you muchly!

Now...which template to edit to make it appear on a Subforum display?