Home » Documentation » What is PeoplePods? » SDK Documentation

SDK Documentation

If you are anxious to get hacking, we recommend the SDK Quick Start Guide.

At the core of PeoplePods is an object oriented programming library that provides much of the functionality required for building today's modern social applications. It provides a generic interface to create and manage content, members, and member activities.

If you are not familiar with the basics of object oriented programming, take some time to read up before proceeding. In short, object oriented programming, or OOP, allows you to bundle pieces of data and functionality together into logical units. PeoplePods provides a variety of different objects that represent different kinds of information.

For example, in PeoplePods, each member is represented by a person object. The object contains information about the member, such as the name and email address used to sign up, as well as functions available to that member, such as adding a friend or bookmarking a page. Here is a tiny snippet of code to illustrate this concept:

// get my person object from the main POD object
$member = $POD->currentUser();

// write out some information about this person
echo "My email address is:";

// add some content to this person's favorite list

All of the functionality within a PeoplePods application originates from a single PeoplePods object. We recommend developers name their parent object $POD, as this convention is used within many of the templates and sub-functions in the library.

$POD = new PeoplePod();
$content = $POD->getContent();
$person = $POD->getPerson();

Core Concepts

Generic Interfaces One of the main ideas behind PeoplePods is that it should be provide access to all sorts of content using the same set of functions. That is, you can use the same function with the same syntax to load blog posts as you would to load calendar events. Similarly, a generic system has been provided so that new types of relationships between memberships can be defined - friends, enemies, family, etc - that use the same syntax and provide the same access methods. What this means is, you only have to master a few simple functions to gain access to all of the power of PeoplePods.

This generic access is provided by the core objects such as $Stack, as well as the flagging module.

Ad Hoc Data Definition PeoplePods is different from many content management systems in that it does not require you to pre-define your content types or database schema. It uses a generic schema and the powers of it's underlying relational database system to allow you to create new fields on any content type at any time, and to define new content types on the fly. The admin tools will automatically adapt to the new content types you create.

This functionality is provided by the meta field module.

Building New Functionality

Unlike many website building systems available today, PeoplePods was not designed to create a specific type of website - a blog, for example. There are no limits to the type of pages present on the site, and there is no predefined structure inherent to a PeoplePods site. This allows developers to freely define new types of content and areas of functionality by building plugin pods, or by using PeoplePods functionality in other scripts.

Plugin Pods

PeoplePods has a simple plugin structure called "Pods" which allows developers to create reusable modules that define different functions of the site. It is helpful to think of each pod as defining a specific page type.

For example, one pod creates member profiles. Another creates content permalink pages. Yet another creates a personalized dashboard page.

Using the pod plugin system has a variety of advantages, and is the recommended method for creating new functionality within your PeoplePods site. Pods automatically map their functionality to friendly URLs, provide role-based security, and can be toggled on and off within the admin tools.

We highly recommend using one of the core pods as the basis for any new pods you create. Doing this will provide you with a template for all the necessary components.

Read the instructions for creating new pods, or the more specific instructions on create a pod that will create a new content type.

Stand Alone Scripts

If you don't want to play by our rules, you can use PeoplePods in normal PHP scripts. All one must do is include the PeoplePods library into the script:

$POD = new PeoplePod();

After creating the $POD object, all of the power of PeoplePods is available for use in that script. This makes it easy to add PeoplePods functionality to existing scripts - such as creating dynamic and personalized sidebars.

It is important to note that the difference between a stand alone script and a full pod is relatively minor - a pod simply provides extra information on how the script should be integrated into the site, whereas a stand alone script is just a script. This might mean the difference between having a pretty URL like "mysite.com/people/chester" and and ugly one like "/readme/sdk/mysitecom/scripts/profilescript_username_chester.html" Of course, talented developers can fix this problem using mod_rewrite.

Hack Yourself Crazy

We highly recommend that you explore the code of the SDK library. We have made every effort to make our code as readable and well organized as possible with the hopes that skilled developers will be able to modify and expand the provided functionality as necessary. In many cases, creating custom functionality may be as easy as cutting and pasting a few lines of code, then tweaking a parameter or two.

More about this function and it's related functions:

  • Discuss This Document

No comments have been posted yet.

Download Download the latest version of PeoplePods!

0.7 Latest Version:
Release Notes

A free membership is required to download PeoplePods.

  Already Registered? Login

Recent Posts from Our Blog

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...

Developer Preview Launch!

I am very excited to announce the launch of PeoplePods version 0.666, THE DEVELOPER PREVIEW! After tons of hacking, I have tweaked the last line of code, and I am finally ready for a wider audience...

Recent Posts from The Forum