vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   Modification Requests/Questions (Unpaid) (https://vborg.vbsupport.ru/forumdisplay.php?f=112)
-   -   Hover preview LAST post in thread? (https://vborg.vbsupport.ru/showthread.php?t=65086)

northernstar 05-14-2004 12:09 AM

Hover preview LAST post in thread?
 
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

Quote:

Originally Posted by mini2
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:
Code:

                $previewfield = "post.pagetext AS preview,";
                $previewjoin = "LEFT JOIN " . TABLE_PREFIX . "post AS post ON(post.postid = thread.firstpostid)";

change that to:
Code:

                $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:
[code] $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_bbcode($thread['preview2'],false,true),$vboptions['threadpreview']));

edit the template threadbit find:
Code:

<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:
Code:

<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

Quote:

Originally Posted by Giveit2u43
Does still need testing, but here ya go:

edit forumdisplay.php and find:
Code:

                $previewfield = "post.pagetext AS preview,";
                $previewjoin = "LEFT JOIN " . TABLE_PREFIX . "post AS post ON(post.postid = thread.firstpostid)";

change that to:
Code:

                $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:
[code] $thread['preview'] = strip_quotes($thread['preview']);/code]

and add below it:
Code:

                $thread['preview2'] = strip_quotes($thread['preview2']);
edit the template threadbit find:
Code:

<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:
Code:

<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?


All times are GMT. The time now is 07:03 AM.

Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.02673 seconds
  • Memory Usage 1,738KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (10)bbcode_code_printable
  • (2)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (5)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • printthread_start
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete