Go Back   vb.org Archive > vBulletin Modifications > Archive > vB.org Archives > vBulletin 3.5 > vBulletin 3.5 Add-ons
FAQ Community Calendar Today's Posts Search

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

Version: 3.5.0 Rating:
Released: 09-29-2005 Last Update: 11-22-2005 Installs: 133
Uses Plugins Template Edits
Additional Files  
No support by the author.

Here is the vb 3.5.x version of my Download Forum Thread To Your Computer hack. 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 works with 3.5.x, 3.6.x, 3.7.x, 3.8.x (for vb 4.x, 3.0.x and 2.x versions see my profile.)

It is very easy to install. You can install it to your board without modifying any vb files.

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

Hacks of Hack:
* French Translation
* Version that works with Russian Alphabet
* Download it as RTF instead of TXT.


Enjoy the hack,
Logician

Show Your Support

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

Comments
  #22  
Old 10-12-2005, 02:45 PM
bing11 bing11 is offline
 
Join Date: Feb 2003
Posts: 110
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

excellent hack

but cannot show the thread name in download Txt file name in my web.

I use utf-8 chinese.

Could you help me?
Reply With Quote
  #23  
Old 11-12-2005, 03:14 PM
HappyPike's Avatar
HappyPike HappyPike is offline
 
Join Date: Feb 2002
Location: USA
Posts: 131
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Thanks, Logician. Just installed it at my members' request!
Reply With Quote
  #24  
Old 11-23-2005, 01:16 AM
akanevsky akanevsky is offline
 
Join Date: Apr 2005
Posts: 3,972
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Great, but two things are not:
1. (major) this hack does not go well with any languages other than english
2. (minor) the graphical icon in the menu is smaller that all the other icons, and it is visible - and irritating - from the first glance
Reply With Quote
  #25  
Old 11-23-2005, 06:05 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 Psionic Vision
1. (major) this hack does not go well with any languages other than english
I use it in a Turkish board and it works fine but I understand if it does not work in an other language. Unfortunately I am not able to test it with other languages.

Quote:
Originally Posted by Psionic Vision
2. (minor) the graphical icon in the menu is smaller that all the other icons,
and it is visible - and irritating - from the first glance
Changing it is easy:
https://vborg.vbsupport.ru/showpost....3&postcount=13
Reply With Quote
  #26  
Old 11-23-2005, 09:12 AM
Aylwin Aylwin is offline
 
Join Date: Mar 2005
Location: Finland
Posts: 59
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I finally upgraded to 3.5! Thanks for making this excellent hack available!

One thing I noticed though, the following line in dt.php doesn't seem to work:
Code:
print ("$vbphrase[DT_DownloadedFrom]\r\n\r\n");
In other words, the text file ends after the last post. The footer is missing. Any idea why?
Reply With Quote
  #27  
Old 11-23-2005, 09:46 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 Aylwin
I finally upgraded to 3.5! Thanks for making this excellent hack available!

One thing I noticed though, the following line in dt.php doesn't seem to work:
Code:
print ("$vbphrase[DT_DownloadedFrom]\r\n\r\n");
In other words, the text file ends after the last post. The footer is missing. Any idea why?
Good catch! Here is the fix:

Create a new phrase (in Global Group) named: DT_DownloadedFrom (Case SENSITIVE!) with this content:

Downloaded from {1} ({2}) at {3}.

This should fix it. I'm about to update the hack zip either..
Reply With Quote
  #28  
Old 11-23-2005, 09:57 AM
Aylwin Aylwin is offline
 
Join Date: Mar 2005
Location: Finland
Posts: 59
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Yep, that did it. Thanks!!!
Reply With Quote
  #29  
Old 11-23-2005, 11:30 AM
akanevsky akanevsky is offline
 
Join Date: Apr 2005
Posts: 3,972
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
I use it in a Turkish board and it works fine but I understand if it does not work in an other language. Unfortunately I am not able to test it with other languages.
Aw.. Ok. Just FYI, for Russian, it gives out empty squares instead of letter. If I figure it out, I'll tell you what to fix

Duh... I'm a coder myself, so I do know that. I just thought that you might want to edit your package to fix the incongruency.
Reply With Quote
  #30  
Old 11-23-2005, 12:14 PM
akanevsky akanevsky is offline
 
Join Date: Apr 2005
Posts: 3,972
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Ok, here goes the minimod that performs the conversion of Russian letters into appropriate English letters / letter combinations.

IN dt.php, FIND:

PHP Code:
$filename str_replace(' ''_'$filename); 
ADD UNDERNEATH:

PHP Code:
  // -----------------------------------------------------------------------------------------------------------------------------------------------
  // Download Thread :: Russian Symbols Conversion Mod by Psionic Vision
  // -----------------------------------------------------------------------------------------------------------------------------------------------
  
$preg_find = array
  (
    
"/А/""/Б/""/В/""/Г/""/Д/""/Е/""/Ё/""/Ж/""/З/""/И/""/Й/""/К/""/Л/""/М/""/Н/""/О/""/П/""/Р/""/С/""/Т/""/У/""/Ф/""/Х/""/Ц/""/Ч/""/Ш/""/Щ/""/Ъ/""/Ы/""/Ь/""/Э/""/Ю/""/Я/",
    
"/а/""/б/""/в/""/г/""/д/""/е/""/ё/""/ж/""/з/""/и/""/й/""/к/""/л/""/м/""/н/""/о/""/п/""/р/""/с/""/т/""/у/""/ф/""/х/""/ц/""/ч/""/ш/""/щ/""/ъ/""/ы/""/ь/""/э/""/ю/""/я/"
  
);
  
  
$preg_replace = array
  (
    
"A""B""V""G""D""E""Jo""Zh""Z""I""J""K""L""M""N""O""P""R""S""T""U""F""H""C""Ch""Sh""Sh'""'""Y""'""Je""Ju""Ja",
    
"a""b""v""g""d""e""jo""zh""z""i""j""k""l""m""n""o""p""r""s""t""u""f""h""c""ch""sh""sh'""'""y""'""je""ju""ja"
  
);
  
  
$filename preg_replace($preg_find$preg_replace$filename);
  
// -----------------------------------------------------------------------------------------------------------------------------------------------
  // Download Thread :: Russian Symbols Conversion Mod by Psionic Vision
  // ----------------------------------------------------------------------------------------------------------------------------------------------- 
Enjoy everyone

P.S. A few other things:
1) Is there any reason behind using application/octet-stream rather than text/plan?
2) Why not make a custom function printbr($text, $num_of_breaks = 1), that will remove the need of writing "\r\n" all the time?
Reply With Quote
  #31  
Old 11-23-2005, 02:26 PM
Aylwin Aylwin is offline
 
Join Date: Mar 2005
Location: Finland
Posts: 59
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

In case anyone is interested, I have a modified version of dt.php which downloads the thread in .rtf instead of .txt. It automatically converts bbcode for bold, italic and underline. This, imho, makes the downloaded document slightly better visually.

It's only for english though.

EDIT:
I've updated the attached file to convert bbcode for quoted text. You can also choose between Arial and Courier fonts by "switching" between lines 169 and 170. The font is Courier by default.
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 12:56 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.06861 seconds
  • Memory Usage 2,342KB
  • 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_code
  • (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