Skip to content
Permalink
Browse files

Added Captcha field type. Started adding the crowdin integration.

  • Loading branch information...
Llewellynvdm committed May 15, 2019
1 parent a23f1fe commit 80c588a33a8c1876f89ecbfe8864ca482711cb31
Showing with 4,223 additions and 3,244 deletions.
  1. +6 −6 README.md
  2. +6 −6 admin/README.txt
  3. +1 −0 admin/access.xml
  4. +40 −0 admin/controllers/ajax.json.php
  5. +107 −73 admin/controllers/compiler.php
  6. +1 −0 admin/controllers/joomla_component.php
  7. +1 −1 admin/helpers/compiler/a_Get.php
  8. +1 −1 admin/helpers/compiler/e_Interpretation.php
  9. +110 −1 admin/helpers/componentbuilder.php
  10. +43 −0 admin/language/en-GB/en-GB.com_componentbuilder.ini
  11. +2 −0 admin/language/en-GB/en-GB.com_componentbuilder.sys.ini
  12. +1 −1 admin/layouts/fieldtype/fields_fullwidth.php
  13. +6 −8 admin/layouts/joomla_component/{dynamic_integration_fullwidth.php → dynamic_integration_left.php}
  14. +34 −0 admin/layouts/joomla_component/dynamic_integration_right.php
  15. +1 −1 admin/layouts/server/linked_components_fullwidth.php
  16. +52 −0 admin/models/ajax.php
  17. +6 −6 admin/models/fieldtype.php
  18. +335 −335 admin/models/forms/admin_view.js
  19. +105 −105 admin/models/forms/custom_admin_view.js
  20. +38 −38 admin/models/forms/custom_code.js
  21. +464 −464 admin/models/forms/dynamic_get.js
  22. +139 −139 admin/models/forms/field.js
  23. +268 −268 admin/models/forms/fieldtype.js
  24. +82 −82 admin/models/forms/help_document.js
  25. +152 −0 admin/models/forms/joomla_component.js
  26. +316 −243 admin/models/forms/joomla_component.xml
  27. +10 −10 admin/models/forms/layout.js
  28. +94 −94 admin/models/forms/library.js
  29. +170 −170 admin/models/forms/server.js
  30. +119 −119 admin/models/forms/site_view.js
  31. +10 −10 admin/models/forms/template.js
  32. +127 −33 admin/models/import_language_translations.php
  33. +86 −48 admin/models/joomla_component.php
  34. +31 −16 admin/models/joomla_components.php
  35. +1 −1 admin/models/server.php
  36. +13 −6 admin/sql/install.mysql.utf8.sql
  37. +9 −0 admin/sql/updates/mysql/2.9.16.sql
  38. +168 −168 admin/views/admin_view/tmpl/edit.php
  39. +5 −0 admin/views/compiler/view.html.php
  40. +50 −50 admin/views/custom_admin_view/tmpl/edit.php
  41. +38 −38 admin/views/custom_code/tmpl/edit.php
  42. +154 −154 admin/views/dynamic_get/tmpl/edit.php
  43. +54 −54 admin/views/field/tmpl/edit.php
  44. +156 −156 admin/views/fieldtype/tmpl/edit.php
  45. +1 −1 admin/views/fieldtype/view.html.php
  46. +27 −27 admin/views/help_document/tmpl/edit.php
  47. +20 −4 admin/views/joomla_component/tmpl/edit.php
  48. +5 −5 admin/views/layout/tmpl/edit.php
  49. +20 −20 admin/views/library/tmpl/edit.php
  50. +66 −66 admin/views/server/tmpl/edit.php
  51. +1 −1 admin/views/server/view.html.php
  52. +55 −55 admin/views/site_view/tmpl/edit.php
  53. +5 −5 admin/views/template/tmpl/edit.php
  54. +3 −3 componentbuilder.xml
  55. +19 −2 componentbuilder_update_server.xml
  56. +5 −5 script.php
  57. +246 −143 site/controllers/api.php
  58. +110 −1 site/helpers/componentbuilder.php
  59. +1 −0 site/language/en-GB/en-GB.com_componentbuilder.ini
  60. +27 −1 site/models/api.php
@@ -12,7 +12,7 @@ The Component Builder for [Joomla](https://extensions.joomla.org/extension/compo

Whether you're a seasoned [Joomla](https://extensions.joomla.org/extension/component-builder/) developer, or have just started, Component Builder will safe you lots of time and money. A real must have!

You can install it quite easily and with no limitations. On [github](https://github.com/vdm-io/Joomla-Component-Builder/releases) is the latest release (2.9.16) with **ALL** its features and **ALL** concepts totally open-source and free!
You can install it quite easily and with no limitations. On [github](https://github.com/vdm-io/Joomla-Component-Builder/releases) is the latest release (2.9.18) with **ALL** its features and **ALL** concepts totally open-source and free!

> Watch Quick Build of a Hello World component in [JCB on Youtube](https://www.youtube.com/watch?v=IQfsLYIeblk&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&index=45)
@@ -146,13 +146,13 @@ 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*: 6th May, 2019
+ *Version*: 2.9.16
+ *Last Build*: 15th May, 2019
+ *Version*: 2.9.18
+ *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*: **205396**
+ *Field count*: **1130**
+ *File count*: **1342**
+ *Line count*: **206359**
+ *Field count*: **1136**
+ *File count*: **1344**
+ *Folder count*: **209**

> This **component** was build with a [Joomla](https://extensions.joomla.org/extension/component-builder/) [Automated Component Builder](http://joomlacomponentbuilder.com).
@@ -12,7 +12,7 @@ The Component Builder for [Joomla](https://extensions.joomla.org/extension/compo

Whether you're a seasoned [Joomla](https://extensions.joomla.org/extension/component-builder/) developer, or have just started, Component Builder will safe you lots of time and money. A real must have!

You can install it quite easily and with no limitations. On [github](https://github.com/vdm-io/Joomla-Component-Builder/releases) is the latest release (2.9.16) with **ALL** its features and **ALL** concepts totally open-source and free!
You can install it quite easily and with no limitations. On [github](https://github.com/vdm-io/Joomla-Component-Builder/releases) is the latest release (2.9.18) with **ALL** its features and **ALL** concepts totally open-source and free!

> Watch Quick Build of a Hello World component in [JCB on Youtube](https://www.youtube.com/watch?v=IQfsLYIeblk&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&index=45)

@@ -146,13 +146,13 @@ 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*: 6th May, 2019
+ *Version*: 2.9.16
+ *Last Build*: 15th May, 2019
+ *Version*: 2.9.18
+ *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*: **205396**
+ *Field count*: **1130**
+ *File count*: **1342**
+ *Line count*: **206359**
+ *Field count*: **1136**
+ *File count*: **1344**
+ *Folder count*: **209**

> This **component** was build with a [Joomla](https://extensions.joomla.org/extension/component-builder/) [Automated Component Builder](http://joomlacomponentbuilder.com).
@@ -76,6 +76,7 @@
<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="compiler.translate" title="COM_COMPONENTBUILDER_COMPILER_TRANSLATE_BUTTON_ACCESS" description="COM_COMPONENTBUILDER_COMPILER_TRANSLATE_BUTTON_ACCESS_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" />
<action name="component_admin_views.create" title="COM_COMPONENTBUILDER_COMPONENTS_ADMIN_VIEWS_CREATE" description="COM_COMPONENTBUILDER_COMPONENTS_ADMIN_VIEWS_CREATE_DESC" />
@@ -30,6 +30,7 @@ public function __construct($config)
$this->registerTask('getComponentDetails', 'ajax');
$this->registerTask('getCronPath', 'ajax');
$this->registerTask('getJCBpackageInfo', 'ajax');
$this->registerTask('getCrowdinDetails', 'ajax');
$this->registerTask('tableColumns', 'ajax');
$this->registerTask('fieldSelectOptions', 'ajax');
$this->registerTask('getDynamicScripts', 'ajax');
@@ -261,6 +262,45 @@ public function ajax()
}
}
break;
case 'getCrowdinDetails':
try
{
$returnRaw = $jinput->get('raw', false, 'BOOLEAN');
$identifierValue = $jinput->get('identifier', NULL, 'CMD');
$keyValue = $jinput->get('key', NULL, 'ALNUM');
if($identifierValue && $keyValue && $user->id != 0)
{
$result = $this->getModel('ajax')->getCrowdinDetails($identifierValue, $keyValue);
}
else
{
$result = false;
}
if($callback = $jinput->get('callback', null, 'CMD'))
{
echo $callback . "(".json_encode($result).");";
}
elseif($returnRaw)
{
echo json_encode($result);
}
else
{
echo "(".json_encode($result).");";
}
}
catch(Exception $e)
{
if($callback = $jinput->get('callback', null, 'CMD'))
{
echo $callback."(".json_encode($e).");";
}
else
{
echo "(".json_encode($e).");";
}
}
break;
case 'tableColumns':
try
{
@@ -35,79 +35,6 @@ public function dashboard()
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=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
*
@@ -234,4 +161,111 @@ public function installExtention()
$this->setRedirect($redirect_url,$message,'error');
return false;
}
/**
* 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 Translator
*
* @return void
*/
public function runTranslator()
{
// 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_TRANSLATOR_MODULE');
// check if this user has the right to run expansion
if($user->authorise('compiler.run_translator', 'com_componentbuilder'))
{
// set massage
$message = JText::_('COM_COMPONENTBUILDER_TRANSLATION_FAILED_SINCE_THERE_ARE_NO_COMPONENTS_LINKED_WITH_TRANSLATION_TOOLS');
// run translator via API
$result = ComponentbuilderHelper::getFileContents(JURI::root() . 'index.php?option=com_componentbuilder&task=api.translator');
// is there a message returned
if (!is_numeric($result) && ComponentbuilderHelper::checkString($result))
{
$this->setRedirect($redirect_url, $result);
return true;
}
}
$this->setRedirect($redirect_url, $message, 'error');
return false;
}
}
@@ -360,6 +360,7 @@ protected function postSaveHook(JModelLegacy $model, $validData = array())
'component_config' => 'joomla_component',
'component_dashboard' => 'joomla_component',
'component_files_folders' => 'joomla_component',
'component_placeholders' => 'joomla_component',
'custom_code' => 'component'
);
foreach($_tablesArray as $_updateTable => $_key)
@@ -17,7 +17,7 @@
*/
class Get
{
/**
* The hash placeholder
*
if (isset($this->categoryBuilder[$nameList]) && ComponentbuilderHelper::checkArray($this->categoryBuilder[$nameList]) && !in_array($otherViews, $catArray))
{
// get the extention array
$_extetion_array = explode('.', $this->categoryBuilder[$nameList]['extension']);
$_extetion_array = (array) explode('.', $this->categoryBuilder[$nameList]['extension']);
// set the meny selection
if (isset($_extetion_array[1]))
{
Oops, something went wrong.

0 comments on commit 80c588a

Please sign in to comment.
You can’t perform that action at this time.