Flynxify
Forum Replies Created
-
You do see for yourself where the problem is though, right?
Your group-pages are located at
https://www.networkit.com/tvhra/our-community/groups/job-seeker-support/While the group document-link targets
https://www.networkit.com/tvhra/groups/job-seeker-support/documents/The problem is the missing “our-community”-slug, that you’ll just have to add to the two places I pointed out earlier.
It’s rather easy to just fix it yourself quickly so you don’t have to wait for an “official” fix. We’re all hobbyists – chill ??I think you can’t manually define the slugs in the wp-config or bp-custom anymore in BuddyPress 1.5.x using
define('BP_GROUPS_SLUG', 'projects');
so the plugin-devs have to use the correct functions to retrieve the current slugs that have been set in the dashboard. Or maybe it’s a BP-bug. Who knows! Certainly not me ??
With these problems I just use the pragmatical solutions now before I delve into the depths of the (horribly documented) BuddyPress API.And, for a final fix, this will make the group-chat only be visible inside of groups by group-members while the general chat will always be visible:
<script type="text/javascript"> var envoOptions={ <?php if ( bp_is_group() && groups_is_user_member( bp_loggedin_user_id(), bp_get_current_group_id() ) ) : ?> chats : [{id : '<?php $group = groups_get_current_group(); echo $group->slug ?>', name : '<?php $group = groups_get_current_group(); echo $group->name ?>'}], <?php endif ?> groups : [{id : 'everyone', name : 'Everyone'}<?php if ( bp_is_group() && groups_is_user_member( bp_loggedin_user_id(), bp_get_current_group_id() ) ) : ?>, {id : '<?php $group = groups_get_current_group(); echo $group->slug ?>-users', name : '<?php $group = groups_get_current_group(); echo $group->name ?>-Users'}<?php endif ?>]}; </script>
In this case the group of the static-chat (configurable in the backend of envolve chat) has to be set to “everyone”. I hope that’s the last iteration, heh.
…and if you want the chats only to be visible for users of the groups you just use:
<?php if ( bp_is_group() && groups_is_user_member( bp_loggedin_user_id(), bp_get_current_group_id() ) ) : ?>
Thanks again boonebgorges
Hey,
I ran into the same problem, the solution is relatively easy ??
group-tags.js on line 25
Change
j('.gtags-add').click(function (){
to
j('.gtags-add').click(function (event){
and on line 32 change
j('#gtags-toggle-top').click(function() {
to
j('#gtags-toggle-top').click(function(event) {
Like Krokkodriljo I can only get this to work with custom slugs if I hardcode them into the code; I am using “projekte” instead of “groups”:
1. index.php on line 209
Instead of
$groups_link = $bp->root_domain . '/' . $bp->groups->slug . '/';
I have
$groups_link = $bp->root_domain . '/' . 'projekte' . '/';
2. templatetags.php on line 271
Instead of
$this->action_link = get_bloginfo('url') . '/' . $bp->current_component . '/' . $bp->current_item . '/' . $bp->current_action . '/';
I have
$this->action_link = get_bloginfo('url') . '/' . 'projekte' . '/' . $bp->current_item . '/' . $bp->current_action . '/';
I suppose this isn’t really all that sexy but after hours of poking around in the code I figured this would be as good as any solution.