On april 13 we had our first βTemplate Packβ chat. After 4 months of weekly meetings (onΒ thursdays at 19:00 UTC), we thought it was time to share with you what weβve accomplished so far.
3 years ago, the very first BuddyPress Template Pack β BP Legacy β was introduced in TotonnoΒ (1.7).Β It was a major improvement. Thanks to the BP Theme Compatibility, BuddyPress canΒ use the template parts included in this Pack and inject them into the wide majority of WordPress themes. Site owners or theme designers canΒ override these template parts to customizeΒ the appearance of community sites. And,Β forΒ sure, they are doing it!
BP Legacy will remain the most compatible Template Pack BuddyPress ever made!
But after 3 years, we are feeling like itβs time we try to improve the user experience and optimize markup, Javascript, CSS, Ajax, etc.. And very quickly we all agreed that this couldnβt be done in BP Legacy without taking the risk to have an impact on all the possible overrides site owners or theme designers did and are still doing. History showed that unfortunately some of them areΒ notΒ necessarly taking the time to synchronise their customizationsΒ with the adjustments we sometimes haveΒ to do to our template partsβ¦ π¦ .
Moving forward with BP βNouveauβ.
In french βNouveauβ means βnewβ. If youβre thinking iβm the one who had the idea to call a new Template Pack this way, youβre wrong πΒ @rayisme is the one! But i must admit i love this name!
In BP Nouveau, weβve decided to follow these guidelines:
- Modularity in CSS, Javascript and PHP.
- Think forward instead of being afraid of breaking backward compatibility.
- Build modern UIs by always taking advantage of the latest improvements WordPress or BuddyPress core are introducing.
- Ease of customizations for site owners and at the same timeΒ advanced techniques for theme or plugin developers.
About this last point,Β the first drastic decision weβve made was to remove all do_action
hooks from template parts!Β Some of youΒ might be surprised as these kinds of hook are ways to extend or customize.Β It appears that after 47 commits it actually gave birth to very interesting improvements:
- We first introduced new APIs such as the
BP_Buttons_Group
class. As you know BuddyPress uses a lot of buttons and in Legacy there are a lot of theseΒ hooks to let people add their own buttons. Thanks to this new API plugin/theme developers canΒ choose the exact position where to output their buttons! - TwoΒ new template hierarchies appeared (one for each single item objectΒ BuddyPress is using). For instance, itβs now possible to have a different activity stream layout for any member/member typeΒ or any group/group type.
- Template parts have been optimized.Β The huge
groups/single/admin.php
has been split so that we can now share some template parts between the Groupβs create screens and the Groupβs edit screen. The xProfile visibility is now a specific template part that is used by the xProfile edit screen and the signup screen. The WP Profile template we fallback on when xProfiles is not active stopped using old yim/aim/jabber fields in favor of a new loop using thewp_get_user_contact_methods()
function so that potentially any new contact methods can be added. Finally The registration template has been completely revamped. - New template tags have been created such as the one to generate standardized template notices and user feedbacks whichΒ can also contain βdismissβ buttons.
A BP Template Pack customizer panel.
Site owners will be able to customize their community and preview their changes thanks to the WordPress Customizer. Β For instance, they can choose to use our default front pages for groups or members and they canΒ choose between 4 layouts for the Members, Groups and Sites directory loops. Take a minute to discover this last feature in the following video.
They will also be able to reorder the Groups and Members primary navigations according to their preferences!
Improved UIs
First the notifications screens is now using Ajax and weβve added a search functionality and the possibility to filter notifications by component actions. Of course weβve kept the sort by date ordered DESC or ASC but itβs now located into the Date Received column header a bit like itβs the case in WordPress administration tables.
Then i invite you to watch this 3 minutes video to discover our new Group Invites and our new Private Messages UIs.
Finally weβve started to work on a new extendable Activity Post form π
Modularity
BP Nouveau is only loading what the BuddyPress setups itβs activated on needs. For instance if the Groups component is not active all the corresponding Javascript and PHP code wonβt be loaded. SCSS files are now organized into modules.
Getting involved.
You want to help? You are very welcome. To ease our work weβve packaged the template pack into a plugin weβve named βnext-template-packsβ. It adds a new tab into the BuddyPress settings so that itβs easy to switch between BP Legacy and BP Nouveau. In a way itβs a possible interesting start for this core ticket (#7157). Youβll need the latest WordPress version and the latest BuddyPress version (trunk). Hereβs the url of our github repository, we would be very pleased to receive some pull requests π
Letβs build together the most customizable Template Pack BuddyPress ever made!