WordPress.org

Ready to get started?Download WordPress

Forums

BuddyPress Docs
Not work well with BuddyPress Group Hierarchy plugin (6 posts)

  1. yzqiang
    Member
    Posted 10 months ago #

    BuddyPress Docs is a great and popular plugin for wiki contents. BuddyPress Group Hierarchy plugin is also a great and popular plugin for hierarchical group structure. Bud they can't work well together.
    If I entered a sub level group and activate the Docs feature, when I create a new doc, the URL will be ended with this:
    docs/create?group=18/33
    With such URL, the doc can be created successfully. But I recomment to change the URL to below:
    docs/create?group=33
    Because the hierarchy structure is not added to the URL necessarily. And there are also some minor interface differences between them.
    I think the change is easy, please think about it.

    http://wordpress.org/plugins/buddypress-docs/

  2. mehdi-w
    Member
    Posted 10 months ago #

    hi yzqiang
    you should change your permalink structure to :(domainname.com/)
    and your problem will solve.I hope

  3. yzqiang
    Member
    Posted 10 months ago #

    I don't think it's a permalink structure related issue.
    Thanks.

  4. Boone Gorges
    Moderator
    Plugin Author

    Posted 9 months ago #

    yzqiang - Actually, there should already be support built in for this feature. See https://github.com/boonebgorges/buddypress-docs/blob/b8780c726fbb7741835f5759aa7a988ca105c5ab/includes/templatetags.php#L707. Even though you see group=18/33 in the URL, Docs should know that you mean 33, and should pre-select the appropriate group from the dropdown. See also https://github.com/boonebgorges/buddypress-docs/issues/264

    Are you finding that it's not working for you?

  5. Boone Gorges
    Moderator
    Plugin Author

    Posted 9 months ago #

    yzqiang - Actually, there should already be support built in for this feature. See https://github.com/boonebgorges/buddypress-docs/blob/b8780c726fbb7741835f5759aa7a988ca105c5ab/includes/templatetags.php#L707. Even though you see group=18/33 in the URL, Docs should know that you mean 33, and should pre-select the appropriate group from the dropdown. See also https://github.com/boonebgorges/buddypress-docs/issues/264

    Are you finding that it's not working for you?

  6. yzqiang
    Member
    Posted 9 months ago #

    I know it doesn't affect the creation. But group logo can't be seen in the creation page of BP doc if the hierarchy structure is still in the URL.
    I have solved it with such code:
    function sjcd_docs_get_create_link($link){
    $groups=explode('/',bp_get_current_group_slug());

    if ( bp_is_group() ) {
    $link = add_query_arg( 'group', array_pop($groups) ,$link );
    }
    return $link;
    }
    add_filter( 'bp_docs_get_create_link', 'sjcd_docs_get_create_link' ,1000 );
    Do you think it's helpful?

Reply

You must log in to post.

About this Plugin

About this Topic

Tags

No tags yet.