Go Back   vb.org Archive > vBulletin Modifications > Archive > vB.org Archives > vBulletin 2.x > vBulletin 2.x Full Releases

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
  #152  
Old 03-28-2003, 03:43 AM
Snapperhaed Snapperhaed is offline
 
Join Date: Mar 2003
Location: Argentina
Posts: 32
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I installed this on 2.3 #3 and could not get it to work.
I entered the code line for line, checked and double checked.
While I get no errors, I do not get anything on the mouse over.

I installed the 'tpinstall.php' is the forums/admin directory. Perhaps that was the problem. The install doesnt specify, unless I over looked it. Any suggestions, help and or tips?

Looking forward to proper operation!

EDIT:

After picking at it a little more, I noticed that it would NOT show posts which existed BEFORE installing this hack, however it DOES show the preview on NEW posts. Guess thats all that matters, or am I incorrect in assuming it would show prior posts?
Reply With Quote
  #153  
Old 03-28-2003, 09:48 PM
N!ck N!ck is offline
 
Join Date: Mar 2002
Location: Lake Havasu City, AZ
Posts: 886
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

are you sure you ran tpinstall.php?
Reply With Quote
  #154  
Old 04-17-2003, 06:15 AM
Rynthar Rynthar is offline
 
Join Date: Mar 2003
Posts: 17
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

In VB 2.3.0, whenever I try to run tpinstall.php I get a mysql 1060 error after I try to go to step 2
Reply With Quote
  #155  
Old 04-20-2003, 07:40 PM
Kars10's Avatar
Kars10 Kars10 is offline
 
Join Date: Jun 2002
Location: Germany/Franken
Posts: 748
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Hi N!ck, is there a way to integrate this hack in the online.php for the Threads the users read (vB3 Style)?

Thanks in advance
Kars
Reply With Quote
  #156  
Old 04-24-2003, 04:10 PM
94supratt 94supratt is offline
 
Join Date: Dec 2002
Posts: 60
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

How do i un install this totally?
Reply With Quote
  #157  
Old 05-02-2003, 12:52 AM
Marty McFly Marty McFly is offline
 
Join Date: Feb 2002
Posts: 31
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

when trying to run the tpinstall.php i get this error:

----------------
Database error in vBulletin 2.3.0:

Invalid SQL: ALTER TABLE thread ADD firstpostid INT(10) UNSIGNED DEFAULT '0' NOT NULL
mysql error: Duplicate column name 'firstpostid'

mysql error number: 1060

Date: Thursday 01st of May 2003 08:49:37 PM
Script: http://www.purekaos.com/board/~purek...all.php?step=2
Referer:
--------------------

any ideas?
Reply With Quote
  #158  
Old 05-07-2003, 07:44 PM
translucent translucent is offline
 
Join Date: Apr 2002
Posts: 9
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Is there any way to increase the number of characters shown and to display line breaks?
Reply With Quote
  #159  
Old 05-28-2003, 09:13 PM
hukgwai's Avatar
hukgwai hukgwai is offline
 
Join Date: Oct 2001
Location: NYC
Posts: 14
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

any reason why it stops responding during step 2?
Reply With Quote
  #160  
Old 06-24-2003, 05:16 PM
Chazz Layne's Avatar
Chazz Layne Chazz Layne is offline
 
Join Date: Feb 2003
Location: Alive, Mobile and Unknown
Posts: 23
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Installed great and is running perfect here (2.2.9), but I ran into a problem with vBMyIndex shortly after. Somehow, it's preventing the News (and the add-on PotD I built) from showing anything posted since Thread Preview was installed. As much as I hate vBPortal, I must admit it is probably the same problem that dotagious ran into a couple pages back with his setup.

I'll poke around some and see what I can find in there... any one else had any luck with this issue?
Reply With Quote
  #161  
Old 06-24-2003, 08:28 PM
Chazz Layne's Avatar
Chazz Layne Chazz Layne is offline
 
Join Date: Feb 2003
Location: Alive, Mobile and Unknown
Posts: 23
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Cool, found and fixed. As dotagious had narrowed down earlier it is in newthread.php. When you're adding in the sections in there, instead of replacing the whole area, just add the small query to the bottom. The original query is still the same... I. E....

PHP Code:
      $DB_site->query("INSERT INTO post (postid,threadid,title,username,userid,dateline,attachmentid,pagetext,allowsmilie,showsignature,ipaddress,iconid,visible,isnews) VALUES (NULL,'$threadid','".addslashes(htmlspecialchars($subject))."','".addslashes($postusername)."','$bbuserinfo[userid]','".time()."','$attachmentid','".addslashes($message)."','$allowsmilie','$signature','$ipaddress','$iconid','1','Y')");
      
$postid=$DB_site->insert_id(); 
^^^^ Keep this, with whatever modifications you have done to make your portal software work.

Instead, just add this additional part (from Thread Preview) below it...
PHP Code:
      $DB_site->query("UPDATE thread SET firstpostid = '$postid' WHERE threadid = '$threadid'"); 
I don't have vB Portal installed to test it, but I am pretty sure this would fix the problem with that as well since they are built simillar at this point.
Reply With Quote
Reply

Thread Tools

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 09:38 PM.


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.04884 seconds
  • Memory Usage 2,309KB
  • 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_php
  • (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