Plugin Name: BBPress Private Messaging Plugin URI: http://faq.rayd.org/bbpressprivatemessage/ Description: Integrates Private Messages into BBPress Author: Joshua Hutchins Author URI: http://ardentfrost.rayd.org/ Version: 0.80
bbPress Plugin Browser »
Private Messaging (0.80)
Download
Version: 0.80
Last Updated: 2007-2-9
Requires bbPress Version: .80 or higher
Compatible up to: .80
Average Rating





Your Rating
Author: Joshua Hutchins
-
Several people have asked for additional capabilities to be added to this plugin.
1. That an e-mail alert would be sent out every time a member received a new private message, and
2. That a "PM this user" link could be added to the profile page.I know ardentfrost is busy, so I have posted instructions on how to modify the plugin files so you can do these two things.
You can view the instructions here:
http://www.wittmania.com/bb-privatemessage-upgrades.txtPlease e-mail me if you have any questions (mike at wittmania dot com). Thanks again to ardentfrost for this exceptional plugin!
Posted: 3 years ago # -
Thanks for doing that witt! I'll try to get around to adding your stuff into a release and crediting you.
I appologize to everyone who is waiting on updates. My life since January has been way busy.
Posted: 3 years ago # -
Regarding the ability to delete messages before somebody has read it. This is causing problems for my users because they are deleting "sent" messages not realising that it's deleting the message for the recipient too - hence lots of misunderstandings of the "did you get my message?"/"what message?" variety. It also seems to make no difference if the message is read or not; if the sender deletes their "sent" message, it deletes it for the recipient too (who might not want it deleted!).
I've temporarily disabled the ability to delete sent messages to prevent this, but in future versions would it be possible to fix it so that when a "sent" message is deleted, it is only removed from the sender's private message area?
I've been thinking about how to accomplish this and could probably do it for my own forum, but thought this might be an issue for others too.
My solution - although I haven't tried it yet - is to add two extra fields in the DB table:
del_receiver INT( 2 ) NOT NULL default '0' , del_sender INT( 2 ) NOT NULL default '0',The delete functions would then work as follows:
When the sender deletes a message it sets the
del_senderflag to '1' which then removes the message from view in the "Sent" list.When the receiver deletes a message it sets the
del_receiverflag to '1' which then removes the message from view in the 'Inbox'.Each time a message is deleted, by either sender or receiver, a futher check is done so that...
If the sender is deleting a message and the
del_receiverflag is already set to '1', then the message gets removed from the database entirely (it does not bother to set thedel_senderflag).Similarly, if the receiver is deleting a message and the
del_senderflag is already set to '1', then the message also gets removed from the database entirely.I'll see if I can get this working and post the changes, hopefully today, certainly by next weekend.
Posted: 3 years ago # -
Is it possible, please, to make the plugin reference display names rather than login names, which is a security risk for the owner of the forum/blog as our user names are often very different to the ones we use to log into our admin?
Posted: 3 years ago # -
Correction to my previous comment:
"It also seems to make no difference if the message is read or not; if the sender deletes their "sent" message, it deletes it for the recipient too (who might not want it deleted!)."
It seems when I tested the plugin by opening simultaneous test users in different browsers, I forgot to reload the page of the "Sender" after the "Recipient" had read the message - which meant the message still appeared to be unread (and therefore deletable). This situation is VERY unlikely to happen in the world, unless the sender has their browser open on their PMs while the recipient happens to read the message before the sender decides to delete it (unaware it's already been read).
It does still leave the problem that the sender can not get rid of sent messages. I did not have time to work on my fix, but I'll have a crack at it today.
Posted: 3 years ago # -
Solved!
The instructions are quite long, so I posted them on my site: Upgrading Private Messaging.
Posted: 3 years ago # -
Lots of posts in here since I last looked.
Yes, I have thought about taking out the feature where the sender can delete the PM before the recipient read it... it was something that I always thought would be cool in other forums, but it doesn't seem to be as publically accepted as I thought it would be. Future versions would most likely have it taken out (though I do need to figure out a good way to automatically upgrade the db without fear of losing data).
As for display names, I'll add that to my todo list for this plugin.
Posted: 3 years ago # -
Love the plugin, but I have a problem with it: I don't have multiviews enabled for my site because they seem to work very inconsistently. Instead, I have bbPress' rewrite rules in my .htaccess file. It's pretty clear to me from poking around in the code that this plugin requires multiviews to work. I'm sure it could work by adding a few entries to .htaccess, but I'm not really good enough with that to figure it out myself. Can anyone help?
Posted: 3 years ago # -
Is anyone else having the same problem I am, namely that the plugin doesn't render line breaks the same way a normal post does? All of the PMs on my site show up as one long line of text, with no line breaks or paragraphs unless they are hard-coded in with p and br tags.
Maybe it's just me?!?
Posted: 3 years ago # -
I'm using version 0.8.1 and this plugin doesn't look to be compatible with it. "privatemessages.php" calls for "bb-includes/template-functions.php" but that php file isn't included in the latest version. As such, "pm.php" will not load.
Does anyone know of any way to alter "privatemessages.php" to work around this?
Posted: 3 years ago # -
@ louisedade
I have tried your fix you posted on your site for the deleting of sent messages and I cannot get it to work. I get errors every time. Also, when you just copy and paste from what you have posted, it pastes the " incorrectly. When you paste it puts in the versions of the quote symbols that are slanted, which causes errors as well. Once I do get all those changed, I still get to parse errors at the top of my theme. If I deactivate and attempt to reactivate, it will not because of a fatal error. I am using the newest version of bbpress, 8.2.1
Thank you,
KahilPosted: 3 years ago # -
Hi, to help with the copy and paste, I've made a plain text file available (hopefully no weird special character business): PM code changes. There is also a slight change in the instructions (step #5) to account for the bbPress ver. 0.8.2.1 plugins admin page.
If you still get problems, could you please post the error messages so we can see what the problem is.
Posted: 3 years ago # -
There's some way to show private messages pending to read in wordpress? (When the user is logged in). I'll like to show it in the header of my website. I'm going crazy trying to make it, but I'm designer, not coder :-P Can someone give me some help?
Posted: 3 years ago # -
One thing I think should be improved is how is chosen the user who I'm sending the message. I have more than 4500 users in my site and it's impossible to make a combo-box of 4500 users :-D I think the user ID should be passed via URL.
Posted: 3 years ago # -
It it possible to create a dropdown of 4500+ users by using ajax-like behaviour to load the list on demand instead of when the page is first loaded.
I came up with a similar trick for the move-it plugin so it could load all the topics by name on a dropdown, rather than manually looking up the id:
http://plugins-dev.bbpress.org/browser/move-it/trunkPosted: 3 years ago # -
Instead of using the Avatar plugin made by Josh Hutchins I'm using the WMPU Author Profile Pics plugin.
To integrate that plugin with this private message plugin I edited the postmsg.php file. I inserted the following code to line 10.
<!-- ADD AVATAR TO PRIVATE MESSAGES --> <div> <?php $userid = $pmmessage->id_sender; $wp_avatar = '/home/.mija/neyoung/siliconsauce.com/wp-content/avatars/' .$userid. '.jpg'; $wp_avatarURL = '/wp-content/avatars/' .$userid. '.jpg'; if (file_exists($wp_avatar)) { echo '<img class="avatar" src="'. $wp_avatarURL.'" height="48" width="48"/>'; } ?> </div> <!-- END AVATAR CODE FOR PRIVATE MESSAGES -->Posted: 3 years ago # -
Hey All,
On our forum, when you try to PM there is a almost instant error message that comes up but is near impossible to see. It took me a few goes but I managed to do a screen grab of it as it flashed past. It said:
bbPress database error: [Field 'seen' doesn't have a default value]
INSERT INTO bb_privatemessages (id_sender, id_receiver, pmtitle, message, created_on) VALUES ('100017', '812', ' ', ' ', '2007-07-18 21:55:27')Everything else seems to work fine. Any ideas? I have tried to insert a value of 'a' but it tells me:
SQL query:
ALTER TABLE
bb_beta_privatemessagesCHANGEseenseenINT( 2 ) NOT NULL DEFAULT 'a'MySQL said: Documentation
#1067 - Invalid default value for 'seen'I have also tried a value of 0 and 1 but neither seem to do a thing and error still flashes by.
Any ideas out there?
Cheers.
Posted: 3 years ago # -
Hi guys.
Thanks for the plugin.
I made this bit of code for adding a Messages tab to users' profile page.
// Add a "Messages" tab to the Profile menu function add_pm_tab() { global $user_id; if (bb_get_current_user_info( 'id' ) == $user_id) { add_profile_tab(__('Messages'), 'edit_profile', '', 'pm.php'); } } add_action( 'bb_profile_menu', 'add_pm_tab' );To make it work, just add it to your bb-privatemessage.php. I have it at the end, just before the two "bb_add_filter()" calls.
Please note that it only shows the tab to the profile's owner, regardless of whether the viewer can moderate.
- henry.
Posted: 3 years ago # -
Also, I use the Avatar Upload plugin, so the code for showing the avatar images with private messages didn't work for me. Here's the code I replaced it with:
<?php avatarupload_display($pmmessage->id_sender); ?>Put it in your postmsg.php. The location and such depends on your theme and aesthetic desire.
I put mine in like this:
<div class="postauthor"><?php echo "<a href=\"".get_user_link($pmmessage->id_sender)."\">".$thisuser->user_login."</a>"; ?></div> <div class="avatar"><?php avatarupload_display($pmmessage->id_sender); ?></div> <div class="postauthortype"><?php echo "<a href=\"".get_user_profile_link($pmmessage->id_sender)."\">".get_user_type($pmmessage->id_sender)."</a>"; ?></div> <!-- <div class="postcount"><?php // echo "Post Count: ".get_post_count($pmmessage->id_sender); ?></div> -->Posted: 3 years ago #
Add a Comment »
You must log in to post.