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
  #122  
Old 11-18-2004, 06:06 PM
ADiuM ADiuM is offline
 
Join Date: Sep 2004
Posts: 15
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Ok nevermind got it..

Open up dt.php

Find:

Code:
  $filename=preg_replace("/[.&!:\\\?\^\'\"\$]/", '', $thread[title]);
AFTER add:

Code:
  $filename=preg_replace("[\s]", "_", $thread[title]);
That'll replace all spaces in the topic title to underscore's... you can replace the _ with whatever you want to seperate the words.

Works perfectly now in Firefox 1.0
Reply With Quote
  #123  
Old 11-27-2004, 07:32 PM
breathwork's Avatar
breathwork breathwork is offline
 
Join Date: Jun 2004
Location: Belgium
Posts: 12
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Verrrry Niiiiiice

Clicks install

Geoffrey
Reply With Quote
  #124  
Old 01-30-2005, 11:50 PM
iSpanish's Avatar
iSpanish iSpanish is offline
 
Join Date: Jan 2005
Location: Oregon
Posts: 124
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Nice and cooool hack

*Installed*
Reply With Quote
  #125  
Old 03-25-2005, 02:10 PM
Polo's Avatar
Polo Polo is offline
 
Join Date: Jun 2004
Posts: 893
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Thank you Logician, great hack... and also thanks to adium... that fixed the issue with firefox

[high]* Polo clicks install[/high]
Reply With Quote
  #126  
Old 04-20-2005, 04:43 AM
Aylwin Aylwin is offline
 
Join Date: Mar 2005
Location: Finland
Posts: 59
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Great hack, Logician! Thanks! Thanks also to ADiuM for sorting out the Firefox issue!

By the way, does anyone else have text formatting problems? Regardless of whether it's txt or rtf, the files don't display exactly right with either Notepad or Word. With Wordpad, it looks fine though.

I'd like to generate a "proper" rtf file by adding some control codes but I need some help. How do I print "{\rtf" without the "\r" being misinterpretted? Also, is there any way to preg_replace or add characters after each line break or carriage return?

Here's sample of rtf code:
Code:
{\rtf
Hello!\par
I need some {\b help}.\par
}
That would generate:

Hello!
I need some help.

As you can see, we could also preg_replace the bbcode with rtf code to make nicer looking files. I'd like to do that too but I first need to figure how to get started with the basics.

Regards,
Aylwin

edit:
Figured it out.
Reply With Quote
  #127  
Old 04-20-2005, 08:41 AM
Aylwin Aylwin is offline
 
Join Date: Mar 2005
Location: Finland
Posts: 59
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Attached is my version of dt.php which produces an RTF formatted document. It also interprets the bbcode for bold, italic and underline.
Reply With Quote
  #128  
Old 05-06-2005, 04:29 AM
Imperial Fritz Imperial Fritz is offline
 
Join Date: Dec 2003
Posts: 71
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

nice improvement, but doesn't work for cyrillic encoding
Reply With Quote
  #129  
Old 05-06-2005, 04:48 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 Imperial Fritz
nice improvement, but doesn't work for cyrillic encoding
It should.. What exactly happens?
Reply With Quote
  #130  
Old 05-06-2005, 04:55 AM
Aylwin Aylwin is offline
 
Join Date: Mar 2005
Location: Finland
Posts: 59
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Imperial Fritz
nice improvement, but doesn't work for cyrillic encoding
If you're referring to my version, have a look at line 108:
Code:
  print '{\rtf1\ansi\ansicpg1252\uc1 \deff0\deflang1033\deflangfe1033{\fonttbl{\f0\fswiss\fcharset0\fprq2{\*\panose 020b0604020202020204}Arial;}}{\f0 \fs22';
The character encoding is ansicpg1252. Try changing that to the correct version for cyrillic. Sorry, I can't check it right now but just reply if you need more help.

Aylwin

edit:
Perhaps you can try this:
Code:
  print '{\rtf1\ansi\ansicpg1251\uc1 \deff0\deflang1026\deflangfe1026{\fonttbl{\f0\fswiss\fcharset0\fprq2{\*\panose 020b0604020202020204}Arial;}}{\f0 \fs22';
1251 is for Windows 3.1 (Cyrillic) and default language 1026 is for Bulgarian
Reply With Quote
  #131  
Old 05-07-2005, 05:47 PM
Imperial Fritz Imperial Fritz is offline
 
Join Date: Dec 2003
Posts: 71
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

um, weird, wordpad opens the file but shows only a few lines and those aren't cyrillic either, and word just says "wrong filename/part of file" even if I change the filename to a 1-2 latin characters.

well I'm ok with the pure text version so don't really sweat over it
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:35 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.10329 seconds
  • Memory Usage 2,304KB
  • 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
  • (5)bbcode_code
  • (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
  • (3)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