WordPress.org

Forums

Events Manager
[resolved] BuddyPress Groups Support Within Functions (6 posts)

  1. kingkong954
    Member
    Posted 1 year ago #

    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/

  2. caimin_nwl
    NetWebLogic Support
    Posted 1 year ago #

    Hi,

    Can you explain what you mean by "blasted out"? I'm not following you exactly. Thanks.

  3. kingkong954
    Member
    Posted 1 year ago #

    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.

  4. angelo
    NetWebLogic Support
    Posted 1 year ago #

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

  5. kingkong954
    Member
    Posted 1 year ago #

    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!

  6. kingkong954
    Member
    Posted 1 year ago #

    ...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!

Topic Closed

This topic has been closed to new replies.

About this Plugin

  • Events Manager
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic

Tags

No tags yet.