]> git.mxchange.org Git - quix0rs-gnu-social.git/blob - plugins/Event/actions/events.php
OStatus and XMPP plugins now inform Nodeinfo plugins about their activity
[quix0rs-gnu-social.git] / plugins / Event / actions / events.php
1 <?php
2 /**
3  * List events
4  */
5
6 if (!defined('GNUSOCIAL')) { exit(1); }
7
8 class EventsAction extends ShowstreamAction
9 {
10     public function getStream()
11     {
12                                      /* whose events */   /* are these the user's own events? */
13         $stream = new EventsNoticeStream($this->target, $this->scoped);
14         return $stream;
15     }
16
17     function title()
18     {
19         // TRANS: Page title for sample plugin. %s is a user nickname.
20         return sprintf(_m('%s\'s happenings'), $this->target->getNickname());
21     }
22
23     function getFeeds()
24     {
25         return array(
26                     );
27     }
28
29     function showEmptyList() {
30         $message = sprintf(_('This is %1$s\'s event stream, but %1$s hasn\'t received any events yet.'), $this->target->getNickname()) . ' ';
31
32         $this->elementStart('div', 'guide');
33         $this->raw(common_markup_to_html($message));
34         $this->elementEnd('div');
35     }
36
37     /**
38      * Return true if read only.
39      *
40      * Some actions only read from the database; others read and write.
41      * The simple database load-balancer built into StatusNet will
42      * direct read-only actions to database mirrors (if they are configured),
43      * and read-write actions to the master database.
44      *
45      * This defaults to false to avoid data integrity issues, but you
46      * should make sure to overload it for performance gains.
47      *
48      * @param array $args other arguments, if RO/RW status depends on them.
49      *
50      * @return boolean is read only action?
51      */
52     function isReadOnly($args)
53     {
54         return true;
55     }
56 }