MySite: writing new plugins
The MySite module is written with a plug-in format and an API that allows core features to be extended. For detailed information, see the README.txt in the file download.
This tutorial will cover creating a new "type" plugin for MySite 5.2.x.
For an updated MySite 5.x.2 API, see http://therickards.com/api.
MySite Plugins
MySite has five plugin types that can be used to control content display.
Type plugins
'Types' are content definitions. They control the content selection options available to the user and generate the data that is presented on a MySite page view.
They are named {type}.inc and stored in the /mysite/plugins/types/ folder.
Layout plugins
These plug-ins handle the page architecture of the MySite page. They are named {layout}.php and stored in the /mysite/plugins/layouts folder.
Layouts have two parts: a {layout}.php file that defines the layout theme and a {layout}.png image that is used in the layout selection form.
To create a new {layout}.png, use the provided default.png as a blank.
Format plugins
Handles the presentation theming for individual content elements on a MySite page. They are named {format}.theme and stored in the /mysite/plugins/formats/ folder.
Style Plugins
Handles stylesheets for user MySite pages. Users may select the style that they prefer. They are named {style}.css and stored in the /mysite/plugins/styles/ folder.
All stylesheets should include the core styles defined in default.css, rewritten as needed. Only the selected stylesheet is loaded on page views.
Additional Documentation
For an updated MySite 5.x.2 API, see http://therickards.com/api.
