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)

Logician 06-18-2004 05:50 AM

Quote:

Originally Posted by redlabour
@Logician + Intex - i am speaking from up-to-date Mozillaengine = Firefox 0.8 + 0.9 not compatible, not the Mozillasuite. ;)

@Intex - who makes Freesoftware should be thinking about using Evil-M$ Products ! ;)

I'm sorry but I'm an evil "M$ certified" system engineer and database administrator. ;) Besides 90% internet users are using evil IE users so you should appreciate my hack still supports regular Mozilla hehe.

Frankly speaking, I didn't dl firefox yet so don't know how the hack behaves with it. But I believe they should really stop changing their engine in every 3 months. ^^

redlabour 06-19-2004 06:16 AM

Quote:

Originally Posted by Intex
Evil yeah, but still the most widely used. Developers can't ignore the mass market :).

@Logician and Intex - and only developers can change the Market ! ;)

@Logician - Firefox is only the standalone Mozillabrowsercomponent. If it runs on Mozilla it runs under Firefox. I tried it with Mozilla 1.5 & 1.6 and finally 1.7 - thats more than 3 Months ! ;)

sabret00the 06-27-2004 12:38 PM

i'm having the extention problem that was mentioned earlier, i seem to have to manually add extentions.

JirQUEST 07-06-2004 03:04 PM

hmmm, is this compatible with 3.0.3?

Logician 07-06-2004 04:25 PM

Although I didn't test it personally, I'd say yes

Andreas 07-06-2004 04:27 PM

Anyone willing to add PDF as output format? I'd really love that :)

Logician 07-06-2004 05:08 PM

Quote:

Originally Posted by KirbyDE
Anyone willing to add PDF as output format? I'd really love that :)

2 potential problems with this request:
a) PDF library is not standart in PHP installation and such a hack would require this library. So even if this hack is coded, it will not work in many boards if their hosting company didn't install this library while compiling PHP.
b) Even if it is installed, PDF library uses a lot of CPU power in the server (hence many hosting companies do not install it) so when many people use the link, it will put burden on the server.

Andreas 07-06-2004 05:23 PM

Hmm, one can also generate PDFs without PDFLib ;)

But you are right that it does require a lot of resources.

weitalia 07-07-2004 05:12 AM

Great hack,but where'is the RTF working version?

;)

Erwin 07-07-2004 06:14 AM

Quote:

Originally Posted by JirQUEST
hmmm, is this compatible with 3.0.3?

Yes. :)

JirQUEST 07-07-2004 07:34 AM

yup. upgraded and it still worked without a hitch :D man, great hack :D

Frzzy 07-11-2004 09:33 PM

/me clicks install...

Hmmm... no attachments support, any way to include link to attachments into the file instead of simply ditch them?

Michael Morris 07-13-2004 10:26 AM

Great hack, my board's subscribed users will love this. I applied a couple mods.

I only want one group - subscribed users - to use this feature. I replaced the unallowed users lines with a call to vbulletin's is_member_of function, hence

PHP Code:

if (!is_member_of($bbuserinfo9))
{
echo 
standard_error("I'm sorry, but you are attempting to access a feature limited to community supporters only!"''1);


was used in place of

PHP Code:

$unallowed_downloaders = array(9);

if (!
is_array($unallowed_downloaders) AND in_array($bbuserinfo[usergroupid],$unallowed_downloaders)) {echo standard_error("Sorry this feature is not meant for your usage!"''1);} 


Michael Morris 07-13-2004 10:32 AM

I don't want to display a button to a function folks can't use. The second mod was placed in the showthread template part of Logician's instructions. Surround the code for the buttons with a conditional as follows:

Code:

<if condition="is_member_of($bbuserinfo, 9)">
        <tr>
                <td class="vbmenu_option"><img class="inlineimg" src="$stylevar[imgdir_button]/sortasc.gif" alt="Download This Thread" /> <a href="dt.php?$session[sessionurl]t=$threadid">Download This Thread</a></td>
        </tr>
        </if>

Note - you can change the usergroup # to whatever you like of course - '9' happens to be our board's subscribed usergroup's number.

(BTW, I split this post in two because I have a router that blocks html sends over a certain size that I haven't figured out how to solve. Sorry for the inconvenience).

turbidblue 07-16-2004 01:26 AM

thank you! very easy!!

[high]* turbidblue clicks install!
[/high]

;)

Blam Forumz 08-13-2004 03:13 PM

/me clicks install

luck777jojo 08-16-2004 07:51 PM

After line:
Code:

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

  $filename=preg_replace('/\s+/', '_', $filename);
Just in case anyone with mozilla, or another browser had trouble downloading the file with spaces in the name... I hope this is ok with hack creator? Nice job by the way :). I like this a lot.

David G. Rigg 08-18-2004 12:17 AM

Way cool, much appreciated.

y2krazy 08-30-2004 12:57 AM

/me clicks install!

phprus 09-04-2004 09:37 AM

phprus clicks install!

Ocean 09-07-2004 03:20 PM

I'm having a problem. When I try to download a Thread, the file name defaults to something like "dt.php?t=14".

The Thread Title has nothing strange about it - we're talking about titles like "Smilie Test".


Any ideas?

Logician 09-07-2004 05:15 PM

Quote:

Originally Posted by Ocean
I'm having a problem. When I try to download a Thread, the file name defaults to something like "dt.php?t=14".

The Thread Title has nothing strange about it - we're talking about titles like "Smilie Test".

Have you hacked dt.php? Is the lines around 100 is like that:
PHP Code:

  $thread[title] = unhtmlspecialchars($thread[title]);
  
$filename=preg_replace("/[.&!:\\\?\^\'\"\$]/"''$thread[title]);
  if (
strlen(trim($filename))<2) {$filename='Thread'.$threadid;}
  
header("Content-disposition: attachment;filename=".$filename.".txt"); 


Ocean 09-07-2004 08:43 PM

Quote:

Originally Posted by Logician

Have you hacked dt.php? Is the lines around 100 is like that:

I used the dt.php file as downloaded directly from here. The section you quoted is exactly what I have in my file.

Logician 09-08-2004 05:51 AM

Quote:

Originally Posted by Ocean
I used the dt.php file as downloaded directly from here. The section you quoted is exactly what I have in my file.

For debugging purposes try to change the section above like this:

PHP Code:

echo "thread[title] = $thread[title] <br><br>";
$thread[title] = unhtmlspecialchars($thread[title]); 
echo 
"unhtmlspecialchars (thread[title]) = $thread[title] <br><br>";
  
$filename=preg_replace("/[.&!:\\\?\^\'\"\$]/"''$thread[title]); 
echo 
"filename1= $filename <br><br>";
  if (
strlen(trim($filename))<2) {$filename='Thread'.$threadid;} 
echo 
"filename2= $filename <br><br>";
  
header("Content-disposition: attachment;filename=".$filename.".txt"); 

This will make the hack stop working correctly, but it is temporary debugging so after you make the change, try to dl a thread, note what screen has been posted, you can revert the lines back.

Also please mention your vb version and the browser you are using.

Ocean 09-08-2004 10:43 AM

Quote:

Originally Posted by Logician

For debugging purposes try to change the section above like this:

This will make the hack stop working correctly, but it is temporary debugging so after you make the change, try to dl a thread, note what screen has been posted, you can revert the lines back.

Also please mention your vb version and the browser you are using.

Replacing the code in question causes no discernable difference in behavior. When I click on "Download This Thread", I get the dialog box asking me if I want to save this file - and the name is still formatted the same way.

Incidentally, if it matters - when I hover over the "Download This Thread" link, the Status Bar shows this as the URL: http://www.mydomain.com/forums/dt.php?t=3


And to answer your last question, I'm using vB 3.0.3, and IE 6.

However, something interesting to note - when I try using this hack (either original or debug version) from a FireFox 0.9.3 browser, the file name shows up as the first word in the Title.

For example, if the Title Thread is "Here we go again", these are the results I get:


IE 6 Filename: "dt.php?t=3"

FireFox 0.9.3 filename: "Here"

Logician 09-09-2004 07:15 AM

Quote:

Originally Posted by Ocean
Replacing the code in question causes no discernable difference in behavior. When I click on "Download This Thread", I get the dialog box asking me if I want to save this file - and the name is still formatted the same way.

This does not sound right. When you add the lines, it is not possible for the hack to download the thread anymore. It should post some debugging lines into the screen then give "Warning: Cannot modify header information - headers already sent by.. " error and post the entire thread into the page. (I've tested and confirmed). Its not doing it makes me think that something is wrong with your installation like script's being run from another board (test board/localhost) or smt.

Alzeimer 09-09-2004 08:08 AM

Nice hack, installed.

vishalsachar 09-09-2004 11:18 PM

Superb --- an absolute must install

AbSoluTc 09-10-2004 01:53 PM

Just wanted to say thank you for an awsome hack and a simple install. Simple, yet one of those things that leaves you saying "how could I live without it". :)

Thank you and INSTALLED BABY!

Ig@r 09-10-2004 03:28 PM

That is "must have" hack! Thank you!

Silverstangs 09-11-2004 12:41 AM

Works like a charm.......... now if there was a version that also downloaded the attachments it would be Perfect!

Ocean 09-13-2004 02:08 AM

Quote:

Originally Posted by Logician

This does not sound right. When you add the lines, it is not possible for the hack to download the thread anymore. It should post some debugging lines into the screen then give "Warning: Cannot modify header information - headers already sent by.. " error and post the entire thread into the page. (I've tested and confirmed). Its not doing it makes me think that something is wrong with your installation like script's being run from another board (test board/localhost) or smt.

How would that come about? I only installed this on one board (which, admittedly *was* the test board). Where else would the script run from?

Logician 09-13-2004 08:01 AM

Quote:

Originally Posted by Ocean
How would that come about? I only installed this on one board (which, admittedly *was* the test board). Where else would the script run from?

Sorry I have no idea and no hint to give to you except trying to install from the ground.

Or try to apply to your real board. This is no hack (ie it does not modify any vb files) so you can't mass anything up. It is harmless.

Azhrialilu 10-02-2004 06:42 PM

worked like a charm... add another forum full of people to the list of those who love you! :D

weitalia 10-06-2004 05:02 PM

Will be very fun if the .RTF file or .DOC generated file will be a REAL file,with full bold/italic conversion [and of course hyperlinks too] ;)
Could you do this?

P.S. No one needs a .rtf renamed file instead of a .txt ;)

;)

SandsUSA 10-06-2004 06:00 PM

/me clicks Install
Very nice - and very, very useful!

bendigo-tech 10-27-2004 01:03 PM

very nice. thanks alot.

*installed*

Virtex-II 11-10-2004 06:42 AM

This hack is really great but I was wondering if is it possible to save threads in a different format (not .txt) so that even images in threads can be downoladed with the text itself.


Thanks :o

Sweet Evil 11-10-2004 08:10 AM

looks cool, will give it a go

ADiuM 11-18-2004 05:54 PM

When trying to download a thread in Firefox 1.0 it shortens the topic to the first word if it has spaces in the topic title.. that way it doesn't actually give it an extension.

Is it possible to search for spaces in the topic title and if there is some to either take them out or replace them with underscores?


All times are GMT. The time now is 04:21 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.01439 seconds
  • Memory Usage 1,838KB
  • 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
  • (3)bbcode_code_printable
  • (4)bbcode_php_printable
  • (11)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (3)pagenav_pagelink
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (40)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