Previous Thread
Next Thread
Print Thread
Rate Thread
#232006 01/05/2003 5:56 PM
Joined: Jun 2001
Posts: 3,273
That 70's Guy
That 70's Guy
Offline
Joined: Jun 2001
Posts: 3,273
This modification will allow users to email their private messages to themselves. It will also send the messages in HTML if they have elected to recieve email in that format.
Attachments
63781-pm-mailer.6.2.zip (0 Bytes, 36 downloads)

Sponsored Links
Joined: Oct 2002
Posts: 165
Member
Member
Offline
Joined: Oct 2002
Posts: 165
Perfect!

I emailed myself 1,000 PMs (sent/recv'd) Now I can have my backup and a clean UBB DB

Joined: Sep 2001
Posts: 129
Member
Member
Offline
Joined: Sep 2001
Posts: 129
Cheers Dave, excellent hack well pleased with this gem, but the format concerned me slightly so heres what I did:


I have changed the layout a bit:
==============
$ubbt_lang['TEXT_DELETE'] = "Check";
==============
as the heading of the check boxes normally says delete.

Also
==============
$ubbt_lang['PM_EMAIL'] = "Email Checked";
==============
so it maches delete checked

and i reordered the buttons:
==============
<input type="button" name="uncheckall" value="{$ubbt_lang['UNCHECK_ALL']}" onClick="uncheckAll('document.checkboxform1.box')" class="buttons" />
<input type="button" name="checkall" value="{$ubbt_lang['CHECK_ALL']}" onClick="checkAll('document.checkboxform1.box')" class="buttons" />
<input type="submit" name="deletecheck" value="{$ubbt_lang['DELETE_CHECK']}" class="buttons" />
<input type="submit" name="pmemail" value="{$ubbt_lang['PM_EMAIL']}" class="buttons" />
===============


Regards
Clint

Running on WIN2003 Web Server.

Paranoid people get followed too!
Joined: Dec 2000
Posts: 1,471
Addict
Addict
Offline
Joined: Dec 2000
Posts: 1,471
There's a small typo so that the subject isn't displayed in html format.

$Mbody = "<html>".$newline."<head>".$newline."<title>".$M S ubject."</title>".$newline."</head><body>".$newline.$Mbody."</body>".$newline."</html>".$newline;

Should be "$Msubject"

I also put the text strings "From", "Subject" and "Date" into the language array.

If anyone is interested. Replace the last if/else statement with:

Code
 if ($user['U_EmailFormat'] != "HTML") { <br /> 	$Mbody = $ubbt_lang['EPM_FROM'].": ".$Msender.$newline.$ubbt_lang['EPM_SUBJECT'].": ".$Msubject.$newline.$ubbt_lang['EPM_DATE'].": ".$date.$newline.$newline; <br /> 	$Mbody .= $Mmessage; <br /> 	$Mbody = eregi_replace("<br />","$newline",$Mbody); <br /> } <br /> else { <br />	$Mbody = $ubbt_lang['EPM_FROM'].": ".$Msender."<br />".$newline.$ubbt_lang['EPM_SUBJECT'].": ".$Msubject."<br />".$newline.$ubbt_lang['EPM_DATE'].": ".$date."<br /><br />".$newline; <br />	$Mbody .= $Mmessage; <br />	$Mbody = str_replace("\"{$config['images']}","\"{$config['imageurl']}",$Mbody); <br />	$Mbody = str_replace("$newline","<br />$newline",$Mbody); <br />	$Mbody = "<html>".$newline."<head>".$newline."<title>".$Msubject."</title>".$newline."</head><body>".$newline.$Mbody."</body>".$newline."</html>".$newline; <br />


and add this to the gerneric.php language file:
Code
$ubbt_lang['EPM_FROM'] = "From:"; <br />$ubbt_lang['EPM_SUBJECT'] = "Subject:"; <br />$ubbt_lang['EPM_DATE'] = "Date:"; 


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:
Stable Host
bluehost
InterServer
Visit us on Facebook
Member Spotlight
isaac
isaac
California
Posts: 1,157
Joined: July 2001
Forum Statistics
Forums63
Topics37,573
Posts293,925
Members13,849
Most Online5,166
Sep 15th, 2019
Today's Statistics
Currently Online
Topics Created
Posts Made
Users Online
Birthdays
Top Posters
AllenAyres 21,079
JoshPet 10,369
LK 7,394
Lord Dexter 6,708
Gizmo 5,833
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-2024 VNC Web Services

 
Powered by UBB.threads™ PHP Forum Software 8.0.0
(Preview build 20221218)