Hi Smarty... Thanks for da info! The underscore thing worked...thks!

BTW,...do I have to RUN the "Start Indexing" thing first before I use this plugin??

Let me know.


thanks

Hi Smarty,

Thanks for the reply. Otherwise when I hit the AP_PM-Monitoring.php in my admin panel, the page opens but gives me this::

This is the url displayed::

../forums/admin_loader.php?plugin=AP_PM-Monitoring.php

This is what it shows me this message::

"Bad request. The link you followed is incorrect or outdated."


Any idea's Smarty??


Thanks

Its unfortunete that anyone who runs a website that charges membership, or exchanges money somehow, basically falls under the rules and becomes governed by the "US Federal Trade Commission" (if your servers location is based in the USA) without evening knowing about it. Which is a bummers for webmasters. I also know since all the Myspace controversy, that the Feds are more so clamping down of gaining some control and trying to enacting crazy laws over US based websites & ISP's in requiring them to keep digital/text records and monitoring of all type of comunications/dailog between member/users - because of all the problems with the 'no good' types of people out there. And I wouldn't doubt the feds later will try to enact laws over free message boards/forums/blogs sites somehow eventually. So (I think) a persons privacy rights will not be so private much as time go's on... Anyhow's, so said...

But otherwise, like you suggested, having some type "report" pm mod/plugin sounds like a very good idea. And that would work for me too.

Cheers

teenagegluesniffer wrote:

Hey, this is just my thought on this whole thing.
Don't do it, and if you do, make sure people know that you're doing it.
I would want to know this, before registering at a website....that way I wouldn't register there.
I would recommend more of a "report" pm...

Do you think places like myspace, eharmony, etc and others, including ISP's cannot read your pm's or email?? Believe me they have access to these things if they choose too. If you read they're Terms or Use or (TOS) Terms or Service agreements, in fine print, they 'reserve the right' to aquire information they need to or about a user that relates on their site if they feel (it involves suspected criminal circumstances or activity). Which inturn supercedes a norm privacy policy on some of these sites.... So if they want to, they have right to for this reason. Just read the fine print on some of these sites sometime.

BTW, my Terms of Use Agreement & TOS, on my site, reads this way anyways, where I reserve the right if I see the need to if I am ordered by any law inforcement agency to do so about a user. And yes, every new member on my site has to by-pass my TOU & TOS anyways, which states this, so its not like they don't know after signing up.

But anyways, it would be good though to have a feature like this AP_PM-Monitoring.php thingy available (incase you see the need to use it).

Just my 2cents & Opinion...

Smartys wrote:

The code for the plugin is

<?php
/***********************************************************************

  Copyright (C) 2002-2005  Neal Poole (smartys@gmail.com)

  This file is part of PunBB.

  PunBB is free software; you can redistribute it and/or modify it
  under the terms of the GNU General Public License as published
  by the Free Software Foundation; either version 2 of the License,
  or (at your option) any later version.

  PunBB is distributed in the hope that it will be useful, but
  WITHOUT ANY WARRANTY; without even the implied warranty of
  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  GNU General Public License for more details.

  You should have received a copy of the GNU General Public License
  along with this program; if not, write to the Free Software
  Foundation, Inc., 59 Temple Place, Suite 330, Boston,
  MA  02111-1307  USA

************************************************************************/

// Make sure no one attempts to run this script "directly"
if (!defined('PUN'))
    exit;

// Tell admin_loader.php that this is indeed a plugin and that it is loaded
define('PUN_PLUGIN_LOADED', 1);

// We're adding an index
if (isset($_POST['index']))
{
    // Turn off PHP time limit
    @set_time_limit(0);
    
    // Lets go through the list of indexes and see if we already did this
    $result = $db->query('SHOW INDEX FROM '.$db->prefix.'messages') or error('Unable to check for index', __FILE__, __LINE__, $db->error());
    while ($cur_index = $db->fetch_assoc($result))
    {
        if ($cur_index['Key_name'] == 'pm_message_idx')
            message('It looks like you have already created the correct index');
    }
    
    // Add the index
    $db->query('ALTER TABLE '.$db->prefix.'messages ADD FULLTEXT INDEX pm_message_idx (message)') or error('Unable to add index', __FILE__, __LINE__, $db->error());
    
    message('The index was successfully added.');
}

// If we're deleting messages
else if (isset($_POST['delete']))
{
    confirm_referrer('admin_loader.php');
    
    if (!isset($_POST['del_message']) || empty($_POST['del_message']))
        message('You must select at least one message to delete!');
        
    $messages = array_values(array_map("intval", $_POST['del_message']));
    $messages = implode(',', $messages);

    $db->query('DELETE FROM '.$db->prefix.'messages WHERE id IN ('.$messages.')') or error('Unable to delete messages', __FILE__, __LINE__, $db->error());
    
    message('Messages deleted');
}

// If we're trying to view a message
else if (isset($_GET['view_id']))
{
    require PUN_ROOT.'include/parser.php';

    $id = intval($_GET['view_id']);
    
    $result = $db->query('SELECT m.*, u.username AS owner_name FROM '.$db->prefix.'messages AS m INNER JOIN '.$db->prefix.'users AS u ON (u.id = m.owner) WHERE m.id = '.$id) or error('Unable to fetch message', __FILE__, __LINE__, $db->error());
    
    if ($db->num_rows($result) < 1)
        message($lang_common['Bad request']);
    
    // Display the admin navigation menu
    generate_admin_menu($plugin);
    
    $message = $db->fetch_assoc($result);
    $message['smileys'] = isset($message['smileys']) ? $message['smileys'] : $pun_user['show_smilies'];
    $message['message'] = parse_message($message['message'], (int)(!$message['smileys']));
    
?>

    <div id="p<?php echo $message['id'] ?>" class="blockpost row_odd firstpost blockform">
        <h2><span>View Message</span></h2>
        <div class="box">
            <div class="inbox">
                <div class="postleft">
                    <dl>
                        <dt><small>On <?php echo format_time($message['posted']) ?>, <strong><a href="profile.php?id=<?php echo $message['sender_id'] ?>"><?php echo pun_htmlspecialchars($message['sender']) ?></a></strong> sent the following message to <strong><a href="profile.php?id=<?php echo $message['owner'] ?>"><?php echo pun_htmlspecialchars($message['owner_name']) ?></a></strong></small></dt>
                    </dl>
                </div>
                <div class="postright">
                    <div class="postmsg">
                        <?php echo $message['message']."\n" ?>
                    </div>
                </div>
            </div>
        </div>
    </div>
    
<?php

}

// If the "Search" button was clicked
else if (isset($_POST['search']))
{
    $sender = intval($_POST['sender']);
    $recipient = intval($_POST['recipient']);
    
    if ($sender < 1 || $recipient < 1)
        message($lang_common['Bad request']);
    
    $keywords = trim($db->escape($_POST['keywords']));
    
    // Form the correct where statement
    $where_sql = array();
    if (strlen($keywords) > 0)
        $where_sql[] = 'match(message) against ("'.$keywords.'" IN BOOLEAN MODE)';
    if ($sender > 1)
        $where_sql[] = 'sender_id = '.$sender;
    if ($recipient > 1)
        $where_sql[] = 'owner =  '.$recipient;
    
    if (empty($where_sql))
        message('You must enter at least one keyword and/or a sender and/or a recipient if you wish to search');
    
    // Format the SQL properly
    $where_sql = implode(' and ', $where_sql);
    
    $result = $db->query('SELECT m.*, u.username AS owner_name FROM '.$db->prefix.'messages AS m INNER JOIN '.$db->prefix.'users AS u ON (u.id = m.owner) WHERE '.$where_sql.' ORDER BY posted DESC') or error('Unable to fetch messages list', __FILE__, __LINE__, $db->error());
    
    if ($db->num_rows($result) < 1)
        message('No messages matched your search criteria');
?>
    <div class="blocktable">
        <h2><span>Search Results</span></h2>
        <form id="search_results" method="post" action="<?php echo $_SERVER['REQUEST_URI'] ?>">
        <div class="box">
            <div class="inbox">
                <table cellspacing="0">
                    <tr>
                        <th width="20"></th>
                        <th>Subject</th>
                        <th>Sender</th>
                        <th>Reciever</th>
                        <th>Date Sent</th>
                    </tr>
<?php
    while ($cur_message = $db->fetch_assoc($result))
    {
    
?>
                    <tr>
                        <td><input type="checkbox" name="del_message[]" value="<?php echo $cur_message['id'] ?>" /></td>
                        <td><a href="<?php echo $_SERVER['REQUEST_URI'] ?>&view_id=<?php echo $cur_message['id'] ?>"><?php echo pun_htmlspecialchars($cur_message['subject']) ?></a></td>
                        <td><a href="profile.php?id=<?php echo $cur_message['sender_id'] ?>"><?php echo pun_htmlspecialchars($cur_message['sender']) ?></a></td>
                        <td><a href="profile.php?id=<?php echo $cur_message['owner'] ?>"><?php echo pun_htmlspecialchars($cur_message['owner_name']) ?></a></td>
                        <td><?php echo format_time($cur_message['posted']) ?></td>
                    </tr>
<?php

    }
?>
                </table>
            </div>
        </div>
        <p><input type="submit" name="delete" value="Delete multiple messages" /></p>
        </form>
<?php
}

else    // If not, we show the form
{
    $result = $db->query('SELECT id, username FROM '.$db->prefix.'users WHERE id > 1 ORDER BY id ASC') or error('Unable to grab user list', __FILE__, __LINE__, $db->error());
    
    $users = array();
    while ($cur_user = $db->fetch_assoc($result))
    {
        $users[] = $cur_user;
    }
    
    // Display the admin navigation menu
    generate_admin_menu($plugin);

?>
    <div id="exampleplugin" class="blockform">
        <h2><span>Monitor Private Messages</span></h2>
        <div class="box">
            <div class="inbox">
                <p>This plugin allows you to easily and simply monitor the private messages sent by your users</p>
                
                <form id="search" method="post" action="<?php echo $_SERVER['REQUEST_URI'] ?>&foo=bar">
                <div class="inform">
                    <fieldset>
                        <legend>New search</legend>
                        <div class="infldset">
                            <label class="conl">Keyword search<br /><input type="text" name="keywords" size="40" maxlength="100" /><br /></label>
                            <label class="conl">Sender search<br /><select name="sender"><option value="1">All users</option><?php foreach ($users as $key => $val) echo '<option value="'.$val['id'].'">'.pun_htmlspecialchars($val['username']).'</option>'; ?></select><br /></label>
                            <label class="conl">Recipient search<br /><select name="recipient"><option value="1">All users</option><?php foreach ($users as $key => $val) echo '<option value="'.$val['id'].'">'.pun_htmlspecialchars($val['username']).'</option>'; ?></select><br /></label>
                            <p class="clearb">To search by keyword, enter a term or terms to search for. Separate terms with spaces. To search by author or recipient, Choose the user's username from the dropdown box. You may use * as a wildcard for your keywords.</p>
                        </div>
                    </fieldset>
                </div>
                <p><input type="submit" name="search" value="Submit" accesskey="s" /></p>
                </form>
            </div>
            <form id="index" method="post" action="<?php echo $_SERVER['REQUEST_URI'] ?>&foo=bar">
            <div class="inform">
                <fieldset>
                    <legend>Start Indexing</legend>
                    <div class="infldset">
                        <p class="clearb">The first time you run this script, it is recommended that you let it add an index to your messages table so that you may search much more quickly. Note that the indexing may take an extremely long time, please do not hit Stop in your browser while this is happening. Keep in mind that this need only be run <strong>once</strong>.</p>
                        <p><input type="submit" name="index" value="Start the indexing!" /></p>
                    </div>
                </fieldset>
            </div>
            </form>
        </div>
    </div>
<?php

}

// Note that the script just ends here. The footer will be included by admin_loader.php.

Kato reported an issue with viewing a private message, I did not have an issue. If anyone else tries it and has an issue and can give me access to try and debug it, that would be great (or if you just see the error tongue)

Edit: Small CSS issue has been fixed
Edit2: Added some code when indexing to ensure the index isn't run twice
Edit3: Fixed a small issue that occured in Kato's situation, which seemed to have something to do with MySQL queries in parser.php

Hi,

I'm really really interested the AP_PM-Monitoring.php plugin feature! But unfortunetly it seems the AP_PM-Monitoring.php does not seem to work on my forum??:( Any idea's??

Any help to this would be most appreciated...

Thanks

Opps,.....I mean I added the code after ('PUN_PLUGIN_LOADED', 1) like you sayed, did not remove it. But ok, I kinda figure that @set_time_limit(0); was to slow things down a little.

Thanks Again!  wink

Smartys wrote:

The chances of your database being messed up like that are unlikely
I do think I know the problem though
Try adding this to the top of the plugin (after define('PUN_PLUGIN_LOADED', 1);)

@set_time_limit(0);

Hi Smarty,

I changed out the code above with the one you supplyed. Btw, what does this new code do above? Does it slow down the batch email process or something?

Just curious...

thxs

MadHatter wrote:

I've found the fastest way for me to patch is to use beyond compare (best diff I've ever used).  I just download the release version, and the version I have online, right click on the distro, select it for compare, right click on my top level folder and do a binary compare between the 2 folders.  it finds the diff's and lets you visually see what gets changed where, and all you do is click and say, use this or use mine.  simple simple simple.

I just downloaded it. Wow, cool tool this "beyond compare" thingy! Wish I knew this before. It would have saved me alot of time. Oh, well, better late than never...LOL...

Thanks 4 the tip though!

34

(4 replies, posted in Feature requests)

Oke Doke!..Thxs!

35

(4 replies, posted in Feature requests)

Question, is it possible and safe to run the poll+2 install_mod.php and overwrite the older 1.1 version that I already have installed? Would it effect the database tables somehow? Since the older version of tables are already there in my DB?



Just wondering.. neutral

Thanks Smarty! I'll give it a try!!!

Cheers!

Rod wrote:

With now 4507 members ... it was impossible to use this plug in which crashes ...

Is it possible to "rewrite" it ?

Seems I am having the same problem too now. Need something that would "limit" the number of emails sent out by the AP_Broadcast_Email to a batch of say 500 emails at a time in different time intervals. Or something like that? ...I dunno.

Smartys wrote:

Cache doesn't affect the user table.
If you're sure that they actually aren't getting the emails (as opposed to the email being put in a spam filter, etc) talk to your host: they may throttle you when you try to send too many emails

Oh, so the cache files do not have any bearing on user sql tables? ...That is good. Otherwise I found out from my hosting provider my limit on emails sent out is about a thousand an hour. So I don't really see any problem there.

All I know is that - when I use the email plugin not all of my members are not receiving my emails. I think the reason for this must of been when I moved my sql DB at the time, I must of damaged some of my tables in the file, or back quotes added that are not suppose to be there, which is causing the non parsing of older email address. Oh well.... back to the PunBB drawing board!!...LOL....

Otherwise, thanks for your help again Smarty!!

Cheers

Hi Smarty,

I have another question again, I noticed after running my AP_Broadcast_Email plugin, and after all my emails where sent, the next proceeding page showed me this message 404::

========================================
The page cannot be displayed
The page you are looking for is currently unavailable. The Web site might
be experiencing technical difficulties, or you may need to adjust your
browser settings.

Click the  Refresh button, or try again later.

If your Network Administrator has enabled it, Microsoft Windows can examine
your network and automatically discover network connection settings............

Cannot find server or DNS Error
Internet Explorer
========================================


Shouldn't it show me this message instead??

***************************************************
Broadcast Email - Message Sent

The message was sent to [ ] Registered Users.

You should receive the Administrator's copy in a few moments.

Please use the Administrator's copy as a record of this event.

***************************************************

Let me know your thoughts...

Thanks!

Hi Smarty,

Ok, thats good to know... Otherwise, I'll go ask my hosting provider about the "throttling" thing.. I'll get back as soon as I find out.

Thanks!

Hi Smarty,

Thank so much for your help! All fixed now!!:)

I have another new question though, I noticed when I ran the "AP_Broadcast_Email.php" today, I noticed that alot of people never got any email from me thru my froum, but only the people that signed up for membership in the last few days. Any idea's why? -- Though, but I did change out my sql database to an older database from about 4 weeks ago, which did not have the new members in it - which did not have the new signed up members in it  a few days ago, (and which those did get my email today). Is it because my new "cache" files does not "Recognize" my older sql database files and users/emails that I uploaded????

Basically, I got alot of members in my older sql database that I cannot get any e-mails out too by way of the AP_Broadcast_Email.php, but only to those who have just signed up a few days ago under my old database, then the AP_Broadcast_Email.php works only for them.

Any help and advice would be most appreciated!!

Thanks

Hi Smartys,

Thanks for the reply. otherwise, I went thru the whole sql file, and I didn't find no double quotations in the email vars. Though this could be the problem (i think):

It could "spamassassin" on the other email servers that I am sending the emails out to and maybe bouncing back or blocking these emails inturn sending them back to me saying unable to deliver. Though...i dunno....

BTW, thanks for you both Smarty & elbekko for your input and advise though. Every bit is a little help to my problem...:)

Cheers!


BTW, here is the return email I got::

Mail delivery failed: returning message to sender 
From:  "Mail Delivery System" <Mailer-Daemon@relay1.noc.net]

This message was created automatically by mail delivery software.

A message that you sent could not be delivered to one or more of its
recipients. This is a permanent error. The following address(es) failed:

  "24toots <24toots"@yahoo.com
    SMTP error from remote mailer after end of data:
    host c.mx.mail.yahoo.com [216.34.53.3]: 554 delivery error:
    dd This user doesn't have a yahoo.com account (24toots <24toots@yahoo.com) [0] -
mta162.mail.re4.yahoo.com

------ This is a copy of the message, including all the headers. ------

Return-path: <coolforum@noc.com>
Received: from smtp-2.noc.net ([216.145.225.38])
        by relay1.noc.net with esmtp (Exim 4.41 (FreeBSD))
        id 1H61HK-000Bbv-Eg
        for "24toots <24toots"@yahoo.com; Sun, 14 Jan 2007 04:03:50 -0500
Received: (qmail 26332 invoked by uid 510); 14 Jan 2007 09:03:48 -0000
Received: from coolforum@noc.com by smtp-2.noc.net by uid 89 with
qmail-scanner-1.20st 
 (clamuko: 0.74. spamassassin: 2.63.  Clear:RC:1(216.145.231.253):. 
 Processed in 0.023297 secs); 14 Jan 2007 09:03:48 -0000
X-Qmail-Scanner-Mail-From: coolforum@noc.com via smtp-2.noc.net
X-Qmail-Scanner: 1.20st (Clear:RC:1(216.145.231.253):. Processed in 0.023297 secs)
Received: from host23.webservices.net (HELO smtp.coolforum.com)
(coolforum@noc.com@216.145.231.253)
  by smtp-2.noc.net with SMTP; 14 Jan 2007 09:03:48 -0000
Subject: Now the "coolforum"
To: <24toots <24toots@yahoo.com>>, 
From: "coolforum" <coolforum@noc.com>
Date: Sun, 14 Jan 2007 04:03:48 -0500
MIME-Version: 1.0
Content-transfer-encoding: 8bit
Content-type: text/plain; charset=iso-8859-1
X-Mailer: PunBB Mailer
X-Qmail-Scanner-Message-ID: <116876542876626327@smtp-2.noc.net>
X-HR-Scan-Signature: fe063f1ce5d6789a07ca39ae7b51bdb9
X-HR-Status: HR_AVScanned-(coolforum@noc.com/216.120.225.38)

Hi Smartys,

Thanks for the reply. Wish I could upgrade, but unfortunetly I just have to MANY mods and upgrades to the script. Which inturn costed me way over 1k to have these hacks & mods done to it so far.

Thanks for your advise though...

cheers!

Would this be my problem in my (email.php) that would cause the AP_Broadcast_Email.php to bounce emails?

 // Detect what linebreak we should use for the headers
    if (strtoupper(substr(PHP_OS, 0, 3) == 'WIN'))
        $eol = "\r\n";
    else if (strtoupper(substr(PHP_OS, 0, 3) == 'MAC'))
        $eol = "\r";
    else
        $eol = "\n";
                $eol=  "\r\n";

I check my database for the any weired changes, but really no luck why this QUOTATIONS are being inputted into my mass mailing list script which is emailed to all my forum members.

Seems when I use my mail plugin to send all members an email, the program seems to be adding in  this (") quotation in the members email address, inturn the email server on the other receiving end kicks back the email to me because it does not reconize the email address especially with a quotation before the "@yahoo.com

Anyways, any ideas or help anyone could offer me would be most
appreciated!!

Thanks

Here is a copy of the email query I received. I noticed that the recipients email address has a "QUOTATION" just after his email username?? This seems to be causing the bounces? Must be my database or that the Broadcast Email plugin thats causing this??

=====================================================
A message that you sent could not be delivered to one or more of its
recipients. This is a permanent error. The following address(es) failed:

"force2245 <force2245"@yahoo.com
   
SMTP error from remote mailer after end of data:
host c.mx.mail.yahoo.com [216.39.53.3]: 554 delivery error:
dd This user doesn't have a yahoo.com account.
=====================================================

Anybodys advise would most be appreciated!

Thanks

Hi,

I ran my Broadcast_Email plugin today to send out an email message to my members, and I receive a HUGE amount of "Unable To Deliver" message backs to my email account.

My question is, I am running PunBB 1.2.6 - and is there a WAY to check ALL members e-mail addresses within my forum to authenticate that they're email addresses are still active or good???

Any advise or help anyone could offer to my question would be most appreciated!!!

Thanks sad

PS..... I noticed their was a similar older posts  http://punbb.org/forums/viewtopic.php?id=6910 but it had no answer to this question.

BTW, the last time I sent out a Broad Cast email was a very long time ago. So I guess there are alot of user members that no longer exits in my forum, that I have to find someway...

Anyone got an idea?? How too?

Hi,

Can you add additional news bits in the the AP_News_Generator.php file like:

// The forum from which we'll pull the news bits
$forum_id = 1; - $forum_id = 2; - $forum_id = 3; - $forum_id = 4;

If its possible, how would I write it to add these new extra var's on line 27 in the AP_News_Generator.php?

Anybody have any idea's?... Would appreciate!

Thanks

I dunno if this is the right place to post this but here go's...

QUESTION:

Is their a hack, mod, or code I could add-in to the punbb gallery mod 2.0 that will enable the end user member to "delete/remove" his own photo from the gallery?

Any help or idea's to this question would be most appreciated!

Thanks

Smartys wrote:

Aha, my code was from 1.2.14 wink

After the lines you found, paste

$eol=  "\r\n";

You should really upgrade btw

HI SMARTY,

THAT WAS THE "TICKET!!! ALL FIXED NOW!!!! EVERYTHING WORKS FINE!!!

YOU DA BOMB!!! smile

THANKS VERY MUCH!!!

cool