bbPress

Simple, Fast, Elegant

bbPress support forums » Plugins

Private Messaging Extended

(19 posts)
  • Started 1 month ago by Detective
  • Latest reply from Null
  • This topic is not a support question
  1. Hi,

    For my own purposes i modified the plugin Private Messagging. The changes i made are:

    - 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 could be useful, so if anyone wants to check it out (or even use it) it can be downloaded here (remember to change the extension to .tar.gz).

    Posted 1 month ago #
  2. citizenkeith
    Member

    Thanks for this! Any recommendations for upgrading from the original Private Message plugin?

    Posted 1 month ago #
  3. Thanks for the upgrade! When I'd previously tried the PM plugin, it continually gave me errors. But this seems to have fixed them all! My forum members will be so happy.

    Posted 1 month ago #
  4. @citizenkeit:

    Honestly, i don't know. Maybe it's best to do a clean install.

    @Malfhok:

    I hope it works ok. I made some basic tests, but i don't know how it works in a real environment.

    Posted 1 month ago #
  5. @Detective:

    I've been testing it quite a bit today, and I have found one small bug...

    I'll try to explain this as clearly as possible. Basically, when Member A sends a PM to Member B, then Member B replies, the plugin tries to send the message to Member B, not Member A like it should.

    @citizenkeit:

    I just overwrote all of the old files. Works fine on my latest-version bbPress install.

    Posted 1 month ago #
  6. Thanks for the feedback. Here is the new version.

    I still have a lot of improvements left, but i think it is usable now. Please remember to update the files in your root/template folder.

    Posted 1 month ago #
  7. Great! It works properly now. Thanks for upgrading a very useful plugin. :-)

    Posted 1 month ago #
  8. citizenkeith
    Member

    I get this error at the top of the pm.php page:

    bbPress database error: [Unknown column 'del_receiver' in 'where clause']
    SELECT * FROM bb_privatemessages WHERE id_receiver = '1' 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 = '1' AND del_sender = '0' ORDER BY created_on DESC

    Also, all previous Private Messages are missing.

    Posted 1 month ago #
  9. Uhm, maybe you where using a older version of Private Messaging? Because i didn't mess with the database.

    Anyway, as i said, i think it's best to do a clean installation. If you are already using the previous plugin and don't want to lose the current messages, perhaps it's best to keep it.

    Posted 1 month ago #
  10. citizenkeith
    Member

    Thanks Detective. Obviously I'm not skilled in PHP.

    The original PM plugin is in desperate need of an update, IMHO, and I was hoping this would be it. However, I didn't consider that it would even change the database. I guess I'll stick with the old version for now, but would love for somebody (since I am not a programmer) to come up with some sort of PM import. :-)

    Also, I was using the latest version of Joshua's PM plugin (v0.80)

    Posted 1 month ago #
  11. Please add these two fields to your table bb_privatemessages:

    'del_receiver' tinyint(4) NOT NULL default '0'
    'del_sender' tinyint(4) NOT NULL default '0'

    I forgot to put those two on the install function. Now it should work :)

    Posted 1 month ago #
  12. I uploaded a new version, fixing the previous bug and a critical error in the sql query por inserting a new message (it was swapping message content and message title). It's here.

    Posted 1 month ago #
  13. tatel
    Member

    Hello Detective:
    Quiero usar este plugin en español. tengo la traducción que viene con el, pero no se donde definir el idioma ni donde debe ir este archivo. gracias

    Posted 3 weeks ago #
  14. Hola,

    Debes configurar el idioma de bbPress como "es_ES" y automáticamente el plugin debiese utilizar el lenguaje que incluyo. Si no es así no sabría decirte el por qué de la falla.

    Posted 2 weeks ago #
  15. HI,

    The installation file contains:
    $bbdb->prefix."privatemessages"

    What does this prefix. do? Or where does it stand for? Is prefix the bb_ in the database? I believe not since $bbdb doest this already, so what is it?

    Thanks

    Posted 5 days ago #
  16. $bbdb->prefix is a string containing your installation db prefix.

    Posted 5 days ago #
  17. So why not use:
    $bbdb->privatemessages or doesn't this work anymore?

    Posted 4 days ago #
  18. Because that tries to get the instance variable 'privatemessages' from $bbdb. As that variable doesn't exists, it returns null.

    Posted 4 days ago #
  19. Ok (just asking this cause i am working on a plugin myself), but how about the next step. I have this to create a table if it doens't excist:

    bb_register_activation_hook(__FILE__, 'bbmenu_install_check');
    
    function bbmenu_install_check() {
    	global $bbdb;
    
    	$bbdb->hide_errors();
    	$installed = $bbdb->get_results("show tables like ".$bbdb->prefix."bbmenu");
    
    	if ( !$installed ) :
    		$bbdb->query(" CREATE TABLE IF NOT EXISTS <code>&quot;.$bbdb->prefix.&quot;bbmenu</code> (
    			<code>item_id</code> INT(3) NOT NULL AUTO_INCREMENT,
    			<code>item</code> varchar(50) NOT NULL default '',
    			<code>set</code> varchar(50) NOT NULL default '',
    			<code>page</code> varchar(50) NOT NULL default '',
    			<code>location</code> varchar(50) NOT NULL default '',
    			<code>order</code> int(9) NOT NULL default '0',
    			PRIMARY KEY  (<code>item_id</code>)
    			)");
    	endif;
    	$bbdb->show_errors();
    }

    But I also want to put some data in it:

    "INSERT INTO$bbdb->menu` VALUES
    (DEFAULT, 'Forums', 'active', 'index.php', 'front-page', 0),
    (DEFAULT, 'Search', 'active', 'search.php', 'search-page', 1),
    (DEFAULT, 'Statistics', 'inactive', 'statistics.php', 'stats-page', 0);";`

    How to do this in the same query?

    Posted 4 days ago #

RSS feed for this topic

Reply

You must log in to post.

Code is Poetry.