php forum
php mysql forum
php mysql smarty
 
Page 2 of 2 < 1 2
Topic Options
#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 2 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