BuddyPress Style Modules

Introducing an  initiative to provide community written styles for BuddyPress sites.

Today we are excited to launch the trial of a new project within Buddypress that sets out to provide an approach for people to develop small style snippets to enhance aspects of a BuddyPress site.

It is hoped that  development of styles under this approach will engage authors to create interesting new looks for BP components and provide users with a rich library of code snippets to enhance their site with.

Initially this is a trial to see whether we get sufficient interest in the concept to continue and develop further, perhaps enhancing the loading process with enqueueing of files based on directory scanning and loading of files as an array but run from the core theme compat class, removing the need for users to copy the loading functions to their functions file.

Provision of modules and use of them is entirely the discretion of the authors and users, while BP will run some basic checks on the module BP does not guarantee that the modules will work in all given situations or installs, or accept any liability in their use. Support for a module remains the responsibility of the author to ensure the continued effectiveness of the module with updates to themes, WP or BP.

Snippets is a loose term best thought of as styling parts of a BP screen or component without necessarily having to be concerned in managing the development of a whole theme and related styles.

An example of a style module may be found in the provided members list module that re-factors the member lists as  panel boxes in a grid layout, another could be a new look for the user profile entries, or even simpler updating certain elements in the activity list for font sizes. Importantly style modules can be as simple or complicated as one wants them or needs them to be, there is no stipulation on what constitutes a module in terms of provided styling, you do not need to be a coding guru we would encourage anyone to have a go if they have a good idea for enhancing an area of BuddyPress.

As a guide to what could be styled we could look at areas such as:

  • Activity posting form. The ‘what’s new’ form is ripe for styling and enhancing using a mixture of styles and scripting.
  • Activity Comments – new takes on presenting nested comments using styles and/or scripting.
  • Simply style an instance of the logged in user  – maybe make your own objects in lists etc less obvious using opacity, or conversely bring to prominence.
  • Style the new user types.

Authoring Modules

Anyone wishing to provide a module needs to look at the example module (the example  module may be used as it is fully functional) and study the guidance notes in the repo.

Having created your module you will open a ticket on bp trac and upload the module folder zipped along with readme.md and a screenshot, plus a basic description on the ticket of your module. A member of the core contribution team will review the module just to check some basic standards are adhered to and that the module works in respect of a standard WP theme, unless there is a clear statement that the module supports a given theme (preferably supporting a WP theme repo theme)

When the basic checks are finished the module would be included in the styles module repo on BP github and  listed on the  ‘Style Modules List‘ wiki page.

You can read more on the BP github repo and if there are any questions please use the comments in this post.

Users

Installing modules requires creating a  directory to hold them and then downloading the zip from the list link:

Modules are always located in the folder /style-modules/ so to use the members-list-module  you would need to create a folder structure that looks like this:
wp-content/my-theme/buddypress/style-modules/

You will then unzip the module into this style-modules directory.

In the modules readme file will be an example set of functions to enqueue your new modules styles and/or JS files, this is copied to a suitable point in your functions.php file.


We’re looking forward to submissions and are on standby to answer any questions that you may have regarding authoring or using style modules as they become available. Please feel free to use the comments on this post for general questions regarding this initiative or more specific questions can be raised   on the github issues tracker for the ‘style-modules’.