View Full Version : Download Forum Thread To Your Computer (vB 3.5.x)
Logician
30 Sep 2005, 14:09
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 (http://www.vbulletin.org/forum/attachment.php?attachmentid=34972))
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 (http://www.vbulletin.org/forum/vborg_miscactions.php?do=installhack&threadid=97217), thank you.
Hacks of Hack:
* French Translation (http://www.vbulletin.org/forum/showpost.php?p=782733&postcount=8)
* Version that works with Russian Alphabet (http://www.vbulletin.org/forum/showpost.php?p=828645&postcount=29)
* Download it as RTF instead of TXT (http://www.vbulletin.org/forum/showpost.php?p=828749&postcount=30).
Enjoy the hack,
Logician
Logician
30 Sep 2005, 14:10
[Reserved for future use]....
awesome mod Logician many thanks
bigcurt
30 Sep 2005, 16:34
Congrats on the beginning of your porting process logician :).
~Curt
Would it be possible to allow downloading of threads in specific forums only?
Logician
30 Sep 2005, 16:46
Would it be possible to allow downloading of threads in specific forums only?
edit dt.php, find:
Code:
---------------
Code is only visible to licensed users, and only when logged into the forums.
---------------
after that add:
Code:
---------------
Code is only visible to licensed users, and only when logged into the forums.
---------------
Now it allows downloading only in forum 1 and 2.
Edit $allowed_forums = array('1','2'); like to add more forums to allow
oh manga you are a star, many thanks
cclaerhout
30 Sep 2005, 17:43
Works great ! Thank you.
And here's a small french translation.
dieselpowered
30 Sep 2005, 17:44
Works great....
**runs off and click install**
Odysseus
30 Sep 2005, 18:09
[Reserved for future use]....
Thanks for sharing!
* clicks install
XtremeOffroad
30 Sep 2005, 19:35
Thank you
Clicks Install
Vindicare
01 Oct 2005, 11:47
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).
cclaerhout
02 Oct 2005, 16:00
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).
My members report me that they were characters problems (accent)
IE :
On n'arrête -> On n'arrête
à s'afficher -> à s'afficher
fonctionnalités -> fonctionnalités
(...)
How can i solve it please ?
dieselpowered
05 Oct 2005, 06:06
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?
Logician
05 Oct 2005, 08:18
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?
It happens because the icon of the it is slightly smaller than the other icons in the menu. Try adding "hspace="4" to the IMG like :
<img class="inlineimg" src="$stylevar[imgdir_button]/sortasc.gif" alt="$vbphrase[DownloadThisThread]" hspace="4"/>
Or you can use a larger image there.
cclaerhout
05 Oct 2005, 10:18
Characters problem corrected.
-> solution : install the iconv module (or any one of iconv, GNU recode or mbstring) in php.
Thanks to Drupal ;)
mixylplik3
12 Oct 2005, 05:16
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?
Logician
12 Oct 2005, 07:52
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?
What you do only makes its link visible or unvisible to the thread reader. For this use:
<if condition="$bbuserinfo[usergroupid]==6">
</if>
But if you like to restrict it more strongly, edit dt.php you uploaded find this line:
Code:
---------------
Code is only visible to licensed users, and only when logged into the forums.
---------------
after that (as a new line!),add this
Code:
---------------
Code is only visible to licensed users, and only when logged into the forums.
---------------
mixylplik3
12 Oct 2005, 15:25
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?
HappyPike
12 Nov 2005, 17:14
Thanks, Logician. Just installed it at my members' request!
Psionic Vision
23 Nov 2005, 03:16
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
Logician
23 Nov 2005, 08:05
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.
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:
http://www.vbulletin.org/forum/showpost.php?p=783303&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:
---------------
Code is only visible to licensed users, and only when logged into the forums.
---------------
In other words, the text file ends after the last post. The footer is missing. Any idea why?
Logician
23 Nov 2005, 11:46
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:
---------------
Code is only visible to licensed users, and only when logged into the forums.
---------------
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..
Yep, that did it. Thanks!!!
Psionic Vision
23 Nov 2005, 13:30
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 :)
Changing it is easy:
http://www.vbulletin.org/forum/show...03&postcount=13
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. ;)
Psionic Vision
23 Nov 2005, 14:14
Ok, here goes the minimod that performs the conversion of Russian letters into appropriate English letters / letter combinations.
IN dt.php, FIND:
Code:
---------------
Code is only visible to licensed users, and only when logged into the forums.
---------------
ADD UNDERNEATH:
Code:
---------------
Code is only visible to licensed users, and only when logged into the forums.
---------------
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? :)
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.
Psionic Vision
23 Nov 2005, 16:28
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 :)
Logician
23 Nov 2005, 17:52
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"
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"This is something I would like to do too. I know how to do it in theory but I just don't have the skills to implement it. Basically, we need to do the following:
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:
---------------
Code is only visible to licensed users, and only when logged into the forums.
---------------
Can anyone help with 1) and 2)?
EDIT:
Okay, I think I figured it out.
Find:
Code:
---------------
Code is only visible to licensed users, and only when logged into the forums.
---------------
Before this line, add:
Code:
---------------
Code is only visible to licensed users, and only when logged into the forums.
---------------
At least I got something very close to this working on my rtf version.
croportal
28 Nov 2005, 19:22
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
Logician
28 Nov 2005, 19:25
how can i set another picture for this hack,
http://www.vbulletin.org/forum/showpost.php?p=783303&postcount=13
and where i can change phrase Download This Thread - i wont to set on croatian LAnguage
Admin Cp/Phrase Manager/Search In Phrases/search for "Download This Thread" in "Phrase Text"
croportal
28 Nov 2005, 19:36
thanks a lot logician
OsMoSiS.it
08 Dec 2005, 16:41
Okay, I think I figured it out.
Find:
Code:
---------------
Code is only visible to licensed users, and only when logged into the forums.
---------------
Before this line, add:
Code:
---------------
Code is only visible to licensed users, and only when logged into the forums.
---------------
At least I got something very close to this working on my rtf version.
Code:
---------------
Code is only visible to licensed users, and only when logged into the forums.
---------------
This works better, matches also names with spaces or symbols that previously broke page layout :)
* Installed with rtf hack :)
Eathanor
10 Apr 2006, 20:32
Thank you
Clicks Install
Tralala
20 Jun 2006, 21:06
Thanks for this!
does this work with vb 360? anybody adventerous tried it out?
please let me know. thanks.
to the author : i think its a great hack. could you please update for latest vb version?
aciurczak
17 Aug 2006, 16:00
Works fine with 3.6.0.
RaZor Edge
02 Nov 2006, 23:56
Great hack! It worked really fast even on thread with more than 1000 post! It even worked with a thread with more than 40 000 post!! :D
There was no problem even if the discussions of my board are in french.
jambo_1969
16 Sep 2007, 08:49
Excellent product :D
Installed
Does someone has this mod working on the latest vB 3.6.8 PL2?
mcharley94
02 Dec 2007, 00:47
Does someone has this mod working on the latest vB 3.6.8 PL2?
Yes, as of just a few moments ago I do.
Installed, Great Job!
And it also works on 3.7.0 beta 6. ;)
maestrodamuz
30 Mar 2008, 15:23
*installed*:D
This work with 3.7.1 -- anyone tested?
abrecher
15 Aug 2008, 23:39
This mod has stopped working for long threads. I have a few threads that are around 75+ pages and it's only downloading around 25 pages.
Any ideas on how to get this working for longer threads please ?
Logician
16 Aug 2008, 10:28
This mod has stopped working for long threads. I have a few threads that are around 75+ pages and it's only downloading around 25 pages.
Any ideas on how to get this working for longer threads please ?
I checked source code again and I can't see a reason why this would happen. And I don't have any thread that is as long that I can test. If you give me ftp/admin cp access to your board and url of such a thread there, I can try to debug. Through not sure if I can do anything because as far as I can see source code is fine so I'd suspect server etc. somehow. But I can check if you want to give it a shot.
This worked like a champ, and you are a genius Logician.
You also write very clear release notes and instructions.
Thank you!
Coleccromos
18 Feb 2009, 15:17
doing in my downloads forum tabulation shows the texts without
Can I do this?
cclaerhout
03 Aug 2009, 09:59
Works great on vB 3.8.3.
If you want to avoid to edit manually the showthread template, here's a new product file.
Thanks.
fattony69
27 Dec 2009, 21:20
Does this work on the latest 3.8.X? I saw this for vBulletin 4 and here, but no 3.8.
Logician
27 Dec 2009, 22:25
Yes this 3.5.x version also works with 3.6.x, 3.7.x and 3.8.x
vBulletin® v3.6.12, Copyright ©2000-2012, Jelsoft Enterprises Ltd.