jomsocial.php
2.24 KB
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
<?php
N2Loader::import('libraries.plugins.N2SliderGeneratorPluginAbstract', 'smartslider');
class N2SSPluginGeneratorJomSocial extends N2PluginBase
{
public static $group = 'jomsocial';
public static $groupLabel = 'JomSocial';
function onGeneratorList(&$group, &$list) {
$installed = N2Filesystem::existsFolder(JPATH_ADMINISTRATOR . DIRECTORY_SEPARATOR . 'components' . DIRECTORY_SEPARATOR . 'com_community');
$url = 'http://extensions.joomla.org/extension/jomsocial';
$group[self::$group] = self::$groupLabel;
if (!isset($list[self::$group])) {
$list[self::$group] = array();
}
$list[self::$group]['events'] = N2GeneratorInfo::getInstance(self::$groupLabel, n2_('Events'), $this->getPath() . 'events')
->setInstalled($installed)
->setUrl($url)
->setType('event');
$list[self::$group]['groups'] = N2GeneratorInfo::getInstance(self::$groupLabel, n2_('Groups'), $this->getPath() . 'groups')
->setInstalled($installed)
->setUrl($url)
->setType('article');
$list[self::$group]['videos'] = N2GeneratorInfo::getInstance(self::$groupLabel, n2_('Videos'), $this->getPath() . 'videos')
->setInstalled($installed)
->setUrl($url)
->setType('youtube');
$list[self::$group]['activities'] = N2GeneratorInfo::getInstance(self::$groupLabel, n2_('Activities'), $this->getPath() . 'activities')
->setInstalled($installed)
->setUrl($url)
->setType('article');
}
function getPath() {
return dirname(__FILE__) . DIRECTORY_SEPARATOR;
}
}
N2Plugin::addPlugin('ssgenerator', 'N2SSPluginGeneratorJomSocial');