Registered: 03/09/02
Posts: 329
Loc: Michigan, USA
Mod Name / Version: Email PM Hack v1.0.3<br />Description: This will allow users to email their PM's to their email address on file.<br />Working under: UBB.threads 6.0.2<br />Any pre-requisites: None<br />Author(s): written by JustDave, converted to v6 by Astaran, converted to v6.0.2 by Lisa_P<br />Credits: Not sure, this one was around before I found you guys!<br />Files Altered: (3) /languages/english/generic.php; /templates/viewmessages.tmpl; delete.php<br />Database Altered: No<br />New Files: none
Registered: 03/09/02
Posts: 329
Loc: Michigan, USA
I agree with Dave, if nobody asks for it, it usually doesn't get done! <img src="/forum/images/icons/wink.gif" alt="" /><br /><br />Here is an updated attachment. <img src="/forum/images/icons/smile.gif" alt="" />
Registered: 03/09/02
Posts: 329
Loc: Michigan, USA
<img src="/forum/images/icons/frown.gif" alt="" /> If you're still waiting, I forgot something! We get the emails immediately. I was afraid of this, because it took so long for me to get it right. <img src="/forum/images/icons/laugh.gif" alt="" /> Lemme look . . . .
Registered: 03/09/02
Posts: 329
Loc: Michigan, USA
Ok, I think I found the problem. <img src="/forum/images/icons/blush.gif" alt="" /> I forgot to add this change in delete.php:<br /><br />Find:<br /><br /> $user = $userob -> authenticate();<br /><br /><br />And change it to:<br /><br /> $user = $userob -> authenticate(U_Email);<br /><br />Updated (once again <img src="/forum/images/icons/tongue.gif" alt="" />) instructions attached. One of these days I'll get it right on the first try. <img src="/forum/images/icons/grin.gif" alt="" /><br />
Registered: 03/09/02
Posts: 329
Loc: Michigan, USA
You fixed it, because I just emailed all my pm's from here to myself. <img src="/forum/images/icons/smile.gif" alt="" /> Yay! <img src="/forum/images/icons/grin.gif" alt="" />
WrÅith
Enthusiast
Registered: 01/31/02
Posts: 310
Loc: California, USA
Lisa:<br /><br />Great job on this. I only had a couple of suggestions:<br /><br />In viewmessages.tmpl, change this:<br /><br /><pre><font class="small">code:</font><hr>{$ubbt_lang['TEXT_DELETE']}</pre><hr><br />To this:<br /><br /><pre><font class="small">code:</font><hr>{$ubbt_lang['TEXT_SELECT']}</pre><hr><br />Then, in generic.php, add the following line:<br /><br /><pre><font class="small">code:</font><hr>$ubbt_lang['TEXT_SELECT'] = "Select";</pre><hr><br />After this:<br /><br /><pre><font class="small">code:</font><hr>$ubbt_lang['PM_EMAIL'] = "Email PM";</pre><hr><br />What this will do is to change the column header from "Delete" to "Select". I think this helps to avoid confusion since users might not figure out that they need to check the "Delete" box in order to email messages to themselves. <img src="/forum/images/icons/smile.gif" alt="" /> Changing it to "Select" still works for the "Delete Checked" button, so it shouldn't be confusing at all. <br /><br />Hope this helps...
Registered: 03/09/02
Posts: 329
Loc: Michigan, USA
I think you're right WrÅith, I think it will make it much clearer for users. <img src="/forum/images/icons/smile.gif" alt="" /><br /><br />I updated the file and attached it as v1.0.4 . Thanks! <img src="/forum/images/icons/smile.gif" alt="" />
Stefan_dup1
Power User
Registered: 02/12/02
Posts: 70
Hi Lisa,<br /><br />you've forgot to add the "$user = $userob -> authenticate(U_Email);" - fix into the documentation of v1.04<br /><br />Btw ... seems that this hack needs to be optimized against sending html-codes included into the pm's, right?
_________________________
Gruß/Regards Stefan thinkfactory™
For the most part I think that the <br /> tags need to be converted to control character breaks, \n or \r\n depending on the system I believe.<br /><br />Other steps would need to be taken to display the emailed pm with the html content in working order too. <img src="/forum/images/icons/smile.gif" alt="" />
Stefan_dup1
Power User
Registered: 02/12/02
Posts: 70
Got it ...<br /><br />[]<br />Find ~ line 35:<br /> // -------------------------------<br /> // Make sure they own this message<br /> $Username_q = addslashes($Username);<br /><hr /></blockquote><br /><br />should be:<br /><br />[]<br />Find ~ line 39:<br />// ---------------------------------------------<br />// Track the total number of delete new messages<br /> $Total = 0;<br /><hr /></blockquote><br /><br />
_________________________
Gruß/Regards Stefan thinkfactory™
mrnocal
User
Registered: 06/25/02
Posts: 29
Loc: New York
I figured it out (worked for me anyway). In the viewmessages.tmpl file, the "Delete Checked" button is named "option", so in the delete.php, instead of inserting:<br /><br />if ($deletecheck == "{$ubbt_lang['DELETE_CHECKED']}") <br /><br />it should be:<br />if ($option == "{$ubbt_lang['DELETE_CHECKED']}")<br /><br />
_________________________
-Marty Club MOTS General Manager