Added many events to the compiler as the first step to allow 3rd party integration with the compiler via plugins. gh-429
This commit is contained in:
parent
e84105c3bd
commit
75656d940a
@ -146,12 +146,12 @@ TODO
|
||||
+ *Author*: [Llewellyn van der Merwe](mailto:llewellyn@joomlacomponentbuilder.com)
|
||||
+ *Name*: [Component Builder](https://github.com/vdm-io/Joomla-Component-Builder)
|
||||
+ *First Build*: 30th April, 2015
|
||||
+ *Last Build*: 18th June, 2019
|
||||
+ *Last Build*: 22nd June, 2019
|
||||
+ *Version*: 2.9.20
|
||||
+ *Copyright*: Copyright (C) 2015 - 2019 Vast Development Method. All rights reserved.
|
||||
+ *License*: GNU General Public License version 2 or later; see LICENSE.txt
|
||||
+ *Line count*: **206959**
|
||||
+ *Field count*: **1141**
|
||||
+ *Line count*: **206973**
|
||||
+ *Field count*: **1142**
|
||||
+ *File count*: **1346**
|
||||
+ *Folder count*: **209**
|
||||
|
||||
|
@ -146,12 +146,12 @@ TODO
|
||||
+ *Author*: [Llewellyn van der Merwe](mailto:llewellyn@joomlacomponentbuilder.com)
|
||||
+ *Name*: [Component Builder](https://github.com/vdm-io/Joomla-Component-Builder)
|
||||
+ *First Build*: 30th April, 2015
|
||||
+ *Last Build*: 18th June, 2019
|
||||
+ *Last Build*: 22nd June, 2019
|
||||
+ *Version*: 2.9.20
|
||||
+ *Copyright*: Copyright (C) 2015 - 2019 Vast Development Method. All rights reserved.
|
||||
+ *License*: GNU General Public License version 2 or later; see LICENSE.txt
|
||||
+ *Line count*: **206959**
|
||||
+ *Field count*: **1141**
|
||||
+ *Line count*: **206973**
|
||||
+ *Field count*: **1142**
|
||||
+ *File count*: **1346**
|
||||
+ *Folder count*: **209**
|
||||
|
||||
|
@ -143,6 +143,8 @@ class ###Component###Router extends JComponentRouterBase
|
||||
{
|
||||
$getTable = '#__categories';
|
||||
$query->from($db->quoteName($getTable));
|
||||
// we need this to target the components categories (TODO will keep an eye on this)
|
||||
$query->where($db->quoteName('extension') . ' LIKE '. $db->quote((string)'com_' . $main . '%'));
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -57,6 +57,16 @@
|
||||
folder="editors"
|
||||
filter="cmd"
|
||||
/>
|
||||
<!-- Compiler_plugin Field. Type: Plugins. (joomla) -->
|
||||
<field
|
||||
type="plugins"
|
||||
name="compiler_plugin"
|
||||
label="COM_COMPONENTBUILDER_CONFIG_COMPILER_PLUGIN_LABEL"
|
||||
description="COM_COMPONENTBUILDER_CONFIG_COMPILER_PLUGIN_DESCRIPTION"
|
||||
multiple="true"
|
||||
folder="extension"
|
||||
filter="cmd"
|
||||
/>
|
||||
<!-- Spacer_hr_one Field. Type: Spacer. A None Database Field. (joomla) -->
|
||||
<field type="spacer" name="spacer_hr_one" hr="true" class="spacer_hr_one" />
|
||||
<!-- Manage_jcb_package_directories Field. Type: Radio. (joomla) -->
|
||||
|
@ -253,6 +253,8 @@ class Compiler extends Infusion
|
||||
*/
|
||||
protected function setFileContent(&$name, &$path, &$bom, $view = null)
|
||||
{
|
||||
// Trigger Event: jcb_ce_onBeforeSetFileContent
|
||||
$this->triggerEvent('jcb_ce_onBeforeSetFileContent', array(&$name, &$path, &$bom, &$view));
|
||||
// set the file name
|
||||
$this->fileContentStatic[$this->hhh . 'FILENAME' . $this->hhh] = $name;
|
||||
// check if the file should get PHP opening
|
||||
@ -263,6 +265,8 @@ class Compiler extends Infusion
|
||||
}
|
||||
// get content of the file
|
||||
$string = ComponentbuilderHelper::getFileContents($path);
|
||||
// Trigger Event: jcb_ce_onGetFileContents
|
||||
$this->triggerEvent('jcb_ce_onGetFileContents', array(&$string, &$name, &$path, &$bom, &$view));
|
||||
// see if we should add a BOM
|
||||
if (strpos($string, $this->hhh . 'BOM' . $this->hhh) !== false)
|
||||
{
|
||||
@ -281,6 +285,8 @@ class Compiler extends Infusion
|
||||
{
|
||||
$answer = $this->setDynamicValues($answer);
|
||||
}
|
||||
// Trigger Event: jcb_ce_onBeforeSetFileContent
|
||||
$this->triggerEvent('jcb_ce_onBeforeWriteFileContent', array(&$answer, &$name, &$path, &$bom, &$view));
|
||||
// add answer back to file
|
||||
$this->writeFile($path, $answer);
|
||||
// count the file lines
|
||||
|
@ -736,6 +736,13 @@ class Get
|
||||
*/
|
||||
public $mysqlTableSetting = array();
|
||||
|
||||
/**
|
||||
* event plugin trigger switch
|
||||
*
|
||||
* @var boolean
|
||||
*/
|
||||
protected $active_plugins = false;
|
||||
|
||||
/**
|
||||
* Constructor
|
||||
*/
|
||||
@ -748,6 +755,21 @@ class Get
|
||||
$this->app = JFactory::getApplication();
|
||||
// Set the params
|
||||
$this->params = JComponentHelper::getParams('com_componentbuilder');
|
||||
// get active plugins
|
||||
if (($plugins = $this->params->get('compiler_plugin', false)) !== false)
|
||||
{
|
||||
foreach ($plugins as $plugin)
|
||||
{
|
||||
// get posible plugins
|
||||
if (\JPluginHelper::isEnabled('extension', $plugin))
|
||||
{
|
||||
// Import the appropriate plugin group.
|
||||
\JPluginHelper::importPlugin('extension', $plugin);
|
||||
// activate events
|
||||
$this->active_plugins = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
// set the minfy switch of the JavaScript
|
||||
$this->minify = (isset($config['minify']) && $config['minify'] != 2) ? $config['minify'] : $this->params->get('minify', 0);
|
||||
// set the global language
|
||||
@ -866,6 +888,40 @@ class Get
|
||||
return '';
|
||||
}
|
||||
|
||||
/**
|
||||
* Trigger events
|
||||
*
|
||||
* @param string $event The event to trigger
|
||||
* @param mix $data The values to pass to the event/plugin
|
||||
*
|
||||
* @return string
|
||||
*
|
||||
*/
|
||||
public function triggerEvent($event, $data)
|
||||
{
|
||||
// only exicute if plugins were loaded (active)
|
||||
if ($this->active_plugins)
|
||||
{
|
||||
// Get the dispatcher.
|
||||
$dispatcher = \JEventDispatcher::getInstance();
|
||||
|
||||
// Trigger the form preparation event.
|
||||
$results = $dispatcher->trigger($event, $data);
|
||||
|
||||
// Check for errors encountered while trigger the event
|
||||
if (count($results) && in_array(false, $results, true))
|
||||
{
|
||||
// Get the last error.
|
||||
$error = $dispatcher->getError();
|
||||
|
||||
if (!($error instanceof \Exception))
|
||||
{
|
||||
throw new \Exception($error);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* get all System Placeholders
|
||||
*
|
||||
@ -963,12 +1019,18 @@ class Get
|
||||
$query->join('LEFT', $this->db->quoteName('#__componentbuilder_component_placeholders', 'k') . ' ON (' . $this->db->quoteName('a.id') . ' = ' . $this->db->quoteName('k.joomla_component') . ')');
|
||||
$query->where($this->db->quoteName('a.id') . ' = ' . (int) $this->componentID);
|
||||
|
||||
// Trigger Event: jcb_ce_onBeforeQueryComponentData
|
||||
$this->triggerEvent('jcb_ce_onBeforeQueryComponentData', array(&$this->componentID, &$query, &$this->db));
|
||||
|
||||
// Reset the query using our newly populated query object.
|
||||
$this->db->setQuery($query);
|
||||
|
||||
// Load the results as a list of stdClass objects
|
||||
$component = $this->db->loadObject();
|
||||
|
||||
// Trigger Event: jcb_ce_onBeforeModelComponentData
|
||||
$this->triggerEvent('jcb_ce_onBeforeModelComponentData', array(&$component));
|
||||
|
||||
// set upater
|
||||
$updater = array(
|
||||
'unique' => array(
|
||||
@ -1510,6 +1572,9 @@ class Get
|
||||
$component->toignore = array('.git');
|
||||
}
|
||||
|
||||
// Trigger Event: jcb_ce_onAfterModelComponentData
|
||||
$this->triggerEvent('jcb_ce_onAfterModelComponentData', array(&$component));
|
||||
|
||||
// return the found component data
|
||||
return $component;
|
||||
}
|
||||
@ -1556,6 +1621,9 @@ class Get
|
||||
$query->join('LEFT', $this->db->quoteName('#__componentbuilder_admin_custom_tabs', 't') . ' ON (' . $this->db->quoteName('a.id') . ' = ' . $this->db->quoteName('t.admin_view') . ')');
|
||||
$query->where($this->db->quoteName('a.id') . ' = ' . (int) $id);
|
||||
|
||||
// Trigger Event: jcb_ce_onBeforeQueryViewData
|
||||
$this->triggerEvent('jcb_ce_onBeforeQueryViewData', array(&$id, &$query, &$this->db));
|
||||
|
||||
// Reset the query using our newly populated query object.
|
||||
$this->db->setQuery($query);
|
||||
|
||||
@ -1611,6 +1679,10 @@ class Get
|
||||
$this->placeholders[$this->bbb . 'Views' . $this->ddd] = $this->placeholders[$this->hhh . 'Views' . $this->hhh];
|
||||
$this->placeholders[$this->bbb . 'VIEW' . $this->ddd] = $this->placeholders[$this->hhh . 'VIEW' . $this->hhh];
|
||||
$this->placeholders[$this->bbb . 'VIEWS' . $this->ddd] = $this->placeholders[$this->hhh . 'VIEWS' . $this->hhh];
|
||||
|
||||
// Trigger Event: jcb_ce_onBeforeModelViewData
|
||||
$this->triggerEvent('jcb_ce_onBeforeModelViewData', array(&$view, &$this->placeholders));
|
||||
|
||||
// add the tables
|
||||
$view->addtables = (isset($view->addtables) && ComponentbuilderHelper::checkJson($view->addtables)) ? json_decode($view->addtables, true) : null;
|
||||
if (ComponentbuilderHelper::checkArray($view->addtables))
|
||||
@ -2205,6 +2277,10 @@ class Get
|
||||
// remove the table values since we moved to another object
|
||||
unset($view->{'mysql_table_' . $_mysqlTableKey});
|
||||
}
|
||||
|
||||
// Trigger Event: jcb_ce_onAfterModelViewData
|
||||
$this->triggerEvent('jcb_ce_onAfterModelViewData', array(&$view, &$this->placeholders));
|
||||
|
||||
// clear placeholders
|
||||
unset($this->placeholders[$this->hhh . 'view' . $this->hhh]);
|
||||
unset($this->placeholders[$this->hhh . 'views' . $this->hhh]);
|
||||
@ -2244,11 +2320,18 @@ class Get
|
||||
$query->from('#__componentbuilder_' . $table . ' AS a');
|
||||
$query->where($this->db->quoteName('a.id') . ' = ' . (int) $id);
|
||||
|
||||
// Trigger Event: jcb_ce_onBeforeQueryCustomViewData
|
||||
$this->triggerEvent('jcb_ce_onBeforeQueryCustomViewData', array(&$id, &$table, &$query, &$this->db));
|
||||
|
||||
// Reset the query using our newly populated query object.
|
||||
$this->db->setQuery($query);
|
||||
|
||||
// Load the results as a list of stdClass objects (see later for more options on retrieving data).
|
||||
$view = $this->db->loadObject();
|
||||
|
||||
// Trigger Event: jcb_ce_onBeforeModelCustomViewData
|
||||
$this->triggerEvent('jcb_ce_onBeforeModelCustomViewData', array(&$view, &$id, &$table));
|
||||
|
||||
if ($table === 'site_view')
|
||||
{
|
||||
$this->lang = 'site';
|
||||
@ -2485,6 +2568,10 @@ class Get
|
||||
}
|
||||
unset($view->custom_button);
|
||||
}
|
||||
|
||||
// Trigger Event: jcb_ce_onAfterModelCustomViewData
|
||||
$this->triggerEvent('jcb_ce_onAfterModelCustomViewData', array(&$view));
|
||||
|
||||
// return the found view data
|
||||
return $view;
|
||||
}
|
||||
@ -2513,6 +2600,9 @@ class Get
|
||||
$query->join('LEFT', $this->db->quoteName('#__componentbuilder_fieldtype', 'c') . ' ON (' . $this->db->quoteName('a.fieldtype') . ' = ' . $this->db->quoteName('c.id') . ')');
|
||||
$query->where($this->db->quoteName('a.id') . ' = ' . $this->db->quote($id));
|
||||
|
||||
// Trigger Event: jcb_ce_onBeforeQueryFieldData
|
||||
$this->triggerEvent('jcb_ce_onBeforeQueryFieldData', array(&$id, &$query, &$this->db));
|
||||
|
||||
// Reset the query using our newly populated query object.
|
||||
$this->db->setQuery($query);
|
||||
$this->db->execute();
|
||||
@ -2521,6 +2611,9 @@ class Get
|
||||
// Load the results as a list of stdClass objects (see later for more options on retrieving data).
|
||||
$field = $this->db->loadObject();
|
||||
|
||||
// Trigger Event: jcb_ce_onBeforeModelFieldData
|
||||
$this->triggerEvent('jcb_ce_onBeforeModelFieldData', array(&$field));
|
||||
|
||||
// adding a fix for the changed name of type to fieldtype
|
||||
$field->type = $field->fieldtype;
|
||||
|
||||
@ -2596,6 +2689,9 @@ class Get
|
||||
// get the last used version
|
||||
$field->history = $this->getHistoryWatch('field', $id);
|
||||
|
||||
// Trigger Event: jcb_ce_onAfterModelFieldData
|
||||
$this->triggerEvent('jcb_ce_onAfterModelFieldData', array(&$field));
|
||||
|
||||
$this->_fieldData[$id] = $field;
|
||||
}
|
||||
else
|
||||
|
@ -367,6 +367,8 @@ class Structure extends Get
|
||||
$this->setLibaries();
|
||||
// set the Joomla Version Data
|
||||
$this->joomlaVersionData = $this->setJoomlaVersionData();
|
||||
// Trigger Event: jcb_ce_onAfterSetJoomlaVersionData
|
||||
$this->triggerEvent('jcb_ce_onAfterSetJoomlaVersionData', array(&$this->joomlaVersionData));
|
||||
// set the dashboard
|
||||
$this->setDynamicDashboard();
|
||||
// set the new folders
|
||||
@ -416,6 +418,8 @@ class Structure extends Get
|
||||
{
|
||||
if (ComponentbuilderHelper::checkArray($this->libraries))
|
||||
{
|
||||
// Trigger Event: jcb_ce_onBeforeSetLibaries
|
||||
$this->triggerEvent('jcb_ce_onBeforeSetLibaries', array(&$this->libraries));
|
||||
// creat the main component folder
|
||||
if (!JFolder::exists($this->componentPath))
|
||||
{
|
||||
|
@ -456,11 +456,15 @@ class Fields extends Structure
|
||||
$dynamicFields = '';
|
||||
// set the custom table key
|
||||
$dbkey = 'g';
|
||||
// Trigger Event: jcb_ce_onBeforeBuildFields
|
||||
$this->triggerEvent('jcb_ce_onBeforeBuildFields', array(&$dynamicFields, &$readOnly, &$dbkey, &$view, &$component, &$view_name_single, &$view_name_list, &$this->placeholders, &$langView, &$langViews));
|
||||
// TODO we should add the global and local view switch if field for front end
|
||||
foreach ($view['settings']->fields as $field)
|
||||
{
|
||||
$dynamicFields .= $this->setDynamicField($field, $view, $view['settings']->type, $langView, $view_name_single, $view_name_list, $this->placeholders, $dbkey, true);
|
||||
}
|
||||
// Trigger Event: jcb_ce_onAfterBuildFields
|
||||
$this->triggerEvent('jcb_ce_onAfterBuildFields', array(&$dynamicFields, &$readOnly, &$dbkey, &$view, &$component, &$view_name_single, &$view_name_list, &$this->placeholders, &$langView, &$langViews));
|
||||
// set the default fields
|
||||
$fieldSet = array();
|
||||
$fieldSet[] = '<fieldset name="details">';
|
||||
@ -724,11 +728,15 @@ class Fields extends Structure
|
||||
$dynamicFieldsXML = array();
|
||||
// set the custom table key
|
||||
$dbkey = 'g';
|
||||
// Trigger Event: jcb_ce_onBeforeBuildFields
|
||||
$this->triggerEvent('jcb_ce_onBeforeBuildFields', array(&$dynamicFieldsXML, &$readOnlyXML, &$dbkey, &$view, &$component, &$view_name_single, &$view_name_list, &$this->placeholders, &$langView, &$langViews));
|
||||
// TODO we should add the global and local view switch if field for front end
|
||||
foreach ($view['settings']->fields as $field)
|
||||
{
|
||||
$dynamicFieldsXML[] = $this->setDynamicField($field, $view, $view['settings']->type, $langView, $view_name_single, $view_name_list, $this->placeholders, $dbkey, true);
|
||||
}
|
||||
// Trigger Event: jcb_ce_onAfterBuildFields
|
||||
$this->triggerEvent('jcb_ce_onAfterBuildFields', array(&$dynamicFieldsXML, &$readOnlyXML, &$dbkey, &$view, &$component, &$view_name_single, &$view_name_list, &$this->placeholders, &$langView, &$langViews));
|
||||
// set the default fields
|
||||
$XML = new simpleXMLElement('<a/>');
|
||||
$fieldSetXML = $XML->addChild('fieldset');
|
||||
|
@ -3353,11 +3353,13 @@ class Interpretation extends Fields
|
||||
if ($view['settings']->main_get->gettype == 1 && ComponentbuilderHelper::checkArray($view['settings']->main_get->plugin_events))
|
||||
{
|
||||
$method .= PHP_EOL . $this->_t(2) . "//" . $this->setLine(__LINE__) . " Process the content plugins.";
|
||||
$method .= PHP_EOL . $this->_t(2) . "JPluginHelper::importPlugin('content');";
|
||||
$method .= PHP_EOL . $this->_t(2) . "//" . $this->setLine(__LINE__) . " Setup Event Object.";
|
||||
$method .= PHP_EOL . $this->_t(2) . "\$this->item->event = new stdClass;";
|
||||
$method .= PHP_EOL . $this->_t(2) . "//" . $this->setLine(__LINE__) . " Check if item has params, or pass global params";
|
||||
$method .= PHP_EOL . $this->_t(2) . "\$params = (isset(\$this->item->params) && " . $this->fileContentStatic[$this->hhh . 'Component' . $this->hhh] . "Helper::checkJson(\$this->item->params)) ? json_decode(\$this->item->params) : \$this->params;";
|
||||
$method .= PHP_EOL . $this->_t(2) . "if (" . $this->fileContentStatic[$this->hhh . 'Component' . $this->hhh] . "Helper::checkObject(\$this->item))";
|
||||
$method .= PHP_EOL . $this->_t(2) . "{";
|
||||
$method .= PHP_EOL . $this->_t(3) . "JPluginHelper::importPlugin('content');";
|
||||
$method .= PHP_EOL . $this->_t(3) . "//" . $this->setLine(__LINE__) . " Setup Event Object.";
|
||||
$method .= PHP_EOL . $this->_t(3) . "\$this->item->event = new stdClass;";
|
||||
$method .= PHP_EOL . $this->_t(3) . "//" . $this->setLine(__LINE__) . " Check if item has params, or pass global params";
|
||||
$method .= PHP_EOL . $this->_t(3) . "\$params = (isset(\$this->item->params) && " . $this->fileContentStatic[$this->hhh . 'Component' . $this->hhh] . "Helper::checkJson(\$this->item->params)) ? json_decode(\$this->item->params) : \$this->params;";
|
||||
// load the defaults
|
||||
foreach ($view['settings']->main_get->plugin_events as $plugin_event)
|
||||
{
|
||||
@ -3370,11 +3372,12 @@ class Interpretation extends Fields
|
||||
}
|
||||
else
|
||||
{
|
||||
$method .= PHP_EOL . $this->_t(2) . "//" . $this->setLine(__LINE__) . " " . $plugin_event . " Event Trigger.";
|
||||
$method .= PHP_EOL . $this->_t(2) . "\$results = \$dispatcher->trigger('" . $plugin_event . "', array('com_" . $this->componentCodeName . "." . $view['settings']->context . "', &\$this->item, &\$params, 0));";
|
||||
$method .= PHP_EOL . $this->_t(2) . '$this->item->event->' . $plugin_event . ' = trim(implode("\n", $results));';
|
||||
$method .= PHP_EOL . $this->_t(3) . "//" . $this->setLine(__LINE__) . " " . $plugin_event . " Event Trigger.";
|
||||
$method .= PHP_EOL . $this->_t(3) . "\$results = \$dispatcher->trigger('" . $plugin_event . "', array('com_" . $this->componentCodeName . "." . $view['settings']->context . "', &\$this->item, &\$params, 0));";
|
||||
$method .= PHP_EOL . $this->_t(3) . '$this->item->event->' . $plugin_event . ' = trim(implode("\n", $results));';
|
||||
}
|
||||
}
|
||||
$method .= PHP_EOL . $this->_t(2) . "}";
|
||||
}
|
||||
$method .= PHP_EOL . PHP_EOL . $this->_t(2) . "parent::display(\$tpl);";
|
||||
}
|
||||
@ -6535,6 +6538,9 @@ class Interpretation extends Fields
|
||||
{
|
||||
// add final list of needed lang strings
|
||||
$componentName = JFilterOutput::cleanText($this->componentData->name);
|
||||
// Trigger Event: jcb_ce_onBeforeBuildAdminLang
|
||||
$this->triggerEvent('jcb_ce_onBeforeBuildAdminLang', array(&$this->langContent['admin'], &$this->langPrefix, &$componentName));
|
||||
// start loding the defaults
|
||||
$this->langContent['adminsys'][$this->langPrefix] = $componentName;
|
||||
$this->langContent['adminsys'][$this->langPrefix . '_CONFIGURATION'] = $componentName . ' Configuration';
|
||||
$this->langContent['admin'][$this->langPrefix] = $componentName;
|
||||
@ -6624,6 +6630,9 @@ class Interpretation extends Fields
|
||||
}
|
||||
if (isset($this->langContent['admin']) && ComponentbuilderHelper::checkArray($this->langContent['admin']))
|
||||
{
|
||||
// Trigger Event: jcb_ce_onAfterBuildAdminLang
|
||||
$this->triggerEvent('jcb_ce_onAfterBuildAdminLang', array(&$this->langContent['admin'], &$this->langPrefix, &$componentName));
|
||||
// sort the strings
|
||||
ksort($this->langContent['admin']);
|
||||
// load to global languages
|
||||
$this->languages[$this->langTag]['admin'] = $this->langContent['admin'];
|
||||
@ -6638,7 +6647,11 @@ class Interpretation extends Fields
|
||||
public function setLangSite()
|
||||
{
|
||||
// add final list of needed lang strings
|
||||
$this->langContent['site'][$this->langPrefix] = ComponentbuilderHelper::safeString($this->componentData->name, 'W');
|
||||
$componentName = JFilterOutput::cleanText($this->componentData->name);
|
||||
// Trigger Event: jcb_ce_onBeforeBuildSiteLang
|
||||
$this->triggerEvent('jcb_ce_onBeforeBuildSiteLang', array(&$this->langContent['site'], &$this->langPrefix, &$componentName));
|
||||
// add final list of needed lang strings
|
||||
$this->langContent['site'][$this->langPrefix] = $componentName;
|
||||
// some more defaults
|
||||
$this->langContent['site']['JTOOLBAR_APPLY'] = "Save";
|
||||
$this->langContent['site']['JTOOLBAR_SAVE_AS_COPY'] = "Save as Copy";
|
||||
@ -6677,6 +6690,9 @@ class Interpretation extends Fields
|
||||
}
|
||||
if (isset($this->langContent['site']) && ComponentbuilderHelper::checkArray($this->langContent['site']))
|
||||
{
|
||||
// Trigger Event: jcb_ce_onAfterBuildSiteLang
|
||||
$this->triggerEvent('jcb_ce_onAfterBuildSiteLang', array(&$this->langContent['site'], &$this->langPrefix, &$componentName));
|
||||
// sort the strings
|
||||
ksort($this->langContent['site']);
|
||||
// load to global languages
|
||||
$this->languages[$this->langTag]['site'] = $this->langContent['site'];
|
||||
@ -6691,7 +6707,11 @@ class Interpretation extends Fields
|
||||
public function setLangSiteSys()
|
||||
{
|
||||
// add final list of needed lang strings
|
||||
$this->langContent['sitesys'][$this->langPrefix] = ComponentbuilderHelper::safeString($this->componentData->name, 'W');
|
||||
$componentName = JFilterOutput::cleanText($this->componentData->name);
|
||||
// Trigger Event: jcb_ce_onBeforeBuildSiteSysLang
|
||||
$this->triggerEvent('jcb_ce_onBeforeBuildSiteSysLang', array(&$this->langContent['sitesys'], &$this->langPrefix, &$componentName));
|
||||
// add final list of needed lang strings
|
||||
$this->langContent['sitesys'][$this->langPrefix] = $componentName;
|
||||
$this->langContent['sitesys'][$this->langPrefix . '_NO_ACCESS_GRANTED'] = "No Access Granted!";
|
||||
$this->langContent['sitesys'][$this->langPrefix . '_NOT_FOUND_OR_ACCESS_DENIED'] = "Not found or access denied!";
|
||||
|
||||
@ -6705,6 +6725,9 @@ class Interpretation extends Fields
|
||||
}
|
||||
if (isset($this->langContent['sitesys']) && ComponentbuilderHelper::checkArray($this->langContent['sitesys']))
|
||||
{
|
||||
// Trigger Event: jcb_ce_onAfterBuildSiteSysLang
|
||||
$this->triggerEvent('jcb_ce_onAfterBuildSiteSysLang', array(&$this->langContent['sitesys'], &$this->langPrefix, &$componentName));
|
||||
// sort strings
|
||||
ksort($this->langContent['sitesys']);
|
||||
// load to global languages
|
||||
$this->languages[$this->langTag]['sitesys'] = $this->langContent['sitesys'];
|
||||
@ -6718,6 +6741,10 @@ class Interpretation extends Fields
|
||||
|
||||
public function setLangAdminSys()
|
||||
{
|
||||
// add final list of needed lang strings
|
||||
$componentName = JFilterOutput::cleanText($this->componentData->name);
|
||||
// Trigger Event: jcb_ce_onBeforeBuildAdminSysLang
|
||||
$this->triggerEvent('jcb_ce_onBeforeBuildAdminSysLang', array(&$this->langContent['adminsys'], &$this->langPrefix, &$componentName));
|
||||
// check if the both admin array is set
|
||||
if (isset($this->langContent['bothadmin']) && ComponentbuilderHelper::checkArray($this->langContent['bothadmin']))
|
||||
{
|
||||
@ -6728,6 +6755,9 @@ class Interpretation extends Fields
|
||||
}
|
||||
if (isset($this->langContent['adminsys']) && ComponentbuilderHelper::checkArray($this->langContent['adminsys']))
|
||||
{
|
||||
// Trigger Event: jcb_ce_onAfterBuildAdminSysLang
|
||||
$this->triggerEvent('jcb_ce_onAfterBuildAdminSysLang', array(&$this->langContent['adminsys'], &$this->langPrefix, &$componentName));
|
||||
// sort strings
|
||||
ksort($this->langContent['adminsys']);
|
||||
// load to global languages
|
||||
$this->languages[$this->langTag]['adminsys'] = $this->langContent['adminsys'];
|
||||
@ -13963,6 +13993,7 @@ class Interpretation extends Fields
|
||||
// set the custom fields
|
||||
if (isset($this->componentData->config) && ComponentbuilderHelper::checkArray($this->componentData->config))
|
||||
{
|
||||
// set component code name
|
||||
$component = $this->componentCodeName;
|
||||
$viewName = 'config';
|
||||
$listViewName = 'configs';
|
||||
@ -13990,6 +14021,9 @@ class Interpretation extends Fields
|
||||
$viewType = 0;
|
||||
// set the custom table key
|
||||
$dbkey = 'g';
|
||||
// Trigger Event: jcb_ce_onBeforeSetConfigFieldsets
|
||||
$this->triggerEvent('jcb_ce_onBeforeSetConfigFieldsets', array(&$timer, &$this->configFieldSets, &$this->configFieldSetsCustomField, &$this->componentData->config, &$this->extensionsParams, &$placeholders));
|
||||
// build the config fields
|
||||
foreach ($this->componentData->config as $field)
|
||||
{
|
||||
// check the field builder type
|
||||
@ -14043,6 +14077,8 @@ class Interpretation extends Fields
|
||||
}
|
||||
elseif (2 == $timer) // this is after the admin views are build
|
||||
{
|
||||
// Trigger Event: jcb_ce_onBeforeSetConfigFieldsets
|
||||
$this->triggerEvent('jcb_ce_onBeforeSetConfigFieldsets', array(&$timer, &$this->configFieldSets, &$this->configFieldSetsCustomField, &$this->componentData->config, &$this->extensionsParams, &$this->placeholders));
|
||||
// these field sets can only be added after admin view is build
|
||||
$this->setGroupControlConfigFieldsets($lang);
|
||||
// these can be added anytime really (but looks best after groups
|
||||
@ -14053,7 +14089,8 @@ class Interpretation extends Fields
|
||||
// these are the coustom settings
|
||||
$this->setCustomControlConfigFieldsets($lang);
|
||||
}
|
||||
// we can add more event (timers as we need)
|
||||
// Trigger Event: jcb_ce_onAfterSetConfigFieldsets
|
||||
$this->triggerEvent('jcb_ce_onAfterSetConfigFieldsets', array(&$timer, &$this->configFieldSets, &$this->configFieldSetsCustomField, &$this->extensionsParams, &$this->frontEndParams, &$this->placeholders));
|
||||
}
|
||||
|
||||
public function setSiteControlConfigFieldsets($lang)
|
||||
|
@ -68,6 +68,9 @@ class Infusion extends Interpretation
|
||||
{
|
||||
if (isset($this->componentData->admin_views) && ComponentbuilderHelper::checkArray($this->componentData->admin_views))
|
||||
{
|
||||
// Trigger Event: jcb_ce_onBeforeBuildFilesContent
|
||||
$this->triggerEvent('jcb_ce_onBeforeBuildFilesContent', array(&$this->componentData, &$this->fileContentStatic, &$this->fileContentDynamic, &$this->placeholders, &$this->hhh));
|
||||
|
||||
// COMPONENT
|
||||
$this->fileContentStatic[$this->hhh . 'COMPONENT' . $this->hhh] = $this->placeholders[$this->hhh . 'COMPONENT' . $this->hhh];
|
||||
|
||||
@ -231,6 +234,9 @@ class Infusion extends Interpretation
|
||||
// set the target
|
||||
$this->target = 'admin';
|
||||
$this->lang = 'admin';
|
||||
// reset
|
||||
$viewName_single = '';
|
||||
$viewName_list = '';
|
||||
|
||||
// set single view
|
||||
if (isset($view['settings']->name_single))
|
||||
@ -269,6 +275,9 @@ class Infusion extends Interpretation
|
||||
$this->setLockLicensePer($viewName_single, $this->target);
|
||||
$this->setLockLicensePer($viewName_list, $this->target);
|
||||
|
||||
// Trigger Event: jcb_ce_onBeforeBuildAdminEditViewContent
|
||||
$this->triggerEvent('jcb_ce_onBeforeBuildAdminEditViewContent', array(&$view, &$viewName_single, &$viewName_list, &$this->fileContentStatic, &$this->fileContentDynamic[$viewName_single], &$this->placeholders, &$this->hhh));
|
||||
|
||||
// FIELDSETS <<<DYNAMIC>>>
|
||||
$this->fileContentDynamic[$viewName_single][$this->hhh . 'FIELDSETS' . $this->hhh] = $this->setFieldSet($view, $this->componentCodeName, $viewName_single, $viewName_list);
|
||||
|
||||
@ -367,6 +376,9 @@ class Infusion extends Interpretation
|
||||
$this->fileContentDynamic[$viewName_single][$this->hhh . 'SITE_MENU_XML' . $this->hhh] = $this->setAdminViewMenu($viewName_single, $view);
|
||||
}
|
||||
}
|
||||
|
||||
// Trigger Event: jcb_ce_onAfterBuildAdminEditViewContent
|
||||
$this->triggerEvent('jcb_ce_onAfterBuildAdminEditViewContent', array(&$view, &$viewName_single, &$viewName_list, &$this->fileContentStatic, &$this->fileContentDynamic[$viewName_single], &$this->placeholders, &$this->hhh));
|
||||
}
|
||||
// set the views names
|
||||
if (isset($view['settings']->name_list) && $view['settings']->name_list != 'null')
|
||||
@ -376,6 +388,9 @@ class Infusion extends Interpretation
|
||||
// ICOMOON <<<DYNAMIC>>>
|
||||
$this->fileContentDynamic[$viewName_list][$this->hhh . 'ICOMOON' . $this->hhh] = $view['icomoon'];
|
||||
|
||||
// Trigger Event: jcb_ce_onBeforeBuildAdminListViewContent
|
||||
$this->triggerEvent('jcb_ce_onBeforeBuildAdminListViewContent', array(&$view, &$viewName_single, &$viewName_list, &$this->fileContentStatic, &$this->fileContentDynamic[$viewName_list], &$this->placeholders, &$this->hhh));
|
||||
|
||||
// set the export/import option
|
||||
if (isset($view['port']) && $view['port'] || 1 == $view['settings']->add_custom_import)
|
||||
{
|
||||
@ -505,6 +520,9 @@ class Infusion extends Interpretation
|
||||
{
|
||||
$this->fileContentDynamic[$viewName_list][$this->hhh . 'VIEWS_FOOTER_SCRIPT' . $this->hhh] = '';
|
||||
}
|
||||
|
||||
// Trigger Event: jcb_ce_onAfterBuildAdminListViewContent
|
||||
$this->triggerEvent('jcb_ce_onAfterBuildAdminListViewContent', array(&$view, &$viewName_single, &$viewName_list, &$this->fileContentStatic, &$this->fileContentDynamic[$viewName_list], &$this->placeholders, &$this->hhh));
|
||||
}
|
||||
|
||||
// set u fields used in batch
|
||||
@ -585,6 +603,9 @@ class Infusion extends Interpretation
|
||||
}
|
||||
// HELPER_EXEL
|
||||
$this->fileContentStatic[$this->hhh . 'HELPER_EXEL' . $this->hhh] = $this->setExelHelperMethods();
|
||||
|
||||
// Trigger Event: jcb_ce_onAfterBuildAdminViewContent
|
||||
$this->triggerEvent('jcb_ce_onAfterBuildAdminViewContent', array(&$view, &$viewName_single, &$viewName_list, &$this->fileContentStatic, &$this->fileContentDynamic, &$this->placeholders, &$this->hhh));
|
||||
}
|
||||
|
||||
// setup custom_admin_views and all needed stuff for the site
|
||||
@ -592,7 +613,6 @@ class Infusion extends Interpretation
|
||||
{
|
||||
$this->target = 'custom_admin';
|
||||
$this->lang = 'admin';
|
||||
// var_dump($this->componentData->custom_admin_views);exit;
|
||||
// start dynamic build
|
||||
foreach ($this->componentData->custom_admin_views as $view)
|
||||
{
|
||||
@ -630,6 +650,9 @@ class Infusion extends Interpretation
|
||||
$this->placeholders[$this->bbb . 'sviews' . $this->ddd] = $view['settings']->code;
|
||||
$this->placeholders[$this->bbb . 'SVIEWS' . $this->ddd] = $view['settings']->CODE;
|
||||
|
||||
// Trigger Event: jcb_ce_onBeforeBuildCustomAdminViewContent
|
||||
$this->triggerEvent('jcb_ce_onBeforeBuildCustomAdminViewContent', array(&$view, &$view['settings']->code, &$this->fileContentStatic, &$this->fileContentDynamic[$view['settings']->code], &$this->placeholders, &$this->hhh));
|
||||
|
||||
// set license per view if needed
|
||||
$this->setLockLicensePer($view['settings']->code, $this->target);
|
||||
|
||||
@ -680,6 +703,9 @@ class Infusion extends Interpretation
|
||||
|
||||
// setup the templates
|
||||
$this->setCustomViewTemplateBody($view);
|
||||
|
||||
// Trigger Event: jcb_ce_onAfterBuildCustomAdminViewContent
|
||||
$this->triggerEvent('jcb_ce_onAfterBuildCustomAdminViewContent', array(&$view, &$view['settings']->code, &$this->fileContentStatic, &$this->fileContentDynamic[$view['settings']->code], &$this->placeholders, &$this->hhh));
|
||||
}
|
||||
|
||||
// setup the layouts
|
||||
@ -846,6 +872,9 @@ class Infusion extends Interpretation
|
||||
$this->placeholders[$this->bbb . 'sviews' . $this->ddd] = $view['settings']->code;
|
||||
$this->placeholders[$this->bbb . 'SVIEWS' . $this->ddd] = $view['settings']->CODE;
|
||||
|
||||
// Trigger Event: jcb_ce_onBeforeBuildSiteViewContent
|
||||
$this->triggerEvent('jcb_ce_onBeforeBuildSiteViewContent', array(&$view, &$view['settings']->code, &$this->fileContentStatic, &$this->fileContentDynamic[$view['settings']->code], &$this->placeholders, &$this->hhh));
|
||||
|
||||
// set license per view if needed
|
||||
$this->setLockLicensePer($view['settings']->code, $this->target);
|
||||
|
||||
@ -926,6 +955,9 @@ class Infusion extends Interpretation
|
||||
// set the site form if needed
|
||||
$this->fileContentDynamic[$view['settings']->code][$this->hhh . 'SITE_TOP_FORM' . $this->hhh] = $this->setCustomViewForm($view['settings']->code, 1);
|
||||
$this->fileContentDynamic[$view['settings']->code][$this->hhh . 'SITE_BOTTOM_FORM' . $this->hhh] = $this->setCustomViewForm($view['settings']->code, 2);
|
||||
|
||||
// Trigger Event: jcb_ce_onAfterBuildSiteViewContent
|
||||
$this->triggerEvent('jcb_ce_onAfterBuildSiteViewContent', array(&$view, &$view['settings']->code, &$this->fileContentStatic, &$this->fileContentDynamic[$view['settings']->code], &$this->placeholders, &$this->hhh));
|
||||
}
|
||||
// setup the layouts
|
||||
$this->setCustomViewLayouts();
|
||||
@ -1009,6 +1041,10 @@ class Infusion extends Interpretation
|
||||
{
|
||||
$this->fileContentStatic[$this->hhh . 'README' . $this->hhh] = $this->componentData->readme;
|
||||
}
|
||||
|
||||
// Trigger Event: jcb_ce_onAfterBuildFilesContent
|
||||
$this->triggerEvent('jcb_ce_onAfterBuildFilesContent', array(&$this->componentData, &$this->fileContentStatic, &$this->fileContentDynamic, &$this->placeholders, &$this->hhh));
|
||||
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
@ -1136,6 +1172,9 @@ class Infusion extends Interpretation
|
||||
// now we insert the values into the files
|
||||
if (ComponentbuilderHelper::checkArray($this->languages))
|
||||
{
|
||||
// Trigger Event: jcb_ce_onBeforeBuildAllLangFiles
|
||||
$this->triggerEvent('jcb_ce_onBeforeBuildAllLangFiles', array(&$this->languages, &$this->langTag));
|
||||
// rest xml array
|
||||
$langXML = array();
|
||||
foreach ($this->languages as $tag => $areas)
|
||||
{
|
||||
@ -1210,7 +1249,7 @@ class Infusion extends Interpretation
|
||||
$langXML[$p][] = '<language tag="' . $tag . '">language/' . $tag . '/' . $fileName . '</language>';
|
||||
}
|
||||
}
|
||||
// load the lang xml
|
||||
// load the lang xml
|
||||
if (ComponentbuilderHelper::checkArray($langXML))
|
||||
{
|
||||
$replace = array();
|
||||
|
@ -2873,6 +2873,8 @@ COM_COMPONENTBUILDER_CONFIG_COMPILER_FOLDER_PATH_DESCRIPTION="Here you can set t
|
||||
COM_COMPONENTBUILDER_CONFIG_COMPILER_FOLDER_PATH_HINT="/home/user/compiler"
|
||||
COM_COMPONENTBUILDER_CONFIG_COMPILER_FOLDER_PATH_LABEL="Compiler Folder Path"
|
||||
COM_COMPONENTBUILDER_CONFIG_COMPILER_FOLDER_PATH_MESSAGE="Error! Please add some text here."
|
||||
COM_COMPONENTBUILDER_CONFIG_COMPILER_PLUGIN_DESCRIPTION="Select the plugin you would like to use in JCB's compiler"
|
||||
COM_COMPONENTBUILDER_CONFIG_COMPILER_PLUGIN_LABEL="Activate Compiler Plugins"
|
||||
COM_COMPONENTBUILDER_CONFIG_COMPONENT="Component"
|
||||
COM_COMPONENTBUILDER_CONFIG_COMPONENT_LABEL="Component"
|
||||
COM_COMPONENTBUILDER_CONFIG_CRONJOB_BACKUP_FOLDER_PATH_DESCRIPTION="Here you can set the path to where all components are backed up to."
|
||||
|
@ -1698,7 +1698,7 @@ INSERT INTO `#__componentbuilder_fieldtype` (`id`, `catid`, `description`, `name
|
||||
(34, '', 'Remember all views already have [accesslevel] added by default, only add this if you need more custom access selection! Provides a dropdown list of accesslevel options with the current option selected.', 'Accesslevel', '{\"properties0\":{\"name\":\"type\",\"example\":\"accesslevel\",\"mandatory\":\"1\",\"description\":\"(mandatory) must be accesslevel\"},\"properties1\":{\"name\":\"name\",\"example\":\"accesstwo\",\"adjustable\":\"1\",\"mandatory\":\"1\",\"description\":\"(mandatory) is the unique name of the field. This must match the name of the query results column that contains the values that will be shown to the user in the drop-down list, unless a different name is specified in the value_field attribute. \"},\"properties2\":{\"name\":\"label\",\"example\":\"Access Two\",\"adjustable\":\"1\",\"mandatory\":\"1\",\"translatable\":\"1\",\"description\":\"(mandatory) (translatable) is the descriptive title of the field.\"},\"properties3\":{\"name\":\"description\",\"example\":\"Select an access level to this concept.\",\"adjustable\":\"1\",\"translatable\":\"1\",\"description\":\"(optional) (translatable) is text that will be shown as a tooltip when the user moves the mouse over the drop-down box.\"},\"properties4\":{\"name\":\"class\",\"example\":\"\",\"adjustable\":\"1\",\"description\":\"(optional) is a CSS class name for the HTML form field.\"},\"properties5\":{\"name\":\"required\",\"example\":\"\",\"adjustable\":\"1\",\"description\":\"(optional) is the field required true if yes.\"},\"properties6\":{\"name\":\"multiple\",\"example\":\"\",\"adjustable\":\"1\",\"description\":\"(optional) If set to multiple then allows more than one usergroup to be selected.\"},\"properties7\":{\"name\":\"showon\",\"example\":\"\",\"adjustable\":\"1\",\"description\":\"(optional) show this field on the bases of the value in another field.\"}}', 'List of accesslevels', '', 1, 3, '', 5),
|
||||
(35, '', 'Provides a form with rows of fields that you specify. As many options can be added as desired. Note this form field has a jQuery based javascript file as a dependency.', 'Subform', '{\"properties0\":{\"name\":\"type\",\"example\":\"subform\",\"description\":\"(mandatory) must be subform.\"},\"properties1\":{\"name\":\"name\",\"example\":\"options\",\"adjustable\":\"1\",\"description\":\"(mandatory) is the unique name of the parameter\"},\"properties2\":{\"name\":\"label\",\"example\":\"The Option List\",\"adjustable\":\"1\",\"translatable\":\"1\",\"description\":\"(mandatory) (translatable) is the descriptive title of the field.\"},\"properties3\":{\"name\":\"layout\",\"example\":\"joomla.form.field.subform.repeatable-table\",\"adjustable\":\"1\",\"description\":\"(mandatory) The layout for the repeatable table.\"},\"properties4\":{\"name\":\"component\",\"example\":\"\",\"adjustable\":\"1\",\"description\":\"(optional) To change the component where it should search for layout\"},\"properties5\":{\"name\":\"client\",\"example\":\"\",\"adjustable\":\"1\",\"description\":\"(optional) Function to initialise the application client<br \\/>Frontend: <code>site<\\/code> or <code>0<\\/code><br \\/>Backend: <code>admin<\\/code> or <code>1<\\/code>\"},\"properties6\":{\"name\":\"multiple\",\"example\":\"true\",\"adjustable\":\"1\",\"mandatory\":\"1\",\"description\":\"(mandatory) The rows to be multiple.\"},\"properties7\":{\"name\":\"buttons\",\"example\":\"add,remove,move\",\"adjustable\":\"1\",\"description\":\"(optional) Which buttons to show if multiple mode is true.<br \\/>Options: <code>add,remove,move<\\/code>\"},\"properties8\":{\"name\":\"fields\",\"example\":\"1,2,3\",\"adjustable\":\"1\",\"description\":\"(mandatory) The fields to add to the modal. All fields must first be created in component builder as a field before you can add them here, since you must use the id of the field. Separate the field ids with commas. Do not add custom fields that are not also used in this component.\"},\"properties9\":{\"name\":\"formsource\",\"example\":\"\",\"adjustable\":\"1\",\"description\":\"(optional) you can add a path to a xml file containing the fields.\"},\"properties10\":{\"name\":\"description\",\"example\":\"\",\"adjustable\":\"1\",\"translatable\":\"1\",\"description\":\"(optional) (translatable) description text for the form field. Displays at the top of the modal with the name as well as in the usual position in the form\"},\"properties11\":{\"name\":\"default\",\"example\":\"\",\"adjustable\":\"1\",\"description\":\"(optional) The default value for the form field if the field is left empty. Note this has to be a json string compatible with the contents of the form field.\"},\"properties12\":{\"name\":\"icon\",\"example\":\"list\",\"adjustable\":\"1\",\"description\":\"(optional) The icon to show on the select button (is prefixed with \\\"icon-\\\").\"},\"properties13\":{\"name\":\"max\",\"example\":\"50\",\"adjustable\":\"1\",\"description\":\"(optional) The maximum number of rows of fields allowed (by default 999 to be effectively infinite)\"},\"properties14\":{\"name\":\"min\",\"example\":\"\",\"adjustable\":\"1\",\"description\":\"(optional) The minimum number of rows of fields required\"},\"properties15\":{\"name\":\"filter\",\"example\":\"\",\"adjustable\":\"1\",\"description\":\"(optional) Use only if you would like to save raw data, since the default is best.\"},\"properties16\":{\"name\":\"showon\",\"example\":\"\",\"adjustable\":\"1\",\"description\":\"(optional) show this field on the bases of the value in another field.\"}}', 'Allows form fields which can have as many options as the user desires.', '', 1, 13, '', 6),
|
||||
(36, '', 'Provides an input field for an email address.', 'Email', '{\"properties0\":{\"name\":\"type\",\"example\":\"email\",\"mandatory\":\"1\",\"description\":\"(mandatory) must be email.\"},\"properties1\":{\"name\":\"name\",\"example\":\"email\",\"adjustable\":\"1\",\"mandatory\":\"1\",\"description\":\"(mandatory) is the unique name of the field.\"},\"properties2\":{\"name\":\"label\",\"example\":\"Email Address\",\"adjustable\":\"1\",\"mandatory\":\"1\",\"translatable\":\"1\",\"description\":\"(mandatory) (translatable) is the descriptive title of the field.\"},\"properties3\":{\"name\":\"size\",\"example\":\"10\",\"adjustable\":\"1\",\"description\":\"(optional) is the width of the text box in characters. If omitted the width is determined by the browser. The value of size does not limit the number of characters that may be entered.\"},\"properties4\":{\"name\":\"maxlength\",\"example\":\"50\",\"adjustable\":\"1\",\"description\":\"(optional) limits the number of characters that may be entered.\"},\"properties5\":{\"name\":\"default\",\"example\":\"\",\"adjustable\":\"1\",\"description\":\"(optional) (not translatable) is the default value.\"},\"properties6\":{\"name\":\"description\",\"example\":\"Enter some description\",\"adjustable\":\"1\",\"translatable\":\"1\",\"description\":\"(optional) (translatable) is text that will be shown as a tooltip when the user moves the mouse over the drop-down box.\"},\"properties7\":{\"name\":\"class\",\"example\":\"inputbox\",\"adjustable\":\"1\",\"description\":\"(optional) is a CSS class name for the HTML form field. If omitted this will default to \'text_area\'.\"},\"properties8\":{\"name\":\"readonly\",\"example\":\"false\",\"adjustable\":\"1\",\"description\":\"(optional) The field cannot be changed and will automatically inherit the default value\"},\"properties9\":{\"name\":\"disabled\",\"example\":\"false\",\"adjustable\":\"1\",\"description\":\"(optional) The field cannot be changed and will automatically inherit the default value - it will also not submit\"},\"properties10\":{\"name\":\"required\",\"example\":\"false\",\"adjustable\":\"1\",\"description\":\"(optional) The field must be filled before submitting the form.\"},\"properties11\":{\"name\":\"filter\",\"example\":\"STRING\",\"adjustable\":\"1\",\"description\":\"(optional) allow the system to save certain html tags or raw data.\"},\"properties12\":{\"name\":\"validate\",\"example\":\"email\",\"adjustable\":\"1\",\"description\":\"(optional) The validation method for the form field. This value will determine which method is used to validate the value for a field.\"},\"properties13\":{\"name\":\"unique\",\"example\":\"false\",\"adjustable\":\"1\",\"description\":\"(optional) Used in validation, to check if we should test for uniqueness, to insure that this email does not already belong to another user. Check line 99 in \\/libraries\\/src\\/Form\\/Rule\\/EmailRule.php\"},\"properties14\":{\"name\":\"field\",\"example\":\"\",\"adjustable\":\"1\",\"description\":\"(optional) used in validation of \\\"equals\\\" to link the field to match.\"},\"properties15\":{\"name\":\"message\",\"example\":\"Error! Please add some text here.\",\"adjustable\":\"1\",\"translatable\":\"1\",\"description\":\"(optional) The error message that will be displayed instead of the default message.\"},\"properties16\":{\"name\":\"hint\",\"example\":\"your@email.com\",\"adjustable\":\"1\",\"translatable\":\"1\",\"description\":\"(optional) The placeholder to display inside the text box.\"},\"properties17\":{\"name\":\"autocomplete\",\"example\":\"on\",\"adjustable\":\"1\",\"description\":\"(optional) The autocomplete state for the form field. If \'off\' element will not be automatically completed by browser.\"},\"properties18\":{\"name\":\"showon\",\"example\":\"\",\"adjustable\":\"1\",\"description\":\"(optional) Allows you to hide the field based on the value(s) of another field; for Joomla 3.2.4+\"},\"properties19\":{\"name\":\"onchange\",\"example\":\"\",\"adjustable\":\"1\",\"description\":\"(optional) HTML equivalent attribute (javascript use)\"}}', 'Email form field type', '', 1, 6, '', 7),
|
||||
(37, '', 'Provides a dropdown list of plugin options from the folder.', 'Plugins', '{\"properties0\":{\"name\":\"type\",\"example\":\"plugins\",\"mandatory\":\"1\",\"description\":\"(mandatory) must be editors.\"},\"properties1\":{\"name\":\"name\",\"example\":\"editor\",\"adjustable\":\"1\",\"mandatory\":\"1\",\"description\":\"(mandatory) is the unique name of the parameter.\"},\"properties2\":{\"name\":\"label\",\"example\":\"Select an editor\",\"adjustable\":\"1\",\"mandatory\":\"1\",\"translatable\":\"1\",\"description\":\"(mandatory) (translatable) is the descriptive title of the field.\"},\"properties3\":{\"name\":\"default\",\"example\":\"\",\"adjustable\":\"1\",\"description\":\"(optional) (not translatable) is the default value.\"},\"properties4\":{\"name\":\"description\",\"example\":\"\",\"adjustable\":\"1\",\"translatable\":\"1\",\"description\":\"(optional) (translatable) is text that will be shown as a tooltip when the user moves the mouse over the label.\"},\"properties5\":{\"name\":\"folder\",\"example\":\"editors\",\"adjustable\":\"1\",\"mandatory\":\"1\",\"description\":\"(mandatory) editors or captcha.\"},\"properties6\":{\"name\":\"filter\",\"example\":\"cmd\",\"adjustable\":\"1\",\"description\":\"(optional) allow the system to save certain html tags or raw data.\"},\"properties7\":{\"name\":\"showon\",\"example\":\"\",\"adjustable\":\"1\",\"description\":\"(optional) show this field on the bases of the value in another field.\"}}', 'Provides a dropdown list of plugin options from the folder.', '', 1, 6, '', 8),
|
||||
(37, '', 'Provides a dropdown list of plugin options from the folder.', 'Plugins', '{\"properties0\":{\"name\":\"type\",\"example\":\"plugins\",\"mandatory\":\"1\",\"description\":\"(mandatory) must be editors.\"},\"properties1\":{\"name\":\"name\",\"example\":\"editor\",\"adjustable\":\"1\",\"mandatory\":\"1\",\"description\":\"(mandatory) is the unique name of the parameter.\"},\"properties2\":{\"name\":\"label\",\"example\":\"Select an editor\",\"adjustable\":\"1\",\"mandatory\":\"1\",\"translatable\":\"1\",\"description\":\"(mandatory) (translatable) is the descriptive title of the field.\"},\"properties3\":{\"name\":\"default\",\"example\":\"\",\"adjustable\":\"1\",\"description\":\"(optional) (not translatable) is the default value.\"},\"properties4\":{\"name\":\"description\",\"example\":\"\",\"adjustable\":\"1\",\"translatable\":\"1\",\"description\":\"(optional) (translatable) is text that will be shown as a tooltip when the user moves the mouse over the label.\"},\"properties8\":{\"name\":\"multiple\",\"example\":\"false\",\"adjustable\":\"1\",\"description\":\"(optional) is whether multiple items can be selected at the same time (true or false).\"},\"properties5\":{\"name\":\"folder\",\"example\":\"editors\",\"adjustable\":\"1\",\"mandatory\":\"1\",\"description\":\"(mandatory) editors or captcha.\"},\"properties6\":{\"name\":\"filter\",\"example\":\"cmd\",\"adjustable\":\"1\",\"description\":\"(optional) allow the system to save certain html tags or raw data.\"},\"properties7\":{\"name\":\"showon\",\"example\":\"\",\"adjustable\":\"1\",\"description\":\"(optional) show this field on the bases of the value in another field.\"}}', 'Provides a dropdown list of plugin options from the folder.', '', 1, 7, '', 8),
|
||||
(38, '', 'Provides the use of a captcha plugin.', 'Captcha', '{\"properties0\":{\"name\":\"type\",\"example\":\"captcha\",\"mandatory\":\"1\",\"description\":\"(mandatory) must be captcha.\"},\"properties3\":{\"name\":\"name\",\"example\":\"captcha\",\"adjustable\":\"1\",\"mandatory\":\"1\",\"description\":\"(mandatory) is the unique name of the field.\"},\"properties2\":{\"name\":\"validate\",\"example\":\"captcha\",\"mandatory\":\"1\",\"description\":\"(mandatory) must be captcha.\"},\"properties1\":{\"name\":\"label\",\"example\":\"Captcha\",\"mandatory\":\"1\",\"translatable\":\"1\",\"description\":\"(mandatory) (translatable) is the descriptive title of the field.\"},\"properties4\":{\"name\":\"description\",\"example\":\"We do not like spam, please show us you are human\",\"translatable\":\"1\",\"description\":\"(optional) (translatable) is text that will be shown as a tooltip when the user moves the mouse over the drop-down box.\"},\"properties5\":{\"name\":\"namespace\",\"example\":\"componentbuilder\",\"description\":\"(optional) the component name seems to work\"}}', 'Captcha robot check.', '', 1, 2, '', 9);
|
||||
|
||||
--
|
||||
|
@ -1,7 +1,7 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<extension type="component" version="3.2" method="upgrade">
|
||||
<name>COM_COMPONENTBUILDER</name>
|
||||
<creationDate>18th June, 2019</creationDate>
|
||||
<creationDate>22nd June, 2019</creationDate>
|
||||
<author>Llewellyn van der Merwe</author>
|
||||
<authorEmail>llewellyn@joomlacomponentbuilder.com</authorEmail>
|
||||
<authorUrl>http://www.joomlacomponentbuilder.com</authorUrl>
|
||||
|
@ -153,6 +153,8 @@ class ComponentbuilderRouter extends JComponentRouterBase
|
||||
{
|
||||
$getTable = '#__categories';
|
||||
$query->from($db->quoteName($getTable));
|
||||
// we need this to target the components categories (TODO will keep an eye on this)
|
||||
$query->where($db->quoteName('extension') . ' LIKE '. $db->quote((string)'com_' . $main . '%'));
|
||||
}
|
||||
else
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user