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:"; $member->write('email'); // add some content to this person's favorite list $member->addFavorite($post);
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();
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.
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.
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.
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:
require_once("$podlib/PeoplePods.php"); $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 "mysite.com/scripts/profilescript.php?username=chester" 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:
Recent Posts from Our Blog
The latest version of PeoplePods is now available for download! This version features a drastically revamped theme which is now valid HTML5, a completely rewritten JSON-powered API, many...
An interview I did with OpenSource.com is now online! Read it here. In it, I discuss how running an online community is like throwing a giant, never-ending party, how open source techniques...
Recently Updated Documentation
Recent Posts from The Forum
1 comment | 10 days ago
0 comments | 16 days ago
Watches have a lot of class and style-and the fact that they are useful too certainly doesn't hurt. However, some fake iwc watches people end up in...
0 comments | 16 weeks ago
http://www.fullweddingdress.com Along with a present is an excellent method to show your understanding for your guests.Asking special occasion dress...
0 comments | 16 weeks ago