bbPress

Simple, Fast, Elegant

bbPress plugin browser »

Private Messaging (0.80)

Download

Version: 0.80

Other Versions

Last Updated: 2007-2-9

Requires bbPress Version: .80 or higher

Compatible up to: .80

Author Homepage »

Plugin Homepage »

Average Rating

5 stars
4 stars
3 stars
2 stars
1 star
(21)

Your Rating

Author: Joshua Hutchins


  1. Sally1

    Member

    Hum...

    There is no post limit and no autoformating :-/

    Posted: 6 months ago #
  2. I just recently encountered the bug posted by Xenuan. I try to put the fix but it doesn't seem to work.

    Look for this line.

    <?php echo " pm_id)."\">".$pm->pmtitle.""; ?>

    and replace with this <?php if ($pm->pmtitle != NULL)

    echo " pm_id)."\">".$pm->pmtitle."";

    else

    echo "pm_id)."\">"."(no-subject)"; ?>

    but it didn't work. Sorry I am no a good coder.

    Posted: 6 months ago #
  3. I have a modified version here (if you download it remember to change the extension to .tar.gz). Some features:

    - The message's content is filtered through the same filters as a regular post content.
    - The plugin is localized.
    - Added security fixes.
    - Added limits (the plugin now checks message lengths and inbox size).
    - Added improved error handling (i still have to use Wp_Error).
    - Improved usability :)

    Maybe it's useful for someone.

    Posted: 6 months ago #
  4. I'm having the same problem as bedbugger

    "Is anyone else having trouble after installing bbpress o.83?

    I had everything running fine under my last install and I carefully reinstalled everything.

    I can go to the /pm page, and I can even send a message.

    I can't read a message by clicking on it, and I can't click "PM this user" under a post (even though I did as the instructions said). Either of those yields an error (goes to my 404 page).

    Thanks! "

    Posted: 4 months ago #
  5. @Detective,

    your modified version is great thanks!

    I would like to send an email to the user email address too, like for regular posts. I think that should be possible, some hint where I have to look?

    Posted: 4 months ago #
  6. Anyone have a copy of Detective's mod?
    Seems to have disappeared already.

    Oh wait, it's just a filename change, try this link.

    Posted: 4 months ago #
  7. citizenkeith

    Member

    If I understand correctly, Detective's mod isn't compatitble with old messages... so all PMs used with the original plugin will not be available. Any ideas for fixing that? Or is that a feature? ;)

    Posted: 4 months ago #
  8. csseur3

    Member

    hum, if the version of Detective is the best, why doesn't make a new plugin and new topic? :)

    bye

    Posted: 4 months ago #
  9. I installed Detective's 'extended' edition of the plugin according to the instructions.

    And, as instructed, I navigated to 'forums url /pm.php' and got several errors saying [Table 'bbpress_privatemessages' doesn't exist].

    -> How do I get this table created?

    UPDATE: I ended up creating the table manually, and it works fine.

    Now, I just need to figure out how to hide the "Write the username of the receiver:" field, and put links in their profile and each post. And, put a link to their private messages somewhere on the forntpage too.

    Posted: 4 months ago #
  10. @csseur3:
    I don't release it as a official plugin because it's not complete, it's not well organized (there are template calls inside the plugin functions, for example) and the code isn't mine, it's just a mod/extension.

    @dankelly613:
    Please check the plugin template tags :)

    Posted: 4 months ago #
  11. I have installed Detective's modified plugin and I get these 2 errors on pm.php, otherwise looks cool.

    Am I correct that these errors are saying that I need to add columns del_receiver and del_sender??

    `bbPress database error: [Unknown column 'del_receiver' in 'where clause']
    SELECT * FROM bb_privatemessages WHERE id_receiver = '6' AND del_receiver= '0' ORDER BY created_on DESC

    bbPress database error: [Unknown column 'del_sender' in 'where clause']
    SELECT * FROM bb_privatemessages WHERE id_sender = '6' AND del_sender = '0' ORDER BY created_on DESC`

    Posted: 3 months ago #
  12. Hi all!
    I did small modification to the php code.
    It looks some strange, when you see "PM This User" at your post, right?))
    So I decided to make some changes in this plugin. Its very simply.
    You need to open your bb-privatemessage.php
    And replace this:

    function pm_user_link( $userid ) {
    $user_id=bb_get_current_user_info( 'id' );
    $post_author_id=get_post_author_id($post_id);
    if ( bb_current_user_can('write_post') && $post_author_id != $user_id ) {
    echo '<a href="';
    echo apply_filters('pm_user_link', bb_get_pm_link( '?user='.$userid ) );
    echo '">PM This User';
    }elseif ( bb_current_user_can('write_post') && $post_author_id = $user_id )
    echo "";
    else
    echo "Login to Send PM";
    }

    with this:

    function pm_user_link( $userid ) {
    $user_id=bb_get_current_user_info( 'id' );
    $post_author_id=get_post_author_id($post_id);
    if ( bb_current_user_can('write_post') && $post_author_id != $user_id ) {
    echo '<a href="';
    echo apply_filters('pm_user_link', bb_get_pm_link( '?user='.$userid ) );
    echo '">PM This User';
    }elseif ( bb_current_user_can('write_post') && $post_author_id = $user_id )
    echo "";
    else
    echo "Login to Send PM";
    }

    Thats all!;)

    What i changed? It checks in first way whether this user is registered and it is not the user, what whant to send PM. In secnd way it checks if this you) and nothing prints, maybe it would be simpler possibly to make return...

    P.S. sorry for my ugly English)))

    Posted: 3 months ago #
  13. Uuups. I posted wrong code, which we need to replace:

    function pm_user_link( $userid ) {
    if ( bb_current_user_can('write_post') ) {
    echo '<a href="';
    echo apply_filters('pm_user_link', bb_get_pm_link( '?user='.$userid ) );
    echo '">PM This User';
    } else
    echo "Login to Send PM";
    }

    Posted: 3 months ago #
  14. citizenkeith asked:

    "If I understand correctly, Detective's mod isn't compatitble with old messages... so all PMs used with the original plugin will not be available. Any ideas for fixing that? Or is that a feature? ;) "

    Can someone confirm that? Thanks!

    Before I install Detective's fix, I want to know if I need to warn my users that all their old messages will be unavailable.

    And for that matter, download some for myself.

    I'd LOVE to have a plugin for archiving PMs or backing up to email (just as the admin, I sometimes have to copy and archive them and there's no way to automate this).

    I'd really love the option to have PMs go to user's emails, but I think it needs to be opt-in. (The problem for me with the fix that sends an email when you have a new PM is that it isn't opt-in, and some users complained I was spamming them. Seriously.)

    Posted: 3 months ago #
  15. It's working! I'm gonna check the rest of this post for some of the other tweaks people have added. Thanks for the extension, Detective!

    Posted: 3 months ago #
  16. Anyone know how to modify the code so that an image is inserted when a message is received.

    I was thinking of an image popping up next to the text where it says you have a new message.

    Is this possible?

    Posted: 3 months ago #

  17. Posted: 1 month ago #
  18. Great work. I used Detective's updated version on the latest stable release. Only thing I can't figure out is where to post this code snippet:

    <?php pm_user_link(get_post_author_id()); ?>

    The readme says between lines 8 and 10 which is kind of vague and also references 'post.php.' I am assuming this is the same as bb-post.php?

    I would like a 'PM this user' link under where it says 'Member' or possibly right next to the permalink/time right below the post.

    Much thanks!

    Posted: 1 month ago #
  19. musnake

    Member

    @beernews: /my-templates/yourthemename/post.php

    Mine looks like this:
    <div class="poststuff"><?php printf( __('Posted %s ago'), bb_get_post_time() ); ?>&nbsp;&middot;&nbsp;<a href="<?php post_anchor_link(); ?>">Link #</a>&nbsp;&middot;&nbsp;<?php bb_post_admin(); ?>&nbsp;&middot;&nbsp;<? report_post_link(); //waxlotus?>&nbsp;&middot;&nbsp;<?php pm_user_link(get_post_author_id()); ?></div>

    I didn't know about detective's extended version until I came to post in here... I'll check it out.

    WARNING: Moving these files/reactivating the plugin may cause havoc with your old PM's. It may delete them/make it looks like the PM's are deleted so make backups and use at your own risk, as usual!

    I didn't like having stray png's floating around each theme, so I moved the images to the plugin's folder (oh, I created /my-plugins/bb-pm/ and put bb-privatemessage.php and the two images in there...)

    I used famfam's silkicons images: email.png for unread PM's and email_open_image.png for read PM's. These images look great.
    The thing is, for a normalized, uncluttered look, I guess only unread PM's should have an icon as you're going to have more read than unread PM's in your list so less is more...

    Following _ck_'s post this week about the correct way to reference icons I made the following changes to the original plugin...

    In privatemessages.php, search for the two <img tags.

    I changed the first td to:

    <td><?php if($pm->seen == 0) { 
    
    	$this->iconURI = bb_get_option('uri').trim(str_replace(array(trim(BBPATH,"/\\"),"\\"),array("","/"),dirname(__FILE__)),' /\\');
    
    	echo "<img title=\"Unread Message\" src=\"".$this->iconURI."email.png\" align=\"top\" />"; }
    	else { echo "<img title=\"Message has been read!\" src=\"".$this->iconURI."email_open_image.png\" align=\"top\" />"; } ?><?php echo " <a href=\"".bb_get_pm_link('?id='.$pm->pm_id)."\">".$pm->pmtitle."</a>"; ?></td>

    The second td became:

    <td><?php if($sentpm->seen == 0) { echo "<img title=\"Unread Message\" src=\"".$this->iconURI."email.png\" align=\"top\" />"; } else { echo "<img title=\"Message has been read!\" src=\"".$this->iconURI."email_open_image.png\" align=\"top\" />"; }?><?php echo " <a href=\"".bb_get_pm_link('?id='.$sentpm->pm_id)."\">".$sentpm->pmtitle."</a>"; ?></td>

    Posted: 1 week ago #
  20. musnake

    Member

    Ok, I took a quick peek at detective's stuff. I'm not going to mess with getting it to work out of one plugin folder. Maybe later, sigh.

    To make my life easier, I've changed a few minor things to display the un/read icons. Again, stick with just styling the unread PM's.

    /bb-pm/bb-privatemessage.php (or where ever you have it):

    I replaced the_private_message_class() with :

    function the_private_message_class() {
    	global $pmmessage;
    	if ($pmmessage) {
    		if ($pmmessage->seen == 1)
    			echo "class='pmread'";
    		else
    			echo "class='pmunread'";
    	}
    }

    which is just renaming the classes. Minor.

    Using the new names, I added this to my theme's css:

    /* PM Styling */
    td.pmread {
    	background-image: url(./images/email_open_image.png);
    	background-position:left;
    	background-repeat:no-repeat;}
    
    td.pmread a {margin: 0 0 0 16px;}
    
    td.pmunread {
    	background-image: url(./images/email.png);
    	background-position:left;
    	background-repeat:no-repeat;}
    
    td.pmunread a {margin: 0 0 0 16px;}

    Note that I put the icons in the theme's image folder!

    And finally, in the theme's privatemessages.php (from when you install this plugin), I decided (as you can see in the css above, to style the td not the whole tr. So I moved the class specification from the tr to the td: There are two the_private_message_class(); so change both:

    <tr>
    	<td <?php the_private_message_class(); ?>><?php the_private_message_link(); ?></td>

    This plugin seemed to cause my polldaddy plugin to complain that it was missing a second argument. I guess the PM appears as a post to the poll daddy plugin. I just edited the polldaddy function to add a 'post=''' in the declaration.

    Oh, WP2.6.3, bbPress1.0a2, PHP5, Apache 1.3x, +Detective's extended mod.

    Posted: 1 week ago #

RSS feed for this topic

Add a Comment »

You must log in to post.

Code is Poetry.