PDA

View Full Version : Download PMs to File (for all 2.x.x versions)"


bira
05-02-2001, 10:00 PM
HACK UPDATED NOV 27TH 2001 - WORKS WITH ALL 2.X.X VERSIONS!

Since I was asked to make this available, here's my hack for downloading Private Messages (as many as you select) at once into a local txt file.

This is helpful if you need to clear out your PM folder(s) due to quota limitation, but don't want to lose those messages.

In effect, it works like an e-mail RFC archive.

Installation Instructions:

1. Open private.php.

Find:


if ($delete!="") {
$what="delete";
}


Immediately AFTER it put:


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


Find:


}

// ############################### start delete ###############################


Immediately ABOVE it (make sure you put it ABOVE the } ) put:


if ($what=="download") {
if (is_array($privatemessage)) {
header("Content-disposition: filename=messages.txt");
header("Content-type: application/octet-stream");
header("Pragma: no-cache");
header("Expires: 0");

while(list($key,$val)=each($privatemessage)) {
$downloads=$DB_site->query_first("SELECT touserid,fromuserid,dateline,title,message FROM privatemessage WHERE privatemessageid='$key' AND userid=$bbuserinfo[userid]");
$tousername=$DB_site->query_first("SELECT username FROM user WHERE userid='$downloads[touserid]'");
$fromusername=$DB_site->query_first("SELECT username FROM user WHERE userid='$downloads[fromuserid]'");
$msgdt = vbdate($dateformat,$downloads[dateline]);
$msgtm = vbdate($timeformat,$downloads[dateline]);
$wordwrap = wordwrap($downloads[message],75,"\r\n");

print("Date/Time Sent: $msgdt, $msgtm\r\n");
print("From: $fromusername[username]\r\n");
print("To: $tousername[username]\r\n");
print("Subject: $downloads[title]\r\n\r\n");
print("$wordwrap\r\n");
print("================================================== ========================\r\n\r\n\r\n");


} //end while

} else {
eval("standarderror(\"".gettemplate("error_pmnoselected")."\");");
exit;
}
}


Note for Foreign Users: replace the words 'Date/Time Sent', 'From', 'To', 'Subject' in the above code with whatever wording in your language that suits you.

Save file and upload.

2. Edit template privfolder.

Find:


$massforwardlink


Immediately after OR before it (it does not matter), put:


or <input type="submit" class="bginput2" name="download" value="Download" style="background-color:#606096;color:#FFF788;font-size:10px;font-weight:bold">


Note for Foreign Users: replace the word "or" and the value "Download" with whatever wording in your language that suits you.


That's it!

Usage: select one or more messages in one of your Private Messages folder and click on "Download". You will be prompted to save messages.txt on your hard drive (a Windows filename & folder selection dialogue will pop up).

Cheers,

Bira

http://www.atlasf1.com/personal/bira/pm-download.gif

bokhalifa
05-03-2001, 11:15 AM
good hack min;)

conan
05-03-2001, 04:12 PM
Thanks a lot for the great hack!

poil11
05-03-2001, 05:08 PM
Thanks for this great hack. i hope that you don't mind but i hacked it to work with wwwthreads. and i am going to use this in many many other things! good deal!

instead of it being message.txt i made that the subject of the post....

the_sisko
05-03-2001, 09:43 PM
This is what a lot of my Users asked for!!!
THANKS A LOT!

bira
05-04-2001, 08:37 AM
thanks :D

Streicher
05-04-2001, 12:23 PM
Very good hack. No problems to hack in vB.

smelialichu
05-12-2001, 05:44 PM
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.

bira
05-12-2001, 08:02 PM
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.

smelialichu, I'm not sure where to point you to, but it has to do with your system/browser setting. Instead of prompting you to choose between save file or open it, it goes right ahead and opens it without asking. I'm not sure how you solve that as I am not familiar with win32 registry stuff.

You might want to check in your security settings (Tool -> Internet Options) that Download is enabled (general download, that is). Not sure about anything else.

In any case, I'd recommend upgrading to IE 5.5, which is a much better, faster and less buggy browser.

Cheers,

bira

veedee
05-14-2001, 10:29 AM
Great looking hack.

I run about 7 styles on my website, does this mean i have to hack the templates 7 times ?

~veedee

bira
05-14-2001, 05:49 PM
Originally posted by veedee
Great looking hack.

I run about 7 styles on my website, does this mean i have to hack the templates 7 times ?

~veedee

Do you actually have a different templateset for every style though?!?

Run a search in the Control Panel -> Templates for $massforwardlink. If you have more than one template with it, you can do a search/replace of


Search for: $massforwardlink
Replace with: $massforwardlinkor <input type="submit" name="download" value="Download">


At your peril though :)

veedee
05-14-2001, 05:57 PM
yeah different templates :)

will do what you told me, cheers me dear :)

smelialichu
05-14-2001, 06:32 PM
Abyone got any ideas on how to solve my prob? i got it so the filename includes the date. i can tell you how if anyone's interested, iy's fairly simple. In fact very simple

bira
05-18-2001, 08:19 PM
Actually, wordwrap() is a built-in function in PHP.

Perhaps, though, it's only in PHP4 or something.

slip
06-02-2001, 10:32 PM
i installed everything exactly as it should be done, yet when i try to download some pm's, i just get a blank page (completely blank, no errors)

any help?

NORRITT
06-04-2001, 03:46 PM
Hi, if i click in the user cp on the link 'Private Messaging' I get just the following error messsage:

Parse error: parse error, expecting `T_STRING' or `T_VARIABLE' or `T_NUM_STRING' in e:\apache\apache\nsdocs\forum\private.php on line 695

zarkov
06-09-2001, 09:46 AM
restore private.php and see if that works then rehack.
You probably deleted a , or } or something. :)

See my hack based on this one to Email the selected PM's to the registered email address here
http://161.58.84.213/forum/showthread.php?s=&threadid=18991

NORRITT
06-09-2001, 11:12 AM
I did it three times! :(

zarkov
06-09-2001, 11:46 AM
did it work OK when you re up the original file?

NORRITT
06-09-2001, 02:13 PM
yes

zarkov
06-10-2001, 08:56 AM
Then it must be something to do with the hack, either your doing something wrong or possibly your using PHP 3 and it maybe it doesnt work with 3 ( that is only a guess as i have never tried it on 3).

slip
06-10-2001, 05:24 PM
Originally posted by slip
i installed everything exactly as it should be done, yet when i try to download some pm's, i just get a blank page (completely blank, no errors)

any help?



can anyone help me?
I'm using PHP4 and I did everything like I should have..

zarkov
06-12-2001, 07:16 AM
What browser you using?

I found that the code in the hack worked in IE 5 but not 5.5, I had to do a little digging around,But i assume its to do with http versions, IE 5 being http 1.0 complient and 5.5 being http 1.1 compliant.

I did work out and get it to work in IE.5.5 and netscape 4.7, but at the moment im at work and dont have access to the code, but ill post the changes later for anyone to use.

Please note that from mmy playing you can have it work in IE 5 or 5.5 but not both

slip
06-12-2001, 01:30 PM
yup, i'm running IE 5.5

those code modifications that you did would be GREATLY appreciated..

zarkov
06-12-2001, 09:09 PM
OK look for this code in private.php

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

and replace it with

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


Dont forget to change the filename=messages.txt to what ever you want to call the downloaded file.

Axel Foley
06-17-2001, 12:00 AM
Bira, first of all GREAT HACK! ;)

For Zarkov & Norritt & Slip & Bira :rolleyes: :

I had the same error as Norritt (Parse error: parse error, expecting `T_STRING' or `T_VARIABLE' or `T_NUM_STRING' in e:\apache\apache\nsdocs\forum\private.php on line 695), and it wasn't my fault, after a while I found out the error. I had to modify the last EVAL() in this way:


// Original code by Bira
eval("standarderror(\"".gettemplate("error_pmnoselected")."");");
exit;
}

// My modification
eval("standarderror(\"".gettemplate("error_pmnoselected")."\");");
exit;
}


One other thing: I use IE 5.5 and the hack works greatly without applying Zarkov's modifications.

ezdreamer
11-12-2001, 04:48 AM
I tried this with version 2.2.0 but the only thing that came up was an empty page when I hit the pm section.

Will Bira's code work with 2.2.0 or could I be doing something wrong. I followed the instructions to the letter and nothing... :confused:

Alien
11-12-2001, 05:46 PM
Wow, I never even saw this one..

Anyone have this working in recent versions? ...and did it require modification? I'd love to install this...

amykhar
11-12-2001, 05:59 PM
I have it working on my board. It only required a bit of tweaking to make the button match other buttons on the form.

Amy

Amasov
11-13-2001, 07:47 AM
I am running this hack on my 2.2.0 an it works perfectly (thanks @Bira, great hack)

Only one question:

How do I change the size of the "Download"-Button ??
(It's greater than the others, but I used the same style like the others)..

Thanks.

@ezdreamer:
Actually you did something wrong! :p

@Alien:
I ran this hack on RC2, 2.0.1, 2.0.2, 2.0.3 :)

Sweet Evil
11-13-2001, 08:08 AM
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.



Same Problem... :) (IE 5.0)

Sweet Evil
11-13-2001, 08:17 AM
Originally posted by Zarkov
OK look for this code in private.php

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

and replace it with

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



Dont forget to change the filename=messages.txt to what ever you want to call the downloaded file.

Thanks!.. this fixed the problem .. now it is a download.. :)

Sweet Evil
11-13-2001, 08:28 AM
Originally posted by Amasov
I am running this hack on my 2.2.0 an it works perfectly (thanks @Bira, great hack)

Only one question:

How do I change the size of the "Download"-Button ??
(It's greater than the others, but I used the same style like the others)..

Thanks.

@ezdreamer:
Actually you did something wrong! :p

@Alien:
I ran this hack on RC2, 2.0.1, 2.0.2, 2.0.3 :)


Replace:
or <input type="submit" name="download" value="Download">

With:
or <input type="submit" class="bginput" name="download" value="Download" style="background-color:#336D95;color:#000000;font-size:10px;font-weight:bold">

But if you already made it look like the rest... (style=")

Then you just need to
Replace:
or <input type="submit" name="download" value="Download"

With:
or <input type="submit" class="bginput" name="download" value="Download"

Amasov
11-13-2001, 09:22 AM
It was the


class="bginput"


Thanks a lot, Sweet Evil :) :)

Sweet Evil
11-13-2001, 09:35 AM
Yea I was just trying to make it sound tech like.. (lol)

Just saying add (class="bginput") after (type="submit") did not sound very tech like..

Anyhow NP :D

Alien
11-13-2001, 07:15 PM
Thanks for your responses everyone. :D

Installed, and working!

ezdreamer
11-14-2001, 06:14 AM
In private.php

Find code:

eval("standardredirect(\"".gettemplate("redirect_pmdelete")."\",\"private.php?s=$session[sessionhash]&folderid=$thisfolder\");");
}

But instead of the above I find this in private.php:

eval("standardredirect(\"".gettemplate("redirect_pmdelete")."\",\"private.php?s=$session[sessionhash]&folderid=".intval($thisfolder)."\");");
}

What do I do now? :confused:

jamie
11-14-2001, 09:04 AM
now now where can i get the hack for vb 2.0.3?

has it been deleted?

jam583
11-25-2001, 10:00 PM
After adding the new code:

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

I still get a white screeen

JJR512
11-26-2001, 04:24 AM
Originally posted by ezdreamer
In private.php

Find code:

eval("standardredirect(\"".gettemplate("redirect_pmdelete")."\",\"private.php?s=$session[sessionhash]&folderid=$thisfolder\");");
}

But instead of the above I find this in private.php:

eval("standardredirect(\"".gettemplate("redirect_pmdelete")."\",\"private.php?s=$session[sessionhash]&folderid=".intval($thisfolder)."\");");
}

What do I do now? :confused:

For 2.2.1, find this:
eval("standardredirect(\"".gettemplate("redirect_pmdelete")."\",\"private.php?s=$session[sessionhash]&folderid=".intval($thisfolder)."\");");
}
And make that replacement after that.

Note: Do NOT make the replacement after this:
eval("standardredirect(\"".gettemplate("redirect_pmdelete")."\",\"private.php?s=$session[sessionhash]&folderid=".intval($folderid)."\");");
} #end dodelete
Which is very similar and appears a few lines further down.

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


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:


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


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

bart
04-06-2002, 03:41 PM
I changed the script a little:


if ($what=="download") {
if (is_array($privatemessage)) {
// header("Content-disposition: filename=messages.txt");
// header("Content-type: application/octet-stream");
// header("Pragma: no-cache");
// header("Expires: 0");

while(list($key,$val)=each($privatemessage)) {
$downloads=$DB_site->query_first("SELECT touserid,fromuserid,dateline,title,message FROM privatemessage WHERE privatemessageid='$key' AND userid=$bbuserinfo[userid]");
$tousername=$DB_site->query_first("SELECT username FROM user WHERE userid='$downloads[touserid]'");
$fromusername=$DB_site->query_first("SELECT username FROM user WHERE userid='$downloads[fromuserid]'");
$msgdt = vbdate($dateformat,$downloads[dateline]);
$msgtm = vbdate($timeformat,$downloads[dateline]);
$wordwrap = wordwrap($downloads[message],75,"\r\n");

$dump .= "\r\nDate/Time Sent: $msgdt, $msgtm\r\n";
$dump .= "from: $fromusername[username]\r\n";
$dump .= "To: $tousername[username]\r\n";
$dump .= "Subject: $downloads[title]\r\n\r\n";
$dump .= "$wordwrap\r\n";
$dump .= "\r\n============================================== ============================\r\n";

} //end while

mail("$bbuserinfo[email]","Download Private Messages","$dump","From: Title of your board <no_reply_emailaddress>");

eval("standarderror(\"".gettemplate("pm_download_complete")."\");");
exit;

} else {
eval("standarderror(\"".gettemplate("error_pmnoselected")."\");");
exit;
}
}



Now the messages are send to the users emailaddress. In the template "pm_download_complete" you can warn them to check the email before deleting the messages.

LouChipher
04-06-2002, 06:02 PM
@ bart, search the bug...
every user can see and download all pns... ;)

bart
04-06-2002, 07:19 PM
Guess you're right, Lou. Thanks for your warning (though less for making it a puzzle).

Does this solve it?


if ($what=="download") {
if (is_array($privatemessage)) {
$pms = implode(",",array_keys($privatemessage));
$downloads=$DB_site->query("SELECT touserid,fromuserid,dateline,title,message FROM privatemessage WHERE privatemessageid IN ($pms) AND userid=$bbuserinfo[userid]");
while ($pm = mysql_fetch_array($downloads)) {
$tousername=$DB_site->query_first("SELECT username FROM user WHERE userid='$pm[touserid]'");
$fromusername=$DB_site->query_first("SELECT username FROM user WHERE userid='$pm[fromuserid]'");
$msgdt = vbdate($dateformat,$downloads[dateline]);
$msgtm = vbdate($timeformat,$downloads[dateline]);
$wordwrap = wordwrap($pm[message],75,"\r\n");

$dump .= "\r\nDate/Time Sent: $msgdt, $msgtm\r\n";
$dump .= "From: $fromusername[username]\r\n";
$dump .= "To: $tousername[username]\r\n";
$dump .= "Subject: $pm[title]\r\n\r\n";
$dump .= "$wordwrap\r\n";
$dump .= "\r\n============================================== ============================\r\n";
} //end while
mail("$bbuserinfo[email]","Download Private Messages","$dump","From: BOARD-TITLE <EMAILADDRESS>");
eval("standarderror(\"".gettemplate("pm_download_complete")."\");");
exit;
} else {
eval("standarderror(\"".gettemplate("error_pmnoselected")."\");");
exit;
}
}

LouChipher
04-07-2002, 08:15 AM
looks bad... one of my moderators tell u what's wrong. btw he release a secure template version (save pms as a html file) in a few days.

lou

Cano2
04-08-2002, 08:16 PM
Hi,
sorry forposting so late... didn't have much time


The most importent rule in web-programming is "never trust user input". But this rule is ignored here, so injection of SQL statements is possible...

[detailed description removed]

I have postet a very simmilar hack with enhanced functionality (templates...), which should be safe (uses verifyid() ) here: https://vborg.vbsupport.ru/showthread.php?s=&threadid=37172

bart
04-08-2002, 09:33 PM
Oops.

Thanks for your reply Cano. I'll switch to your version soon as I have the time.

I couldn't do what you suggest is possible, but the thought of it maybe being possible is more then enough.

Maybe you should remove your post to not give someone a bad idea.

Boofo
04-29-2002, 05:04 PM
Thanks zarkov, that fixed it. :-)

Boofo
04-29-2002, 05:09 PM
Thanks for the great hack, bira! I am in the process of getting the board ready to go up and this will be a great addition and surprise for everyone. Keep up the great work!

Dark Shogun
08-21-2002, 12:59 AM
I got a error. Does anyone know how to fix this? I have Ver. 2.2.6.

Parse error: parse error, unexpected $ in /home/blarg/public_html/forum/member.php on line 1638

Dark Shogun

Boofo
08-21-2002, 01:21 AM
Show us the code a few lines up and a few lines after the error and we'll see if we can spot the problem.

Originally posted by Dark Shogun
I got a error. Does anyone know how to fix this? I have Ver. 2.2.6.

Parse error: parse error, unexpected $ in /home/blarg/public_html/forum/member.php on line 1638

Dark Shogun

Dark Shogun
08-21-2002, 08:31 AM
That reply via email thing double posted.

Dark Shogun

Dark Shogun
08-21-2002, 03:20 PM
Problem fixed. It had nothing to do with this hack after all.

Dark Shogun

Dark Shogun
08-21-2002, 03:38 PM
1 Problem with the hack. When it emails it to me it says it is from my server email address not my domain email address.

It says:

From: EMAILADDRESS@server10.alwayswebhosting.com (BOARD-TITLE)

Dark Shogun

gmarik
06-24-2003, 05:24 PM
Is there a way not to change the icon?
I mean the one with the floppy-disk or is it only on vb.org?