1: <?php
2: 3:
4: class Horde_Scribd_Block_Scribd extends Horde_Core_Block
5: {
6: 7:
8: public function __construct($app, $params = array())
9: {
10: parent::__construct($app, $params);
11:
12: $this->_name = Horde_Service_Scribd_Translation::t("Scribd Documents");
13: }
14:
15: 16:
17: public function _content()
18: {
19: if (!is_array($this->_docs)) {
20: return '';
21: }
22:
23: $html = '';
24: $count = 0;
25:
26: foreach ($this->_feed as $entry) {
27: if ($count++ > $this->_params['limit']) {
28: break;
29: }
30:
31: $html .= '<a href="' . $entry->link. '"';
32:
33: if (empty($this->_params['details'])) {
34: $html .= ' title="' . htmlspecialchars(strip_tags($entry->description())) . '"';
35: }
36:
37: $html .= '>' . htmlspecialchars($entry->title) . '</a>';
38:
39: if (!empty($this->_params['details'])) {
40: $html .= '<br />' . htmlspecialchars(strip_tags($entry->description())). "<br />\n";
41: }
42: $html .= '<br />';
43: }
44:
45: return $html;
46: }
47:
48: }
49: