WordPress.org

Support

Support » Plugins and Hacks » Events Manager » [Resolved] BuddyPress Groups Support Within Functions

[Resolved] BuddyPress Groups Support Within Functions

  • Great plugin, thank you so much!

    …however: it appears many core functions are not respecting the group var and it is getting blasted out.

    Specifically:

    em_events_admin
    em_get_calendar / EM_Calendar class

    In both cases I had to re-write the function to not blast out the ‘group’ ID I was passing it… then it started working.

    Any plans to correct this?

    Thanks again!

    http://wordpress.org/plugins/events-manager/

Viewing 5 replies - 1 through 5 (of 5 total)
  • Hi,

    Can you explain what you mean by “blasted out”? I’m not following you exactly. Thanks.

    The ‘group’ variable is getting reset/removed when the functions default the $args early on.

    For example, on line 17 of classes/em-calendar.php

    ..also line 240 in em-template-tags (I could have probably gone right for the EM_Event class, instead, but I was referencing em_admin in other places.)

    These changes allowed me to consolidate the re-written and duplicative functions you had listed in the template files for BuddyPress Groups.

    I’m sure there’s more that needs to be done, too, but based on how we’re using this plugin, this is it so far.

    angelo_nwl

    @angelo_nwl

    NetWebLogic Support

    here’s another thread which may help you with this – http://wordpress.org/support/topic/buddypress-group-events-1?replies=11

    Hi Angelo,

    I wasnt able to get the thread to work for me. The groups ID is still being ignored along the way. I’m gonna spend more time hacking at it, but despite using the filter, it doesnt work (calling the calendar gets al events… not just those filtered for the current group).

    Any other tips?

    Thanks!

    …ok. I changed the original function. Instead of checking if $args[‘group’] exists, im checking if we’re in a group… then leaving the rest a lone:

    if(bp_is_groups_component()) {
    		// pass value onwards
    		$args['group'] = $args2['group'];
    	}

    It seems to work now. So, something else was blasting out the $args[‘group’] even before it got there, I guess?

    Thanks for the filter!

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘[Resolved] BuddyPress Groups Support Within Functions’ is closed to new replies.
Skip to toolbar