Get 15% off on all our plugins, themes and memberships till 4th December. Use coupon: BLACKFRIDAY2021.

BuddyDev

Search

Replies

  • Participant
    Level: Enlightened
    Posts: 51
    Nick on #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: 51
    Nick on #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: 51
    Nick on #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: 51
    Nick on #40395

    Thanks! I’ll give that a try

  • Participant
    Level: Enlightened
    Posts: 51
    Nick on #40139

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

  • Participant
    Level: Enlightened
    Posts: 51
    Nick on #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: 51
    Nick on #39799

    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.

  • Participant
    Level: Enlightened
    Posts: 51
    Nick on #39796

    I’ve discovered that I can use this hook “bbp_template_before_topics_loop” within my snippet to add the search form (or anything else) before the Forum tab’s topics loop.

    So, now I am just overriding the label from Discussions to Forum, and don’t need to use the content section of the Group Tabs Subnav to add a shortcode.

    
    function group_forum_search(){
        code for search form
    }
    
    add_action( "bbp_template_before_topics_loop", "group_forum_search" );
    
  • Participant
    Level: Enlightened
    Posts: 51
    Nick on #39795

    Here is a screenshot of the H2/H3 issue with all plugins deactivated except for BuddyBlog, BBlog Medium, and BuddyBoss Platform. There is also a screenshot of the HTML which shows that H2 and H3 have a <b> element whereas the otehrs are <i class=”fa…”

    https://imgur.com/a/BbQHIfv

    I now see how to add photos and videos, thanks! One suggestion – add some whitespace between the cursor and the “+” button.

    I’ll have to experiment a bit, but perhaps the default WordPress upload is better – you can set sizes etc… I assume that I would have to stick to TinyMCE for this?

    My point about the extensions and button customization is that it might be useful for many people if you’re able to offer us the ability to customize these things from the WP Admin instead of via code. Just an idea.

    Thanks again for your help.

  • Participant
    Level: Enlightened
    Posts: 51
    Nick on #39789

    Thanks! I like it a lot so far.

    Some observations and suggestions:

    – H2 and H3 buttons are blank. I only know what they are because of the tooltip
    – The tooltip for Ordered List needs to be capitalized
    – I think the link button should be renamed from “anchor”, which I (and most people) don’t understand
    – I think it is necessary to have a button for adding images. The Add Media button that is present for the other editors does not show up with this one
    – I assume you are using this editor package https://github.com/yabwe/medium-editor. Is it possible for us to leverage the various extensions that it offers? Some of them look very useful
    – I see that there are over 20 buttons available, so the ability to customize the toolbar buttons ourselves would be nice
    – A way to see/learn and even set the keyboard shortcuts would be helpful. Perhaps this would just be in your documentation page, but if there was a plugin settings page it could be there as well.

    Thanks again!