Need Help Cloning/Modifying the ”Groups” Widget
-
Anyone up for helping me a bit via pastebin? I want to make a clone of the default BP groups widget that just displays the latest active group avatars (with the group name and member count in the tooltip on hover). I plan on widgetizing a spot directly to the right of the user avatar on member-header.php and using my new widget there to display the avatars (about 25px square in a 3×5 grid) of the groups the current member belongs to.
Is there any way someone who knows about widget creation could look at this and proof it for me? Also, would this go into bp-custom.php or my theme functions.php?
I did remove (hopefully completely and without causing errors) the newest/active/popular filter. I just want the top X (whatever I set in the widget config on the widgets page) latest active groups to be displayed. I *think* I got that part right in the pastebinned code. Also, is there any way to return something like “USERNAME is a member of X groups” (X = n, of course)?
Thanks in advance for any help you can offer with this!
ETA: OK, nevermind, I think I’ve got the widget working without error! I just need to widgetize the area on member-header.php that I wanted to put these in
I’d still like to know if there’s a way to pull in the number to display a statement about how many groups the current member belongs to, and I also have a new question…would it be possible to exclude a few groups from displaying here? I’m going to try adding “&exclude=” with the ID numbers, but if I’m on the wrong track here, please let me know!
- The topic ‘Need Help Cloning/Modifying the ”Groups” Widget’ is closed to new replies.