Skip to:
Content
Pages
Categories
Search
Top
Bottom

Forum Replies Created

Viewing 25 replies - 626 through 650 (of 709 total)
  • In reply to: @ Group

    @nuprn1

    Participant

    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' );

    @nuprn1

    Participant

    Btw, 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

    @nuprn1

    Participant

    javascript file is coming up 404… grab a new copy off the repo

    @nuprn1

    Participant

    ok 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?

    @nuprn1

    Participant

    Ok, *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.

    @nuprn1

    Participant

    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.

    @nuprn1

    Participant

    message 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?)

    @nuprn1

    Participant

    also an indirect feature of quotes is notification to the quoted member. (since the forum_activity_update will register the @mention )

    @nuprn1

    Participant

    I’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/

    @nuprn1

    Participant

    A 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

    @nuprn1

    Participant

    @nuprn1

    Participant

    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.

    @nuprn1

    Participant

    Sorry! …all fixed, give me a few minutes to check it in.

    @nuprn1

    Participant

    thanks for verifying! at least this thread reminded me to include css removal of the ‘Create a Group’ button on the group directory page :)

    @nuprn1

    Participant

    figured it out (see post above) – some reason in wp-admin mode $bb_roles was getting wiped

    @nuprn1

    Participant

    if you have some downtime, that would be great. :)

    @nuprn1

    Participant

    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 );
    }

    @nuprn1

    Participant

    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?

    @nuprn1

    Participant

    did 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.

    @nuprn1

    Participant

    yep!, same database.

    @nuprn1

    Participant

    that was my first thought but bb_get_option and 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.

    @nuprn1

    Participant

    logged in as siteadmin (all), public group activity, and nonfriend atme @mentions will be displayed.

    @nuprn1

    Participant

    if sarah used my code without major changes – it works on single (what i use) but the admin will see all activity

    @nuprn1

    Participant

    haha, thanks :-P

    @nuprn1

    Participant

    did 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!

Viewing 25 replies - 626 through 650 (of 709 total)
Skip to toolbar