ah sorry! I went to your site and it for the nick and I assumed.
if you are logged in, then it will fetch the display name, else it will ask for nickname
though, there is an option by which you can disable unregistered users from viewing the chat
that is already done in the plugin
Anyway to use the display name = name in chat automatically?
I have developed an ajaxed chat plugin, which uses phpfreechat.net script. That script has multiple themes, multiple languages, and multiple features.
There is also a settings page in which you can save various parameters/config for the script.
There can be 2 types of storages – mysql & file, default is mysql, it automatically uses the bbPress db you are using and makes tableprefixajaxed_chat table.
You can see the various commands that can be used in chat, and the FAQ at phpfreechat.net
There are 2 ways you can call the chat:
http://yoursite.com/?chat
or by placing this code anywhere in your template:
<?php if (function_exists('ajaxed_chat_load')) ajaxed_chat_load(); ?>
Live Demo (At my test forums): http://forum.gaut.am/ (inside template) or http://forum.gaut.am/?chat (full screen)
Download Link – http://gaut.am/uploads/ajaxed-chat-1.0-beta.zip
Note – It is beta version, not a release (for now)
I still need to work on the admin settings page, but still its not too bad for now.
Comments, feedback & suggestions are welcomed!
<?php
/*
* Plugin Name: Say My Name
* Plugin Description: Sends a notification email if someone mentions your name in a post (based on Notify Post by Thomas Klaiber).
* Author: <a href="http://www.ellequadro.net">Matteo Crippa</a>, updated for bbPress 1.0 by Kawauso
* Version: 0.2
*/
function say_my_name ( $post_id, $args ) {
global $bbdb, $topic;
if ( isset( $args[ 'post_id' ] ) && false !== $args[ 'post_id' ] ) // Don't run on edits
return;
$post = strtolower( $args[ 'post_text' ] );
$all_users = $bbdb->get_results( "SELECT * FROM $bbdb->users WHERE user_status=0" );
foreach( $all_users as $userdata ) {
if( !is_smn( $userdata->ID ) )
continue;
/* $notify = false;
*/ $display_name = strtolower( $userdata->display_name );
/* if( strpos( $display_name, ' ' ) === false ) { // Use word-by-word searching if the display name is one word
if( !isset( $words ) )
$words = explode( ' ', $post ); // Only create the word list if necessary
foreach ( $words as $word ) {
if( $display_name == $word || "@$display_name" == $word ) {
$notify = true;
break;
}
}
}
else*/ if( strpos( " $post", " $display_name" ) !== false || strpos( " $post", " @$display_name" ) !== false) // Always require a leading space
/* $notify = true;
if( $notify ) */{
$message = __( "Someone called you on: %1$s nn%2$s " );
@mail( $userdata->user_email, bb_get_option( 'name' ) . ':' . __( 'Notification' ), sprintf( $message, $topic->topic_title, get_topic_link( $topic_id ) ), 'From: ' . bb_get_option( 'admin_email' ) );
}
}
}
add_action( 'bb_insert_post', 'say_my_name', 1, 2 );
function smn_profile() {
if( !bb_is_user_logged_in() )
return;
global $user_id;
if( is_smn( $user_id ) )
$checked = ' checked="checked"';
else
$checked = '';
?>
</fieldset>
<fieldset>
<legend>Say My Name Notification</legend>
<p><?php _e('If you want to get an email when someone call your name in a new post.')?></p>
<table width="100%">
<tr>
<th width="21%" scope="row"><?php _e('Activate')?>:</th>
<td width="79%"><input name="smn" id="smn" type="checkbox" value="1"<?php echo $checked?> /></td>
</tr>
</table>
<?php
}
add_action( 'extra_profile_info', 'smn_profile' );
function smn_edit() {
global $user_id;
if( $_POST[ 'smn' ] )
bb_update_usermeta( $user_id, "smn", true );
else
bb_update_usermeta( $user_id, "smn", false );
}
add_action( 'profile_edited', 'smn_edit' );
function is_smn ( $user_id ) {
$user = bb_get_user( $user_id );
if ( $user->smn )
return true;
else
return false;
}
?>
Take out the /* */ around the commented out parts of the code if you want to re-enable the foreach() loop method for single word display names. I couldn’t find much of a difference in speed, but then again it might be quite different on a live server. You can also just delete all that code too if you want to make the file smaller
I’ll upload this to the Extend section someday, along with the other plugin I keep meaning to finish and upload.
Edit: Added support for @ 
This should be 100% case insensitive, but I’ve not tested with anything unicode. It’ll always look for a space before the name to avoid false positives, but if it’s at the very start of the post, it’ll still be detected.
Upgraded to the latest bbpress version (1.0) I think.
I can still upload images with the attachments plugin except for when I am creating a new topic. For some reason the option only shows up when I am replying to an existing post.
Has anyone else experienced this after upgrading?
I dont know what happened but my images have stopped showing up in posts…
http://harrismarine.co.nz/bbpress/topic.php?id=233
I didn’t touch anything. What the hell is going on. I am running latest version.
They are all showing up with the cross icon as in the can’t be found.
Disregard my last post, that link is ooooold as dirt 
Let’s cross our fingers that someone is on the job though!
I’m having this exact problem.
Fresh install of 1.0.2, integrated with WordPress (finally!), and even though I deactivated all plugins and tested it again, and it’s still doing it.
Any ideas?
just had two revisions come through on 0.9 and trunk by mdawaffe. Is he our new esteemed leader?
It sure looks like he is!
All my code is written against 1.0.2 SVN, so it’s not 0.9-only
and yeah, $allowed_tags is meant to be changed and then back again, not the cleanest way of doing things, but it should work. The copy that’s working live at the moment is below (I just realised I forgot to turn on the validation code too, oops):
<?php
/*
Plugin Name: Restrict Topic Tags
Description: Restricts tags to a pre-defined list.
Author: Kawauso
Version: 0.1.1
*/
$allowed_tags = array(
'test4',
'test 3',
'test3',
'test2',
);
function restrict_topic_tags_form( $args = null )
{
$defaults = array( 'topic' => 0, 'submit' => __('Add »'), 'list_id' => 'tags-list' );
$args = wp_parse_args( $args, $defaults );
extract( $args, EXTR_SKIP );
if ( !$topic = get_topic( get_topic_id( $topic ) ) ) {
return false;
}
if ( !bb_current_user_can( 'edit_tag_by_on', bb_get_current_user_info( 'id' ), $topic->topic_id ) ) {
return false;
}
global $page, $allowed_tags;
$current_tags = bb_get_topic_tags( $topic->topic_id );
$allowed_tags = array_flip( $allowed_tags ); // CHANGE PLACES!
foreach( $current_tags as $tag ) {
if( isset( $allowed_tags[ $tag->name ] ) )
unset( $allowed_tags[ $tag->name ] );
}
$allowed_tags = array_flip( $allowed_tags ); // CHANGE PLACES!
if( is_array( $allowed_tags ) && !empty( $allowed_tags ) ) { ?>
<form id="tag-form" method="post" action="<?php bb_uri('tag-add.php', null, BB_URI_CONTEXT_FORM_ACTION + BB_URI_CONTEXT_BB_ADMIN); ?>" class="add:<?php echo esc_attr( $list_id ); ?>:">
<p>
<select name="tag" id="tag">
<option value=""><?php _e("Select a tag")?></option>
<?php foreach( $allowed_tags as $tag ) { ?>
<option value="<?php echo $tag?>"><?php echo $tag?></option>
<?php } ?>
</select>
<input type="hidden" name="id" value="<?php echo $topic->topic_id; ?>" />
<input type="hidden" name="page" value="<?php echo $page; ?>" />
<?php bb_nonce_field( 'add-tag_' . $topic->topic_id ); ?>
<input type="submit" name="submit" id="tagformsub" value="<?php echo esc_attr( $submit ); ?>" />
</p>
</form>
<?php
} // End if
} // End function
function restrict_topic_tags( $tag ) {
global $allowed_tags;
if( !in_array( $tag, $allowed_tags ) )
return array();
return array($tag);
}
add_filter( 'bb_add_topic_tags', 'restrict_topic_tags' );
just had two revisions come through on 0.9 and trunk by mdawaffe. Is he our new esteemed leader?
I got it. Thanks buddy!
Offtopic : Any pointers on how to add plugins to the extend section. i have the latest code in trunk. I will probably figure out to tag them too but how to add information on the plugin page itself
Recently i launched my forum at http://explore.maheroo.com. I am facing problem using theme rather than default.I uploaded four theme in my-templates directory created by the bbpress installer (latest version). But when i switch to the any of the templates, none of them is working. I added a link upward to visit the site looking for the problem. could anybody help me out of this. at present i activated peacemaker and remaining three are inove, guangzhou and WPmimic.
thanks
I don’t know the default number of tags… should be straightforward to test.
You might want to try this hot tags plugin, which is much more powerful/flexible than the standard bbpress hot tag calls…
https://bbpress.org/plugins/topic/hot-tags-plus/
Whoops, I need to use more test data next time.
Change:
foreach ($current_tags as $tag_key => $tag ) {
if( in_array( $tag->name, $allowed_tags ) )
unset( $allowed_tags[ $tag_key ] );
}
to
$allowed_tags = array_flip( $allowed_tags ); // CHANGE PLACES!
foreach( $current_tags as $tag ) {
if( isset( $allowed_tags[ $tag->name ] ) )
unset( $allowed_tags[ $tag->name ] );
}
$allowed_tags = array_flip( $allowed_tags ); // CHANGE PLACES!
The closing ?> isn’t really important if there’s no non-PHP data after it
You, sir, are awesome.
As soon as I can test this out, I will. One question: for the plugin, should I add a ?> to the end of the chunk of code you’ve put there?
<?php
/*
Plugin Name: Restrict Topic Tags
Description: Restricts tags to a pre-defined list.
Author: Kawauso
Version: 0.1
*/
$allowed_tags = array(
'test',
'test2',
);
function restrict_topic_tags_form( $args = null )
{
$defaults = array( 'topic' => 0, 'submit' => __('Add »'), 'list_id' => 'tags-list' );
$args = wp_parse_args( $args, $defaults );
extract( $args, EXTR_SKIP );
if ( !$topic = get_topic( get_topic_id( $topic ) ) ) {
return false;
}
if ( !bb_current_user_can( 'edit_tag_by_on', bb_get_current_user_info( 'id' ), $topic->topic_id ) ) {
return false;
}
global $page, $allowed_tags;
$current_tags = bb_get_topic_tags( $topic->topic_id );
foreach ($current_tags as $tag_key => $tag ) {
if( in_array( $tag->name, $allowed_tags ) )
unset( $allowed_tags[ $tag_key ] );
}
if( is_array( $allowed_tags ) && !empty( $allowed_tags ) ) { ?>
<form id="tag-form" method="post" action="<?php bb_uri('tag-add.php', null, BB_URI_CONTEXT_FORM_ACTION + BB_URI_CONTEXT_BB_ADMIN); ?>" class="add:<?php echo esc_attr( $list_id ); ?>:">
<p>
<select name="tag" id="tag">
<option value=""><?php _e("Select a tag")?></option>
<?php foreach( $allowed_tags as $tag ) { ?>
<option value="<?php echo $tag?>"><?php echo $tag?></option>
<?php } ?>
</select>
<input type="hidden" name="id" value="<?php echo $topic->topic_id; ?>" />
<input type="hidden" name="page" value="<?php echo $page; ?>" />
<?php bb_nonce_field( 'add-tag_' . $topic->topic_id ); ?>
<input type="submit" name="submit" id="tagformsub" value="<?php echo esc_attr( $submit ); ?>" />
</p>
</form>
<?php
} // End if
} // End function
function restrict_topic_tags( $tag ) {
global $allowed_tags;
// if( !in_array( $tag, $allowed_tags ) )
// return array();
return array($tag);
}
add_filter( 'bb_add_topic_tags', 'restrict_topic_tags' );
Then in your theme’s topic-tags.php, change <?php tag_form(); ?> to:
<?php
if( function_exists( 'restrict_topic_tags_form' ) )
restrict_topic_tags_form();
else
tag_form();
?>
I don’t see one either. I’m sure you could write a plugin to do this, if you wanted?
Although it’s tricky – a lot of plugins touch the posting process (polls, bb-attachment, etc.)… and most of those wouldn’t work with an admin-centric posting system (or you’d have to test all your posting-based plugins twice).
Ok…after further testing and striking out, here is what a guy helping me and I have found out. We go through the ‘deep integration’ process, requiring the wp-load.php file in bb-config.php. Then we change all the bb_get_header(); with get_header();. That passes through the Hybrid News header’s style information but not the navigation.
When you link directly to the front-page.php, it shows the whole header, which is navigation, a banner ad I have in the header, everything. The same applies when you link directly to any of the affected pages in bbPress. However, it stops executing from there. So you just have the header and that’s it. There aren’t any errors showing up either.
So using my limited knowledge of PHP and my only slightly more developed since of deduction, one thing we can think which is different is we are bypassing:
path to bbpress / index.php
Here is that code:
<?php
require('./bb-load.php');
bb_repermalink();
$bb_db_override = false;
do_action( 'bb_index.php_pre_db' );
if ( isset($_GET['new']) && '1' == $_GET['new'] ) :
$forums = false;
elseif ( !$bb_db_override ) :
$forums = bb_get_forums(); // Comment to hide forums
if ( $topics = get_latest_topics( false, $page ) ) {
bb_cache_last_posts( $topics );
}
if ( $super_stickies = get_sticky_topics() ) {
bb_cache_last_posts( $super_stickies );
}
endif;
bb_load_template( 'front-page.php', array('bb_db_override', 'super_stickies') );
?>
This has to be easy (for those who really know PHP and WP). Right? Sadly, I’m not that kind of guy. It’s a bummer to have this kicka$$ WP theme and not have it be able to merge thematically with bbPress.
have the latest version of bbpress and installed bbpm
when i try to send a pm all i get is a 404 Not Found message.
any idea why?
Olaf – The big reasons for me to stay on the older version are:
* Many plugins work on 0.9 but aren’t compatible with 1.0.
* 0.9 is really stable and battle-tested, while 1.0 is just a few months old.
* 0.9 is very fast, but 1.0 has a lot more overhead (like BackPress) which slows it down considerably.
It’s really a decision that each webmaster has to make for themselves!
In my case, I’m sticking with 0.9… but I recognize that as time goes on and 1.0 matures, the upgrade will become more compelling for me! But YMMV…
I used the 0.9 branch until version 1.02 got released. While there are not so much reasons to upgrade from 0.9 to 1.02, people should always use latest versions. Why should I start with an older version?
makes no sense…
Why not call v0.9 “BBpress Lite v0.9″and call 1.0+ just BBpress (or BBpress Full v1.0.3)? or something in that nature
When you come first to this site you see the two versions. Most of us I think pick the higher version not thinking about the other. Some of us (the people who understands bbpress better as a stand alone) prefer 0.9 version still after the “higher” version came out.
The reason is not to confuse the new users that 0.9 is not a lesser version or that 1.0 is a more updated version. What I’ve read the two version are different enough to continue it’s own path. and it shows because you’re asking for users to test the new .9 version. “call for testers on the 0.9 branch and 1.0 trunk” If I wasn’t around for a couple of years I would think 1.0 is more stable than 0.9.