You've already forked joomla_test
first commit
This commit is contained in:
19
administrator/components/com_config/config.php
Normal file
19
administrator/components/com_config/config.php
Normal file
@ -0,0 +1,19 @@
|
||||
<?php
|
||||
/**
|
||||
* @package Joomla.Administrator
|
||||
* @subpackage com_config
|
||||
*
|
||||
* @copyright Copyright (C) 2005 - 2013 Open Source Matters, Inc. All rights reserved.
|
||||
* @license GNU General Public License version 2 or later; see LICENSE.txt
|
||||
*/
|
||||
|
||||
defined('_JEXEC') or die;
|
||||
|
||||
// Access checks are done internally because of different requirements for the two controllers.
|
||||
|
||||
// Tell the browser not to cache this page.
|
||||
JResponse::setHeader('Expires', 'Mon, 26 Jul 1997 05:00:00 GMT', true);
|
||||
|
||||
$controller = JControllerLegacy::getInstance('Config');
|
||||
$controller->execute(JFactory::getApplication()->input->get('task'));
|
||||
$controller->redirect();
|
26
administrator/components/com_config/config.xml
Normal file
26
administrator/components/com_config/config.xml
Normal file
@ -0,0 +1,26 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<extension type="component" version="3.1" method="upgrade">
|
||||
<name>com_config</name>
|
||||
<author>Joomla! Project</author>
|
||||
<creationDate>April 2006</creationDate>
|
||||
<copyright>(C) 2005 - 2013 Open Source Matters. All rights reserved.</copyright>
|
||||
<license>GNU General Public License version 2 or later; see LICENSE.txt</license>
|
||||
<authorEmail>admin@joomla.org</authorEmail>
|
||||
<authorUrl>www.joomla.org</authorUrl>
|
||||
<version>3.0.0</version>
|
||||
<description>COM_CONFIG_XML_DESCRIPTION</description>
|
||||
<administration>
|
||||
<files folder="admin">
|
||||
<filename>config.php</filename>
|
||||
<filename>controller.php</filename>
|
||||
<filename>index.html</filename>
|
||||
<folder>controllers</folder>
|
||||
<folder>models</folder>
|
||||
<folder>views</folder>
|
||||
</files>
|
||||
<languages folder="admin">
|
||||
<language tag="en-GB">language/en-GB.com_config.ini</language>
|
||||
<language tag="en-GB">language/en-GB.com_config.sys.ini</language>
|
||||
</languages>
|
||||
</administration>
|
||||
</extension>
|
73
administrator/components/com_config/controller.php
Normal file
73
administrator/components/com_config/controller.php
Normal file
@ -0,0 +1,73 @@
|
||||
<?php
|
||||
/**
|
||||
* @package Joomla.Administrator
|
||||
* @subpackage com_config
|
||||
*
|
||||
* @copyright Copyright (C) 2005 - 2013 Open Source Matters, Inc. All rights reserved.
|
||||
* @license GNU General Public License version 2 or later; see LICENSE.txt
|
||||
*/
|
||||
|
||||
defined('_JEXEC') or die;
|
||||
|
||||
/**
|
||||
* Config Component Controller
|
||||
*
|
||||
* @package Joomla.Administrator
|
||||
* @subpackage com_config
|
||||
* @since 1.5
|
||||
*/
|
||||
class ConfigController extends JControllerLegacy
|
||||
{
|
||||
/**
|
||||
* @var string The default view.
|
||||
* @since 1.6
|
||||
*/
|
||||
protected $default_view = 'application';
|
||||
|
||||
/**
|
||||
* Method to display the view.
|
||||
*
|
||||
* @param boolean $cachable If true, the view output will be cached
|
||||
* @param array $urlparams An array of safe url parameters and their variable types, for valid values see {@link JFilterInput::clean()}.
|
||||
*
|
||||
* @return JController This object to support chaining.
|
||||
*
|
||||
* @since 1.5
|
||||
*/
|
||||
public function display($cachable = false, $urlparams = false)
|
||||
{
|
||||
// Get the document object.
|
||||
$document = JFactory::getDocument();
|
||||
|
||||
// Set the default view name and format from the Request.
|
||||
$vName = $this->input->get('view', 'application');
|
||||
$vFormat = $document->getType();
|
||||
$lName = $this->input->get('layout', 'default');
|
||||
|
||||
// Get and render the view.
|
||||
if ($view = $this->getView($vName, $vFormat))
|
||||
{
|
||||
if ($vName != 'close')
|
||||
{
|
||||
// Get the model for the view.
|
||||
$model = $this->getModel($vName);
|
||||
|
||||
// Access check.
|
||||
if (!JFactory::getUser()->authorise('core.admin', $model->getState('component.option')))
|
||||
{
|
||||
return JError::raiseWarning(404, JText::_('JERROR_ALERTNOAUTHOR'));
|
||||
}
|
||||
|
||||
// Push the model into the view (as default).
|
||||
$view->setModel($model, true);
|
||||
}
|
||||
|
||||
$view->setLayout($lName);
|
||||
|
||||
// Push document object into the view.
|
||||
$view->document = $document;
|
||||
|
||||
$view->display();
|
||||
}
|
||||
}
|
||||
}
|
215
administrator/components/com_config/controllers/application.php
Normal file
215
administrator/components/com_config/controllers/application.php
Normal file
@ -0,0 +1,215 @@
|
||||
<?php
|
||||
/**
|
||||
* @package Joomla.Administrator
|
||||
* @subpackage com_config
|
||||
*
|
||||
* @copyright Copyright (C) 2005 - 2013 Open Source Matters, Inc. All rights reserved.
|
||||
* @license GNU General Public License version 2 or later; see LICENSE.txt
|
||||
*/
|
||||
|
||||
defined('_JEXEC') or die;
|
||||
|
||||
/**
|
||||
* Controller for global configuration
|
||||
*
|
||||
* @package Joomla.Administrator
|
||||
* @subpackage com_config
|
||||
* @since 1.5
|
||||
*/
|
||||
class ConfigControllerApplication extends JControllerLegacy
|
||||
{
|
||||
/**
|
||||
* Class Constructor
|
||||
*
|
||||
* @param array $config An optional associative array of configuration settings.
|
||||
*
|
||||
* @return void
|
||||
*
|
||||
* @since 1.5
|
||||
*/
|
||||
public function __construct($config = array())
|
||||
{
|
||||
parent::__construct($config);
|
||||
|
||||
// Map the apply task to the save method.
|
||||
$this->registerTask('apply', 'save');
|
||||
}
|
||||
|
||||
/**
|
||||
* Method to save the configuration.
|
||||
*
|
||||
* @return bool True on success, false on failure.
|
||||
*
|
||||
* @since 1.5
|
||||
*/
|
||||
public function save()
|
||||
{
|
||||
// Check for request forgeries.
|
||||
JSession::checkToken() or jexit(JText::_('JINVALID_TOKEN'));
|
||||
|
||||
// Check if the user is authorized to do this.
|
||||
if (!JFactory::getUser()->authorise('core.admin'))
|
||||
{
|
||||
JFactory::getApplication()->redirect('index.php', JText::_('JERROR_ALERTNOAUTHOR'));
|
||||
return;
|
||||
}
|
||||
|
||||
// Set FTP credentials, if given.
|
||||
JClientHelper::setCredentialsFromRequest('ftp');
|
||||
|
||||
$app = JFactory::getApplication();
|
||||
$model = $this->getModel('Application');
|
||||
$form = $model->getForm();
|
||||
$data = $this->input->post->get('jform', array(), 'array');
|
||||
|
||||
// Validate the posted data.
|
||||
$return = $model->validate($form, $data);
|
||||
|
||||
// Check for validation errors.
|
||||
if ($return === false)
|
||||
{
|
||||
// Get the validation messages.
|
||||
$errors = $model->getErrors();
|
||||
|
||||
// Push up to three validation messages out to the user.
|
||||
for ($i = 0, $n = count($errors); $i < $n && $i < 3; $i++)
|
||||
{
|
||||
if ($errors[$i] instanceof Exception)
|
||||
{
|
||||
$app->enqueueMessage($errors[$i]->getMessage(), 'warning');
|
||||
}
|
||||
else
|
||||
{
|
||||
$app->enqueueMessage($errors[$i], 'warning');
|
||||
}
|
||||
}
|
||||
|
||||
// Save the data in the session.
|
||||
$app->setUserState('com_config.config.global.data', $data);
|
||||
|
||||
// Redirect back to the edit screen.
|
||||
$this->setRedirect(JRoute::_('index.php?option=com_config&view=application', false));
|
||||
return false;
|
||||
}
|
||||
|
||||
// Attempt to save the configuration.
|
||||
$data = $return;
|
||||
$return = $model->save($data);
|
||||
|
||||
// Check the return value.
|
||||
if ($return === false)
|
||||
{
|
||||
// Save the data in the session.
|
||||
$app->setUserState('com_config.config.global.data', $data);
|
||||
|
||||
// Save failed, go back to the screen and display a notice.
|
||||
$message = JText::sprintf('JERROR_SAVE_FAILED', $model->getError());
|
||||
$this->setRedirect('index.php?option=com_config&view=application', $message, 'error');
|
||||
return false;
|
||||
}
|
||||
|
||||
// Set the success message.
|
||||
$message = JText::_('COM_CONFIG_SAVE_SUCCESS');
|
||||
|
||||
// Set the redirect based on the task.
|
||||
switch ($this->getTask())
|
||||
{
|
||||
case 'apply':
|
||||
$this->setRedirect('index.php?option=com_config', $message);
|
||||
break;
|
||||
|
||||
case 'save':
|
||||
default:
|
||||
$this->setRedirect('index.php', $message);
|
||||
break;
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
* Cancel operation
|
||||
*/
|
||||
public function cancel()
|
||||
{
|
||||
// Check if the user is authorized to do this.
|
||||
if (!JFactory::getUser()->authorise('core.admin', 'com_config'))
|
||||
{
|
||||
JFactory::getApplication()->redirect('index.php', JText::_('JERROR_ALERTNOAUTHOR'));
|
||||
return;
|
||||
}
|
||||
|
||||
// Set FTP credentials, if given
|
||||
JClientHelper::setCredentialsFromRequest('ftp');
|
||||
|
||||
// Clean the session data.
|
||||
$app = JFactory::getApplication();
|
||||
$app->setUserState('com_config.config.global.data', null);
|
||||
|
||||
$this->setRedirect('index.php');
|
||||
}
|
||||
|
||||
public function refreshHelp()
|
||||
{
|
||||
jimport('joomla.filesystem.file');
|
||||
|
||||
// Set FTP credentials, if given
|
||||
JClientHelper::setCredentialsFromRequest('ftp');
|
||||
|
||||
if (($data = file_get_contents('http://help.joomla.org/helpsites.xml')) === false)
|
||||
{
|
||||
$this->setRedirect('index.php?option=com_config', JText::_('COM_CONFIG_ERROR_HELPREFRESH_FETCH'), 'error');
|
||||
}
|
||||
elseif (!JFile::write(JPATH_BASE . '/help/helpsites.xml', $data))
|
||||
{
|
||||
$this->setRedirect('index.php?option=com_config', JText::_('COM_CONFIG_ERROR_HELPREFRESH_ERROR_STORE'), 'error');
|
||||
}
|
||||
else
|
||||
{
|
||||
$this->setRedirect('index.php?option=com_config', JText::_('COM_CONFIG_HELPREFRESH_SUCCESS'));
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Method to remove the root property from the configuration.
|
||||
*
|
||||
* @return bool True on success, false on failure.
|
||||
*
|
||||
* @since 1.5
|
||||
*/
|
||||
public function removeroot()
|
||||
{
|
||||
// Check for request forgeries.
|
||||
JSession::checkToken('get') or die('Invalid Token');
|
||||
|
||||
// Check if the user is authorized to do this.
|
||||
if (!JFactory::getUser()->authorise('core.admin'))
|
||||
{
|
||||
JFactory::getApplication()->redirect('index.php', JText::_('JERROR_ALERTNOAUTHOR'));
|
||||
return;
|
||||
}
|
||||
|
||||
// Initialise model.
|
||||
$model = $this->getModel('Application');
|
||||
|
||||
// Attempt to save the configuration and remove root.
|
||||
$return = $model->removeroot();
|
||||
|
||||
// Check the return value.
|
||||
if ($return === false)
|
||||
{
|
||||
// Save failed, go back to the screen and display a notice.
|
||||
$this->setMessage(JText::sprintf('JERROR_SAVE_FAILED', $model->getError()), 'error');
|
||||
$this->setRedirect('index.php');
|
||||
return false;
|
||||
}
|
||||
|
||||
// Set the success message.
|
||||
$message = JText::_('COM_CONFIG_SAVE_SUCCESS');
|
||||
|
||||
// Set the redirect based on the task.
|
||||
$this->setRedirect('index.php', $message);
|
||||
|
||||
return true;
|
||||
}
|
||||
}
|
165
administrator/components/com_config/controllers/component.php
Normal file
165
administrator/components/com_config/controllers/component.php
Normal file
@ -0,0 +1,165 @@
|
||||
<?php
|
||||
/**
|
||||
* @package Joomla.Administrator
|
||||
* @subpackage com_config
|
||||
*
|
||||
* @copyright Copyright (C) 2005 - 2013 Open Source Matters, Inc. All rights reserved.
|
||||
* @license GNU General Public License version 2 or later; see LICENSE.txt
|
||||
*/
|
||||
|
||||
defined('_JEXEC') or die;
|
||||
|
||||
/**
|
||||
* Note: this view is intended only to be opened in a popup
|
||||
*
|
||||
* @package Joomla.Administrator
|
||||
* @subpackage com_config
|
||||
* @since 1.5
|
||||
*/
|
||||
class ConfigControllerComponent extends JControllerLegacy
|
||||
{
|
||||
/**
|
||||
* Class Constructor
|
||||
*
|
||||
* @param array $config An optional associative array of configuration settings.
|
||||
*
|
||||
* @return void
|
||||
*
|
||||
* @since 1.5
|
||||
*/
|
||||
public function __construct($config = array())
|
||||
{
|
||||
parent::__construct($config);
|
||||
|
||||
// Map the apply task to the save method.
|
||||
$this->registerTask('apply', 'save');
|
||||
}
|
||||
|
||||
/**
|
||||
* Cancel operation
|
||||
*
|
||||
* @return void
|
||||
*
|
||||
* @since 3.0
|
||||
*/
|
||||
function cancel()
|
||||
{
|
||||
// Clean the session data.
|
||||
$app = JFactory::getApplication();
|
||||
$app->setUserState('com_config.config.global.data', null);
|
||||
|
||||
$return = $this->input->post->get('return', null, 'base64');
|
||||
$redirect = 'index.php';
|
||||
if (!empty($return))
|
||||
{
|
||||
$redirect = base64_decode($return);
|
||||
}
|
||||
|
||||
$this->setRedirect($redirect);
|
||||
}
|
||||
|
||||
/**
|
||||
* Save the configuration
|
||||
*/
|
||||
public function save()
|
||||
{
|
||||
// Check for request forgeries.
|
||||
JSession::checkToken() or jexit(JText::_('JINVALID_TOKEN'));
|
||||
|
||||
// Set FTP credentials, if given.
|
||||
JClientHelper::setCredentialsFromRequest('ftp');
|
||||
|
||||
$app = JFactory::getApplication();
|
||||
$model = $this->getModel('Component');
|
||||
$form = $model->getForm();
|
||||
$data = $this->input->get('jform', array(), 'array');
|
||||
$id = $this->input->getInt('id');
|
||||
$option = $this->input->get('component');
|
||||
|
||||
// Check if the user is authorized to do this.
|
||||
if (!JFactory::getUser()->authorise('core.admin', $option))
|
||||
{
|
||||
JFactory::getApplication()->redirect('index.php', JText::_('JERROR_ALERTNOAUTHOR'));
|
||||
return;
|
||||
}
|
||||
|
||||
$returnUri = $this->input->post->get('return', null, 'base64');
|
||||
if (!empty($returnUri))
|
||||
{
|
||||
$redirect = '&return=' . urlencode($returnUri);
|
||||
}
|
||||
|
||||
// Validate the posted data.
|
||||
$return = $model->validate($form, $data);
|
||||
|
||||
// Check for validation errors.
|
||||
if ($return === false)
|
||||
{
|
||||
// Get the validation messages.
|
||||
$errors = $model->getErrors();
|
||||
|
||||
// Push up to three validation messages out to the user.
|
||||
for ($i = 0, $n = count($errors); $i < $n && $i < 3; $i++)
|
||||
{
|
||||
if ($errors[$i] instanceof Exception)
|
||||
{
|
||||
$app->enqueueMessage($errors[$i]->getMessage(), 'warning');
|
||||
}
|
||||
else
|
||||
{
|
||||
$app->enqueueMessage($errors[$i], 'warning');
|
||||
}
|
||||
}
|
||||
|
||||
// Save the data in the session.
|
||||
$app->setUserState('com_config.config.global.data', $data);
|
||||
|
||||
// Redirect back to the edit screen.
|
||||
$this->setRedirect(JRoute::_('index.php?option=com_config&view=component&component=' . $option . $redirect, false));
|
||||
return false;
|
||||
}
|
||||
|
||||
// Attempt to save the configuration.
|
||||
$data = array(
|
||||
'params' => $return,
|
||||
'id' => $id,
|
||||
'option' => $option
|
||||
);
|
||||
$return = $model->save($data);
|
||||
|
||||
// Check the return value.
|
||||
if ($return === false)
|
||||
{
|
||||
// Save the data in the session.
|
||||
$app->setUserState('com_config.config.global.data', $data);
|
||||
|
||||
// Save failed, go back to the screen and display a notice.
|
||||
$message = JText::sprintf('JERROR_SAVE_FAILED', $model->getError());
|
||||
$this->setRedirect('index.php?option=com_config&view=component&component=' . $option . $redirect, $message, 'error');
|
||||
return false;
|
||||
}
|
||||
|
||||
// Set the redirect based on the task.
|
||||
switch ($this->getTask())
|
||||
{
|
||||
case 'apply':
|
||||
$message = JText::_('COM_CONFIG_SAVE_SUCCESS');
|
||||
|
||||
$this->setRedirect('index.php?option=com_config&view=component&component=' . $option . $redirect, $message);
|
||||
break;
|
||||
|
||||
case 'save':
|
||||
default:
|
||||
$redirect = 'index.php';
|
||||
if (!empty($returnUri))
|
||||
{
|
||||
$redirect = base64_decode($returnUri);
|
||||
}
|
||||
|
||||
$this->setRedirect($redirect);
|
||||
break;
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
}
|
@ -0,0 +1 @@
|
||||
<!DOCTYPE html><title></title>
|
112
administrator/components/com_config/helper/component.php
Normal file
112
administrator/components/com_config/helper/component.php
Normal file
@ -0,0 +1,112 @@
|
||||
<?php
|
||||
/**
|
||||
* @package Joomla.Administrator
|
||||
* @subpackage com_config
|
||||
*
|
||||
* @copyright Copyright (C) 2005 - 2013 Open Source Matters, Inc. All rights reserved.
|
||||
* @license GNU General Public License version 2 or later; see LICENSE.txt
|
||||
*/
|
||||
|
||||
defined('_JEXEC') or die;
|
||||
|
||||
/**
|
||||
* Components helper for com_config
|
||||
*
|
||||
* @package Joomla.Administrator
|
||||
* @subpackage com_config
|
||||
* @since 3.0
|
||||
*/
|
||||
class ConfigHelperComponent
|
||||
{
|
||||
/**
|
||||
* Get an array of all enabled components.
|
||||
*
|
||||
* @return array
|
||||
*
|
||||
* @since 3.0
|
||||
*/
|
||||
public static function getAllComponents()
|
||||
{
|
||||
$db = JFactory::getDbo();
|
||||
$query = $db->getQuery(true)
|
||||
->select('element')
|
||||
->from('#__extensions')
|
||||
->where('type = ' . $db->quote('component'))
|
||||
->where('enabled = 1');
|
||||
$db->setQuery($query);
|
||||
$result = $db->loadColumn();
|
||||
|
||||
return $result;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns true if the component has configuration options.
|
||||
*
|
||||
* @param string $components
|
||||
*
|
||||
* @return boolean
|
||||
*
|
||||
* @since 3.0
|
||||
*/
|
||||
public static function hasComponentConfig($component)
|
||||
{
|
||||
return is_file(JPATH_ADMINISTRATOR . '/components/' . $component . '/config.xml');
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns an array of all components with configuration options. By only
|
||||
* components for which the current user has 'core.manage' rights are returned.
|
||||
*
|
||||
* @param boolean $authCheck
|
||||
*
|
||||
* @return array
|
||||
*
|
||||
* @since 3.0
|
||||
*/
|
||||
public static function getComponentsWithConfig($authCheck = true)
|
||||
{
|
||||
$result = array();
|
||||
$components = self::getAllComponents();
|
||||
$user = JFactory::getUser();
|
||||
|
||||
// Remove com_config from the array as that may have weird side effects
|
||||
$components = array_diff($components, array('com_config'));
|
||||
|
||||
foreach ($components as $component)
|
||||
{
|
||||
if (self::hasComponentConfig($component) && (!$authCheck || $user->authorise('core.manage', $component)))
|
||||
{
|
||||
$result[] = $component;
|
||||
}
|
||||
}
|
||||
|
||||
return $result;
|
||||
}
|
||||
|
||||
/**
|
||||
* Load the sys language for the given component.
|
||||
*
|
||||
* @param string $components
|
||||
*
|
||||
* @return void
|
||||
*
|
||||
* @since 3.0
|
||||
*/
|
||||
public static function loadLanguageForComponents($components)
|
||||
{
|
||||
$lang = JFactory::getLanguage();
|
||||
|
||||
foreach ($components as $component)
|
||||
{
|
||||
if (!empty($component))
|
||||
{
|
||||
// Load the core file then
|
||||
// Load extension-local file.
|
||||
$lang->load($component . '.sys', JPATH_BASE, null, false, false)
|
||||
|| $lang->load($component . '.sys', JPATH_ADMINISTRATOR . '/components/' . $component, null, false, false)
|
||||
|| $lang->load($component . '.sys', JPATH_BASE, $lang->getDefault(), false, false)
|
||||
|| $lang->load($component . '.sys', JPATH_ADMINISTRATOR . '/components/' . $component, $lang->getDefault(), false, false);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
1
administrator/components/com_config/helper/index.html
Normal file
1
administrator/components/com_config/helper/index.html
Normal file
@ -0,0 +1 @@
|
||||
<!DOCTYPE html><title></title>
|
1
administrator/components/com_config/index.html
Normal file
1
administrator/components/com_config/index.html
Normal file
@ -0,0 +1 @@
|
||||
<!DOCTYPE html><title></title>
|
279
administrator/components/com_config/models/application.php
Normal file
279
administrator/components/com_config/models/application.php
Normal file
@ -0,0 +1,279 @@
|
||||
<?php
|
||||
/**
|
||||
* @package Joomla.Administrator
|
||||
* @subpackage com_config
|
||||
*
|
||||
* @copyright Copyright (C) 2005 - 2013 Open Source Matters, Inc. All rights reserved.
|
||||
* @license GNU General Public License version 2 or later; see LICENSE.txt
|
||||
*/
|
||||
|
||||
defined('_JEXEC') or die;
|
||||
|
||||
/**
|
||||
* Model for the global configuration
|
||||
*
|
||||
* @package Joomla.Administrator
|
||||
* @subpackage com_config
|
||||
*/
|
||||
class ConfigModelApplication extends JModelForm
|
||||
{
|
||||
/**
|
||||
* Method to get a form object.
|
||||
*
|
||||
* @param array $data Data for the form.
|
||||
* @param boolean $loadData True if the form is to load its own data (default case), false if not.
|
||||
*
|
||||
* @return mixed A JForm object on success, false on failure
|
||||
*
|
||||
* @since 1.6
|
||||
*/
|
||||
public function getForm($data = array(), $loadData = true)
|
||||
{
|
||||
// Get the form.
|
||||
$form = $this->loadForm('com_config.application', 'application', array('control' => 'jform', 'load_data' => $loadData));
|
||||
if (empty($form))
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
return $form;
|
||||
}
|
||||
|
||||
/**
|
||||
* Method to get the configuration data.
|
||||
*
|
||||
* This method will load the global configuration data straight from
|
||||
* JConfig. If configuration data has been saved in the session, that
|
||||
* data will be merged into the original data, overwriting it.
|
||||
*
|
||||
* @return array An array containg all global config data.
|
||||
*
|
||||
* @since 1.6
|
||||
*/
|
||||
public function getData()
|
||||
{
|
||||
// Get the config data.
|
||||
$config = new JConfig;
|
||||
$data = JArrayHelper::fromObject($config);
|
||||
|
||||
// Prime the asset_id for the rules.
|
||||
$data['asset_id'] = 1;
|
||||
|
||||
// Get the text filter data
|
||||
$params = JComponentHelper::getParams('com_config');
|
||||
$data['filters'] = JArrayHelper::fromObject($params->get('filters'));
|
||||
|
||||
// If no filter data found, get from com_content (update of 1.6/1.7 site)
|
||||
if (empty($data['filters']))
|
||||
{
|
||||
$contentParams = JComponentHelper::getParams('com_content');
|
||||
$data['filters'] = JArrayHelper::fromObject($contentParams->get('filters'));
|
||||
}
|
||||
|
||||
// Check for data in the session.
|
||||
$temp = JFactory::getApplication()->getUserState('com_config.config.global.data');
|
||||
|
||||
// Merge in the session data.
|
||||
if (!empty($temp))
|
||||
{
|
||||
$data = array_merge($data, $temp);
|
||||
}
|
||||
|
||||
$this->preprocessData('com_config.application', $data);
|
||||
|
||||
return $data;
|
||||
}
|
||||
|
||||
/**
|
||||
* Method to save the configuration data.
|
||||
*
|
||||
* @param array $data An array containing all global config data.
|
||||
*
|
||||
* @return bool True on success, false on failure.
|
||||
*
|
||||
* @since 1.6
|
||||
*/
|
||||
public function save($data)
|
||||
{
|
||||
// Save the rules
|
||||
if (isset($data['rules']))
|
||||
{
|
||||
$rules = new JAccessRules($data['rules']);
|
||||
|
||||
// Check that we aren't removing our Super User permission
|
||||
// Need to get groups from database, since they might have changed
|
||||
$myGroups = JAccess::getGroupsByUser(JFactory::getUser()->get('id'));
|
||||
$myRules = $rules->getData();
|
||||
$hasSuperAdmin = $myRules['core.admin']->allow($myGroups);
|
||||
if (!$hasSuperAdmin)
|
||||
{
|
||||
$this->setError(JText::_('COM_CONFIG_ERROR_REMOVING_SUPER_ADMIN'));
|
||||
return false;
|
||||
}
|
||||
|
||||
$asset = JTable::getInstance('asset');
|
||||
if ($asset->loadByName('root.1'))
|
||||
{
|
||||
$asset->rules = (string) $rules;
|
||||
|
||||
if (!$asset->check() || !$asset->store())
|
||||
{
|
||||
JError::raiseNotice('SOME_ERROR_CODE', $asset->getError());
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
$this->setError(JText::_('COM_CONFIG_ERROR_ROOT_ASSET_NOT_FOUND'));
|
||||
return false;
|
||||
}
|
||||
unset($data['rules']);
|
||||
}
|
||||
|
||||
// Save the text filters
|
||||
if (isset($data['filters']))
|
||||
{
|
||||
$registry = new JRegistry;
|
||||
$registry->loadArray(array('filters' => $data['filters']));
|
||||
|
||||
$extension = JTable::getInstance('extension');
|
||||
|
||||
// Get extension_id
|
||||
$extension_id = $extension->find(array('name' => 'com_config'));
|
||||
|
||||
if ($extension->load((int) $extension_id))
|
||||
{
|
||||
$extension->params = (string) $registry;
|
||||
if (!$extension->check() || !$extension->store())
|
||||
{
|
||||
JError::raiseNotice('SOME_ERROR_CODE', $extension->getError());
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
$this->setError(JText::_('COM_CONFIG_ERROR_CONFIG_EXTENSION_NOT_FOUND'));
|
||||
return false;
|
||||
}
|
||||
unset($data['filters']);
|
||||
}
|
||||
|
||||
// Get the previous configuration.
|
||||
$prev = new JConfig;
|
||||
$prev = JArrayHelper::fromObject($prev);
|
||||
|
||||
// Merge the new data in. We do this to preserve values that were not in the form.
|
||||
$data = array_merge($prev, $data);
|
||||
|
||||
/*
|
||||
* Perform miscellaneous options based on configuration settings/changes.
|
||||
*/
|
||||
// Escape the offline message if present.
|
||||
if (isset($data['offline_message']))
|
||||
{
|
||||
$data['offline_message'] = JFilterOutput::ampReplace($data['offline_message']);
|
||||
}
|
||||
|
||||
// Purge the database session table if we are changing to the database handler.
|
||||
if ($prev['session_handler'] != 'database' && $data['session_handler'] == 'database')
|
||||
{
|
||||
$table = JTable::getInstance('session');
|
||||
$table->purge(-1);
|
||||
}
|
||||
|
||||
if (empty($data['cache_handler']))
|
||||
{
|
||||
$data['caching'] = 0;
|
||||
}
|
||||
|
||||
// Clean the cache if disabled but previously enabled.
|
||||
if (!$data['caching'] && $prev['caching'])
|
||||
{
|
||||
$cache = JFactory::getCache();
|
||||
$cache->clean();
|
||||
}
|
||||
|
||||
// Create the new configuration object.
|
||||
$config = new JRegistry('config');
|
||||
$config->loadArray($data);
|
||||
|
||||
// Overwrite the old FTP credentials with the new ones.
|
||||
$temp = JFactory::getConfig();
|
||||
$temp->set('ftp_enable', $data['ftp_enable']);
|
||||
$temp->set('ftp_host', $data['ftp_host']);
|
||||
$temp->set('ftp_port', $data['ftp_port']);
|
||||
$temp->set('ftp_user', $data['ftp_user']);
|
||||
$temp->set('ftp_pass', $data['ftp_pass']);
|
||||
$temp->set('ftp_root', $data['ftp_root']);
|
||||
|
||||
// Clear cache of com_config component.
|
||||
$this->cleanCache('_system');
|
||||
|
||||
// Write the configuration file.
|
||||
return $this->writeConfigFile($config);
|
||||
}
|
||||
|
||||
/**
|
||||
* Method to unset the root_user value from configuration data.
|
||||
*
|
||||
* This method will load the global configuration data straight from
|
||||
* JConfig and remove the root_user value for security, then save the configuration.
|
||||
*
|
||||
* @since 1.6
|
||||
*/
|
||||
public function removeroot()
|
||||
{
|
||||
// Get the previous configuration.
|
||||
$prev = new JConfig;
|
||||
$prev = JArrayHelper::fromObject($prev);
|
||||
|
||||
// Create the new configuration object, and unset the root_user property
|
||||
$config = new JRegistry('config');
|
||||
unset($prev['root_user']);
|
||||
$config->loadArray($prev);
|
||||
|
||||
// Write the configuration file.
|
||||
return $this->writeConfigFile($config);
|
||||
}
|
||||
|
||||
/**
|
||||
* Method to write the configuration to a file.
|
||||
*
|
||||
* @param JRegistry $config A JRegistry object containing all global config data.
|
||||
*
|
||||
* @return bool True on success, false on failure.
|
||||
*
|
||||
* @since 2.5.4
|
||||
*/
|
||||
private function writeConfigFile(JRegistry $config)
|
||||
{
|
||||
jimport('joomla.filesystem.path');
|
||||
jimport('joomla.filesystem.file');
|
||||
|
||||
// Set the configuration file path.
|
||||
$file = JPATH_CONFIGURATION . '/configuration.php';
|
||||
|
||||
// Get the new FTP credentials.
|
||||
$ftp = JClientHelper::getCredentials('ftp', true);
|
||||
|
||||
// Attempt to make the file writeable if using FTP.
|
||||
if (!$ftp['enabled'] && JPath::isOwner($file) && !JPath::setPermissions($file, '0644'))
|
||||
{
|
||||
JError::raiseNotice('SOME_ERROR_CODE', JText::_('COM_CONFIG_ERROR_CONFIGURATION_PHP_NOTWRITABLE'));
|
||||
}
|
||||
|
||||
// Attempt to write the configuration file as a PHP class named JConfig.
|
||||
$configuration = $config->toString('PHP', array('class' => 'JConfig', 'closingtag' => false));
|
||||
if (!JFile::write($file, $configuration))
|
||||
{
|
||||
$this->setError(JText::_('COM_CONFIG_ERROR_WRITE_FAILED'));
|
||||
return false;
|
||||
}
|
||||
|
||||
// Attempt to make the file unwriteable if using FTP.
|
||||
if (!$ftp['enabled'] && JPath::isOwner($file) && !JPath::setPermissions($file, '0444'))
|
||||
{
|
||||
JError::raiseNotice('SOME_ERROR_CODE', JText::_('COM_CONFIG_ERROR_CONFIGURATION_PHP_NOTUNWRITABLE'));
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
}
|
217
administrator/components/com_config/models/component.php
Normal file
217
administrator/components/com_config/models/component.php
Normal file
@ -0,0 +1,217 @@
|
||||
<?php
|
||||
/**
|
||||
* @package Joomla.Administrator
|
||||
* @subpackage com_config
|
||||
*
|
||||
* @copyright Copyright (C) 2005 - 2013 Open Source Matters, Inc. All rights reserved.
|
||||
* @license GNU General Public License version 2 or later; see LICENSE.txt
|
||||
*/
|
||||
|
||||
defined('_JEXEC') or die;
|
||||
|
||||
/**
|
||||
* Model for component configuration
|
||||
*
|
||||
* @package Joomla.Administrator
|
||||
* @subpackage com_config
|
||||
* @since 1.5
|
||||
*/
|
||||
class ConfigModelComponent extends JModelForm
|
||||
{
|
||||
/**
|
||||
* The event to trigger before saving the data.
|
||||
*
|
||||
* @var string
|
||||
* @since 3.1.0
|
||||
*/
|
||||
protected $event_before_save = 'onConfigurationBeforeSave';
|
||||
|
||||
/**
|
||||
* The event to trigger before deleting the data.
|
||||
*
|
||||
* @var string
|
||||
* @since 3.1.0
|
||||
*/
|
||||
protected $event_after_save = 'onConfigurationAfterSave';
|
||||
|
||||
/**
|
||||
* Method to auto-populate the model state.
|
||||
*
|
||||
* Note. Calling getState in this method will result in recursion.
|
||||
*
|
||||
* @return void
|
||||
*
|
||||
* @since 1.6
|
||||
*/
|
||||
protected function populateState()
|
||||
{
|
||||
$input = JFactory::getApplication()->input;
|
||||
|
||||
// Set the component (option) we are dealing with.
|
||||
$component = $input->get('component');
|
||||
$this->setState('component.option', $component);
|
||||
|
||||
// Set an alternative path for the configuration file.
|
||||
if ($path = $input->getString('path'))
|
||||
{
|
||||
$path = JPath::clean(JPATH_SITE . '/' . $path);
|
||||
JPath::check($path);
|
||||
$this->setState('component.path', $path);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Method to get a form object.
|
||||
*
|
||||
* @param array $data Data for the form.
|
||||
* @param boolean $loadData True if the form is to load its own data (default case), false if not.
|
||||
*
|
||||
* @return mixed A JForm object on success, false on failure
|
||||
*
|
||||
* @since 1.6
|
||||
*/
|
||||
public function getForm($data = array(), $loadData = true)
|
||||
{
|
||||
if ($path = $this->getState('component.path'))
|
||||
{
|
||||
// Add the search path for the admin component config.xml file.
|
||||
JForm::addFormPath($path);
|
||||
}
|
||||
else
|
||||
{
|
||||
// Add the search path for the admin component config.xml file.
|
||||
JForm::addFormPath(JPATH_ADMINISTRATOR . '/components/' . $this->getState('component.option'));
|
||||
}
|
||||
|
||||
// Get the form.
|
||||
$form = $this->loadForm(
|
||||
'com_config.component',
|
||||
'config',
|
||||
array('control' => 'jform', 'load_data' => $loadData),
|
||||
false,
|
||||
'/config'
|
||||
);
|
||||
|
||||
if (empty($form))
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
return $form;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the component information.
|
||||
*
|
||||
* @return object
|
||||
*
|
||||
* @since 1.6
|
||||
*/
|
||||
function getComponent()
|
||||
{
|
||||
$option = $this->getState('component.option');
|
||||
|
||||
// Load common and local language files.
|
||||
$lang = JFactory::getLanguage();
|
||||
$lang->load($option, JPATH_BASE, null, false, false)
|
||||
|| $lang->load($option, JPATH_BASE . "/components/$option", null, false, false)
|
||||
|| $lang->load($option, JPATH_BASE, $lang->getDefault(), false, false)
|
||||
|| $lang->load($option, JPATH_BASE . "/components/$option", $lang->getDefault(), false, false);
|
||||
|
||||
$result = JComponentHelper::getComponent($option);
|
||||
|
||||
$this->preprocessData('com_config.component', $result);
|
||||
|
||||
return $result;
|
||||
}
|
||||
|
||||
/**
|
||||
* Method to save the configuration data.
|
||||
*
|
||||
* @param array $data An array containing all global config data.
|
||||
*
|
||||
* @return bool True on success, false on failure.
|
||||
*
|
||||
* @since 1.6
|
||||
*/
|
||||
public function save($data)
|
||||
{
|
||||
$dispatcher = JDispatcher::getInstance();
|
||||
$table = JTable::getInstance('extension');
|
||||
$isNew = true;
|
||||
|
||||
// Save the rules.
|
||||
if (isset($data['params']) && isset($data['params']['rules']))
|
||||
{
|
||||
$rules = new JAccessRules($data['params']['rules']);
|
||||
$asset = JTable::getInstance('asset');
|
||||
|
||||
if (!$asset->loadByName($data['option']))
|
||||
{
|
||||
$root = JTable::getInstance('asset');
|
||||
$root->loadByName('root.1');
|
||||
$asset->name = $data['option'];
|
||||
$asset->title = $data['option'];
|
||||
$asset->setLocation($root->id, 'last-child');
|
||||
}
|
||||
$asset->rules = (string) $rules;
|
||||
|
||||
if (!$asset->check() || !$asset->store())
|
||||
{
|
||||
$this->setError($asset->getError());
|
||||
return false;
|
||||
}
|
||||
|
||||
// We don't need this anymore
|
||||
unset($data['option']);
|
||||
unset($data['params']['rules']);
|
||||
}
|
||||
|
||||
// Load the previous Data
|
||||
if (!$table->load($data['id']))
|
||||
{
|
||||
$this->setError($table->getError());
|
||||
return false;
|
||||
}
|
||||
|
||||
unset($data['id']);
|
||||
|
||||
// Bind the data.
|
||||
if (!$table->bind($data))
|
||||
{
|
||||
$this->setError($table->getError());
|
||||
return false;
|
||||
}
|
||||
|
||||
// Check the data.
|
||||
if (!$table->check())
|
||||
{
|
||||
$this->setError($table->getError());
|
||||
return false;
|
||||
}
|
||||
|
||||
// Trigger the onConfigurationBeforeSave event.
|
||||
$result = $dispatcher->trigger($this->event_before_save, array($this->option . '.' . $this->name, $table, $isNew));
|
||||
|
||||
if (in_array(false, $result, true))
|
||||
{
|
||||
$this->setError($table->getError());
|
||||
return false;
|
||||
}
|
||||
|
||||
// Store the data.
|
||||
if (!$table->store())
|
||||
{
|
||||
$this->setError($table->getError());
|
||||
return false;
|
||||
}
|
||||
|
||||
// Clean the component cache.
|
||||
$this->cleanCache('_system');
|
||||
|
||||
// Trigger the onConfigurationAfterSave event.
|
||||
$dispatcher->trigger($this->event_after_save, array($this->option . '.' . $this->name, $table, $isNew));
|
||||
|
||||
return true;
|
||||
}
|
||||
}
|
136
administrator/components/com_config/models/fields/filters.php
Normal file
136
administrator/components/com_config/models/fields/filters.php
Normal file
@ -0,0 +1,136 @@
|
||||
<?php
|
||||
/**
|
||||
* @package Joomla.Administrator
|
||||
* @subpackage com_config
|
||||
*
|
||||
* @copyright Copyright (C) 2005 - 2013 Open Source Matters, Inc. All rights reserved.
|
||||
* @license GNU General Public License version 2 or later; see LICENSE.txt
|
||||
*/
|
||||
|
||||
defined('JPATH_BASE') or die;
|
||||
|
||||
/**
|
||||
* Text Filters form field.
|
||||
*
|
||||
* @package Joomla.Administrator
|
||||
* @subpackage com_config
|
||||
* @since 1.6
|
||||
*/
|
||||
class JFormFieldFilters extends JFormField
|
||||
{
|
||||
/**
|
||||
* The form field type.
|
||||
*
|
||||
* @var string
|
||||
* @since 1.6
|
||||
*/
|
||||
public $type = 'Filters';
|
||||
|
||||
/**
|
||||
* Method to get the field input markup.
|
||||
*
|
||||
* TODO: Add access check.
|
||||
*
|
||||
* @return string The field input markup.
|
||||
*
|
||||
* @since 1.6
|
||||
*/
|
||||
protected function getInput()
|
||||
{
|
||||
// Get the available user groups.
|
||||
$groups = $this->getUserGroups();
|
||||
// Build the form control.
|
||||
$html = array();
|
||||
|
||||
// Open the table.
|
||||
$html[] = '<table id="filter-config" class="table table-striped">';
|
||||
|
||||
// The table heading.
|
||||
$html[] = ' <thead>';
|
||||
$html[] = ' <tr>';
|
||||
$html[] = ' <th>';
|
||||
$html[] = ' <span class="acl-action">' . JText::_('JGLOBAL_FILTER_GROUPS_LABEL') . '</span>';
|
||||
$html[] = ' </th>';
|
||||
$html[] = ' <th>';
|
||||
$html[] = ' <span class="acl-action">' . JText::_('JGLOBAL_FILTER_TYPE_LABEL') . '</span>';
|
||||
$html[] = ' </th>';
|
||||
$html[] = ' <th>';
|
||||
$html[] = ' <span class="acl-action">' . JText::_('JGLOBAL_FILTER_TAGS_LABEL') . '</span>';
|
||||
$html[] = ' </th>';
|
||||
$html[] = ' <th>';
|
||||
$html[] = ' <span class="acl-action">' . JText::_('JGLOBAL_FILTER_ATTRIBUTES_LABEL') . '</span>';
|
||||
$html[] = ' </th>';
|
||||
$html[] = ' </tr>';
|
||||
$html[] = ' </thead>';
|
||||
|
||||
// The table body.
|
||||
$html[] = ' <tbody>';
|
||||
|
||||
foreach ($groups as $group)
|
||||
{
|
||||
if (!isset($this->value[$group->value]))
|
||||
{
|
||||
$this->value[$group->value] = array('filter_type' => 'BL', 'filter_tags' => '', 'filter_attributes' => '');
|
||||
}
|
||||
$group_filter = $this->value[$group->value];
|
||||
|
||||
$html[] = ' <tr>';
|
||||
$html[] = ' <th class="acl-groups left">';
|
||||
$html[] = ' ' . str_repeat('<span class="gi">|—</span>', $group->level) . $group->text;
|
||||
$html[] = ' </th>';
|
||||
$html[] = ' <td>';
|
||||
$html[] = ' <select name="' . $this->name . '[' . $group->value . '][filter_type]" id="' . $this->id . $group->value . '_filter_type">';
|
||||
$html[] = ' <option value="BL"' . ($group_filter['filter_type'] == 'BL' ? ' selected="selected"' : '') . '>' . JText::_('COM_CONFIG_FIELD_FILTERS_DEFAULT_BLACK_LIST') . '</option>';
|
||||
$html[] = ' <option value="CBL"' . ($group_filter['filter_type'] == 'CBL' ? ' selected="selected"' : '') . '>' . JText::_('COM_CONFIG_FIELD_FILTERS_CUSTOM_BLACK_LIST') . '</option>';
|
||||
$html[] = ' <option value="WL"' . ($group_filter['filter_type'] == 'WL' ? ' selected="selected"' : '') . '>' . JText::_('COM_CONFIG_FIELD_FILTERS_WHITE_LIST') . '</option>';
|
||||
$html[] = ' <option value="NH"' . ($group_filter['filter_type'] == 'NH' ? ' selected="selected"' : '') . '>' . JText::_('COM_CONFIG_FIELD_FILTERS_NO_HTML') . '</option>';
|
||||
$html[] = ' <option value="NONE"' . ($group_filter['filter_type'] == 'NONE' ? ' selected="selected"' : '') . '>' . JText::_('COM_CONFIG_FIELD_FILTERS_NO_FILTER') . '</option>';
|
||||
$html[] = ' </select>';
|
||||
$html[] = ' </td>';
|
||||
$html[] = ' <td>';
|
||||
$html[] = ' <input name="' . $this->name . '[' . $group->value . '][filter_tags]" id="' . $this->id . $group->value . '_filter_tags" value="' . $group_filter['filter_tags'] . '"/>';
|
||||
$html[] = ' </td>';
|
||||
$html[] = ' <td>';
|
||||
$html[] = ' <input name="' . $this->name . '[' . $group->value . '][filter_attributes]" id="' . $this->id . $group->value . '_filter_attributes" value="' . $group_filter['filter_attributes'] . '"/>';
|
||||
$html[] = ' </td>';
|
||||
$html[] = ' </tr>';
|
||||
}
|
||||
$html[] = ' </tbody>';
|
||||
|
||||
// Close the table.
|
||||
$html[] = '</table>';
|
||||
|
||||
// Add notes
|
||||
$html[] = '<div class="alert">';
|
||||
$html[] = '<p>' . JText::_('JGLOBAL_FILTER_TYPE_DESC') . '</p>';
|
||||
$html[] = '<p>' . JText::_('JGLOBAL_FILTER_TAGS_DESC') . '</p>';
|
||||
$html[] = '<p>' . JText::_('JGLOBAL_FILTER_ATTRIBUTES_DESC') . '</p>';
|
||||
$html[] = '</div>';
|
||||
|
||||
return implode("\n", $html);
|
||||
}
|
||||
|
||||
/**
|
||||
* A helper to get the list of user groups.
|
||||
*
|
||||
* @return array
|
||||
*
|
||||
* @since 1.6
|
||||
*/
|
||||
protected function getUserGroups()
|
||||
{
|
||||
// Get a database object.
|
||||
$db = JFactory::getDbo();
|
||||
// Get the user groups from the database.
|
||||
$query = $db->getQuery(true)
|
||||
->select('a.id AS value, a.title AS text, COUNT(DISTINCT b.id) AS level')
|
||||
->from('#__usergroups AS a')
|
||||
->join('LEFT', '#__usergroups AS b on a.lft > b.lft AND a.rgt < b.rgt')
|
||||
->group('a.id, a.title, a.lft')
|
||||
->order('a.lft ASC');
|
||||
$db->setQuery($query);
|
||||
$options = $db->loadObjectList();
|
||||
|
||||
return $options;
|
||||
}
|
||||
}
|
@ -0,0 +1 @@
|
||||
<!DOCTYPE html><title></title>
|
800
administrator/components/com_config/models/forms/application.xml
Normal file
800
administrator/components/com_config/models/forms/application.xml
Normal file
@ -0,0 +1,800 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<form>
|
||||
<fieldset
|
||||
name="cache"
|
||||
label="COM_CONFIG_CACHE_SETTINGS_LABEL">
|
||||
<field
|
||||
name="caching"
|
||||
type="list"
|
||||
default="2"
|
||||
label="COM_CONFIG_FIELD_CACHE_LABEL"
|
||||
description="COM_CONFIG_FIELD_CACHE_DESC"
|
||||
required="true"
|
||||
filter="integer">
|
||||
<option value="0">COM_CONFIG_FIELD_VALUE_CACHE_OFF</option>
|
||||
<option value="1">COM_CONFIG_FIELD_VALUE_CACHE_CONSERVATIVE</option>
|
||||
<option value="2">COM_CONFIG_FIELD_VALUE_CACHE_PROGRESSIVE</option>
|
||||
</field>
|
||||
<field
|
||||
name="cache_handler"
|
||||
type="cachehandler"
|
||||
default=""
|
||||
label="COM_CONFIG_FIELD_CACHE_HANDLER_LABEL"
|
||||
description="COM_CONFIG_FIELD_CACHE_HANDLER_DESC"
|
||||
filter="word">
|
||||
</field>
|
||||
|
||||
<field
|
||||
name="cachetime"
|
||||
type="text"
|
||||
default="15"
|
||||
label="COM_CONFIG_FIELD_CACHE_TIME_LABEL"
|
||||
description="COM_CONFIG_FIELD_CACHE_TIME_DESC"
|
||||
required="true"
|
||||
filter="integer"
|
||||
size="6" />
|
||||
</fieldset>
|
||||
|
||||
<fieldset
|
||||
name="memcache"
|
||||
label="COM_CONFIG_MEMCACHE_SETTINGS_LABEL">
|
||||
<field
|
||||
name="memcache_persist"
|
||||
type="radio"
|
||||
class="btn-group"
|
||||
default="1"
|
||||
label="COM_CONFIG_FIELD_MEMCACHE_PERSISTENT_LABEL"
|
||||
description="COM_CONFIG_FIELD_MEMCACHE_PERSISTENT_DESC"
|
||||
filter="integer">
|
||||
<option value="1">JYES</option>
|
||||
<option value="0">JNO</option>
|
||||
</field>
|
||||
|
||||
<field
|
||||
name="memcache_compress"
|
||||
type="radio"
|
||||
class="btn-group"
|
||||
default="0"
|
||||
label="COM_CONFIG_FIELD_MEMCACHE_COMPRESSION_LABEL"
|
||||
description="COM_CONFIG_FIELD_MEMCACHE_COMPRESSION_DESC"
|
||||
filter="integer">
|
||||
<option value="1">JYES</option>
|
||||
<option value="0">JNO</option>
|
||||
</field>
|
||||
|
||||
<field
|
||||
name="memcache_server_host"
|
||||
type="text"
|
||||
default="localhost"
|
||||
label="COM_CONFIG_FIELD_MEMCACHE_HOST_LABEL"
|
||||
description="COM_CONFIG_FIELD_MEMCACHE_HOST_DESC"
|
||||
filter="string"
|
||||
size="25" />
|
||||
|
||||
<field
|
||||
name="memcache_server_port"
|
||||
type="text"
|
||||
default="11211"
|
||||
label="COM_CONFIG_FIELD_MEMCACHE_PORT_LABEL"
|
||||
description="COM_CONFIG_FIELD_MEMCACHE_PORT_DESC"
|
||||
filter="integer"
|
||||
size="5" />
|
||||
</fieldset>
|
||||
|
||||
<fieldset
|
||||
name="database"
|
||||
label="CONFIG_DATABASE_SETTINGS_LABEL">
|
||||
<field
|
||||
name="dbtype"
|
||||
type="databaseconnection"
|
||||
label="COM_CONFIG_FIELD_DATABASE_TYPE_LABEL"
|
||||
description="COM_CONFIG_FIELD_DATABASE_TYPE_DESC"
|
||||
supported="mysql,mysqli,postgresql,sqlsrv,sqlazure"
|
||||
filter="string" />
|
||||
|
||||
<field
|
||||
name="host"
|
||||
type="text"
|
||||
label="COM_CONFIG_FIELD_DATABASE_HOST_LABEL"
|
||||
description="COM_CONFIG_FIELD_DATABASE_HOST_DESC"
|
||||
filter="string"
|
||||
size="30" />
|
||||
|
||||
<field
|
||||
name="user"
|
||||
type="text"
|
||||
label="COM_CONFIG_FIELD_DATABASE_USERNAME_LABEL"
|
||||
description="COM_CONFIG_FIELD_DATABASE_USERNAME_DESC"
|
||||
filter="string"
|
||||
size="30" />
|
||||
|
||||
<field
|
||||
name="db"
|
||||
type="text"
|
||||
label="COM_CONFIG_FIELD_DATABASE_NAME_LABEL"
|
||||
description="COM_CONFIG_FIELD_DATABASE_NAME_DESC"
|
||||
filter="string"
|
||||
size="30" />
|
||||
|
||||
<field
|
||||
name="dbprefix"
|
||||
type="text"
|
||||
default="jos_"
|
||||
label="COM_CONFIG_FIELD_DATABASE_PREFIX_LABEL"
|
||||
description="COM_CONFIG_FIELD_DATABASE_PREFIX_DESC"
|
||||
filter="string"
|
||||
size="10" />
|
||||
|
||||
</fieldset>
|
||||
|
||||
<fieldset
|
||||
name="debug"
|
||||
label="CONFIG_DEBUG_SETTINGS_LABEL">
|
||||
<field
|
||||
name="debug"
|
||||
type="radio"
|
||||
class="btn-group"
|
||||
default="0"
|
||||
label="COM_CONFIG_FIELD_DEBUG_SYSTEM_LABEL"
|
||||
description="COM_CONFIG_FIELD_DEBUG_SYSTEM_DESC"
|
||||
filter="integer">
|
||||
<option value="1">JYES</option>
|
||||
<option value="0">JNO</option>
|
||||
</field>
|
||||
|
||||
<field
|
||||
name="debug_lang"
|
||||
type="radio"
|
||||
class="btn-group"
|
||||
default="0"
|
||||
label="COM_CONFIG_FIELD_DEBUG_LANG_LABEL"
|
||||
description="COM_CONFIG_FIELD_DEBUG_LANG_DESC"
|
||||
filter="integer">
|
||||
<option value="1">JYES</option>
|
||||
<option value="0">JNO</option>
|
||||
</field>
|
||||
</fieldset>
|
||||
|
||||
<fieldset
|
||||
name="ftp"
|
||||
label="CONFIG_FTP_SETTINGS_LABEL">
|
||||
<field
|
||||
name="ftp_enable"
|
||||
type="radio"
|
||||
class="btn-group"
|
||||
default="0"
|
||||
label="COM_CONFIG_FIELD_FTP_ENABLE_LABEL"
|
||||
description="COM_CONFIG_FIELD_FTP_ENABLE_DESC"
|
||||
filter="integer">
|
||||
<option value="1">JYES</option>
|
||||
<option value="0">JNO</option>
|
||||
</field>
|
||||
|
||||
<field
|
||||
name="ftp_host"
|
||||
type="text"
|
||||
label="COM_CONFIG_FIELD_FTP_HOST_LABEL"
|
||||
description="COM_CONFIG_FIELD_FTP_HOST_DESC"
|
||||
filter="string"
|
||||
showon="ftp_enable:1"
|
||||
size="14" />
|
||||
|
||||
<field
|
||||
name="ftp_port"
|
||||
type="text"
|
||||
label="COM_CONFIG_FIELD_FTP_PORT_LABEL"
|
||||
description="COM_CONFIG_FIELD_FTP_PORT_DESC"
|
||||
filter="string"
|
||||
showon="ftp_enable:1"
|
||||
size="8" />
|
||||
|
||||
<field
|
||||
name="ftp_user"
|
||||
type="text"
|
||||
label="COM_CONFIG_FIELD_FTP_USERNAME_LABEL"
|
||||
description="COM_CONFIG_FIELD_FTP_USERNAME_DESC"
|
||||
filter="string"
|
||||
showon="ftp_enable:1"
|
||||
autocomplete="off"
|
||||
size="25" />
|
||||
|
||||
<field
|
||||
name="ftp_pass"
|
||||
type="password"
|
||||
label="COM_CONFIG_FIELD_FTP_PASSWORD_LABEL"
|
||||
description="COM_CONFIG_FIELD_FTP_PASSWORD_DESC"
|
||||
filter="raw"
|
||||
showon="ftp_enable:1"
|
||||
autocomplete="off"
|
||||
size="25" />
|
||||
|
||||
<field
|
||||
name="ftp_root"
|
||||
type="text"
|
||||
label="COM_CONFIG_FIELD_FTP_ROOT_LABEL"
|
||||
showon="ftp_enable:1"
|
||||
description="COM_CONFIG_FIELD_FTP_ROOT_DESC"
|
||||
filter="string"
|
||||
size="50" />
|
||||
</fieldset>
|
||||
|
||||
<fieldset
|
||||
name="locale"
|
||||
label="CONFIG_LOCATION_SETTINGS_LABEL">
|
||||
<field
|
||||
name="offset"
|
||||
type="timezone"
|
||||
default="UTC"
|
||||
label="COM_CONFIG_FIELD_SERVER_TIMEZONE_LABEL"
|
||||
description="COM_CONFIG_FIELD_SERVER_TIMEZONE_DESC"
|
||||
required="true">
|
||||
<option value="UTC">JLIB_FORM_VALUE_TIMEZONE_UTC</option>
|
||||
</field>
|
||||
</fieldset>
|
||||
|
||||
<fieldset
|
||||
name="mail"
|
||||
label="CONFIG_MAIL_SETTINGS_LABEL">
|
||||
<field
|
||||
name="mailer"
|
||||
type="list"
|
||||
default="mail"
|
||||
label="COM_CONFIG_FIELD_MAIL_MAILER_LABEL"
|
||||
description="COM_CONFIG_FIELD_MAIL_MAILER_DESC"
|
||||
required="true"
|
||||
filter="word">
|
||||
<option value="mail">COM_CONFIG_FIELD_VALUE_PHP_MAIL</option>
|
||||
<option value="sendmail">COM_CONFIG_FIELD_VALUE_SENDMAIL</option>
|
||||
<option value="smtp">COM_CONFIG_FIELD_VALUE_SMTP</option>
|
||||
</field>
|
||||
|
||||
<field
|
||||
name="mailfrom"
|
||||
type="email"
|
||||
label="COM_CONFIG_FIELD_MAIL_FROM_EMAIL_LABEL"
|
||||
description="COM_CONFIG_FIELD_MAIL_FROM_EMAIL_DESC"
|
||||
filter="string"
|
||||
size="30"
|
||||
validate="email" />
|
||||
|
||||
<field
|
||||
name="fromname"
|
||||
type="text"
|
||||
label="COM_CONFIG_FIELD_MAIL_FROM_NAME_LABEL"
|
||||
description="COM_CONFIG_FIELD_MAIL_FROM_NAME_DESC"
|
||||
filter="string"
|
||||
size="30" />
|
||||
|
||||
<field
|
||||
name="sendmail"
|
||||
type="text"
|
||||
default="/usr/sbin/sendmail"
|
||||
showon="mailer:sendmail"
|
||||
label="COM_CONFIG_FIELD_MAIL_SENDMAIL_PATH_LABEL"
|
||||
description="COM_CONFIG_FIELD_MAIL_SENDMAIL_PATH_DESC"
|
||||
filter="string"
|
||||
size="30" />
|
||||
|
||||
<field
|
||||
name="smtpauth"
|
||||
type="radio"
|
||||
class="btn-group"
|
||||
default="0"
|
||||
showon="mailer:smtp"
|
||||
label="COM_CONFIG_FIELD_MAIL_SMTP_AUTH_LABEL"
|
||||
description="COM_CONFIG_FIELD_MAIL_SMTP_AUTH_DESC"
|
||||
filter="integer">
|
||||
<option value="1">JYES</option>
|
||||
<option value="0">JNO</option>
|
||||
</field>
|
||||
|
||||
<field
|
||||
name="smtpsecure"
|
||||
type="list"
|
||||
default="none"
|
||||
showon="mailer:smtp"
|
||||
label="COM_CONFIG_FIELD_MAIL_SMTP_SECURE_LABEL"
|
||||
description="COM_CONFIG_FIELD_MAIL_SMTP_SECURE_DESC"
|
||||
filter="word">
|
||||
<option value="none">COM_CONFIG_FIELD_VALUE_NONE</option>
|
||||
<option value="ssl">COM_CONFIG_FIELD_VALUE_SSL</option>
|
||||
<option value="tls">COM_CONFIG_FIELD_VALUE_TLS</option>
|
||||
</field>
|
||||
|
||||
<field
|
||||
name="smtpport"
|
||||
type="text"
|
||||
default="25"
|
||||
showon="mailer:smtp"
|
||||
label="COM_CONFIG_FIELD_MAIL_SMTP_PORT_LABEL"
|
||||
description="COM_CONFIG_FIELD_MAIL_SMTP_PORT_DESC"
|
||||
required="true"
|
||||
filter="string"
|
||||
size="6" />
|
||||
|
||||
<field
|
||||
name="smtpuser"
|
||||
type="text"
|
||||
showon="mailer:smtp"
|
||||
label="COM_CONFIG_FIELD_MAIL_SMTP_USERNAME_LABEL"
|
||||
description="COM_CONFIG_FIELD_MAIL_SMTP_USERNAME_DESC"
|
||||
filter="string"
|
||||
autocomplete="off"
|
||||
size="30" />
|
||||
|
||||
<field
|
||||
name="smtppass"
|
||||
type="password"
|
||||
showon="mailer:smtp"
|
||||
label="COM_CONFIG_FIELD_MAIL_SMTP_PASSWORD_LABEL"
|
||||
description="COM_CONFIG_FIELD_MAIL_SMTP_PASSWORD_DESC"
|
||||
filter="raw"
|
||||
autocomplete="off"
|
||||
size="30" />
|
||||
|
||||
<field
|
||||
name="smtphost"
|
||||
type="text"
|
||||
default="localhost"
|
||||
showon="mailer:smtp"
|
||||
label="COM_CONFIG_FIELD_MAIL_SMTP_HOST_LABEL"
|
||||
description="COM_CONFIG_FIELD_MAIL_SMTP_HOST_DESC"
|
||||
filter="string"
|
||||
size="30" />
|
||||
</fieldset>
|
||||
|
||||
<fieldset
|
||||
name="metadata"
|
||||
label="COM_CONFIG_METADATA_SETTINGS">
|
||||
<field
|
||||
name="MetaDesc"
|
||||
type="textarea"
|
||||
label="COM_CONFIG_FIELD_METADESC_LABEL"
|
||||
description="COM_CONFIG_FIELD_METADESC_DESC"
|
||||
filter="string"
|
||||
cols="60"
|
||||
rows="3" />
|
||||
|
||||
<field
|
||||
name="MetaKeys"
|
||||
type="textarea"
|
||||
label="COM_CONFIG_FIELD_METAKEYS_LABEL"
|
||||
description="COM_CONFIG_FIELD_METAKEYS_DESC"
|
||||
filter="string"
|
||||
cols="60"
|
||||
rows="3" />
|
||||
|
||||
<field name="robots"
|
||||
type="list"
|
||||
label="JFIELD_METADATA_ROBOTS_LABEL"
|
||||
description="JFIELD_METADATA_ROBOTS_DESC"
|
||||
default=""
|
||||
>
|
||||
<option value="">JGLOBAL_INDEX_FOLLOW</option>
|
||||
<option value="noindex, follow">JGLOBAL_NOINDEX_FOLLOW</option>
|
||||
<option value="index, nofollow">JGLOBAL_INDEX_NOFOLLOW</option>
|
||||
<option value="noindex, nofollow">JGLOBAL_NOINDEX_NOFOLLOW</option>
|
||||
</field>
|
||||
|
||||
<field
|
||||
name="MetaRights"
|
||||
type="textarea"
|
||||
label="JFIELD_META_RIGHTS_LABEL"
|
||||
description="JFIELD_META_RIGHTS_DESC"
|
||||
filter="string"
|
||||
cols="60"
|
||||
rows="2" />
|
||||
|
||||
<field
|
||||
name="MetaAuthor"
|
||||
type="radio"
|
||||
class="btn-group"
|
||||
default="1"
|
||||
label="COM_CONFIG_FIELD_METAAUTHOR_LABEL"
|
||||
description="COM_CONFIG_FIELD_METAAUTHOR_DESC"
|
||||
filter="integer">
|
||||
<option value="1">JYES</option>
|
||||
<option value="0">JNO</option>
|
||||
</field>
|
||||
<field
|
||||
name="MetaVersion"
|
||||
type="radio"
|
||||
class="btn-group"
|
||||
default="0"
|
||||
label="COM_CONFIG_FIELD_METAVERSION_LABEL"
|
||||
description="COM_CONFIG_FIELD_METAVERSION_DESC"
|
||||
filter="integer">
|
||||
<option value="1">JYES</option>
|
||||
<option value="0">JNO</option>
|
||||
</field>
|
||||
|
||||
</fieldset>
|
||||
|
||||
<fieldset
|
||||
name="seo"
|
||||
label="CONFIG_SEO_SETTINGS_LABEL">
|
||||
<field
|
||||
name="sef"
|
||||
type="radio"
|
||||
class="btn-group"
|
||||
default="1"
|
||||
label="COM_CONFIG_FIELD_SEF_URL_LABEL"
|
||||
description="COM_CONFIG_FIELD_SEF_URL_DESC"
|
||||
filter="integer">
|
||||
<option value="1">JYES</option>
|
||||
<option value="0">JNO</option>
|
||||
</field>
|
||||
|
||||
<field
|
||||
name="sef_rewrite"
|
||||
type="radio"
|
||||
class="btn-group"
|
||||
default="0"
|
||||
label="COM_CONFIG_FIELD_SEF_REWRITE_LABEL"
|
||||
description="COM_CONFIG_FIELD_SEF_REWRITE_DESC"
|
||||
filter="integer">
|
||||
<option value="1">JYES</option>
|
||||
<option value="0">JNO</option>
|
||||
</field>
|
||||
|
||||
<field
|
||||
name="sef_suffix"
|
||||
type="radio"
|
||||
class="btn-group"
|
||||
default="0"
|
||||
label="COM_CONFIG_FIELD_SEF_SUFFIX_LABEL"
|
||||
description="COM_CONFIG_FIELD_SEF_SUFFIX_DESC"
|
||||
filter="integer">
|
||||
<option value="1">JYES</option>
|
||||
<option value="0">JNO</option>
|
||||
</field>
|
||||
|
||||
<field
|
||||
name="unicodeslugs"
|
||||
type="radio"
|
||||
class="btn-group"
|
||||
default="0"
|
||||
label="COM_CONFIG_FIELD_UNICODESLUGS_LABEL"
|
||||
description="COM_CONFIG_FIELD_UNICODESLUGS_DESC"
|
||||
filter="integer">
|
||||
<option value="1">JYES</option>
|
||||
<option value="0">JNO</option>
|
||||
</field>
|
||||
|
||||
<field
|
||||
name="sitename_pagetitles"
|
||||
type="list"
|
||||
default="0"
|
||||
label="COM_CONFIG_FIELD_SITENAME_PAGETITLES_LABEL"
|
||||
description="COM_CONFIG_FIELD_SITENAME_PAGETITLES_DESC"
|
||||
filter="integer">
|
||||
<option value="2">COM_CONFIG_FIELD_VALUE_AFTER</option>
|
||||
<option value="1">COM_CONFIG_FIELD_VALUE_BEFORE</option>
|
||||
<option value="0">JNO</option>
|
||||
</field>
|
||||
|
||||
</fieldset>
|
||||
|
||||
<fieldset
|
||||
name="server"
|
||||
label="CONFIG_SERVER_SETTINGS_LABEL">
|
||||
<field
|
||||
name="tmp_path"
|
||||
type="text"
|
||||
label="COM_CONFIG_FIELD_TEMP_PATH_LABEL"
|
||||
description="COM_CONFIG_FIELD_TEMP_PATH_DESC"
|
||||
filter="string"
|
||||
size="50" />
|
||||
|
||||
<field
|
||||
name="gzip"
|
||||
type="radio"
|
||||
class="btn-group"
|
||||
default="0"
|
||||
label="COM_CONFIG_FIELD_GZIP_COMPRESSION_LABEL"
|
||||
description="COM_CONFIG_FIELD_GZIP_COMPRESSION_DESC"
|
||||
filter="integer">
|
||||
<option value="1">JYES</option>
|
||||
<option value="0">JNO</option>
|
||||
</field>
|
||||
|
||||
<field
|
||||
name="error_reporting"
|
||||
type="list"
|
||||
default="default"
|
||||
label="COM_CONFIG_FIELD_ERROR_REPORTING_LABEL"
|
||||
description="COM_CONFIG_FIELD_ERROR_REPORTING_DESC"
|
||||
filter="cmd">
|
||||
<option value="default">COM_CONFIG_FIELD_VALUE_SYSTEM_DEFAULT</option>
|
||||
<option value="none">COM_CONFIG_FIELD_VALUE_NONE</option>
|
||||
<option value="simple">COM_CONFIG_FIELD_VALUE_SIMPLE</option>
|
||||
<option value="maximum">COM_CONFIG_FIELD_VALUE_MAXIMUM</option>
|
||||
<option value="development">COM_CONFIG_FIELD_VALUE_DEVELOPMENT</option>
|
||||
</field>
|
||||
|
||||
<field
|
||||
name="force_ssl"
|
||||
type="list"
|
||||
default="-1"
|
||||
label="COM_CONFIG_FIELD_FORCE_SSL_LABEL"
|
||||
description="COM_CONFIG_FIELD_FORCE_SSL_DESC"
|
||||
filter="integer">
|
||||
<option value="0">COM_CONFIG_FIELD_VALUE_NONE</option>
|
||||
<option value="1">COM_CONFIG_FIELD_VALUE_ADMINISTRATOR_ONLY</option>
|
||||
<option value="2">COM_CONFIG_FIELD_VALUE_ENTIRE_SITE</option>
|
||||
</field>
|
||||
</fieldset>
|
||||
|
||||
<fieldset
|
||||
name="session"
|
||||
label="CONFIG_SESSION_SETTINGS_LABEL">
|
||||
<field
|
||||
name="lifetime"
|
||||
type="text"
|
||||
default="15"
|
||||
label="COM_CONFIG_FIELD_SESSION_TIME_LABEL"
|
||||
description="COM_CONFIG_FIELD_SESSION_TIME_DESC"
|
||||
required="true"
|
||||
filter="integer"
|
||||
size="6" />
|
||||
|
||||
<field
|
||||
name="session_handler"
|
||||
type="sessionhandler"
|
||||
default="none"
|
||||
label="COM_CONFIG_FIELD_SESSION_HANDLER_LABEL"
|
||||
description="COM_CONFIG_FIELD_SESSION_HANDLER_DESC"
|
||||
required="true"
|
||||
filter="word" />
|
||||
</fieldset>
|
||||
|
||||
<fieldset
|
||||
name="site"
|
||||
label="CONFIG_SITE_SETTINGS_LABEL">
|
||||
|
||||
<field
|
||||
name="sitename"
|
||||
type="text"
|
||||
label="COM_CONFIG_FIELD_SITE_NAME_LABEL"
|
||||
description="COM_CONFIG_FIELD_SITE_NAME_DESC"
|
||||
required="true"
|
||||
filter="string"
|
||||
size="50" />
|
||||
|
||||
<field
|
||||
name="offline"
|
||||
type="radio"
|
||||
class="btn-group"
|
||||
default="0"
|
||||
label="COM_CONFIG_FIELD_SITE_OFFLINE_LABEL"
|
||||
description="COM_CONFIG_FIELD_SITE_OFFLINE_DESC"
|
||||
filter="integer">
|
||||
<option value="1">JYES</option>
|
||||
<option value="0">JNO</option>
|
||||
</field>
|
||||
|
||||
<field
|
||||
name="display_offline_message"
|
||||
type="list"
|
||||
default="1"
|
||||
label="COM_CONFIG_FIELD_SITE_DISPLAY_MESSAGE_LABEL"
|
||||
description="COM_CONFIG_FIELD_SITE_DISPLAY_MESSAGE_DESC"
|
||||
filter="integer">
|
||||
<option value="0">JHIDE</option>
|
||||
<option value="1">COM_CONFIG_FIELD_VALUE_DISPLAY_OFFLINE_MESSAGE_CUSTOM</option>
|
||||
<option value="2">COM_CONFIG_FIELD_VALUE_DISPLAY_OFFLINE_MESSAGE_LANGUAGE</option>
|
||||
</field>
|
||||
|
||||
<field
|
||||
name="offline_message"
|
||||
type="textarea"
|
||||
label="COM_CONFIG_FIELD_OFFLINE_MESSAGE_LABEL"
|
||||
description="COM_CONFIG_FIELD_OFFLINE_MESSAGE_DESC"
|
||||
filter="safehtml"
|
||||
cols="60"
|
||||
rows="2" />
|
||||
|
||||
<field
|
||||
name="offline_image"
|
||||
type="media"
|
||||
label="COM_CONFIG_FIELD_OFFLINE_IMAGE_LABEL"
|
||||
description="COM_CONFIG_FIELD_OFFLINE_IMAGE_DESC" />
|
||||
|
||||
<field
|
||||
name="editor"
|
||||
type="plugins"
|
||||
folder="editors"
|
||||
default="tinymce"
|
||||
label="COM_CONFIG_FIELD_DEFAULT_EDITOR_LABEL"
|
||||
description="COM_CONFIG_FIELD_DEFAULT_EDITOR_DESC"
|
||||
required="true"
|
||||
filter="cmd" />
|
||||
|
||||
<field
|
||||
name="captcha"
|
||||
type="plugins"
|
||||
folder="captcha"
|
||||
default="0"
|
||||
label="COM_CONFIG_FIELD_DEFAULT_CAPTCHA_LABEL"
|
||||
description="COM_CONFIG_FIELD_DEFAULT_CAPTCHA_DESC"
|
||||
required="true"
|
||||
filter="cmd">
|
||||
<option value="0">JOPTION_DO_NOT_USE</option>
|
||||
</field>
|
||||
|
||||
<field
|
||||
name="access"
|
||||
type="accesslevel"
|
||||
default="1"
|
||||
label="COM_CONFIG_FIELD_DEFAULT_ACCESS_LEVEL_LABEL"
|
||||
description="COM_CONFIG_FIELD_DEFAULT_ACCESS_LEVEL_DESC"
|
||||
required="true"
|
||||
filter="integer" />
|
||||
|
||||
<field
|
||||
name="list_limit"
|
||||
type="list"
|
||||
default="20"
|
||||
label="COM_CONFIG_FIELD_DEFAULT_LIST_LIMIT_LABEL"
|
||||
description="COM_CONFIG_FIELD_DEFAULT_LIST_LIMIT_DESC"
|
||||
filter="integer">
|
||||
<option value="5">J5</option>
|
||||
<option value="10">J10</option>
|
||||
<option value="15">J15</option>
|
||||
<option value="20">J20</option>
|
||||
<option value="25">J25</option>
|
||||
<option value="30">J30</option>
|
||||
<option value="50">J50</option>
|
||||
<option value="100">J100</option>
|
||||
</field>
|
||||
|
||||
<field
|
||||
name="feed_limit"
|
||||
type="list"
|
||||
default="10"
|
||||
label="COM_CONFIG_FIELD_DEFAULT_FEED_LIMIT_LABEL"
|
||||
description="COM_CONFIG_FIELD_DEFAULT_FEED_LIMIT_DESC"
|
||||
filter="integer">
|
||||
<option value="5">J5</option>
|
||||
<option value="10">J10</option>
|
||||
<option value="15">J15</option>
|
||||
<option value="20">J20</option>
|
||||
<option value="25">J25</option>
|
||||
<option value="30">J30</option>
|
||||
<option value="50">J50</option>
|
||||
<option value="100">J100</option>
|
||||
</field>
|
||||
|
||||
<field
|
||||
name="feed_email"
|
||||
type="list"
|
||||
default="author"
|
||||
label="COM_CONFIG_FIELD_FEED_EMAIL_LABEL"
|
||||
description="COM_CONFIG_FIELD_FEED_EMAIL_DESC"
|
||||
filter="word">
|
||||
<option value="author">COM_CONFIG_FIELD_VALUE_AUTHOR_EMAIL</option>
|
||||
<option value="site">COM_CONFIG_FIELD_VALUE_SITE_EMAIL</option>
|
||||
<option value="none">COM_CONFIG_FIELD_VALUE_NO_EMAIL</option>
|
||||
|
||||
</field>
|
||||
</fieldset>
|
||||
|
||||
<fieldset
|
||||
name="system"
|
||||
label="CONFIG_SYSTEM_SETTINGS_LABEL">
|
||||
|
||||
<field
|
||||
name="log_path"
|
||||
type="text"
|
||||
label="COM_CONFIG_FIELD_LOG_PATH_LABEL"
|
||||
description="COM_CONFIG_FIELD_LOG_PATH_DESC"
|
||||
required="true"
|
||||
filter="string"
|
||||
size="50" />
|
||||
|
||||
<field
|
||||
name="helpurl"
|
||||
type="helpsite"
|
||||
label="COM_CONFIG_FIELD_HELP_SERVER_LABEL"
|
||||
description="COM_CONFIG_FIELD_HELP_SERVER_DESC"
|
||||
required="true" />
|
||||
</fieldset>
|
||||
|
||||
<fieldset
|
||||
name="cookie"
|
||||
label="CONFIG_COOKIE_SETTINGS_LABEL">
|
||||
<field
|
||||
name="cookie_domain"
|
||||
type="text"
|
||||
label="COM_CONFIG_FIELD_COOKIE_DOMAIN_LABEL"
|
||||
description="COM_CONFIG_FIELD_COOKIE_DOMAIN_DESC"
|
||||
required="false"
|
||||
filter="string"
|
||||
size="40" />
|
||||
|
||||
<field
|
||||
name="cookie_path"
|
||||
type="text"
|
||||
label="COM_CONFIG_FIELD_COOKIE_PATH_LABEL"
|
||||
description="COM_CONFIG_FIELD_COOKIE_PATH_DESC"
|
||||
required="false"
|
||||
filter="string"
|
||||
size="40" />
|
||||
</fieldset>
|
||||
|
||||
<fieldset
|
||||
name="permissions"
|
||||
label="CONFIG_PERMISSION_SETTINGS_LABEL">
|
||||
|
||||
<field
|
||||
name="rules"
|
||||
type="rules"
|
||||
label="FIELD_RULES_LABEL"
|
||||
translate_label="false"
|
||||
validate="rules"
|
||||
class="inputbox"
|
||||
filter="rules">
|
||||
<action
|
||||
name="core.login.site"
|
||||
title="JACTION_LOGIN_SITE"
|
||||
description="COM_CONFIG_ACTION_LOGIN_SITE_DESC" />
|
||||
<action
|
||||
name="core.login.admin"
|
||||
title="JACTION_LOGIN_ADMIN"
|
||||
description="COM_CONFIG_ACTION_LOGIN_ADMIN_DESC" />
|
||||
<action
|
||||
name="core.login.offline"
|
||||
title="JACTION_LOGIN_OFFLINE"
|
||||
description="COM_CONFIG_ACTION_LOGIN_OFFLINE_DESC" />
|
||||
<action
|
||||
name="core.admin"
|
||||
title="JACTION_ADMIN_GLOBAL"
|
||||
description="COM_CONFIG_ACTION_ADMIN_DESC" />
|
||||
<action
|
||||
name="core.manage"
|
||||
title="JACTION_MANAGE"
|
||||
description="COM_CONFIG_ACTION_MANAGE_DESC" />
|
||||
<action
|
||||
name="core.create"
|
||||
title="JACTION_CREATE"
|
||||
description="COM_CONFIG_ACTION_CREATE_DESC" />
|
||||
<action
|
||||
name="core.delete"
|
||||
title="JACTION_DELETE"
|
||||
description="COM_CONFIG_ACTION_DELETE_DESC" />
|
||||
<action
|
||||
name="core.edit"
|
||||
title="JACTION_EDIT"
|
||||
description="COM_CONFIG_ACTION_EDIT_DESC" />
|
||||
<action
|
||||
name="core.edit.state"
|
||||
title="JACTION_EDITSTATE"
|
||||
description="COM_CONFIG_ACTION_EDITSTATE_DESC" />
|
||||
<action
|
||||
name="core.edit.own"
|
||||
title="JACTION_EDITOWN"
|
||||
description="COM_CONFIG_ACTION_EDITOWN_DESC" />
|
||||
</field>
|
||||
|
||||
</fieldset>
|
||||
|
||||
<fieldset
|
||||
name="filters"
|
||||
label="COM_CONFIG_TEXT_FILTERS"
|
||||
description="COM_CONFIG_TEXT_FILTERS_DESC"
|
||||
>
|
||||
|
||||
<field
|
||||
name="filters"
|
||||
type="filters"
|
||||
label="COM_CONFIG_TEXT_FILTERS"
|
||||
class="inputbox"
|
||||
filter="" />
|
||||
</fieldset>
|
||||
|
||||
<fieldset>
|
||||
<field
|
||||
name="asset_id"
|
||||
type="hidden" />
|
||||
</fieldset>
|
||||
</form>
|
@ -0,0 +1 @@
|
||||
<!DOCTYPE html><title></title>
|
1
administrator/components/com_config/models/index.html
Normal file
1
administrator/components/com_config/models/index.html
Normal file
@ -0,0 +1 @@
|
||||
<!DOCTYPE html><title></title>
|
@ -0,0 +1 @@
|
||||
<!DOCTYPE html><title></title>
|
@ -0,0 +1,114 @@
|
||||
<?php
|
||||
/**
|
||||
* @package Joomla.Administrator
|
||||
* @subpackage com_config
|
||||
*
|
||||
* @copyright Copyright (C) 2005 - 2013 Open Source Matters, Inc. All rights reserved.
|
||||
* @license GNU General Public License version 2 or later; see LICENSE.txt
|
||||
*/
|
||||
|
||||
defined('_JEXEC') or die;
|
||||
|
||||
JHtml::_('behavior.formvalidation');
|
||||
JHtml::_('formbehavior.chosen', 'select');
|
||||
|
||||
?>
|
||||
<script type="text/javascript">
|
||||
Joomla.submitbutton = function(task)
|
||||
{
|
||||
if (task == 'application.cancel' || document.formvalidator.isValid(document.id('application-form'))) {
|
||||
Joomla.submitform(task, document.getElementById('application-form'));
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<form action="<?php echo JRoute::_('index.php?option=com_config'); ?>" id="application-form" method="post" name="adminForm" class="form-validate">
|
||||
<div class="row-fluid">
|
||||
<!-- Begin Sidebar -->
|
||||
<div id="sidebar" class="span2">
|
||||
<div class="sidebar-nav">
|
||||
<?php echo $this->loadTemplate('navigation'); ?>
|
||||
<?php
|
||||
// Display the submenu position modules
|
||||
$this->submenumodules = JModuleHelper::getModules('submenu');
|
||||
foreach ($this->submenumodules as $submenumodule)
|
||||
{
|
||||
$output = JModuleHelper::renderModule($submenumodule);
|
||||
$params = new JRegistry;
|
||||
$params->loadString($submenumodule->params);
|
||||
echo $output;
|
||||
}
|
||||
?>
|
||||
</div>
|
||||
</div>
|
||||
<!-- End Sidebar -->
|
||||
<!-- Begin Content -->
|
||||
<div class="span10">
|
||||
<?php echo JHtml::_('bootstrap.startTabSet', 'myTab', array('active' => 'page-site')); ?>
|
||||
|
||||
<?php echo JHtml::_('bootstrap.addTab', 'myTab', 'page-site', JText::_('JSITE', true)); ?>
|
||||
<div class="row-fluid">
|
||||
<div class="span6">
|
||||
<?php echo $this->loadTemplate('site'); ?>
|
||||
<?php echo $this->loadTemplate('metadata'); ?>
|
||||
</div>
|
||||
<div class="span6">
|
||||
<?php echo $this->loadTemplate('seo'); ?>
|
||||
<?php echo $this->loadTemplate('cookie'); ?>
|
||||
</div>
|
||||
</div>
|
||||
<?php echo JHtml::_('bootstrap.endTab'); ?>
|
||||
|
||||
<?php echo JHtml::_('bootstrap.addTab', 'myTab', 'page-system', JText::_('COM_CONFIG_SYSTEM', true)); ?>
|
||||
<div class="row-fluid">
|
||||
<div class="span6">
|
||||
<?php echo $this->loadTemplate('system'); ?>
|
||||
<?php echo $this->loadTemplate('debug'); ?>
|
||||
</div>
|
||||
<div class="span6">
|
||||
<?php echo $this->loadTemplate('cache'); ?>
|
||||
<?php echo $this->loadTemplate('session'); ?>
|
||||
</div>
|
||||
</div>
|
||||
<?php echo JHtml::_('bootstrap.endTab'); ?>
|
||||
|
||||
<?php echo JHtml::_('bootstrap.addTab', 'myTab', 'page-server', JText::_('COM_CONFIG_SERVER', true)); ?>
|
||||
<div class="row-fluid">
|
||||
<div class="span6">
|
||||
<?php echo $this->loadTemplate('server'); ?>
|
||||
<?php echo $this->loadTemplate('locale'); ?>
|
||||
<?php echo $this->loadTemplate('ftp'); ?>
|
||||
</div>
|
||||
<div class="span6">
|
||||
<?php echo $this->loadTemplate('database'); ?>
|
||||
<?php echo $this->loadTemplate('mail'); ?>
|
||||
</div>
|
||||
</div>
|
||||
<?php echo JHtml::_('bootstrap.endTab'); ?>
|
||||
|
||||
<?php echo JHtml::_('bootstrap.addTab', 'myTab', 'page-permissions', JText::_('COM_CONFIG_PERMISSIONS', true)); ?>
|
||||
<div class="row-fluid">
|
||||
<?php echo $this->loadTemplate('permissions'); ?>
|
||||
</div>
|
||||
<?php echo JHtml::_('bootstrap.endTab'); ?>
|
||||
|
||||
<?php echo JHtml::_('bootstrap.addTab', 'myTab', 'page-filters', JText::_('COM_CONFIG_TEXT_FILTERS', true)); ?>
|
||||
<div class="row-fluid">
|
||||
<?php echo $this->loadTemplate('filters'); ?>
|
||||
</div>
|
||||
<?php echo JHtml::_('bootstrap.endTab'); ?>
|
||||
|
||||
<?php if ($this->ftp) : ?>
|
||||
<?php echo JHtml::_('bootstrap.addTab', 'myTab', 'page-ftp', JText::_('COM_CONFIG_FTP_SETTINGS', true)); ?>
|
||||
<?php echo $this->loadTemplate('ftplogin'); ?>
|
||||
<?php echo JHtml::_('bootstrap.endTab'); ?>
|
||||
<?php endif; ?>
|
||||
|
||||
<?php echo JHtml::_('bootstrap.endTabSet'); ?>
|
||||
|
||||
<input type="hidden" name="task" value="" />
|
||||
<?php echo JHtml::_('form.token'); ?>
|
||||
</div>
|
||||
<!-- End Content -->
|
||||
</div>
|
||||
</form>
|
@ -0,0 +1,23 @@
|
||||
<?php
|
||||
/**
|
||||
* @package Joomla.Administrator
|
||||
* @subpackage com_config
|
||||
*
|
||||
* @copyright Copyright (C) 2005 - 2013 Open Source Matters, Inc. All rights reserved.
|
||||
* @license GNU General Public License version 2 or later; see LICENSE.txt
|
||||
*/
|
||||
|
||||
defined('_JEXEC') or die;
|
||||
|
||||
$this->name = JText::_('COM_CONFIG_CACHE_SETTINGS');
|
||||
$this->fieldsname = 'cache';
|
||||
if (isset($this->data['cache_handler'])
|
||||
&& $this->data['cache_handler'] == 'memcache'
|
||||
|| $this->data['session_handler'] == 'memcache'
|
||||
|| $this->data['cache_handler'] == 'memcached'
|
||||
|| $this->data['session_handler'] == 'memcached'
|
||||
)
|
||||
{
|
||||
$this->fieldsname .= ',memcache';
|
||||
}
|
||||
echo JLayoutHelper::render('joomla.content.options_default', $this);
|
@ -0,0 +1,14 @@
|
||||
<?php
|
||||
/**
|
||||
* @package Joomla.Administrator
|
||||
* @subpackage com_config
|
||||
*
|
||||
* @copyright Copyright (C) 2005 - 2013 Open Source Matters, Inc. All rights reserved.
|
||||
* @license GNU General Public License version 2 or later; see LICENSE.txt
|
||||
*/
|
||||
|
||||
defined('_JEXEC') or die;
|
||||
|
||||
$this->name = JText::_('COM_CONFIG_COOKIE_SETTINGS');
|
||||
$this->fieldsname = 'cookie';
|
||||
echo JLayoutHelper::render('joomla.content.options_default', $this);
|
@ -0,0 +1,14 @@
|
||||
<?php
|
||||
/**
|
||||
* @package Joomla.Administrator
|
||||
* @subpackage com_config
|
||||
*
|
||||
* @copyright Copyright (C) 2005 - 2013 Open Source Matters, Inc. All rights reserved.
|
||||
* @license GNU General Public License version 2 or later; see LICENSE.txt
|
||||
*/
|
||||
|
||||
defined('_JEXEC') or die;
|
||||
|
||||
$this->name = JText::_('COM_CONFIG_DATABASE_SETTINGS');
|
||||
$this->fieldsname = 'database';
|
||||
echo JLayoutHelper::render('joomla.content.options_default', $this);
|
@ -0,0 +1,14 @@
|
||||
<?php
|
||||
/**
|
||||
* @package Joomla.Administrator
|
||||
* @subpackage com_config
|
||||
*
|
||||
* @copyright Copyright (C) 2005 - 2013 Open Source Matters, Inc. All rights reserved.
|
||||
* @license GNU General Public License version 2 or later; see LICENSE.txt
|
||||
*/
|
||||
|
||||
defined('_JEXEC') or die;
|
||||
|
||||
$this->name = JText::_('COM_CONFIG_DEBUG_SETTINGS');
|
||||
$this->fieldsname = 'debug';
|
||||
echo JLayoutHelper::render('joomla.content.options_default', $this);
|
@ -0,0 +1,15 @@
|
||||
<?php
|
||||
/**
|
||||
* @package Joomla.Administrator
|
||||
* @subpackage com_config
|
||||
*
|
||||
* @copyright Copyright (C) 2005 - 2013 Open Source Matters, Inc. All rights reserved.
|
||||
* @license GNU General Public License version 2 or later; see LICENSE.txt
|
||||
*/
|
||||
|
||||
defined('_JEXEC') or die;
|
||||
|
||||
$this->name = JText::_('COM_CONFIG_TEXT_FILTER_SETTINGS');
|
||||
$this->fieldsname = 'filters';
|
||||
$this->description = JText::_('COM_CONFIG_TEXT_FILTERS_DESC');
|
||||
echo JLayoutHelper::render('joomla.content.options_default', $this);
|
@ -0,0 +1,14 @@
|
||||
<?php
|
||||
/**
|
||||
* @package Joomla.Administrator
|
||||
* @subpackage com_config
|
||||
*
|
||||
* @copyright Copyright (C) 2005 - 2013 Open Source Matters, Inc. All rights reserved.
|
||||
* @license GNU General Public License version 2 or later; see LICENSE.txt
|
||||
*/
|
||||
|
||||
defined('_JEXEC') or die;
|
||||
|
||||
$this->name = JText::_('COM_CONFIG_FTP_SETTINGS');
|
||||
$this->fieldsname = 'ftp';
|
||||
echo JLayoutHelper::render('joomla.content.options_default', $this);
|
@ -0,0 +1,30 @@
|
||||
<?php
|
||||
/**
|
||||
* @package Joomla.Administrator
|
||||
* @subpackage com_config
|
||||
*
|
||||
* @copyright Copyright (C) 2005 - 2013 Open Source Matters, Inc. All rights reserved.
|
||||
* @license GNU General Public License version 2 or later; see LICENSE.txt
|
||||
*/
|
||||
|
||||
defined('_JEXEC') or die;
|
||||
?>
|
||||
<fieldset title="<?php echo JText::_('COM_CONFIG_FTP_DETAILS'); ?>" class="form-horizontal">
|
||||
<legend><?php echo JText::_('COM_CONFIG_FTP_DETAILS'); ?></legend>
|
||||
<?php echo JText::_('COM_CONFIG_FTP_DETAILS_TIP'); ?>
|
||||
<?php if ($this->ftp instanceof Exception) : ?>
|
||||
<p><?php echo JText::_($this->ftp->message); ?></p>
|
||||
<?php endif; ?>
|
||||
<div class="control-group">
|
||||
<div class="control-label"><label for="username"><?php echo JText::_('JGLOBAL_USERNAME'); ?></label></div>
|
||||
<div class="controls">
|
||||
<input type="text" id="username" name="username" class="input_box" size="70" value="" />
|
||||
</div>
|
||||
</div>
|
||||
<div class="control-group">
|
||||
<div class="control-label"><?php echo JText::_('JGLOBAL_PASSWORD'); ?></div>
|
||||
<div class="controls">
|
||||
<input type="password" id="password" name="password" class="input_box" size="70" value="" />
|
||||
</div>
|
||||
</div>
|
||||
</fieldset>
|
@ -0,0 +1,14 @@
|
||||
<?php
|
||||
/**
|
||||
* @package Joomla.Administrator
|
||||
* @subpackage com_config
|
||||
*
|
||||
* @copyright Copyright (C) 2005 - 2013 Open Source Matters, Inc. All rights reserved.
|
||||
* @license GNU General Public License version 2 or later; see LICENSE.txt
|
||||
*/
|
||||
|
||||
defined('_JEXEC') or die;
|
||||
|
||||
$this->name = JText::_('COM_CONFIG_LOCATION_SETTINGS');
|
||||
$this->fieldsname = 'locale';
|
||||
echo JLayoutHelper::render('joomla.content.options_default', $this);
|
@ -0,0 +1,14 @@
|
||||
<?php
|
||||
/**
|
||||
* @package Joomla.Administrator
|
||||
* @subpackage com_config
|
||||
*
|
||||
* @copyright Copyright (C) 2005 - 2013 Open Source Matters, Inc. All rights reserved.
|
||||
* @license GNU General Public License version 2 or later; see LICENSE.txt
|
||||
*/
|
||||
|
||||
defined('_JEXEC') or die;
|
||||
|
||||
$this->name = JText::_('COM_CONFIG_MAIL_SETTINGS');
|
||||
$this->fieldsname = 'mail';
|
||||
echo JLayoutHelper::render('joomla.content.options_default', $this);
|
@ -0,0 +1,14 @@
|
||||
<?php
|
||||
/**
|
||||
* @package Joomla.Administrator
|
||||
* @subpackage com_config
|
||||
*
|
||||
* @copyright Copyright (C) 2005 - 2013 Open Source Matters, Inc. All rights reserved.
|
||||
* @license GNU General Public License version 2 or later; see LICENSE.txt
|
||||
*/
|
||||
|
||||
defined('_JEXEC') or die;
|
||||
|
||||
$this->name = JText::_('COM_CONFIG_METADATA_SETTINGS');
|
||||
$this->fieldsname = 'metadata';
|
||||
echo JLayoutHelper::render('joomla.content.options_default', $this);
|
@ -0,0 +1,26 @@
|
||||
<?php
|
||||
/**
|
||||
* @package Joomla.Administrator
|
||||
* @subpackage com_config
|
||||
*
|
||||
* @copyright Copyright (C) 2005 - 2013 Open Source Matters, Inc. All rights reserved.
|
||||
* @license GNU General Public License version 2 or later; see LICENSE.txt
|
||||
*/
|
||||
|
||||
defined('_JEXEC') or die;
|
||||
?>
|
||||
<ul class="nav nav-list">
|
||||
<?php if ($this->userIsSuperAdmin): ?>
|
||||
<li class="nav-header"><?php echo JText::_('COM_CONFIG_SYSTEM'); ?></li>
|
||||
<li class="active">
|
||||
<a href="index.php?option=com_config"><?php echo JText::_('COM_CONFIG_GLOBAL_CONFIGURATION'); ?></a>
|
||||
</li>
|
||||
<li class="divider"></li>
|
||||
<?php endif; ?>
|
||||
<li class="nav-header"><?php echo JText::_('COM_CONFIG_COMPONENT_FIELDSET_LABEL'); ?></li>
|
||||
<?php foreach ($this->components as $component) : ?>
|
||||
<li>
|
||||
<a href="index.php?option=com_config&view=component&component=<?php echo $component; ?>"><?php echo JText::_($component); ?></a>
|
||||
</li>
|
||||
<?php endforeach; ?>
|
||||
</ul>
|
@ -0,0 +1,16 @@
|
||||
<?php
|
||||
/**
|
||||
* @package Joomla.Administrator
|
||||
* @subpackage com_config
|
||||
*
|
||||
* @copyright Copyright (C) 2005 - 2013 Open Source Matters, Inc. All rights reserved.
|
||||
* @license GNU General Public License version 2 or later; see LICENSE.txt
|
||||
*/
|
||||
|
||||
defined('_JEXEC') or die;
|
||||
|
||||
$this->name = JText::_('COM_CONFIG_PERMISSION_SETTINGS');
|
||||
$this->fieldsname = 'permissions';
|
||||
$this->formclass = 'form-vertical';
|
||||
$this->showlabel = false;
|
||||
echo JLayoutHelper::render('joomla.content.options_default', $this);
|
@ -0,0 +1,14 @@
|
||||
<?php
|
||||
/**
|
||||
* @package Joomla.Administrator
|
||||
* @subpackage com_config
|
||||
*
|
||||
* @copyright Copyright (C) 2005 - 2013 Open Source Matters, Inc. All rights reserved.
|
||||
* @license GNU General Public License version 2 or later; see LICENSE.txt
|
||||
*/
|
||||
|
||||
defined('_JEXEC') or die;
|
||||
|
||||
$this->name = JText::_('COM_CONFIG_SEO_SETTINGS');
|
||||
$this->fieldsname = 'seo';
|
||||
echo JLayoutHelper::render('joomla.content.options_default', $this);
|
@ -0,0 +1,14 @@
|
||||
<?php
|
||||
/**
|
||||
* @package Joomla.Administrator
|
||||
* @subpackage com_config
|
||||
*
|
||||
* @copyright Copyright (C) 2005 - 2013 Open Source Matters, Inc. All rights reserved.
|
||||
* @license GNU General Public License version 2 or later; see LICENSE.txt
|
||||
*/
|
||||
|
||||
defined('_JEXEC') or die;
|
||||
|
||||
$this->name = JText::_('COM_CONFIG_SERVER_SETTINGS');
|
||||
$this->fieldsname = 'server';
|
||||
echo JLayoutHelper::render('joomla.content.options_default', $this);
|
@ -0,0 +1,14 @@
|
||||
<?php
|
||||
/**
|
||||
* @package Joomla.Administrator
|
||||
* @subpackage com_config
|
||||
*
|
||||
* @copyright Copyright (C) 2005 - 2013 Open Source Matters, Inc. All rights reserved.
|
||||
* @license GNU General Public License version 2 or later; see LICENSE.txt
|
||||
*/
|
||||
|
||||
defined('_JEXEC') or die;
|
||||
|
||||
$this->name = JText::_('COM_CONFIG_SESSION_SETTINGS');
|
||||
$this->fieldsname = 'session';
|
||||
echo JLayoutHelper::render('joomla.content.options_default', $this);
|
@ -0,0 +1,14 @@
|
||||
<?php
|
||||
/**
|
||||
* @package Joomla.Administrator
|
||||
* @subpackage com_config
|
||||
*
|
||||
* @copyright Copyright (C) 2005 - 2013 Open Source Matters, Inc. All rights reserved.
|
||||
* @license GNU General Public License version 2 or later; see LICENSE.txt
|
||||
*/
|
||||
|
||||
defined('_JEXEC') or die;
|
||||
|
||||
$this->name = JText::_('COM_CONFIG_SITE_SETTINGS');
|
||||
$this->fieldsname = 'site';
|
||||
echo JLayoutHelper::render('joomla.content.options_default', $this);
|
@ -0,0 +1,14 @@
|
||||
<?php
|
||||
/**
|
||||
* @package Joomla.Administrator
|
||||
* @subpackage com_config
|
||||
*
|
||||
* @copyright Copyright (C) 2005 - 2013 Open Source Matters, Inc. All rights reserved.
|
||||
* @license GNU General Public License version 2 or later; see LICENSE.txt
|
||||
*/
|
||||
|
||||
defined('_JEXEC') or die;
|
||||
|
||||
$this->name = JText::_('COM_CONFIG_SYSTEM_SETTINGS');
|
||||
$this->fieldsname = 'system';
|
||||
echo JLayoutHelper::render('joomla.content.options_default', $this);
|
@ -0,0 +1 @@
|
||||
<!DOCTYPE html><title></title>
|
@ -0,0 +1,90 @@
|
||||
<?php
|
||||
/**
|
||||
* @package Joomla.Administrator
|
||||
* @subpackage com_config
|
||||
*
|
||||
* @copyright Copyright (C) 2005 - 2013 Open Source Matters, Inc. All rights reserved.
|
||||
* @license GNU General Public License version 2 or later; see LICENSE.txt
|
||||
*/
|
||||
|
||||
defined('_JEXEC') or die;
|
||||
|
||||
require_once dirname(dirname(__DIR__)) . '/helper/component.php';
|
||||
|
||||
/**
|
||||
* View for the global configuration
|
||||
*
|
||||
* @package Joomla.Administrator
|
||||
* @subpackage com_config
|
||||
* @since 1.5
|
||||
*/
|
||||
class ConfigViewApplication extends JViewLegacy
|
||||
{
|
||||
public $state;
|
||||
|
||||
public $form;
|
||||
|
||||
public $data;
|
||||
|
||||
/**
|
||||
* Method to display the view.
|
||||
*/
|
||||
public function display($tpl = null)
|
||||
{
|
||||
$form = $this->get('Form');
|
||||
$data = $this->get('Data');
|
||||
$user = JFactory::getUser();
|
||||
|
||||
// Check for model errors.
|
||||
if ($errors = $this->get('Errors'))
|
||||
{
|
||||
JError::raiseError(500, implode('<br />', $errors));
|
||||
return false;
|
||||
}
|
||||
|
||||
// Bind the form to the data.
|
||||
if ($form && $data)
|
||||
{
|
||||
$form->bind($data);
|
||||
}
|
||||
|
||||
// Get the params for com_users.
|
||||
$usersParams = JComponentHelper::getParams('com_users');
|
||||
|
||||
// Get the params for com_media.
|
||||
$mediaParams = JComponentHelper::getParams('com_media');
|
||||
|
||||
// Load settings for the FTP layer.
|
||||
$ftp = JClientHelper::setCredentialsFromRequest('ftp');
|
||||
|
||||
$this->form = &$form;
|
||||
$this->data = &$data;
|
||||
$this->ftp = &$ftp;
|
||||
$this->usersParams = &$usersParams;
|
||||
$this->mediaParams = &$mediaParams;
|
||||
|
||||
$this->components = ConfigHelperComponent::getComponentsWithConfig();
|
||||
ConfigHelperComponent::loadLanguageForComponents($this->components);
|
||||
|
||||
$this->userIsSuperAdmin = $user->authorise('core.admin');
|
||||
|
||||
$this->addToolbar();
|
||||
parent::display($tpl);
|
||||
}
|
||||
|
||||
/**
|
||||
* Add the page title and toolbar.
|
||||
*
|
||||
* @since 1.6
|
||||
*/
|
||||
protected function addToolbar()
|
||||
{
|
||||
JToolbarHelper::title(JText::_('COM_CONFIG_GLOBAL_CONFIGURATION'), 'config.png');
|
||||
JToolbarHelper::apply('application.apply');
|
||||
JToolbarHelper::save('application.save');
|
||||
JToolbarHelper::divider();
|
||||
JToolbarHelper::cancel('application.cancel');
|
||||
JToolbarHelper::divider();
|
||||
JToolbarHelper::help('JHELP_SITE_GLOBAL_CONFIGURATION');
|
||||
}
|
||||
}
|
@ -0,0 +1 @@
|
||||
<!DOCTYPE html><title></title>
|
@ -0,0 +1,32 @@
|
||||
<?php
|
||||
/**
|
||||
* @package Joomla.Administrator
|
||||
* @subpackage com_config
|
||||
*
|
||||
* @copyright Copyright (C) 2005 - 2013 Open Source Matters, Inc. All rights reserved.
|
||||
* @license GNU General Public License version 2 or later; see LICENSE.txt
|
||||
*/
|
||||
|
||||
defined('_JEXEC') or die;
|
||||
|
||||
/**
|
||||
* This view is displayed after successfull saving of config data.
|
||||
* Use it to show a message informing about success or simply close a modal window.
|
||||
*
|
||||
* @package Joomla.Administrator
|
||||
* @subpackage com_config
|
||||
*/
|
||||
class ConfigViewClose extends JViewLegacy
|
||||
{
|
||||
/**
|
||||
* Display the view
|
||||
*/
|
||||
public function display($tpl = null)
|
||||
{
|
||||
// close a modal window
|
||||
JFactory::getDocument()->addScriptDeclaration('
|
||||
window.parent.location.href=window.parent.location.href;
|
||||
window.parent.SqueezeBox.close();
|
||||
');
|
||||
}
|
||||
}
|
@ -0,0 +1 @@
|
||||
<!DOCTYPE html><title></title>
|
@ -0,0 +1,77 @@
|
||||
<?php
|
||||
/**
|
||||
* @package Joomla.Administrator
|
||||
* @subpackage com_config
|
||||
*
|
||||
* @copyright Copyright (C) 2005 - 2013 Open Source Matters, Inc. All rights reserved.
|
||||
* @license GNU General Public License version 2 or later; see LICENSE.txt
|
||||
*/
|
||||
|
||||
defined('_JEXEC') or die;
|
||||
|
||||
$app = JFactory::getApplication();
|
||||
$template = $app->getTemplate();
|
||||
|
||||
JHtml::_('behavior.formvalidation');
|
||||
JHtml::_('formbehavior.chosen', 'select');
|
||||
?>
|
||||
<script type="text/javascript">
|
||||
Joomla.submitbutton = function(task)
|
||||
{
|
||||
if (document.formvalidator.isValid(document.id('component-form'))) {
|
||||
Joomla.submitform(task, document.getElementById('component-form'));
|
||||
}
|
||||
}
|
||||
</script>
|
||||
<form action="<?php echo JRoute::_('index.php?option=com_config'); ?>" id="component-form" method="post" name="adminForm" autocomplete="off" class="form-validate form-horizontal">
|
||||
<div class="row-fluid">
|
||||
<!-- Begin Sidebar -->
|
||||
<div id="sidebar" class="span2">
|
||||
<div class="sidebar-nav">
|
||||
<?php echo $this->loadTemplate('navigation'); ?>
|
||||
</div>
|
||||
</div>
|
||||
<!-- End Sidebar -->
|
||||
<div class="span10">
|
||||
<ul class="nav nav-tabs" id="configTabs">
|
||||
<?php $fieldSets = $this->form->getFieldsets(); ?>
|
||||
<?php foreach ($fieldSets as $name => $fieldSet) : ?>
|
||||
<?php $label = empty($fieldSet->label) ? 'COM_CONFIG_' . $name . '_FIELDSET_LABEL' : $fieldSet->label; ?>
|
||||
<li><a href="#<?php echo $name; ?>" data-toggle="tab"><?php echo JText::_($label); ?></a></li>
|
||||
<?php endforeach; ?>
|
||||
</ul>
|
||||
<div class="tab-content">
|
||||
<?php $fieldSets = $this->form->getFieldsets(); ?>
|
||||
<?php foreach ($fieldSets as $name => $fieldSet) : ?>
|
||||
<div class="tab-pane" id="<?php echo $name; ?>">
|
||||
<?php if (isset($fieldSet->description) && !empty($fieldSet->description)) : ?>
|
||||
<p class="tab-description"><?php echo JText::_($fieldSet->description); ?></p>
|
||||
<?php endif; ?>
|
||||
<?php foreach ($this->form->getFieldset($name) as $field): ?>
|
||||
<div class="control-group">
|
||||
<?php if (!$field->hidden && $name != "permissions") : ?>
|
||||
<div class="control-label">
|
||||
<?php echo $field->label; ?>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
<div class="<?php if ($name != "permissions") : ?>controls<?php endif; ?>">
|
||||
<?php echo $field->input; ?>
|
||||
</div>
|
||||
</div>
|
||||
<?php endforeach; ?>
|
||||
</div>
|
||||
<?php endforeach; ?>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div>
|
||||
<input type="hidden" name="id" value="<?php echo $this->component->id; ?>" />
|
||||
<input type="hidden" name="component" value="<?php echo $this->component->option; ?>" />
|
||||
<input type="hidden" name="return" value="<?php echo $this->return; ?>" />
|
||||
<input type="hidden" name="task" value="" />
|
||||
<?php echo JHtml::_('form.token'); ?>
|
||||
</div>
|
||||
</form>
|
||||
<script type="text/javascript">
|
||||
jQuery('#configTabs a:first').tab('show'); // Select first tab
|
||||
</script>
|
@ -0,0 +1,31 @@
|
||||
<?php
|
||||
/**
|
||||
* @package Joomla.Administrator
|
||||
* @subpackage com_config
|
||||
*
|
||||
* @copyright Copyright (C) 2005 - 2013 Open Source Matters, Inc. All rights reserved.
|
||||
* @license GNU General Public License version 2 or later; see LICENSE.txt
|
||||
*/
|
||||
|
||||
defined('_JEXEC') or die;
|
||||
?>
|
||||
<ul class="nav nav-list">
|
||||
<?php if ($this->userIsSuperAdmin): ?>
|
||||
<li class="nav-header"><?php echo JText::_('COM_CONFIG_SYSTEM'); ?></li>
|
||||
<li><a href="index.php?option=com_config"><?php echo JText::_('COM_CONFIG_GLOBAL_CONFIGURATION'); ?></a></li>
|
||||
<li class="divider"></li>
|
||||
<?php endif; ?>
|
||||
<li class="nav-header"><?php echo JText::_('COM_CONFIG_COMPONENT_FIELDSET_LABEL'); ?></li>
|
||||
<?php foreach ($this->components as $component) : ?>
|
||||
<?php
|
||||
$active = '';
|
||||
if ($this->currentComponent === $component)
|
||||
{
|
||||
$active = ' class="active"';
|
||||
}
|
||||
?>
|
||||
<li<?php echo $active; ?>>
|
||||
<a href="index.php?option=com_config&view=component&component=<?php echo $component; ?>"><?php echo JText::_($component); ?></a>
|
||||
</li>
|
||||
<?php endforeach; ?>
|
||||
</ul>
|
@ -0,0 +1 @@
|
||||
<!DOCTYPE html><title></title>
|
@ -0,0 +1,121 @@
|
||||
<?php
|
||||
/**
|
||||
* @package Joomla.Administrator
|
||||
* @subpackage com_config
|
||||
*
|
||||
* @copyright Copyright (C) 2005 - 2013 Open Source Matters, Inc. All rights reserved.
|
||||
* @license GNU General Public License version 2 or later; see LICENSE.txt
|
||||
*/
|
||||
|
||||
defined('_JEXEC') or die;
|
||||
|
||||
require_once dirname(dirname(__DIR__)) . '/helper/component.php';
|
||||
|
||||
/**
|
||||
* View for the component configuration
|
||||
*
|
||||
* @package Joomla.Administrator
|
||||
* @subpackage com_config
|
||||
* @since 1.5
|
||||
*/
|
||||
class ConfigViewComponent extends JViewLegacy
|
||||
{
|
||||
/**
|
||||
* Associates the options screen help key with the component name.
|
||||
*
|
||||
* @var array
|
||||
* @since 3.1
|
||||
*/
|
||||
protected $helpScreenArray = array(
|
||||
'com_banners' => 'JHELP_COMPONENTS_BANNER_MANAGER_OPTIONS',
|
||||
'com_cache' => 'JHELP_COMPONENTS_CACHE_MANAGER_SETTINGS',
|
||||
'com_checkin' => 'JHELP_COMPONENTS_CHECK-IN_CONFIGURATION',
|
||||
'com_contact' => 'JHELP_COMPONENTS_CONTACT_MANAGER_OPTIONS',
|
||||
'com_content' => 'JHELP_COMPONENTS_ARTICLE_MANAGER_OPTIONS',
|
||||
'com_finder' => 'JHELP_COMPONENTS_SMART_SEARCH_CONFIGURATION',
|
||||
'com_installer' => 'JHELP_COMPONENTS_INSTALLER_CONFIGURATION',
|
||||
'com_joomlaupdate' => 'JHELP_COMPONENTS_JOOMLA_UPDATE_CONFIGURATION',
|
||||
'com_languages' => 'JHELP_COMPONENTS_LANGUAGE_MANAGER_OPTIONS',
|
||||
'com_media' => 'JHELP_COMPONENTS_MEDIA_MANAGER_OPTIONS',
|
||||
'com_menus' => 'JHELP_COMPONENTS_MENUS_CONFIGURATION',
|
||||
'com_messages' => 'JHELP_COMPONENTS_MESSAGES_CONFIGURATION',
|
||||
'com_modules' => 'JHELP_COMPONENTS_MODULE_MANAGER_OPTIONS',
|
||||
'com_newsfeeds' => 'JHELP_COMPONENTS_NEWS_FEED_MANAGER_OPTIONS',
|
||||
'com_plugins' => 'JHELP_COMPONENTS_PLUG-IN_MANAGER_OPTIONS',
|
||||
'com_redirect' => 'JHELP_COMPONENTS_REDIRECT_MANAGER_OPTIONS',
|
||||
'com_search' => 'JHELP_COMPONENTS_SEARCH_MANAGER_OPTIONS',
|
||||
'com_tags' => 'JHELP_COMPONENTS_TAGS_MANAGER_OPTIONS',
|
||||
'com_templates' => 'JHELP_COMPONENTS_TEMPLATE_MANAGER_OPTIONS',
|
||||
'com_users' => 'JHELP_COMPONENTS_USERS_CONFIGURATION',
|
||||
'com_weblinks' => 'JHELP_COMPONENTS_WEB_LINKS_MANAGER_OPTIONS',
|
||||
);
|
||||
|
||||
/**
|
||||
* Execute and display a template script.
|
||||
*
|
||||
* @param string $tpl The name of the template file to parse; automatically searches through the template paths.
|
||||
*
|
||||
* @return mixed A string if successful, otherwise a Error object.
|
||||
*
|
||||
* @since 1.5
|
||||
*/
|
||||
public function display($tpl = null)
|
||||
{
|
||||
$form = $this->get('Form');
|
||||
$component = $this->get('Component');
|
||||
$user = JFactory::getUser();
|
||||
$app = JFactory::getApplication();
|
||||
|
||||
// Check for errors.
|
||||
if (count($errors = $this->get('Errors')))
|
||||
{
|
||||
JError::raiseError(500, implode("\n", $errors));
|
||||
return false;
|
||||
}
|
||||
|
||||
// Bind the form to the data.
|
||||
if ($form && $component->params)
|
||||
{
|
||||
$form->bind($component->params);
|
||||
}
|
||||
|
||||
$this->form = &$form;
|
||||
$this->component = &$component;
|
||||
|
||||
$this->components = ConfigHelperComponent::getComponentsWithConfig();
|
||||
ConfigHelperComponent::loadLanguageForComponents($this->components);
|
||||
|
||||
$this->userIsSuperAdmin = $user->authorise('core.admin');
|
||||
$this->currentComponent = JFactory::getApplication()->input->get('component');
|
||||
$this->return = $app->input->get('return', '', 'base64');
|
||||
|
||||
$this->addToolbar();
|
||||
parent::display($tpl);
|
||||
$app->input->set('hidemainmenu', true);
|
||||
}
|
||||
|
||||
/**
|
||||
* Add the page title and toolbar.
|
||||
*
|
||||
* @since 3.0
|
||||
*/
|
||||
protected function addToolbar()
|
||||
{
|
||||
JToolbarHelper::title(JText::_($this->component->option . '_configuration'), 'config.png');
|
||||
JToolbarHelper::apply('component.apply');
|
||||
JToolbarHelper::save('component.save');
|
||||
JToolbarHelper::divider();
|
||||
JToolbarHelper::cancel('component.cancel');
|
||||
JToolbarHelper::divider();
|
||||
|
||||
// Get the correct help key for this screen
|
||||
if (isset($this->helpScreenArray[$this->component->option]))
|
||||
{
|
||||
JToolbarHelper::help($this->helpScreenArray[$this->component->option]);
|
||||
}
|
||||
else
|
||||
{
|
||||
JToolbarHelper::help('JHELP_SITE_GLOBAL_CONFIGURATION');
|
||||
}
|
||||
}
|
||||
}
|
1
administrator/components/com_config/views/index.html
Normal file
1
administrator/components/com_config/views/index.html
Normal file
@ -0,0 +1 @@
|
||||
<!DOCTYPE html><title></title>
|
Reference in New Issue
Block a user