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

Reply
 
Thread Tools
Download Forum Thread To Your Computer (Vb3.x) Details »»
Download Forum Thread To Your Computer (Vb3.x)
Version: 1.00, by Logician Logician is offline
Developer Last Online: Nov 2023 Show Printable Version Email this Page

Version: 3.0.9 Rating:
Released: 05-25-2004 Last Update: 12-11-2005 Installs: 151
 
No support by the author.

This hacks allows you to download a forum thread into your computer (desktop etc.) as a text file with one click.

The hack adds a "DOWNLOAD THREAD" link inside Thread Tools pop-up and when clicked entire thread is downloaded to your computer. (See Screenshot)

It's useful when:
a) You want to archive and save the thread,
b) Want to read it offline,
c) It's a long thread and you want to browse it faster as a text file, use better searching features of your text editor.

The hack is tested with vB3.0.0 And vB 3.0.1, it is NOT tested with versions prior to 3.0.0. (vB2.x version is here). It is very easy to install. As a matter of fact it is an add-on, not a hack so you can install to your board without modifying any vb files. Just upload dt.php to your forum directory and make a easy change in showthread template and it is installed. Simple as that.

VERSION FOR VB 3.5 is released here:
https://vborg.vbsupport.ru/showthread.php?t=97217

If you install it, please click INSTALL, thank you.

Note : Download function is tested with IE v.6.0, Netscape v.4.7, Mozilla 1.2a and it's working fine in these browsers. I dont know other browsers or older versions though.
27.May.2004 Bug Fix : A small bug is fixed in file dt.php which effect users with prefixed tables in database.
29.May.2004 Bug Fix : A small bug in dt.php is fixed to cure post titles with special characters ("'?&) in it. Attached dt.php file is uptodate.
12.Dec.2004 Bug Fix : A small bug which causes soft deleted posts to be included in the downloaded text is fixed. Attached dt.php file is uptodate.


Note 1: If you want to use a different download thread image, see this post.
Note 2: If you want to save threads as .rtf, instead of .txt, see this post.


Enjoy the hack,
Logician

Show Your Support

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

Comments
  #102  
Old 09-07-2004, 03:20 PM
Ocean's Avatar
Ocean Ocean is offline
 
Join Date: Mar 2004
Posts: 208
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I'm having a problem. When I try to download a Thread, the file name defaults to something like "dt.php?t=14".

The Thread Title has nothing strange about it - we're talking about titles like "Smilie Test".


Any ideas?
Reply With Quote
  #103  
Old 09-07-2004, 05:15 PM
Logician's Avatar
Logician Logician is offline
 
Join Date: Nov 2001
Location: inside vb code
Posts: 4,449
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Ocean
I'm having a problem. When I try to download a Thread, the file name defaults to something like "dt.php?t=14".

The Thread Title has nothing strange about it - we're talking about titles like "Smilie Test".
Have you hacked dt.php? Is the lines around 100 is like that:
PHP Code:
  $thread[title] = unhtmlspecialchars($thread[title]);
  
$filename=preg_replace("/[.&!:\\\?\^\'\"\$]/"''$thread[title]);
  if (
strlen(trim($filename))<2) {$filename='Thread'.$threadid;}
  
header("Content-disposition: attachment;filename=".$filename.".txt"); 
Reply With Quote
  #104  
Old 09-07-2004, 08:43 PM
Ocean's Avatar
Ocean Ocean is offline
 
Join Date: Mar 2004
Posts: 208
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Logician

Have you hacked dt.php? Is the lines around 100 is like that:
I used the dt.php file as downloaded directly from here. The section you quoted is exactly what I have in my file.
Reply With Quote
  #105  
Old 09-08-2004, 05:51 AM
Logician's Avatar
Logician Logician is offline
 
Join Date: Nov 2001
Location: inside vb code
Posts: 4,449
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Ocean
I used the dt.php file as downloaded directly from here. The section you quoted is exactly what I have in my file.
For debugging purposes try to change the section above like this:

PHP Code:
echo "thread[title] = $thread[title] <br><br>";
$thread[title] = unhtmlspecialchars($thread[title]); 
echo 
"unhtmlspecialchars (thread[title]) = $thread[title] <br><br>";
  
$filename=preg_replace("/[.&!:\\\?\^\'\"\$]/"''$thread[title]); 
echo 
"filename1= $filename <br><br>";
  if (
strlen(trim($filename))<2) {$filename='Thread'.$threadid;} 
echo 
"filename2= $filename <br><br>";
  
header("Content-disposition: attachment;filename=".$filename.".txt"); 
This will make the hack stop working correctly, but it is temporary debugging so after you make the change, try to dl a thread, note what screen has been posted, you can revert the lines back.

Also please mention your vb version and the browser you are using.
Reply With Quote
  #106  
Old 09-08-2004, 10:43 AM
Ocean's Avatar
Ocean Ocean is offline
 
Join Date: Mar 2004
Posts: 208
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Logician

For debugging purposes try to change the section above like this:

This will make the hack stop working correctly, but it is temporary debugging so after you make the change, try to dl a thread, note what screen has been posted, you can revert the lines back.

Also please mention your vb version and the browser you are using.
Replacing the code in question causes no discernable difference in behavior. When I click on "Download This Thread", I get the dialog box asking me if I want to save this file - and the name is still formatted the same way.

Incidentally, if it matters - when I hover over the "Download This Thread" link, the Status Bar shows this as the URL: http://www.mydomain.com/forums/dt.php?t=3


And to answer your last question, I'm using vB 3.0.3, and IE 6.

However, something interesting to note - when I try using this hack (either original or debug version) from a FireFox 0.9.3 browser, the file name shows up as the first word in the Title.

For example, if the Title Thread is "Here we go again", these are the results I get:


IE 6 Filename: "dt.php?t=3"

FireFox 0.9.3 filename: "Here"
Reply With Quote
  #107  
Old 09-09-2004, 07:15 AM
Logician's Avatar
Logician Logician is offline
 
Join Date: Nov 2001
Location: inside vb code
Posts: 4,449
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Ocean
Replacing the code in question causes no discernable difference in behavior. When I click on "Download This Thread", I get the dialog box asking me if I want to save this file - and the name is still formatted the same way.
This does not sound right. When you add the lines, it is not possible for the hack to download the thread anymore. It should post some debugging lines into the screen then give "Warning: Cannot modify header information - headers already sent by.. " error and post the entire thread into the page. (I've tested and confirmed). Its not doing it makes me think that something is wrong with your installation like script's being run from another board (test board/localhost) or smt.
Reply With Quote
  #108  
Old 09-09-2004, 08:08 AM
Alzeimer's Avatar
Alzeimer Alzeimer is offline
 
Join Date: Feb 2004
Location: Spain
Posts: 21
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Nice hack, installed.
Reply With Quote
  #109  
Old 09-09-2004, 11:18 PM
vishalsachar vishalsachar is offline
 
Join Date: Jun 2004
Posts: 19
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Superb --- an absolute must install
Reply With Quote
  #110  
Old 09-10-2004, 01:53 PM
AbSoluTc AbSoluTc is offline
 
Join Date: Jul 2002
Posts: 12
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Just wanted to say thank you for an awsome hack and a simple install. Simple, yet one of those things that leaves you saying "how could I live without it".

Thank you and INSTALLED BABY!
Reply With Quote
  #111  
Old 09-10-2004, 03:28 PM
Ig@r's Avatar
Ig@r Ig@r is offline
 
Join Date: Feb 2002
Location: MN
Posts: 66
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

That is "must have" hack! Thank you!
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 04:37 PM.


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.06553 seconds
  • Memory Usage 2,320KB
  • 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
  • (5)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
  • (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