php forum
php mysql forum
php mysql smarty
 
Page 1 of 2 1 2 >
Topic Options
#221545 - 07/23/02 09:58 AM Email PM's
Lisa_P Offline
Enthusiast

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


Attachments
53036-emailpm1.0.3.txt (23 downloads)

_________________________
[:"red"]Lisa[/]

Top
#221546 - 07/23/02 06:54 PM Re: Email PM's [Re: JacquiL]
JustDave Offline
That 70's Guy

Registered: 06/24/01
Posts: 4097
Credit JoshPet, he suggested the hack. I just obliged. <img src="/forum/images/icons/wink.gif" alt="" />
_________________________
~Dave
ChattersOnline.com

Top
#221547 - 07/23/02 08:56 PM Re: Email PM's [Re: sjsaunders]
JoshPet Offline
I type Like navaho

Registered: 11/29/01
Posts: 11330
Loc: Charlotte, NC
Thanks...<br />But anyone can think 'em up. You guys make it happen. <img src="/forum/images/icons/smile.gif" alt="" />
_________________________
Joshua Pettit
www.JoshuaPettit.com
My abilities are for hire.

Top
#221548 - 07/23/02 09:45 PM Re: Email PM's [Re: Daine]
Lisa_P Offline
Enthusiast

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="" />


Attachments
53052-emailpm1.0.3.txt (16 downloads)

_________________________
[:"red"]Lisa[/]

Top
#221549 - 07/23/02 10:47 PM Re: Email PM's [Re: JacquiL]
AllenAyres Offline

I type Like navaho

Registered: 03/10/00
Posts: 25580
Loc: Texas
Thanks Lisa, you are becoming quite the developer yourself. Nice work. <img src="/forum/images/icons/smile.gif" alt="" />
_________________________
- Allen wavey
- What Drives You?

Top
#221550 - 07/23/02 11:15 PM Re: Email PM's [Re: SurfMinister]
AllenAyres Offline

I type Like navaho

Registered: 03/10/00
Posts: 25580
Loc: Texas
Awaiting email confirmation <img src="/forum/images/icons/smile.gif" alt="" />
_________________________
- Allen wavey
- What Drives You?

Top
#221551 - 07/23/02 11:46 PM Re: Email PM's [Re: SurfMinister]
Lisa_P Offline
Enthusiast

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 . . . .
_________________________
[:"red"]Lisa[/]

Top
#221552 - 07/24/02 01:27 AM Re: Email PM's [Re: SurfMinister]
Lisa_P Offline
Enthusiast

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


Attachments
53074-emailpm1.0.3.txt (32 downloads)

_________________________
[:"red"]Lisa[/]

Top
#221553 - 07/24/02 02:14 AM Re: Email PM's [Re: SurfMinister]
Lisa_P Offline
Enthusiast

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="" />
_________________________
[:"red"]Lisa[/]

Top
#221554 - 07/27/02 01:35 AM Re: Email PM's [Re: JacquiL]
WrÅith Offline
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...

Top
#221555 - 07/27/02 03:44 PM Re: Email PM's [Re: SDS]
Lisa_P Offline
Enthusiast

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="" />


Attachments
53238-6.0.2- PM_ Hack_1.0.4.txt (17 downloads)

_________________________
[:"red"]Lisa[/]

Top
#221556 - 08/13/02 09:11 PM Re: Email PM's [Re: JacquiL]
Stefan_dup1 Offline
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™

Top
#221557 - 08/13/02 10:01 PM Re: Email PM's [Re: MRLefferts]
JustDave Offline
That 70's Guy

Registered: 06/24/01
Posts: 4097
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="" />
_________________________
~Dave
ChattersOnline.com

Top
#221558 - 08/14/02 10:09 AM Re: Email PM's [Re: JacquiL]
Stefan_dup1 Offline
Power User

Registered: 02/12/02
Posts: 70
Hmm ... after adding this hack correctly the deletion of private messages doesn't work anymore ... anyone tested this hack too?
_________________________
Gruß/Regards
Stefan
thinkfactory™

Top
#221559 - 08/14/02 10:24 AM Re: Email PM's [Re: MRLefferts]
Stefan_dup1 Offline
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™

Top
#221560 - 08/14/02 10:55 AM Re: Email PM's [Re: MRLefferts]
JustDave Offline
That 70's Guy

Registered: 06/24/01
Posts: 4097
I haven't done anything with it since 5.5.1, I believe... lol <img src="/forum/images/icons/wink.gif" alt="" />
_________________________
~Dave
ChattersOnline.com

Top
#221561 - 08/17/02 02:14 PM Re: Email PM's [Re: MRLefferts]
mrnocal Offline
User

Registered: 06/25/02
Posts: 29
Loc: New York
It still won't delete checked PM's when clicking the "Delete Checked" button. Did I miss something?


Edited by mrnocal (08/17/02 02:19 PM)
_________________________
-Marty
Club MOTS General Manager

Top
#221562 - 08/18/02 07:16 PM Re: Email PM's [Re: Glazor]
mrnocal Offline
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

Top
#221563 - 08/18/02 07:32 PM Re: Email PM's [Re: Glazor]
JustDave Offline
That 70's Guy

Registered: 06/24/01
Posts: 4097
Thanks for sharing! <img src="/forum/images/icons/smile.gif" alt="" /><br /><br />I'll probably be putting this into my main site too at some point.
_________________________
~Dave
ChattersOnline.com

Top
#221564 - 10/02/02 01:56 PM Re: Email PM's [Re: sjsaunders]
Astaran Offline
Addict

Registered: 12/21/00
Posts: 1545
Loc: Germany
For 6.1 the table-prefix needs to be added.<br /><br />Change:<br /><pre><font class="small">code:</font><hr> $query = "<br /> SELECT M_Subject, M_Sender, M_Sent, M_Number, M_Message<br /> FROM w3t_Messages<br /> WHERE M_Username = '$Username_q'<br /> $msgquery<br /> ";</pre><hr><br />to:<br /><pre><font class="small">code:</font><hr> $query = "<br /> SELECT M_Subject, M_Sender, M_Sent, M_Number, M_Message<br /> FROM {$config['tbprefix']}Messages<br /> WHERE M_Username = '$Username_q'<br /> $msgquery<br /> ";</pre><hr>
_________________________
Running a community? -> Keep informed and take it to the next level

Top
#221565 - 10/03/02 06:06 AM Re: Email PM's [Re: Glazor]
dimopoulos Offline
Kahuna

Registered: 08/18/02
Posts: 1271
Loc: Vienna, Austria
I installed this hack last night but did not work at all. Following the posts of this thread I managed to make it delete messages (as it used to) but not to send emails.<br /><br />Following the logic of the problem, I think I found a possible solution (which works very well for me).<br /><br />In the delete.php the logic applied by the hack is to check if any of the checkboxes are checked and then delete the messages and after that email them.<br /><br />I moved the emailing code which starts with:<br /><pre><font class="small">code:</font><hr><br /> // ----------------------------------------------------------------------------<br /> // If they chose "Email PM" then we email the message instead of deleting it<br /><br /> if ($pmemail == "{$ubbt_lang['PM_EMAIL']}") {<br /></pre><hr><br /><br />in the instructions just below the line ~39<br /><pre><font class="small">code:</font><hr><br />$Total=0;<br /></pre><hr><br /><br />and after that block of code I changed the:<br /><pre><font class="small">code:</font><hr><br />if ($deletecheck == "{$ubbt_lang['DELETE_CHECKED']}") <br /></pre><hr><br /><br />to <br /><br /><pre><font class="small">code:</font><hr><br />elseif ($option == "{$ubbt_lang['DELETE_CHECKED']}")<br /></pre><hr><br /><br />This way once you select messages and click on the Email PM button, the messages will be sent to you via email (provided that you have completed the rest of the steps outlined in the instructions of this hack).<br /><br />Once you return back to the messages screen you will have to select back the ones you emailed and click delete to delete them.<br /><br />This is a feature that I wanted for my users. If you want to select messages and by clicking Email PM them to be emailed and deleted you need to first change the:<br /><pre><font class="small">code:</font><hr><br />$ubbt_lang['PM_EMAIL'] = "Email PM";<br /></pre><hr><br /><br />to <br /><pre><font class="small">code:</font><hr><br />$ubbt_lang['PM_EMAIL'] = "Email and Delete checked";<br /></pre><hr><br /><br />and change the<br /><pre><font class="small">code:</font><hr><br />elseif ($option == "{$ubbt_lang['DELETE_CHECKED']}")<br /></pre><hr><br /><br />to <br /><br /><pre><font class="small">code:</font><hr><br />if ($option == "{$ubbt_lang['DELETE_CHECKED']}")<br /></pre><hr><br /><br />Warm regards<br /><br />Nikos
_________________________
Nikos

Top
#221566 - 01/05/03 03:05 PM Re: Email PM's [Re: JacquiL]
sportbikes Offline
Member

Registered: 10/29/02
Posts: 167
Loc: So Cal USA
I would sure like to implement this hack on 6.2. Is anyone else interested? Maybe is there is, we can persuade someone knowledgeable to lend a hand <img src="/forum/images/graemlins/wink.gif" alt="" /> <br /><br />Seems like this would help me eliminate many of my own 500+ PMs that I want to archive for later use, never mind my users clearing their PMs.<br />
_________________________
mike
www.esportbike.com

Top
#221567 - 01/05/03 03:15 PM Re: Email PM's [Re: alsalmicom]
Astaran Offline
Addict

Registered: 12/21/00
Posts: 1545
Loc: Germany
I have this one on my toDo list for the next week. Especially my moderators find it pretty useful.<br /><br />I'll post the updated instructions, when finished.
_________________________
Running a community? -> Keep informed and take it to the next level

Top
#221568 - 01/05/03 03:18 PM Re: Email PM's [Re: -Fusion-]
sportbikes Offline
Member

Registered: 10/29/02
Posts: 167
Loc: So Cal USA
Astaran,<br /><br />THANKS!<br /><br />Haven't used it before, but it looks great.<br />
_________________________
mike
www.esportbike.com

Top
#221569 - 01/05/03 03:35 PM Re: Email PM's [Re: -Fusion-]
JustDave Offline
That 70's Guy

Registered: 06/24/01
Posts: 4097
I have it working here. <img src="/forum/images/graemlins/smile.gif" alt="" /><br /><br />You an put the instructions up or I can.
_________________________
~Dave
ChattersOnline.com

Top
#221570 - 01/05/03 03:45 PM Re: Email PM's [Re: sjsaunders]
JustDave Offline
That 70's Guy

Registered: 06/24/01
Posts: 4097
Looks like I need to fine tune it a tad. Getting the user number as the name of the user that sent the pm. <img src="/forum/images/graemlins/crazy.gif" alt="" /><br /><br />lol but it works.
_________________________
~Dave
ChattersOnline.com

Top
#221571 - 01/05/03 04:04 PM Re: Email PM's [Re: sjsaunders]
Astaran Offline
Addict

Registered: 12/21/00
Posts: 1545
Loc: Germany
If you have it, do it <img src="/forum/images/graemlins/wink.gif" alt="" /><br />I haven't started working on it and have several hacks to convert to 6.2<br />Maybe i get my forum-management for moderators before a new version is released this time. ;-)
_________________________
Running a community? -> Keep informed and take it to the next level

Top
#221572 - 01/05/03 04:28 PM Re: Email PM's [Re: -Fusion-]
JustDave Offline
That 70's Guy

Registered: 06/24/01
Posts: 4097
hehe ok will do. <img src="/forum/images/graemlins/smile.gif" alt="" /><br /><br />I'm working on allowing for sending the pm's in html based on the user's prefs. Have a glitch with the same pm being looped in a number of times. Working on it now. <img src="/forum/images/graemlins/smile.gif" alt="" />
_________________________
~Dave
ChattersOnline.com

Top
#221573 - 01/05/03 04:38 PM Re: Email PM's [Re: sjsaunders]
Astaran Offline
Addict

Registered: 12/21/00
Posts: 1545
Loc: Germany
i'm using this for 6.1<br />
Code:
 // E-Mail PM-Hack<br />//---------------<br />}<br />if ($email) {<br />   $Username_q = addslashes($Username);<br />   $g = 0;<br />   $msgquery = "AND (";<br />   for($i=0;$i&lt;=$total;$i++){<br />      $name = "box$i";<br />      if("$HTTP_POST_VARS[$name]"){<br />         $number = "$HTTP_POST_VARS[$name]";<br />         $number = ereg_replace("-NEW","",$number);<br />             $g++;<br />                 if ($g &gt; 1) {<br />                        $msgquery .= " OR ";<br />                 }<br />                 $msgquery .= "M_Number = '$number'";<br />          }<br />   }<br />   $msgquery .= ")";<br />       $newline = "\n";<br />       if (stristr(PHP_OS,"win")) {<br />          $newline = "\r\n";<br />       }<br />        $to = $user['U_Email'];<br />        $emailformat = $user['U_EmailFormat'];<br />        $Sender = "{$config['emailaddy']}";<br />        if ($g &amp;&amp; $to) {<br />            $query = "<br />                    SELECT M_Subject, M_Sender, M_Sent, M_Number, M_Message<br />                    FROM   {$config['tbprefix']}Messages<br />                    WHERE  M_Username = '$Username_q'<br />                    $msgquery<br />            ";<br />            $sth = $dbh -&gt; do_query($query);<br />                $html = new html;<br />                while ( list ($Msubject,$Msender,$Msent,$Mnumber,$Mmessage) = $dbh -&gt; fetch_array($sth) ) {<br />                         $date = $html -&gt; convert_time($Msent);<br />          		 $mailer = new mailer;<br />          		 $header = $mailer -&gt; headers($emailformat);<br />          		 $subject ="Forum-PM: $Msubject";<br />                         $Mbody = "From: ".$Msender.$newline."Subject: ".$Msubject.$newline."Date: ".$date.$newline.$newline;<br />                         $Mbody .= "$Mmessage";<br />                         mail("$to","$subject","$Mbody","$header");<br />                }<br />                $dbh -&gt; finish_sth($sth);<br />        }<br />} 
_________________________
Running a community? -> Keep informed and take it to the next level

Top
#221574 - 01/05/03 04:40 PM Re: Email PM's [Re: -Fusion-]
JustDave Offline
That 70's Guy

Registered: 06/24/01
Posts: 4097
heh I just got it working... lol<br /><br />I'll post my instructions sometime here shortly. <img src="/forum/images/graemlins/smile.gif" alt="" />
_________________________
~Dave
ChattersOnline.com

Top
#221575 - 01/05/03 05:03 PM Re: Email PM's [Re: -Fusion-]
JustDave Offline
That 70's Guy

Registered: 06/24/01
Posts: 4097
Here it is: http://www.threadsdev.com/threads/php/sh...amp;amp;fpart=1<br /><img src="/forum/images/graemlins/smile.gif" alt="" />
_________________________
~Dave
ChattersOnline.com

Top
#221576 - 01/05/03 05:12 PM Re: Email PM's [Re: sjsaunders]
Astaran Offline
Addict

Registered: 12/21/00
Posts: 1545
Loc: Germany
Thx, JustDave! <img src="/forum/images/graemlins/smile.gif" alt="" />
_________________________
Running a community? -> Keep informed and take it to the next level

Top
#221577 - 01/05/03 05:16 PM Re: Email PM's [Re: -Fusion-]
JoshPet Offline
I type Like navaho

Registered: 11/29/01
Posts: 11330
Loc: Charlotte, NC
Since this has been updated. I'll close this. <img src="/forum/images/graemlins/smile.gif" alt="" />
_________________________
Joshua Pettit
www.JoshuaPettit.com
My abilities are for hire.

Top
Page 1 of 2 1 2 >



Latest Posts
[7.2.1] - Naked shoutbox
by bellaonline
05/05/12 05:00 PM
[7.x] Stop Forum Spam Integration v0.4
by bellaonline
05/05/12 03:53 PM
Shout Box

(Views)Popular Topics
Known public proxy servers 1689885
Integrated Index Page (IIP) 5.3.1 555705
Finished-[6.5.2] Games Arcade Deluxe v1.9 501236
Integrated Index Page (IIP) 5.1.1 415112
TLD Bv2.1 Released - Threads Links Directory 396822
[6.0x] Who's Online 4.0.0 [Finished] 389412
Finished-[6.5.1] Integrated Index Page (IIP) 6.5 330423
Q & A 298663
Slash UBB 266936
[6.3.x] [beta] Hit Hack 2.0 227970
Forum Stats
13621 Members
59 Forums
37191 Topics
295716 Posts

Max Online: 686 @ 06/28/07 07:04 AM

 

 

 
fusionbb message board php hacks