Skip to:
Content

BuddyPress.org

Opened 15 years ago

Closed 14 years ago

#1921 closed enhancement (fixed)

add filter hook to bp-groups-templatetags.php

Reported by: dwenaus's profile dwenaus Owned by:
Milestone: 1.2.4 Priority: normal
Severity: Version:
Component: Groups Keywords: filter, hook has-patch
Cc:

Description

in the file:
bp-groups/bp-groups-templatetags.php

in the function bp_group_is_member()
(on line 1046 of RC2)

change the final line:

return true;

to:

return apply_filters( 'bp_group_is_member', true );

why? this post explains what I'm up to. http://buddypress.org/forums/topic/looking-for-simple-way-to-make-an-announcement-type-group

another helpful hook would be in bp-core.php around line 796 near the end of the bp_core_new_subnav_item() function. add a filter after the chunk that starts with

$bp->bp_options_nav[$parent_slug][$slug] = array(...);

that way people can customize core subnav items.

Attachments (1)

1921.001.diff (415 bytes) - added by cnorris23 15 years ago.

Download all attachments as: .zip

Change History (10)

#1 @dwenaus
15 years ago

if the second request is complex or could present problems, ignore it. The first request is pretty straight forward.

#2 @DJPaul
15 years ago

  • Milestone changed from 1.2 to 1.2.1

1.2 is in feature-freeze.

#3 in reply to: ↑ description @cnorris23
15 years ago

Replying to dwenaus:

another helpful hook would be in bp-core.php around line 796 near the end of the bp_core_new_subnav_item() function. add a filter after the chunk that starts with

$bp->bp_options_nav[$parent_slug][$slug] = array(...);

that way people can customize core subnav items.

I believe you can already customize all of these by passing arguments to bp_core_new_subnav_item()?

#4 @dwenaus
15 years ago

  • Priority changed from trivial to minor

#5 @cnorris23
15 years ago

  • Keywords has-patch added

@dwenaus
Can you test the patch to make sure everything works?

@cnorris23
15 years ago

#6 @dwenaus
15 years ago

Tested and works perfectly. thanks.
where can I learn to make diffs?

#7 @cnorris23
15 years ago

That's kind of a loaded question :). It requires you too learn to work with SVN. Once you do that, it's pretty simple. Any SVN client will do it. I use Cornerstone (Mac OS X), but I hear good things about Versions (Mac OS X), and TortoiseSVN (Windows). There's some other free clients for Mac OS X that would do too. If you're comfortable with command-line, you can interface with SVN that way too.

#8 @dwenaus
15 years ago

  • Component set to Groups
  • Milestone changed from 1.3 to 1.2.4
  • Priority changed from minor to normal

PLEASE add this with 1.2.4 :)

#9 @johnjamesjacoby
14 years ago

  • Resolution set to fixed
  • Status changed from new to closed

(In [2995]) Fixes #1921 (plus phpdoc'ed for good measure)

Note: See TracTickets for help on using tickets.