Skip to:

Re: Trying to alter layout of bp_activity_action()



Huh, $activities_template is a cool variable. It gets you part of the way there (or all the way there, if you are willing to get complicated).

For example, to get “Admin said:” , you can use $activities_template->activities[0]->display_name (for the first activity item; to get the whole list you would have to do a “foreach” loop).

You can get Content of Forum Post the same way. View Full is already in /entry.php, and Delete is an admin option that comes up as part of <?php bp_activity_action() ?>

It is more problematic when it comes to TOPIC NAME and GROUP NAME, since you would have to reverse engineer the pre-baked $activities_template->activities[0]->action string. I would probably do something like:

1. check $activities_template to see if the current item is a forum post

2. if so, run php string functions to strip out the hyperlinked TOPIC NAME

3. and also run php string functions again on the same string to strip out the hyperlinked GROUP name

Would that solve it?

Skip to toolbar