Source code for file /joomla/application/plugin/helper.php
Documentation is available at helper.php
* @version $Id: helper.php 6748 2007-03-01 22:49:19Z hackwar $
* @package Joomla.Framework
* @subpackage Application
* @copyright Copyright (C) 2005 - 2007 Open Source Matters. All rights reserved.
* @license GNU/GPL, see LICENSE.php
* Joomla! is free software. This version may have been modified pursuant
* to the GNU General Public License, and as distributed it includes or
* is derivative of works licensed under the GNU General Public License or
* other free or open source software licenses.
* See COPYRIGHT.php for copyright notices and details.
// Check to ensure this file is within the rest of the framework
* @package Joomla.Framework
* @subpackage Application
* Get the plugin data of a group if no specific plugin is specified
* otherwise only the specific plugin data is returned
* @param string $group The group name, relates to the sub-directory in the plugins directory
* @param string $plugin The plugin name
* @return mixed An array of plugin data objects, or a plugin data object
$total =
count($plugins);
for($i =
0; $i <
$total; $i++
) {
if($plugins[$i]->folder ==
$group) {
$result[] =
$plugins[$i];
if($plugins[$i]->folder ==
$group &&
$plugins[$i]->element ==
$plugin) {
* Loads all the plugin files for a particular group if no specific plugin is specified
* otherwise only the specific pugin is loaded.
* @param string $group The group name, relates to the sub-directory in the plugins directory
* @param string $plugin The plugin name
* @return boolean True if success
$total =
count($plugins);
for($i =
0; $i <
$total; $i++
) {
if($plugins[$i]->folder ==
$group &&
($plugins[$i]->element ==
$plugin ||
$plugin ===
null)) {
JPluginHelper::_import( $plugins[$i]->folder, $plugins[$i]->element, $plugins[$i]->published, $plugins[$i]->params );
* @param string The folder (group)
* @param string The elements (name of file without extension)
* @param int Published state
* @param string The params for the bot
* @return boolean True if success
function _import( $folder, $element, $published, $params=
'' )
$path =
JPATH_PLUGINS.
DS.
$folder.
DS.
$element.
'.php';
if (isset
( $paths[$path] ))
//needed for backwards compatibility
global $_MAMBOTS, $mainframe;
//Jinx :: if plugins need languages they need to load them themselves
//$lang =& JFactory::getLanguage();
//$lang->load( 'plg_'.trim( $folder ).'_'.trim( $element ), JPATH_ADMINISTRATOR );
$aid =
$user->get('aid', 0);
$query =
'SELECT id, name, folder, element, published, params'
.
' WHERE published >= 1'
.
' AND access <= ' . (int)
$aid
$query =
'SELECT id, name, folder, element, published, params'
.
' WHERE published >= 1'
if (!($plugins =
$db->loadObjectList())) {