Forum Replies Created
-
In reply to: @ Group
a simple example that will auto link a group slug mention in an activity update
this a proof == i’m lazy. so it only matches the group slug and NOT the true name (someone would have to build a function for that)
…and this uses a caret but anything can be used
function bp_activity_at_groupname_filter( $content ) {
//define your catch hook, i'm partial to the bang but lets eat a caret
$pattern = '/[\\^]+([A-Za-z0-9-_]+)/';
preg_match_all( $pattern, $content, $groupnames );
/* Make sure there's only one instance of each groupname */
if ( !$groupnames = array_unique( $groupnames[1] ) )
return $content;
foreach( (array)$groupnames as $groupname ) {
//note this is the group slug as for a proof - need to build a group "name" lookup function
if ( !$group_id = BP_Groups_Group::group_exists( $groupname ) )
continue;
//too much work to get a link
$thisgroup = new BP_Groups_Group( $group_id );
$content = str_replace( "^$groupname", "<a href='" . bp_get_group_permalink( $thisgroup ) . "' rel='nofollow'>^$groupname</a>", $content );
}
return $content;
}
add_filter( 'bp_activity_new_update_content', 'bp_activity_at_groupname_filter' );
add_filter( 'groups_activity_new_update_content', 'bp_activity_at_groupname_filter' );
add_filter( 'pre_comment_content', 'bp_activity_at_groupname_filter' );
add_filter( 'group_forum_topic_text_before_save', 'bp_activity_at_groupname_filter' );
add_filter( 'group_forum_post_text_before_save', 'bp_activity_at_groupname_filter' );
add_filter( 'bp_activity_comment_content', 'bp_activity_at_groupname_filter' );In reply to: [New Plugin] BuddyPress Group Forum ExtrasBtw, the sigs won’t work UNTIL you update the admin settings and choose a max length / max lines. May be best to set a default value for that?
believe i fixed that in the latest (0.1.3 – i just tested on a fresh install/new db) and it caught the _ck_ default values of 3 lines and 300 chars. if anyone else that installs – please verify this for me.
linking the ‘said’ to the post has proven not to be so trivial. since in the doing ajax i don’t have a reference to the topic template global and topic_permalink. Then on the bb_ side of things – that will return the internal bbpress install location. i may setup a hidden field like i do for nonce and pass it in via the ajax post
In reply to: [New Plugin] BuddyPress Group Forum Extrasjavascript file is coming up 404… grab a new copy off the repo
In reply to: [New Plugin] BuddyPress Group Forum Extrasok tagged 0.1.3 as another bug on saving the sig settings popped up
when you quote shouldn’t it put the text into the box? i’m not getting this to work. The quote button is there when you click it moves down to box but nothing is entered.
I’d need some more info (do you have firebug? anything on net and xhr?) – but clicking “Quote” won’t onfocus to the textarea, so it shouldn’t move down. Do you have any other plugins installed that manipulate the textarea?
In reply to: [New Plugin] BuddyPress Group Forum ExtrasOk, *believe* I found the issue. I just tagged up 0.1.2 – so grab it when the site updates and please let me know if everything is working.
In reply to: [Resolved] CubePoints and BuddyPress Intregration?inside the function you could add
if ( !is_site_admin() )
return false;you should package up all the small updates into a simple plugin – this sounds very cool to add.
In reply to: [New Plugin] BuddyPress Group Forum Extrasmessage me the contents of the sig you are trying to save – i’m on single but i’ll install wpmu and see if i can’t replicate the issue. (what are the max lines/max length set to?)
In reply to: [New Plugin] BuddyPress Group Forum Extrasalso an indirect feature of quotes is notification to the quoted member. (since the forum_activity_update will register the @mention )
In reply to: [New Plugin] BuddyPress Group Forum ExtrasI’ve installed the plugins but when I click ‘Forum Extra’ link in dashboard, the plugins admin page doesn’t show up.
A blank page with just a title (or a WSOD)? make sure you enable the subplugins (ie, BuddyPress Forums Extras – Quote)
If it works, then the Forums Extra admin page would look like this:
Group Forum Extras
Ajaxed Quote enabled.
where do users enter their signatures? I don’t see the field anywhere:
Under the member profile page, click the profile tab, then in the subnav menu – next to Change Avatar is ‘Change Signature’
mybuddypressurl/members/memberusername/profile/forum-signature/
In reply to: [New Plugin] BuddyPress Group Forum ExtrasA suggestion for AJAXed quote, perhaps add a link to the post that’s mentioned for the “said” text.
nice, i’ll add that in there
Also couldn’t BBcode be enabled across all components and not just the forums? I had a similar port of _ck_’s BBcode plugin doing this.
If you use internal only bbpress – then just install Viper’s Shortcode BBCode and it works in buddypress activity updates (some reason buddypress does not include the shortcode filter on forum content – but that subplugin will enable it)
if external, then just hook this filter on whatever _before_save stuff
bp_forum_extras_bbcode_it(but i can add a small option to do this).Love it was adding the tinymce to forums today
i have markitup working on an external bbpress but i noticed someone already wrote a markitup wordpress plugin – i was going to see what it takes to extend that into BP
In reply to: BuddyPress Restrict Group Creationyou can set all the values to manage_options
https://codex.wordpress.org/Roles_and_Capabilities#Capability_vs._Role_Table
In reply to: Use Forums without Groups?Someone please build it so that I can stop seeing this argument recur on these forums every few weeks. If I didn’t have seven thousand other things to do I’d do it myself but hey – I just took all the thinking out of it by drawing a map
i’m wrapping up a buddypress group forum extras plugin which brings in some bbpress plugins to the bp-group forums (sigs, bbcode or shortcode, quote)… this might be tempting; especially the support forum plugin. i’ll look into it.
In reply to: BuddyPress Restrict Group CreationSorry! …all fixed, give me a few minutes to check it in.
In reply to: get rid of create a group buttonthanks for verifying! at least this thread reminded me to include css removal of the ‘Create a Group’ button on the group directory page
figured it out (see post above) – some reason in wp-admin mode
$bb_roleswas getting wipedIn reply to: get rid of create a group buttonif you have some downtime, that would be great.
sorry for the triple post but found the root problem.
Fatal error: Cannot redeclare checked() (previously declared in D:xampplitehtdocsbuddypresswp-contentpluginsbuddypressbp-forumsbbpressbb-adminincludesfunctions.bb-admin.php:1261) in D:xampplitehtdocsbuddypresswp-adminincludestemplate.php on line 387
and the fix…
function adminfix_adminfix_bbpress_init() {
global $bbdb, $bb_roles, $wp_roles;
if ( is_object( $bbdb ) && is_object( $bb_roles ) ) {
return;
}
if ( is_object( $bbdb ) ) {
$bb_roles =& $wp_roles;
bb_init_roles( $bb_roles );
return;
}
do_action( 'bbpress_init');
}
function bp_forums_extras_setup_globals() {
adminfix_adminfix_bbpress_init();
do_action('bp_forums_extras_init');
}
if (WP_ADMIN) {
add_action( 'admin_init', 'bp_forums_extras_setup_globals', 500 );
} else {
add_action( 'bp_init', 'bp_forums_extras_setup_globals', 5 );
}ok, so i narrowed the issue down to just /wp-admin/ only
function bp_forums_extras_setup_globals() {
do_action( 'bbpress_init');
}
add_action( 'bp_init', 'bp_forums_extras_setup_globals');if i comment out do_action then /wp-admin/ loads up – otherwise WSOD. The action completes (calls
function bp_forums_load_bbpress()) but I guess something within WP conflicts?In reply to: get rid of create a group buttondid you have the ability to create new topics in whatever group forum prior to the plugin install? maybe a fluke due to the deactivate issue – since i’m not touching anything on the forum side.
I’ll take a look and see if there is anything else though.
yep!, same database.
that was my first thought but
bb_get_optionand other functions are not defined if i’m trying to update some bb_option metadata from the bp dashboard side.@DJPaul – probably my problem – i’ve tried so many hooks, so i’ll try and start over tonight.
In reply to: New Plugin: Friends-Only Activity Streamlogged in as siteadmin (all), public group activity, and nonfriend atme @mentions will be displayed.
In reply to: New Plugin: Friends-Only Activity Streamif sarah used my code without major changes – it works on single (what i use) but the admin will see all activity
In reply to: New Plugin: Friends-Only Activity Streamhaha, thanks
In reply to: get rid of create a group buttondid you use this plugin?
https://wordpress.org/extend/plugins/buddypress-restrict-group-creation/
if so and that caused an error – can you drop me a message with what happened so I can fix it? thanks!