![]() |
Download Forum Thread To Your Computer (vB 3.5.x)
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 |
[Reserved for future use]....
|
awesome mod Logician many thanks
|
Congrats on the beginning of your porting process logician :).
~Curt |
Would it be possible to allow downloading of threads in specific forums only?
|
Quote:
PHP Code:
PHP Code:
Edit $allowed_forums = array('1','2'); like to add more forums to allow |
oh manga you are a star, many thanks
|
Works great ! Thank you.
And here's a small french translation. |
Works great....
**runs off and click install** |
Quote:
* clicks install |
Thank you
Clicks Install |
Thanks,
Installed |
Very useful hack. Thanks (*install*)
PS: I replaced the standard DL-Pic with this one, and changed the phrase to "Download TXT Version" (In analogy to my "Download PDF Version"-Menu-Item). |
Quote:
IE : On n'arrête -> On n'arr?te à s'afficher -> ? s'afficher fonctionnalités -> fonctionnalit?s (...) How can i solve it please ? |
This may be something very trivial, however, when you pull down the menu you will notice that the Download Thread is not lined up with the others.
Can this be fixed? |
Quote:
<img class="inlineimg" src="$stylevar[imgdir_button]/sortasc.gif" alt="$vbphrase[DownloadThisThread]" hspace="4"/> Or you can use a larger image there. |
Characters problem corrected.
-> solution : install the iconv module (or any one of iconv, GNU recode or mbstring) in php. Thanks to Drupal ;) |
This is a great hack, however, I want to limit its use to certain usergroups. Using the following, I have been unable to do so:
<if condition="$post[usergroupid]==6"> <tr> <td class="vbmenu_option"><img class="inlineimg" src="$stylevar[imgdir_button]/sortasc.gif" alt="$vbphrase[DownloadThisThread]" /> <a href="dt.php?$session[sessionurl]t=$threadid">$vbphrase[DownloadThisThread]</a></td> </tr> </if> Anyone else doing something similar? If so, what did you do? |
Quote:
<if condition="$bbuserinfo[usergroupid]==6"> </if> But if you like to restrict it more strongly, edit dt.php you uploaded find this line: PHP Code:
PHP Code:
|
Thank you. :cool:
|
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? |
Thanks, Logician. Just installed it at my members' request!
|
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 |
Quote:
Quote:
https://vborg.vbsupport.ru/showpost....3&postcount=13 |
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"); |
Quote:
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.. |
Yep, that did it. Thanks!!!
|
Quote:
Quote:
|
Ok, here goes the minimod that performs the conversion of Russian letters into appropriate English letters / letter combinations.
IN dt.php, FIND: PHP Code:
PHP Code:
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? :) |
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. |
That's a very nice way of output. My Russian modification will work with your file too, as it only has to do with the filename :)
|
Thanks guys.. Linked your contributions in the first post.
|
Great hack.
Is there an easy way to separate quotes within the posts from the actual replies themselves? Right now you cannot distinguish between the two and it can be confusing. :( Having the quotes in posts generate like below would make this hack near perfect :) "Some Text" -- Poster or Poster wrote: "Some Text" |
Quote:
1) Search $post['postdate'] for (QUOTE=name) 2) Replace it with name wrote: " 3) Search $post['postdate'] for (/QUOTE) 4) Replace it with " I don't know how to do 1) and 2) but I think 3) and 4) would be: Code:
$post['pagetext'] = preg_replace("[\[\/QUOTE\]]", "\"", $post['pagetext']); EDIT: Okay, I think I figured it out. Find: Code:
$post[pagetext] = strip_bbcode($post[pagetext]); Code:
$post['pagetext'] = preg_replace("[\[QUOTE=([a-zA-Z0-9_-]*)\]]", "Originally posted by \\1:\"", $post['pagetext']); |
how can i set another picture for this hack, and where i can change phrase Download This Thread - i wont to set on croatian LAnguage
|
Quote:
Quote:
|
thanks a lot logician
|
[QUOTE=Aylwin]
Okay, I think I figured it out. Find: Code:
$post[pagetext] = strip_bbcode($post[pagetext]); Code:
$post['pagetext'] = preg_replace("[\ Quote:
Code:
$post['pagetext'] = preg_replace("[\[QUOTE=(.*?)\]]", "Originally posted by \\1:\"", $post['pagetext']); * Installed with rtf hack :) |
Thank you
Clicks Install |
Thanks for this!
|
All times are GMT. The time now is 04:52 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 | |
---|---|
|
|
![]() |
|
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|