Skip to:

Re: BuddyPress 101: bp-test, Building Block For BP Component

David Bisset


UPDATE: This trumps the first version of bp-test mentioned above.

Basically I have created three versions of bp-test which allows one to learn and hopefully start building BP components. Here is a blog post with screencaps:

For those impatient, here are the links:

Version 0.1.0:

This version is very close to the proof of concept screenshots for Twitter and Friendfeed. Very basic – it just adds a menu and two submenus to that menu. It should automatically also add the menu to the “BuddyPress Bar” that appears at the top and (by default) is grey.

Version 0.1.1:

This version adds the “header tab” navigation you see in the screenshot on my blog. This requires a few additional PHP functions, and therefore increases the complexity a little bit. I also added a few BuddyPress PHP functions in the sample page that you should become familiar with but are very straightforward. This version rounds out how to create major navigational elements in BuddyPress.

Version 0.1.2:

This (final?) version changes the “Second Page” into an example of showing rowed results (similar to what you see on the wire page). This bumps up the complexity a bit since we use alot more PHP functions, mostly stored in the bp-test-templatetags.php file. We also use several classes seen in bp-test-classes.php and bp-test-templatetags.php. Also add a “standard” (of sorts) filter file (bp-test-filters.php). If you are planning on displaying anything in a table/row format like in the screenshot above, then you will want to examine this version. I have removed AJAX references to make it easier. Honestly this is all very close to the WIRE BuddyPress component so if you want to look at that as well, especially if you have the hang of this and just need to add in AJAX, that would be a wise move.

These three versions support potential BuddyPress components ranging from the very simple to more-or-less the level of some of the current BuddyPress beta components. These building blocks will hopefully be a learning tool first (if you don’t understand what they do, then you won’t get very far) and a time saver second.

Skip to toolbar