1: <?php
2: 3: 4: 5:
6: class Folks_Block_Know extends Horde_Core_Block
7: {
8: 9:
10: public function __construct($app, $params = array())
11: {
12: parent::__construct($app, $params);
13:
14: $this->_name = _("People you might know");
15: }
16:
17: 18:
19: protected function _content()
20: {
21: require_once dirname(__FILE__) . '/../base.php';
22:
23: $friends_driver = Folks_Friends::singleton();
24: $list = $friends_driver->getPossibleFriends(20);
25: if ($list instanceof PEAR_Error) {
26: return $list;
27: }
28:
29:
30: $actions = array(
31: array('url' => Horde::url('edit/friends/add.php'),
32: 'id' => 'user',
33: 'name' => _("Add friend")),
34: array('url' => Horde::url('user.php'),
35: 'id' => 'user',
36: 'name' => _("View profile")));
37: if ($GLOBALS['registry']->hasInterface('letter')) {
38: $actions[] = array('url' => $GLOBALS['registry']->callByPackage('letter', 'compose', ''),
39: 'id' => 'user_to',
40: 'name' => _("Send message"));
41: }
42:
43: Horde::addScriptFile('stripe.js', 'horde');
44:
45: ob_start();
46: require FOLKS_TEMPLATES . '/block/users.php';
47: return ob_get_clean();
48: }
49: }
50: