BuddyDev

Search

Replies

  • Participant
    Level: Enlightened
    Posts: 68

    Thanks very much!

    However, I get some errors with this.

    Notice: Trying to get property ‘slug’ of non-object in /home/seeingtheforest.net/public_html/wp-content/plugins/buddyboss-platform/bp-groups/bp-groups-template.php on line 1315

    Warning: Cannot modify header information – headers already sent by (output started at /home/seeingtheforest.net/public_html/wp-content/plugins/buddyboss-platform/bp-groups/bp-groups-template.php:1315) in /home/seeingtheforest.net/public_html/wp-includes/pluggable.php on line 1355

    Warning: Cannot modify header information – headers already sent by (output started at /home/seeingtheforest.net/public_html/wp-content/plugins/buddyboss-platform/bp-groups/bp-groups-template.php:1315) in /home/seeingtheforest.net/public_html/wp-includes/pluggable.php on line 1358

    But I think it would be better to just add a filter to remove it from the dropdown altogether. This seems to work


    public function get_group_tabs() {

    // Find current group
    // $current_group = new BP_Groups_Group( $current_group_id );

    // We need slug to access the nav items
    // $current_group_slug = $current_group->slug;
    // Get all nav items.

    $new_tabs = array();

    $tabs = buddypress()->groups->nav->get_secondary( array( 'parent_slug' => bp_get_current_group_slug() ) );
    // bp_get_nav_menu_items('groups');

    foreach ( $tabs as $tab ) {
    $new_tabs[ $tab['slug'] ] = $tab['name'];
    }

    $new_tabs = apply_filters('bpdgt_remove_tabs', $new_tabs);

    // Let us reset the admin option from the tab.
    foreach ( $new_tabs as $key => $tab ) {
    if ( $key == 'admin' ) {
    unset( $tabs[ $key ] );
    break;
    }
    }

    // Reset the empty items.
    $new_tabs = array_filter( $new_tabs );

    return $new_tabs;
    }

  • Participant
    Level: Enlightened
    Posts: 68
    Nick on in reply to: [Resolved] Blog Categories For Groups throwing errors #43690

    I’m quite sure that you know how to implement something like that far better than me. Moreover, isn’t this something that you guys – as the developers of a paid product – could and should be doing? It seems like something that would take you 1 minute to implement…

    Or am I missing something about how the plugins and subscriptions work?

  • Participant
    Level: Enlightened
    Posts: 68
    Nick on in reply to: [Resolved] Blog Categories For Groups throwing errors #43688

    Thanks, sorry for the mistake. However, this reveals other bugs/oversights in the code.

    This was a fresh install – I hadn’t visited the settings yet. So, the default settings either shouldn’t be set to Taxonomies “Yes” or (far better) the plugin should have some logic to deal with the default (and otherwise likely) case that Taxonomies is set to “Yes” but no taxonomies are selected.

  • Participant
    Level: Enlightened
    Posts: 68
    Nick on in reply to: Create Group Tab Subnav for Subforums #41699

    Hi Yogi, sorry I was busy for a while and wasn’t able to look into this until now. Unfortunately, the screenshot links are no longer active. Anyway, I dont think any of the above is relevant to what I was trying to achieve…

    Again, what I have are a variety of groups, each of which have an associated Forum, each of which two subforums – Wiki and QA.

    What I want is to place a single shortcode in the BuddyDev Group Tab Subnav’s content textbox that will dynamically identify and display the Wiki or QA subforum that is relevant to the currently viewed group.

    The following appears to work:

    
    function group_wiki_subnav (){
        $groupID = bp_get_group_id();
        $groupForum = groups_get_groupmeta($groupID, 'forum_id', true);    
        $groupSubForum = bbp_forum_get_subforums($groupForum[0]);    
        echo do_shortcode("[bbp-single-forum id=".$groupSubForum[1]->ID."]"); 
    }
    add_shortcode ('group_wiki_subnav', 'group_wiki_subnav');
    
    function group_qa_subnav (){
        $groupID = bp_get_group_id();
        $groupForum = groups_get_groupmeta($groupID, 'forum_id', true);    
        $groupSubForum = bbp_forum_get_subforums($groupForum[0]);        
        echo do_shortcode("[bbp-single-forum id=".$groupSubForum[0]->ID."]"); 
        
    }
    add_shortcode ('group_qa_subnav', 'group_qa_subnav');
    

    I use the two different shortcodes in their respective Subnav Content textbox and it seems to work. I may use a more robust way of identifying whether the subforum array item 0 or 1 contains QA or Wiki. Any suggestions are welcomed.

  • Participant
    Level: Enlightened
    Posts: 68
    Nick on in reply to: Create Group Tab Subnav for Subforums #41517

    Thanks!

    But its not clear to me how I am supposed to use this. I added it to a snippet and can’t find any “column” anywhere – whether it is in BuddyBoss’ backend Forums admin section, BuddyDev’s Group Tabs Creator Pro, or in the front end.

    Also, I can’t find a hook named ‘manage_forum_posts_custom_column’ anywhere in my codebase.

    Finally, how would I use this with a dynamic forum ID?

  • Participant
    Level: Enlightened
    Posts: 68
    Nick on in reply to: Create Group Tab Subnav for Subforums #41495

    Thanks! Can you think of a way to dynamically set which forums are used? So, instead of hardcoding the id number 31, the ID would be set based on which group you are currently visiting?

    I can probably figure out how to determine the IDs, I just need to know how to insert them into the tab’s content. Would it be best to create a custom shortcode snippet that generates the shortcode text?

    e.g.
    [bbp-group-wiki]
    [bbp-group-qa]

    and those shortcodes then call a function that calls the following?

    [bbp-single-forum id=$group_wiki]
    [bbp-single-forum id=$group_QA]

  • Participant
    Level: Enlightened
    Posts: 68
    Nick on in reply to: [Resolved] Remove Predefined Group Tab? #40395

    Thanks! I’ll give that a try

  • Participant
    Level: Enlightened
    Posts: 68
    Nick on in reply to: [Resolved] Error updating Group Tabs Creator Pro #40139

    That was the problem. I recently rebuilt my site and forgot to reactivate my license. Sorry for the trouble.

  • Participant
    Level: Enlightened
    Posts: 68
    Nick on in reply to: [Resolved] BuddyBlog Pro Medium Editor #39800

    There doesn’t appear to be any errors. This is from your “medium-editor-field-type.js” file… Unless I’m missing something, the problem is here:

    
      {
                            name: 'anchor',
                            aria: BuddyBlog_Pro.Medium_Editor.buttons.labels.anchor,
                            contentDefault: '<i class="fa fa-link"></i>'
                        },
                        {
                            name: 'h2',
                            aria: BuddyBlog_Pro.Medium_Editor.buttons.labels.h2
                        },
                        {
                            name: 'h3',
                            aria: BuddyBlog_Pro.Medium_Editor.buttons.labels.h3
                        },
                        {
                            name: 'orderedlist',
                            aria: BuddyBlog_Pro.Medium_Editor.buttons.labels.orderedList,
                            contentDefault: '<i class="fa fa-list-ol"></i>'
    

    My pleasure with the feedback. Keep up the great work!

  • Participant
    Level: Enlightened
    Posts: 68

    Thanks, yes I’m just discovering that now and its opening up a lot of possibilities. But, I’d prefer to use simple tools like your plugins, when possible.

    I was just posting that info here for the benefit of others who might find it.