vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 2.x Full Releases (https://vborg.vbsupport.ru/forumdisplay.php?f=4)
-   -   Download PMs to File (for all 2.x.x versions)" (https://vborg.vbsupport.ru/showthread.php?t=15859)

DarkReaper 11-27-2001 01:53 AM

Works great except for one thing:

When I click download, it saves it as private.php instead of messages.txt :confused:

grumpy 11-27-2001 07:46 PM

Quote:

Originally posted by DarkReaper
Works great except for one thing:

When I click download, it saves it as private.php instead of messages.txt :confused:

Me too... It says it is going to save as private.php but if you save it, it will actually save as messages.txt. Odd for me though, as the first time I tried it it stated that it was going to save it as messages.txt. I decided to change the private.php so it would say forummessages.txt instead, and then it gave me that odd message. I changed it back to just messages.txt but it still says private.php when you attempt the dowload.

bira 11-27-2001 10:07 PM

REMOVE THE WORD 'ATTACHMENT'

I don't know why someone gave you the advice to change the content-disposition header to attachment type. THIS IS NOT AN ATTACHMENT.

Make sure the header line is:

PHP Code:

header("Content-disposition: filename=messages.txt");
header("Content-type: unknon/unknown");
header("Pragma: no-cache");
header("Expires: 0"); 

And you will be prompted to save messages.txt (or whatever filename you gave).

DarkReaper 11-27-2001 10:27 PM

It still says private.php :(

bira 11-27-2001 10:58 PM

What browser/version are you using?

DarkReaper 11-27-2001 11:22 PM

IE 5.5

grumpy 11-27-2001 11:26 PM

removing the reference to attachments worked for me, it refers to the download as message.txt

bira 11-27-2001 11:27 PM

I have IE 5.5 and this is what I get:

https://vborg.vbsupport.ru/

make absolutely sure you have the following lines in private.php:

PHP Code:

header("Content-disposition: filename=messages.txt");    
header("Content-type: unknown/unknown");
header("Pragma: no-cache");
header("Expires: 0"); 

Again I say this: make sure that you DON'T have 'attachment' in the content-disposition header.

DarkReaper 11-27-2001 11:29 PM

I have that. Try it for yourself...

http://www.unrealtournament.org/forums/private.php?s=

bira 11-27-2001 11:33 PM

I can't try it -- I don't have access to your board and don't have PMs there :)

Do you have a testing account I can use? You can PM me the details if you like.

You can also e-mail me at goren@atlasf1.com your private.php file and I'll take a look at it

Pady 11-28-2001 02:09 PM

thanx Bira, got it installed and it works a charm!

Nam 12-07-2001 09:18 AM

Bira, the code you've changed didn't for me, I have 2.2.1 and it says error, I had to use your old code (luckily I did save it) to make it work :(. What's wrong with updating?

bira 12-07-2001 09:26 AM

Nam, what error did it give you?

Nam 12-09-2001 08:28 PM

I don't remember exactly, because I have put back the old code (the first one) to my board, it says some thing about parse errer on the line 748 ( the line that has close } at the end) just right above the ############ line.

Sorry for replying late.

Lionel 12-23-2001 10:44 PM

I am using version 2.21 and I also get the error on line 749. Line 749 is the "}" aove start delete.

When I remove it completely I do not get the parse error but when I try to download it opens the text file in the browser IE 6.02.26

bira 12-23-2001 10:57 PM

Take a look at the first hack and compare the code you got to the one you copied. I just edited that post and made it more clear

Lionel 12-23-2001 11:11 PM

I added the first line and put the } back. I do not get the parse error but it was opening the text in browser. So I changed it as per below. But what is weird, when I click the download, it tells me that I am downloading private.php. If I click open, then a second dialog box comes up telling me that I am downloading message.txt Is that the way it supposed to be? (double dialog box)

if (is_array($privatemessage)) {
header("Content-disposition: attachment; filename=messages.txt");
header("Content-type: uknown/unknown");
header("Pragma: no-cache");
header("Expires: 0");

Lionel 12-23-2001 11:25 PM

I removed "attachment" as per previous post.

header("Content-disposition: filename=messages.txt");
header("Content-type: unknown/unknown");
header("Pragma: no-cache");
header("Expires: 0");

The original post was showing like that:

header("Content-disposition: filename=messages.txt");
header("Content-type: application/octet-stream");
header("Pragma: no-cache");
header("Expires: 0");

Thanks... great hack.

Streicher 01-01-2002 02:58 PM

Is it possible to change this hack, so that the users can download the PM's HTML formatted?

Lucky 01-03-2002 01:29 PM

Wicked!

Loving this one!

Thanks.

Una Persson 01-04-2002 03:31 PM

After doing the initial hack, then several of the fixes posted later on, it seems to be working very well for me.

eva2000 01-10-2002 10:46 AM

Quote:

Originally posted by bira
I have IE 5.5 and this is what I get:

http://www.atlasf1.com/personal/bira/pmdownload-ie.gif

make absolutely sure you have the following lines in private.php:

PHP Code:

header("Content-disposition: filename=messages.txt");    
header("Content-type: unknown/unknown");
header("Pragma: no-cache");
header("Expires: 0"); 

Again I say this: make sure that you DON'T have 'attachment' in the content-disposition header.

bira your original post has the headers different from the ones i quoted... had to change them from your original post to be able to download the pms

Warlord 01-24-2002 12:06 AM

I just installed it and when I try to download a pm it just takes me to a web page which contains the private message . How do i change it to the orgional version that prompted you to save it as a tet file?

Warlord 01-24-2002 10:10 PM

bump

Warlord 01-25-2002 10:33 PM

bump

Warlord 01-27-2002 12:03 AM

Okay well since no one wanted to help wittle old me, after reading this thread over again, I did some messing around with private.php and got it working the way I wanted it too. But for some reason the file name to be downloaded is private.php instead of messages.txt...

oh well...

Princeton 01-28-2002 09:43 PM

Another great hack ... thank you. Just installed with no problems.:)

DScollon 01-28-2002 10:05 PM

Fantastic feature to add to the board. Installed it with only the problem of the webpage appearing rather than the download, which I've now fixed with the help of this thread. Well done and thanks.

Regs 01-31-2002 09:07 PM

Is there anyway to hack this in such that it is only available to certain group(s)? I'd like to offer it as a 'premium'-type feature.

Cheers,

~Regs.

freehtml 02-01-2002 07:22 AM

Quote:

Originally posted by smelialichu
This is a great hack, just one problem though. When i click on download it displays the pm's in my browser and doesn't download it. i use IE 5.01 none of the other people on the board have reported the problem, ideas? I realise the problem is most likely at my end.
I am using IE 5.5 and i also encounter this...

Logician 02-08-2002 08:49 AM

Thx pal, it is a very nice hack! :)

I have a suggestion: Wouldnt it be nice if you modified it so that it can used for normal forum messages as well? ;) So members would be able to download/save a thread to their computer easily.. Just a thought..

Regards,
Logician

TheCaver 02-23-2002 03:33 AM

Quote:

Originally posted by freehtml


I am using IE 5.5 and i also encounter this...

Me too. The fix is pretty simple. Your browser probably knows how to handle the octet-stream type. Simply change it to make it ask you.

Change "octet-stream" to just "stream" and see what happens :)

JC

-=dm=- 02-27-2002 07:15 PM

Im getting the blank page private.php page.
it worked for me yesterday, but I have just upgraded to v2.2.2

anyone?

r.cakir 03-05-2002 08:37 PM

I tried this Hack in Mac OS X 10.1.3 with IE 5.1.3 and it doesn't work for me. If i click in the user cp on the link 'Private Messaging' I get just a Parse error on line 715 in private.php. Can somebody tell me, if this hack works only with windows, or is Mac OS X also supported? :confused:

LamBras 03-21-2002 02:26 PM

Doesn't work with 2.2.4
Parse error on the starting line on
PHP Code:

if?($download!="")?{
????
$what="download";
??} 

Is this hack still being worked on, or any advice how I could make it work with 2.2.4? Thanks.

Robert 03-24-2002 08:20 AM

Quote:

Originally posted by LamBras
Doesn't work with 2.2.4
Works fine with 2.2.4, double check that you placed the code hack in the right place in your private.php

LamBras 03-24-2002 10:19 AM

I will retry this evening, thanks.

LouChipher 04-03-2002 03:03 PM

don't usw this... every user can see and download all pns...

TWTCommish 04-03-2002 03:04 PM

Uh, what? How can they see your PMs if you're downloading them to your hard drive?

LouChipher 04-03-2002 03:16 PM

there is a bug in the script which everyone can use...


All times are GMT. The time now is 01:16 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.01254 seconds
  • Memory Usage 1,818KB
  • 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
  • (4)bbcode_php_printable
  • (5)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
  • (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