Skip to:

Opened 10 years ago

Closed 10 years ago

#5261 closed enhancement (duplicate)

More control over the Activity headers

Reported by: macpresss's profile MacPresss Owned by:
Milestone: Priority: normal
Severity: normal Version: 1.2
Component: Activity Keywords: dev-feedback needs-patch
Cc: hugoashmore@…


I really think the Activity 'stinks' when it comes to customization of BuddyPress.

I'm a WP Theme Developer with very less PHP knowledge but it has never hurt me because I can move PHP template_tags(); around, look in the Codex and customize the website like that in almost everything I wanted.

BuddyPress is going the same direction - changing the Members and Groups pages is pretty easy there are lots of template_tags(); available to use and drag around to give those pages an unique lay-out.

When it comes to the Activity stream it becomes very very difficult to change the lay-out because you don't have enough easy to use template_tags();
Inside the header of the activity loop (entry.php) we have this one option that does print-/echo almost everything inside the activity-header.

bp_activity_action() does in my opinion too much for a single template_tag.

It prints-/echo 5 different elements on the page who are barely related to each other.

  • User_Name
  • Activity_Type
  • User_Avatar_Small
  • Activity_Type_Title
  • Activity_Date-/Time

This is messy code and should change to 4 or 5 single template_tags() because even if you're the best HTML-CSS guy you can't do nothing with 5 clean links after each other inside a P tag.

I know you can use Filters to target the bp_activity_action() but that should not be the first option to think of when creating or changing a lay-out. Filters don't overwrite exciting content ( i've read somewhere online ) so I think we need clean new tags that you can copy-/paste around inside the activity loop of course and change your lay-out the way you want on a easy way just like the other BuddyPress pages or like WordPress has.
I've never seen a single tag inside WordPress that printed 5 different things at once.

My suggestion:

Something like this..

  • bp_activity_user();
  • bp_activity_type(); <-- I believe this one is already in the core files
  • bp_activity_title();
  • bp_activity_time(); ( or date )

At the bp_activity_title() would could make some array() that you can say True or False to where you want to print that small avatar yes or no.

At the bp_acitvity_date , this one is very important I think. Even if you know how to use Filters it's very complicated to make your own custom PHP inside that filter.
An easy template_tag() for this would be really helpful, again with some array() that you can alter the format from time_ago or time_since --> real dates and times when posted.
I don't know if that's possible if not we could make two different tags one for time_since and the other for real post dates.

I hope this Trac. explains what I would like to see in advanced of more control over customization.
If all those items where printed solo instead of together we could easily grab one and paste them lets say at the botton of the activity-post instead of the top.
That would make BuddyPress more customizable and you'll get more lay-outs that don't look like a typical BuddyPress websites.

Change History (3)

#1 @r-a-y
10 years ago

  • Milestone changed from Awaiting Review to 2.0
  • Type changed from task to enhancement
  • Version set to 1.2

I think these are valid reasons.

Unfortunately, we have architectual problems with how the activity action is recorded. (See #3856.) Which is why something like bp_activity_title() isn't possible at the moment.

The other functions you recommended should all be doable. Moving to 2.0.

Last edited 10 years ago by r-a-y (previous) (diff)

#2 @hnla
10 years ago

  • Cc hugoashmore@… added

#3 @johnjamesjacoby
10 years ago

  • Milestone 2.0 deleted
  • Resolution set to duplicate
  • Status changed from new to closed

Closing this as a duplicate of #3856, which is still an active ticket.

Note: See TracTickets for help on using tickets.