Skip to:
Content
Pages
Categories
Search
Top
Bottom

Plugin – Private Messages


  • ardentfrost
    Member

    @ardentfrost

    This plugin enables private messaging for BBPress. For usage instructions, view the readme inside the zip file.

    Features:

    • Inbox and Sent Box
    • Ability to delete messages before other user reads it
    • Link on front page tells you how many new messages you have
    • Visible representation of when a message hasn’t been seen (in your inbox and sent box)
    • Reply functionality
    • Send user PM from a post in a forum

    To download the plugin, visit http://faq.rayd.org/bbpress_private_message/

    To see the plugin in action, visit http://www.rayd.org/forums/ (you must signup to see it)

    I have tested this on my own server, but if you have any problems with installation, let me know. I will be monitoring this thread, but you can also go to my forums and post questions there.

Viewing 25 replies - 1 through 25 (of 85 total)
  • This works for me! Excellent. I will report back with any errors or ommisions!

    Trent

    WOW! Awesome, thank you so much ardentfrost! I’ll download it soon, and add it to my forums then. ;) :)

    spencerp


    ardentfrost
    Member

    @ardentfrost

    Glad it’s working so far!

    So far……

    I noticed that there are some places where bb_users are called and for some of us that use wp_users, we will get some errors. I found this in message.php so far.

    When I sent my first message, I got this error:

    bbPress database error: [You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '23:45:07' at line 1]

    SELECT * FROM bb_privatemessages WHERE id_sender = 14 AND created_on = 2006-12-08 23:45:07

    Warning: Cannot modify header information - headers already sent by (output started at /var/www/html/forum/bb-includes/db.php:147) in /var/www/html/forum/bb-includes/pluggable.php on line 160

    I found an error in /my-templates/postmsg.php on line 8:

    Parse error: parse error, unexpected T_OBJECT_OPERATOR, expecting ',' or ';' in /var/www/html/forum/my-templates/postmsg.php on line 8

    Still working on those right now……

    Trent

    This seems to be the line that it has problems with:

    bb_get_user($pmmessage->id_sender)->user_login

    Anyone know how I could change syntax not to get an error?

    Trent


    ardentfrost
    Member

    @ardentfrost

    try to split the lines. do this:

    $user = bb_get_user( $pmmessage->id_sender);

    $userlogin = $user->user_login;

    Don’t know if that’ll work or not, but it’s worth a try. Let me know, I’ll make the change to the release if it does.

    But I’m out of town til Sunday. So when I get back, I’ll see about it.

    I haven’t tested this yet, but I just downloaded it now, and will be willing to try that “solution” there ardentfrost.. ;) :) I’ll report back with any “problems”, or what not.. ;)

    spencerp

    UPDATE: I’m getting the same errors as Trent had mentioned above sigh. The “solution” you posted above, didn’t seem to correct anything, but.. I could have done it wrong though.. =/

    If you want too, maybe join my board, and check em out..

    http://spencerp.net/forums/

    Also, when in a thread, and clicking the “PM This User” link, it spits out this database error message “

    bbPress database error: [Table ‘mydatabase_name.bb_users’ doesn’t exist]

    SELECT * FROM bb_users WHERE ID = 1

    Any thoughts on this.. by the way, my board is basically setup like Trent’s board..

    spencerp

    I am working on getting those errors fixed for my board. I emailed you about what I have tried. It will take some time, but we will fight through the errors! Keep posted for future progress!

    Trent

    Hahaha, no wonder you weren’t saying anything on Gtalk lmao. And yah, I didn’t get an email yet, so it must be that 40 minute deal again hahaha. Alright man, I look for your email then.. ;)

    spencerp

    Ok…I fixed the other errors (still waiting for Ardenfrost to see if they will work or if there is a better way), but I can’t get rid of the following error when I post or reply:

    bbPress database error: [You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '19:54:11' at line 1]

    SELECT * FROM bb_privatemessages WHERE id_sender = 14 AND created_on = 2006-12-09 19:54:11

    Warning: Cannot modify header information - headers already sent by (output started at /var/www/html/forum/bb-includes/db.php:147) in /var/www/html/forum/bb-includes/pluggable.php on line 160

    The error is generated from the following code in the plugin itself:

    function pm_new_message( $id_receiver, $id_sender, $pmtitle, $message ){

    global $bbdb, $bb_table_prefix;

    $created_on = bb_current_time('mysql');

    $bbdb->query("INSERT INTO ".$bb_table_prefix."privatemessages

    (id_sender, id_receiver, pmtitle, message, created_on)

    VALUES

    ('$id_sender', '$id_receiver', '$pmtitle', '$message','$created_on')");

    $rmess = $bbdb->get_row("SELECT * FROM ".$bb_table_prefix."privatemessages WHERE id_sender = $id_sender AND created_on = $created_on");

    return $rmess->pm_id;

    }

    I would ask anyone that might have an idea for me here to let me know. It doesn’t have a problem with the bb_current_time for posting normally, so I can’t understand why it doesn’t like the timestamp on this one. I have mySQL 4.1.21.

    Anyone?

    I still haven’t figured out how to fix this error and get the correct timestamp, so help is still needed and appreciated!

    That being said, I have a version that works for me without any errors, but I had to place an incorrect timestamp in for each entry to do it. That is why I changed the template to get rid of the date in the PM interface.

    It is working for me, but I can hardly wait to work with Ardentfrost to have a version that works ‘out of the box’.

    Trent

    Alright, I had first tried those TWO files you had sent me in the email, and those didn’t work. But, checked this thread and downloaded the PM_Trent_version, and everything seems to be working just fine! :);)

    However, when clicking on the “PM This User” link, under someone else’s name, other then me.. I get taken to the send this user a PM page, without errors.. but!

    I’m getting the header image showing at bottom of page with this message under it “You can’t look at this message! It doesn’t belong to you!” (I know you’re not supposed to send one to yourself, but.. just wondering why that header would still be down there though, if it’s being sent to someone else..? =/ )

    And this happens, (for example) when clicking on “PM This User” link under Trent’s name in a thread he replied in:

    http://spencerp.net/forums/topic/2?replies=4#post-23

    Go to there, those that have joined my forums can try it once.. and see what I’m talking about. Maybe there’s an extra header call, that we could maybe skip having or something..?

    Other then that, Trent’s PM version seems to be working just fine! Thanks Trent! :) ;)

    spencerp


    ardentfrost
    Member

    @ardentfrost

    Sorry I’ve been out of town guys. I’ll start working on fixes. I know how to fix the time, I forgot to use my get time function from my function file. I also know how to fix a couple other problems you guys have had. Give me a little while.

    Excellent! Waiting by the computer for this one!

    Trent


    ardentfrost
    Member

    @ardentfrost

    have a fix for the time and the double header/footer for “PM This User.”

    Trent, if you have gtalk, I need you to talk to me on there. I tried a couple of your fixes and they didn’t quite work for me. There might be some major differences for .73 and future releases.

    The new working version for integrated with WP and non-integrated sites will be updated in a couple of minutes! It should work for everyone now, but Ardentfrost could use a few more testers! If you are interested, just download it at:

    http://faq.rayd.org/bbpress_private_message/

    Thanks,

    Trent


    ardentfrost
    Member

    @ardentfrost

    Yeah, thanks for helping me work through those few problems Trent (esp with your legacy version of php ;) ).

    WP Integration support is a big update for .73a, as well as the double header/footer fix.

    So, download away BBPress users! :)

    YES! Thank you so much fixing this. ;) :) Everything seems to be fixed, however, I’m still getting this database error message above the forum header..

    When in a thread, and clicking the “PM This User” link, it spits out this database error message:

    bbPress database error: [Table ‘mydatabase_name.bb_users’ doesn’t exist] SELECT * FROM bb_users WHERE ID = 2

    I’ve tried both versions of the plugin, redownloaded the original one, and then tried the .73a one.. same error message.. :(

    spencerp


    ardentfrost
    Member

    @ardentfrost

    are you integrated spencer? I added a fix where it would detect whether you are or not and change the table from bb users to wp users. Yours says bb_users, so you might need to redownload .73a (try refreshing the download page before you download it).

    are you integrated spencer?

    Yuppers! :) (Sorry, forgot to add that in here..)

    Oh, ok. I will do that, and try again! ;):) I’ll report back here real soon..

    spencerp


    ardentfrost
    Member

    @ardentfrost

    Also remember that you can go to postmsg.php and uncomment the lines for post count and/or avatar if you have those plugins I made installed :)

    Hmm, first time I downloaded it, I was in Firefox, I just went there in IE6 this time, downloaded .73a, deleted the original PM files, uploaded fresh ones.. Still the same thing.. =/

    To see what I mean, maybe try registering on my board quick, and then try PM-ing Trent here?

    http://spencerp.net/forums/message?user=4

    spencerp

    /Again, all those other problems which were mentioned above, are gone, it’s just that database error showing yet..

    Yeppers, I uncommented out for the Post Count thingy.. ;):)

    I also did a hard clear of cache too. CTRL + F5


    ardentfrost
    Member

    @ardentfrost

    I sent you a pm on your board, check it

    ardentfrost, you’re awesome! Thanks so much for getting that fixed for me! ;):)

    spencerp

Viewing 25 replies - 1 through 25 (of 85 total)
  • The topic ‘Plugin – Private Messages’ is closed to new replies.
Skip to toolbar