Go Back   vb.org Archive > vBulletin Modifications > Archive > vB.org Archives > vBulletin 2.x > vBulletin 2.x Full Releases
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools
Improved Thread Preview Hack Details »»
Improved Thread Preview Hack
Version: 1.00, by N!ck N!ck is offline
Developer Last Online: Oct 2008 Show Printable Version Email this Page

Version: 2.2.x Rating:
Released: 03-02-2002 Last Update: Never Installs: 88
 
No support by the author.

The idea for this hack was originally that of Parker Clack, a regular here on vBulletin.org.

What this hack does:
Basically, this hack pops up a little box/window when the mouse is run over a thread title that shows the first three hundred characters of the first post in the thread (that is, the post that started the thread).

Improvements to Parker Clack's hack:
  • Far, far less code...
  • Easier installation (one file edit, one template edit)...
  • Less space usage...the beginning of the first post in each thread is not stored twice - only once now!...

Versions:
3.0: Overgrow's search page thread preview instructions.
2.1: Added some necessary instructions.
2.0 Reduced MySQL queries significantly.
1.0 Initial release.

Comments appreciated...

A version for vbHacker is available here - note: some files may need fixing afterward if they present parse errors!

How to Censor Previews (by nakkid)
See page seven of this thread.

A very important security fix is available here - I have not updated the ZIP, so install it after you install the hack

Show Your Support

  • This modification may not be copied, reproduced or published elsewhere without author's permission.

Comments
  #52  
Old 03-12-2002, 03:11 AM
Overgrow's Avatar
Overgrow Overgrow is offline
 
Join Date: Nov 2001
Posts: 320
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

One of my forums, gzipped length:

20448 - with preview
13791 - without preview

To drop the field:

ALTER TABLE `thread` DROP `firstpostid`
Reply With Quote
  #53  
Old 03-17-2002, 12:03 AM
ariaforums ariaforums is offline
 
Join Date: Nov 2001
Posts: 27
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Hmm installed correctly to the letter but Im getting no popup with mouseover
Reply With Quote
  #54  
Old 03-17-2002, 01:32 AM
Erwin's Avatar
Erwin Erwin is offline
 
Join Date: Jan 2002
Posts: 7,604
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I uninstalled Parker's version and installed this one with no problems. This one works well, and just a tad quicker.

Just a note: not sure if anyone else has pointed it out, but the instructions in "threadpreview-search.txt" has a minor mistake:

In step 12

Quote:
12) Replace with:

################################################## ##########
<a href="showthread.php?s=$session[sessionhash]&threadid=$searchresult[threadid]$highlightwords" title="fppreview">$searchresult[threadtitle]</a>
################################################## ##########
It should be like this:

Quote:
12) Replace with:

################################################## ##########
<a href="showthread.php?s=$session[sessionhash]&threadid=$searchresult[threadid]$highlightwords" title="$fppreview">$searchresult[threadtitle]</a>
################################################## ##########
Just a missing $ in $fppreview.

Well done!
Reply With Quote
  #55  
Old 03-17-2002, 03:40 AM
N!ck N!ck is offline
 
Join Date: Mar 2002
Location: Lake Havasu City, AZ
Posts: 886
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

oooooooooooh yeah! typo!

ariaforums > make sure you leave your mouse on the link for a second without moving it...

if that doesn't work, you've done something incorrectly
Reply With Quote
  #56  
Old 03-17-2002, 03:42 AM
N!ck N!ck is offline
 
Join Date: Mar 2002
Location: Lake Havasu City, AZ
Posts: 886
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

so erwin, post your url
Reply With Quote
  #57  
Old 03-17-2002, 05:48 AM
beemer beemer is offline
 
Join Date: Mar 2002
Posts: 30
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

If someone has this working is it possible to post your vBulletin version? I have 2.2.4 and I constantly get this error, dots on or off.

Database error in vBulletin 2.2.4:

Invalid SQL:
SELECT DISTINCT post.userid, IF(votenum>=2,votenum,0) AS votenum,
IF(votenum>=2 AND votenum > 0,votetotal/votenum,0) AS voteavg, post2.pagetext as pagetext, icon.title as icontitle,icon.iconpath,
thread.threadid,thread.title,lastpost, forumid,pollid,open,replycount,postusername,postus erid,
lastposter,thread.dateline,views,thread.iconid,not es,thread.visible,sticky,votet otal,attach
FROM thread
LEFT JOIN icon ON (icon.iconid = thread.iconid)
LEFT JOIN post ON (thread.threadid = post.threadid AND post.userid = '1') LEFT JOIN post AS post2 ON (thread.firstpostid = post2.postid)
WHERE thread.threadid IN (0,411,399,363,322,331,313,77,78,28,95,286,280,245 ,148,217,200,163,160,129,112,1 13,114,106,103,81)
ORDER BY sticky DESC, lastpost DESC

mysql error: Unknown column 'thread.firstpostid' in 'on clause'

mysql error number: 1054

Date: Sunday 17th of March 2002 12:18:54 AM
Reply With Quote
  #58  
Old 03-17-2002, 06:04 AM
N!ck N!ck is offline
 
Join Date: Mar 2002
Location: Lake Havasu City, AZ
Posts: 886
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

yeah...ummmm...run the install script first or it won't work

and please post your url too... i always like to see this in action
Reply With Quote
  #59  
Old 03-17-2002, 08:24 AM
ariaforums ariaforums is offline
 
Join Date: Nov 2001
Posts: 27
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Hmmm just reporting I have the hack working correctly now with no noticble overheads, I think I uploaded the unedited forumdisplay.php by mistake the first time LOL
Reply With Quote
  #60  
Old 03-17-2002, 01:47 PM
N!ck N!ck is offline
 
Join Date: Mar 2002
Location: Lake Havasu City, AZ
Posts: 886
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

sounds good!
Reply With Quote
  #61  
Old 03-17-2002, 04:54 PM
freakyshiat freakyshiat is offline
 
Join Date: Nov 2001
Posts: 87
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Installed it, works like a charm
Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 02:53 AM.


Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2024, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.12060 seconds
  • Memory Usage 2,314KB
  • Queries Executed 25 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)ad_showthread_beforeqr
  • (2)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)modsystem_post
  • (1)navbar
  • (6)navbar_link
  • (120)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (4)pagenav_pagelink
  • (1)pagenav_pagelinkrel
  • (11)post_thanks_box
  • (11)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (11)post_thanks_postbit_info
  • (10)postbit
  • (11)postbit_onlinestatus
  • (11)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open
  • (1)tagbit_wrapper 

Phrase Groups Available:
  • global
  • inlinemod
  • postbit
  • posting
  • reputationlevel
  • showthread
Included Files:
  • ./showthread.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/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_post_thanks.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
  • showthread_start
  • showthread_getinfo
  • forumjump
  • showthread_post_start
  • showthread_query_postids
  • showthread_query
  • bbcode_fetch_tags
  • bbcode_create
  • showthread_postbit_create
  • postbit_factory
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • fetch_musername
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • pagenav_page
  • pagenav_complete
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete