vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 3.0 Full Releases (https://vborg.vbsupport.ru/forumdisplay.php?f=33)
-   -   Download Forum Thread To Your Computer (Vb3.x) (https://vborg.vbsupport.ru/showthread.php?t=65536)

ADiuM 11-18-2004 06:06 PM

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

breathwork 11-27-2004 07:32 PM

Verrrry Niiiiiice

Clicks install

Geoffrey

iSpanish 01-30-2005 11:50 PM

Nice and cooool hack

*Installed*

Polo 03-25-2005 02:10 PM

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

[high]* Polo clicks install[/high]

Aylwin 04-20-2005 04:43 AM

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. :)

Aylwin 04-20-2005 08:41 AM

Attached is my version of dt.php which produces an RTF formatted document. It also interprets the bbcode for bold, italic and underline.

Imperial Fritz 05-06-2005 04:29 AM

nice improvement, but doesn't work for cyrillic encoding :)

Logician 05-06-2005 04:48 AM

Quote:

Originally Posted by Imperial Fritz
nice improvement, but doesn't work for cyrillic encoding :)

It should.. What exactly happens?

Aylwin 05-06-2005 04:55 AM

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

Imperial Fritz 05-07-2005 05:47 PM

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 :)

mikehawk 07-17-2005 11:58 PM

Firefox deals with it kind of badly (when you have downloaded it, it doesn't recognize it as a .txt file unless you open it with notepad from the list) but IE is perfect for it.

Nice work. :squareeyed:

/me installed this hack.

csidlernet 07-20-2005 06:41 AM

/me whacks install button

Logician 09-30-2005 01:28 PM

version 3.5 of this hack is released here:
https://vborg.vbsupport.ru/showthread.php?t=97217

Areku 12-12-2005 06:05 AM

Can you still fix the following bug?

Whenever downloading a thread as txt, the SOFT ERASED posts are also written onto the final txt.

Logician 12-12-2005 07:02 AM

Quote:

Originally Posted by Areku
Can you still fix the following bug?

Whenever downloading a thread as txt, the SOFT ERASED posts are also written onto the final txt.

I've fixed the bug, thanks for pointing it out. You can replace dt.php with the new file attached to the first post.

Very interesting this remained hidden for such a long time.

MyraB 11-09-2008 12:21 AM

This does not work for me--vBulletin Version 3.7.3--and I know I installed it correctly.
The "Download" option shows up in the "Thread Tools" pulldown, but when I click on it I get a blank page.

Perhaps later versions of vBulletin break it. Anyone have a hack that works?

Thank you.

Myra

MyraB 11-09-2008 12:40 AM

Whoops, my bad. I think I tried to install an outdated hack.
I'm playing with this one now:
https://vborg.vbsupport.ru/showthrea...ownload+thread


All times are GMT. The time now is 04:17 AM.

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.01172 seconds
  • Memory Usage 1,755KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (5)bbcode_code_printable
  • (3)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (2)pagenav_pagelink
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (17)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.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/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.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
  • printthread_start
  • pagenav_page
  • pagenav_complete
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete