Home » Documentation » $POD->registerPOD()


The registerPOD() function should be used only within the settings.php file of a plugin pod. It is used to tell PeoplePods what the pod does, what URLs it handles, and what variables and settings it needs.


The $pod_name parameter should be a short string which matches the folder name in which the pod lives. Thus, if you have a folder called '/readme/pod_registerpod/my_plugin/index.html', the $pod_name parameter should be 'my_plugin'.

The $pod_description parameter is a string which should contain a description of the pod and its functions. This description is used within the PeoplePods command center.

The $URL_array parameter is an associative array which should contain mappings between URLs and handler scripts. The keys of of the array are the URL patterns, and the values of the array are the actual handler scripts. The URL patterns should be constructed as RewriteRule-friendly regular expressions, while the value should point to a php file within the pod.

$URL_array = array(

The $VAR_array parameter should contain an associative array of key value pairs. These pairs will become static system options, accessible via the $POD->libOptions() function.

// in settings.php
$VAR_array = array(

// in any PeoplePods script:
$val = $POD->libOptions('foo');

The primary use of this of this parameter is to modify the automatically generated permalink and editlink values for a new content type. If your content type is called "post," you would define variables called "post_document_path" and "post_document_editpath":

// in settings.php
$VAR_array = array(

// in any peoplepods script:
// create new content
$doc = $POD->getContent();

$doc->type = 'post';
$doc->headline = 'Test Post';

echo $doc->permalink;
// $doc->permalink will be:
// http://mydomain.com/posts/test-post
// $doc->editlink will be:
// http://mydomain.com/edit/test-post

The $path_to_methods_file parameter should contain the path to the methods.php file included in the pod. If no methods file is included, this parameter is not necessary.

99.99% of the time, this should be set to:

$path_to_methods = dirname(__FILE__) . "/methods.html";

The final parameter is the name of the settings function. This parameter is also optional. The settings function is used by the PeoplePods command center to create a settings form to collect dynamic system options.

Settings functions are described in more detail here.

With all of these variables combined, you might have a call that looks something like this:

  'a custom pod that sets up the "post" content type',
  • Discuss This Document

No comments have been posted yet.

Download Download the latest version of PeoplePods!

0.8 Latest Version:
Release Notes

Join the PeoplePods developer network and get direct access to documentation, additional plugins, and our forums!

  Already Registered? Login

Recent Posts from Our Blog

Get free help with PeoplePods on Tuesday, Oct 12

Hey Hackers! Want to learn about PeoplePods? Need help getting started? Have questions about building plugins or modifying themes? Join us for our first PeoplePods Office Hours on Tuesday,...

PeoplePods 0.8 now available! Developer Office Hours Announced

PeoplePods version 0.8 was officially released on 10/10/10! This version is a substantial upgrade from 0.7, bringing new tools and a new interface to the content management and moderation "command...

0.71 Released - Inbox bug fixed

PeoplePods version 0.71 has been released. This version is a maintenance release which fixes a problem with the private messaging inbox. Existing PeoplePods sites can upgrade to the newest...

PeoplePods powers MediaBugs.org and the Helsinki Design Lab

April saw the launch of two brand new PeoplePods-powered applications. These new sites use the latest version of PeoplePods - 0.8 - which will be available to download at the end of...

Version 0.7 Now Available

Last night, I uploaded a new release of PeoplePods: version 0.7. The most exciting new features in this version are: new dynamic image resizing options, a faster comment polling system, new ways...