forked from offiria/offiria
/
view.html.php
executable file
·75 lines (60 loc) · 1.58 KB
/
view.html.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
<?php
/**
* @version 1.0.0
* @package com_administrator
* @copyright Copyright (C) 2011 - 2013 Slashes & Dots Sdn Bhd. All rights reserved.
* @license GNU General Public License version 2 or later; see LICENSE.txt
* @author Offiria Team
*/
// No direct access
defined('_JEXEC') or die;
jimport('joomla.application.component.view');
class StreamView extends JView
{
/**
* Attaché required javascript
*/
function _attachScripts()
{
}
public function addPathway( $text , $link = '' )
{
// Set pathways
$mainframe = JFactory::getApplication();
$pathway = $mainframe->getPathway();
$pathwayNames = $pathway->getPathwayNames();
// Test for duplicates before adding the pathway
if( !in_array( $text , $pathwayNames ) )
{
$pathway->addItem( $text , $link );
}
}
/**
* Return upcoming event
*/
public function modUpcomingEventHTML()
{
}
public function modGetAttendeeHTML($stream)
{
$attendees = $stream->getFollowers();
$tmpl = new StreamTemplate();
$tmpl->set('stream', $stream)->set('attendees', $attendees);
$html = $tmpl->fetch('event.module.attendee');
return $html;
}
public function modTagsTrendingHTML($group = null)
{
$tags = new StreamTag();
$trendingTags = $tags->getTrending($group);
$tmpl = new StreamTemplate();
$tmpl->set('title', JText::_('COM_STREAM_LABEL_TRENDING_TAGS'));
$tmpl->set('trendingTags', $trendingTags);
if(!is_null($group)) {
// Filter tags in viewed group
$tmpl->set('groupId', $group->id);
}
$html = $tmpl->fetch('stream.tag.trending');
return $html;
}
}