| 
									
										
										
										
											2011-03-07 00:43:31 +05:30
										 |  |  | <?php | 
					
						
							|  |  |  | /** | 
					
						
							|  |  |  |  * StatusNet - the distributed open-source microblogging tool | 
					
						
							|  |  |  |  * Copyright (C) 2008, 2009, StatusNet, Inc. | 
					
						
							|  |  |  |  * | 
					
						
							|  |  |  |  * This program is free software: you can redistribute it and/or modify | 
					
						
							|  |  |  |  * it under the terms of the GNU Affero General Public License as published by | 
					
						
							|  |  |  |  * the Free Software Foundation, either version 3 of the License, or | 
					
						
							|  |  |  |  * (at your option) any later version. | 
					
						
							|  |  |  |  * | 
					
						
							|  |  |  |  * This program is distributed in the hope that it will be useful, | 
					
						
							|  |  |  |  * but WITHOUT ANY WARRANTY; without even the implied warranty of | 
					
						
							|  |  |  |  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the | 
					
						
							|  |  |  |  * GNU Affero General Public License for more details. | 
					
						
							|  |  |  |  * | 
					
						
							|  |  |  |  * You should have received a copy of the GNU Affero General Public License | 
					
						
							|  |  |  |  * along with this program.  If not, see <http://www.gnu.org/licenses/>. | 
					
						
							|  |  |  |  * | 
					
						
							|  |  |  |  * @category Actions | 
					
						
							|  |  |  |  * @package  Actions | 
					
						
							|  |  |  |  * @license  GNU Affero General Public License http://www.gnu.org/licenses/ | 
					
						
							|  |  |  |  * @link     http://status.net | 
					
						
							|  |  |  |  */ | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2015-09-27 22:51:11 +02:00
										 |  |  | if (!defined('GNUSOCIAL')) { exit(1); } | 
					
						
							| 
									
										
										
										
											2011-03-07 00:43:31 +05:30
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2015-09-27 23:46:30 +02:00
										 |  |  | class ShowprofiletagAction extends ShowstreamAction | 
					
						
							| 
									
										
										
										
											2011-03-07 00:43:31 +05:30
										 |  |  | { | 
					
						
							| 
									
										
										
										
											2015-09-27 23:46:30 +02:00
										 |  |  |     var $notice, $peopletag; | 
					
						
							| 
									
										
										
										
											2011-03-07 00:43:31 +05:30
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2015-09-27 23:46:30 +02:00
										 |  |  |     protected function doStreamPreparation() | 
					
						
							| 
									
										
										
										
											2011-03-07 00:43:31 +05:30
										 |  |  |     { | 
					
						
							| 
									
										
										
										
											2015-09-27 23:46:30 +02:00
										 |  |  |         $tag = common_canonical_tag($this->arg('tag')); | 
					
						
							|  |  |  |         try { | 
					
						
							|  |  |  |             $this->peopletag = Profile_list::getByPK(array('tagger' => $this->target->getID(), 'tag' => $tag)); | 
					
						
							|  |  |  |         } catch (NoResultException $e) { | 
					
						
							| 
									
										
										
										
											2011-04-17 02:15:17 +02:00
										 |  |  |             // TRANS: Client error displayed trying to reference a non-existing list.
 | 
					
						
							| 
									
										
										
										
											2015-09-27 23:46:30 +02:00
										 |  |  |             throw new ClientException('No such list.'); | 
					
						
							| 
									
										
										
										
											2011-03-07 00:43:31 +05:30
										 |  |  |         } | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2015-09-27 23:46:30 +02:00
										 |  |  |         if ($this->peopletag->private && !$this->peopletag->getTagger()->sameAs($this->scoped)) { | 
					
						
							|  |  |  |             // TRANS: Client error displayed trying to reference a non-existing list.
 | 
					
						
							|  |  |  |             throw new AuthorizationException('You do not have permission to see this list.'); | 
					
						
							| 
									
										
										
										
											2011-03-07 00:43:31 +05:30
										 |  |  |         } | 
					
						
							|  |  |  |     } | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2015-09-27 23:46:30 +02:00
										 |  |  |     public function getStream() | 
					
						
							| 
									
										
										
										
											2011-03-07 00:43:31 +05:30
										 |  |  |     { | 
					
						
							| 
									
										
										
										
											2015-09-27 23:46:30 +02:00
										 |  |  |         return new PeopletagNoticeStream($this->peopletag, $this->scoped); | 
					
						
							| 
									
										
										
										
											2011-03-07 00:43:31 +05:30
										 |  |  |     } | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |     function title() | 
					
						
							|  |  |  |     { | 
					
						
							|  |  |  |         if ($this->page > 1) { | 
					
						
							|  |  |  |             if($this->peopletag->private) { | 
					
						
							| 
									
										
										
										
											2011-04-15 10:12:49 +02:00
										 |  |  |                 // TRANS: Title for private list timeline.
 | 
					
						
							| 
									
										
										
										
											2011-04-17 02:15:17 +02:00
										 |  |  |                 // TRANS: %1$s is a list, %2$s is a page number.
 | 
					
						
							| 
									
										
										
										
											2011-04-13 13:45:25 +05:30
										 |  |  |                 return sprintf(_('Private timeline for %1$s list by you, page %2$d'), | 
					
						
							| 
									
										
										
										
											2011-03-07 00:43:31 +05:30
										 |  |  |                                 $this->peopletag->tag, $this->page); | 
					
						
							|  |  |  |             } | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |             $current = common_current_user(); | 
					
						
							|  |  |  |             if (!empty($current) && $current->id == $this->peopletag->tagger) { | 
					
						
							| 
									
										
										
										
											2011-04-15 10:12:49 +02:00
										 |  |  |                 // TRANS: Title for public list timeline where the viewer is the tagger.
 | 
					
						
							| 
									
										
										
										
											2011-04-17 02:15:17 +02:00
										 |  |  |                 // TRANS: %1$s is a list, %2$s is a page number.
 | 
					
						
							| 
									
										
										
										
											2011-04-13 13:45:25 +05:30
										 |  |  |                 return sprintf(_('Timeline for %1$s list by you, page %2$d'), | 
					
						
							| 
									
										
										
										
											2011-03-07 00:43:31 +05:30
										 |  |  |                                 $this->peopletag->tag, $this->page); | 
					
						
							|  |  |  |             } | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2011-04-15 10:12:49 +02:00
										 |  |  |             // TRANS: Title for private list timeline.
 | 
					
						
							| 
									
										
										
										
											2011-04-17 02:15:17 +02:00
										 |  |  |             // TRANS: %1$s is a list, %2$s is the tagger's nickname, %3$d is a page number.
 | 
					
						
							| 
									
										
										
										
											2011-04-13 13:45:25 +05:30
										 |  |  |             return sprintf(_('Timeline for %1$s list by %2$s, page %3$d'), | 
					
						
							| 
									
										
										
										
											2011-03-07 00:43:31 +05:30
										 |  |  |                                 $this->peopletag->tag, | 
					
						
							| 
									
										
										
										
											2015-09-27 23:46:30 +02:00
										 |  |  |                                 $this->target->getNickname(), | 
					
						
							| 
									
										
										
										
											2011-03-07 00:43:31 +05:30
										 |  |  |                                 $this->page | 
					
						
							|  |  |  |                           ); | 
					
						
							|  |  |  |         } else { | 
					
						
							|  |  |  |             if($this->peopletag->private) { | 
					
						
							| 
									
										
										
										
											2011-04-15 10:12:49 +02:00
										 |  |  |                 // TRANS: Title for private list timeline.
 | 
					
						
							|  |  |  |                 // TRANS: %s is a list.
 | 
					
						
							| 
									
										
										
										
											2011-04-13 13:45:25 +05:30
										 |  |  |                 return sprintf(_('Private timeline of %s list by you'), | 
					
						
							| 
									
										
										
										
											2011-04-10 19:59:55 +02:00
										 |  |  |                                 $this->peopletag->tag); | 
					
						
							| 
									
										
										
										
											2011-03-07 00:43:31 +05:30
										 |  |  |             } | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |             $current = common_current_user(); | 
					
						
							|  |  |  |             if (!empty($current) && $current->id == $this->peopletag->tagger) { | 
					
						
							| 
									
										
										
										
											2011-04-15 10:12:49 +02:00
										 |  |  |                 // TRANS: Title for public list timeline where the viewer is the tagger.
 | 
					
						
							|  |  |  |                 // TRANS: %s is a list.
 | 
					
						
							| 
									
										
										
										
											2011-04-13 13:45:25 +05:30
										 |  |  |                 return sprintf(_('Timeline for %s list by you'), | 
					
						
							| 
									
										
										
										
											2011-04-10 19:59:55 +02:00
										 |  |  |                                 $this->peopletag->tag); | 
					
						
							| 
									
										
										
										
											2011-03-07 00:43:31 +05:30
										 |  |  |             } | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2011-04-15 10:12:49 +02:00
										 |  |  |             // TRANS: Title for private list timeline.
 | 
					
						
							|  |  |  |             // TRANS: %1$s is a list, %2$s is the tagger's nickname.
 | 
					
						
							| 
									
										
										
										
											2011-04-13 13:45:25 +05:30
										 |  |  |             return sprintf(_('Timeline for %1$s list by %2$s'), | 
					
						
							| 
									
										
										
										
											2011-03-07 00:43:31 +05:30
										 |  |  |                                 $this->peopletag->tag, | 
					
						
							| 
									
										
										
										
											2015-09-27 23:46:30 +02:00
										 |  |  |                                 $this->target->getNickname() | 
					
						
							| 
									
										
										
										
											2011-03-07 00:43:31 +05:30
										 |  |  |                           ); | 
					
						
							|  |  |  |         } | 
					
						
							|  |  |  |     } | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |     function getFeeds() | 
					
						
							|  |  |  |     { | 
					
						
							|  |  |  |         #XXX: make these actually work
 | 
					
						
							| 
									
										
										
										
											2011-06-22 17:19:46 -04:00
										 |  |  |         return array(new Feed(Feed::JSON, | 
					
						
							|  |  |  |                 common_local_url( | 
					
						
							|  |  |  |                     'ApiTimelineList', array( | 
					
						
							| 
									
										
										
										
											2015-09-27 23:46:30 +02:00
										 |  |  |                         'user' => $this->target->id, | 
					
						
							| 
									
										
										
										
											2011-06-22 17:19:46 -04:00
										 |  |  |                         'id' => $this->peopletag->id, | 
					
						
							|  |  |  |                         'format' => 'as' | 
					
						
							|  |  |  |                     ) | 
					
						
							|  |  |  |                 ), | 
					
						
							|  |  |  |                 // TRANS: Feed title.
 | 
					
						
							|  |  |  |                 // TRANS: %s is tagger's nickname.
 | 
					
						
							| 
									
										
										
										
											2015-09-27 23:46:30 +02:00
										 |  |  |                 sprintf(_('Feed for friends of %s (Activity Streams JSON)'), $this->target->getNickname())), | 
					
						
							| 
									
										
										
										
											2011-06-22 17:19:46 -04:00
										 |  |  |                 new Feed(Feed::RSS2, | 
					
						
							| 
									
										
										
										
											2011-03-07 00:43:31 +05:30
										 |  |  |                 common_local_url( | 
					
						
							|  |  |  |                     'ApiTimelineList', array( | 
					
						
							| 
									
										
										
										
											2015-09-27 23:46:30 +02:00
										 |  |  |                         'user' => $this->target->id, | 
					
						
							| 
									
										
										
										
											2011-03-07 00:43:31 +05:30
										 |  |  |                         'id' => $this->peopletag->id, | 
					
						
							|  |  |  |                         'format' => 'rss' | 
					
						
							|  |  |  |                     ) | 
					
						
							|  |  |  |                 ), | 
					
						
							| 
									
										
										
										
											2011-04-10 19:59:55 +02:00
										 |  |  |                 // TRANS: Feed title.
 | 
					
						
							|  |  |  |                 // TRANS: %s is tagger's nickname.
 | 
					
						
							| 
									
										
										
										
											2015-09-27 23:46:30 +02:00
										 |  |  |                 sprintf(_('Feed for friends of %s (RSS 2.0)'), $this->target->getNickname())), | 
					
						
							| 
									
										
										
										
											2011-03-07 00:43:31 +05:30
										 |  |  |             new Feed(Feed::ATOM, | 
					
						
							|  |  |  |                 common_local_url( | 
					
						
							|  |  |  |                     'ApiTimelineList', array( | 
					
						
							| 
									
										
										
										
											2015-09-27 23:46:30 +02:00
										 |  |  |                         'user' => $this->target->id, | 
					
						
							| 
									
										
										
										
											2011-03-07 00:43:31 +05:30
										 |  |  |                         'id' => $this->peopletag->id, | 
					
						
							|  |  |  |                         'format' => 'atom' | 
					
						
							|  |  |  |                     ) | 
					
						
							|  |  |  |                 ), | 
					
						
							| 
									
										
										
										
											2011-04-10 19:59:55 +02:00
										 |  |  |                 // TRANS: Feed title.
 | 
					
						
							| 
									
										
										
										
											2011-04-15 10:12:49 +02:00
										 |  |  |                 // TRANS: %1$s is a list, %2$s is tagger's nickname.
 | 
					
						
							| 
									
										
										
										
											2011-04-13 13:45:25 +05:30
										 |  |  |                 sprintf(_('Feed for %1$s list by %2$s (Atom)'), | 
					
						
							| 
									
										
										
										
											2015-09-27 23:46:30 +02:00
										 |  |  |                             $this->peopletag->tag, $this->target->getNickname() | 
					
						
							| 
									
										
										
										
											2011-03-07 00:43:31 +05:30
										 |  |  |                        ) | 
					
						
							|  |  |  |               ) | 
					
						
							|  |  |  |         ); | 
					
						
							|  |  |  |     } | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2011-03-22 08:30:16 +05:30
										 |  |  |     function showObjectNav() | 
					
						
							| 
									
										
										
										
											2011-03-07 00:43:31 +05:30
										 |  |  |     { | 
					
						
							|  |  |  |         $nav = new PeopletagGroupNav($this); | 
					
						
							|  |  |  |         $nav->show(); | 
					
						
							|  |  |  |     } | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |     function showEmptyListMessage() | 
					
						
							|  |  |  |     { | 
					
						
							| 
									
										
										
										
											2011-04-15 10:12:49 +02:00
										 |  |  |         // TRANS: Empty list message for list timeline.
 | 
					
						
							|  |  |  |         // TRANS: %1$s is a list, %2$s is a tagger's nickname.
 | 
					
						
							| 
									
										
										
										
											2011-04-13 13:45:25 +05:30
										 |  |  |         $message = sprintf(_('This is the timeline for %1$s list by %2$s but no one has posted anything yet.'), | 
					
						
							| 
									
										
										
										
											2011-04-10 19:59:55 +02:00
										 |  |  |                            $this->peopletag->tag, | 
					
						
							| 
									
										
										
										
											2015-09-27 23:46:30 +02:00
										 |  |  |                            $this->target->getNickname()) . ' '; | 
					
						
							| 
									
										
										
										
											2011-03-07 00:43:31 +05:30
										 |  |  | 
 | 
					
						
							|  |  |  |         if (common_logged_in()) { | 
					
						
							| 
									
										
										
										
											2015-09-27 23:46:30 +02:00
										 |  |  |             if ($this->target->sameAs($this->scoped)) { | 
					
						
							| 
									
										
										
										
											2011-04-17 02:15:17 +02:00
										 |  |  |                 // TRANS: Additional empty list message for list timeline for currently logged in user tagged tags.
 | 
					
						
							| 
									
										
										
										
											2011-03-07 00:43:31 +05:30
										 |  |  |                 $message .= _('Try tagging more people.'); | 
					
						
							|  |  |  |             } | 
					
						
							|  |  |  |         } else { | 
					
						
							| 
									
										
										
										
											2011-04-17 02:15:17 +02:00
										 |  |  |             // TRANS: Additional empty list message for list timeline.
 | 
					
						
							| 
									
										
										
										
											2011-04-10 19:59:55 +02:00
										 |  |  |             // TRANS: This message contains Markdown links in the form [description](link).
 | 
					
						
							|  |  |  |             $message .= _('Why not [register an account](%%%%action.register%%%%) and start following this timeline!'); | 
					
						
							| 
									
										
										
										
											2011-03-07 00:43:31 +05:30
										 |  |  |         } | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |         $this->elementStart('div', 'guide'); | 
					
						
							|  |  |  |         $this->raw(common_markup_to_html($message)); | 
					
						
							|  |  |  |         $this->elementEnd('div'); | 
					
						
							|  |  |  |     } | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2015-09-27 23:46:30 +02:00
										 |  |  |     protected function showContent() | 
					
						
							| 
									
										
										
										
											2011-03-07 00:43:31 +05:30
										 |  |  |     { | 
					
						
							|  |  |  |         $this->showPeopletag(); | 
					
						
							| 
									
										
										
										
											2015-09-27 23:46:30 +02:00
										 |  |  |         parent::showContent(); | 
					
						
							| 
									
										
										
										
											2011-03-07 00:43:31 +05:30
										 |  |  |     } | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |     function showPeopletag() | 
					
						
							|  |  |  |     { | 
					
						
							| 
									
										
										
										
											2015-09-27 23:46:30 +02:00
										 |  |  |         $tag = new Peopletag($this->peopletag, $this->scoped, $this); | 
					
						
							| 
									
										
										
										
											2011-03-07 00:43:31 +05:30
										 |  |  |         $tag->show(); | 
					
						
							|  |  |  |     } | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |     function showNotices() | 
					
						
							|  |  |  |     { | 
					
						
							|  |  |  |         if (Event::handle('StartShowProfileTagContent', array($this))) { | 
					
						
							| 
									
										
										
										
											2015-01-08 20:29:09 +01:00
										 |  |  |             $nl = new PrimaryNoticeList($this->notice, $this, array('show_n'=>NOTICES_PER_PAGE)); | 
					
						
							| 
									
										
										
										
											2011-03-07 00:43:31 +05:30
										 |  |  | 
 | 
					
						
							|  |  |  |             $cnt = $nl->show(); | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |             if (0 == $cnt) { | 
					
						
							|  |  |  |                 $this->showEmptyListMessage(); | 
					
						
							|  |  |  |             } | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2011-04-13 01:26:56 +05:30
										 |  |  |             $this->pagination($this->page > 1, | 
					
						
							|  |  |  |                               $cnt > NOTICES_PER_PAGE, | 
					
						
							|  |  |  |                               $this->page, | 
					
						
							|  |  |  |                               'showprofiletag', | 
					
						
							|  |  |  |                               array('tag' => $this->peopletag->tag, | 
					
						
							| 
									
										
										
										
											2015-09-27 23:46:30 +02:00
										 |  |  |                                     'nickname' => $this->target->getNickname()) | 
					
						
							| 
									
										
										
										
											2011-03-07 00:43:31 +05:30
										 |  |  |             ); | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |             Event::handle('EndShowProfileTagContent', array($this)); | 
					
						
							|  |  |  |         } | 
					
						
							|  |  |  |     } | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |     function showSections() | 
					
						
							|  |  |  |     { | 
					
						
							|  |  |  |         $this->showTagged(); | 
					
						
							|  |  |  |         if (!$this->peopletag->private) { | 
					
						
							|  |  |  |             $this->showSubscribers(); | 
					
						
							|  |  |  |         } | 
					
						
							|  |  |  |         # $this->showStatistics();
 | 
					
						
							|  |  |  |     } | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |     function showTagged() | 
					
						
							|  |  |  |     { | 
					
						
							|  |  |  |         $profile = $this->peopletag->getTagged(0, PROFILES_PER_MINILIST + 1); | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |         $this->elementStart('div', array('id' => 'entity_tagged', | 
					
						
							|  |  |  |                                          'class' => 'section')); | 
					
						
							|  |  |  |         if (Event::handle('StartShowTaggedProfilesMiniList', array($this))) { | 
					
						
							|  |  |  |             $title = ''; | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2011-04-15 10:12:49 +02:00
										 |  |  |             // TRANS: Header on show list page.
 | 
					
						
							|  |  |  |             $this->element('h2', null, _('Listed')); | 
					
						
							| 
									
										
										
										
											2011-03-07 00:43:31 +05:30
										 |  |  | 
 | 
					
						
							|  |  |  |             $cnt = 0; | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |             if (!empty($profile)) { | 
					
						
							|  |  |  |                 $pml = new ProfileMiniList($profile, $this); | 
					
						
							|  |  |  |                 $cnt = $pml->show(); | 
					
						
							|  |  |  |                 if ($cnt == 0) { | 
					
						
							| 
									
										
										
										
											2011-04-15 10:12:49 +02:00
										 |  |  |                     // TRANS: Content of "Listed" page if there are no listed users.
 | 
					
						
							| 
									
										
										
										
											2011-03-07 00:43:31 +05:30
										 |  |  |                     $this->element('p', null, _('(None)')); | 
					
						
							|  |  |  |                 } | 
					
						
							|  |  |  |             } | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |             if ($cnt > PROFILES_PER_MINILIST) { | 
					
						
							|  |  |  |                 $this->elementStart('p'); | 
					
						
							|  |  |  |                 $this->element('a', array('href' => common_local_url('taggedprofiles', | 
					
						
							| 
									
										
										
										
											2015-09-27 23:46:30 +02:00
										 |  |  |                                                                      array('nickname' => $this->target->getNickname(), | 
					
						
							| 
									
										
										
										
											2011-03-07 00:43:31 +05:30
										 |  |  |                                                                            'profiletag' => $this->peopletag->tag)), | 
					
						
							|  |  |  |                                           'class' => 'more'), | 
					
						
							| 
									
										
										
										
											2011-04-17 20:08:03 +02:00
										 |  |  |                                // TRANS: Link for more "People in list x by a user"
 | 
					
						
							| 
									
										
										
										
											2011-04-10 19:59:55 +02:00
										 |  |  |                                // TRANS: if there are more than the mini list's maximum.
 | 
					
						
							| 
									
										
										
										
											2011-03-07 00:43:31 +05:30
										 |  |  |                                _('Show all')); | 
					
						
							|  |  |  |                 $this->elementEnd('p'); | 
					
						
							|  |  |  |             } | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |             Event::handle('EndShowTaggedProfilesMiniList', array($this)); | 
					
						
							|  |  |  |         } | 
					
						
							|  |  |  |         $this->elementEnd('div'); | 
					
						
							|  |  |  |     } | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |     function showSubscribers() | 
					
						
							|  |  |  |     { | 
					
						
							|  |  |  |         $profile = $this->peopletag->getSubscribers(0, PROFILES_PER_MINILIST + 1); | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |         $this->elementStart('div', array('id' => 'entity_subscribers', | 
					
						
							|  |  |  |                                          'class' => 'section')); | 
					
						
							|  |  |  |         if (Event::handle('StartShowProfileTagSubscribersMiniList', array($this))) { | 
					
						
							| 
									
										
										
										
											2011-04-10 19:59:55 +02:00
										 |  |  |             // TRANS: Header for tag subscribers.
 | 
					
						
							| 
									
										
										
										
											2011-03-07 00:43:31 +05:30
										 |  |  |             $this->element('h2', null, _('Subscribers')); | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |             $cnt = 0; | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |             if (!empty($profile)) { | 
					
						
							|  |  |  |                 $pml = new ProfileMiniList($profile, $this); | 
					
						
							|  |  |  |                 $cnt = $pml->show(); | 
					
						
							|  |  |  |                 if ($cnt == 0) { | 
					
						
							| 
									
										
										
										
											2011-04-10 19:59:55 +02:00
										 |  |  |                     // TRANS: Content of "People following tag x" if there are no subscribed users.
 | 
					
						
							| 
									
										
										
										
											2011-03-07 00:43:31 +05:30
										 |  |  |                     $this->element('p', null, _('(None)')); | 
					
						
							|  |  |  |                 } | 
					
						
							|  |  |  |             } | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2011-09-26 16:15:38 -04:00
										 |  |  |             // FIXME: link to full list
 | 
					
						
							| 
									
										
										
										
											2011-03-07 00:43:31 +05:30
										 |  |  | 
 | 
					
						
							|  |  |  |             Event::handle('EndShowProfileTagSubscribersMiniList', array($this)); | 
					
						
							|  |  |  |         } | 
					
						
							|  |  |  |         $this->elementEnd('div'); | 
					
						
							|  |  |  |     } | 
					
						
							|  |  |  | } |