Previous Thread
Next Thread
Print Thread
Rate Thread
#210489 05/03/2001 11:31 AM
Joined: Aug 2000
Posts: 262
Enthusiast
Enthusiast
Offline
Joined: Aug 2000
Posts: 262
This hack allows you to download the pm that you recieved to your disk to read later or print. the origional hack was for vbulletin by bira and that post can be seen at http://www.vbulletin.com/forum/showthread.php?s=&postid=100911
i modded it to work with w3t. you can see it in action at my forum http://www.extremeforums.org PM yourself and you will see a button that says download this post to disk click on it and it asks where you want to save the file to on your HD.

files moded: viewmessage.php and mess_handler.php

open up viewmessage.php and find the line that says:


echo " ";


change it so it looks like this:


echo " ";


done with viewmessage.php now open up mess_handler.php just above:


// ####################################################################
// reply_mess function - Reply to this message


add:


// --------------------------------
// END OF THE DELETE_MESS FUNCTION


// ####################################################################
// save_mess function - Save PM ot Disk
// ####################################################################
function save_mess($Username="",$Password="",$Number="",$Subject="",$Sendto="") {
global $dbh, $config, $theme, $lang;
$html = new html;
$Username_q = addslashes($Username);
$query = "
SELECT M_Message,M_Sent
FROM w3t_Messages
WHERE M_Number = $Number
AND M_Username = '$Username_q'
";
$sth = $dbh -> do_query($query);
list($Message,$When) = $dbh -> fetch_array($sth);

$Message = ereg_replace(""",""",$Message);
$wordwrap = wordwrap($Message,75,"\r\n");
$html = new html;
$time = $html -> convert_time($When,$user[U_TimeOffset]);
$Subject = ereg_replace(""",""",$Subject);

header("Content-disposition: filename=messages.txt");
header("Content-type: application/octetstream");
header("Pragma: no-cache");
header("Expires: 0");
print("Date/Time Sent: $time\r\n");
print("From: $Sendto\r\n");
print("Subject: $Subject\r\n\r\n");
print("$wordwrap\r\n");
print("==========================================================================\r\n\r\n\r\n");
// echo "$Message and the subject of $Subject from $Sendto";
$dbh -> finish_sth($sth);
}


almost forgot and then find:


$user = $userob -> authenticate("$Username","$Password","U_Username, U_Password,U_Groups,U_EReplies,U_TextCols,U_TextRows,U_Preview");


and change it so it looks like this:


$user = $userob -> authenticate("$Username","$Password","U_Username, U_Password,U_Groups,U_EReplies,U_TextCols,U_TextRows,U_Preview,U_TimeOffset");


it works damn good..an example can be seen at my forums, you have to login or register or whatever...

[:red]--------------
http://extremeforums.org

Edited by poil on 05/03/01 11:33 AM.


Sponsored Links
Entire Thread
Subject Posted By Posted
Download PM to disk poil 05/03/2001 6:31 PM
Re: Download PM to disk The Team 05/03/2001 7:16 PM
Re: Download PM to disk poil 05/03/2001 8:49 PM
Re: Download PM to disk sixpack69 05/07/2001 1:45 PM
Re: Download PM to disk poil 05/07/2001 3:27 PM
Re: Download PM to disk sixpack69 05/07/2001 3:40 PM
Re: Download PM to disk sixpack69 05/07/2001 4:57 PM
Re: Download PM to disk poil 05/07/2001 6:03 PM
Re: Download PM to disk sixpack69 05/07/2001 11:40 PM
Re: Download PM to disk poil 05/08/2001 12:09 AM

Link Copied to Clipboard
Donate Today!
Donate via PayPal

Donate to UBBDev today to help aid in Operational, Server and Script Maintenance, and Development costs.

Please also see our parent organization VNC Web Services if you're in the need of a new UBB.threads Install or Upgrade, Site/Server Migrations, or Security and Coding Services.
Recommended Hosts
We have personally worked with and recommend the following Web Hosts:
Shock Hosting
Stable Host
bluehost
InterServer
Visit us on Facebook
Member Spotlight
Ruben Rocha
Ruben Rocha
Lutz,FL,USA
Posts: 253
Joined: January 2000
Forum Statistics
Forums63
Topics37,583
Posts293,955
Members13,825
Most Online151,614
Nov 14th, 2025
Today's Statistics
Currently Online 2873
Topics Created 0
Posts Made 0
Users Online 0
Birthdays 23
Top Posters
AllenAyres 21,080
JoshPet 10,369
LK 7,394
Lord Dexter 6,708
Gizmo 5,834
Greg Hard 4,625
Top Posters(30 Days)
Top Likes Received
isaac 82
Gizmo 20
Brett 7
WebGuy 2
Morgan 2
Top Likes Received (30 Days)
None yet
The UBB.Developers Network (UBB.Dev/Threads.Dev) is ©2000-2026 VNC Web Services

 
Powered by UBB.threads™ PHP Forum Software 8.1.0
(Snapshot build 20260108)