$Obj->addFlag()
$Obj->addFlag($flag,$person,$value=true);
Causes $person to add a flag named $flag to $Obj, with an optional value of $value. If no value is specified, it defaults to true.
To be clear, $person is the person object who is adding the flag. This is important to remember when adding flags to other person objects. The VAST majority of the time, the second parameter should be $POD->currentUser()
Some examples:
// flag a document as 'awesome'
$content->addFlag('awesome',$POD->currentUser());
// set a rating of 5 on a document
$content->addFlag('rating',$POD->currentUser(),5);
// set a 'block' flag on a person
$person->addFlag('block',$POD->currentUser());
Once a flag has been added, it can be referenced in your stack parameters:
// load all content with the awesome flag $awesome = $POD->getContents(array( 'flag.name'=>'awesome' )); // load all content with a rating of 5 $top_rated = $POD->getContents(array( 'flag.name'=>'rating', 'flag.value'=>'5' )); // load all people with the block flag $blocked = $POD->getPeople(array( 'flag.name'=>'block' ));
At this point, you can only refer to one flag at a time in your stack parameters. In some future version of PeoplePods, this may change.
Several flag names are reserved by PeoplePods for use in pre-defined stacks: friend, favorite, watching, and vote. You can use any other flag name to define your own functionality.
Download the latest version of PeoplePods!
0.71
Latest Version:
Release Notes
Recent Posts from Our Blog
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...
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...
Recently Updated Documentation
Recent Posts from The Forum
Tell me how you want to use PeoplePods, and I'll help you build it!
10 comments | 7 days ago
Does any one have Idea on implementing SSO applications like gigya SSO or RPXNOW SSO for single sign on access ?
4 comments | 8 days ago
BTW The pages in my admin panel are appearing like http://mydomain.com//admin/options/emails.php, http://mydomain.com//admin/options/themes.php Is this the reason for the trouble?
6 comments | 8 days ago
Does any one have any idea on changing the limit of charatcers ? For ex: 333 characters?
1 comment | 8 days ago


No comments have been posted yet.