Added the [Run Expansion] button option for faster compile and install option of selected components.

This commit is contained in:
Llewellyn van der Merwe 2018-09-20 21:17:07 +02:00
parent b208f4f616
commit e71ba204ca
No known key found for this signature in database
GPG Key ID: CAD7B16D27AF28C5
26 changed files with 530 additions and 47 deletions

View File

@ -129,7 +129,7 @@ Watch the [proposed development workflow](https://vdm.bz/proposed-development-wo
+ *Version*: 2.9.1
+ *Copyright*: Copyright (C) 2015 - 2018 Vast Development Method. All rights reserved.
+ *License*: GNU General Public License version 2 or later; see LICENSE.txt
+ *Line count*: **193303**
+ *Line count*: **193777**
+ *Field count*: **1081**
+ *File count*: **1273**
+ *Folder count*: **201**

View File

@ -129,7 +129,7 @@ Watch the [proposed development workflow](https://vdm.bz/proposed-development-wo
+ *Version*: 2.9.1
+ *Copyright*: Copyright (C) 2015 - 2018 Vast Development Method. All rights reserved.
+ *License*: GNU General Public License version 2 or later; see LICENSE.txt
+ *Line count*: **193303**
+ *Line count*: **193777**
+ *Field count*: **1081**
+ *File count*: **1273**
+ *Folder count*: **201**

View File

@ -15,6 +15,7 @@
<action name="core.edit.own" title="JACTION_EDITOWN" description="JACTION_EDITOWN_COMPONENT_DESC" />
<action name="core.edit.created_by" title="COM_COMPONENTBUILDER_EDIT_CREATED_BY" description="COM_COMPONENTBUILDER_EDIT_CREATED_BY_DESC" />
<action name="core.edit.created" title="COM_COMPONENTBUILDER_EDIT_CREATED_DATE" description="COM_COMPONENTBUILDER_EDIT_CREATED_DATE_DESC" />
<action name="admin_view.run_expansion" title="COM_COMPONENTBUILDER_ADMIN_VIEW_RUN_EXPANSION_BUTTON_ACCESS" description="COM_COMPONENTBUILDER_ADMIN_VIEW_RUN_EXPANSION_BUTTON_ACCESS_DESC" />
<action name="admin_view.access" title="COM_COMPONENTBUILDER_ADMIN_VIEWS_ACCESS" description="COM_COMPONENTBUILDER_ADMIN_VIEWS_ACCESS_DESC" />
<action name="admin_view.batch" title="COM_COMPONENTBUILDER_ADMIN_VIEWS_BATCH_USE" description="COM_COMPONENTBUILDER_ADMIN_VIEWS_BATCH_USE_DESC" />
<action name="admin_view.create" title="COM_COMPONENTBUILDER_ADMIN_VIEWS_CREATE" description="COM_COMPONENTBUILDER_ADMIN_VIEWS_CREATE_DESC" />
@ -73,6 +74,7 @@
<action name="compiler.access" title="COM_COMPONENTBUILDER_COMPILER_ACCESS" description="COM_COMPONENTBUILDER_COMPILER_ACCESS_DESC" />
<action name="compiler.clear_tmp" title="COM_COMPONENTBUILDER_COMPILER_CLEAR_TMP_BUTTON_ACCESS" description="COM_COMPONENTBUILDER_COMPILER_CLEAR_TMP_BUTTON_ACCESS_DESC" />
<action name="compiler.dashboard_list" title="COM_COMPONENTBUILDER_COMPILER_DASHBOARD_LIST" description="COM_COMPONENTBUILDER_COMPILER_DASHBOARD_LIST_DESC" />
<action name="compiler.run_expansion" title="COM_COMPONENTBUILDER_COMPILER_RUN_EXPANSION_BUTTON_ACCESS" description="COM_COMPONENTBUILDER_COMPILER_RUN_EXPANSION_BUTTON_ACCESS_DESC" />
<action name="compiler.submenu" title="COM_COMPONENTBUILDER_COMPILER_SUBMENU" description="COM_COMPONENTBUILDER_COMPILER_SUBMENU_DESC" />
<action name="component_admin_views.access" title="COM_COMPONENTBUILDER_COMPONENTS_ADMIN_VIEWS_ACCESS" description="COM_COMPONENTBUILDER_COMPONENTS_ADMIN_VIEWS_ACCESS_DESC" />
<action name="component_admin_views.batch" title="COM_COMPONENTBUILDER_COMPONENTS_ADMIN_VIEWS_BATCH_USE" description="COM_COMPONENTBUILDER_COMPONENTS_ADMIN_VIEWS_BATCH_USE_DESC" />
@ -173,6 +175,7 @@
<action name="custom_admin_view.export" title="COM_COMPONENTBUILDER_CUSTOM_ADMIN_VIEWS_EXPORT" description="COM_COMPONENTBUILDER_CUSTOM_ADMIN_VIEWS_EXPORT_DESC" />
<action name="custom_admin_view.import" title="COM_COMPONENTBUILDER_CUSTOM_ADMIN_VIEWS_IMPORT" description="COM_COMPONENTBUILDER_CUSTOM_ADMIN_VIEWS_IMPORT_DESC" />
<action name="custom_admin_view.submenu" title="COM_COMPONENTBUILDER_CUSTOM_ADMIN_VIEWS_SUBMENU" description="COM_COMPONENTBUILDER_CUSTOM_ADMIN_VIEWS_SUBMENU_DESC" />
<action name="custom_code.run_expansion" title="COM_COMPONENTBUILDER_CUSTOM_CODE_RUN_EXPANSION_BUTTON_ACCESS" description="COM_COMPONENTBUILDER_CUSTOM_CODE_RUN_EXPANSION_BUTTON_ACCESS_DESC" />
<action name="custom_code.access" title="COM_COMPONENTBUILDER_CUSTOM_CODES_ACCESS" description="COM_COMPONENTBUILDER_CUSTOM_CODES_ACCESS_DESC" />
<action name="custom_code.batch" title="COM_COMPONENTBUILDER_CUSTOM_CODES_BATCH_USE" description="COM_COMPONENTBUILDER_CUSTOM_CODES_BATCH_USE_DESC" />
<action name="custom_code.create" title="COM_COMPONENTBUILDER_CUSTOM_CODES_CREATE" description="COM_COMPONENTBUILDER_CUSTOM_CODES_CREATE_DESC" />
@ -187,6 +190,7 @@
<action name="custom_code.export" title="COM_COMPONENTBUILDER_CUSTOM_CODES_EXPORT" description="COM_COMPONENTBUILDER_CUSTOM_CODES_EXPORT_DESC" />
<action name="custom_code.import" title="COM_COMPONENTBUILDER_CUSTOM_CODES_IMPORT" description="COM_COMPONENTBUILDER_CUSTOM_CODES_IMPORT_DESC" />
<action name="custom_code.submenu" title="COM_COMPONENTBUILDER_CUSTOM_CODES_SUBMENU" description="COM_COMPONENTBUILDER_CUSTOM_CODES_SUBMENU_DESC" />
<action name="dynamic_get.run_expansion" title="COM_COMPONENTBUILDER_DYNAMIC_GET_RUN_EXPANSION_BUTTON_ACCESS" description="COM_COMPONENTBUILDER_DYNAMIC_GET_RUN_EXPANSION_BUTTON_ACCESS_DESC" />
<action name="dynamic_get.access" title="COM_COMPONENTBUILDER_DYNAMIC_GETS_ACCESS" description="COM_COMPONENTBUILDER_DYNAMIC_GETS_ACCESS_DESC" />
<action name="dynamic_get.batch" title="COM_COMPONENTBUILDER_DYNAMIC_GETS_BATCH_USE" description="COM_COMPONENTBUILDER_DYNAMIC_GETS_BATCH_USE_DESC" />
<action name="dynamic_get.create" title="COM_COMPONENTBUILDER_DYNAMIC_GETS_CREATE" description="COM_COMPONENTBUILDER_DYNAMIC_GETS_CREATE_DESC" />
@ -200,6 +204,7 @@
<action name="dynamic_get.export" title="COM_COMPONENTBUILDER_DYNAMIC_GETS_EXPORT" description="COM_COMPONENTBUILDER_DYNAMIC_GETS_EXPORT_DESC" />
<action name="dynamic_get.import" title="COM_COMPONENTBUILDER_DYNAMIC_GETS_IMPORT" description="COM_COMPONENTBUILDER_DYNAMIC_GETS_IMPORT_DESC" />
<action name="dynamic_get.submenu" title="COM_COMPONENTBUILDER_DYNAMIC_GETS_SUBMENU" description="COM_COMPONENTBUILDER_DYNAMIC_GETS_SUBMENU_DESC" />
<action name="field.run_expansion" title="COM_COMPONENTBUILDER_FIELD_RUN_EXPANSION_BUTTON_ACCESS" description="COM_COMPONENTBUILDER_FIELD_RUN_EXPANSION_BUTTON_ACCESS_DESC" />
<action name="field.access" title="COM_COMPONENTBUILDER_FIELDS_ACCESS" description="COM_COMPONENTBUILDER_FIELDS_ACCESS_DESC" />
<action name="field.batch" title="COM_COMPONENTBUILDER_FIELDS_BATCH_USE" description="COM_COMPONENTBUILDER_FIELDS_BATCH_USE_DESC" />
<action name="field.create" title="COM_COMPONENTBUILDER_FIELDS_CREATE" description="COM_COMPONENTBUILDER_FIELDS_CREATE_DESC" />
@ -252,9 +257,11 @@
<action name="help_document.import" title="COM_COMPONENTBUILDER_HELP_DOCUMENTS_IMPORT" description="COM_COMPONENTBUILDER_HELP_DOCUMENTS_IMPORT_DESC" />
<action name="help_document.submenu" title="COM_COMPONENTBUILDER_HELP_DOCUMENTS_SUBMENU" description="COM_COMPONENTBUILDER_HELP_DOCUMENTS_SUBMENU_DESC" />
<action name="joomla_component.backup" title="COM_COMPONENTBUILDER_JOOMLA_COMPONENT_BACKUP_BUTTON_ACCESS" description="COM_COMPONENTBUILDER_JOOMLA_COMPONENT_BACKUP_BUTTON_ACCESS_DESC" />
<action name="joomla_component.clear_tmp" title="COM_COMPONENTBUILDER_JOOMLA_COMPONENT_CLEAR_TMP_BUTTON_ACCESS" description="COM_COMPONENTBUILDER_JOOMLA_COMPONENT_CLEAR_TMP_BUTTON_ACCESS_DESC" />
<action name="joomla_component.clone" title="COM_COMPONENTBUILDER_JOOMLA_COMPONENT_CLONE_BUTTON_ACCESS" description="COM_COMPONENTBUILDER_JOOMLA_COMPONENT_CLONE_BUTTON_ACCESS_DESC" />
<action name="joomla_component.export_jcb_packages" title="COM_COMPONENTBUILDER_JOOMLA_COMPONENT_EXPORT_JCB_PACKAGES_BUTTON_ACCESS" description="COM_COMPONENTBUILDER_JOOMLA_COMPONENT_EXPORT_JCB_PACKAGES_BUTTON_ACCESS_DESC" />
<action name="joomla_component.import_jcb_packages" title="COM_COMPONENTBUILDER_JOOMLA_COMPONENT_IMPORT_JCB_PACKAGES_BUTTON_ACCESS" description="COM_COMPONENTBUILDER_JOOMLA_COMPONENT_IMPORT_JCB_PACKAGES_BUTTON_ACCESS_DESC" />
<action name="joomla_component.run_expansion" title="COM_COMPONENTBUILDER_JOOMLA_COMPONENT_RUN_EXPANSION_BUTTON_ACCESS" description="COM_COMPONENTBUILDER_JOOMLA_COMPONENT_RUN_EXPANSION_BUTTON_ACCESS_DESC" />
<action name="joomla_component.access" title="COM_COMPONENTBUILDER_JOOMLA_COMPONENTS_ACCESS" description="COM_COMPONENTBUILDER_JOOMLA_COMPONENTS_ACCESS_DESC" />
<action name="joomla_component.batch" title="COM_COMPONENTBUILDER_JOOMLA_COMPONENTS_BATCH_USE" description="COM_COMPONENTBUILDER_JOOMLA_COMPONENTS_BATCH_USE_DESC" />
<action name="joomla_component.create" title="COM_COMPONENTBUILDER_JOOMLA_COMPONENTS_CREATE" description="COM_COMPONENTBUILDER_JOOMLA_COMPONENTS_CREATE_DESC" />

View File

@ -688,9 +688,9 @@
COM_COMPONENTBUILDER_CONFIG_EXPANSION</option>
</field>
<!-- Note_development_method_default Field. Type: Note. A None Database Field. (joomla) -->
<field type="note" name="note_development_method_default" label="COM_COMPONENTBUILDER_CONFIG_NOTE_DEVELOPMENT_METHOD_DEFAULT_LABEL" description="COM_COMPONENTBUILDER_CONFIG_NOTE_DEVELOPMENT_METHOD_DEFAULT_DESCRIPTION" heading="h4" class="alert alert-info note_development_method_default" showon="development_method:1" />
<field type="note" name="note_development_method_default" label="COM_COMPONENTBUILDER_CONFIG_NOTE_DEVELOPMENT_METHOD_DEFAULT_LABEL" description="COM_COMPONENTBUILDER_CONFIG_NOTE_DEVELOPMENT_METHOD_DEFAULT_DESCRIPTION" heading="h2" class="alert alert-info note_development_method_default" showon="development_method:1" />
<!-- Note_development_method_expansion Field. Type: Note. A None Database Field. (joomla) -->
<field type="note" name="note_development_method_expansion" label="COM_COMPONENTBUILDER_CONFIG_NOTE_DEVELOPMENT_METHOD_EXPANSION_LABEL" description="COM_COMPONENTBUILDER_CONFIG_NOTE_DEVELOPMENT_METHOD_EXPANSION_DESCRIPTION" heading="h4" class="alert alert-info note_development_method_expansion" showon="development_method:2" />
<field type="note" name="note_development_method_expansion" label="COM_COMPONENTBUILDER_CONFIG_NOTE_DEVELOPMENT_METHOD_EXPANSION_LABEL" description="COM_COMPONENTBUILDER_CONFIG_NOTE_DEVELOPMENT_METHOD_EXPANSION_DESCRIPTION" heading="h2" class="alert alert-info note_development_method_expansion" showon="development_method:2" />
<!-- Expansion Field. Type: Subform. (joomla) -->
<field
type="subform"

View File

@ -102,5 +102,46 @@ class ComponentbuilderControllerAdmin_views extends JControllerAdmin
$message = JText::_('COM_COMPONENTBUILDER_IMPORT_FAILED');
$this->setRedirect(JRoute::_('index.php?option=com_componentbuilder&view=admin_views', false), $message, 'error');
return;
}
/**
* Run the Expansion
*
* @return void
*/
public function runExpansion()
{
// Check for request forgeries
JSession::checkToken() or jexit(JText::_('JINVALID_TOKEN'));
// check if user has the right
$user = JFactory::getUser();
// set page redirect
$redirect_url = JRoute::_('index.php?option=com_componentbuilder&view=admin_views', false);
// set massage
$message = JText::_('COM_COMPONENTBUILDER_YOU_DO_NOT_HAVE_PERMISSION_TO_RUN_THE_EXPANSION_MODULE');
// check if this user has the right to run expansion
if($user->authorise('compiler.run_expansion', 'com_componentbuilder'))
{
// set massage
$message = JText::_('COM_COMPONENTBUILDER_EXPANSION_FAILED_PLEASE_CHECK_YOUR_SETTINGS_IN_THE_GLOBAL_OPTIONS_OF_JCB_UNDER_THE_DEVELOPMENT_METHOD_TAB');
// run expansion via API
$result = ComponentbuilderHelper::getFileContents(JURI::root() . 'index.php?option=com_componentbuilder&task=api.expand');
// is there a message returned
if (!is_numeric($result) && ComponentbuilderHelper::checkString($result))
{
$this->setRedirect($redirect_url, $result);
return true;
}
elseif (is_numeric($result) && 1 == $result)
{
$message = JText::_('COM_COMPONENTBUILDER_BTHE_EXPANSION_WAS_SUCCESSFULLYB_TO_SEE_MORE_INFORMATION_CHANGE_THE_BRETURN_OPTIONS_FOR_BUILDB_TO_BDISPLAY_MESSAGEB_IN_THE_GLOBAL_OPTIONS_OF_JCB_UNDER_THE_DEVELOPMENT_METHOD_TABB');
$this->setRedirect($redirect_url, $message, 'message');
return true;
}
}
$this->setRedirect($redirect_url, $message, 'error');
return false;
}
}

View File

@ -35,11 +35,84 @@ class ComponentbuilderControllerCompiler extends JControllerAdmin
return;
}
/**
* Import an spreadsheet.
* Run the Expansion
*
* @return void
*/
public function runExpansion()
{
// Check for request forgeries
JSession::checkToken() or jexit(JText::_('JINVALID_TOKEN'));
// check if user has the right
$user = JFactory::getUser();
// set page redirect
$redirect_url = JRoute::_('index.php?option=com_componentbuilder&view=compiler', false);
// set massage
$message = JText::_('COM_COMPONENTBUILDER_YOU_DO_NOT_HAVE_PERMISSION_TO_RUN_THE_EXPANSION_MODULE');
// check if this user has the right to run expansion
if($user->authorise('compiler.run_expansion', 'com_componentbuilder'))
{
// set massage
$message = JText::_('COM_COMPONENTBUILDER_EXPANSION_FAILED_PLEASE_CHECK_YOUR_SETTINGS_IN_THE_GLOBAL_OPTIONS_OF_JCB_UNDER_THE_DEVELOPMENT_METHOD_TAB');
// run expansion via API
$result = ComponentbuilderHelper::getFileContents(JURI::root() . 'index.php?option=com_componentbuilder&task=api.expand');
// is there a message returned
if (!is_numeric($result) && ComponentbuilderHelper::checkString($result))
{
$this->setRedirect($redirect_url, $result);
return true;
}
elseif (is_numeric($result) && 1 == $result)
{
$message = JText::_('COM_COMPONENTBUILDER_BTHE_EXPANSION_WAS_SUCCESSFULLYB_TO_SEE_MORE_INFORMATION_CHANGE_THE_BRETURN_OPTIONS_FOR_BUILDB_TO_BDISPLAY_MESSAGEB_IN_THE_GLOBAL_OPTIONS_OF_JCB_UNDER_THE_DEVELOPMENT_METHOD_TABB');
$this->setRedirect($redirect_url, $message, 'message');
return true;
}
}
$this->setRedirect($redirect_url, $message, 'error');
return false;
}
/**
* Clear tmp folder
*
* @return true on success
*/
public function clearTmp()
{
// Check for request forgeries
JSession::checkToken() or jexit(JText::_('JINVALID_TOKEN'));
// check if user has the right
$user = JFactory::getUser();
// set page redirect
$redirect_url = JRoute::_('index.php?option=com_componentbuilder&view=compiler', false);
$message = JText::_('COM_COMPONENTBUILDER_COULD_NOT_CLEAR_THE_TMP_FOLDER');
if($user->authorise('core.admin', 'com_componentbuilder'))
{
// get the model
$model = $this->getModel('compiler');
// get tmp folder
$comConfig = JFactory::getConfig();
$tmp = $comConfig->get('tmp_path');
if ($model->emptyFolder($tmp))
{
$message = JText::_('COM_COMPONENTBUILDER_BTHE_TMP_FOLDER_HAS_BEEN_CLEAR_SUCCESSFULLYB');
$this->setRedirect($redirect_url, $message, 'message');
return true;
}
}
$this->setRedirect($redirect_url, $message, 'error');
return false;
}
/**
* Run the Compiler
*
* @return true on success
*/
public function compiler()
{
// Check for request forgeries
@ -125,33 +198,11 @@ class ComponentbuilderControllerCompiler extends JControllerAdmin
return false;
}
public function clearTmp()
{
// Check for request forgeries
JSession::checkToken() or jexit(JText::_('JINVALID_TOKEN'));
// check if user has the right
$user = JFactory::getUser();
// set page redirect
$redirect_url = JRoute::_('index.php?option=com_componentbuilder&view=compiler', false);
$message = 'Could not clear the tmp folder';
if($user->authorise('core.admin', 'com_componentbuilder'))
{
// get the model
$model = $this->getModel('compiler');
// get tmp folder
$comConfig = JFactory::getConfig();
$tmp = $comConfig->get('tmp_path');
if ($model->emptyFolder($tmp))
{
$message = '<b>The tmp folder has been clear successfully!</b>';
$this->setRedirect($redirect_url,$message,'message');
return true;
}
}
$this->setRedirect($redirect_url,$message,'error');
return false;
}
/**
* Install Compiled Extension
*
* @return true on success
*/
public function installExtention()
{
// Check for request forgeries

View File

@ -102,5 +102,46 @@ class ComponentbuilderControllerCustom_codes extends JControllerAdmin
$message = JText::_('COM_COMPONENTBUILDER_IMPORT_FAILED');
$this->setRedirect(JRoute::_('index.php?option=com_componentbuilder&view=custom_codes', false), $message, 'error');
return;
}
/**
* Run the Expansion
*
* @return void
*/
public function runExpansion()
{
// Check for request forgeries
JSession::checkToken() or jexit(JText::_('JINVALID_TOKEN'));
// check if user has the right
$user = JFactory::getUser();
// set page redirect
$redirect_url = JRoute::_('index.php?option=com_componentbuilder&view=custom_codes', false);
// set massage
$message = JText::_('COM_COMPONENTBUILDER_YOU_DO_NOT_HAVE_PERMISSION_TO_RUN_THE_EXPANSION_MODULE');
// check if this user has the right to run expansion
if($user->authorise('compiler.run_expansion', 'com_componentbuilder'))
{
// set massage
$message = JText::_('COM_COMPONENTBUILDER_EXPANSION_FAILED_PLEASE_CHECK_YOUR_SETTINGS_IN_THE_GLOBAL_OPTIONS_OF_JCB_UNDER_THE_DEVELOPMENT_METHOD_TAB');
// run expansion via API
$result = ComponentbuilderHelper::getFileContents(JURI::root() . 'index.php?option=com_componentbuilder&task=api.expand');
// is there a message returned
if (!is_numeric($result) && ComponentbuilderHelper::checkString($result))
{
$this->setRedirect($redirect_url, $result);
return true;
}
elseif (is_numeric($result) && 1 == $result)
{
$message = JText::_('COM_COMPONENTBUILDER_BTHE_EXPANSION_WAS_SUCCESSFULLYB_TO_SEE_MORE_INFORMATION_CHANGE_THE_BRETURN_OPTIONS_FOR_BUILDB_TO_BDISPLAY_MESSAGEB_IN_THE_GLOBAL_OPTIONS_OF_JCB_UNDER_THE_DEVELOPMENT_METHOD_TABB');
$this->setRedirect($redirect_url, $message, 'message');
return true;
}
}
$this->setRedirect($redirect_url, $message, 'error');
return false;
}
}

View File

@ -102,5 +102,46 @@ class ComponentbuilderControllerDynamic_gets extends JControllerAdmin
$message = JText::_('COM_COMPONENTBUILDER_IMPORT_FAILED');
$this->setRedirect(JRoute::_('index.php?option=com_componentbuilder&view=dynamic_gets', false), $message, 'error');
return;
}
/**
* Run the Expansion
*
* @return void
*/
public function runExpansion()
{
// Check for request forgeries
JSession::checkToken() or jexit(JText::_('JINVALID_TOKEN'));
// check if user has the right
$user = JFactory::getUser();
// set page redirect
$redirect_url = JRoute::_('index.php?option=com_componentbuilder&view=dynamic_gets', false);
// set massage
$message = JText::_('COM_COMPONENTBUILDER_YOU_DO_NOT_HAVE_PERMISSION_TO_RUN_THE_EXPANSION_MODULE');
// check if this user has the right to run expansion
if($user->authorise('compiler.run_expansion', 'com_componentbuilder'))
{
// set massage
$message = JText::_('COM_COMPONENTBUILDER_EXPANSION_FAILED_PLEASE_CHECK_YOUR_SETTINGS_IN_THE_GLOBAL_OPTIONS_OF_JCB_UNDER_THE_DEVELOPMENT_METHOD_TAB');
// run expansion via API
$result = ComponentbuilderHelper::getFileContents(JURI::root() . 'index.php?option=com_componentbuilder&task=api.expand');
// is there a message returned
if (!is_numeric($result) && ComponentbuilderHelper::checkString($result))
{
$this->setRedirect($redirect_url, $result);
return true;
}
elseif (is_numeric($result) && 1 == $result)
{
$message = JText::_('COM_COMPONENTBUILDER_BTHE_EXPANSION_WAS_SUCCESSFULLYB_TO_SEE_MORE_INFORMATION_CHANGE_THE_BRETURN_OPTIONS_FOR_BUILDB_TO_BDISPLAY_MESSAGEB_IN_THE_GLOBAL_OPTIONS_OF_JCB_UNDER_THE_DEVELOPMENT_METHOD_TABB');
$this->setRedirect($redirect_url, $message, 'message');
return true;
}
}
$this->setRedirect($redirect_url, $message, 'error');
return false;
}
}

View File

@ -102,5 +102,46 @@ class ComponentbuilderControllerFields extends JControllerAdmin
$message = JText::_('COM_COMPONENTBUILDER_IMPORT_FAILED');
$this->setRedirect(JRoute::_('index.php?option=com_componentbuilder&view=fields', false), $message, 'error');
return;
}
/**
* Run the Expansion
*
* @return void
*/
public function runExpansion()
{
// Check for request forgeries
JSession::checkToken() or jexit(JText::_('JINVALID_TOKEN'));
// check if user has the right
$user = JFactory::getUser();
// set page redirect
$redirect_url = JRoute::_('index.php?option=com_componentbuilder&view=fields', false);
// set massage
$message = JText::_('COM_COMPONENTBUILDER_YOU_DO_NOT_HAVE_PERMISSION_TO_RUN_THE_EXPANSION_MODULE');
// check if this user has the right to run expansion
if($user->authorise('compiler.run_expansion', 'com_componentbuilder'))
{
// set massage
$message = JText::_('COM_COMPONENTBUILDER_EXPANSION_FAILED_PLEASE_CHECK_YOUR_SETTINGS_IN_THE_GLOBAL_OPTIONS_OF_JCB_UNDER_THE_DEVELOPMENT_METHOD_TAB');
// run expansion via API
$result = ComponentbuilderHelper::getFileContents(JURI::root() . 'index.php?option=com_componentbuilder&task=api.expand');
// is there a message returned
if (!is_numeric($result) && ComponentbuilderHelper::checkString($result))
{
$this->setRedirect($redirect_url, $result);
return true;
}
elseif (is_numeric($result) && 1 == $result)
{
$message = JText::_('COM_COMPONENTBUILDER_BTHE_EXPANSION_WAS_SUCCESSFULLYB_TO_SEE_MORE_INFORMATION_CHANGE_THE_BRETURN_OPTIONS_FOR_BUILDB_TO_BDISPLAY_MESSAGEB_IN_THE_GLOBAL_OPTIONS_OF_JCB_UNDER_THE_DEVELOPMENT_METHOD_TABB');
$this->setRedirect($redirect_url, $message, 'message');
return true;
}
}
$this->setRedirect($redirect_url, $message, 'error');
return false;
}
}

View File

@ -104,6 +104,79 @@ class ComponentbuilderControllerJoomla_components extends JControllerAdmin
return;
}
/**
* Run the Expansion
*
* @return void
*/
public function runExpansion()
{
// Check for request forgeries
JSession::checkToken() or jexit(JText::_('JINVALID_TOKEN'));
// check if user has the right
$user = JFactory::getUser();
// set page redirect
$redirect_url = JRoute::_('index.php?option=com_componentbuilder&view=joomla_components', false);
// set massage
$message = JText::_('COM_COMPONENTBUILDER_YOU_DO_NOT_HAVE_PERMISSION_TO_RUN_THE_EXPANSION_MODULE');
// check if this user has the right to run expansion
if($user->authorise('compiler.run_expansion', 'com_componentbuilder'))
{
// set massage
$message = JText::_('COM_COMPONENTBUILDER_EXPANSION_FAILED_PLEASE_CHECK_YOUR_SETTINGS_IN_THE_GLOBAL_OPTIONS_OF_JCB_UNDER_THE_DEVELOPMENT_METHOD_TAB');
// run expansion via API
$result = ComponentbuilderHelper::getFileContents(JURI::root() . 'index.php?option=com_componentbuilder&task=api.expand');
// is there a message returned
if (!is_numeric($result) && ComponentbuilderHelper::checkString($result))
{
$this->setRedirect($redirect_url, $result);
return true;
}
elseif (is_numeric($result) && 1 == $result)
{
$message = JText::_('COM_COMPONENTBUILDER_BTHE_EXPANSION_WAS_SUCCESSFULLYB_TO_SEE_MORE_INFORMATION_CHANGE_THE_BRETURN_OPTIONS_FOR_BUILDB_TO_BDISPLAY_MESSAGEB_IN_THE_GLOBAL_OPTIONS_OF_JCB_UNDER_THE_DEVELOPMENT_METHOD_TABB');
$this->setRedirect($redirect_url, $message, 'message');
return true;
}
}
$this->setRedirect($redirect_url, $message, 'error');
return false;
}
/**
* Clear tmp folder
*
* @return true on success
*/
public function clearTmp()
{
// Check for request forgeries
JSession::checkToken() or jexit(JText::_('JINVALID_TOKEN'));
// check if user has the right
$user = JFactory::getUser();
// set page redirect
$redirect_url = JRoute::_('index.php?option=com_componentbuilder&view=joomla_components', false);
$message = JText::_('COM_COMPONENTBUILDER_COULD_NOT_CLEAR_THE_TMP_FOLDER');
if($user->authorise('core.admin', 'com_componentbuilder'))
{
// get the model
$model = $this->getModel('compiler');
// get tmp folder
$comConfig = JFactory::getConfig();
$tmp = $comConfig->get('tmp_path');
if ($model->emptyFolder($tmp))
{
$message = JText::_('COM_COMPONENTBUILDER_BTHE_TMP_FOLDER_HAS_BEEN_CLEAR_SUCCESSFULLYB');
$this->setRedirect($redirect_url, $message, 'message');
return true;
}
}
$this->setRedirect($redirect_url, $message, 'error');
return false;
}
public function smartImport()
{
// check if import is allowed for this user.
@ -122,7 +195,7 @@ class ComponentbuilderControllerJoomla_components extends JControllerAdmin
$message = JText::_('COM_COMPONENTBUILDER_YOU_DO_NOT_HAVE_PERMISSION_TO_IMPORT_A_COMPONENT_PLEASE_CONTACT_YOUR_SYSTEM_ADMINISTRATOR_FOR_MORE_HELP');
$this->setRedirect(JRoute::_('index.php?option=com_componentbuilder&view=joomla_components', false), $message, 'error');
return;
}
}
public function smartExport()
{
@ -353,7 +426,7 @@ class ComponentbuilderControllerJoomla_components extends JControllerAdmin
// quite only if auto backup (adding this script from custom code :)
if ('backup' === 'manualBackup')
{
echo "# Error\n".JText::_('COM_COMPONENTBUILDER_ACCESS_DENIED');
echo "# Error\n" . JText::_('COM_COMPONENTBUILDER_ACCESS_DENIED');
// clear session
JFactory::getApplication()->getSession()->destroy();
jexit();

View File

@ -3656,7 +3656,7 @@ abstract class ComponentbuilderHelper
* @param string $component The component these views belong to
* @param string $headsup The message to show on click of button
*
* @return string On success the full html edit button
* @return string On success the full html link
*
*/
public static function getEditButton(&$item, $view, $views, $ref = '', $component = 'com_componentbuilder', $headsup = 'COM_COMPONENTBUILDER_ALL_UNSAVED_WORK_ON_THIS_PAGE_WILL_BE_LOST_ARE_YOU_SURE_YOU_WANT_TO_CONTINUE')

View File

@ -946,6 +946,8 @@ COM_COMPONENTBUILDER_ADMIN_VIEW_READONLY="readonly"
COM_COMPONENTBUILDER_ADMIN_VIEW_READWRITE="read/write"
COM_COMPONENTBUILDER_ADMIN_VIEW_REMOVE="Remove"
COM_COMPONENTBUILDER_ADMIN_VIEW_REPLY="Reply"
COM_COMPONENTBUILDER_ADMIN_VIEW_RUN_EXPANSION_BUTTON_ACCESS="Admin View Run Expansion Button Access"
COM_COMPONENTBUILDER_ADMIN_VIEW_RUN_EXPANSION_BUTTON_ACCESS_DESC=" Allows the users in this group to access the run expansion button."
COM_COMPONENTBUILDER_ADMIN_VIEW_SAVE_COPY="Save Copy"
COM_COMPONENTBUILDER_ADMIN_VIEW_SAVE_NEW="Save New"
COM_COMPONENTBUILDER_ADMIN_VIEW_SAVE_WARNING="Alias already existed so a number was added at the end. You can re-edit the Admin View to customise the alias."
@ -1113,6 +1115,8 @@ COM_COMPONENTBUILDER_BSB_COULD_NOT_BE_IMPORTEDS="<b>%s</b> could not be imported
COM_COMPONENTBUILDER_BSB_HAS_BEEN_IMPORTED="<b>%s</b> has been imported!"
COM_COMPONENTBUILDER_BSB_HAS_BEEN_UPDATED="<b>%s</b> has been updated!"
COM_COMPONENTBUILDER_BSB_WAS_FOUND="<b>%s</b> was found!"
COM_COMPONENTBUILDER_BTHE_EXPANSION_WAS_SUCCESSFULLYB_TO_SEE_MORE_INFORMATION_CHANGE_THE_BRETURN_OPTIONS_FOR_BUILDB_TO_BDISPLAY_MESSAGEB_IN_THE_GLOBAL_OPTIONS_OF_JCB_UNDER_THE_DEVELOPMENT_METHOD_TABB="<b>The expansion was successfully!</b> to see more information change the <b>Return Options for Build</b> to <b>Display Message</b> in the global options of JCB under the Development Method tab.</b>"
COM_COMPONENTBUILDER_BTHE_TMP_FOLDER_HAS_BEEN_CLEAR_SUCCESSFULLYB="<b>The tmp folder has been clear successfully!</b>"
COM_COMPONENTBUILDER_BUILD="Build"
COM_COMPONENTBUILDER_BUILDIN="Build-in"
COM_COMPONENTBUILDER_BULK="Bulk"
@ -1143,6 +1147,8 @@ COM_COMPONENTBUILDER_COMPILER_CLEAR_TMP_BUTTON_ACCESS_DESC=" Allows the users in
COM_COMPONENTBUILDER_COMPILER_DASHBOARD_LIST="Compiler Dashboard List"
COM_COMPONENTBUILDER_COMPILER_DASHBOARD_LIST_DESC="Allows the users in this group to dashboard list of Compiler"
COM_COMPONENTBUILDER_COMPILER_DESC="The compiler"
COM_COMPONENTBUILDER_COMPILER_RUN_EXPANSION_BUTTON_ACCESS="Compiler Run Expansion Button Access"
COM_COMPONENTBUILDER_COMPILER_RUN_EXPANSION_BUTTON_ACCESS_DESC=" Allows the users in this group to access the run expansion button."
COM_COMPONENTBUILDER_COMPILER_SUBMENU="Compiler Submenu"
COM_COMPONENTBUILDER_COMPILER_SUBMENU_DESC="Allows the users in this group to submenu of Compiler"
COM_COMPONENTBUILDER_COMPILE_COMPONENT="Compile Component"
@ -2653,9 +2659,18 @@ COM_COMPONENTBUILDER_CONFIG_NOTE_COMPILER_FOLDER_PATH_DESCRIPTION="The compiler
COM_COMPONENTBUILDER_CONFIG_NOTE_COMPILER_FOLDER_PATH_LABEL="Moving The Compiler Folder"
COM_COMPONENTBUILDER_CONFIG_NOTE_CUSTOM_FOLDER_PATH_DESCRIPTION="The custom folder is where all files and folders that you would like to include in your components are stored, the default location is [administrator/components/com_componentbuilder/custom]. You can move this folder by adding your own path here. Remember to move the content of the default custom folder to this new location."
COM_COMPONENTBUILDER_CONFIG_NOTE_CUSTOM_FOLDER_PATH_LABEL="Moving The Custom Folder"
COM_COMPONENTBUILDER_CONFIG_NOTE_DEVELOPMENT_METHOD_DEFAULT_DESCRIPTION="<p>This method is basically the way JCB has always worked by default.</p><p>You have a compiler area, once you have made changes you go to the compiler view and compile your component. Then you have the option to install and/or distribute the Joomla install package.</p><p>This can also be called the manual development method.</p>"
COM_COMPONENTBUILDER_CONFIG_NOTE_DEVELOPMENT_METHOD_DEFAULT_DESCRIPTION="<p>This method is basically the way JCB has always worked by default.</p>
<p>So once you have made changes, you go to the compiler view and compile your component. Then you have the option to install and/or distribute the Joomla installation package.</p><p>This option will always be active to those with permission to access the compiler. You can change this permission in the Permissions tab with the option called <b>Compiler Access</b>.</p>"
COM_COMPONENTBUILDER_CONFIG_NOTE_DEVELOPMENT_METHOD_DEFAULT_LABEL="Default Development Method"
COM_COMPONENTBUILDER_CONFIG_NOTE_DEVELOPMENT_METHOD_EXPANSION_DESCRIPTION="<p>This method adds auto expansion to the current Joomla automatically.</p><p>Below you setup the behaviour of a selected set of components that will be <b>auto build and installed</b>. So you do not need to manually compile and install those components any more, the system does all that automatically for you.</p><p>So your experience is that you change the field, view or something else in JCB and then the component in Joomla moments later reflect those changed automatically. The latency of the workflow is based on your <b>cronjob frequency</b> and the <b>size</b> of your component. You can pause the build in a few ways, one by actually <b>checking out/opening</b> the Joomla Component view of the component in JCB, or changing the state to unpublish, archive or trashed, or simply remove if from the list below.</p><p>This can also be called the automatic development method.</p>"
COM_COMPONENTBUILDER_CONFIG_NOTE_DEVELOPMENT_METHOD_EXPANSION_DESCRIPTION="<p>This method adds easy compile and install of multiple components to the current Joomla system. This automated action is called <b>expansion</b>.</p>
<p><em>Expansion can be achieved in two ways.</em></p>
<h4>Button Expansion Option</h4>
<p>The first and most common way is to click on any of the <b>Run Expansion</b> buttons found at the top of some of the JCB admin views.</p>
<h4>Cronjob Expansion Option</h4>
<p>The second is by running a cronjob as explained bellow the area of selection in this tab. So you do not need to manually compile and install the selected components any more, the system does all that automatically for you. The latency of the workflow is based on your <b>cronjob frequency</b> and the <b>size</b> of your component.</p>
<p>Expansion is pause for a component in a few ways, one by actually <b>checking out/opening</b> the Joomla Component view of the component in JCB, or changing the state to unpublish, archive or trashed, or simply remove if from the list below.</p>
<h3>The Expansion method is there to speedup development testing.</h3>
<p>Below you should set the behaviour of a selected set of components that will be <b>auto build and installed</b> when the expansion module is run.</p>"
COM_COMPONENTBUILDER_CONFIG_NOTE_DEVELOPMENT_METHOD_EXPANSION_LABEL="Expansion Development Method"
COM_COMPONENTBUILDER_CONFIG_NOTE_DKIM_USE_DESCRIPTION="<p>Using the below details, you need to configure your DNS by adding a TXT record on your domain: <b><span id='a_dkim_domain'></span></b></p>
<script>
@ -2754,6 +2769,7 @@ COM_COMPONENTBUILDER_CONTRIBUTOR="Contributor"
COM_COMPONENTBUILDER_CONTRIBUTORS="Contributors"
COM_COMPONENTBUILDER_COPYRIGHT="Copyright"
COM_COMPONENTBUILDER_COPYRIGHT_S="Copyright: %s"
COM_COMPONENTBUILDER_COULD_NOT_CLEAR_THE_TMP_FOLDER="Could not clear the tmp folder!"
COM_COMPONENTBUILDER_CREATE="Create"
COM_COMPONENTBUILDER_CREATE_A_SNIPPET="create a snippet"
COM_COMPONENTBUILDER_CREATE_NEW_S="Create New %s"
@ -3421,6 +3437,8 @@ COM_COMPONENTBUILDER_CUSTOM_CODE_PERMISSION="Permissions"
COM_COMPONENTBUILDER_CUSTOM_CODE_PHPJS="PHP/JS"
COM_COMPONENTBUILDER_CUSTOM_CODE_PUBLISHING="Publishing"
COM_COMPONENTBUILDER_CUSTOM_CODE_REPLACEMENT="Replacement"
COM_COMPONENTBUILDER_CUSTOM_CODE_RUN_EXPANSION_BUTTON_ACCESS="Custom Code Run Expansion Button Access"
COM_COMPONENTBUILDER_CUSTOM_CODE_RUN_EXPANSION_BUTTON_ACCESS_DESC=" Allows the users in this group to access the run expansion button."
COM_COMPONENTBUILDER_CUSTOM_CODE_SAVE_WARNING="Alias already existed so a number was added at the end. You can re-edit the Custom Code to customise the alias."
COM_COMPONENTBUILDER_CUSTOM_CODE_STATUS="Status"
COM_COMPONENTBUILDER_CUSTOM_CODE_SYSTEM_NAME="System Name"
@ -3749,6 +3767,8 @@ COM_COMPONENTBUILDER_DYNAMIC_GET_REPEATABLE_VALUE="Repeatable Value"
COM_COMPONENTBUILDER_DYNAMIC_GET_ROW_TYPE_DESCRIPTION="Single row or Multiple rows"
COM_COMPONENTBUILDER_DYNAMIC_GET_ROW_TYPE_LABEL="Return Row Type"
COM_COMPONENTBUILDER_DYNAMIC_GET_RR="rr"
COM_COMPONENTBUILDER_DYNAMIC_GET_RUN_EXPANSION_BUTTON_ACCESS="Dynamic Get Run Expansion Button Access"
COM_COMPONENTBUILDER_DYNAMIC_GET_RUN_EXPANSION_BUTTON_ACCESS_DESC=" Allows the users in this group to access the run expansion button."
COM_COMPONENTBUILDER_DYNAMIC_GET_S="s"
COM_COMPONENTBUILDER_DYNAMIC_GET_SAVE_WARNING="Alias already existed so a number was added at the end. You can re-edit the Dynamic Get to customise the alias."
COM_COMPONENTBUILDER_DYNAMIC_GET_SELECTION_DESCRIPTION="Fields to be selected from table."
@ -3836,6 +3856,7 @@ COM_COMPONENTBUILDER_ERROR_YOU_DO_NOT_HAVE_ACCESS_TO_THE_SNIPPETS="Error! You do
COM_COMPONENTBUILDER_ERROR_YOU_DO_NOT_HAVE_PERMISSION_TO_CREATE_THE_SNIPPET="Error! You do not have permission to create the snippet."
COM_COMPONENTBUILDER_EXACT_LENGTH_ONLY_FOUR_TEXT_FIELD="Exact Length (only 4 text_field)"
COM_COMPONENTBUILDER_EXAMPLE="Example"
COM_COMPONENTBUILDER_EXPANSION_FAILED_PLEASE_CHECK_YOUR_SETTINGS_IN_THE_GLOBAL_OPTIONS_OF_JCB_UNDER_THE_DEVELOPMENT_METHOD_TAB="Expansion failed, please check your settings in the global options of JCB under the Development Method tab!"
COM_COMPONENTBUILDER_EXPORTIMPORT_DATA="Export/Import Data"
COM_COMPONENTBUILDER_EXPORT_COMPLETED="Export Completed!"
COM_COMPONENTBUILDER_EXPORT_DATA="Export Data"
@ -4197,6 +4218,8 @@ COM_COMPONENTBUILDER_FIELD_ORDERING_LABEL="Ordering"
COM_COMPONENTBUILDER_FIELD_OTHER="Other"
COM_COMPONENTBUILDER_FIELD_PERMISSION="Permissions"
COM_COMPONENTBUILDER_FIELD_PUBLISHING="Publishing"
COM_COMPONENTBUILDER_FIELD_RUN_EXPANSION_BUTTON_ACCESS="Field Run Expansion Button Access"
COM_COMPONENTBUILDER_FIELD_RUN_EXPANSION_BUTTON_ACCESS_DESC=" Allows the users in this group to access the run expansion button."
COM_COMPONENTBUILDER_FIELD_SAVE_WARNING="Alias already existed so a number was added at the end. You can re-edit the Field to customise the alias."
COM_COMPONENTBUILDER_FIELD_SCRIPTS="Scripts"
COM_COMPONENTBUILDER_FIELD_SELECT_AN_OPTION="Select an option"
@ -4586,6 +4609,8 @@ COM_COMPONENTBUILDER_JOOMLA_COMPONENT_BUILDCOMPSQL_LABEL="MySQL"
COM_COMPONENTBUILDER_JOOMLA_COMPONENT_BUILDCOMP_DESCRIPTION="To build the component fields and back-end views dynamically using a mySQL table file."
COM_COMPONENTBUILDER_JOOMLA_COMPONENT_BUILDCOMP_LABEL="Build Backend-views Dynamically"
COM_COMPONENTBUILDER_JOOMLA_COMPONENT_BUILDER_BACKUP_KEY="Joomla Component Builder - Backup Key"
COM_COMPONENTBUILDER_JOOMLA_COMPONENT_CLEAR_TMP_BUTTON_ACCESS="Joomla Component Clear tmp Button Access"
COM_COMPONENTBUILDER_JOOMLA_COMPONENT_CLEAR_TMP_BUTTON_ACCESS_DESC=" Allows the users in this group to access the clear tmp button."
COM_COMPONENTBUILDER_JOOMLA_COMPONENT_CLONE_BUTTON_ACCESS="Joomla Component Clone Button Access"
COM_COMPONENTBUILDER_JOOMLA_COMPONENT_CLONE_BUTTON_ACCESS_DESC=" Allows the users in this group to access the clone button."
COM_COMPONENTBUILDER_JOOMLA_COMPONENT_COMPANYNAME="Companyname"
@ -4837,6 +4862,8 @@ COM_COMPONENTBUILDER_JOOMLA_COMPONENT_PHP_SITE_EVENT_LABEL="Global Helper Site E
COM_COMPONENTBUILDER_JOOMLA_COMPONENT_PUBLISHING="Publishing"
COM_COMPONENTBUILDER_JOOMLA_COMPONENT_README="Readme"
COM_COMPONENTBUILDER_JOOMLA_COMPONENT_README_LABEL="README.md"
COM_COMPONENTBUILDER_JOOMLA_COMPONENT_RUN_EXPANSION_BUTTON_ACCESS="Joomla Component Run Expansion Button Access"
COM_COMPONENTBUILDER_JOOMLA_COMPONENT_RUN_EXPANSION_BUTTON_ACCESS_DESC=" Allows the users in this group to access the run expansion button."
COM_COMPONENTBUILDER_JOOMLA_COMPONENT_SALES_SERVER="Sales Server"
COM_COMPONENTBUILDER_JOOMLA_COMPONENT_SALES_SERVER_DESCRIPTION="Select your sales server for this component"
COM_COMPONENTBUILDER_JOOMLA_COMPONENT_SALES_SERVER_LABEL="Sales Server"
@ -5694,6 +5721,7 @@ COM_COMPONENTBUILDER_REVERT_ALL_AHEAD_SNIPPETS="Revert All Ahead Snippets"
COM_COMPONENTBUILDER_REVIEW_THIS_ISSUE_ON_GITHUB="Review this issue on Github"
COM_COMPONENTBUILDER_RIGHT_IN_TAB="Right in Tab"
COM_COMPONENTBUILDER_RIGHT_OF_TABS="Right of Tabs"
COM_COMPONENTBUILDER_RUN_EXPANSION="Run Expansion"
COM_COMPONENTBUILDER_SAVE_SUCCESS="Great! Item successfully saved."
COM_COMPONENTBUILDER_SAVE_WARNING="The value already existed so please select another."
COM_COMPONENTBUILDER_SBR_YOU_CAN_ADD_AN_BACCESS_TOKENB_TO_GETBIBLE_GLOBAL_OPTIONS_TO_MAKE_AUTHENTICATED_REQUESTS_AN_ACCESS_TOKEN_WITH_ONLY_PUBLIC_ACCESS_WILL_DO="%s<br />You can add an <b>access token<b/> to getBible global options to make authenticated requests. An access token with only public access will do."
@ -6873,6 +6901,7 @@ COM_COMPONENTBUILDER_YOU_CAN_NOW_SELECT_THE_COMPONENT_BZIPB_PACKAGE_YOU_WOULD_LI
COM_COMPONENTBUILDER_YOU_DO_NOT_HAVE_PERMISSION_TO_ACCESS_THE_SERVER_DETAILS_BS_DENIEDB_PLEASE_CONTACT_YOUR_SYSTEM_ADMINISTRATOR_FOR_MORE_INFO="You do not have permission to access the server details (<b>%s - denied</b>), please contact your system administrator for more info."
COM_COMPONENTBUILDER_YOU_DO_NOT_HAVE_PERMISSION_TO_CLONE_A_COMPONENT_PLEASE_CONTACT_YOUR_SYSTEM_ADMINISTRATOR_FOR_MORE_HELP="You do not have permission to clone a component, please contact your system administrator for more help."
COM_COMPONENTBUILDER_YOU_DO_NOT_HAVE_PERMISSION_TO_IMPORT_A_COMPONENT_PLEASE_CONTACT_YOUR_SYSTEM_ADMINISTRATOR_FOR_MORE_HELP="You do not have permission to import a component, please contact your system administrator for more help."
COM_COMPONENTBUILDER_YOU_DO_NOT_HAVE_PERMISSION_TO_RUN_THE_EXPANSION_MODULE="You do not have permission to run the expansion module!"
COM_COMPONENTBUILDER_YOU_DO_NOT_HAVE_PERMISSION_TO_SHARE_THE_SNIPPETS_PLEASE_CONTACT_YOUR_SYSTEM_ADMINISTRATOR_FOR_MORE_HELP="You do not have permission to share the snippets, please contact your system administrator for more help."
COM_COMPONENTBUILDER_YOU_HAVE_S_S_ADDING_MORE_THEN_S_S_IS_CONSIDERED_BAD_PRACTICE="You have %s %s. Adding more then %s %s is considered bad practice."
COM_COMPONENTBUILDER_YOU_HAVE_S_S_ADDING_MORE_THEN_S_S_IS_CONSIDERED_BAD_PRACTICE_YOUR_S_PAGE_LOAD_IN_JCB_WILL_SLOWDOWN_YOU_SHOULD_CONSIDER_DECOUPLING_SOME_OF_THESE_S="You have %s %s. Adding more then %s %s is considered bad practice. Your %s page load in JCB will slowdown. You should consider decoupling some of these %s."

View File

@ -109,12 +109,16 @@ COM_COMPONENTBUILDER_ADMIN_VIEWS_IMPORT="Admin Views Import"
COM_COMPONENTBUILDER_ADMIN_VIEWS_IMPORT_DESC="Allows the users in this group to import import admin views"
COM_COMPONENTBUILDER_ADMIN_VIEWS_SUBMENU="Admin Views Submenu"
COM_COMPONENTBUILDER_ADMIN_VIEWS_SUBMENU_DESC="Allows the users in this group to submenu of admin view"
COM_COMPONENTBUILDER_ADMIN_VIEW_RUN_EXPANSION_BUTTON_ACCESS="Admin View Run Expansion Button Access"
COM_COMPONENTBUILDER_ADMIN_VIEW_RUN_EXPANSION_BUTTON_ACCESS_DESC=" Allows the users in this group to access the run expansion button."
COM_COMPONENTBUILDER_COMPILER_ACCESS="Compiler Access"
COM_COMPONENTBUILDER_COMPILER_ACCESS_DESC=" Allows the users in this group to access compiler."
COM_COMPONENTBUILDER_COMPILER_CLEAR_TMP_BUTTON_ACCESS="Compiler Clear tmp Button Access"
COM_COMPONENTBUILDER_COMPILER_CLEAR_TMP_BUTTON_ACCESS_DESC=" Allows the users in this group to access the clear tmp button."
COM_COMPONENTBUILDER_COMPILER_DASHBOARD_LIST="Compiler Dashboard List"
COM_COMPONENTBUILDER_COMPILER_DASHBOARD_LIST_DESC="Allows the users in this group to dashboard list of Compiler"
COM_COMPONENTBUILDER_COMPILER_RUN_EXPANSION_BUTTON_ACCESS="Compiler Run Expansion Button Access"
COM_COMPONENTBUILDER_COMPILER_RUN_EXPANSION_BUTTON_ACCESS_DESC=" Allows the users in this group to access the run expansion button."
COM_COMPONENTBUILDER_COMPILER_SUBMENU="Compiler Submenu"
COM_COMPONENTBUILDER_COMPILER_SUBMENU_DESC="Allows the users in this group to submenu of Compiler"
COM_COMPONENTBUILDER_COMPONENTS_ADMIN_VIEWS_ACCESS="Components Admin Views Access"
@ -354,6 +358,8 @@ COM_COMPONENTBUILDER_CUSTOM_CODES_IMPORT="Custom Codes Import"
COM_COMPONENTBUILDER_CUSTOM_CODES_IMPORT_DESC="Allows the users in this group to import import custom codes"
COM_COMPONENTBUILDER_CUSTOM_CODES_SUBMENU="Custom Codes Submenu"
COM_COMPONENTBUILDER_CUSTOM_CODES_SUBMENU_DESC="Allows the users in this group to submenu of custom code"
COM_COMPONENTBUILDER_CUSTOM_CODE_RUN_EXPANSION_BUTTON_ACCESS="Custom Code Run Expansion Button Access"
COM_COMPONENTBUILDER_CUSTOM_CODE_RUN_EXPANSION_BUTTON_ACCESS_DESC=" Allows the users in this group to access the run expansion button."
COM_COMPONENTBUILDER_DYNAMIC_GETS_ACCESS="Dynamic Gets Access"
COM_COMPONENTBUILDER_DYNAMIC_GETS_ACCESS_DESC="Allows the users in this group to access access dynamic gets"
COM_COMPONENTBUILDER_DYNAMIC_GETS_BATCH_USE="Dynamic Gets Batch Use"
@ -380,6 +386,8 @@ COM_COMPONENTBUILDER_DYNAMIC_GETS_IMPORT="Dynamic Gets Import"
COM_COMPONENTBUILDER_DYNAMIC_GETS_IMPORT_DESC="Allows the users in this group to import import dynamic gets"
COM_COMPONENTBUILDER_DYNAMIC_GETS_SUBMENU="Dynamic Gets Submenu"
COM_COMPONENTBUILDER_DYNAMIC_GETS_SUBMENU_DESC="Allows the users in this group to submenu of dynamic get"
COM_COMPONENTBUILDER_DYNAMIC_GET_RUN_EXPANSION_BUTTON_ACCESS="Dynamic Get Run Expansion Button Access"
COM_COMPONENTBUILDER_DYNAMIC_GET_RUN_EXPANSION_BUTTON_ACCESS_DESC=" Allows the users in this group to access the run expansion button."
COM_COMPONENTBUILDER_EDIT_CREATED_BY="Edit Created By"
COM_COMPONENTBUILDER_EDIT_CREATED_BY_DESC=" Allows users in this group to edit created by."
COM_COMPONENTBUILDER_EDIT_CREATED_DATE="Edit Created Date"
@ -448,6 +456,8 @@ COM_COMPONENTBUILDER_FIELDTYPES_SHORT_DESCRIPTION="Fieldtypes Short Description"
COM_COMPONENTBUILDER_FIELDTYPES_SHORT_DESCRIPTION_DESC="Allows the users in this group to short description of fieldtype"
COM_COMPONENTBUILDER_FIELDTYPES_SUBMENU="Fieldtypes Submenu"
COM_COMPONENTBUILDER_FIELDTYPES_SUBMENU_DESC="Allows the users in this group to submenu of fieldtype"
COM_COMPONENTBUILDER_FIELD_RUN_EXPANSION_BUTTON_ACCESS="Field Run Expansion Button Access"
COM_COMPONENTBUILDER_FIELD_RUN_EXPANSION_BUTTON_ACCESS_DESC=" Allows the users in this group to access the run expansion button."
COM_COMPONENTBUILDER_GET_SNIPPETS_ACCESS="Get Snippets Access"
COM_COMPONENTBUILDER_GET_SNIPPETS_ACCESS_DESC=" Allows the users in this group to access get snippets."
COM_COMPONENTBUILDER_GET_SNIPPETS_CUSTOM_ADMIN_VIEWS_BUTTON_ACCESS="Get Snippets Custom Admin Views Button Access"
@ -520,12 +530,16 @@ COM_COMPONENTBUILDER_JOOMLA_COMPONENTS_SUBMENU="Joomla Components Submenu"
COM_COMPONENTBUILDER_JOOMLA_COMPONENTS_SUBMENU_DESC="Allows the users in this group to submenu of joomla component"
COM_COMPONENTBUILDER_JOOMLA_COMPONENT_BACKUP_BUTTON_ACCESS="Joomla Component Backup Button Access"
COM_COMPONENTBUILDER_JOOMLA_COMPONENT_BACKUP_BUTTON_ACCESS_DESC=" Allows the users in this group to access the backup button."
COM_COMPONENTBUILDER_JOOMLA_COMPONENT_CLEAR_TMP_BUTTON_ACCESS="Joomla Component Clear tmp Button Access"
COM_COMPONENTBUILDER_JOOMLA_COMPONENT_CLEAR_TMP_BUTTON_ACCESS_DESC=" Allows the users in this group to access the clear tmp button."
COM_COMPONENTBUILDER_JOOMLA_COMPONENT_CLONE_BUTTON_ACCESS="Joomla Component Clone Button Access"
COM_COMPONENTBUILDER_JOOMLA_COMPONENT_CLONE_BUTTON_ACCESS_DESC=" Allows the users in this group to access the clone button."
COM_COMPONENTBUILDER_JOOMLA_COMPONENT_EXPORT_JCB_PACKAGES_BUTTON_ACCESS="Joomla Component Export JCB Packages Button Access"
COM_COMPONENTBUILDER_JOOMLA_COMPONENT_EXPORT_JCB_PACKAGES_BUTTON_ACCESS_DESC=" Allows the users in this group to access the export jcb packages button."
COM_COMPONENTBUILDER_JOOMLA_COMPONENT_IMPORT_JCB_PACKAGES_BUTTON_ACCESS="Joomla Component Import JCB Packages Button Access"
COM_COMPONENTBUILDER_JOOMLA_COMPONENT_IMPORT_JCB_PACKAGES_BUTTON_ACCESS_DESC=" Allows the users in this group to access the import jcb packages button."
COM_COMPONENTBUILDER_JOOMLA_COMPONENT_RUN_EXPANSION_BUTTON_ACCESS="Joomla Component Run Expansion Button Access"
COM_COMPONENTBUILDER_JOOMLA_COMPONENT_RUN_EXPANSION_BUTTON_ACCESS_DESC=" Allows the users in this group to access the run expansion button."
COM_COMPONENTBUILDER_LANGUAGES_ACCESS="Languages Access"
COM_COMPONENTBUILDER_LANGUAGES_ACCESS_DESC="Allows the users in this group to access access languages"
COM_COMPONENTBUILDER_LANGUAGES_BATCH_USE="Languages Batch Use"

View File

@ -82,4 +82,26 @@ if ($this->saveOrder)
<?php endif; ?>
<input type="hidden" name="task" value="" />
<?php echo JHtml::_('form.token'); ?>
</form>
</form>
<script type="text/javascript">
// admin_views footer script
// waiting spinner
var outerDiv = jQuery('body');
jQuery('<div id="loading"></div>')
.css("background", "rgba(255, 255, 255, .8) url('components/com_componentbuilder/assets/images/import.gif') 50% 15% no-repeat")
.css("top", outerDiv.position().top - jQuery(window).scrollTop())
.css("left", outerDiv.position().left - jQuery(window).scrollLeft())
.css("width", outerDiv.width())
.css("height", outerDiv.height())
.css("position", "fixed")
.css("opacity", "0.80")
.css("-ms-filter", "progid:DXImageTransform.Microsoft.Alpha(Opacity = 80)")
.css("filter", "alpha(opacity = 80)")
.css("display", "none")
.appendTo(outerDiv);
// when the expand button is clicked
jQuery('#toolbar').on('click',"button.button-expand-2", function(e){
jQuery('#loading').show();
});
</script>

View File

@ -132,6 +132,11 @@ class ComponentbuilderViewAdmin_views extends JViewLegacy
JToolBarHelper::custom('admin_views.exportData', 'download', '', 'COM_COMPONENTBUILDER_EXPORT_DATA', true);
}
}
if ($this->user->authorise('admin_view.run_expansion', 'com_componentbuilder'))
{
// add Run Expansion button.
JToolBarHelper::custom('admin_views.runExpansion', 'expand-2', '', 'COM_COMPONENTBUILDER_RUN_EXPANSION', false);
}
if ($this->canDo->get('core.import') && $this->canDo->get('admin_view.import'))
{

View File

@ -304,6 +304,11 @@ class ComponentbuilderViewCompiler extends JViewLegacy
// JToolBarHelper::custom('compiler.back', 'undo-2', '', 'COM_COMPONENTBUILDER_BACK', false);
// add cpanel button
JToolBarHelper::custom('compiler.dashboard', 'grid-2', '', 'COM_COMPONENTBUILDER_DASH', false);
if ($this->canDo->get('compiler.run_expansion'))
{
// add Run Expansion button.
JToolBarHelper::custom('compiler.runExpansion', 'expand-2', '', 'COM_COMPONENTBUILDER_RUN_EXPANSION', false);
}
if ($this->canDo->get('compiler.clear_tmp'))
{
// add Clear tmp button.

View File

@ -82,4 +82,26 @@ if ($this->saveOrder)
<?php endif; ?>
<input type="hidden" name="task" value="" />
<?php echo JHtml::_('form.token'); ?>
</form>
</form>
<script type="text/javascript">
// custom_codes footer script
// waiting spinner
var outerDiv = jQuery('body');
jQuery('<div id="loading"></div>')
.css("background", "rgba(255, 255, 255, .8) url('components/com_componentbuilder/assets/images/import.gif') 50% 15% no-repeat")
.css("top", outerDiv.position().top - jQuery(window).scrollTop())
.css("left", outerDiv.position().left - jQuery(window).scrollLeft())
.css("width", outerDiv.width())
.css("height", outerDiv.height())
.css("position", "fixed")
.css("opacity", "0.80")
.css("-ms-filter", "progid:DXImageTransform.Microsoft.Alpha(Opacity = 80)")
.css("filter", "alpha(opacity = 80)")
.css("display", "none")
.appendTo(outerDiv);
// when the expand button is clicked
jQuery('#toolbar').on('click',"button.button-expand-2", function(e){
jQuery('#loading').show();
});
</script>

View File

@ -132,6 +132,11 @@ class ComponentbuilderViewCustom_codes extends JViewLegacy
JToolBarHelper::custom('custom_codes.exportData', 'download', '', 'COM_COMPONENTBUILDER_EXPORT_DATA', true);
}
}
if ($this->user->authorise('custom_code.run_expansion', 'com_componentbuilder'))
{
// add Run Expansion button.
JToolBarHelper::custom('custom_codes.runExpansion', 'expand-2', '', 'COM_COMPONENTBUILDER_RUN_EXPANSION', false);
}
if ($this->canDo->get('core.import') && $this->canDo->get('custom_code.import'))
{

View File

@ -82,4 +82,26 @@ if ($this->saveOrder)
<?php endif; ?>
<input type="hidden" name="task" value="" />
<?php echo JHtml::_('form.token'); ?>
</form>
</form>
<script type="text/javascript">
// dynamic_gets footer script
// waiting spinner
var outerDiv = jQuery('body');
jQuery('<div id="loading"></div>')
.css("background", "rgba(255, 255, 255, .8) url('components/com_componentbuilder/assets/images/import.gif') 50% 15% no-repeat")
.css("top", outerDiv.position().top - jQuery(window).scrollTop())
.css("left", outerDiv.position().left - jQuery(window).scrollLeft())
.css("width", outerDiv.width())
.css("height", outerDiv.height())
.css("position", "fixed")
.css("opacity", "0.80")
.css("-ms-filter", "progid:DXImageTransform.Microsoft.Alpha(Opacity = 80)")
.css("filter", "alpha(opacity = 80)")
.css("display", "none")
.appendTo(outerDiv);
// when the expand button is clicked
jQuery('#toolbar').on('click',"button.button-expand-2", function(e){
jQuery('#loading').show();
});
</script>

View File

@ -132,6 +132,11 @@ class ComponentbuilderViewDynamic_gets extends JViewLegacy
JToolBarHelper::custom('dynamic_gets.exportData', 'download', '', 'COM_COMPONENTBUILDER_EXPORT_DATA', true);
}
}
if ($this->user->authorise('dynamic_get.run_expansion', 'com_componentbuilder'))
{
// add Run Expansion button.
JToolBarHelper::custom('dynamic_gets.runExpansion', 'expand-2', '', 'COM_COMPONENTBUILDER_RUN_EXPANSION', false);
}
if ($this->canDo->get('core.import') && $this->canDo->get('dynamic_get.import'))
{

View File

@ -82,4 +82,26 @@ if ($this->saveOrder)
<?php endif; ?>
<input type="hidden" name="task" value="" />
<?php echo JHtml::_('form.token'); ?>
</form>
</form>
<script type="text/javascript">
// fields footer script
// waiting spinner
var outerDiv = jQuery('body');
jQuery('<div id="loading"></div>')
.css("background", "rgba(255, 255, 255, .8) url('components/com_componentbuilder/assets/images/import.gif') 50% 15% no-repeat")
.css("top", outerDiv.position().top - jQuery(window).scrollTop())
.css("left", outerDiv.position().left - jQuery(window).scrollLeft())
.css("width", outerDiv.width())
.css("height", outerDiv.height())
.css("position", "fixed")
.css("opacity", "0.80")
.css("-ms-filter", "progid:DXImageTransform.Microsoft.Alpha(Opacity = 80)")
.css("filter", "alpha(opacity = 80)")
.css("display", "none")
.appendTo(outerDiv);
// when the expand button is clicked
jQuery('#toolbar').on('click',"button.button-expand-2", function(e){
jQuery('#loading').show();
});
</script>

View File

@ -132,6 +132,11 @@ class ComponentbuilderViewFields extends JViewLegacy
JToolBarHelper::custom('fields.exportData', 'download', '', 'COM_COMPONENTBUILDER_EXPORT_DATA', true);
}
}
if ($this->user->authorise('field.run_expansion', 'com_componentbuilder'))
{
// add Run Expansion button.
JToolBarHelper::custom('fields.runExpansion', 'expand-2', '', 'COM_COMPONENTBUILDER_RUN_EXPANSION', false);
}
if ($this->canDo->get('core.import') && $this->canDo->get('field.import'))
{

View File

@ -85,6 +85,7 @@ if ($this->saveOrder)
</form>
<script type="text/javascript">
// joomla_components footer script
// waiting spinner
var outerDiv = jQuery('body');
jQuery('<div id="loading"></div>')
@ -99,25 +100,26 @@ jQuery('<div id="loading"></div>')
.css("filter", "alpha(opacity = 80)")
.css("display", "none")
.appendTo(outerDiv);
// when the clone button is clicked
jQuery('#toolbar').on('click',"button.button-save-copy", function(e){
if (document.adminForm.boxchecked.value != 0){
jQuery('#loading').show();
}
});
// when the backup button is clicked
jQuery('#toolbar').on('click',"button.button-archive", function(e){
if (document.adminForm.boxchecked.value != 0){
jQuery('#loading').show();
}
});
// when the export button is clicked
jQuery('#toolbar').on('click',"button.button-download", function(e){
if (document.adminForm.boxchecked.value != 0){
jQuery('#loading').show();
}
});
// when the expand button is clicked
jQuery('#toolbar').on('click',"button.button-expand-2", function(e){
jQuery('#loading').show();
});
</script>

View File

@ -147,11 +147,21 @@ class ComponentbuilderViewJoomla_components extends JViewLegacy
// add Import JCB Packages button.
JToolBarHelper::custom('joomla_components.smartImport', 'upload', '', 'COM_COMPONENTBUILDER_IMPORT_JCB_PACKAGES', false);
}
if ($this->user->authorise('joomla_component.run_expansion', 'com_componentbuilder'))
{
// add Run Expansion button.
JToolBarHelper::custom('joomla_components.runExpansion', 'expand-2', '', 'COM_COMPONENTBUILDER_RUN_EXPANSION', false);
}
if ($this->user->authorise('joomla_component.backup', 'com_componentbuilder'))
{
// add Backup button.
JToolBarHelper::custom('joomla_components.backup', 'archive', '', 'COM_COMPONENTBUILDER_BACKUP', false);
}
if ($this->user->authorise('joomla_component.clear_tmp', 'com_componentbuilder'))
{
// add Clear tmp button.
JToolBarHelper::custom('joomla_components.clearTmp', 'purge', '', 'COM_COMPONENTBUILDER_CLEAR_TMP', false);
}
if ($this->canDo->get('core.import') && $this->canDo->get('joomla_component.import'))
{

View File

@ -184,7 +184,7 @@ class ComponentbuilderControllerApi extends JControllerForm
// quite only if auto backup (adding this script from custom code :)
if ('backup' === 'backup')
{
echo "# Error\n".JText::_('COM_COMPONENTBUILDER_ACCESS_DENIED');
echo "# Error\n" . JText::_('COM_COMPONENTBUILDER_ACCESS_DENIED');
// clear session
JFactory::getApplication()->getSession()->destroy();
jexit();
@ -193,6 +193,11 @@ class ComponentbuilderControllerApi extends JControllerForm
return;
}
/**
* Run the Expansion
*
* @return mix
*/
public function expand()
{
// get params first
@ -287,19 +292,29 @@ class ComponentbuilderControllerApi extends JControllerForm
// check if message is to be returned
if (1== $returnOptionsBuild)
{
jexit('Expansion Disabled!');
jexit('Expansion Disabled! Expansion can be enabled by your system administrator in the global Options of JCB under the Development Method tab.');
}
// return bool
echo 0;
jexit();
}
/**
* Get API User
*
* @return object
*/
protected function getApiUser()
{
// return user object
return JFactory::getUser($this->params->get('api', 0, 'INT'));
}
/**
* Run worker request
*
* @return mix
*/
public function worker()
{
// get input values
@ -351,6 +366,11 @@ class ComponentbuilderControllerApi extends JControllerForm
jexit();
}
/**
* Load the needed script
*
* @return void
*/
protected function _autoloader()
{
// include component compiler

View File

@ -3656,7 +3656,7 @@ abstract class ComponentbuilderHelper
* @param string $component The component these views belong to
* @param string $headsup The message to show on click of button
*
* @return string On success the full html edit button
* @return string On success the full html link
*
*/
public static function getEditButton(&$item, $view, $views, $ref = '', $component = 'com_componentbuilder', $headsup = 'COM_COMPONENTBUILDER_ALL_UNSAVED_WORK_ON_THIS_PAGE_WILL_BE_LOST_ARE_YOU_SURE_YOU_WANT_TO_CONTINUE')