'equalizer',
'profiles' => 'users',
'browser' => 'picture',
'mediabox' => 'pictures',
);
foreach ($views as $name => $icon) {
// if its mediabox, check the plugin is installed and enabled
if ($name === "mediabox" && !JPluginHelper::isEnabled('system', 'jcemediabox')) {
continue;
}
// check if its allowed...
if (!$user->authorise('jce.' . $name, 'com_jce')) {
continue;
}
$link = 'index.php?option=com_jce&view=' . $name;
$title = JText::_('WF_' . strtoupper($name));
if ($name === "browser") {
if (!JPluginHelper::isEnabled('quickicon', 'jce')) {
continue;
}
$title = JText::_('WF_' . strtoupper($name) . '_TITLE');
}
$icons[] = '
' . $title . '
';
}
return $icons;
}
public function getFeeds()
{
$app = JFactory::getApplication();
$params = JComponentHelper::getParams('com_jce');
$limit = $params->get('feed_limit', 2);
$feeds = array();
$options = array(
'rssUrl' => 'https://www.joomlacontenteditor.net/news?format=feed',
);
$xml = simplexml_load_file($options['rssUrl']);
if (empty($xml)) {
return $feeds;
}
jimport('joomla.filter.input');
$filter = JFilterInput::getInstance();
$count = count($xml->channel->item);
if ($count) {
$count = ($count > $limit) ? $limit : $count;
for ($i = 0; $i < $count; ++$i) {
$feed = new StdClass();
$item = $xml->channel->item[$i];
$link = (string) $item->link;
$feed->link = htmlspecialchars($filter->clean($link));
$title = (string) $item->title;
$feed->title = htmlspecialchars($filter->clean($title));
$description = (string) $item->description;
$feed->description = htmlspecialchars($filter->clean($description));
$feeds[] = $feed;
}
}
return $feeds;
}
/**
* Method to auto-populate the model state.
*
* Note. Calling getState in this method will result in recursion.
*
* @since 1.6
*/
protected function populateState($ordering = null, $direction = null)
{
$licence = "";
$version = "";
if ($xml = simplexml_load_file(JPATH_ADMINISTRATOR . '/components/com_jce/jce.xml')) {
$licence = (string) $xml->license;
$version = (string) $xml->version;
if (WF_EDITOR_PRO) {
$version = 'Pro ' . $version;
}
}
$this->setState('version', $version);
$this->setState('licence', $licence);
}
}