Skip to:
Content
Pages
Categories
Search
Top
Bottom

Idea: bp_activity_action as post formats example


  • Shmoo
    Participant

    @macpresss

    Wouldn’t it be more WordPress hierarchy -like if we did something like this to the activity items?

    Maybe instead of the solo entry.php template.

    
    bp_get_template_part( 'activity/types/content', bp_get_activity_type() );
    

    The bp_activity_action() function is probably the most disliked function/action in BuddyPress for myself. This really annoys me like crazy. When creating custom themes for BuddyPress you can easily delete the nav system function and replace them with your own code or create custom menu’s and buttons wherever you want them to show up but the activity stream is by far my least favourite part of the plugin all because of the above function and everything is so glued together, barely customisable.

    Activity items are essentially the same thing as WordPress post formats inside a blog index. I believe they should have their own post-format style of templating just like WordPress does with one pre-build example. An update about a new member or a member writing something on his own are basically the same things as an update + default post format -post to WordPress.

    We could create a single content.php file instead of the entry.php with all the HTML + solo php template functions inside them so they are easily to move around and alter if you like.
    Wen you want your date at the bottom of the activity item, just grab the HTML container + PHP from the top of the document and move it below the content. If you want to go any deeper, just duplicate content.php and rename it to the activity post type you would like to customise and give an unique ‘snippet’ in the stream.

    I’ve been testing this for a few minutes now and it just works. It’s kinda pretty to be honest. The only thing I have to do now is strip apart that bp_activity_action hook function and add all the solo or separate functions to the content.php template.

    Sources:
    Template 1
    Template 2

Viewing 1 replies (of 1 total)

  • r-a-y
    Moderator

    @r-a-y

    There is nothing stopping you from implementing this yourself.

    Your examples don’t really deviate too much from the default look though.

Viewing 1 replies (of 1 total)
  • You must be logged in to reply to this topic.
Skip to toolbar