PDA

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


bira
03 May 2001, 12:54
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
03 May 2001, 13:15
good hack min;)

conan
03 May 2001, 18:12
Thanks a lot for the great hack!

poil11
03 May 2001, 19:08
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
03 May 2001, 23:43
This is what a lot of my Users asked for!!!
THANKS A LOT!

bira
04 May 2001, 10:37
thanks :D

Streicher
04 May 2001, 14:23
Very good hack. No problems to hack in vB.

smelialichu
12 May 2001, 19:44
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
12 May 2001, 22:02
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
14 May 2001, 12:29
Great looking hack.

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

~veedee

bira
14 May 2001, 19:49
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
14 May 2001, 19:57
yeah different templates :)

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

smelialichu
14 May 2001, 20:32
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
18 May 2001, 22:19
Actually, wordwrap() is a built-in function in PHP.

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

slip
03 Jun 2001, 00:32
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
04 Jun 2001, 17:46
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
09 Jun 2001, 11:46
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
09 Jun 2001, 13:12
I did it three times! :(

zarkov
09 Jun 2001, 13:46
did it work OK when you re up the original file?

NORRITT
09 Jun 2001, 16:13
yes

zarkov
10 Jun 2001, 10:56
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
10 Jun 2001, 19:24
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
12 Jun 2001, 09:16
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
12 Jun 2001, 15:30
yup, i'm running IE 5.5

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

zarkov
12 Jun 2001, 23:09
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
17 Jun 2001, 02:00
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
12 Nov 2001, 06:48
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
12 Nov 2001, 19:46
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
12 Nov 2001, 19:59
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
13 Nov 2001, 09:47
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
13 Nov 2001, 10:08
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
13 Nov 2001, 10:17
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
13 Nov 2001, 10:28
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
13 Nov 2001, 11:22
It was the


class="bginput"


Thanks a lot, Sweet Evil :) :)

Sweet Evil
13 Nov 2001, 11:35
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
13 Nov 2001, 21:15
Thanks for your responses everyone. :D

Installed, and working!

ezdreamer
14 Nov 2001, 08:14
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
14 Nov 2001, 11:04
now now where can i get the hack for vb 2.0.3?

has it been deleted?

jam583
26 Nov 2001, 00:00
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
26 Nov 2001, 06:24
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
27 Nov 2001, 03:53
Works great except for one thing:

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

grumpy
27 Nov 2001, 21:46
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
28 Nov 2001, 00:07
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
28 Nov 2001, 00:27
It still says private.php :(

bira
28 Nov 2001, 00:58
What browser/version are you using?

DarkReaper
28 Nov 2001, 01:22
IE 5.5

grumpy
28 Nov 2001, 01:26
removing the reference to attachments worked for me, it refers to the download as message.txt

bira
28 Nov 2001, 01:27
I have IE 5.5 and this is what I get:

https://www.vbulletin.org/forum/

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
28 Nov 2001, 01:29
I have that. Try it for yourself...

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

bira
28 Nov 2001, 01:33
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
28 Nov 2001, 16:09
thanx Bira, got it installed and it works a charm!

Nam
07 Dec 2001, 11:18
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
07 Dec 2001, 11:26
Nam, what error did it give you?

Nam
09 Dec 2001, 22:28
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
24 Dec 2001, 00:44
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
24 Dec 2001, 00:57
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
24 Dec 2001, 01:11
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
24 Dec 2001, 01:25
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 Jan 2002, 16:58
Is it possible to change this hack, so that the users can download the PM's HTML formatted?

Lucky
03 Jan 2002, 15:29
Wicked!

Loving this one!

Thanks.

Una Persson
04 Jan 2002, 17:31
After doing the initial hack, then several of the fixes posted later on, it seems to be working very well for me.

eva2000
10 Jan 2002, 12:46
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
24 Jan 2002, 02:06
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
25 Jan 2002, 00:10
bump

Warlord
26 Jan 2002, 00:33
bump

Warlord
27 Jan 2002, 02:03
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
28 Jan 2002, 23:43
Another great hack ... thank you. Just installed with no problems.:)

DScollon
29 Jan 2002, 00:05
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
31 Jan 2002, 23:07
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
01 Feb 2002, 09:22
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
08 Feb 2002, 10:49
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
23 Feb 2002, 05:33
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=-
27 Feb 2002, 21:15
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
05 Mar 2002, 22:37
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
21 Mar 2002, 16:26
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
24 Mar 2002, 10:20
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
24 Mar 2002, 12:19
I will retry this evening, thanks.

LouChipher
03 Apr 2002, 17:03
don't usw this... every user can see and download all pns...

TWTCommish
03 Apr 2002, 17:04
Uh, what? How can they see your PMs if you're downloading them to your hard drive?

LouChipher
03 Apr 2002, 17:16
there is a bug in the script which everyone can use...

bart
06 Apr 2002, 17:41
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
06 Apr 2002, 20:02
@ bart, search the bug...
every user can see and download all pns... ;)

bart
06 Apr 2002, 21:19
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
07 Apr 2002, 10:15
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
08 Apr 2002, 22:16
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: http://www.vbulletin.org/forum/showthread.php?s=&threadid=37172

bart
08 Apr 2002, 23:33
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
29 Apr 2002, 19:04
Thanks zarkov, that fixed it. :-)

Boofo
29 Apr 2002, 19:09
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
21 Aug 2002, 02:59
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
21 Aug 2002, 03:21
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
21 Aug 2002, 10:31
That reply via email thing double posted.

Dark Shogun

Dark Shogun
21 Aug 2002, 17:20
Problem fixed. It had nothing to do with this hack after all.

Dark Shogun

Dark Shogun
21 Aug 2002, 17:38
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
24 Jun 2003, 19:24
Is there a way not to change the icon?
I mean the one with the floppy-disk or is it only on vb.org?