Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function streamPost($act, $params, $options = array())
- {
- $stream = Foundry::stream();
- $tmpl = $stream->getTemplate();
- $title = Sanitize::getString($act,'title');
- $content = Sanitize::getString($act,'content');
- $tmpl->setTitle($title);
- $tmpl->setContent($content);
- // $tmpl->setParams($params);
- $tmpl->setActor($act['actor'] , SOCIAL_TYPE_USER);
- $tmpl->setContext($act['context_id'], $act['context'], $params);
- $tmpl->setType($act['type']); // full | mini
- if(Sanitize::getInt($act,'target')) {
- $tmpl->setTarget($act['target']);
- }
- $tmpl->setVerb($act['verb']);
- // Process options
- if(Sanitize::getInt($options,'aggregate')) {
- $tmpl->setAggregate(true, true);
- }
- $tmpl->setPublicStream( 'story.view' );
- $stream->add($tmpl);
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement