The way of the master: Install WordPress, convert it to a photoblog via YAPB and finally pimp it up with some plugins.
Already Available Plugins
XP Uploader
Historically the first available third-party extension to YAPB: Developed by Joost, it allows you to upload images directly over the Windows XP File Explorer.
Download the plugin from
the WordPress Plugin repository
YAPB Sidebar Widget
Previously included in the default YAPB installation, the YAPB sidebar widget was outsourced since version 1.9 and has become a plugin of it’s own. Of course, it evolved a little bit and now offers you the following functionality: Either show a list of your prevously posted images or just output some random images. Additionally you now may display a link to your mosiac page below the widget.
Download the plugin from
the WordPress Plugin repository
YAPB XMLRPC Server
Originally provided by Mac, the YAPB XMLRPC Server Plugin allows remote access to your photoblog. You define an API key and voila: Your images are accessible via XML RPC. If you don’t know how to do that: Just have a look at the YAPB XMLRPC Sidebar Widget
Download the plugin from
the WordPress Plugin repository
Developing your own YAPB Plugin
Ah, finally - The interesting part for us developers
Read this little introduction and have a look at the code of the yapb-sidebar-widget for example, and you should know how to develop YAPB plugins. It’s no rocket science.
Why YAPB Plugins?
First of all: Why splitting YAPB into a main part + plugins? Imho, separating blocks of functionality helps YAPB stay clean, “small” (whatever that means) and helps YAPB keeping focused on its primary target: Extend WordPress to become a cool photoblog platform.
Secondly, separate plugins may be developed and evolved separately without any coupling to the main YAPB release cycle. Developers may now create additional features without “asking me for permission” or whatever - just go and do it
It’s simple
Writing a YAPB-Plugin is basically the same thing as writing a WordPress Plugin - It’s just a matter of view: We develop additional functionality built onto the YAPB foundation:
YAPB basicly offers you the “yapb_register_plugin” action-hook, which gets called right after YAPB initialization. Additionally, your function gets called with the current YAPB Class Instance as parameter: It’s a simple as that:
function my_cool_plugin_initialization($yapb) {
// hook into WordPress,
// add some options to YAPB and
// finally do what you want
}
add_action('yapb_register_plugin', 'my_cool_plugin_initialization');
Have a look at the YAPB Sidebar Widget Plugin for more handy sample code.
The ultimate YAPB Hook Reference
YAPB offers some hooks out of the box. If you’re interested in developing your own YAPB Extension you should have a look at this list:
yapb_register_plugin
Source: Yapb.class.php
Since: 1.9
yapb_register_thumbnail gets fired from YAPB after all plugins were loaded. That means you can execute code right after YAPB was initialized - And you get the YAPB Instance as Parameter. This hook is an action which means that it primarily acts as an event trigger, instead of a content filter.
yapb_get_thumbnail
Source: YapbTemplateFunctions.php
yapb_get_thumbnail gets fired just before the image tag gets returned from the yapb_get_thumbnail() template function. This hook is a filter which means that information is passed through it, and then used by WordPress.
yapb_get_exif
Source: YapbTemplateFunctions.php
yapb_get_exif gets fired just before the EXIF tags array gets returned from the yapb_get_exif() template function. This hook is a filter which means that information is passed through it, and then used by WordPress.
yapb_alternative_image_formats
Source: YapbTemplateFunctions.php
yapb_alternative_image_formats gets fired just before the list of alternative image formats get returned by the according template function. This hook is a filter which means that information is passed through it, and then used by WordPress.
damn_i_need_a_new_hook
If you need a hook in YAPB to develop something new: Leave me a note in the forum so we can discuss it. But hey: I’m the last one blocking new features. As long as it’s not disturbing the way YAPB works, i’m with you.