$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.7
Latest Version:
Release Notes
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...
Recently Updated Documentation
Recent Posts from The Forum
When the stable version will be realesed?
0 comments | 42 days ago
Can I help anyone with anything specific?
5 comments | 88 days ago
What I'm working on:
6 comments | 88 days ago
Have you downloaded 0.7? Questions? Comments? Problems?
7 comments | 97 days ago
Why do I get this Error when I try to do the People Search on my PeoplePods installation?
2 comments | 97 days ago


No comments have been posted yet.