diff --git a/README.md b/README.md index b476a17b7..a4d7802e2 100644 --- a/README.md +++ b/README.md @@ -108,13 +108,13 @@ Component Builder is mapped as a component in itself on my local development env + *Author*: [Llewellyn van der Merwe](mailto:joomla@vdm.io) + *Name*: [Component Builder](http://vdm.bz/component-builder) + *First Build*: 30th April, 2015 -+ *Last Build*: 12th August, 2017 ++ *Last Build*: 19th August, 2017 + *Version*: 2.4.10 + *Copyright*: Copyright (C) 2015. All Rights Reserved + *License*: GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html -+ *Line count*: **106298** -+ *File count*: **651** -+ *Folder count*: **115** ++ *Line count*: **111624** ++ *File count*: **662** ++ *Folder count*: **117** > This **component** was build with a Joomla [Automated Component Builder](http://vdm.bz/component-builder). > Developed by [Llewellyn van der Merwe](mailto:joomla@vdm.io) diff --git a/admin/README.txt b/admin/README.txt index b476a17b7..a4d7802e2 100644 --- a/admin/README.txt +++ b/admin/README.txt @@ -108,13 +108,13 @@ Component Builder is mapped as a component in itself on my local development env + *Author*: [Llewellyn van der Merwe](mailto:joomla@vdm.io) + *Name*: [Component Builder](http://vdm.bz/component-builder) + *First Build*: 30th April, 2015 -+ *Last Build*: 12th August, 2017 ++ *Last Build*: 19th August, 2017 + *Version*: 2.4.10 + *Copyright*: Copyright (C) 2015. All Rights Reserved + *License*: GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html -+ *Line count*: **106298** -+ *File count*: **651** -+ *Folder count*: **115** ++ *Line count*: **111624** ++ *File count*: **662** ++ *Folder count*: **117** > This **component** was build with a Joomla [Automated Component Builder](http://vdm.bz/component-builder). > Developed by [Llewellyn van der Merwe](mailto:joomla@vdm.io) diff --git a/admin/access.xml b/admin/access.xml index cf8ae56ff..af91880cd 100644 --- a/admin/access.xml +++ b/admin/access.xml @@ -101,6 +101,7 @@ + diff --git a/admin/assets/css/admin.css b/admin/assets/css/admin.css index acbfc4782..531ef1f4b 100644 --- a/admin/assets/css/admin.css +++ b/admin/assets/css/admin.css @@ -10,7 +10,7 @@ /-------------------------------------------------------------------------------------------------------------------------------/ @version 2.4.10 - @build 12th August, 2017 + @build 19th August, 2017 @created 30th April, 2015 @package Component Builder @subpackage admin.css diff --git a/admin/assets/css/dashboard.css b/admin/assets/css/dashboard.css index 5359a3f34..b451e6c11 100644 --- a/admin/assets/css/dashboard.css +++ b/admin/assets/css/dashboard.css @@ -10,7 +10,7 @@ /-------------------------------------------------------------------------------------------------------------------------------/ @version 2.4.10 - @build 12th August, 2017 + @build 19th August, 2017 @created 30th April, 2015 @package Component Builder @subpackage dashboard.css diff --git a/admin/assets/css/joomla_component.css b/admin/assets/css/joomla_component.css index 2a70cc667..e1a155ad4 100644 --- a/admin/assets/css/joomla_component.css +++ b/admin/assets/css/joomla_component.css @@ -9,8 +9,8 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version @update number 338 of this MVC - @build 7th August, 2017 + @version @update number 355 of this MVC + @build 19th August, 2017 @created 6th May, 2015 @package Component Builder @subpackage joomla_component.css diff --git a/admin/assets/css/joomla_components.css b/admin/assets/css/joomla_components.css index 20256ae8b..1be93462f 100644 --- a/admin/assets/css/joomla_components.css +++ b/admin/assets/css/joomla_components.css @@ -9,8 +9,8 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version @update number 338 of this MVC - @build 7th August, 2017 + @version @update number 355 of this MVC + @build 19th August, 2017 @created 6th May, 2015 @package Component Builder @subpackage joomla_components.css diff --git a/admin/assets/images/component-300.jpg b/admin/assets/images/component-300.jpg deleted file mode 100644 index d2b57a2df..000000000 Binary files a/admin/assets/images/component-300.jpg and /dev/null differ diff --git a/admin/assets/images/vdm-component.jpg b/admin/assets/images/vdm-component.jpg new file mode 100644 index 000000000..d75b534f9 Binary files /dev/null and b/admin/assets/images/vdm-component.jpg differ diff --git a/admin/compiler/joomla_3/Helper.php b/admin/compiler/joomla_3/Helper.php index 90e1b6001..08bacd9b6 100644 --- a/admin/compiler/joomla_3/Helper.php +++ b/admin/compiler/joomla_3/Helper.php @@ -157,7 +157,14 @@ abstract class ###Component###Helper $query = $db->getQuery(true); $query->select($db->quoteName(array($what))); - $query->from($db->quoteName('#_'.$main.'_'.$table)); + if (empty($table)) + { + $query->from($db->quoteName('#__'.$main)); + } + else + { + $query->from($db->quoteName('#__'.$main.'_'.$table)); + } $query->where($db->quoteName($whereString) . ' '.$operator.' (' . implode(',',$where) . ')'); $db->setQuery($query); $db->execute(); @@ -440,12 +447,20 @@ abstract class ###Component###Helper **/ public static function getModel($name, $path = JPATH_COMPONENT_ADMINISTRATOR, $component = '###component###') { - // load some joomla helpers - JLoader::import('joomla.application.component.model'); // load the model file - JLoader::import( $name, $path . '/models' ); - // return instance - return JModelLegacy::getInstance( $name, $component.'Model' ); + JModelLegacy::addIncludePath( $path . '/models' ); + // get instance + $model = JModelLegacy::getInstance( $name, $component.'Model' ); + // if model not found + if ($model == false) + { + // build class name + $class = $prefix.$name; + // initilize the model + new $class(); + $model = JModelLegacy::getInstance($name, $prefix); + } + return $model; } /** @@ -652,10 +667,16 @@ abstract class ###Component###Helper return false; } + // typo sorry! public static function sorten($string, $length = 40, $addTip = true) + { + return self::shorten($string, $length, $addTip); + } + + public static function shorten($string, $length = 40, $addTip = true) { if (self::checkString($string)) - { + { $initial = strlen($string); $words = preg_split('/([\s\n\r]+)/', $string, null, PREG_SPLIT_DELIM_CAPTURE); $words_count = count($words); @@ -675,7 +696,7 @@ abstract class ###Component###Helper $final = strlen($newString); if ($initial != $final && $addTip) { - $title = self::sorten($string, 400 , false); + $title = self::shorten($string, 400 , false); return ''.trim($newString).'...'; } elseif ($initial != $final && !$addTip) @@ -774,15 +795,15 @@ abstract class ###Component###Helper return ''; } - public static function htmlEscape($var, $charset = 'UTF-8', $sorten = false, $length = 40) + public static function htmlEscape($var, $charset = 'UTF-8', $shorten = false, $length = 40) { if (self::checkString($var)) { $filter = new JFilterInput(); $string = $filter->clean(html_entity_decode(htmlentities($var, ENT_COMPAT, $charset)), 'HTML'); - if ($sorten) + if ($shorten) { - return self::sorten($string,$length); + return self::shorten($string,$length); } return $string; } diff --git a/admin/compiler/joomla_3/Helper_email.php b/admin/compiler/joomla_3/Helper_email.php index 8356795fc..49c8a8757 100644 --- a/admin/compiler/joomla_3/Helper_email.php +++ b/admin/compiler/joomla_3/Helper_email.php @@ -276,4 +276,70 @@ abstract class ###Component###Email return $sendmail; } + + /** + * Set the HTML email body + * + * @return string on success + * + */ + public static function setHtmlEmailBody($html, $subject) + { + $body = array(); + $body[] = ""; + $body[] = ""; + $body[] = ""; + $body[] = ""; + $body[] = ""; + $body[] = "".$subject.""; + $body[] = ""; + $body[] = ""; + $body[] = ""; + $body[] = ""; + $body[] = "\n"; + $body[] = ""; + $body[] = ""; + $body[] = ""; + $body[] = ""; + $body[] = "
"; + $body[] = ""; + $body[] = ""; + $body[] = ""; + $body[] = ""; + $body[] = ""; + $body[] = "
"; + $body[] = ""; + $body[] = ""; + $body[] = ""; + $body[] = ""; + $body[] = ""; + $body[] = "
"; + $body[] = $html; + $body[] = "
"; + $body[] = ""; + $body[] = "
"; + $body[] = ""; + $body[] = "
"; + $body[] = ""; + $body[] = ""; + $body[] = ""; + + return implode("\n", $body); + } } diff --git a/admin/compiler/joomla_3/Helper_site.php b/admin/compiler/joomla_3/Helper_site.php index 32fd49186..fc2f5b519 100644 --- a/admin/compiler/joomla_3/Helper_site.php +++ b/admin/compiler/joomla_3/Helper_site.php @@ -118,12 +118,23 @@ abstract class ###Component###Helper **/ public static function getModel($name, $path = JPATH_COMPONENT_SITE, $component = '###component###') { - // load some joomla helpers - JLoader::import('joomla.application.component.model'); + // full path + $fullPath = $path . '/models'; // load the model file - JLoader::import( $name, $path . '/models' ); - // return instance - return JModelLegacy::getInstance( $name, $component.'Model' ); + JModelLegacy::addIncludePath($fullPath); + // get instance + $model = JModelLegacy::getInstance( $name, $component.'Model' ); + // if model not found + if ($model == false) + { + require_once $fullPath.'/'.strtolower($name).'.php'; + // build class name + $class = $prefix.$name; + // initialize the model + new $class(); + $model = JModelLegacy::getInstance($name, $prefix); + } + return $model; } /** @@ -331,7 +342,14 @@ abstract class ###Component###Helper $query = $db->getQuery(true); $query->select($db->quoteName(array($what))); - $query->from($db->quoteName('#_'.$main.'_'.$table)); + if (empty($table)) + { + $query->from($db->quoteName('#__'.$main)); + } + else + { + $query->from($db->quoteName('#__'.$main.'_'.$table)); + } $query->where($db->quoteName($whereString) . ' '.$operator.' (' . implode(',',$where) . ')'); $db->setQuery($query); $db->execute(); @@ -644,7 +662,13 @@ abstract class ###Component###Helper return false; } + // typo sorry! public static function sorten($string, $length = 40, $addTip = true) + { + return self::shorten($string, $length, $addTip); + } + + public static function shorten($string, $length = 40, $addTip = true) { if (self::checkString($string)) { @@ -667,7 +691,7 @@ abstract class ###Component###Helper $final = strlen($newString); if ($initial != $final && $addTip) { - $title = self::sorten($string, 400 , false); + $title = self::shorten($string, 400 , false); return ''.trim($newString).'...'; } elseif ($initial != $final && !$addTip) @@ -766,15 +790,15 @@ abstract class ###Component###Helper return ''; } - public static function htmlEscape($var, $charset = 'UTF-8', $sorten = false, $length = 40) + public static function htmlEscape($var, $charset = 'UTF-8', $shorten = false, $length = 40) { if (self::checkString($var)) { $filter = new JFilterInput(); $string = $filter->clean(html_entity_decode(htmlentities($var, ENT_COMPAT, $charset)), 'HTML'); - if ($sorten) + if ($shorten) { - return self::sorten($string,$length); + return self::shorten($string,$length); } return $string; } diff --git a/admin/compiler/joomla_3/default_vdm.php b/admin/compiler/joomla_3/default_vdm.php index 42dd53055..47f11206a 100644 --- a/admin/compiler/joomla_3/default_vdm.php +++ b/admin/compiler/joomla_3/default_vdm.php @@ -30,7 +30,7 @@ defined('_JEXEC') or die('Restricted access'); defined('_JEXEC') or die('Restricted access'); ?> -<?php echo JText::_('COM_###COMPONENT###'); ?> +<?php echo JText::_('COM_###COMPONENT###'); ?>
  • : manifest->version; ?>  
  • : manifest->creationDate; ?>
  • diff --git a/admin/componentbuilder.php b/admin/componentbuilder.php index 0b34aca8c..7f67adea9 100644 --- a/admin/componentbuilder.php +++ b/admin/componentbuilder.php @@ -11,7 +11,7 @@ /-------------------------------------------------------------------------------------------------------------------------------/ @version 2.4.10 - @build 12th August, 2017 + @build 19th August, 2017 @created 30th April, 2015 @package Component Builder @subpackage componentbuilder.php @@ -43,7 +43,8 @@ $document->addStyleSheet('components/com_componentbuilder/assets/css/admin.css') $document->addScript('components/com_componentbuilder/assets/js/admin.js'); // require helper files -JLoader::register('ComponentbuilderHelper', dirname(__FILE__) . '/helpers/componentbuilder.php'); +JLoader::register('ComponentbuilderHelper', dirname(__FILE__) . '/helpers/componentbuilder.php'); +JLoader::register('ComponentbuilderEmail', JPATH_COMPONENT_ADMINISTRATOR . '/helpers/componentbuilderemail.php'); JLoader::register('JHtmlBatch_', dirname(__FILE__) . '/helpers/html/batch_.php'); // Triger the Global Admin Event diff --git a/admin/config.xml b/admin/config.xml index 41c5a0276..f5ca89928 100644 --- a/admin/config.xml +++ b/admin/config.xml @@ -75,7 +75,16 @@ step="10" /> - + + + + + " + +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    +
    + + + + + + + + + + + + + + + + + + + + + + + + + +
    +
    + + + + + + + + + + + +
    diff --git a/admin/controller.php b/admin/controller.php index cf29e23d5..cdbc052bb 100644 --- a/admin/controller.php +++ b/admin/controller.php @@ -11,7 +11,7 @@ /-------------------------------------------------------------------------------------------------------------------------------/ @version 2.4.10 - @build 12th August, 2017 + @build 19th August, 2017 @created 30th April, 2015 @package Component Builder @subpackage controller.php diff --git a/admin/controllers/ajax.json.php b/admin/controllers/ajax.json.php index a64b652d0..388270f3f 100644 --- a/admin/controllers/ajax.json.php +++ b/admin/controllers/ajax.json.php @@ -11,7 +11,7 @@ /-------------------------------------------------------------------------------------------------------------------------------/ @version 2.4.10 - @build 12th August, 2017 + @build 19th August, 2017 @created 30th April, 2015 @package Component Builder @subpackage ajax.json.php @@ -45,6 +45,7 @@ class ComponentbuilderControllerAjax extends JControllerLegacy $this->registerTask('isNew', 'ajax'); $this->registerTask('isRead', 'ajax'); $this->registerTask('getComponentDetails', 'ajax'); + $this->registerTask('getCronPath', 'ajax'); $this->registerTask('tableColumns', 'ajax'); $this->registerTask('fieldSelectOptions', 'ajax'); $this->registerTask('getImportScripts', 'ajax'); @@ -188,6 +189,44 @@ class ComponentbuilderControllerAjax extends JControllerLegacy } } break; + case 'getCronPath': + try + { + $returnRaw = $jinput->get('raw', false, 'BOOLEAN'); + $getTypeValue = $jinput->get('getType', NULL, 'WORD'); + if($getTypeValue && $user->id != 0) + { + $result = $this->getModel('ajax')->getCronPath($getTypeValue); + } + 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 { diff --git a/admin/controllers/componentbuilder.php b/admin/controllers/componentbuilder.php index 1b268cd7a..4be85b52e 100644 --- a/admin/controllers/componentbuilder.php +++ b/admin/controllers/componentbuilder.php @@ -11,7 +11,7 @@ /-------------------------------------------------------------------------------------------------------------------------------/ @version 2.4.10 - @build 12th August, 2017 + @build 19th August, 2017 @created 30th April, 2015 @package Component Builder @subpackage componentbuilder.php diff --git a/admin/controllers/help.php b/admin/controllers/help.php index 38c2093ff..ccf1f4f35 100644 --- a/admin/controllers/help.php +++ b/admin/controllers/help.php @@ -11,7 +11,7 @@ /-------------------------------------------------------------------------------------------------------------------------------/ @version 2.4.10 - @build 12th August, 2017 + @build 19th August, 2017 @created 30th April, 2015 @package Component Builder @subpackage help.php diff --git a/admin/controllers/import.php b/admin/controllers/import.php index d078b3c24..dbd470949 100644 --- a/admin/controllers/import.php +++ b/admin/controllers/import.php @@ -11,7 +11,7 @@ /-------------------------------------------------------------------------------------------------------------------------------/ @version 2.4.10 - @build 12th August, 2017 + @build 19th August, 2017 @created 30th April, 2015 @package Component Builder @subpackage import.php diff --git a/admin/controllers/import_joomla_components.php b/admin/controllers/import_joomla_components.php index 3ce1dc535..3634c812f 100644 --- a/admin/controllers/import_joomla_components.php +++ b/admin/controllers/import_joomla_components.php @@ -11,7 +11,7 @@ /-------------------------------------------------------------------------------------------------------------------------------/ @version 2.4.10 - @build 12th August, 2017 + @build 19th August, 2017 @created 30th April, 2015 @package Component Builder @subpackage import_joomla_components.php diff --git a/admin/controllers/joomla_component.php b/admin/controllers/joomla_component.php index 3e79cce89..95455bec4 100644 --- a/admin/controllers/joomla_component.php +++ b/admin/controllers/joomla_component.php @@ -10,8 +10,8 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version @update number 338 of this MVC - @build 7th August, 2017 + @version @update number 355 of this MVC + @build 19th August, 2017 @created 6th May, 2015 @package Component Builder @subpackage joomla_component.php diff --git a/admin/controllers/joomla_components.php b/admin/controllers/joomla_components.php index 9ca6f63cf..2519fdf71 100644 --- a/admin/controllers/joomla_components.php +++ b/admin/controllers/joomla_components.php @@ -10,8 +10,8 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version @update number 338 of this MVC - @build 7th August, 2017 + @version @update number 355 of this MVC + @build 19th August, 2017 @created 6th May, 2015 @package Component Builder @subpackage joomla_components.php @@ -114,8 +114,8 @@ class ComponentbuilderControllerJoomla_components extends JControllerAdmin // Check for request forgeries JSession::checkToken() or die(JText::_('JINVALID_TOKEN')); // check if import is allowed for this user. - $user = JFactory::getUser(); - if ($user->authorise('joomla_component.import', 'com_componentbuilder') && $user->authorise('core.import', 'com_componentbuilder')) + $model->user = JFactory::getUser(); + if ($model->user->authorise('joomla_component.import', 'com_componentbuilder') && $model->user->authorise('core.import', 'com_componentbuilder')) { $session = JFactory::getSession(); $session->set('backto_VDM_IMPORT', 'joomla_components'); @@ -135,9 +135,11 @@ class ComponentbuilderControllerJoomla_components extends JControllerAdmin { // Check for request forgeries JSession::checkToken() or die(JText::_('JINVALID_TOKEN')); + // Get the model + $model = $this->getModel('Joomla_components'); // check if export is allowed for this user. - $user = JFactory::getUser(); - if ($user->authorise('joomla_component.export', 'com_componentbuilder') && $user->authorise('core.export', 'com_componentbuilder')) + $model->user = JFactory::getUser(); + if ($model->user->authorise('joomla_component.export', 'com_componentbuilder') && $model->user->authorise('core.export', 'com_componentbuilder')) { // Get the input $input = JFactory::getApplication()->input; @@ -152,8 +154,6 @@ class ComponentbuilderControllerJoomla_components extends JControllerAdmin $this->setRedirect(JRoute::_('index.php?option=com_componentbuilder&view=joomla_components', false), $message, 'error'); return; } - // Get the model - $model = $this->getModel('Joomla_components'); // set auto loader ComponentbuilderHelper::autoLoader('smart'); // get the data to export @@ -239,4 +239,154 @@ class ComponentbuilderControllerJoomla_components extends JControllerAdmin $this->setRedirect(JRoute::_('index.php?option=com_componentbuilder&view=joomla_components', false), $message, 'error'); return; } + + public function backup() + { + // get params + if (!isset($this->params) || !ComponentbuilderHelper::checkObject($this->params)) + { + $this->params = JComponentHelper::getParams('com_componentbuilder'); + } + // get all component IDs to backup + $pks = componentbuilderHelper::getComponentIDs(); + // Get the model + $model = componentbuilderHelper::getModel('joomla_components', JPATH_ADMINISTRATOR . '/components/com_componentbuilder'); + // set user + $model->user = $this->getApiUser(); + // make sure to set active type to backup + $model->activeType = 'manualBackup'; + // set auto loader + ComponentbuilderHelper::autoLoader('smart'); + // manual backup message + $backupNotice = array(); + // get the data to export + if (ComponentbuilderHelper::checkArray($pks) && $model->getSmartExport($pks)) + { + $backupNotice[] = JText::_('COM_COMPONENTBUILDER_BACKUP_WAS_DONE_SUCCESSFULLY'); + $backupNoticeStatus = 'Success'; + // set the key string + if (componentbuilderHelper::checkString($model->key) && strlen($model->key) == 32) + { + $textNotice = array(); + $keyNotice = '

    ' . JText::sprintf('COM_COMPONENTBUILDER_THE_PACKAGE_KEY_IS_CODESCODE', $model->key) . '

    '; + $textNotice[] = JText::sprintf('COM_COMPONENTBUILDER_THE_PACKAGE_KEY_IS_S', $model->key); + $keyNotice .= JText::_('COM_COMPONENTBUILDER_YOUR_DATA_IS_ENCRYPTED_WITH_A_AES_ONE_HUNDRED_AND_TWENTY_EIGHT_BIT_ENCRYPTION_USING_THE_ABOVE_THIRTY_TWO_CHARACTER_KEY_WITHOUT_THIS_KEY_IT_WILL_TAKE_THE_CURRENT_TECHNOLOGY_WITH_A_BRUTE_FORCE_ATTACK_METHOD_MORE_THEN_A_HREFHTTPRANDOMIZECOMHOWLONGTOHACKPASS_TARGET_BLANK_TITLEHOW_LONG_TO_HACK_PASSSEVEN_HUNDRED_ZERO_ZERO_ZERO_ZERO_ZERO_ZERO_ZERO_ZERO_ZERO_ZEROA_YEARS_TO_CRACK_THEORETICALLY_UNLESS_THEY_HAVE_THIS_KEY_ABOVE_SO_DO_KEEP_IT_SAFE') . '
    '; + // set the package owner info + if ((isset($model->info['getKeyFrom']['company']) && componentbuilderHelper::checkString($model->info['getKeyFrom']['company'])) || (isset($model->info['getKeyFrom']['owner']) && componentbuilderHelper::checkString($model->info['getKeyFrom']['owner']))) + { + $ownerDetails = '

    ' . JText::_('COM_COMPONENTBUILDER_PACKAGE_OWNER_DETAILS') . '

    '; + $textNotice[] = '# ' . JText::_('COM_COMPONENTBUILDER_PACKAGE_OWNER_DETAILS'); + $ownerDetails .= '
      '; + if (isset($model->info['getKeyFrom']['company']) && componentbuilderHelper::checkString($model->info['getKeyFrom']['company'])) + { + $ownerDetails .= '
    • ' . JText::sprintf('COM_COMPONENTBUILDER_EMCOMPANYEM_BSB', $model->info['getKeyFrom']['company']) . '
    • '; + $textNotice[] = '- ' . JText::sprintf('COM_COMPONENTBUILDER_COMPANY_S', $model->info['getKeyFrom']['company']); + } + // add value only if set + if (isset($model->info['getKeyFrom']['owner']) && componentbuilderHelper::checkString($model->info['getKeyFrom']['owner'])) + { + $ownerDetails .= '
    • ' . JText::sprintf('COM_COMPONENTBUILDER_EMOWNEREM_BSB', $model->info['getKeyFrom']['owner']) . '
    • '; + $textNotice[] = '- ' . JText::sprintf('COM_COMPONENTBUILDER_OWNER_S', $model->info['getKeyFrom']['owner']); + } + // add value only if set + if (isset($model->info['getKeyFrom']['website']) && componentbuilderHelper::checkString($model->info['getKeyFrom']['website'])) + { + $ownerDetails .= '
    • ' . JText::sprintf('COM_COMPONENTBUILDER_EMWEBSITEEM_BSB', $model->info['getKeyFrom']['website']) . '
    • '; + $textNotice[] = '- ' . JText::sprintf('COM_COMPONENTBUILDER_WEBSITE_S', $model->info['getKeyFrom']['website']); + } + // add value only if set + if (isset($model->info['getKeyFrom']['email']) && componentbuilderHelper::checkString($model->info['getKeyFrom']['email'])) + { + $ownerDetails .= '
    • ' . JText::sprintf('COM_COMPONENTBUILDER_EMEMAILEM_BSB', $model->info['getKeyFrom']['email']) . '
    • '; + $textNotice[] = '- ' . JText::sprintf('COM_COMPONENTBUILDER_EMAIL_S', $model->info['getKeyFrom']['email']); + } + // add value only if set + if (isset($model->info['getKeyFrom']['license']) && componentbuilderHelper::checkString($model->info['getKeyFrom']['license'])) + { + $ownerDetails .= '
    • ' . JText::sprintf('COM_COMPONENTBUILDER_EMLICENSEEM_BSB', $model->info['getKeyFrom']['license']) . '
    • '; + $textNotice[] = '- ' . JText::sprintf('COM_COMPONENTBUILDER_LICENSE_S', $model->info['getKeyFrom']['license']); + } + // add value only if set + if (isset($model->info['getKeyFrom']['copyright']) && componentbuilderHelper::checkString($model->info['getKeyFrom']['copyright'])) + { + $ownerDetails .= '
    • ' . JText::sprintf('COM_COMPONENTBUILDER_EMCOPYRIGHTEM_BSB', $model->info['getKeyFrom']['copyright']) . '
    • '; + $textNotice[] = '- ' . JText::sprintf('COM_COMPONENTBUILDER_COPYRIGHT_S', $model->info['getKeyFrom']['copyright']); + } + $ownerDetails .= '
    '; + $backupNotice[] = JText::_('COM_COMPONENTBUILDER_OWNER_DETAILS_WAS_SET'); + } + else + { + $ownerDetails = '

    ' . JText::_('COM_COMPONENTBUILDER_PACKAGE_OWNER_NOT_SET') . '

    '; + $textNotice[] = '# ' . JText::_('COM_COMPONENTBUILDER_PACKAGE_OWNER_DETAILS'); + $ownerDetails .= JText::_('COM_COMPONENTBUILDER_TO_CHANGE_THE_PACKAGE_OWNER_DEFAULTS_OPEN_THE_BJCB_GLOBAL_OPTIONSB_GO_TO_THE_BCOMPANYB_TAB_AND_ADD_THE_CORRECT_COMPANY_DETAILS_THERE') . '
    '; + $textNotice[] = JText::_('COM_COMPONENTBUILDER_TO_CHANGE_THE_PACKAGE_OWNER_DEFAULTS_OPEN_THE_JCB_GLOBAL_OPTIONS_GO_TO_THE_COMPANY_TAB_AND_ADD_THE_CORRECT_COMPANY_DETAILS_THERE'); + $ownerDetails .= '

    ' . JText::_('COM_COMPONENTBUILDER_YOU_SHOULD_ADD_THE_CORRECT_OWNER_DETAILS') . '

    '; + $textNotice[] = '## ' . JText::_('COM_COMPONENTBUILDER_YOU_SHOULD_ADD_THE_CORRECT_OWNER_DETAILS'); + $ownerDetails .= JText::_('COM_COMPONENTBUILDER_SINCE_THE_OWNER_DETAILS_ARE_DISPLAYED_DURING_BIMPORT_PROCESSB_BEFORE_ADDING_THE_KEY_THIS_WAY_IF_THE_USERDEV_BDOES_NOTB_HAVE_THE_KEY_THEY_CAN_SEE_BWHERE_TO_GET_ITB') . '
    '; + $textNotice[] = JText::_('COM_COMPONENTBUILDER_SINCE_THE_OWNER_DETAILS_ARE_DISPLAYED_DURING_IMPORT_PROCESS_BEFORE_ADDING_THE_KEY_THIS_WAY_IF_THE_USERDEV_DOES_NOT_HAVE_THE_KEY_THEY_CAN_SEE_WHERE_TO_GET_IT'); + $backupNotice[] = JText::_('COM_COMPONENTBUILDER_CHECK_YOUR_OWNER_DETAILS_IT_HAS_NOT_BEEN_SET_OPEN_THE_JCB_GLOBAL_OPTIONS_GO_TO_THE_COMPANY_TAB_AND_ADD_THE_CORRECT_COMPANY_DETAILS_THERE'); + } + } + else + { + $keyNotice = '

    ' . JText::_('COM_COMPONENTBUILDER_THIS_PACKAGE_HAS_NO_KEY') . '

    '; + $textNotice[] = '# ' . JText::_('COM_COMPONENTBUILDER_THIS_PACKAGE_HAS_NO_KEY'); + $ownerDetails = JText::_('COM_COMPONENTBUILDER_THAT_MEANS_ANYONE_WHO_HAS_THIS_PACKAGE_CAN_INSTALL_IT_INTO_JCB_TO_ADD_AN_EXPORT_KEY_SIMPLY_OPEN_THE_COMPONENT_GO_TO_THE_TAB_CALLED_BSETTINGSB_BOTTOM_RIGHT_THERE_IS_A_FIELD_CALLED_BEXPORT_KEYB') . '
    '; + $textNotice[] = JText::_('COM_COMPONENTBUILDER_THAT_MEANS_ANYONE_WHO_HAS_THIS_PACKAGE_CAN_INSTALL_IT_INTO_JCB_TO_ADD_AN_EXPORT_KEY_SIMPLY_OPEN_THE_COMPONENT_GO_TO_THE_TAB_CALLED_SETTINGS_BOTTOM_RIGHT_THERE_IS_A_FIELD_CALLED_EXPORT_KEY'); + $backupNotice[] = JText::_('COM_COMPONENTBUILDER_NO_KEYS_WERE_FOUND_TO_ADD_AN_EXPORT_KEY_SIMPLY_OPEN_THE_COMPONENT_GO_TO_THE_TAB_CALLED_SETTINGS_BOTTOM_RIGHT_THERE_IS_A_FIELD_CALLED_EXPORT_KEY'); + } + // get email + if ($email = $this->params->get('backup_email', null)) + { + // plain text + $plainText = implode("\n", $textNotice); + // set hash to track changes + $hashTracker = md5($plainText); + if (ComponentbuilderHelper::newHash($hashTracker)) + { + // Build final massage. + $message = $keyNotice . $ownerDetails . '
    HASH: ' . $hashTracker . ''; + // set the subject + $subject = JText::_('COM_COMPONENTBUILDER_JOOMLA_COMPONENT_BUILDER_BACKUP_KEY'); + // email the message + componentbuilderEmail::send($email, $subject, componentbuilderEmail::setHtmlEmailBody($message, $subject), $plainText, 1); + $backupNotice[] = JText::_('COM_COMPONENTBUILDER_EMAIL_WITH_THE_NEW_KEY_WAS_SEND'); + } + else + { + $backupNotice[] = JText::_('COM_COMPONENTBUILDER_KEY_HAS_NOT_CHANGED'); + } + } + } + else + { + $backupNotice[] = JText::_('COM_COMPONENTBUILDER_BACKUP_FAILED_PLEASE_TRY_AGAIN_IF_THE_ERROR_CONTINUE_PLEASE_CONTACT_YOUR_SYSTEM_ADMINISTRATOR'); + $backupNoticeStatus = 'Error'; + if (componentbuilderHelper::checkString($model->packagePath)) + { + // clear all if not successful + ComponentbuilderHelper::removeFolder($model->packagePath); + } + if (componentbuilderHelper::checkString($model->zipPath)) + { + // clear all if not successful + JFile::delete($model->zipPath); + } + } + // quite only if auto backup (adding this script from custom code :) + if ('backup' === 'manualBackup') + { + echo "# " . $backupNoticeStatus . "\n" .implode("\n", $backupNotice); + jexit(); + } + $this->setRedirect(JRoute::_('index.php?option=com_componentbuilder&view=joomla_components', false), implode("
    ", $backupNotice), $backupNoticeStatus); + return; + } + + protected function getApiUser() + { + // admin area does not have API user, only front-end (so we fallback on login user) + return JFactory::getUser(); + } } diff --git a/admin/helpers/compiler/e_Interpretation.php b/admin/helpers/compiler/e_Interpretation.php index ff3bca915..dbf015ba5 100644 --- a/admin/helpers/compiler/e_Interpretation.php +++ b/admin/helpers/compiler/e_Interpretation.php @@ -92,6 +92,7 @@ class Interpretation extends Fields { // set email helper in place with component name $component = $this->fileContentStatic['###component###']; + $Component = $this->fileContentStatic['###Component###']; $target = array('admin' => 'emailer'); $done = $this->buildDynamique($target,'emailer',$component); if ($done) @@ -99,7 +100,7 @@ class Interpretation extends Fields // the text for the file ###BAKING### $this->fileContentDynamic['emailer_'.$component]['###BAKING###'] = ''; // <<-- to insure it gets updated // return the code need to load the abstract class - return PHP_EOL."JLoader::register('".$component."Email', JPATH_COMPONENT_ADMINISTRATOR . '/helpers/".$component."email.php'); "; + return PHP_EOL."JLoader::register('".$Component."Email', JPATH_COMPONENT_ADMINISTRATOR . '/helpers/".$component."email.php'); "; } } return ''; @@ -3946,7 +3947,7 @@ class Interpretation extends Fields if (ComponentbuilderHelper::checkString($script)) { $script .= PHP_EOL."\t\t\t".'echo \''; - $script .= PHP_EOL."\t\t\t\t".''; + $script .= PHP_EOL."\t\t\t\t".''; $script .= PHP_EOL."\t\t\t\t".'\';'; return $script; @@ -3963,7 +3964,7 @@ class Interpretation extends Fields if (isset($this->componentData->admin_views) && ComponentbuilderHelper::checkArray($this->componentData->admin_views)) { $script .= PHP_EOL."\t\t\t".'echo \''; - $script .= PHP_EOL."\t\t\t\t".''; + $script .= PHP_EOL."\t\t\t\t".''; $script .= PHP_EOL."\t\t\t\t".''; $script .= PHP_EOL."\t\t\t\t

    Upgrade to Version ".$this->fileContentStatic['###VERSION###']." Was Successful! Let us know if anything is not working as expected.

    ';"; } @@ -11232,7 +11233,7 @@ class Interpretation extends Fields { $imagePath = $this->componentPath.'/admin/assets/images'; // move the image to its place - JFile::copy(JPATH_SITE.'/'.$path, $imagePath.'/component-300.'.$type,'',true); + JFile::copy(JPATH_SITE.'/'.$path, $imagePath.'/vdm-component.'.$type,'',true); // now set the type to global for re-use $this->componentImageType = $type; // return image type diff --git a/admin/helpers/compiler/f_Infusion.php b/admin/helpers/compiler/f_Infusion.php index 945ab17e4..7bed309f5 100644 --- a/admin/helpers/compiler/f_Infusion.php +++ b/admin/helpers/compiler/f_Infusion.php @@ -1061,6 +1061,11 @@ class Infusion extends Interpretation // setup the templates $this->setCustomViewTemplateBody($view); } + // if no default site view was set, the redirect to root + if (!isset($this->fileContentStatic['###SITE_DEFAULT_VIEW###'])) + { + $this->fileContentStatic['###SITE_DEFAULT_VIEW###'] = ''; + } // set site custom script to helper class // ###SITE_CUSTOM_HELPER_SCRIPT### $this->fileContentStatic['###SITE_CUSTOM_HELPER_SCRIPT###'] diff --git a/admin/helpers/componentbuilder.php b/admin/helpers/componentbuilder.php index 787ba22b7..ef2b0ed0d 100644 --- a/admin/helpers/componentbuilder.php +++ b/admin/helpers/componentbuilder.php @@ -11,7 +11,7 @@ /-------------------------------------------------------------------------------------------------------------------------------/ @version 2.4.10 - @build 12th August, 2017 + @build 19th August, 2017 @created 30th April, 2015 @package Component Builder @subpackage componentbuilder.php @@ -39,8 +39,29 @@ abstract class ComponentbuilderHelper { // the Session keeps track of all data related to the current session of this user self::loadSession(); - } + } + /* + * get all component IDs + */ + public static function getComponentIDs() + { + // Get a db connection. + $db = JFactory::getDbo(); + // Create a new query object. + $query = $db->getQuery(true); + $query->select($db->quoteName(array('id'))); + $query->from($db->quoteName('#__componentbuilder_joomla_component')); + $query->where($db->quoteName('published') . ' >= 1'); // do not backup trash + $db->setQuery($query); + $db->execute(); + if ($db->getNumRows()) + { + return $db->loadColumn(); + } + return false; + } + /* * Autoloader */ @@ -77,8 +98,43 @@ abstract class ComponentbuilderHelper // load this for all jimport('joomla.application'); } - + /** + * Remove folders with files + * + * @param string $dir The path to folder to remove + * @param boolean $git if there is a git folder in that must not be removed + * + * @return boolean True in all is removed + * + */ + public static function removeFolder($dir, $git = false) + { + if (JFolder::exists($dir)) + { + $it = new RecursiveDirectoryIterator($dir); + $it = new RecursiveIteratorIterator($it, RecursiveIteratorIterator::CHILD_FIRST); + foreach ($it as $file) + { + if ('.' === $file->getBasename() || '..' === $file->getBasename()) continue; + if ($file->isDir()) + { + if ($git && strpos($file->getPathname(), $dir.'/.git') !== false) continue; + JFolder::delete($file->getPathname()); + } + else + { + if ($git && strpos($file->getPathname(), $dir.'/.git') !== false) continue; + JFile::delete($file->getPathname()); + } + } + if (!$git && JFolder::delete($dir)) + { + return true; + } + } + return false; + } /** * The dynamic builder of views, tables and fields **/ public static function dynamicBuilder(&$data, $type) @@ -130,69 +186,39 @@ abstract class ComponentbuilderHelper } return false; } - - /** - * Remove folders with files - * - * @param string $dir The path to folder to remove - * @param boolean $git if there is a git folder in that must not be removed - * - * @return boolean True in all is removed - * - */ - public static function removeFolder($dir, $git = false) - { - if (JFolder::exists($dir)) - { - $it = new RecursiveDirectoryIterator($dir); - $it = new RecursiveIteratorIterator($it, RecursiveIteratorIterator::CHILD_FIRST); - foreach ($it as $file) - { - if ('.' === $file->getBasename() || '..' === $file->getBasename()) continue; - if ($file->isDir()) - { - if ($git && strpos($file->getPathname(), $dir.'/.git') !== false) continue; - JFolder::delete($file->getPathname()); - } - else - { - if ($git && strpos($file->getPathname(), $dir.'/.git') !== false) continue; - JFile::delete($file->getPathname()); - } - } - if (!$git && JFolder::delete($dir)) - { - return true; - } - } - return false; - } /** * Create file and write data to the file **/ public static function writeFile($path, $data) { + $klaar = false; + // open the file $fh = fopen($path, "w"); if (!is_resource($fh)) { - return false; + return $klaar; } + // write to the file if (fwrite($fh, $data)) { - // close file. - fclose($fh); - return true; + // has been done + $klaar = true; } // close file. fclose($fh); - return false; + return $klaar; } /** * The user notice info File Name **/ protected static $usernotice = false; + + /** + * The backup hash file name + **/ + protected static $backuphash = false; public static function getFilePath($type, $name = 'listing', $key = '', $fileType = '.json', $PATH = JPATH_COMPONENT_SITE) { @@ -1131,7 +1157,31 @@ abstract class ComponentbuilderHelper } return self::$localSession[$key]; } - + + + /** + * check if it is a new hash + **/ + public static function newHash($hash, $name = 'backup', $type = 'hash', $key = '', $fileType = '.txt') + { + // make sure we have a hash + if (self::checkString($hash)) + { + // first get the file path + $path_filename = self::getFilePath($name, $type, $key, $fileType, JPATH_COMPONENT_ADMINISTRATOR); + // set as read if not already set + if (($content = @file_get_contents($path_filename)) !== FALSE) + { + if ($hash == $content) + { + return false; + } + } + // set the hash + return self::writeFile($path_filename, $hash); + } + return false; + } /** * Load the Component xml manifest. **/ @@ -1670,7 +1720,14 @@ abstract class ComponentbuilderHelper $query = $db->getQuery(true); $query->select($db->quoteName(array($what))); - $query->from($db->quoteName('#_'.$main.'_'.$table)); + if (empty($table)) + { + $query->from($db->quoteName('#__'.$main)); + } + else + { + $query->from($db->quoteName('#__'.$main.'_'.$table)); + } $query->where($db->quoteName($whereString) . ' '.$operator.' (' . implode(',',$where) . ')'); $db->setQuery($query); $db->execute(); @@ -1953,12 +2010,20 @@ abstract class ComponentbuilderHelper **/ public static function getModel($name, $path = JPATH_COMPONENT_ADMINISTRATOR, $component = 'componentbuilder') { - // load some joomla helpers - JLoader::import('joomla.application.component.model'); // load the model file - JLoader::import( $name, $path . '/models' ); - // return instance - return JModelLegacy::getInstance( $name, $component.'Model' ); + JModelLegacy::addIncludePath( $path . '/models' ); + // get instance + $model = JModelLegacy::getInstance( $name, $component.'Model' ); + // if model not found + if ($model == false) + { + // build class name + $class = $prefix.$name; + // initilize the model + new $class(); + $model = JModelLegacy::getInstance($name, $prefix); + } + return $model; } /** @@ -2165,10 +2230,16 @@ abstract class ComponentbuilderHelper return false; } + // typo sorry! public static function sorten($string, $length = 40, $addTip = true) + { + return self::shorten($string, $length, $addTip); + } + + public static function shorten($string, $length = 40, $addTip = true) { if (self::checkString($string)) - { + { $initial = strlen($string); $words = preg_split('/([\s\n\r]+)/', $string, null, PREG_SPLIT_DELIM_CAPTURE); $words_count = count($words); @@ -2188,7 +2259,7 @@ abstract class ComponentbuilderHelper $final = strlen($newString); if ($initial != $final && $addTip) { - $title = self::sorten($string, 400 , false); + $title = self::shorten($string, 400 , false); return ''.trim($newString).'...'; } elseif ($initial != $final && !$addTip) @@ -2287,15 +2358,15 @@ abstract class ComponentbuilderHelper return ''; } - public static function htmlEscape($var, $charset = 'UTF-8', $sorten = false, $length = 40) + public static function htmlEscape($var, $charset = 'UTF-8', $shorten = false, $length = 40) { if (self::checkString($var)) { $filter = new JFilterInput(); $string = $filter->clean(html_entity_decode(htmlentities($var, ENT_COMPAT, $charset)), 'HTML'); - if ($sorten) + if ($shorten) { - return self::sorten($string,$length); + return self::shorten($string,$length); } return $string; } diff --git a/admin/helpers/componentbuilderemail.php b/admin/helpers/componentbuilderemail.php new file mode 100644 index 000000000..e4fc72f22 --- /dev/null +++ b/admin/helpers/componentbuilderemail.php @@ -0,0 +1,342 @@ + + @copyright Copyright (C) 2015. All Rights Reserved + @license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html + + Builds Complex Joomla Components + +/-----------------------------------------------------------------------------------------------------------------------------*/ + +/** + * Componentbuilder component email helper + */ +abstract class ComponentbuilderEmail +{ + /** + * Configuraiton object + * + * @var JConfig + */ + public static $config = null; + + /** + * Mailer object + * + * @var JMail + */ + public static $mailer = null; + + /** + * Get a configuration object + * + */ + public static function getConfig() + { + if (!self::$config) + { + self::$config = JComponentHelper::getParams('com_componentbuilder'); + } + + return self::$config; + } + + /** + * Get a mailer object. + * + * Returns the global {@link JMail} object, only creating it if it doesn't already exist. + * + * @return JMail object + * + * @see JMail + */ + public static function getMailer() + { + if (!self::$mailer) + { + self::$mailer = self::createMailer(); + } + + $copy = clone self::$mailer; + + return $copy; + } + + /** + * Create a mailer object + * + * @return JMail object + * + * @see JMail + */ + protected static function createMailer() + { + // set component params + $conf = self::getConfig(); + + // now load the mailer + $mailer = $conf->get('mailer', 'global'); + + // Create a JMail object + $mail = JMail::getInstance(); + + // check if set to global + if ('global' == $mailer) + { + // get the global details + $globalConf = JFactory::getConfig(); + + $mailer = $globalConf->get('mailer'); + $smtpauth = ($globalConf->get('smtpauth') == 0) ? null : 1; + $smtpuser = $globalConf->get('smtpuser'); + $smtppass = $globalConf->get('smtppass'); + $smtphost = $globalConf->get('smtphost'); + $smtpsecure = $globalConf->get('smtpsecure'); + $smtpport = $globalConf->get('smtpport'); + $sendmail = $globalConf->get('sendmail'); + $mailfrom = $globalConf->get('mailfrom'); + $fromname = $globalConf->get('fromname'); + } + else + { + $smtpauth = ($conf->get('smtpauth') == 0) ? null : 1; + $smtpuser = $conf->get('smtpuser'); + $smtppass = $conf->get('smtppass'); + $smtphost = $conf->get('smtphost'); + $smtpsecure = $conf->get('smtpsecure'); + $smtpport = $conf->get('smtpport'); + $sendmail = $conf->get('sendmail'); + $mailfrom = $conf->get('mailfrom'); + $fromname = $conf->get('fromname'); + $mailreply = $conf->get('mailreply'); + $replyname = $conf->get('replyname'); + + // set the global reply-to + if ($mailreply && $fromname) + { + $mail->ClearReplyTos(); + $mail->addReplyTo( array( $mailreply, $replyname ) ); + } + } + + // Set global sender + $mail->setSender(array($mailfrom, $fromname)); + + // Default mailer is to use PHP's mail function + switch ($mailer) + { + case 'smtp': + // set the SMTP option + $mail->useSMTP($smtpauth, $smtphost, $smtpuser, $smtppass, $smtpsecure, $smtpport); + break; + + case 'sendmail': + // set the sendmail option + $mail->useSendmail($sendmail); + $mail->IsSendmail(); + break; + + default: + $mail->IsMail(); + break; + } + + return $mail; + } + + /** + * Send an email + * + * @return bool on success + * + */ + public static function send($recipient, $subject, $body, $textonly, $mode = 0, $bounce_email = null, $idsession = null, $mailreply = null, $replyname = null , $mailfrom = null, $fromname = null, $cc = null, $bcc = null, $attachment = null, $embeded = null , $embeds = null) + { + + // Get a JMail instance + $mail = self::getMailer(); + + // set component params + $conf = self::getConfig(); + + // do some house cleaning + $mail->ClearReplyTos(); + + // set if we have override + if ($mailfrom && $fromname) + { + $mail->setSender(array($mailfrom, $fromname)); + } + + // load the bounce email as sender if set + if (!is_null($bounce_email)) + { + + $mail->Sender = $bounce_email; + } + + // Add tag to email to identify it + if (!is_null($idsession)) + { + $mail->addCustomHeader('X-VDMmethodID:'.$idsession); + } + + // set the subject & Body + $mail->setSubject($subject); + $mail->setBody($body); + + // Are we sending the email as HTML? + if ($mode) + { + $mail->IsHTML(true); + $mail->AltBody = $textonly; + } + + //embed images + if ($embeded) + { + if(ComponentbuilderHelper::checkArray($embeds)) + { + foreach($embeds as $embed) + { + $mail->AddEmbeddedImage($embed->Path,$embed->FileName); + } + } + } + + $mail->addRecipient($recipient); + $mail->addCC($cc); + $mail->addBCC($bcc); + $mail->addAttachment($attachment); + + // Take care of reply email addresses + if (is_array($mailreply)) + { + $mail->ClearReplyTos(); + $numReplyTo = count($mailreply); + for ($i=0; $i < $numReplyTo; $i++) + { + $mail->addReplyTo($mailreply[$i], $replyname[$i]); + } + } + elseif (!empty($mailreply)) + { + $mail->ClearReplyTos(); + $mail->addReplyTo($mailreply, $replyname); + } + + // check if we can add the DKIM to email + if ($conf->get('enable_dkim')) + { + if (!empty($conf->get('dkim_domain')) && !empty($conf->get('dkim_selector')) && !empty($conf->get('dkim_private')) && !empty($conf->get('dkim_public'))) + { + $mail->DKIM_domain = $conf->get('dkim_domain'); + $mail->DKIM_selector = $conf->get('dkim_selector'); + $mail->DKIM_identity = $conf->get('dkim_identity'); + $mail->DKIM_passphrase = $conf->get('dkim_passphrase'); + + $tmp = tempnam(sys_get_temp_dir(), 'VDM'); + $h = fopen($tmp, 'w'); + fwrite($h, $conf->get('dkim_private')); + fclose($h); + $mail->DKIM_private = $tmp; + } + } + + $sendmail = $mail->Send(); + + if ($conf->get('enable_dkim') && !empty($conf->get('dkim_domain')) && !empty($conf->get('dkim_selector')) && !empty($conf->get('dkim_private')) && !empty($conf->get('dkim_public'))) + { + @unlink($tmp); + } + + if (method_exists('ComponentbuilderHelper','storeMessage')) + { + // store the massage if the method is set + ComponentbuilderHelper::storeMessage($sendmail, $recipient, $subject, $body, $textonly, $mode, 'email'); + } + + return $sendmail; + } + + /** + * Set the HTML email body + * + * @return string on success + * + */ + public static function setHtmlEmailBody($html, $subject) + { + $body = array(); + $body[] = ""; + $body[] = ""; + $body[] = ""; + $body[] = ""; + $body[] = ""; + $body[] = "".$subject.""; + $body[] = ""; + $body[] = ""; + $body[] = ""; + $body[] = ""; + $body[] = "\n"; + $body[] = ""; + $body[] = ""; + $body[] = ""; + $body[] = ""; + $body[] = "
    "; + $body[] = ""; + $body[] = ""; + $body[] = ""; + $body[] = ""; + $body[] = ""; + $body[] = "
    "; + $body[] = ""; + $body[] = ""; + $body[] = ""; + $body[] = ""; + $body[] = ""; + $body[] = "
    "; + $body[] = $html; + $body[] = "
    "; + $body[] = ""; + $body[] = "
    "; + $body[] = ""; + $body[] = "
    "; + $body[] = ""; + $body[] = ""; + $body[] = ""; + + return implode("\n", $body); + } +} diff --git a/admin/helpers/headercheck.php b/admin/helpers/headercheck.php index bb315e266..6236cebdd 100644 --- a/admin/helpers/headercheck.php +++ b/admin/helpers/headercheck.php @@ -11,7 +11,7 @@ /-------------------------------------------------------------------------------------------------------------------------------/ @version 2.4.10 - @build 12th August, 2017 + @build 19th August, 2017 @created 30th April, 2015 @package Component Builder @subpackage headercheck.php diff --git a/admin/helpers/html/batch_.php b/admin/helpers/html/batch_.php index b48cbbef5..fd9e74b70 100644 --- a/admin/helpers/html/batch_.php +++ b/admin/helpers/html/batch_.php @@ -11,7 +11,7 @@ /-------------------------------------------------------------------------------------------------------------------------------/ @version 2.4.10 - @build 12th August, 2017 + @build 19th August, 2017 @created 30th April, 2015 @package Component Builder @subpackage batch_.php diff --git a/admin/helpers/indenter.php b/admin/helpers/indenter.php index ede4d931b..d360a2010 100644 --- a/admin/helpers/indenter.php +++ b/admin/helpers/indenter.php @@ -11,7 +11,7 @@ /-------------------------------------------------------------------------------------------------------------------------------/ @version 2.4.10 - @build 12th August, 2017 + @build 19th August, 2017 @created 30th April, 2015 @package Component Builder @subpackage indenter.php diff --git a/admin/helpers/js.php b/admin/helpers/js.php index 697fefdcc..eb82eb1bb 100644 --- a/admin/helpers/js.php +++ b/admin/helpers/js.php @@ -11,7 +11,7 @@ /-------------------------------------------------------------------------------------------------------------------------------/ @version 2.4.10 - @build 12th August, 2017 + @build 19th August, 2017 @created 30th April, 2015 @package Component Builder @subpackage js.php diff --git a/admin/helpers/minify.php b/admin/helpers/minify.php index f4353cd76..dfae40d96 100644 --- a/admin/helpers/minify.php +++ b/admin/helpers/minify.php @@ -11,7 +11,7 @@ /-------------------------------------------------------------------------------------------------------------------------------/ @version 2.4.10 - @build 12th August, 2017 + @build 19th August, 2017 @created 30th April, 2015 @package Component Builder @subpackage minify.php diff --git a/admin/language/en-GB/en-GB.com_componentbuilder.ini b/admin/language/en-GB/en-GB.com_componentbuilder.ini index f00d510e7..c6b4f118b 100644 --- a/admin/language/en-GB/en-GB.com_componentbuilder.ini +++ b/admin/language/en-GB/en-GB.com_componentbuilder.ini @@ -705,7 +705,10 @@ COM_COMPONENTBUILDER_AUTHOR="Author" COM_COMPONENTBUILDER_A_FEW_CLOSED_ISSUES_FROM_GITHUB_IS_LOADING="A few closed issues from Github is loading" COM_COMPONENTBUILDER_A_FEW_OPEN_ISSUES_FROM_GITHUB_IS_LOADING="A few open issues from Github is loading" COM_COMPONENTBUILDER_BACK="Back" +COM_COMPONENTBUILDER_BACKUP="Backup" +COM_COMPONENTBUILDER_BACKUP_FAILED_PLEASE_TRY_AGAIN_IF_THE_ERROR_CONTINUE_PLEASE_CONTACT_YOUR_SYSTEM_ADMINISTRATOR="Backup failed, please try again. If the error continue, please contact your system administrator." COM_COMPONENTBUILDER_BACKUP_LOCAL_DATA_FIRST="Backup Local Data First" +COM_COMPONENTBUILDER_BACKUP_WAS_DONE_SUCCESSFULLY="Backup was done successfully" COM_COMPONENTBUILDER_BADMIN_VIEW_IN_SB_HAS_ID_MISMATCH_OF_SELECTED_BADMIN_VIEWB_SO_THE_IDS_WAS_REMOVED="Admin view in %s has id mismatch of selected admin view. So the id:%s was removed!" COM_COMPONENTBUILDER_BASIC_METHOD="Basic Method" COM_COMPONENTBUILDER_BCOMPONENT_IN_SB_HAS_ID_MISMATCH_OF_SELECTED_BCOMPONENTB_SO_THE_IDS_WAS_REMOVED="Component in %s has id mismatch of selected component. So the id:%s was removed!" @@ -731,8 +734,10 @@ COM_COMPONENTBUILDER_BSB_HAS_ID_MISMATCH_OF_SELECTED_BFIELDB_SO_THE_IDS_WAS_REMO COM_COMPONENTBUILDER_BSITE_VIEW_IN_SB_HAS_ID_MISMATCH_OF_SELECTED_BSITE_VIEWB_SO_THE_IDS_WAS_REMOVED="Site view in %s has id mismatch of selected site view. So the id:%s was removed!" COM_COMPONENTBUILDER_BSNIPPETB_IDS_MISMATCH_IN_BSB="Snippet id:%s mismatch in %s." COM_COMPONENTBUILDER_BVIEW_TABLE_MAINB_IDS_MISMATCH_IN_BSB="View table main id:%s mismatch in %s." +COM_COMPONENTBUILDER_CHECK_YOUR_OWNER_DETAILS_IT_HAS_NOT_BEEN_SET_OPEN_THE_JCB_GLOBAL_OPTIONS_GO_TO_THE_COMPANY_TAB_AND_ADD_THE_CORRECT_COMPANY_DETAILS_THERE="Check your owner details, it has not been set. Open the JCB Global Options, go to the Company tab and add the correct company details there." COM_COMPONENTBUILDER_CLEAR_TMP="Clear tmp" COM_COMPONENTBUILDER_COMPANY="Company" +COM_COMPONENTBUILDER_COMPANY_S="Company: %s" COM_COMPONENTBUILDER_COMPILER="Compiler" COM_COMPONENTBUILDER_COMPILER_ACCESS="Compiler Access" COM_COMPONENTBUILDER_COMPILER_ACCESS_DESC=" Allows the users in this group to access compiler." @@ -747,15 +752,76 @@ COM_COMPONENTBUILDER_COMPILE_COMPONENT="Compile Component" COM_COMPONENTBUILDER_COMPONENTS="Components" COM_COMPONENTBUILDER_COMPONENT_GLOBAL_SETTINGS="Component Global Settings" COM_COMPONENTBUILDER_CONFIG_ALMOST_FLAT_LOAD="Almost Flat" +COM_COMPONENTBUILDER_CONFIG_API_DESCRIPTION="This User will be used to log the API call." +COM_COMPONENTBUILDER_CONFIG_API_LABEL="API User" COM_COMPONENTBUILDER_CONFIG_AUTHOR="Author Info" COM_COMPONENTBUILDER_CONFIG_AUTHOR_EMAIL_DESC="The email address of the author of this component." COM_COMPONENTBUILDER_CONFIG_AUTHOR_EMAIL_LABEL="Author Email" COM_COMPONENTBUILDER_CONFIG_AUTHOR_NAME_DESC="The name of the author of this component." COM_COMPONENTBUILDER_CONFIG_AUTHOR_NAME_LABEL="Author Name" COM_COMPONENTBUILDER_CONFIG_AUTO_LOAD="Auto" +COM_COMPONENTBUILDER_CONFIG_BACKUPCRONJOB_NOTE_DESCRIPTION="You can run a cronjob that will backup all your components as they are mapped in JCB.

    USE THE FOLLOWING: loading...

    Please not that if your Joomla website has a Firewall installed, it will not allow cronjob via direct URL (most of the time), you will then need to adapt the cornjob request to look like a browser. For more info please read https://stackoverflow.com/a/31597823/1429677 +" +COM_COMPONENTBUILDER_CONFIG_BACKUPCRONJOB_NOTE_LABEL="Backup JCB Mapped Components" +COM_COMPONENTBUILDER_CONFIG_BACKUP_EMAIL_DESCRIPTION="Enter the email where the backup key should be send. It will only send an email if a key change is detected, and not on every backup." +COM_COMPONENTBUILDER_CONFIG_BACKUP_EMAIL_HINT="Email Address Here" +COM_COMPONENTBUILDER_CONFIG_BACKUP_EMAIL_LABEL="Email (backup key)" COM_COMPONENTBUILDER_CONFIG_BACKUP_FOLDER_PATH_DESCRIPTION="Here you can set the path to the backup folder." COM_COMPONENTBUILDER_CONFIG_BACKUP_FOLDER_PATH_HINT="/home/user/backup" COM_COMPONENTBUILDER_CONFIG_BACKUP_FOLDER_PATH_LABEL="Backup Folder Path" +COM_COMPONENTBUILDER_CONFIG_BACKUP_PACKAGE_NAME_DESCRIPTION="Enter Package Name Here" +COM_COMPONENTBUILDER_CONFIG_BACKUP_PACKAGE_NAME_HINT="JCB_Backup_[YEAR]_[MONTH]_[DAY]" +COM_COMPONENTBUILDER_CONFIG_BACKUP_PACKAGE_NAME_LABEL="Package Name" COM_COMPONENTBUILDER_CONFIG_BASIC_KEY_DESC="Set the basic local key here." COM_COMPONENTBUILDER_CONFIG_BASIC_KEY_LABEL="Basic Key (basic encryption)" COM_COMPONENTBUILDER_CONFIG_BASIC_KEY_NOTE_DESC="When using the basic encryption please use a 32 character passphrase.
    Never change this passphrase once it is set! DATA WILL GET CORRUPTED IF YOU DO!" @@ -791,10 +857,44 @@ COM_COMPONENTBUILDER_CONFIG_CONTRIBUTOR_USE_EMAIL="Email" COM_COMPONENTBUILDER_CONFIG_CONTRIBUTOR_USE_LABEL="Use" COM_COMPONENTBUILDER_CONFIG_CONTRIBUTOR_USE_NONE="None" COM_COMPONENTBUILDER_CONFIG_CONTRIBUTOR_USE_WWW="Website" +COM_COMPONENTBUILDER_CONFIG_CRONJOB="CronJob" +COM_COMPONENTBUILDER_CONFIG_CRONJOB_BACKUP_FOLDER_PATH_DESCRIPTION="Here you can set the path to where all components are backed up to." +COM_COMPONENTBUILDER_CONFIG_CRONJOB_BACKUP_FOLDER_PATH_HINT="/home/user/fullbackup" +COM_COMPONENTBUILDER_CONFIG_CRONJOB_BACKUP_FOLDER_PATH_LABEL="Cronjob Backup Folder Path" COM_COMPONENTBUILDER_CONFIG_CUSTOM_FOLDER_PATH_DESCRIPTION="Here you can set the path to the custom folder" COM_COMPONENTBUILDER_CONFIG_CUSTOM_FOLDER_PATH_HINT="/home/user/custom" COM_COMPONENTBUILDER_CONFIG_CUSTOM_FOLDER_PATH_LABEL="Custom Folder Path" +COM_COMPONENTBUILDER_CONFIG_DKIM="DKIM" +COM_COMPONENTBUILDER_CONFIG_DKIM_DESCRIPTION="Set this option to Yes if you want to sign your emails using DKIM." +COM_COMPONENTBUILDER_CONFIG_DKIM_DOMAIN_DESCRIPTION="Set the domain. Eg. domain.com" +COM_COMPONENTBUILDER_CONFIG_DKIM_DOMAIN_HINT="domain.com" +COM_COMPONENTBUILDER_CONFIG_DKIM_DOMAIN_LABEL="Domain" +COM_COMPONENTBUILDER_CONFIG_DKIM_IDENTITY_DESCRIPTION="Set DKIM identity. This can be in the format of an email address 'you@yourdomain.com' typically used as the source of the email." +COM_COMPONENTBUILDER_CONFIG_DKIM_IDENTITY_HINT="you@yourdomain.com" +COM_COMPONENTBUILDER_CONFIG_DKIM_IDENTITY_LABEL="Identity" +COM_COMPONENTBUILDER_CONFIG_DKIM_KEY_DESCRIPTION="This is the KEY to use in the DNS record." +COM_COMPONENTBUILDER_CONFIG_DKIM_KEY_HINT="vdm._domainkey" +COM_COMPONENTBUILDER_CONFIG_DKIM_KEY_LABEL="Key" +COM_COMPONENTBUILDER_CONFIG_DKIM_LABEL="Enable DKIM" +COM_COMPONENTBUILDER_CONFIG_DKIM_PASSPHRASE_DESCRIPTION="Enter your passphrase here." +COM_COMPONENTBUILDER_CONFIG_DKIM_PASSPHRASE_LABEL="Passphrase" +COM_COMPONENTBUILDER_CONFIG_DKIM_PRIVATE_KEY_DESCRIPTION="set private key" +COM_COMPONENTBUILDER_CONFIG_DKIM_PRIVATE_KEY_LABEL="Private key" +COM_COMPONENTBUILDER_CONFIG_DKIM_PUBLIC_KEY_DESCRIPTION="set public key" +COM_COMPONENTBUILDER_CONFIG_DKIM_PUBLIC_KEY_LABEL="Public key" +COM_COMPONENTBUILDER_CONFIG_DKIM_SELECTOR_DESCRIPTION="Set your DKIM/DNS selector." +COM_COMPONENTBUILDER_CONFIG_DKIM_SELECTOR_HINT="vdm" +COM_COMPONENTBUILDER_CONFIG_DKIM_SELECTOR_LABEL="Selector" +COM_COMPONENTBUILDER_CONFIG_DKIM_VALUE_DESCRIPTION="This is the TXT value to use in the DNS. Replace the PUBLICKEY with your public key." +COM_COMPONENTBUILDER_CONFIG_DKIM_VALUE_HINT="v=DKIM1;k=rsa;g=*;s=email;h=sha1;t=s;p=PUBLICKEY" +COM_COMPONENTBUILDER_CONFIG_DKIM_VALUE_LABEL="Value" COM_COMPONENTBUILDER_CONFIG_DONT_LOAD="Not" +COM_COMPONENTBUILDER_CONFIG_EMAILFROM_DESCRIPTION="The global email address that will be used to send system email." +COM_COMPONENTBUILDER_CONFIG_EMAILFROM_HINT="Email Address Here" +COM_COMPONENTBUILDER_CONFIG_EMAILFROM_LABEL=" From Email" +COM_COMPONENTBUILDER_CONFIG_EMAILREPLY_DESCRIPTION="The global email address that will be used to set as the reply email. (leave blank for none)" +COM_COMPONENTBUILDER_CONFIG_EMAILREPLY_HINT="Email Address Here" +COM_COMPONENTBUILDER_CONFIG_EMAILREPLY_LABEL=" Reply Email" COM_COMPONENTBUILDER_CONFIG_ENCRYPTION_DESC="The encription key for the field encryption is set here." COM_COMPONENTBUILDER_CONFIG_ENCRYPTION_LABEL="Encryption Settings" COM_COMPONENTBUILDER_CONFIG_EXPORT_BUY_LINK_DESCRIPTION="Enter link where your JCB package key can be bought." @@ -821,26 +921,94 @@ COM_COMPONENTBUILDER_CONFIG_EXPORT_WEBSITE_LABEL="Website" COM_COMPONENTBUILDER_CONFIG_FLAT_LOAD="Flat" COM_COMPONENTBUILDER_CONFIG_FOLDER_PATHS="Folder Paths" COM_COMPONENTBUILDER_CONFIG_FORCE_LOAD="Force" +COM_COMPONENTBUILDER_CONFIG_FROMNAME_DESCRIPTION="Text displayed in the header "From:" field when sending a site email. Usually the site name." +COM_COMPONENTBUILDER_CONFIG_FROMNAME_HINT="From Name Here" +COM_COMPONENTBUILDER_CONFIG_FROMNAME_LABEL="From Name" COM_COMPONENTBUILDER_CONFIG_GIT_FOLDER_PATH_DESCRIPTION="Here you can set the path to the git folder." COM_COMPONENTBUILDER_CONFIG_GIT_FOLDER_PATH_HINT="/home/user/git" COM_COMPONENTBUILDER_CONFIG_GIT_FOLDER_PATH_LABEL="Git Folder Path" +COM_COMPONENTBUILDER_CONFIG_GLOBAL="Global" COM_COMPONENTBUILDER_CONFIG_GLOBAL_DESC="The Global Parameters" COM_COMPONENTBUILDER_CONFIG_GLOBAL_LABEL="Global" COM_COMPONENTBUILDER_CONFIG_GRADIANT_LOAD="Gradient" +COM_COMPONENTBUILDER_CONFIG_MAILER_DESCRIPTION="Select what mailer you would like to use to send emails." +COM_COMPONENTBUILDER_CONFIG_MAILER_LABEL="Mailer" +COM_COMPONENTBUILDER_CONFIG_MAILONLINE_DESCRIPTION="Warning this will stop all emails from going out." +COM_COMPONENTBUILDER_CONFIG_MAILONLINE_LABEL="Mailer Status" +COM_COMPONENTBUILDER_CONFIG_MAIL_CONFIGURATION="Mail Configuration" COM_COMPONENTBUILDER_CONFIG_MINIFY_DESCRIPTION="Should the JavaScript be minified when compiled." COM_COMPONENTBUILDER_CONFIG_MINIFY_LABEL="Minify JS" COM_COMPONENTBUILDER_CONFIG_NO="No" +COM_COMPONENTBUILDER_CONFIG_NONE="None" COM_COMPONENTBUILDER_CONFIG_NOTE_BACKUP_FOLDER_PATH_DESCRIPTION="You components will be placed as zip files inside this folder." COM_COMPONENTBUILDER_CONFIG_NOTE_BACKUP_FOLDER_PATH_LABEL="Adding a backup folder export option" COM_COMPONENTBUILDER_CONFIG_NOTE_COMPILER_FOLDER_PATH_DESCRIPTION="The compiler folder is where all files and folders that is used to build your component is stored, the default location is [administrator/components/com_componentbuilder/compiler]. You can move this folder by adding your own path here. Remember to move all the content of the compiler folder to this new location or it will not work." 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_DKIM_USE_DESCRIPTION="

    Using the below details, you need to configure your DNS by adding a TXT record on your domain:

    +" +COM_COMPONENTBUILDER_CONFIG_NOTE_DKIM_USE_LABEL="Server Configuration" COM_COMPONENTBUILDER_CONFIG_NOTE_GIT_FOLDER_PATH_DESCRIPTION="You must set the folder where all the components should be deployed for git. You will have to still do your git commit and other git commands yourself. Each component will create their own folder inside this git folder." COM_COMPONENTBUILDER_CONFIG_NOTE_GIT_FOLDER_PATH_LABEL="Adding git to your compiler method" +COM_COMPONENTBUILDER_CONFIG_OFF="Off" +COM_COMPONENTBUILDER_CONFIG_ON="On" COM_COMPONENTBUILDER_CONFIG_ONLY_EXTRA="Only Extra" +COM_COMPONENTBUILDER_CONFIG_PACKAGE_NAME_PLAEHOLDERS_DESCRIPTION="[YEAR] [MONTH] [DAY] [HOUR] [MINUTE]" +COM_COMPONENTBUILDER_CONFIG_PACKAGE_NAME_PLAEHOLDERS_LABEL="Package Name Placeholders" COM_COMPONENTBUILDER_CONFIG_PERCENTAGELANGUAGEADD_DESCRIPTION="Select percentage any language should be translated before the system should add the language to the component during compilation." COM_COMPONENTBUILDER_CONFIG_PERCENTAGELANGUAGEADD_LABEL="Add Language if %? ready." +COM_COMPONENTBUILDER_CONFIG_PHP_MAIL="PHP Mail" +COM_COMPONENTBUILDER_CONFIG_REPLYNAME_DESCRIPTION="Text displayed in the header "Reply To:" field when replying to the site email. Usually the the person that receives the response. (leave blank for none)" +COM_COMPONENTBUILDER_CONFIG_REPLYNAME_HINT="Reply Name Here" +COM_COMPONENTBUILDER_CONFIG_REPLYNAME_LABEL="Reply Name" +COM_COMPONENTBUILDER_CONFIG_SENDMAIL="Sendmail" +COM_COMPONENTBUILDER_CONFIG_SENDMAIL_DESCRIPTION="Enter the path to the sendmail program directory on your host server." +COM_COMPONENTBUILDER_CONFIG_SENDMAIL_HINT="/usr/sbin/sendmail" +COM_COMPONENTBUILDER_CONFIG_SENDMAIL_LABEL="Sendmail Path" +COM_COMPONENTBUILDER_CONFIG_SMTP="SMTP" +COM_COMPONENTBUILDER_CONFIG_SMTPAUTH_DESCRIPTION="Select yes if your SMTP host requires SMTP Authentication." +COM_COMPONENTBUILDER_CONFIG_SMTPAUTH_LABEL="SMTP Authentication" +COM_COMPONENTBUILDER_CONFIG_SMTPHOST_DESCRIPTION="Enter the name of the SMTP host." +COM_COMPONENTBUILDER_CONFIG_SMTPHOST_HINT="localhost" +COM_COMPONENTBUILDER_CONFIG_SMTPHOST_LABEL="SMTP Host" +COM_COMPONENTBUILDER_CONFIG_SMTPPASS_DESCRIPTION="Enter the password for access to the SMTP host." +COM_COMPONENTBUILDER_CONFIG_SMTPPASS_LABEL="SMTP Password" +COM_COMPONENTBUILDER_CONFIG_SMTPPORT_DESCRIPTION="Enter the port number of your SMTP server. Use 25 for most unsecured servers and 465 for most secure servers." +COM_COMPONENTBUILDER_CONFIG_SMTPPORT_HINT="25" +COM_COMPONENTBUILDER_CONFIG_SMTPPORT_LABEL="SMTP Port" +COM_COMPONENTBUILDER_CONFIG_SMTPSECURE_DESCRIPTION="Select the security model that your SMTP server uses." +COM_COMPONENTBUILDER_CONFIG_SMTPSECURE_LABEL="SMTP Security" +COM_COMPONENTBUILDER_CONFIG_SMTPUSER_DESCRIPTION="Enter the username for access to the SMTP host." +COM_COMPONENTBUILDER_CONFIG_SMTPUSER_HINT="email@demo.com" +COM_COMPONENTBUILDER_CONFIG_SMTPUSER_LABEL="SMTP Username" +COM_COMPONENTBUILDER_CONFIG_SSL="SSL" +COM_COMPONENTBUILDER_CONFIG_TLS="TLS" COM_COMPONENTBUILDER_CONFIG_UIKIT_DESC="The Parameters for the uikit are set here.
    Uikit is a lightweight and modular front-end framework for developing fast and powerful web interfaces. For more info visit http://getuikit.com/" COM_COMPONENTBUILDER_CONFIG_UIKIT_LABEL="Uikit Settings" @@ -855,6 +1023,7 @@ COM_COMPONENTBUILDER_CONFIRMATION_STEP_BEFORE_IMPORTING="Confirmation Step Befor COM_COMPONENTBUILDER_CONTRIBUTOR="Contributor" COM_COMPONENTBUILDER_CONTRIBUTORS="Contributors" COM_COMPONENTBUILDER_COPYRIGHT="Copyright" +COM_COMPONENTBUILDER_COPYRIGHT_S="Copyright: %s" COM_COMPONENTBUILDER_CREATE_NEW_S="Create New %s" COM_COMPONENTBUILDER_CUSTOM_ADMIN_VIEW="Custom Admin View" COM_COMPONENTBUILDER_CUSTOM_ADMIN_VIEWS="Custom Admin Views" @@ -1809,6 +1978,8 @@ COM_COMPONENTBUILDER_EDIT_S="Edit %s" COM_COMPONENTBUILDER_EDIT_VERSIONS="Edit Version" COM_COMPONENTBUILDER_EDIT_VERSIONS_DESC=" Allows users in this group to edit versions." COM_COMPONENTBUILDER_EMAIL="Email" +COM_COMPONENTBUILDER_EMAIL_S="Email: %s" +COM_COMPONENTBUILDER_EMAIL_WITH_THE_NEW_KEY_WAS_SEND="Email with the new key was send" COM_COMPONENTBUILDER_EMAUTHOREM_BSB="Author: %s" COM_COMPONENTBUILDER_EMCOMPANYEM_BSB="Company: %s" COM_COMPONENTBUILDER_EMCOMPANY_NAMEEM_BSB="Company Name: %s" @@ -2440,6 +2611,8 @@ COM_COMPONENTBUILDER_JOOMLA_COMPONENT_AUTHOR_DESCRIPTION="The Author's Name & COM_COMPONENTBUILDER_JOOMLA_COMPONENT_AUTHOR_HINT="Author Name & Surname Here" COM_COMPONENTBUILDER_JOOMLA_COMPONENT_AUTHOR_LABEL="Author" COM_COMPONENTBUILDER_JOOMLA_COMPONENT_BACK="Back" +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_BACKWARD_CIRCLE="Backward Circle" COM_COMPONENTBUILDER_JOOMLA_COMPONENT_BAN_CIRCLE="Ban Circle" COM_COMPONENTBUILDER_JOOMLA_COMPONENT_BARS="Bars" @@ -2466,6 +2639,7 @@ COM_COMPONENTBUILDER_JOOMLA_COMPONENT_BUILDCOMPSQL_HINT="// Add MySQL Table Dump 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_CALENDAR="Calendar" COM_COMPONENTBUILDER_JOOMLA_COMPONENT_CALENDAR_THREE="Calendar 3" COM_COMPONENTBUILDER_JOOMLA_COMPONENT_CALENDAR_TWO="Calendar 2" @@ -3019,6 +3193,7 @@ COM_COMPONENTBUILDER_KEEP_ORIGINAL_ACCESS="- Keep Original Access -" COM_COMPONENTBUILDER_KEEP_ORIGINAL_CATEGORY="- Keep Original Category -" COM_COMPONENTBUILDER_KEEP_ORIGINAL_STATE="- Keep Original State -" COM_COMPONENTBUILDER_KEY="Key" +COM_COMPONENTBUILDER_KEY_HAS_NOT_CHANGED="Key has not changed" COM_COMPONENTBUILDER_LANGUAGE="Language" COM_COMPONENTBUILDER_LANGUAGES="Languages" COM_COMPONENTBUILDER_LANGUAGES_ACCESS="Languages Access" @@ -3273,19 +3448,26 @@ COM_COMPONENTBUILDER_LAYOUT_VERSION_DESC="A count of the number of times this La COM_COMPONENTBUILDER_LAYOUT_VERSION_LABEL="Revision" COM_COMPONENTBUILDER_LAYOUT_YES="Yes" COM_COMPONENTBUILDER_LICENSE="License" +COM_COMPONENTBUILDER_LICENSE_S="License: %s" COM_COMPONENTBUILDER_NEW="New" COM_COMPONENTBUILDER_NEW_ISSUE="New Issue" COM_COMPONENTBUILDER_NEW_NOTICE="New Notice" COM_COMPONENTBUILDER_NO="No" COM_COMPONENTBUILDER_NOTRANSLATION="no-translation" +COM_COMPONENTBUILDER_NOT_FOUND_OR_ACCESS_DENIED="Not found, or access denied." COM_COMPONENTBUILDER_NO_ACCESS_GRANTED="No Access Granted!" COM_COMPONENTBUILDER_NO_COMPONENTS_WERE_SELECTED_PLEASE_MAKE_A_SELECTION_AND_TRY_AGAIN="No components were selected, please make a selection and try again!" +COM_COMPONENTBUILDER_NO_CRONJOB_PATH_FOUND_FOR_S="No cronjob path found for (%s)" +COM_COMPONENTBUILDER_NO_CRONJOB_PATH_FOUND_SINCE_INCORRECT_TYPE_REQUESTED="No cronjob path found since incorrect type requested." +COM_COMPONENTBUILDER_NO_KEYS_WERE_FOUND_TO_ADD_AN_EXPORT_KEY_SIMPLY_OPEN_THE_COMPONENT_GO_TO_THE_TAB_CALLED_SETTINGS_BOTTOM_RIGHT_THERE_IS_A_FIELD_CALLED_EXPORT_KEY="No keys were found. To add an export key simply open the component, go to the tab called settings, bottom right there is a field called Export Key." COM_COMPONENTBUILDER_ON_GITHUB="on Github" COM_COMPONENTBUILDER_OPEN="Open" COM_COMPONENTBUILDER_OPENED="opened" COM_COMPONENTBUILDER_OPENED_THIS="opened this" COM_COMPONENTBUILDER_OPEN_ON_GITHUB="Open on Github" COM_COMPONENTBUILDER_OUT_OF_DATE="Out of date" +COM_COMPONENTBUILDER_OWNER_DETAILS_WAS_SET="Owner details was set" +COM_COMPONENTBUILDER_OWNER_S="Owner: %s" COM_COMPONENTBUILDER_PACKAGE_OWNER_DETAILS="Package Owner Details" COM_COMPONENTBUILDER_PACKAGE_OWNER_DETAILS_NOT_FOUND="Package owner details not found!" COM_COMPONENTBUILDER_PACKAGE_OWNER_NOT_SET="Package Owner Not Set" @@ -3307,6 +3489,7 @@ COM_COMPONENTBUILDER_SHOULD_THE_COMPONENT_BE_MOVED_TO_YOUR_LOCAL_GIT_FOLDER="Sho COM_COMPONENTBUILDER_SHOULD_THE_ZIPPED_PACKAGE_OF_THE_COMPONENT_BE_MOVED_TO_THE_LOCAL_BACKUP_AND_REMOTE_SALES_SERVER_THIS_IS_ONLY_APPLICABLE_IF_THIS_COMPONENT_HAS_THOSE_VALUES_SET="Should the zipped package of the component be moved to the local backup and remote sales server? This is only applicable if this component has those values set." COM_COMPONENTBUILDER_SHOULD_WE_FORCE_THE_UPDATE_OF_ALL_LOCAL_DATA_EVEN_IF_IT_IS_NEWER_THEN_THE_DATA_BEING_IMPORTED="Should we force the update of all local data, even if it is newer then the data being imported." COM_COMPONENTBUILDER_SINCE_THE_OWNER_DETAILS_ARE_DISPLAYED_DURING_BIMPORT_PROCESSB_BEFORE_ADDING_THE_KEY_THIS_WAY_IF_THE_USERDEV_BDOES_NOTB_HAVE_THE_KEY_THEY_CAN_SEE_BWHERE_TO_GET_ITB="Since the owner details are displayed during import process before adding the key, this way if the user/dev does not have the key they can see where to get it." +COM_COMPONENTBUILDER_SINCE_THE_OWNER_DETAILS_ARE_DISPLAYED_DURING_IMPORT_PROCESS_BEFORE_ADDING_THE_KEY_THIS_WAY_IF_THE_USERDEV_DOES_NOT_HAVE_THE_KEY_THEY_CAN_SEE_WHERE_TO_GET_IT="Since the owner details are displayed during import process before adding the key, this way if the user/dev does not have the key they can see where to get it." COM_COMPONENTBUILDER_SITE_VIEW="Site View" COM_COMPONENTBUILDER_SITE_VIEWS="Site Views" COM_COMPONENTBUILDER_SITE_VIEWS_ACCESS="Site Views Access" @@ -3968,14 +4151,17 @@ COM_COMPONENTBUILDER_TEMPLATE_VERSION_DESC="A count of the number of times this COM_COMPONENTBUILDER_TEMPLATE_VERSION_LABEL="Revision" COM_COMPONENTBUILDER_TEMPLATE_YES="Yes" COM_COMPONENTBUILDER_THAT_MEANS_ANYONE_WHO_HAS_THIS_PACKAGE_CAN_INSTALL_IT_INTO_JCB_TO_ADD_AN_EXPORT_KEY_SIMPLY_OPEN_THE_COMPONENT_GO_TO_THE_TAB_CALLED_BSETTINGSB_BOTTOM_RIGHT_THERE_IS_A_FIELD_CALLED_BEXPORT_KEYB="That means anyone who has this package can install it into JCB. To add an export key simply open the component, go to the tab called settings, bottom right there is a field called Export Key." +COM_COMPONENTBUILDER_THAT_MEANS_ANYONE_WHO_HAS_THIS_PACKAGE_CAN_INSTALL_IT_INTO_JCB_TO_ADD_AN_EXPORT_KEY_SIMPLY_OPEN_THE_COMPONENT_GO_TO_THE_TAB_CALLED_SETTINGS_BOTTOM_RIGHT_THERE_IS_A_FIELD_CALLED_EXPORT_KEY="That means anyone who has this package can install it into JCB. To add an export key simply open the component, go to the tab called settings, bottom right there is a field called Export Key." COM_COMPONENTBUILDER_THE_KEY_OF_THIS_PACKAGE="The key of this package." COM_COMPONENTBUILDER_THE_NOTICE_BOARD_IS_LOADING="The notice board is loading" COM_COMPONENTBUILDER_THE_PACKAGE_KEY_IS_CODESCODE="The package key is: %s" +COM_COMPONENTBUILDER_THE_PACKAGE_KEY_IS_S="The package key is: %s" COM_COMPONENTBUILDER_THE_README_IS_LOADING="The readme is loading" COM_COMPONENTBUILDER_THE_WIKI_IS_LOADING="The wiki is loading" COM_COMPONENTBUILDER_THIS_PACKAGE_HAS_NO_KEY="This package has no key." COM_COMPONENTBUILDER_TOTAL_DOWNLOADS="total downloads" COM_COMPONENTBUILDER_TO_CHANGE_THE_PACKAGE_OWNER_DEFAULTS_OPEN_THE_BJCB_GLOBAL_OPTIONSB_GO_TO_THE_BCOMPANYB_TAB_AND_ADD_THE_CORRECT_COMPANY_DETAILS_THERE="To change the package owner defaults. Open the JCB Global Options, go to the Company tab and add the correct company details there." +COM_COMPONENTBUILDER_TO_CHANGE_THE_PACKAGE_OWNER_DEFAULTS_OPEN_THE_JCB_GLOBAL_OPTIONS_GO_TO_THE_COMPANY_TAB_AND_ADD_THE_CORRECT_COMPANY_DETAILS_THERE="To change the package owner defaults. Open the JCB Global Options, go to the Company tab and add the correct company details there." COM_COMPONENTBUILDER_TRANSLATION="Translation" COM_COMPONENTBUILDER_UP_TO_DATE="Up to date" COM_COMPONENTBUILDER_USED_IN="used in" @@ -3987,8 +4173,10 @@ COM_COMPONENTBUILDER_VERSION="Version" COM_COMPONENTBUILDER_VIEW_MORE_ISSUES_ON_GITHUB="View more issues on Github" COM_COMPONENTBUILDER_VIEW_MORE_RELEASES_ON_GITHUB="View more releases on Github" COM_COMPONENTBUILDER_WEBSITE="Website" +COM_COMPONENTBUILDER_WEBSITE_S="Website: %s" COM_COMPONENTBUILDER_YES="Yes" COM_COMPONENTBUILDER_YOUR_DATA_IS_ENCRYPTED_WITH_A_AES_ONE_HUNDRED_AND_TWENTY_EIGHT_BIT_ENCRYPTION_USING_THE_ABOVE_THIRTY_TWO_CHARACTER_KEYBR_WITHOUT_THIS_KEY_IT_WILL_TAKE_THE_CURRENT_TECHNOLOGY_WITH_A_BRUTE_FORCE_ATTACK_METHOD_MORE_THEN_A_HREFHTTPRANDOMIZECOMHOWLONGTOHACKPASS_TARGET_BLANK_TITLEHOW_LONG_TO_HACK_PASSSEVEN_HUNDRED_ZERO_ZERO_ZERO_ZERO_ZERO_ZERO_ZERO_ZERO_ZERO_ZEROA_YEARS_TO_CRACK_THEORETICALLY="Your data is encrypted with a AES 128 bit encryption using the above 32 character key.
    Without this key it will take the current technology with a brute force attack method more then 700 000 000 000 000 000 000 000 000 000 000 years to crack theoretically." +COM_COMPONENTBUILDER_YOUR_DATA_IS_ENCRYPTED_WITH_A_AES_ONE_HUNDRED_AND_TWENTY_EIGHT_BIT_ENCRYPTION_USING_THE_ABOVE_THIRTY_TWO_CHARACTER_KEY_WITHOUT_THIS_KEY_IT_WILL_TAKE_THE_CURRENT_TECHNOLOGY_WITH_A_BRUTE_FORCE_ATTACK_METHOD_MORE_THEN_A_HREFHTTPRANDOMIZECOMHOWLONGTOHACKPASS_TARGET_BLANK_TITLEHOW_LONG_TO_HACK_PASSSEVEN_HUNDRED_ZERO_ZERO_ZERO_ZERO_ZERO_ZERO_ZERO_ZERO_ZERO_ZEROA_YEARS_TO_CRACK_THEORETICALLY_UNLESS_THEY_HAVE_THIS_KEY_ABOVE_SO_DO_KEEP_IT_SAFE="Your data is encrypted with a AES 128 bit encryption using the above 32 character key. Without this key it will take the current technology with a brute force attack method more then 700 000 000 000 000 000 000 000 000 000 000 years to crack theoretically. Unless they have this key above, so do keep it safe." COM_COMPONENTBUILDER_YOU_CAN_NOW_SELECT_THE_COMPONENT_BZIPB_PACKAGE_YOU_WOULD_LIKE_TO_IMPORTBR_SMALLPLEASE_NOTE_THAT_SMART_COMPONENT_IMPORT_ONLY_WORKS_WITH_THE_FOLLOWING_FORMAT_BZIPBSMALL="You can now select the component zip package you would like to import.
    Please note that smart component import only works with the following format: (.zip)" 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_MUST_SELECT_A_COMPONENT="You must select a component!" diff --git a/admin/layouts/admin_view/css_fullwidth.php b/admin/layouts/admin_view/css_fullwidth.php index 0782f1ca2..8e712ed9e 100644 --- a/admin/layouts/admin_view/css_fullwidth.php +++ b/admin/layouts/admin_view/css_fullwidth.php @@ -11,7 +11,7 @@ /-------------------------------------------------------------------------------------------------------------------------------/ @version 2.4.10 - @build 12th August, 2017 + @build 19th August, 2017 @created 30th April, 2015 @package Component Builder @subpackage css_fullwidth.php diff --git a/admin/layouts/admin_view/custom_buttons_fullwidth.php b/admin/layouts/admin_view/custom_buttons_fullwidth.php index 4c3684aa9..078d146e8 100644 --- a/admin/layouts/admin_view/custom_buttons_fullwidth.php +++ b/admin/layouts/admin_view/custom_buttons_fullwidth.php @@ -11,7 +11,7 @@ /-------------------------------------------------------------------------------------------------------------------------------/ @version 2.4.10 - @build 12th August, 2017 + @build 19th August, 2017 @created 30th April, 2015 @package Component Builder @subpackage custom_buttons_fullwidth.php diff --git a/admin/layouts/admin_view/custom_buttons_left.php b/admin/layouts/admin_view/custom_buttons_left.php index adeb7ada2..70f2ef1bc 100644 --- a/admin/layouts/admin_view/custom_buttons_left.php +++ b/admin/layouts/admin_view/custom_buttons_left.php @@ -11,7 +11,7 @@ /-------------------------------------------------------------------------------------------------------------------------------/ @version 2.4.10 - @build 12th August, 2017 + @build 19th August, 2017 @created 30th April, 2015 @package Component Builder @subpackage custom_buttons_left.php diff --git a/admin/layouts/admin_view/custom_import_fullwidth.php b/admin/layouts/admin_view/custom_import_fullwidth.php index 1614ed645..a8599fdae 100644 --- a/admin/layouts/admin_view/custom_import_fullwidth.php +++ b/admin/layouts/admin_view/custom_import_fullwidth.php @@ -11,7 +11,7 @@ /-------------------------------------------------------------------------------------------------------------------------------/ @version 2.4.10 - @build 12th August, 2017 + @build 19th August, 2017 @created 30th April, 2015 @package Component Builder @subpackage custom_import_fullwidth.php diff --git a/admin/layouts/admin_view/fields_fullwidth.php b/admin/layouts/admin_view/fields_fullwidth.php index acd9b477f..1b8113a3d 100644 --- a/admin/layouts/admin_view/fields_fullwidth.php +++ b/admin/layouts/admin_view/fields_fullwidth.php @@ -11,7 +11,7 @@ /-------------------------------------------------------------------------------------------------------------------------------/ @version 2.4.10 - @build 12th August, 2017 + @build 19th August, 2017 @created 30th April, 2015 @package Component Builder @subpackage fields_fullwidth.php diff --git a/admin/layouts/admin_view/javascript_fullwidth.php b/admin/layouts/admin_view/javascript_fullwidth.php index bb18ec4bc..04e401f3a 100644 --- a/admin/layouts/admin_view/javascript_fullwidth.php +++ b/admin/layouts/admin_view/javascript_fullwidth.php @@ -11,7 +11,7 @@ /-------------------------------------------------------------------------------------------------------------------------------/ @version 2.4.10 - @build 12th August, 2017 + @build 19th August, 2017 @created 30th April, 2015 @package Component Builder @subpackage javascript_fullwidth.php diff --git a/admin/layouts/admin_view/linked_components_fullwidth.php b/admin/layouts/admin_view/linked_components_fullwidth.php index bd946f783..64c27c885 100644 --- a/admin/layouts/admin_view/linked_components_fullwidth.php +++ b/admin/layouts/admin_view/linked_components_fullwidth.php @@ -11,7 +11,7 @@ /-------------------------------------------------------------------------------------------------------------------------------/ @version 2.4.10 - @build 12th August, 2017 + @build 19th August, 2017 @created 30th April, 2015 @package Component Builder @subpackage linked_components_fullwidth.php diff --git a/admin/layouts/admin_view/mysql_fullwidth.php b/admin/layouts/admin_view/mysql_fullwidth.php index 0c2550ad1..e05a39d78 100644 --- a/admin/layouts/admin_view/mysql_fullwidth.php +++ b/admin/layouts/admin_view/mysql_fullwidth.php @@ -11,7 +11,7 @@ /-------------------------------------------------------------------------------------------------------------------------------/ @version 2.4.10 - @build 12th August, 2017 + @build 19th August, 2017 @created 30th April, 2015 @package Component Builder @subpackage mysql_fullwidth.php diff --git a/admin/layouts/admin_view/mysql_left.php b/admin/layouts/admin_view/mysql_left.php index a88859554..0ca6101f7 100644 --- a/admin/layouts/admin_view/mysql_left.php +++ b/admin/layouts/admin_view/mysql_left.php @@ -11,7 +11,7 @@ /-------------------------------------------------------------------------------------------------------------------------------/ @version 2.4.10 - @build 12th August, 2017 + @build 19th August, 2017 @created 30th April, 2015 @package Component Builder @subpackage mysql_left.php diff --git a/admin/layouts/admin_view/php_fullwidth.php b/admin/layouts/admin_view/php_fullwidth.php index 6476d2d3f..b9e5d1527 100644 --- a/admin/layouts/admin_view/php_fullwidth.php +++ b/admin/layouts/admin_view/php_fullwidth.php @@ -11,7 +11,7 @@ /-------------------------------------------------------------------------------------------------------------------------------/ @version 2.4.10 - @build 12th August, 2017 + @build 19th August, 2017 @created 30th April, 2015 @package Component Builder @subpackage php_fullwidth.php diff --git a/admin/layouts/admin_view/publishing.php b/admin/layouts/admin_view/publishing.php index 4334c2a79..835fc173e 100644 --- a/admin/layouts/admin_view/publishing.php +++ b/admin/layouts/admin_view/publishing.php @@ -11,7 +11,7 @@ /-------------------------------------------------------------------------------------------------------------------------------/ @version 2.4.10 - @build 12th August, 2017 + @build 19th August, 2017 @created 30th April, 2015 @package Component Builder @subpackage publishing.php diff --git a/admin/layouts/admin_view/publlshing.php b/admin/layouts/admin_view/publlshing.php index c35293eb8..e5f45ba8b 100644 --- a/admin/layouts/admin_view/publlshing.php +++ b/admin/layouts/admin_view/publlshing.php @@ -11,7 +11,7 @@ /-------------------------------------------------------------------------------------------------------------------------------/ @version 2.4.10 - @build 12th August, 2017 + @build 19th August, 2017 @created 30th April, 2015 @package Component Builder @subpackage publlshing.php diff --git a/admin/layouts/admin_view/settings_above.php b/admin/layouts/admin_view/settings_above.php index f3dd7325a..5a9daead0 100644 --- a/admin/layouts/admin_view/settings_above.php +++ b/admin/layouts/admin_view/settings_above.php @@ -11,7 +11,7 @@ /-------------------------------------------------------------------------------------------------------------------------------/ @version 2.4.10 - @build 12th August, 2017 + @build 19th August, 2017 @created 30th April, 2015 @package Component Builder @subpackage settings_above.php diff --git a/admin/layouts/admin_view/settings_left.php b/admin/layouts/admin_view/settings_left.php index 55f66c6db..8a00fe036 100644 --- a/admin/layouts/admin_view/settings_left.php +++ b/admin/layouts/admin_view/settings_left.php @@ -11,7 +11,7 @@ /-------------------------------------------------------------------------------------------------------------------------------/ @version 2.4.10 - @build 12th August, 2017 + @build 19th August, 2017 @created 30th April, 2015 @package Component Builder @subpackage settings_left.php diff --git a/admin/layouts/admin_view/settings_right.php b/admin/layouts/admin_view/settings_right.php index 96d721dc4..d2cbd5257 100644 --- a/admin/layouts/admin_view/settings_right.php +++ b/admin/layouts/admin_view/settings_right.php @@ -11,7 +11,7 @@ /-------------------------------------------------------------------------------------------------------------------------------/ @version 2.4.10 - @build 12th August, 2017 + @build 19th August, 2017 @created 30th April, 2015 @package Component Builder @subpackage settings_right.php diff --git a/admin/layouts/admin_view/settings_under.php b/admin/layouts/admin_view/settings_under.php index 177790e1b..cf5bbe740 100644 --- a/admin/layouts/admin_view/settings_under.php +++ b/admin/layouts/admin_view/settings_under.php @@ -11,7 +11,7 @@ /-------------------------------------------------------------------------------------------------------------------------------/ @version 2.4.10 - @build 12th August, 2017 + @build 19th August, 2017 @created 30th April, 2015 @package Component Builder @subpackage settings_under.php diff --git a/admin/layouts/batchselection.php b/admin/layouts/batchselection.php index e25633cca..37ce6d149 100644 --- a/admin/layouts/batchselection.php +++ b/admin/layouts/batchselection.php @@ -11,7 +11,7 @@ /-------------------------------------------------------------------------------------------------------------------------------/ @version 2.4.10 - @build 12th August, 2017 + @build 19th August, 2017 @created 30th April, 2015 @package Component Builder @subpackage batchselection.php diff --git a/admin/layouts/custom_admin_view/custom_buttons_fullwidth.php b/admin/layouts/custom_admin_view/custom_buttons_fullwidth.php index 312341016..9fc77f1b7 100644 --- a/admin/layouts/custom_admin_view/custom_buttons_fullwidth.php +++ b/admin/layouts/custom_admin_view/custom_buttons_fullwidth.php @@ -11,7 +11,7 @@ /-------------------------------------------------------------------------------------------------------------------------------/ @version 2.4.10 - @build 12th August, 2017 + @build 19th August, 2017 @created 30th April, 2015 @package Component Builder @subpackage custom_buttons_fullwidth.php diff --git a/admin/layouts/custom_admin_view/custom_buttons_left.php b/admin/layouts/custom_admin_view/custom_buttons_left.php index adeb7ada2..70f2ef1bc 100644 --- a/admin/layouts/custom_admin_view/custom_buttons_left.php +++ b/admin/layouts/custom_admin_view/custom_buttons_left.php @@ -11,7 +11,7 @@ /-------------------------------------------------------------------------------------------------------------------------------/ @version 2.4.10 - @build 12th August, 2017 + @build 19th August, 2017 @created 30th April, 2015 @package Component Builder @subpackage custom_buttons_left.php diff --git a/admin/layouts/custom_admin_view/custom_script_fullwidth.php b/admin/layouts/custom_admin_view/custom_script_fullwidth.php index 9d65893bc..ba7db3af3 100644 --- a/admin/layouts/custom_admin_view/custom_script_fullwidth.php +++ b/admin/layouts/custom_admin_view/custom_script_fullwidth.php @@ -11,7 +11,7 @@ /-------------------------------------------------------------------------------------------------------------------------------/ @version 2.4.10 - @build 12th August, 2017 + @build 19th August, 2017 @created 30th April, 2015 @package Component Builder @subpackage custom_script_fullwidth.php diff --git a/admin/layouts/custom_admin_view/details_above.php b/admin/layouts/custom_admin_view/details_above.php index cc9268d5b..3efe97b80 100644 --- a/admin/layouts/custom_admin_view/details_above.php +++ b/admin/layouts/custom_admin_view/details_above.php @@ -11,7 +11,7 @@ /-------------------------------------------------------------------------------------------------------------------------------/ @version 2.4.10 - @build 12th August, 2017 + @build 19th August, 2017 @created 30th April, 2015 @package Component Builder @subpackage details_above.php diff --git a/admin/layouts/custom_admin_view/details_fullwidth.php b/admin/layouts/custom_admin_view/details_fullwidth.php index 3849c375a..9e2769311 100644 --- a/admin/layouts/custom_admin_view/details_fullwidth.php +++ b/admin/layouts/custom_admin_view/details_fullwidth.php @@ -11,7 +11,7 @@ /-------------------------------------------------------------------------------------------------------------------------------/ @version 2.4.10 - @build 12th August, 2017 + @build 19th August, 2017 @created 30th April, 2015 @package Component Builder @subpackage details_fullwidth.php diff --git a/admin/layouts/custom_admin_view/details_left.php b/admin/layouts/custom_admin_view/details_left.php index a1f06b5bd..432ae7ecc 100644 --- a/admin/layouts/custom_admin_view/details_left.php +++ b/admin/layouts/custom_admin_view/details_left.php @@ -11,7 +11,7 @@ /-------------------------------------------------------------------------------------------------------------------------------/ @version 2.4.10 - @build 12th August, 2017 + @build 19th August, 2017 @created 30th April, 2015 @package Component Builder @subpackage details_left.php diff --git a/admin/layouts/custom_admin_view/details_right.php b/admin/layouts/custom_admin_view/details_right.php index 603357dcd..d05cecc6d 100644 --- a/admin/layouts/custom_admin_view/details_right.php +++ b/admin/layouts/custom_admin_view/details_right.php @@ -11,7 +11,7 @@ /-------------------------------------------------------------------------------------------------------------------------------/ @version 2.4.10 - @build 12th August, 2017 + @build 19th August, 2017 @created 30th April, 2015 @package Component Builder @subpackage details_right.php diff --git a/admin/layouts/custom_admin_view/details_rightside.php b/admin/layouts/custom_admin_view/details_rightside.php index 789d9d3c9..2072c2210 100644 --- a/admin/layouts/custom_admin_view/details_rightside.php +++ b/admin/layouts/custom_admin_view/details_rightside.php @@ -11,7 +11,7 @@ /-------------------------------------------------------------------------------------------------------------------------------/ @version 2.4.10 - @build 12th August, 2017 + @build 19th August, 2017 @created 30th April, 2015 @package Component Builder @subpackage details_rightside.php diff --git a/admin/layouts/custom_admin_view/details_under.php b/admin/layouts/custom_admin_view/details_under.php index 985cb365a..043c4e73c 100644 --- a/admin/layouts/custom_admin_view/details_under.php +++ b/admin/layouts/custom_admin_view/details_under.php @@ -11,7 +11,7 @@ /-------------------------------------------------------------------------------------------------------------------------------/ @version 2.4.10 - @build 12th August, 2017 + @build 19th August, 2017 @created 30th April, 2015 @package Component Builder @subpackage details_under.php diff --git a/admin/layouts/custom_admin_view/linked_components_fullwidth.php b/admin/layouts/custom_admin_view/linked_components_fullwidth.php index 652e619eb..2a71450b3 100644 --- a/admin/layouts/custom_admin_view/linked_components_fullwidth.php +++ b/admin/layouts/custom_admin_view/linked_components_fullwidth.php @@ -11,7 +11,7 @@ /-------------------------------------------------------------------------------------------------------------------------------/ @version 2.4.10 - @build 12th August, 2017 + @build 19th August, 2017 @created 30th April, 2015 @package Component Builder @subpackage linked_components_fullwidth.php diff --git a/admin/layouts/custom_admin_view/publishing.php b/admin/layouts/custom_admin_view/publishing.php index 4334c2a79..835fc173e 100644 --- a/admin/layouts/custom_admin_view/publishing.php +++ b/admin/layouts/custom_admin_view/publishing.php @@ -11,7 +11,7 @@ /-------------------------------------------------------------------------------------------------------------------------------/ @version 2.4.10 - @build 12th August, 2017 + @build 19th August, 2017 @created 30th April, 2015 @package Component Builder @subpackage publishing.php diff --git a/admin/layouts/custom_admin_view/publlshing.php b/admin/layouts/custom_admin_view/publlshing.php index c35293eb8..e5f45ba8b 100644 --- a/admin/layouts/custom_admin_view/publlshing.php +++ b/admin/layouts/custom_admin_view/publlshing.php @@ -11,7 +11,7 @@ /-------------------------------------------------------------------------------------------------------------------------------/ @version 2.4.10 - @build 12th August, 2017 + @build 19th August, 2017 @created 30th April, 2015 @package Component Builder @subpackage publlshing.php diff --git a/admin/layouts/custom_code/details_above.php b/admin/layouts/custom_code/details_above.php index 28d8e8757..fe386d572 100644 --- a/admin/layouts/custom_code/details_above.php +++ b/admin/layouts/custom_code/details_above.php @@ -11,7 +11,7 @@ /-------------------------------------------------------------------------------------------------------------------------------/ @version 2.4.10 - @build 12th August, 2017 + @build 19th August, 2017 @created 30th April, 2015 @package Component Builder @subpackage details_above.php diff --git a/admin/layouts/custom_code/details_fullwidth.php b/admin/layouts/custom_code/details_fullwidth.php index e6def2aa1..af27bccbf 100644 --- a/admin/layouts/custom_code/details_fullwidth.php +++ b/admin/layouts/custom_code/details_fullwidth.php @@ -11,7 +11,7 @@ /-------------------------------------------------------------------------------------------------------------------------------/ @version 2.4.10 - @build 12th August, 2017 + @build 19th August, 2017 @created 30th April, 2015 @package Component Builder @subpackage details_fullwidth.php diff --git a/admin/layouts/custom_code/details_left.php b/admin/layouts/custom_code/details_left.php index 42a1cc61f..fce4f922f 100644 --- a/admin/layouts/custom_code/details_left.php +++ b/admin/layouts/custom_code/details_left.php @@ -11,7 +11,7 @@ /-------------------------------------------------------------------------------------------------------------------------------/ @version 2.4.10 - @build 12th August, 2017 + @build 19th August, 2017 @created 30th April, 2015 @package Component Builder @subpackage details_left.php diff --git a/admin/layouts/custom_code/details_right.php b/admin/layouts/custom_code/details_right.php index 082343c84..3c145eff2 100644 --- a/admin/layouts/custom_code/details_right.php +++ b/admin/layouts/custom_code/details_right.php @@ -11,7 +11,7 @@ /-------------------------------------------------------------------------------------------------------------------------------/ @version 2.4.10 - @build 12th August, 2017 + @build 19th August, 2017 @created 30th April, 2015 @package Component Builder @subpackage details_right.php diff --git a/admin/layouts/custom_code/details_under.php b/admin/layouts/custom_code/details_under.php index 985cb365a..043c4e73c 100644 --- a/admin/layouts/custom_code/details_under.php +++ b/admin/layouts/custom_code/details_under.php @@ -11,7 +11,7 @@ /-------------------------------------------------------------------------------------------------------------------------------/ @version 2.4.10 - @build 12th August, 2017 + @build 19th August, 2017 @created 30th April, 2015 @package Component Builder @subpackage details_under.php diff --git a/admin/layouts/custom_code/publishing.php b/admin/layouts/custom_code/publishing.php index 4334c2a79..835fc173e 100644 --- a/admin/layouts/custom_code/publishing.php +++ b/admin/layouts/custom_code/publishing.php @@ -11,7 +11,7 @@ /-------------------------------------------------------------------------------------------------------------------------------/ @version 2.4.10 - @build 12th August, 2017 + @build 19th August, 2017 @created 30th April, 2015 @package Component Builder @subpackage publishing.php diff --git a/admin/layouts/custom_code/publlshing.php b/admin/layouts/custom_code/publlshing.php index c35293eb8..e5f45ba8b 100644 --- a/admin/layouts/custom_code/publlshing.php +++ b/admin/layouts/custom_code/publlshing.php @@ -11,7 +11,7 @@ /-------------------------------------------------------------------------------------------------------------------------------/ @version 2.4.10 - @build 12th August, 2017 + @build 19th August, 2017 @created 30th April, 2015 @package Component Builder @subpackage publlshing.php diff --git a/admin/layouts/dynamic_get/abacus_fullwidth.php b/admin/layouts/dynamic_get/abacus_fullwidth.php index 45e5f3807..0ff141b81 100644 --- a/admin/layouts/dynamic_get/abacus_fullwidth.php +++ b/admin/layouts/dynamic_get/abacus_fullwidth.php @@ -11,7 +11,7 @@ /-------------------------------------------------------------------------------------------------------------------------------/ @version 2.4.10 - @build 12th August, 2017 + @build 19th August, 2017 @created 30th April, 2015 @package Component Builder @subpackage abacus_fullwidth.php diff --git a/admin/layouts/dynamic_get/abacus_left.php b/admin/layouts/dynamic_get/abacus_left.php index 99e6d387b..8a572e73f 100644 --- a/admin/layouts/dynamic_get/abacus_left.php +++ b/admin/layouts/dynamic_get/abacus_left.php @@ -11,7 +11,7 @@ /-------------------------------------------------------------------------------------------------------------------------------/ @version 2.4.10 - @build 12th August, 2017 + @build 19th August, 2017 @created 30th April, 2015 @package Component Builder @subpackage abacus_left.php diff --git a/admin/layouts/dynamic_get/custom_script_fullwidth.php b/admin/layouts/dynamic_get/custom_script_fullwidth.php index ec01f6823..80cf33d76 100644 --- a/admin/layouts/dynamic_get/custom_script_fullwidth.php +++ b/admin/layouts/dynamic_get/custom_script_fullwidth.php @@ -11,7 +11,7 @@ /-------------------------------------------------------------------------------------------------------------------------------/ @version 2.4.10 - @build 12th August, 2017 + @build 19th August, 2017 @created 30th April, 2015 @package Component Builder @subpackage custom_script_fullwidth.php diff --git a/admin/layouts/dynamic_get/gettable_above.php b/admin/layouts/dynamic_get/gettable_above.php index ae5613e76..8380641eb 100644 --- a/admin/layouts/dynamic_get/gettable_above.php +++ b/admin/layouts/dynamic_get/gettable_above.php @@ -11,7 +11,7 @@ /-------------------------------------------------------------------------------------------------------------------------------/ @version 2.4.10 - @build 12th August, 2017 + @build 19th August, 2017 @created 30th April, 2015 @package Component Builder @subpackage gettable_above.php diff --git a/admin/layouts/dynamic_get/gettable_fullwidth.php b/admin/layouts/dynamic_get/gettable_fullwidth.php index bf73b3d44..36d3a76fb 100644 --- a/admin/layouts/dynamic_get/gettable_fullwidth.php +++ b/admin/layouts/dynamic_get/gettable_fullwidth.php @@ -11,7 +11,7 @@ /-------------------------------------------------------------------------------------------------------------------------------/ @version 2.4.10 - @build 12th August, 2017 + @build 19th August, 2017 @created 30th April, 2015 @package Component Builder @subpackage gettable_fullwidth.php diff --git a/admin/layouts/dynamic_get/gettable_left.php b/admin/layouts/dynamic_get/gettable_left.php index ac40e0492..5be15612b 100644 --- a/admin/layouts/dynamic_get/gettable_left.php +++ b/admin/layouts/dynamic_get/gettable_left.php @@ -11,7 +11,7 @@ /-------------------------------------------------------------------------------------------------------------------------------/ @version 2.4.10 - @build 12th August, 2017 + @build 19th August, 2017 @created 30th April, 2015 @package Component Builder @subpackage gettable_left.php diff --git a/admin/layouts/dynamic_get/gettable_right.php b/admin/layouts/dynamic_get/gettable_right.php index 5eaad6c7c..433f29ffe 100644 --- a/admin/layouts/dynamic_get/gettable_right.php +++ b/admin/layouts/dynamic_get/gettable_right.php @@ -11,7 +11,7 @@ /-------------------------------------------------------------------------------------------------------------------------------/ @version 2.4.10 - @build 12th August, 2017 + @build 19th August, 2017 @created 30th April, 2015 @package Component Builder @subpackage gettable_right.php diff --git a/admin/layouts/dynamic_get/gettable_under.php b/admin/layouts/dynamic_get/gettable_under.php index 8cc28622d..5245577a4 100644 --- a/admin/layouts/dynamic_get/gettable_under.php +++ b/admin/layouts/dynamic_get/gettable_under.php @@ -11,7 +11,7 @@ /-------------------------------------------------------------------------------------------------------------------------------/ @version 2.4.10 - @build 12th August, 2017 + @build 19th August, 2017 @created 30th April, 2015 @package Component Builder @subpackage gettable_under.php diff --git a/admin/layouts/dynamic_get/publishing.php b/admin/layouts/dynamic_get/publishing.php index 4334c2a79..835fc173e 100644 --- a/admin/layouts/dynamic_get/publishing.php +++ b/admin/layouts/dynamic_get/publishing.php @@ -11,7 +11,7 @@ /-------------------------------------------------------------------------------------------------------------------------------/ @version 2.4.10 - @build 12th August, 2017 + @build 19th August, 2017 @created 30th April, 2015 @package Component Builder @subpackage publishing.php diff --git a/admin/layouts/dynamic_get/publlshing.php b/admin/layouts/dynamic_get/publlshing.php index c35293eb8..e5f45ba8b 100644 --- a/admin/layouts/dynamic_get/publlshing.php +++ b/admin/layouts/dynamic_get/publlshing.php @@ -11,7 +11,7 @@ /-------------------------------------------------------------------------------------------------------------------------------/ @version 2.4.10 - @build 12th August, 2017 + @build 19th August, 2017 @created 30th April, 2015 @package Component Builder @subpackage publlshing.php diff --git a/admin/layouts/field/details_fullwidth.php b/admin/layouts/field/details_fullwidth.php index d3f7e315b..9cb3bf55f 100644 --- a/admin/layouts/field/details_fullwidth.php +++ b/admin/layouts/field/details_fullwidth.php @@ -11,7 +11,7 @@ /-------------------------------------------------------------------------------------------------------------------------------/ @version 2.4.10 - @build 12th August, 2017 + @build 19th August, 2017 @created 30th April, 2015 @package Component Builder @subpackage details_fullwidth.php diff --git a/admin/layouts/field/details_left.php b/admin/layouts/field/details_left.php index 3b8b78b1c..54abbad51 100644 --- a/admin/layouts/field/details_left.php +++ b/admin/layouts/field/details_left.php @@ -11,7 +11,7 @@ /-------------------------------------------------------------------------------------------------------------------------------/ @version 2.4.10 - @build 12th August, 2017 + @build 19th August, 2017 @created 30th April, 2015 @package Component Builder @subpackage details_left.php diff --git a/admin/layouts/field/details_right.php b/admin/layouts/field/details_right.php index eb2de1ecd..96205b868 100644 --- a/admin/layouts/field/details_right.php +++ b/admin/layouts/field/details_right.php @@ -11,7 +11,7 @@ /-------------------------------------------------------------------------------------------------------------------------------/ @version 2.4.10 - @build 12th August, 2017 + @build 19th August, 2017 @created 30th April, 2015 @package Component Builder @subpackage details_right.php diff --git a/admin/layouts/field/details_under.php b/admin/layouts/field/details_under.php index 985cb365a..043c4e73c 100644 --- a/admin/layouts/field/details_under.php +++ b/admin/layouts/field/details_under.php @@ -11,7 +11,7 @@ /-------------------------------------------------------------------------------------------------------------------------------/ @version 2.4.10 - @build 12th August, 2017 + @build 19th August, 2017 @created 30th April, 2015 @package Component Builder @subpackage details_under.php diff --git a/admin/layouts/field/linked_admin_views_fullwidth.php b/admin/layouts/field/linked_admin_views_fullwidth.php index 635bce5eb..458abab5f 100644 --- a/admin/layouts/field/linked_admin_views_fullwidth.php +++ b/admin/layouts/field/linked_admin_views_fullwidth.php @@ -11,7 +11,7 @@ /-------------------------------------------------------------------------------------------------------------------------------/ @version 2.4.10 - @build 12th August, 2017 + @build 19th August, 2017 @created 30th April, 2015 @package Component Builder @subpackage linked_admin_views_fullwidth.php diff --git a/admin/layouts/field/publishing.php b/admin/layouts/field/publishing.php index 4334c2a79..835fc173e 100644 --- a/admin/layouts/field/publishing.php +++ b/admin/layouts/field/publishing.php @@ -11,7 +11,7 @@ /-------------------------------------------------------------------------------------------------------------------------------/ @version 2.4.10 - @build 12th August, 2017 + @build 19th August, 2017 @created 30th April, 2015 @package Component Builder @subpackage publishing.php diff --git a/admin/layouts/field/publlshing.php b/admin/layouts/field/publlshing.php index c35293eb8..e5f45ba8b 100644 --- a/admin/layouts/field/publlshing.php +++ b/admin/layouts/field/publlshing.php @@ -11,7 +11,7 @@ /-------------------------------------------------------------------------------------------------------------------------------/ @version 2.4.10 - @build 12th August, 2017 + @build 19th August, 2017 @created 30th April, 2015 @package Component Builder @subpackage publlshing.php diff --git a/admin/layouts/field/scripts_left.php b/admin/layouts/field/scripts_left.php index 8b64a4da4..aa1bcef14 100644 --- a/admin/layouts/field/scripts_left.php +++ b/admin/layouts/field/scripts_left.php @@ -11,7 +11,7 @@ /-------------------------------------------------------------------------------------------------------------------------------/ @version 2.4.10 - @build 12th August, 2017 + @build 19th August, 2017 @created 30th April, 2015 @package Component Builder @subpackage scripts_left.php diff --git a/admin/layouts/field/scripts_right.php b/admin/layouts/field/scripts_right.php index cf9edde5f..13e76258c 100644 --- a/admin/layouts/field/scripts_right.php +++ b/admin/layouts/field/scripts_right.php @@ -11,7 +11,7 @@ /-------------------------------------------------------------------------------------------------------------------------------/ @version 2.4.10 - @build 12th August, 2017 + @build 19th August, 2017 @created 30th April, 2015 @package Component Builder @subpackage scripts_right.php diff --git a/admin/layouts/fieldtype/details_left.php b/admin/layouts/fieldtype/details_left.php index 6128bffc7..d37d268c0 100644 --- a/admin/layouts/fieldtype/details_left.php +++ b/admin/layouts/fieldtype/details_left.php @@ -11,7 +11,7 @@ /-------------------------------------------------------------------------------------------------------------------------------/ @version 2.4.10 - @build 12th August, 2017 + @build 19th August, 2017 @created 30th April, 2015 @package Component Builder @subpackage details_left.php diff --git a/admin/layouts/fieldtype/details_right.php b/admin/layouts/fieldtype/details_right.php index f3148d262..cceb7a3ab 100644 --- a/admin/layouts/fieldtype/details_right.php +++ b/admin/layouts/fieldtype/details_right.php @@ -11,7 +11,7 @@ /-------------------------------------------------------------------------------------------------------------------------------/ @version 2.4.10 - @build 12th August, 2017 + @build 19th August, 2017 @created 30th April, 2015 @package Component Builder @subpackage details_right.php diff --git a/admin/layouts/fieldtype/fields_fullwidth.php b/admin/layouts/fieldtype/fields_fullwidth.php index a01ce265f..d34a7d924 100644 --- a/admin/layouts/fieldtype/fields_fullwidth.php +++ b/admin/layouts/fieldtype/fields_fullwidth.php @@ -11,7 +11,7 @@ /-------------------------------------------------------------------------------------------------------------------------------/ @version 2.4.10 - @build 12th August, 2017 + @build 19th August, 2017 @created 30th April, 2015 @package Component Builder @subpackage fields_fullwidth.php diff --git a/admin/layouts/fieldtype/publishing.php b/admin/layouts/fieldtype/publishing.php index 4334c2a79..835fc173e 100644 --- a/admin/layouts/fieldtype/publishing.php +++ b/admin/layouts/fieldtype/publishing.php @@ -11,7 +11,7 @@ /-------------------------------------------------------------------------------------------------------------------------------/ @version 2.4.10 - @build 12th August, 2017 + @build 19th August, 2017 @created 30th April, 2015 @package Component Builder @subpackage publishing.php diff --git a/admin/layouts/fieldtype/publlshing.php b/admin/layouts/fieldtype/publlshing.php index c35293eb8..e5f45ba8b 100644 --- a/admin/layouts/fieldtype/publlshing.php +++ b/admin/layouts/fieldtype/publlshing.php @@ -11,7 +11,7 @@ /-------------------------------------------------------------------------------------------------------------------------------/ @version 2.4.10 - @build 12th August, 2017 + @build 19th August, 2017 @created 30th April, 2015 @package Component Builder @subpackage publlshing.php diff --git a/admin/layouts/help_document/details_above.php b/admin/layouts/help_document/details_above.php index 108076057..737ee409b 100644 --- a/admin/layouts/help_document/details_above.php +++ b/admin/layouts/help_document/details_above.php @@ -11,7 +11,7 @@ /-------------------------------------------------------------------------------------------------------------------------------/ @version 2.4.10 - @build 12th August, 2017 + @build 19th August, 2017 @created 30th April, 2015 @package Component Builder @subpackage details_above.php diff --git a/admin/layouts/help_document/details_fullwidth.php b/admin/layouts/help_document/details_fullwidth.php index 466624c0c..60ef121e9 100644 --- a/admin/layouts/help_document/details_fullwidth.php +++ b/admin/layouts/help_document/details_fullwidth.php @@ -11,7 +11,7 @@ /-------------------------------------------------------------------------------------------------------------------------------/ @version 2.4.10 - @build 12th August, 2017 + @build 19th August, 2017 @created 30th April, 2015 @package Component Builder @subpackage details_fullwidth.php diff --git a/admin/layouts/help_document/details_left.php b/admin/layouts/help_document/details_left.php index f55d72771..683c04cc9 100644 --- a/admin/layouts/help_document/details_left.php +++ b/admin/layouts/help_document/details_left.php @@ -11,7 +11,7 @@ /-------------------------------------------------------------------------------------------------------------------------------/ @version 2.4.10 - @build 12th August, 2017 + @build 19th August, 2017 @created 30th April, 2015 @package Component Builder @subpackage details_left.php diff --git a/admin/layouts/help_document/details_right.php b/admin/layouts/help_document/details_right.php index 198028cbf..56344aa5a 100644 --- a/admin/layouts/help_document/details_right.php +++ b/admin/layouts/help_document/details_right.php @@ -11,7 +11,7 @@ /-------------------------------------------------------------------------------------------------------------------------------/ @version 2.4.10 - @build 12th August, 2017 + @build 19th August, 2017 @created 30th April, 2015 @package Component Builder @subpackage details_right.php diff --git a/admin/layouts/help_document/details_under.php b/admin/layouts/help_document/details_under.php index 985cb365a..043c4e73c 100644 --- a/admin/layouts/help_document/details_under.php +++ b/admin/layouts/help_document/details_under.php @@ -11,7 +11,7 @@ /-------------------------------------------------------------------------------------------------------------------------------/ @version 2.4.10 - @build 12th August, 2017 + @build 19th August, 2017 @created 30th April, 2015 @package Component Builder @subpackage details_under.php diff --git a/admin/layouts/help_document/publishing.php b/admin/layouts/help_document/publishing.php index 4334c2a79..835fc173e 100644 --- a/admin/layouts/help_document/publishing.php +++ b/admin/layouts/help_document/publishing.php @@ -11,7 +11,7 @@ /-------------------------------------------------------------------------------------------------------------------------------/ @version 2.4.10 - @build 12th August, 2017 + @build 19th August, 2017 @created 30th April, 2015 @package Component Builder @subpackage publishing.php diff --git a/admin/layouts/help_document/publlshing.php b/admin/layouts/help_document/publlshing.php index 7fd758ae9..01e6f64ef 100644 --- a/admin/layouts/help_document/publlshing.php +++ b/admin/layouts/help_document/publlshing.php @@ -11,7 +11,7 @@ /-------------------------------------------------------------------------------------------------------------------------------/ @version 2.4.10 - @build 12th August, 2017 + @build 19th August, 2017 @created 30th April, 2015 @package Component Builder @subpackage publlshing.php diff --git a/admin/layouts/joomla_component/admin_views_fullwidth.php b/admin/layouts/joomla_component/admin_views_fullwidth.php index e60dd550e..136a4ee5a 100644 --- a/admin/layouts/joomla_component/admin_views_fullwidth.php +++ b/admin/layouts/joomla_component/admin_views_fullwidth.php @@ -11,7 +11,7 @@ /-------------------------------------------------------------------------------------------------------------------------------/ @version 2.4.10 - @build 12th August, 2017 + @build 19th August, 2017 @created 30th April, 2015 @package Component Builder @subpackage admin_views_fullwidth.php diff --git a/admin/layouts/joomla_component/custom_admin_views_fullwidth.php b/admin/layouts/joomla_component/custom_admin_views_fullwidth.php index 846c3fab5..da1819299 100644 --- a/admin/layouts/joomla_component/custom_admin_views_fullwidth.php +++ b/admin/layouts/joomla_component/custom_admin_views_fullwidth.php @@ -11,7 +11,7 @@ /-------------------------------------------------------------------------------------------------------------------------------/ @version 2.4.10 - @build 12th August, 2017 + @build 19th August, 2017 @created 30th April, 2015 @package Component Builder @subpackage custom_admin_views_fullwidth.php diff --git a/admin/layouts/joomla_component/details_above.php b/admin/layouts/joomla_component/details_above.php index cc9268d5b..3efe97b80 100644 --- a/admin/layouts/joomla_component/details_above.php +++ b/admin/layouts/joomla_component/details_above.php @@ -11,7 +11,7 @@ /-------------------------------------------------------------------------------------------------------------------------------/ @version 2.4.10 - @build 12th August, 2017 + @build 19th August, 2017 @created 30th April, 2015 @package Component Builder @subpackage details_above.php diff --git a/admin/layouts/joomla_component/details_left.php b/admin/layouts/joomla_component/details_left.php index 25e089107..85285b1ed 100644 --- a/admin/layouts/joomla_component/details_left.php +++ b/admin/layouts/joomla_component/details_left.php @@ -11,7 +11,7 @@ /-------------------------------------------------------------------------------------------------------------------------------/ @version 2.4.10 - @build 12th August, 2017 + @build 19th August, 2017 @created 30th April, 2015 @package Component Builder @subpackage details_left.php diff --git a/admin/layouts/joomla_component/details_right.php b/admin/layouts/joomla_component/details_right.php index 442e9a13a..23c5b55a1 100644 --- a/admin/layouts/joomla_component/details_right.php +++ b/admin/layouts/joomla_component/details_right.php @@ -11,7 +11,7 @@ /-------------------------------------------------------------------------------------------------------------------------------/ @version 2.4.10 - @build 12th August, 2017 + @build 19th August, 2017 @created 30th April, 2015 @package Component Builder @subpackage details_right.php diff --git a/admin/layouts/joomla_component/details_under.php b/admin/layouts/joomla_component/details_under.php index 985cb365a..043c4e73c 100644 --- a/admin/layouts/joomla_component/details_under.php +++ b/admin/layouts/joomla_component/details_under.php @@ -11,7 +11,7 @@ /-------------------------------------------------------------------------------------------------------------------------------/ @version 2.4.10 - @build 12th August, 2017 + @build 19th August, 2017 @created 30th April, 2015 @package Component Builder @subpackage details_under.php diff --git a/admin/layouts/joomla_component/dynamic_build_beta_fullwidth.php b/admin/layouts/joomla_component/dynamic_build_beta_fullwidth.php index f84608523..8208dcf61 100644 --- a/admin/layouts/joomla_component/dynamic_build_beta_fullwidth.php +++ b/admin/layouts/joomla_component/dynamic_build_beta_fullwidth.php @@ -11,7 +11,7 @@ /-------------------------------------------------------------------------------------------------------------------------------/ @version 2.4.10 - @build 12th August, 2017 + @build 19th August, 2017 @created 30th April, 2015 @package Component Builder @subpackage dynamic_build_beta_fullwidth.php diff --git a/admin/layouts/joomla_component/dynamic_integration_fullwidth.php b/admin/layouts/joomla_component/dynamic_integration_fullwidth.php index 5024c7e19..1b4398969 100644 --- a/admin/layouts/joomla_component/dynamic_integration_fullwidth.php +++ b/admin/layouts/joomla_component/dynamic_integration_fullwidth.php @@ -11,7 +11,7 @@ /-------------------------------------------------------------------------------------------------------------------------------/ @version 2.4.10 - @build 12th August, 2017 + @build 19th August, 2017 @created 30th April, 2015 @package Component Builder @subpackage dynamic_integration_fullwidth.php diff --git a/admin/layouts/joomla_component/libs_helpers_fullwidth.php b/admin/layouts/joomla_component/libs_helpers_fullwidth.php index 120b848c5..bf894b8b2 100644 --- a/admin/layouts/joomla_component/libs_helpers_fullwidth.php +++ b/admin/layouts/joomla_component/libs_helpers_fullwidth.php @@ -11,7 +11,7 @@ /-------------------------------------------------------------------------------------------------------------------------------/ @version 2.4.10 - @build 12th August, 2017 + @build 19th August, 2017 @created 30th April, 2015 @package Component Builder @subpackage libs_helpers_fullwidth.php diff --git a/admin/layouts/joomla_component/mysql_fullwidth.php b/admin/layouts/joomla_component/mysql_fullwidth.php index 31ea0cf3f..0c86ffb90 100644 --- a/admin/layouts/joomla_component/mysql_fullwidth.php +++ b/admin/layouts/joomla_component/mysql_fullwidth.php @@ -11,7 +11,7 @@ /-------------------------------------------------------------------------------------------------------------------------------/ @version 2.4.10 - @build 12th August, 2017 + @build 19th August, 2017 @created 30th April, 2015 @package Component Builder @subpackage mysql_fullwidth.php diff --git a/admin/layouts/joomla_component/php_fullwidth.php b/admin/layouts/joomla_component/php_fullwidth.php index adc7301d7..14a150485 100644 --- a/admin/layouts/joomla_component/php_fullwidth.php +++ b/admin/layouts/joomla_component/php_fullwidth.php @@ -11,7 +11,7 @@ /-------------------------------------------------------------------------------------------------------------------------------/ @version 2.4.10 - @build 12th August, 2017 + @build 19th August, 2017 @created 30th April, 2015 @package Component Builder @subpackage php_fullwidth.php diff --git a/admin/layouts/joomla_component/publishing.php b/admin/layouts/joomla_component/publishing.php index 4334c2a79..835fc173e 100644 --- a/admin/layouts/joomla_component/publishing.php +++ b/admin/layouts/joomla_component/publishing.php @@ -11,7 +11,7 @@ /-------------------------------------------------------------------------------------------------------------------------------/ @version 2.4.10 - @build 12th August, 2017 + @build 19th August, 2017 @created 30th April, 2015 @package Component Builder @subpackage publishing.php diff --git a/admin/layouts/joomla_component/publlshing.php b/admin/layouts/joomla_component/publlshing.php index c35293eb8..e5f45ba8b 100644 --- a/admin/layouts/joomla_component/publlshing.php +++ b/admin/layouts/joomla_component/publlshing.php @@ -11,7 +11,7 @@ /-------------------------------------------------------------------------------------------------------------------------------/ @version 2.4.10 - @build 12th August, 2017 + @build 19th August, 2017 @created 30th April, 2015 @package Component Builder @subpackage publlshing.php diff --git a/admin/layouts/joomla_component/readme_left.php b/admin/layouts/joomla_component/readme_left.php index b341fc1f2..52e527d6c 100644 --- a/admin/layouts/joomla_component/readme_left.php +++ b/admin/layouts/joomla_component/readme_left.php @@ -11,7 +11,7 @@ /-------------------------------------------------------------------------------------------------------------------------------/ @version 2.4.10 - @build 12th August, 2017 + @build 19th August, 2017 @created 30th April, 2015 @package Component Builder @subpackage readme_left.php diff --git a/admin/layouts/joomla_component/readme_right.php b/admin/layouts/joomla_component/readme_right.php index 300f65769..7e3b500f2 100644 --- a/admin/layouts/joomla_component/readme_right.php +++ b/admin/layouts/joomla_component/readme_right.php @@ -11,7 +11,7 @@ /-------------------------------------------------------------------------------------------------------------------------------/ @version 2.4.10 - @build 12th August, 2017 + @build 19th August, 2017 @created 30th April, 2015 @package Component Builder @subpackage readme_right.php diff --git a/admin/layouts/joomla_component/settings_left.php b/admin/layouts/joomla_component/settings_left.php index 1180d4c9d..b88d92608 100644 --- a/admin/layouts/joomla_component/settings_left.php +++ b/admin/layouts/joomla_component/settings_left.php @@ -11,7 +11,7 @@ /-------------------------------------------------------------------------------------------------------------------------------/ @version 2.4.10 - @build 12th August, 2017 + @build 19th August, 2017 @created 30th April, 2015 @package Component Builder @subpackage settings_left.php diff --git a/admin/layouts/joomla_component/settings_right.php b/admin/layouts/joomla_component/settings_right.php index 2d34d190d..153db31e6 100644 --- a/admin/layouts/joomla_component/settings_right.php +++ b/admin/layouts/joomla_component/settings_right.php @@ -11,7 +11,7 @@ /-------------------------------------------------------------------------------------------------------------------------------/ @version 2.4.10 - @build 12th August, 2017 + @build 19th August, 2017 @created 30th April, 2015 @package Component Builder @subpackage settings_right.php diff --git a/admin/layouts/joomla_component/site_views_fullwidth.php b/admin/layouts/joomla_component/site_views_fullwidth.php index 1a890e22f..e138e9407 100644 --- a/admin/layouts/joomla_component/site_views_fullwidth.php +++ b/admin/layouts/joomla_component/site_views_fullwidth.php @@ -11,7 +11,7 @@ /-------------------------------------------------------------------------------------------------------------------------------/ @version 2.4.10 - @build 12th August, 2017 + @build 19th August, 2017 @created 30th April, 2015 @package Component Builder @subpackage site_views_fullwidth.php diff --git a/admin/layouts/joomla_component/translation_fullwidth.php b/admin/layouts/joomla_component/translation_fullwidth.php index 5599d68c2..e42110dcc 100644 --- a/admin/layouts/joomla_component/translation_fullwidth.php +++ b/admin/layouts/joomla_component/translation_fullwidth.php @@ -11,7 +11,7 @@ /-------------------------------------------------------------------------------------------------------------------------------/ @version 2.4.10 - @build 12th August, 2017 + @build 19th August, 2017 @created 30th April, 2015 @package Component Builder @subpackage translation_fullwidth.php diff --git a/admin/layouts/language/details_left.php b/admin/layouts/language/details_left.php index 225dd2f2c..21600e51e 100644 --- a/admin/layouts/language/details_left.php +++ b/admin/layouts/language/details_left.php @@ -11,7 +11,7 @@ /-------------------------------------------------------------------------------------------------------------------------------/ @version 2.4.10 - @build 12th August, 2017 + @build 19th August, 2017 @created 30th April, 2015 @package Component Builder @subpackage details_left.php diff --git a/admin/layouts/language/details_right.php b/admin/layouts/language/details_right.php index 02931e0c9..67cdf9054 100644 --- a/admin/layouts/language/details_right.php +++ b/admin/layouts/language/details_right.php @@ -11,7 +11,7 @@ /-------------------------------------------------------------------------------------------------------------------------------/ @version 2.4.10 - @build 12th August, 2017 + @build 19th August, 2017 @created 30th April, 2015 @package Component Builder @subpackage details_right.php diff --git a/admin/layouts/language/publishing.php b/admin/layouts/language/publishing.php index 4334c2a79..835fc173e 100644 --- a/admin/layouts/language/publishing.php +++ b/admin/layouts/language/publishing.php @@ -11,7 +11,7 @@ /-------------------------------------------------------------------------------------------------------------------------------/ @version 2.4.10 - @build 12th August, 2017 + @build 19th August, 2017 @created 30th April, 2015 @package Component Builder @subpackage publishing.php diff --git a/admin/layouts/language/publlshing.php b/admin/layouts/language/publlshing.php index c35293eb8..e5f45ba8b 100644 --- a/admin/layouts/language/publlshing.php +++ b/admin/layouts/language/publlshing.php @@ -11,7 +11,7 @@ /-------------------------------------------------------------------------------------------------------------------------------/ @version 2.4.10 - @build 12th August, 2017 + @build 19th August, 2017 @created 30th April, 2015 @package Component Builder @subpackage publlshing.php diff --git a/admin/layouts/language_translation/details_above.php b/admin/layouts/language_translation/details_above.php index c7f16dcd6..2b41ec788 100644 --- a/admin/layouts/language_translation/details_above.php +++ b/admin/layouts/language_translation/details_above.php @@ -11,7 +11,7 @@ /-------------------------------------------------------------------------------------------------------------------------------/ @version 2.4.10 - @build 12th August, 2017 + @build 19th August, 2017 @created 30th April, 2015 @package Component Builder @subpackage details_above.php diff --git a/admin/layouts/language_translation/details_fullwidth.php b/admin/layouts/language_translation/details_fullwidth.php index 04764e031..b3ba9e5cc 100644 --- a/admin/layouts/language_translation/details_fullwidth.php +++ b/admin/layouts/language_translation/details_fullwidth.php @@ -11,7 +11,7 @@ /-------------------------------------------------------------------------------------------------------------------------------/ @version 2.4.10 - @build 12th August, 2017 + @build 19th August, 2017 @created 30th April, 2015 @package Component Builder @subpackage details_fullwidth.php diff --git a/admin/layouts/language_translation/publishing.php b/admin/layouts/language_translation/publishing.php index 4334c2a79..835fc173e 100644 --- a/admin/layouts/language_translation/publishing.php +++ b/admin/layouts/language_translation/publishing.php @@ -11,7 +11,7 @@ /-------------------------------------------------------------------------------------------------------------------------------/ @version 2.4.10 - @build 12th August, 2017 + @build 19th August, 2017 @created 30th April, 2015 @package Component Builder @subpackage publishing.php diff --git a/admin/layouts/language_translation/publlshing.php b/admin/layouts/language_translation/publlshing.php index c35293eb8..e5f45ba8b 100644 --- a/admin/layouts/language_translation/publlshing.php +++ b/admin/layouts/language_translation/publlshing.php @@ -11,7 +11,7 @@ /-------------------------------------------------------------------------------------------------------------------------------/ @version 2.4.10 - @build 12th August, 2017 + @build 19th August, 2017 @created 30th April, 2015 @package Component Builder @subpackage publlshing.php diff --git a/admin/layouts/layout/custom_script_fullwidth.php b/admin/layouts/layout/custom_script_fullwidth.php index b22fe2870..b3e45e709 100644 --- a/admin/layouts/layout/custom_script_fullwidth.php +++ b/admin/layouts/layout/custom_script_fullwidth.php @@ -11,7 +11,7 @@ /-------------------------------------------------------------------------------------------------------------------------------/ @version 2.4.10 - @build 12th August, 2017 + @build 19th August, 2017 @created 30th April, 2015 @package Component Builder @subpackage custom_script_fullwidth.php diff --git a/admin/layouts/layout/details_fullwidth.php b/admin/layouts/layout/details_fullwidth.php index 9d18b49a7..a9906c2eb 100644 --- a/admin/layouts/layout/details_fullwidth.php +++ b/admin/layouts/layout/details_fullwidth.php @@ -11,7 +11,7 @@ /-------------------------------------------------------------------------------------------------------------------------------/ @version 2.4.10 - @build 12th August, 2017 + @build 19th August, 2017 @created 30th April, 2015 @package Component Builder @subpackage details_fullwidth.php diff --git a/admin/layouts/layout/details_left.php b/admin/layouts/layout/details_left.php index aa5593186..4a6651e2d 100644 --- a/admin/layouts/layout/details_left.php +++ b/admin/layouts/layout/details_left.php @@ -11,7 +11,7 @@ /-------------------------------------------------------------------------------------------------------------------------------/ @version 2.4.10 - @build 12th August, 2017 + @build 19th August, 2017 @created 30th April, 2015 @package Component Builder @subpackage details_left.php diff --git a/admin/layouts/layout/details_right.php b/admin/layouts/layout/details_right.php index 7a085cb6d..3f3022b01 100644 --- a/admin/layouts/layout/details_right.php +++ b/admin/layouts/layout/details_right.php @@ -11,7 +11,7 @@ /-------------------------------------------------------------------------------------------------------------------------------/ @version 2.4.10 - @build 12th August, 2017 + @build 19th August, 2017 @created 30th April, 2015 @package Component Builder @subpackage details_right.php diff --git a/admin/layouts/layout/details_rightside.php b/admin/layouts/layout/details_rightside.php index f93d8fde8..d652bb5f4 100644 --- a/admin/layouts/layout/details_rightside.php +++ b/admin/layouts/layout/details_rightside.php @@ -11,7 +11,7 @@ /-------------------------------------------------------------------------------------------------------------------------------/ @version 2.4.10 - @build 12th August, 2017 + @build 19th August, 2017 @created 30th April, 2015 @package Component Builder @subpackage details_rightside.php diff --git a/admin/layouts/layout/details_under.php b/admin/layouts/layout/details_under.php index 985cb365a..043c4e73c 100644 --- a/admin/layouts/layout/details_under.php +++ b/admin/layouts/layout/details_under.php @@ -11,7 +11,7 @@ /-------------------------------------------------------------------------------------------------------------------------------/ @version 2.4.10 - @build 12th August, 2017 + @build 19th August, 2017 @created 30th April, 2015 @package Component Builder @subpackage details_under.php diff --git a/admin/layouts/layout/publishing.php b/admin/layouts/layout/publishing.php index 4334c2a79..835fc173e 100644 --- a/admin/layouts/layout/publishing.php +++ b/admin/layouts/layout/publishing.php @@ -11,7 +11,7 @@ /-------------------------------------------------------------------------------------------------------------------------------/ @version 2.4.10 - @build 12th August, 2017 + @build 19th August, 2017 @created 30th April, 2015 @package Component Builder @subpackage publishing.php diff --git a/admin/layouts/layout/publlshing.php b/admin/layouts/layout/publlshing.php index c35293eb8..e5f45ba8b 100644 --- a/admin/layouts/layout/publlshing.php +++ b/admin/layouts/layout/publlshing.php @@ -11,7 +11,7 @@ /-------------------------------------------------------------------------------------------------------------------------------/ @version 2.4.10 - @build 12th August, 2017 + @build 19th August, 2017 @created 30th April, 2015 @package Component Builder @subpackage publlshing.php diff --git a/admin/layouts/site_view/custom_buttons_fullwidth.php b/admin/layouts/site_view/custom_buttons_fullwidth.php index 312341016..9fc77f1b7 100644 --- a/admin/layouts/site_view/custom_buttons_fullwidth.php +++ b/admin/layouts/site_view/custom_buttons_fullwidth.php @@ -11,7 +11,7 @@ /-------------------------------------------------------------------------------------------------------------------------------/ @version 2.4.10 - @build 12th August, 2017 + @build 19th August, 2017 @created 30th April, 2015 @package Component Builder @subpackage custom_buttons_fullwidth.php diff --git a/admin/layouts/site_view/custom_buttons_left.php b/admin/layouts/site_view/custom_buttons_left.php index 98e7d158d..95212eed7 100644 --- a/admin/layouts/site_view/custom_buttons_left.php +++ b/admin/layouts/site_view/custom_buttons_left.php @@ -11,7 +11,7 @@ /-------------------------------------------------------------------------------------------------------------------------------/ @version 2.4.10 - @build 12th August, 2017 + @build 19th August, 2017 @created 30th April, 2015 @package Component Builder @subpackage custom_buttons_left.php diff --git a/admin/layouts/site_view/custom_buttons_right.php b/admin/layouts/site_view/custom_buttons_right.php index c29a86036..2ae4447f1 100644 --- a/admin/layouts/site_view/custom_buttons_right.php +++ b/admin/layouts/site_view/custom_buttons_right.php @@ -11,7 +11,7 @@ /-------------------------------------------------------------------------------------------------------------------------------/ @version 2.4.10 - @build 12th August, 2017 + @build 19th August, 2017 @created 30th April, 2015 @package Component Builder @subpackage custom_buttons_right.php diff --git a/admin/layouts/site_view/details_above.php b/admin/layouts/site_view/details_above.php index cc9268d5b..3efe97b80 100644 --- a/admin/layouts/site_view/details_above.php +++ b/admin/layouts/site_view/details_above.php @@ -11,7 +11,7 @@ /-------------------------------------------------------------------------------------------------------------------------------/ @version 2.4.10 - @build 12th August, 2017 + @build 19th August, 2017 @created 30th April, 2015 @package Component Builder @subpackage details_above.php diff --git a/admin/layouts/site_view/details_fullwidth.php b/admin/layouts/site_view/details_fullwidth.php index 3849c375a..9e2769311 100644 --- a/admin/layouts/site_view/details_fullwidth.php +++ b/admin/layouts/site_view/details_fullwidth.php @@ -11,7 +11,7 @@ /-------------------------------------------------------------------------------------------------------------------------------/ @version 2.4.10 - @build 12th August, 2017 + @build 19th August, 2017 @created 30th April, 2015 @package Component Builder @subpackage details_fullwidth.php diff --git a/admin/layouts/site_view/details_left.php b/admin/layouts/site_view/details_left.php index a1f06b5bd..432ae7ecc 100644 --- a/admin/layouts/site_view/details_left.php +++ b/admin/layouts/site_view/details_left.php @@ -11,7 +11,7 @@ /-------------------------------------------------------------------------------------------------------------------------------/ @version 2.4.10 - @build 12th August, 2017 + @build 19th August, 2017 @created 30th April, 2015 @package Component Builder @subpackage details_left.php diff --git a/admin/layouts/site_view/details_right.php b/admin/layouts/site_view/details_right.php index 7a085cb6d..3f3022b01 100644 --- a/admin/layouts/site_view/details_right.php +++ b/admin/layouts/site_view/details_right.php @@ -11,7 +11,7 @@ /-------------------------------------------------------------------------------------------------------------------------------/ @version 2.4.10 - @build 12th August, 2017 + @build 19th August, 2017 @created 30th April, 2015 @package Component Builder @subpackage details_right.php diff --git a/admin/layouts/site_view/details_rightside.php b/admin/layouts/site_view/details_rightside.php index 789d9d3c9..2072c2210 100644 --- a/admin/layouts/site_view/details_rightside.php +++ b/admin/layouts/site_view/details_rightside.php @@ -11,7 +11,7 @@ /-------------------------------------------------------------------------------------------------------------------------------/ @version 2.4.10 - @build 12th August, 2017 + @build 19th August, 2017 @created 30th April, 2015 @package Component Builder @subpackage details_rightside.php diff --git a/admin/layouts/site_view/details_under.php b/admin/layouts/site_view/details_under.php index 985cb365a..043c4e73c 100644 --- a/admin/layouts/site_view/details_under.php +++ b/admin/layouts/site_view/details_under.php @@ -11,7 +11,7 @@ /-------------------------------------------------------------------------------------------------------------------------------/ @version 2.4.10 - @build 12th August, 2017 + @build 19th August, 2017 @created 30th April, 2015 @package Component Builder @subpackage details_under.php diff --git a/admin/layouts/site_view/javascript_css_fullwidth.php b/admin/layouts/site_view/javascript_css_fullwidth.php index b270438a6..6d0def36e 100644 --- a/admin/layouts/site_view/javascript_css_fullwidth.php +++ b/admin/layouts/site_view/javascript_css_fullwidth.php @@ -11,7 +11,7 @@ /-------------------------------------------------------------------------------------------------------------------------------/ @version 2.4.10 - @build 12th August, 2017 + @build 19th August, 2017 @created 30th April, 2015 @package Component Builder @subpackage javascript_css_fullwidth.php diff --git a/admin/layouts/site_view/linked_components_fullwidth.php b/admin/layouts/site_view/linked_components_fullwidth.php index 77c0fa394..25ffdcf97 100644 --- a/admin/layouts/site_view/linked_components_fullwidth.php +++ b/admin/layouts/site_view/linked_components_fullwidth.php @@ -11,7 +11,7 @@ /-------------------------------------------------------------------------------------------------------------------------------/ @version 2.4.10 - @build 12th August, 2017 + @build 19th August, 2017 @created 30th April, 2015 @package Component Builder @subpackage linked_components_fullwidth.php diff --git a/admin/layouts/site_view/php_fullwidth.php b/admin/layouts/site_view/php_fullwidth.php index b2b7d67a4..6124db413 100644 --- a/admin/layouts/site_view/php_fullwidth.php +++ b/admin/layouts/site_view/php_fullwidth.php @@ -11,7 +11,7 @@ /-------------------------------------------------------------------------------------------------------------------------------/ @version 2.4.10 - @build 12th August, 2017 + @build 19th August, 2017 @created 30th April, 2015 @package Component Builder @subpackage php_fullwidth.php diff --git a/admin/layouts/site_view/publishing.php b/admin/layouts/site_view/publishing.php index 4334c2a79..835fc173e 100644 --- a/admin/layouts/site_view/publishing.php +++ b/admin/layouts/site_view/publishing.php @@ -11,7 +11,7 @@ /-------------------------------------------------------------------------------------------------------------------------------/ @version 2.4.10 - @build 12th August, 2017 + @build 19th August, 2017 @created 30th April, 2015 @package Component Builder @subpackage publishing.php diff --git a/admin/layouts/site_view/publlshing.php b/admin/layouts/site_view/publlshing.php index c35293eb8..e5f45ba8b 100644 --- a/admin/layouts/site_view/publlshing.php +++ b/admin/layouts/site_view/publlshing.php @@ -11,7 +11,7 @@ /-------------------------------------------------------------------------------------------------------------------------------/ @version 2.4.10 - @build 12th August, 2017 + @build 19th August, 2017 @created 30th April, 2015 @package Component Builder @subpackage publlshing.php diff --git a/admin/layouts/snippet/details_above.php b/admin/layouts/snippet/details_above.php index 4634a9943..be54a4faa 100644 --- a/admin/layouts/snippet/details_above.php +++ b/admin/layouts/snippet/details_above.php @@ -11,7 +11,7 @@ /-------------------------------------------------------------------------------------------------------------------------------/ @version 2.4.10 - @build 12th August, 2017 + @build 19th August, 2017 @created 30th April, 2015 @package Component Builder @subpackage details_above.php diff --git a/admin/layouts/snippet/details_left.php b/admin/layouts/snippet/details_left.php index 3d379a026..8d8034d29 100644 --- a/admin/layouts/snippet/details_left.php +++ b/admin/layouts/snippet/details_left.php @@ -11,7 +11,7 @@ /-------------------------------------------------------------------------------------------------------------------------------/ @version 2.4.10 - @build 12th August, 2017 + @build 19th August, 2017 @created 30th April, 2015 @package Component Builder @subpackage details_left.php diff --git a/admin/layouts/snippet/details_right.php b/admin/layouts/snippet/details_right.php index 4f74d0e6e..7a1a4645b 100644 --- a/admin/layouts/snippet/details_right.php +++ b/admin/layouts/snippet/details_right.php @@ -11,7 +11,7 @@ /-------------------------------------------------------------------------------------------------------------------------------/ @version 2.4.10 - @build 12th August, 2017 + @build 19th August, 2017 @created 30th April, 2015 @package Component Builder @subpackage details_right.php diff --git a/admin/layouts/snippet/publishing.php b/admin/layouts/snippet/publishing.php index 4334c2a79..835fc173e 100644 --- a/admin/layouts/snippet/publishing.php +++ b/admin/layouts/snippet/publishing.php @@ -11,7 +11,7 @@ /-------------------------------------------------------------------------------------------------------------------------------/ @version 2.4.10 - @build 12th August, 2017 + @build 19th August, 2017 @created 30th April, 2015 @package Component Builder @subpackage publishing.php diff --git a/admin/layouts/snippet/publlshing.php b/admin/layouts/snippet/publlshing.php index c35293eb8..e5f45ba8b 100644 --- a/admin/layouts/snippet/publlshing.php +++ b/admin/layouts/snippet/publlshing.php @@ -11,7 +11,7 @@ /-------------------------------------------------------------------------------------------------------------------------------/ @version 2.4.10 - @build 12th August, 2017 + @build 19th August, 2017 @created 30th April, 2015 @package Component Builder @subpackage publlshing.php diff --git a/admin/layouts/template/custom_script_fullwidth.php b/admin/layouts/template/custom_script_fullwidth.php index b22fe2870..b3e45e709 100644 --- a/admin/layouts/template/custom_script_fullwidth.php +++ b/admin/layouts/template/custom_script_fullwidth.php @@ -11,7 +11,7 @@ /-------------------------------------------------------------------------------------------------------------------------------/ @version 2.4.10 - @build 12th August, 2017 + @build 19th August, 2017 @created 30th April, 2015 @package Component Builder @subpackage custom_script_fullwidth.php diff --git a/admin/layouts/template/details_fullwidth.php b/admin/layouts/template/details_fullwidth.php index 95e1646f3..3e727d99b 100644 --- a/admin/layouts/template/details_fullwidth.php +++ b/admin/layouts/template/details_fullwidth.php @@ -11,7 +11,7 @@ /-------------------------------------------------------------------------------------------------------------------------------/ @version 2.4.10 - @build 12th August, 2017 + @build 19th August, 2017 @created 30th April, 2015 @package Component Builder @subpackage details_fullwidth.php diff --git a/admin/layouts/template/details_left.php b/admin/layouts/template/details_left.php index aa5593186..4a6651e2d 100644 --- a/admin/layouts/template/details_left.php +++ b/admin/layouts/template/details_left.php @@ -11,7 +11,7 @@ /-------------------------------------------------------------------------------------------------------------------------------/ @version 2.4.10 - @build 12th August, 2017 + @build 19th August, 2017 @created 30th April, 2015 @package Component Builder @subpackage details_left.php diff --git a/admin/layouts/template/details_right.php b/admin/layouts/template/details_right.php index 7a085cb6d..3f3022b01 100644 --- a/admin/layouts/template/details_right.php +++ b/admin/layouts/template/details_right.php @@ -11,7 +11,7 @@ /-------------------------------------------------------------------------------------------------------------------------------/ @version 2.4.10 - @build 12th August, 2017 + @build 19th August, 2017 @created 30th April, 2015 @package Component Builder @subpackage details_right.php diff --git a/admin/layouts/template/details_rightside.php b/admin/layouts/template/details_rightside.php index f93d8fde8..d652bb5f4 100644 --- a/admin/layouts/template/details_rightside.php +++ b/admin/layouts/template/details_rightside.php @@ -11,7 +11,7 @@ /-------------------------------------------------------------------------------------------------------------------------------/ @version 2.4.10 - @build 12th August, 2017 + @build 19th August, 2017 @created 30th April, 2015 @package Component Builder @subpackage details_rightside.php diff --git a/admin/layouts/template/details_under.php b/admin/layouts/template/details_under.php index 985cb365a..043c4e73c 100644 --- a/admin/layouts/template/details_under.php +++ b/admin/layouts/template/details_under.php @@ -11,7 +11,7 @@ /-------------------------------------------------------------------------------------------------------------------------------/ @version 2.4.10 - @build 12th August, 2017 + @build 19th August, 2017 @created 30th April, 2015 @package Component Builder @subpackage details_under.php diff --git a/admin/layouts/template/publishing.php b/admin/layouts/template/publishing.php index 4334c2a79..835fc173e 100644 --- a/admin/layouts/template/publishing.php +++ b/admin/layouts/template/publishing.php @@ -11,7 +11,7 @@ /-------------------------------------------------------------------------------------------------------------------------------/ @version 2.4.10 - @build 12th August, 2017 + @build 19th August, 2017 @created 30th April, 2015 @package Component Builder @subpackage publishing.php diff --git a/admin/layouts/template/publlshing.php b/admin/layouts/template/publlshing.php index c35293eb8..e5f45ba8b 100644 --- a/admin/layouts/template/publlshing.php +++ b/admin/layouts/template/publlshing.php @@ -11,7 +11,7 @@ /-------------------------------------------------------------------------------------------------------------------------------/ @version 2.4.10 - @build 12th August, 2017 + @build 19th August, 2017 @created 30th April, 2015 @package Component Builder @subpackage publlshing.php diff --git a/admin/models/ajax.php b/admin/models/ajax.php index a1aa6390c..09e8819c2 100644 --- a/admin/models/ajax.php +++ b/admin/models/ajax.php @@ -11,7 +11,7 @@ /-------------------------------------------------------------------------------------------------------------------------------/ @version 2.4.10 - @build 12th August, 2017 + @build 19th August, 2017 @created 30th April, 2015 @package Component Builder @subpackage ajax.php @@ -147,6 +147,33 @@ class ComponentbuilderModelAjax extends JModelList $html[] = ' ' . JText::_('COM_COMPONENTBUILDER_EDIT') . ' ' .$object->system_name . '

    '; // now return the diplay return implode("\n", $html); + } + + /** + * get the component details (html) + **/ + public function getCronPath($type) + { + $result = array('error' => '' . JText::_('COM_COMPONENTBUILDER_NO_CRONJOB_PATH_FOUND_SINCE_INCORRECT_TYPE_REQUESTED') . ''); + if ('backup' === $type) + { + $result['error'] = '' . JText::sprintf('COM_COMPONENTBUILDER_NO_CRONJOB_PATH_FOUND_FOR_S', $type) . ''; + if ($this->hasCurl()) + { + $path = '*/5 * * * * curl -s "' .JURI::root() . 'index.php?option=com_componentbuilder&task=api.backup" >/dev/null 2>&1'; + } + else + { + $path = '*/5 * * * * wget "' .JURI::root() . 'index.php?option=com_componentbuilder&task=api.backup" >/dev/null 2>&1'; + } + $result['path'] = '' . $path . ''; + } + return $result; + } + + protected function hasCurl() + { + return function_exists('curl_version'); } // Used in admin_view diff --git a/admin/models/componentbuilder.php b/admin/models/componentbuilder.php index 56ff13146..6dc54a931 100644 --- a/admin/models/componentbuilder.php +++ b/admin/models/componentbuilder.php @@ -11,7 +11,7 @@ /-------------------------------------------------------------------------------------------------------------------------------/ @version 2.4.10 - @build 12th August, 2017 + @build 19th August, 2017 @created 30th April, 2015 @package Component Builder @subpackage componentbuilder.php diff --git a/admin/models/fields/adminviewfolderlist.php b/admin/models/fields/adminviewfolderlist.php index 8957e2040..076c6ffda 100644 --- a/admin/models/fields/adminviewfolderlist.php +++ b/admin/models/fields/adminviewfolderlist.php @@ -11,7 +11,7 @@ /-------------------------------------------------------------------------------------------------------------------------------/ @version 2.4.10 - @build 12th August, 2017 + @build 19th August, 2017 @created 30th April, 2015 @package Component Builder @subpackage adminviewfolderlist.php diff --git a/admin/models/fields/adminviews.php b/admin/models/fields/adminviews.php index d53dea42f..53d200501 100644 --- a/admin/models/fields/adminviews.php +++ b/admin/models/fields/adminviews.php @@ -11,7 +11,7 @@ /-------------------------------------------------------------------------------------------------------------------------------/ @version 2.4.10 - @build 12th August, 2017 + @build 19th August, 2017 @created 30th April, 2015 @package Component Builder @subpackage adminviews.php diff --git a/admin/models/fields/articles.php b/admin/models/fields/articles.php index 26231e7e8..3db25b4e1 100644 --- a/admin/models/fields/articles.php +++ b/admin/models/fields/articles.php @@ -11,7 +11,7 @@ /-------------------------------------------------------------------------------------------------------------------------------/ @version 2.4.10 - @build 12th August, 2017 + @build 19th August, 2017 @created 30th April, 2015 @package Component Builder @subpackage articles.php diff --git a/admin/models/fields/component.php b/admin/models/fields/component.php index 75eff3334..e64c33473 100644 --- a/admin/models/fields/component.php +++ b/admin/models/fields/component.php @@ -11,7 +11,7 @@ /-------------------------------------------------------------------------------------------------------------------------------/ @version 2.4.10 - @build 12th August, 2017 + @build 19th August, 2017 @created 30th April, 2015 @package Component Builder @subpackage component.php diff --git a/admin/models/fields/components.php b/admin/models/fields/components.php index b58eb8b53..5a7ad20d9 100644 --- a/admin/models/fields/components.php +++ b/admin/models/fields/components.php @@ -11,7 +11,7 @@ /-------------------------------------------------------------------------------------------------------------------------------/ @version 2.4.10 - @build 12th August, 2017 + @build 19th August, 2017 @created 30th April, 2015 @package Component Builder @subpackage components.php diff --git a/admin/models/fields/customadminviews.php b/admin/models/fields/customadminviews.php index 798ed3eeb..20fbca0de 100644 --- a/admin/models/fields/customadminviews.php +++ b/admin/models/fields/customadminviews.php @@ -11,7 +11,7 @@ /-------------------------------------------------------------------------------------------------------------------------------/ @version 2.4.10 - @build 12th August, 2017 + @build 19th August, 2017 @created 30th April, 2015 @package Component Builder @subpackage customadminviews.php diff --git a/admin/models/fields/customfilelist.php b/admin/models/fields/customfilelist.php index 311e2746d..34cf31b28 100644 --- a/admin/models/fields/customfilelist.php +++ b/admin/models/fields/customfilelist.php @@ -11,7 +11,7 @@ /-------------------------------------------------------------------------------------------------------------------------------/ @version 2.4.10 - @build 12th August, 2017 + @build 19th August, 2017 @created 30th April, 2015 @package Component Builder @subpackage customfilelist.php diff --git a/admin/models/fields/customfolderlist.php b/admin/models/fields/customfolderlist.php index 97bd3c303..1d8e78061 100644 --- a/admin/models/fields/customfolderlist.php +++ b/admin/models/fields/customfolderlist.php @@ -11,7 +11,7 @@ /-------------------------------------------------------------------------------------------------------------------------------/ @version 2.4.10 - @build 12th August, 2017 + @build 19th August, 2017 @created 30th April, 2015 @package Component Builder @subpackage customfolderlist.php diff --git a/admin/models/fields/customgets.php b/admin/models/fields/customgets.php index ea6212e32..90320373e 100644 --- a/admin/models/fields/customgets.php +++ b/admin/models/fields/customgets.php @@ -11,7 +11,7 @@ /-------------------------------------------------------------------------------------------------------------------------------/ @version 2.4.10 - @build 12th August, 2017 + @build 19th August, 2017 @created 30th April, 2015 @package Component Builder @subpackage customgets.php diff --git a/admin/models/fields/dbtables.php b/admin/models/fields/dbtables.php index b764e8d7e..07bc4e81d 100644 --- a/admin/models/fields/dbtables.php +++ b/admin/models/fields/dbtables.php @@ -11,7 +11,7 @@ /-------------------------------------------------------------------------------------------------------------------------------/ @version 2.4.10 - @build 12th August, 2017 + @build 19th August, 2017 @created 30th April, 2015 @package Component Builder @subpackage dbtables.php diff --git a/admin/models/fields/dynamicget.php b/admin/models/fields/dynamicget.php index ecb0e1e93..0ecc500c1 100644 --- a/admin/models/fields/dynamicget.php +++ b/admin/models/fields/dynamicget.php @@ -11,7 +11,7 @@ /-------------------------------------------------------------------------------------------------------------------------------/ @version 2.4.10 - @build 12th August, 2017 + @build 19th August, 2017 @created 30th April, 2015 @package Component Builder @subpackage dynamicget.php diff --git a/admin/models/fields/dynamicgets.php b/admin/models/fields/dynamicgets.php index 87288b03e..1a17044c4 100644 --- a/admin/models/fields/dynamicgets.php +++ b/admin/models/fields/dynamicgets.php @@ -11,7 +11,7 @@ /-------------------------------------------------------------------------------------------------------------------------------/ @version 2.4.10 - @build 12th August, 2017 + @build 19th August, 2017 @created 30th April, 2015 @package Component Builder @subpackage dynamicgets.php diff --git a/admin/models/fields/fields.php b/admin/models/fields/fields.php index 5cd0baa4f..d0744f415 100644 --- a/admin/models/fields/fields.php +++ b/admin/models/fields/fields.php @@ -11,7 +11,7 @@ /-------------------------------------------------------------------------------------------------------------------------------/ @version 2.4.10 - @build 12th August, 2017 + @build 19th August, 2017 @created 30th April, 2015 @package Component Builder @subpackage fields.php diff --git a/admin/models/fields/fieldsmulti.php b/admin/models/fields/fieldsmulti.php index 324d3d127..7cab77e41 100644 --- a/admin/models/fields/fieldsmulti.php +++ b/admin/models/fields/fieldsmulti.php @@ -11,7 +11,7 @@ /-------------------------------------------------------------------------------------------------------------------------------/ @version 2.4.10 - @build 12th August, 2017 + @build 19th August, 2017 @created 30th April, 2015 @package Component Builder @subpackage fieldsmulti.php diff --git a/admin/models/fields/fieldtypes.php b/admin/models/fields/fieldtypes.php index d918796c2..f8f385a83 100644 --- a/admin/models/fields/fieldtypes.php +++ b/admin/models/fields/fieldtypes.php @@ -11,7 +11,7 @@ /-------------------------------------------------------------------------------------------------------------------------------/ @version 2.4.10 - @build 12th August, 2017 + @build 19th August, 2017 @created 30th April, 2015 @package Component Builder @subpackage fieldtypes.php diff --git a/admin/models/fields/lang.php b/admin/models/fields/lang.php index f94ed4277..b55f1d7ca 100644 --- a/admin/models/fields/lang.php +++ b/admin/models/fields/lang.php @@ -11,7 +11,7 @@ /-------------------------------------------------------------------------------------------------------------------------------/ @version 2.4.10 - @build 12th August, 2017 + @build 19th August, 2017 @created 30th April, 2015 @package Component Builder @subpackage lang.php diff --git a/admin/models/fields/maingets.php b/admin/models/fields/maingets.php index bc3f5364b..7f67dfc37 100644 --- a/admin/models/fields/maingets.php +++ b/admin/models/fields/maingets.php @@ -11,7 +11,7 @@ /-------------------------------------------------------------------------------------------------------------------------------/ @version 2.4.10 - @build 12th August, 2017 + @build 19th August, 2017 @created 30th April, 2015 @package Component Builder @subpackage maingets.php diff --git a/admin/models/fields/siteviewfolderlist.php b/admin/models/fields/siteviewfolderlist.php index ab0cf8815..2ecdbb51b 100644 --- a/admin/models/fields/siteviewfolderlist.php +++ b/admin/models/fields/siteviewfolderlist.php @@ -11,7 +11,7 @@ /-------------------------------------------------------------------------------------------------------------------------------/ @version 2.4.10 - @build 12th August, 2017 + @build 19th August, 2017 @created 30th April, 2015 @package Component Builder @subpackage siteviewfolderlist.php diff --git a/admin/models/fields/siteviews.php b/admin/models/fields/siteviews.php index 10f498e1f..bdc6e1bf0 100644 --- a/admin/models/fields/siteviews.php +++ b/admin/models/fields/siteviews.php @@ -11,7 +11,7 @@ /-------------------------------------------------------------------------------------------------------------------------------/ @version 2.4.10 - @build 12th August, 2017 + @build 19th August, 2017 @created 30th April, 2015 @package Component Builder @subpackage siteviews.php diff --git a/admin/models/fields/snippets.php b/admin/models/fields/snippets.php index 1b307ea9c..a6524d9e3 100644 --- a/admin/models/fields/snippets.php +++ b/admin/models/fields/snippets.php @@ -11,7 +11,7 @@ /-------------------------------------------------------------------------------------------------------------------------------/ @version 2.4.10 - @build 12th August, 2017 + @build 19th August, 2017 @created 30th April, 2015 @package Component Builder @subpackage snippets.php diff --git a/admin/models/forms/joomla_component.js b/admin/models/forms/joomla_component.js index 09c76b525..df5540050 100644 --- a/admin/models/forms/joomla_component.js +++ b/admin/models/forms/joomla_component.js @@ -9,8 +9,8 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version @update number 338 of this MVC - @build 7th August, 2017 + @version @update number 355 of this MVC + @build 19th August, 2017 @created 6th May, 2015 @package Component Builder @subpackage joomla_component.js diff --git a/admin/models/import.php b/admin/models/import.php index e79877f35..bd6040d4c 100644 --- a/admin/models/import.php +++ b/admin/models/import.php @@ -11,7 +11,7 @@ /-------------------------------------------------------------------------------------------------------------------------------/ @version 2.4.10 - @build 12th August, 2017 + @build 19th August, 2017 @created 30th April, 2015 @package Component Builder @subpackage import.php diff --git a/admin/models/import_joomla_components.php b/admin/models/import_joomla_components.php index 786ab78c4..70e19aee9 100644 --- a/admin/models/import_joomla_components.php +++ b/admin/models/import_joomla_components.php @@ -11,7 +11,7 @@ /-------------------------------------------------------------------------------------------------------------------------------/ @version 2.4.10 - @build 12th August, 2017 + @build 19th August, 2017 @created 30th April, 2015 @package Component Builder @subpackage import_joomla_components.php diff --git a/admin/models/joomla_component.php b/admin/models/joomla_component.php index 12208c45b..2921b6110 100644 --- a/admin/models/joomla_component.php +++ b/admin/models/joomla_component.php @@ -10,8 +10,8 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version @update number 338 of this MVC - @build 7th August, 2017 + @version @update number 355 of this MVC + @build 19th August, 2017 @created 6th May, 2015 @package Component Builder @subpackage joomla_component.php diff --git a/admin/models/joomla_components.php b/admin/models/joomla_components.php index d104449fd..eee561783 100644 --- a/admin/models/joomla_components.php +++ b/admin/models/joomla_components.php @@ -10,8 +10,8 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version @update number 338 of this MVC - @build 7th August, 2017 + @version @update number 355 of this MVC + @build 19th August, 2017 @created 6th May, 2015 @package Component Builder @subpackage joomla_components.php @@ -56,12 +56,13 @@ class ComponentbuilderModelJoomla_components extends JModelList parent::__construct($config); } + public $user; public $packagePath = false; - public $packageName = false; + public $packageName = false; public $zipPath = false; public $key = array(); - public $exportBuyLinks = array(); - public $exportPackageLinks= array(); + public $exportBuyLinks = array(); + public $exportPackageLinks = array(); public $info = array( 'name' => array(), 'short_description' => array(), @@ -74,17 +75,18 @@ class ComponentbuilderModelJoomla_components extends JModelList 'copyright' => array(), 'getKeyFrom' => null ); + public $activeType = 'export'; protected $params; protected $tempPath; protected $customPath; - protected $smartExport = array(); - protected $templateIds = array(); + protected $smartExport = array(); + protected $templateIds = array(); protected $layoutIds = array(); protected $customCodeIds = array(); - protected $customCodeM = array(); + protected $customCodeM = array(); protected $fieldTypes = array(); - protected $isRepeatable = array(); + protected $isRepeatable = array(); /** * Method to build the export package @@ -97,22 +99,28 @@ class ComponentbuilderModelJoomla_components extends JModelList if (ComponentbuilderHelper::checkArray($pks)) { // Get the user object. - $user = JFactory::getUser(); + if (!ComponentbuilderHelper::checkObject($this->user)) + { + $this->user = JFactory::getUser(); + } // Create a new query object. - $db = JFactory::getDBO(); - $query = $db->getQuery(true); + if (!ComponentbuilderHelper::checkObject($this->_db)) + { + $this->_db = JFactory::getDBO(); + } + $query = $this->_db->getQuery(true); // Select some fields $query->select(array('a.*')); // From the componentbuilder_joomla_component table - $query->from($db->quoteName('#__componentbuilder_joomla_component', 'a')); + $query->from($this->_db->quoteName('#__componentbuilder_joomla_component', 'a')); $query->where('a.id IN (' . implode(',',$pks) . ')'); // Implement View Level Access - if (!$user->authorise('core.options', 'com_componentbuilder')) + if (!$this->user->authorise('core.options', 'com_componentbuilder')) { - $groups = implode(',', $user->getAuthorisedViewLevels()); + $groups = implode(',', $this->user->getAuthorisedViewLevels()); $query->where('a.access IN (' . $groups . ')'); } @@ -120,32 +128,58 @@ class ComponentbuilderModelJoomla_components extends JModelList $query->order('a.ordering ASC'); // Load the items - $db->setQuery($query); - $db->execute(); - if ($db->getNumRows()) + $this->_db->setQuery($query); + $this->_db->execute(); + if ($this->_db->getNumRows()) { // load the items from db - $items = $db->loadObjectList(); + $items = $this->_db->loadObjectList(); // check if we have items if (ComponentbuilderHelper::checkArray($items)) { - // set the paths - $comConfig = JFactory::getConfig(); - $this->tempPath = $comConfig->get('tmp_path'); // set params $this->params = JComponentHelper::getParams('com_componentbuilder'); // set custom folder path $this->customPath = $this->params->get('custom_folder_path', JPATH_COMPONENT_ADMINISTRATOR.'/custom'); - // set the package path - if (count($items) == 1) + // check what type of export or backup this is + if ('backup' === $this->activeType || 'manualBackup' === $this->activeType) { - $this->packageName = 'JCB_' . $this->getPackageName($items); + // set the paths + if (!$this->backupPath = $this->params->get('cronjob_backup_folder_path', null)) + { + // set the paths + $comConfig = JFactory::getConfig(); + $this->backupPath = $comConfig->get('tmp_path'); + } + // set the date array + $date = JFactory::getDate(); + $placeholderDate = array(); + $placeholderDate['[YEAR]'] = $date->format('Y'); + $placeholderDate['[MONTH]'] = $date->format('m'); + $placeholderDate['[DAY]'] = $date->format('d'); + $placeholderDate['[HOUR]'] = $date->format('H'); + $placeholderDate['[MINUTE]'] = $date->format('i'); + // get the package name + $packageName = $this->params->get('backup_package_name', 'JCB_Backup_[YEAR]_[MONTH]_[DAY]'); + $this->packageName = str_replace(array_keys($placeholderDate), array_values($placeholderDate), $packageName); } else { - $this->packageName = 'JCB_smartPackage'; + // set the paths + $comConfig = JFactory::getConfig(); + $this->backupPath = $comConfig->get('tmp_path'); + // set the package name + if (count($items) == 1) + { + $this->packageName = 'JCB_' . $this->getPackageName($items); + } + else + { + $this->packageName = 'JCB_smartPackage'; + } } - $this->packagePath = $this->tempPath . '/' . $this->packageName; + // set the package path + $this->packagePath = rtrim($this->backupPath, '/') . '/' . $this->packageName; $this->zipPath = $this->packagePath .'.zip'; if (JFolder::exists($this->packagePath)) { @@ -162,13 +196,13 @@ class ComponentbuilderModelJoomla_components extends JModelList $basic = new FOFEncryptAes($basickey, 128); } // add custom code - $this->setData($user, $db, 'custom_code', $pks, 'component'); + $this->setData('custom_code', $pks, 'component'); // start loading the components $this->smartExport['joomla_component'] = array(); foreach ($items as $nr => &$item) { // check if user has access - $access = ($user->authorise('joomla_component.access', 'com_componentbuilder.joomla_component.' . (int) $item->id) && $user->authorise('joomla_component.access', 'com_componentbuilder')); + $access = ($this->user->authorise('joomla_component.access', 'com_componentbuilder.joomla_component.' . (int) $item->id) && $this->user->authorise('joomla_component.access', 'com_componentbuilder')); if (!$access) { unset($items[$nr]); @@ -227,34 +261,34 @@ class ComponentbuilderModelJoomla_components extends JModelList // component image $this->moveIt(array('image' => array($item->image)), 'image'); // add config fields - $this->setData($user, $db, 'field', $item->addconfig, 'field'); + $this->setData('field', $item->addconfig, 'field'); // add admin views - $this->setData($user, $db, 'admin_view', $item->addadmin_views, 'adminview'); + $this->setData('admin_view', $item->addadmin_views, 'adminview'); // add custom admin views - $this->setData($user, $db, 'custom_admin_view', $item->addcustom_admin_views, 'customadminview'); + $this->setData('custom_admin_view', $item->addcustom_admin_views, 'customadminview'); // add site views - $this->setData($user, $db, 'site_view', $item->addsite_views, 'siteview'); + $this->setData('site_view', $item->addsite_views, 'siteview'); // set the custom code ID's $this->setCustomCodeIds($item, 'joomla_component'); // set the language strings for this component - $this->setLanguageTranslation($user, $db, $item->id); + $this->setLanguageTranslation($item->id); // load to global object $this->smartExport['joomla_component'][$item->id] = $item; } // add templates if (ComponentbuilderHelper::checkArray($this->templateIds)) { - $this->setData($user, $db, 'template', array('template' => $this->templateIds), 'template'); + $this->setData('template', array('template' => $this->templateIds), 'template'); } // add layouts if (ComponentbuilderHelper::checkArray($this->layoutIds)) { - $this->setData($user, $db, 'layout', array('layout' => $this->layoutIds), 'layout'); + $this->setData('layout', array('layout' => $this->layoutIds), 'layout'); } // add custom code if (ComponentbuilderHelper::checkArray($this->customCodeIds)) { - $this->setData($user, $db, 'custom_code', array('custom_code' => $this->customCodeIds), 'custom_code'); + $this->setData('custom_code', array('custom_code' => $this->customCodeIds), 'custom_code'); } // has any data been set if (ComponentbuilderHelper::checkArray($this->smartExport['joomla_component'])) @@ -447,17 +481,26 @@ class ComponentbuilderModelJoomla_components extends JModelList if (!JFile::exists($tmpFilePath) && JFile::exists($customFilePath)) { // move the file to its place - JFile::copy($customFilePath, $tmpFilePath,'',true); + JFile::copy($customFilePath, $tmpFilePath); } } if ('image' === $type) { + $imageName = basename($item); + $imagePath = str_replace($imageName, '', $item); + $imageFolderPath = str_replace('//', '/', $this->packagePath.'/'. $imagePath); + // check if image folder exist + if (!JFolder::exists($imageFolderPath)) + { + // create the folders if not found + JFolder::create($imageFolderPath); + } $tmpImagePath = str_replace('//', '/', $this->packagePath.'/'.$item); $customImagePath = str_replace('//', '/', JPATH_ROOT.'/'.$item); if (!JFile::exists($tmpImagePath) && JFile::exists($customImagePath)) { // move the file to its place - JFile::copy($customImagePath, $tmpImagePath,'',true); + JFile::copy($customImagePath, $tmpImagePath); } } if ('folder' === $type) @@ -480,7 +523,7 @@ class ComponentbuilderModelJoomla_components extends JModelList * * @return mixed An array of data items on success, false on failure. */ - protected function setData(&$user, &$db, $table, $values, $key) + protected function setData($table, $values, $key) { // if json convert to array if (ComponentbuilderHelper::checkJson($values)) @@ -496,13 +539,13 @@ class ComponentbuilderModelJoomla_components extends JModelList { return false; } - $query = $db->getQuery(true); + $query = $this->_db->getQuery(true); // Select some fields $query->select(array('a.*')); // From the componentbuilder_ANY table - $query->from($db->quoteName('#__componentbuilder_'. $table, 'a')); + $query->from($this->_db->quoteName('#__componentbuilder_'. $table, 'a')); if ('custom_code' === $table && 'component' === $key) { $query->where('a.component IN (' . implode(',',$values) . ')'); @@ -517,9 +560,9 @@ class ComponentbuilderModelJoomla_components extends JModelList } // Implement View Level Access - if (!$user->authorise('core.options', 'com_componentbuilder')) + if (!$this->user->authorise('core.options', 'com_componentbuilder')) { - $groups = implode(',', $user->getAuthorisedViewLevels()); + $groups = implode(',', $this->user->getAuthorisedViewLevels()); $query->where('a.access IN (' . $groups . ')'); } @@ -527,11 +570,11 @@ class ComponentbuilderModelJoomla_components extends JModelList $query->order('a.ordering ASC'); // Load the items - $db->setQuery($query); - $db->execute(); - if ($db->getNumRows()) + $this->_db->setQuery($query); + $this->_db->execute(); + if ($this->_db->getNumRows()) { - $items = $db->loadObjectList(); + $items = $this->_db->loadObjectList(); // check if we have items if (ComponentbuilderHelper::checkArray($items)) { @@ -569,7 +612,7 @@ class ComponentbuilderModelJoomla_components extends JModelList if ('admin_view' === $table) { // add fields - $this->setData($user, $db, 'field', $item->addfields, 'field'); + $this->setData('field', $item->addfields, 'field'); // admin icon $this->moveIt(array('image' => array($item->icon)), 'image'); // admin icon_add @@ -581,7 +624,7 @@ class ComponentbuilderModelJoomla_components extends JModelList if ('field' === $table) { // add field types - $this->setData($user, $db, 'fieldtype', array('fieldtype' => array($item->fieldtype)), 'fieldtype'); + $this->setData('fieldtype', array('fieldtype' => array($item->fieldtype)), 'fieldtype'); // we must add a repeatable field subfields if ($this->checkRepeatable($item->fieldtype)) { @@ -600,7 +643,7 @@ class ComponentbuilderModelJoomla_components extends JModelList // get fields if (ComponentbuilderHelper::checkArray($fieldsSets)) { - $this->setData($user, $db, 'field', array('field' => $fieldsSets), 'field'); + $this->setData('field', array('field' => $fieldsSets), 'field'); } } } @@ -608,40 +651,40 @@ class ComponentbuilderModelJoomla_components extends JModelList if ('site_view' === $table || 'custom_admin_view' === $table) { // search for templates & layouts - $this->getTemplateLayout(base64_decode($item->default), $db); + $this->getTemplateLayout(base64_decode($item->default)); // add search array templates and layouts foreach ($searchArray as $scripter) { if (isset($item->{'add_'.$scripter}) && $item->{'add_'.$scripter} == 1) { - $this->getTemplateLayout($item->$scripter, $db); + $this->getTemplateLayout($item->$scripter); } } // add dynamic gets - $this->setData($user, $db, 'dynamic_get', array('dynamic_get' => array($item->main_get)), 'dynamic_get'); - $this->setData($user, $db, 'dynamic_get', $item->custom_get, 'custom_get'); + $this->setData('dynamic_get', array('dynamic_get' => array($item->main_get)), 'dynamic_get'); + $this->setData('dynamic_get', $item->custom_get, 'custom_get'); if ('custom_admin_view' === $table && isset($item->icon)) { // view icon $this->moveIt(array('image' => array($item->icon)), 'image'); } // add snippets - $this->setData($user, $db, 'snippet', array('snippet' => array($item->snippet)), 'snippet'); + $this->setData('snippet', array('snippet' => array($item->snippet)), 'snippet'); } // actions to take if table is template and layout if ('layout' === $table || 'template' === $table) { // search for templates & layouts - $this->getTemplateLayout(base64_decode($item->$table), $db, $user); + $this->getTemplateLayout(base64_decode($item->$table), $this->user); // add search array templates and layouts if (isset($item->add_php_view) && $item->add_php_view == 1) { - $this->getTemplateLayout($item->php_view, $db, $user); + $this->getTemplateLayout($item->php_view, $this->user); } // add dynamic gets - $this->setData($user, $db, 'dynamic_get', array('dynamic_get' => $item->dynamic_get), 'dynamic_get'); + $this->setData('dynamic_get', array('dynamic_get' => $item->dynamic_get), 'dynamic_get'); // add snippets - $this->setData($user, $db, 'snippet', array('snippet' => array($item->snippet)), 'snippet'); + $this->setData('snippet', array('snippet' => array($item->snippet)), 'snippet'); } } } @@ -730,7 +773,7 @@ class ComponentbuilderModelJoomla_components extends JModelList * @return void * */ - protected function getTemplateLayout($default, &$db, $user = false) + protected function getTemplateLayout($default, $user = false) { // set the Template data $temp1 = ComponentbuilderHelper::getAllBetween($default, "\$this->loadTemplate('","')"); @@ -756,7 +799,7 @@ class ComponentbuilderModelJoomla_components extends JModelList { foreach ($templates as $template) { - $data = $this->getDataWithAlias($template, 'template', $db); + $data = $this->getDataWithAlias($template, 'template'); if (ComponentbuilderHelper::checkArray($data)) { if (!isset($this->templateIds[$data['id']])) @@ -791,7 +834,7 @@ class ComponentbuilderModelJoomla_components extends JModelList { foreach ($layouts as $layout) { - $data = $this->getDataWithAlias($layout, 'layout', $db); + $data = $this->getDataWithAlias($layout, 'layout'); if (ComponentbuilderHelper::checkArray($data)) { if (!isset($this->layoutIds[$data['id']])) @@ -808,7 +851,7 @@ class ComponentbuilderModelJoomla_components extends JModelList { foreach ($again as $get) { - $this->getTemplateLayout($get, $db); + $this->getTemplateLayout($get); } } // Set the Data @@ -817,12 +860,12 @@ class ComponentbuilderModelJoomla_components extends JModelList // add templates if (ComponentbuilderHelper::checkArray($this->templateIds)) { - $this->setData($user, $db, 'template', array('template' => $this->templateIds), 'template'); + $this->setData('template', array('template' => $this->templateIds), 'template'); } // add layouts if (ComponentbuilderHelper::checkArray($this->layoutIds)) { - $this->setData($user, $db, 'layout', array('layout' => $this->layoutIds), 'layout'); + $this->setData('layout', array('layout' => $this->layoutIds), 'layout'); } } } @@ -837,14 +880,14 @@ class ComponentbuilderModelJoomla_components extends JModelList * @return array The data found with the alias * */ - protected function getDataWithAlias($n_ame, $table, &$db) + protected function getDataWithAlias($n_ame, $table) { // Create a new query object. - $query = $db->getQuery(true); - $query->select($db->quoteName(array('a.id', 'a.alias', 'a.'.$table, 'a.php_view', 'a.add_php_view'))); + $query = $this->_db->getQuery(true); + $query->select($this->_db->quoteName(array('a.id', 'a.alias', 'a.'.$table, 'a.php_view', 'a.add_php_view'))); $query->from('#__componentbuilder_'.$table.' AS a'); - $db->setQuery($query); - $rows = $db->loadObjectList(); + $this->_db->setQuery($query); + $rows = $this->_db->loadObjectList(); foreach ($rows as $row) { $k_ey = ComponentbuilderHelper::safeString($row->alias); @@ -930,16 +973,16 @@ class ComponentbuilderModelJoomla_components extends JModelList * @return void * */ - protected function setLanguageTranslation(&$user, &$db, &$id) + protected function setLanguageTranslation(&$id) { // Create a new query object. - $query = $db->getQuery(true); + $query = $this->_db->getQuery(true); $query->select(array('a.*')); $query->from('#__componentbuilder_language_translation AS a'); // Implement View Level Access - if (!$user->authorise('core.options', 'com_componentbuilder')) + if (!$this->user->authorise('core.options', 'com_componentbuilder')) { - $groups = implode(',', $user->getAuthorisedViewLevels()); + $groups = implode(',', $this->user->getAuthorisedViewLevels()); $query->where('a.access IN (' . $groups . ')'); } @@ -947,11 +990,11 @@ class ComponentbuilderModelJoomla_components extends JModelList $query->order('a.ordering ASC'); // Load the items - $db->setQuery($query); - $db->execute(); - if ($db->getNumRows()) + $this->_db->setQuery($query); + $this->_db->execute(); + if ($this->_db->getNumRows()) { - $items = $db->loadObjectList(); + $items = $this->_db->loadObjectList(); // check if we have items if (ComponentbuilderHelper::checkArray($items)) { @@ -971,7 +1014,7 @@ class ComponentbuilderModelJoomla_components extends JModelList // add languages if (isset($item->translation)) { - $this->setData($user, $db, 'language', $item->translation, 'language'); + $this->setData('language', $item->translation, 'language'); } } } diff --git a/admin/sql/install.mysql.utf8.sql b/admin/sql/install.mysql.utf8.sql index e3dc59fe9..ea6bd366b 100644 --- a/admin/sql/install.mysql.utf8.sql +++ b/admin/sql/install.mysql.utf8.sql @@ -781,7 +781,7 @@ CREATE TABLE IF NOT EXISTS `#__componentbuilder_help_document` ( -- INSERT INTO `#__componentbuilder_joomla_component` (`id`, `add_license`, `license_type`, `mvc_versiondate`, `add_css`, `add_email_helper`, `add_php_helper_admin`, `add_php_helper_both`, `add_php_helper_site`, `add_php_postflight_install`, `add_php_method_uninstall`, `add_php_postflight_update`, `add_php_preflight_install`, `add_php_preflight_update`, `add_placeholders`, `add_sql`, `addadmin_views`, `addconfig`, `addcontributors`, `addcustom_admin_views`, `addcustommenus`, `addfiles`, `addfolders`, `addfootable`, `adduikit`, `addsite_views`, `add_admin_event`, `add_site_event`, `add_update_server`, `add_sales_server`, `add_php_dashboard_methods`, `php_dashboard_methods`, `dashboard_tab`, `sales_server_ftp`, `update_server_ftp`, `update_server_target`, `php_admin_event`, `php_site_event`, `addreadme`, `readme`, `author`, `bom`, `buildcomp`, `buildcompsql`, `companyname`, `component_version`, `update_server`, `copyright`, `creatuserhelper`, `css`, `debug_linenr`, `description`, `email`, `emptycontributors`, `image`, `license`, `name`, `system_name`, `name_code`, `not_required`, `number`, `php_helper_admin`, `php_helper_both`, `php_helper_site`, `php_postflight_install`, `php_method_uninstall`, `php_postflight_update`, `php_preflight_install`, `php_preflight_update`, `short_description`, `sql`, `sql_tweak`, `website`, `version_update`, `params`, `published`, `created`, `modified`, `checked_out`, `checked_out_time`, `version`, `hits`, `ordering`, `whmcs_key`, `whmcs_url`) VALUES -(25, '', 1, '', '', '', '', '', 1, 1, '', '', '', '', '', '', '{\"adminview\":[\"109\"],\"icomoon\":[\"eye-open\"],\"mainmenu\":[\"1\"],\"dashboard_add\":[\"1\"],\"dashboard_list\":[\"1\"],\"submenu\":[\"1\"],\"checkin\":[\"1\"],\"history\":[\"1\"],\"metadata\":[\"1\"],\"access\":[\"1\"],\"port\":[\"1\"],\"edit_create_site_view\":[\"1\"],\"order\":[\"1\"]}', '', '', '', '', '', '', '', 1, '{\"siteview\":[\"23\",\"25\"],\"menu\":[\"1\",\"0\"],\"metadata\":[\"1\",\"1\"],\"default_view\":[\"1\",\"0\"],\"access\":[\"1\",\"1\"]}', '', '', 1, '', '', '', '', '7b1Z+0DAchhCu2J13BxwJgUWGTHAeMYxbv4Lw6cZ7NcBS9kA6v01RW68QdsuGEsDoP1LZHsTiM+cRvWAzcwPyg90f4sLf/0KtTTKZLzADNDwRWHl1A8itHZ5L3gHA/pr5Wr6GhtKr5MSUGZJqGnE9u+0CEOJXsLSm5HjHUrICbCikr8y3NHo67n+ugzCCnuo', 'YFLVWFemyyihuKOWagqMekm2Q435XQVTZ903a6JTIMjvblL4pZI+/1TKty8EEGJmtCQjyU62EF9uQDpQqA/e3xKyaYCI35Q9InX+MfN1jCBnJV+kyWhX+KaiZGcESeOLRYiKMVUgesTWklOSLWdawkS5FhoHD8ZzdZsLHDT91fCWjG1HxrPHYr103cnkHQCc', 2, '', '', 1, 'IyAjIyNDb21wb25lbnRfbmFtZSMjIyAoIyMjVkVSU0lPTiMjIykNCg0KIVsjIyNDb21wb25lbnRfbmFtZSMjIyBpbWFnZV0gKGh0dHBzOi8vcmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbS9uYW1pYmlhL2RlbW8tam9vbWxhLTMtY29tcG9uZW50L21hc3Rlci9hZG1pbi9hc3NldHMvaW1hZ2VzL2NvbXBvbmVudC0zMDAuanBnICJUaGUgIyMjQ29tcG9uZW50X25hbWUjIyMiKQ0KDQojIyNERVNDUklQVElPTiMjIw0KDQojIEJ1aWxkIERldGFpbHMNCg0KKyAqQ29tcGFueSo6IFsjIyNDT01QQU5ZTkFNRSMjI10gKCMjI0FVVEhPUldFQlNJVEUjIyMpDQorICpBdXRob3IqOiBbIyMjQVVUSE9SIyMjXSAobWFpbHRvOiMjI0FVVEhPUkVNQUlMIyMjKQ0KKyAqTmFtZSo6IFsjIyNDb21wb25lbnRfbmFtZSMjI10gKCMjI0FVVEhPUldFQlNJVEUjIyMpDQorICpGaXJzdCBCdWlsZCo6ICMjI0NSRUFUSU9OREFURSMjIw0KKyAqTGFzdCBCdWlsZCo6ICMjI0JVSUxEREFURSMjIw0KKyAqVmVyc2lvbio6ICMjI1ZFUlNJT04jIyMNCisgKkNvcHlyaWdodCo6ICMjI0NPUFlSSUdIVCMjIw0KKyAqTGljZW5zZSo6ICMjI0xJQ0VOU0UjIyMNCg0KIyMgQnVpbGQgVGltZQ0KDQoqKiMjI3RvdGFsSG91cnMjIyMgSG91cnMqKiBvciAqKiMjI3RvdGFsRGF5cyMjIyBFaWdodCBIb3VyIERheXMqKiAoYWN0dWFsIHRpbWUgdGhlIGF1dGhvciBzYXZlZCAtDQpkdWUgdG8gW0F1dG9tYXRlZCBDb21wb25lbnQgQnVpbGRlcl0gKGh0dHBzOi8vd3d3LnZkbS5pby9qb29tbGEtY29tcG9uZW50LWJ1aWxkZXIpKQ0KDQo+IChpZiBjcmVhdGluZyBhIGZvbGRlciBhbmQgZmlsZSB0b29rICoqNSBzZWNvbmRzKiogYW5kIHdyaXRpbmcgb25lIGxpbmUgb2YgY29kZSB0b29rICoqMTAgc2Vjb25kcyoqLA0KPiBuZXZlciBtYWtpbmcgb25lIG1pc3Rha2Ugb3IgdGFraW5nIGFueSBjb2ZmZWUgYnJlYWsuKQ0KDQorICpMaW5lIGNvdW50KjogKiojIyNMSU5FX0NPVU5UIyMjKioNCisgKkZpbGUgY291bnQqOiAqKiMjI0ZJTEVfQ09VTlQjIyMqKg0KKyAqRm9sZGVyIGNvdW50KjogKiojIyNGT0xERVJfQ09VTlQjIyMqKg0KDQoqKiMjI2FjdHVhbEhvdXJzU3BlbnQjIyMgSG91cnMqKiBvciAqKiMjI2FjdHVhbERheXNTcGVudCMjIyBFaWdodCBIb3VyIERheXMqKiAodGhlIGFjdHVhbCB0aW1lIHRoZSBhdXRob3Igc3BlbnQpDQoNCj4gKHdpdGggdGhlIGZvbGxvd2luZyBicmVhayBkb3duOg0KPiAqKmRlYnVnZ2luZyBAIyMjZGVidWdnaW5nSG91cnMjIyNob3VycyoqID0gY29kaW5ndGltZSAvIDQ7DQo+ICoqcGxhbm5pbmcgQCMjI3BsYW5uaW5nSG91cnMjIyNob3VycyoqID0gY29kaW5ndGltZSAvIDc7DQo+ICoqbWFwcGluZyBAIyMjbWFwcGluZ0hvdXJzIyMjaG91cnMqKiA9IGNvZGluZ3RpbWUgLyAxMDsNCj4gKipvZmZpY2UgQCMjI29mZmljZUhvdXJzIyMjaG91cnMqKiA9IGNvZGluZ3RpbWUgLyA2OykNCg0KKiojIyNhY3R1YWxUb3RhbEhvdXJzIyMjIEhvdXJzKiogb3IgKiojIyNhY3R1YWxUb3RhbERheXMjIyMgRWlnaHQgSG91ciBEYXlzKioNCihhIHRvdGFsIG9mIHRoZSByZWFsaXN0aWMgdGltZSBmcmFtZSBmb3IgdGhpcyBwcm9qZWN0KQ0KDQo+IChpZiBjcmVhdGluZyBhIGZvbGRlciBhbmQgZmlsZSB0b29rICoqNSBzZWNvbmRzKiogYW5kIHdyaXRpbmcgb25lIGxpbmUgb2YgY29kZSB0b29rICoqMTAgc2Vjb25kcyoqLA0KPiB3aXRoIHRoZSBub3JtYWwgZXZlcnlkYXkgcmVhbGl0aWVzIGF0IHRoZSBvZmZpY2UsIHRoYXQgaW5jbHVkZXMgdGhlIGNvbXBvbmVudCBwbGFubmluZywgbWFwcGluZyAmIGRlYnVnZ2luZy4pDQoNClByb2plY3QgZHVyYXRpb246ICoqIyMjcHJvamVjdFdlZWtUaW1lIyMjIHdlZWtzKiogb3IgKiojIyNwcm9qZWN0TW9udGhUaW1lIyMjIG1vbnRocyoqDQoNCj4gVGhpcyAqKmNvbXBvbmVudCoqIHdhcyBidWlsZCB3aXRoIGEgSm9vbWxhIFtBdXRvbWF0ZWQgQ29tcG9uZW50IEJ1aWxkZXJdIChodHRwczovL3d3dy52ZG0uaW8vam9vbWxhLWNvbXBvbmVudC1idWlsZGVyKS4NCj4gRGV2ZWxvcGVkIGJ5IFtMbGV3ZWxseW4gdmFuIGRlciBNZXJ3ZV0gKG1haWx0bzpqb29tbGFAdmRtLmlvKQ0KDQojIyBEb25hdGlvbnMNCg0KIElmIHlvdSB3YW50IHRvIHN1cHBvcnQgdGhpcyBwcm9qZWN0LCBwbGVhc2UgY29uc2lkZXIgZG9uYXRpbmc6DQogKiBQYXlQYWw6IHBheUB2ZG0uaW8NCiAqIEJpdGNvaW46IDNIMzVQWXdpa0Vvc3ZjanhIWEdQTFMxR3VmWjRiNGlGdTM=', 'Llewellyn van der Merwe', 'default.txt', '', '', 'Vast Development Method', '2.0.0', 'https://www.vdm.io/updates/demo_update_server.xml', 'Copyright (C) 2015. All Rights Reserved', '', '', '', 'Just a basic demo of the most basic implementations of the [Joomla] (http://www.joomla.org) Component Builder\'s ability.', 'info@vdm.io', '', 'images/demo300.jpg', 'GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html', 'Demo', 'Demo', 'demo', '', 4, '', '', 'CS8qKg0KCSAqCUNoYW5nZSB0byBuaWNlIGZhbmN5IGRhdGUNCgkgKi8NCglwdWJsaWMgc3RhdGljIGZ1bmN0aW9uIGZhbmN5RGF0ZSgkZGF0ZSkNCgl7DQoJCWlmICghc2VsZjo6aXNWYWxpZFRpbWVTdGFtcCgkZGF0ZSkpDQoJCXsNCgkJCSRkYXRlID0gc3RydG90aW1lKCRkYXRlKTsNCgkJfQ0KCQlyZXR1cm4gZGF0ZSgnalMgXG9cZiBGIFknLCRkYXRlKTsNCgl9DQoNCgkvKioNCgkgKglDaGFuZ2UgdG8gbmljZSBmYW5jeSB0aW1lIGFuZCBkYXRlDQoJICovDQoJcHVibGljIHN0YXRpYyBmdW5jdGlvbiBmYW5jeURhdGVUaW1lKCR0aW1lKQ0KCXsNCgkJaWYgKCFzZWxmOjppc1ZhbGlkVGltZVN0YW1wKCR0aW1lKSkNCgkJew0KCQkJJHRpbWUgPSBzdHJ0b3RpbWUoJHRpbWUpOw0KCQl9DQoJCXJldHVybiBkYXRlKCcoRzppKSBqUyBcb1xmIEYgWScsJHRpbWUpOw0KCX0NCg0KCS8qKg0KCSAqCUNoYW5nZSB0byBuaWNlIGhvdXI6bWludXRlcyB0aW1lDQoJICovDQoJcHVibGljIHN0YXRpYyBmdW5jdGlvbiBmYW5jeVRpbWUoJHRpbWUpDQoJew0KCQlpZiAoIXNlbGY6OmlzVmFsaWRUaW1lU3RhbXAoJHRpbWUpKQ0KCQl7DQoJCQkkdGltZSA9IHN0cnRvdGltZSgkdGltZSk7DQoJCX0NCgkJcmV0dXJuIGRhdGUoJ0c6aScsJHRpbWUpOw0KCX0NCg0KCS8qKg0KCSAqCUNoZWNrIGlmIHN0cmluZyBpcyBhIHZhbGlkIHRpbWUgc3RhbXANCgkgKi8NCglwdWJsaWMgc3RhdGljIGZ1bmN0aW9uIGlzVmFsaWRUaW1lU3RhbXAoJHRpbWVzdGFtcCkNCgl7DQoJCXJldHVybiAoKGludCkgJHRpbWVzdGFtcCA9PT0gJHRpbWVzdGFtcCkNCgkJJiYgKCR0aW1lc3RhbXAgPD0gUEhQX0lOVF9NQVgpDQoJCSYmICgkdGltZXN0YW1wID49IH5QSFBfSU5UX01BWCk7DQoJfQ0K', 'CQkvLyBHZXQgQXBwbGljYXRpb24gb2JqZWN0DQoJCSRhcHAgPSBKRmFjdG9yeTo6Z2V0QXBwbGljYXRpb24oKTsNCgkJJGFwcC0+ZW5xdWV1ZU1lc3NhZ2UoJ0ZpcnN0IHNldCB0aGUgY29tcG9uZW50cyBnbG9iYWwgc2V0dGluZ3MgYW5kIHBlcm1pc3Npb25zIGluIHRoZSA8Yj5PcHRpb25zPC9iPiBhcmVhLCBvciB0aGUgZnJvbnQtZW5kIG9mIHRoZSBjb21wb25lbnQgd2lsbCBub3Qgd29yayBhcyBleHBlY3RlZC4gPGJyIC8+UGxlYXNlIG5vdGUgdGhhdCBlYWNoIHZpZXcgb24gdGhlIGZyb250LWVuZCBoYXMgYWNjZXNzIGFuZCBwZXJtaXNzaW9ucywgc28gaWYgeW91IHdvdWxkIGxpa2UgdGhlIHB1YmxpYyB0byBhY2Nlc3MgdGhvc2Ugdmlld3MgdGhleSBtdXN0IGJlIGdpdmVuIHRoZSBhY2Nlc3MgYW5kIHBlcm1pc3Npb24uJywgJ0luZm8nKTs=', '', '', '', '', 'Demo Component', '', '', 'https://www.vdm.io/', '{\"version\":[\"1.0.5\",\"2.0.0\"],\"mysql\":[\"\",\"\"],\"url\":[\"https://github.com/namibia/demo-joomla-3-component/archive/v1.0.5.zip\",\"https://github.com/namibia/demo-joomla-3-component/archive/v2.0.0.zip\"]}', '', 1, '2016-10-18 11:44:09', '2017-02-16 14:00:08', '', '0000-00-00 00:00:00', 22, '', 3, '7eoKwXSNcBzhiwiDzXcULNzGjxg1UL6lhP6yoIsc/Pc=', ''); +(25, '', 1, '', '', '', '', '', 1, 1, '', '', '', '', '', '', '{\"adminview\":[\"109\"],\"icomoon\":[\"eye-open\"],\"mainmenu\":[\"1\"],\"dashboard_add\":[\"1\"],\"dashboard_list\":[\"1\"],\"submenu\":[\"1\"],\"checkin\":[\"1\"],\"history\":[\"1\"],\"metadata\":[\"1\"],\"access\":[\"1\"],\"port\":[\"1\"],\"edit_create_site_view\":[\"1\"],\"order\":[\"1\"]}', '', '', '', '', '', '', '', 1, '{\"siteview\":[\"23\",\"25\"],\"menu\":[\"1\",\"0\"],\"metadata\":[\"1\",\"1\"],\"default_view\":[\"1\",\"0\"],\"access\":[\"1\",\"1\"]}', '', '', 1, '', '', '', '', 'aUFySzjHWz36uOJq7d27gSdmCyhLNcQZV/526Keqzw3LQdV49rZ55pffmglCMVaFVJtHfLHaFKozFlAmnys3ChtJVD0OesCqJ0n4pWQVoqYQF0m1vrKrcVFvWkrP8MNtKI7VC5sa135Zzy1A0hOf1QxZu6E3ME9rOemdZ1UTtiQYC1GtYNffrEzvJKGljARB', 'lFcIwXAHYH8Jwz097Y+VJtgNVcIKnU67UrF+a4JQriyUYNjlZUl7u1+p701FdjilHmrhYRKhpnVE9ln9/3ASi/9fWPqXoHEsg6xW12eblHB3b5EOa5CGMMu8U7ktxpB2D0X8luOHj31O+dLPzy/MC9y1AjmM4xm468g+1/Ecunt0E11zW7zKW38xAkH6Z7S4', 2, '', '', 1, 'IyAjIyNDb21wb25lbnRfbmFtZSMjIyAoIyMjVkVSU0lPTiMjIykNCg0KIVsjIyNDb21wb25lbnRfbmFtZSMjIyBpbWFnZV0gKGh0dHBzOi8vcmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbS9uYW1pYmlhL2RlbW8tam9vbWxhLTMtY29tcG9uZW50L21hc3Rlci9hZG1pbi9hc3NldHMvaW1hZ2VzL2NvbXBvbmVudC0zMDAuanBnICJUaGUgIyMjQ29tcG9uZW50X25hbWUjIyMiKQ0KDQojIyNERVNDUklQVElPTiMjIw0KDQojIEJ1aWxkIERldGFpbHMNCg0KKyAqQ29tcGFueSo6IFsjIyNDT01QQU5ZTkFNRSMjI10gKCMjI0FVVEhPUldFQlNJVEUjIyMpDQorICpBdXRob3IqOiBbIyMjQVVUSE9SIyMjXSAobWFpbHRvOiMjI0FVVEhPUkVNQUlMIyMjKQ0KKyAqTmFtZSo6IFsjIyNDb21wb25lbnRfbmFtZSMjI10gKCMjI0FVVEhPUldFQlNJVEUjIyMpDQorICpGaXJzdCBCdWlsZCo6ICMjI0NSRUFUSU9OREFURSMjIw0KKyAqTGFzdCBCdWlsZCo6ICMjI0JVSUxEREFURSMjIw0KKyAqVmVyc2lvbio6ICMjI1ZFUlNJT04jIyMNCisgKkNvcHlyaWdodCo6ICMjI0NPUFlSSUdIVCMjIw0KKyAqTGljZW5zZSo6ICMjI0xJQ0VOU0UjIyMNCg0KIyMgQnVpbGQgVGltZQ0KDQoqKiMjI3RvdGFsSG91cnMjIyMgSG91cnMqKiBvciAqKiMjI3RvdGFsRGF5cyMjIyBFaWdodCBIb3VyIERheXMqKiAoYWN0dWFsIHRpbWUgdGhlIGF1dGhvciBzYXZlZCAtDQpkdWUgdG8gW0F1dG9tYXRlZCBDb21wb25lbnQgQnVpbGRlcl0gKGh0dHBzOi8vd3d3LnZkbS5pby9qb29tbGEtY29tcG9uZW50LWJ1aWxkZXIpKQ0KDQo+IChpZiBjcmVhdGluZyBhIGZvbGRlciBhbmQgZmlsZSB0b29rICoqNSBzZWNvbmRzKiogYW5kIHdyaXRpbmcgb25lIGxpbmUgb2YgY29kZSB0b29rICoqMTAgc2Vjb25kcyoqLA0KPiBuZXZlciBtYWtpbmcgb25lIG1pc3Rha2Ugb3IgdGFraW5nIGFueSBjb2ZmZWUgYnJlYWsuKQ0KDQorICpMaW5lIGNvdW50KjogKiojIyNMSU5FX0NPVU5UIyMjKioNCisgKkZpbGUgY291bnQqOiAqKiMjI0ZJTEVfQ09VTlQjIyMqKg0KKyAqRm9sZGVyIGNvdW50KjogKiojIyNGT0xERVJfQ09VTlQjIyMqKg0KDQoqKiMjI2FjdHVhbEhvdXJzU3BlbnQjIyMgSG91cnMqKiBvciAqKiMjI2FjdHVhbERheXNTcGVudCMjIyBFaWdodCBIb3VyIERheXMqKiAodGhlIGFjdHVhbCB0aW1lIHRoZSBhdXRob3Igc3BlbnQpDQoNCj4gKHdpdGggdGhlIGZvbGxvd2luZyBicmVhayBkb3duOg0KPiAqKmRlYnVnZ2luZyBAIyMjZGVidWdnaW5nSG91cnMjIyNob3VycyoqID0gY29kaW5ndGltZSAvIDQ7DQo+ICoqcGxhbm5pbmcgQCMjI3BsYW5uaW5nSG91cnMjIyNob3VycyoqID0gY29kaW5ndGltZSAvIDc7DQo+ICoqbWFwcGluZyBAIyMjbWFwcGluZ0hvdXJzIyMjaG91cnMqKiA9IGNvZGluZ3RpbWUgLyAxMDsNCj4gKipvZmZpY2UgQCMjI29mZmljZUhvdXJzIyMjaG91cnMqKiA9IGNvZGluZ3RpbWUgLyA2OykNCg0KKiojIyNhY3R1YWxUb3RhbEhvdXJzIyMjIEhvdXJzKiogb3IgKiojIyNhY3R1YWxUb3RhbERheXMjIyMgRWlnaHQgSG91ciBEYXlzKioNCihhIHRvdGFsIG9mIHRoZSByZWFsaXN0aWMgdGltZSBmcmFtZSBmb3IgdGhpcyBwcm9qZWN0KQ0KDQo+IChpZiBjcmVhdGluZyBhIGZvbGRlciBhbmQgZmlsZSB0b29rICoqNSBzZWNvbmRzKiogYW5kIHdyaXRpbmcgb25lIGxpbmUgb2YgY29kZSB0b29rICoqMTAgc2Vjb25kcyoqLA0KPiB3aXRoIHRoZSBub3JtYWwgZXZlcnlkYXkgcmVhbGl0aWVzIGF0IHRoZSBvZmZpY2UsIHRoYXQgaW5jbHVkZXMgdGhlIGNvbXBvbmVudCBwbGFubmluZywgbWFwcGluZyAmIGRlYnVnZ2luZy4pDQoNClByb2plY3QgZHVyYXRpb246ICoqIyMjcHJvamVjdFdlZWtUaW1lIyMjIHdlZWtzKiogb3IgKiojIyNwcm9qZWN0TW9udGhUaW1lIyMjIG1vbnRocyoqDQoNCj4gVGhpcyAqKmNvbXBvbmVudCoqIHdhcyBidWlsZCB3aXRoIGEgSm9vbWxhIFtBdXRvbWF0ZWQgQ29tcG9uZW50IEJ1aWxkZXJdIChodHRwczovL3d3dy52ZG0uaW8vam9vbWxhLWNvbXBvbmVudC1idWlsZGVyKS4NCj4gRGV2ZWxvcGVkIGJ5IFtMbGV3ZWxseW4gdmFuIGRlciBNZXJ3ZV0gKG1haWx0bzpqb29tbGFAdmRtLmlvKQ0KDQojIyBEb25hdGlvbnMNCg0KIElmIHlvdSB3YW50IHRvIHN1cHBvcnQgdGhpcyBwcm9qZWN0LCBwbGVhc2UgY29uc2lkZXIgZG9uYXRpbmc6DQogKiBQYXlQYWw6IHBheUB2ZG0uaW8NCiAqIEJpdGNvaW46IDNIMzVQWXdpa0Vvc3ZjanhIWEdQTFMxR3VmWjRiNGlGdTM=', 'Llewellyn van der Merwe', 'default.txt', '', '', 'Vast Development Method', '2.0.0', 'https://www.vdm.io/updates/demo_update_server.xml', 'Copyright (C) 2015. All Rights Reserved', '', '', '', 'Just a basic demo of the most basic implementations of the [Joomla] (http://www.joomla.org) Component Builder\'s ability.', 'info@vdm.io', '', 'images/vdm/demo500.jpg', 'GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html', 'Demo', 'Demo', 'demo', '', 4, '', '', 'CS8qKg0KCSAqCUNoYW5nZSB0byBuaWNlIGZhbmN5IGRhdGUNCgkgKi8NCglwdWJsaWMgc3RhdGljIGZ1bmN0aW9uIGZhbmN5RGF0ZSgkZGF0ZSkNCgl7DQoJCWlmICghc2VsZjo6aXNWYWxpZFRpbWVTdGFtcCgkZGF0ZSkpDQoJCXsNCgkJCSRkYXRlID0gc3RydG90aW1lKCRkYXRlKTsNCgkJfQ0KCQlyZXR1cm4gZGF0ZSgnalMgXG9cZiBGIFknLCRkYXRlKTsNCgl9DQoNCgkvKioNCgkgKglDaGFuZ2UgdG8gbmljZSBmYW5jeSB0aW1lIGFuZCBkYXRlDQoJICovDQoJcHVibGljIHN0YXRpYyBmdW5jdGlvbiBmYW5jeURhdGVUaW1lKCR0aW1lKQ0KCXsNCgkJaWYgKCFzZWxmOjppc1ZhbGlkVGltZVN0YW1wKCR0aW1lKSkNCgkJew0KCQkJJHRpbWUgPSBzdHJ0b3RpbWUoJHRpbWUpOw0KCQl9DQoJCXJldHVybiBkYXRlKCcoRzppKSBqUyBcb1xmIEYgWScsJHRpbWUpOw0KCX0NCg0KCS8qKg0KCSAqCUNoYW5nZSB0byBuaWNlIGhvdXI6bWludXRlcyB0aW1lDQoJICovDQoJcHVibGljIHN0YXRpYyBmdW5jdGlvbiBmYW5jeVRpbWUoJHRpbWUpDQoJew0KCQlpZiAoIXNlbGY6OmlzVmFsaWRUaW1lU3RhbXAoJHRpbWUpKQ0KCQl7DQoJCQkkdGltZSA9IHN0cnRvdGltZSgkdGltZSk7DQoJCX0NCgkJcmV0dXJuIGRhdGUoJ0c6aScsJHRpbWUpOw0KCX0NCg0KCS8qKg0KCSAqCUNoZWNrIGlmIHN0cmluZyBpcyBhIHZhbGlkIHRpbWUgc3RhbXANCgkgKi8NCglwdWJsaWMgc3RhdGljIGZ1bmN0aW9uIGlzVmFsaWRUaW1lU3RhbXAoJHRpbWVzdGFtcCkNCgl7DQoJCXJldHVybiAoKGludCkgJHRpbWVzdGFtcCA9PT0gJHRpbWVzdGFtcCkNCgkJJiYgKCR0aW1lc3RhbXAgPD0gUEhQX0lOVF9NQVgpDQoJCSYmICgkdGltZXN0YW1wID49IH5QSFBfSU5UX01BWCk7DQoJfQ0K', 'CQkvLyBHZXQgQXBwbGljYXRpb24gb2JqZWN0DQoJCSRhcHAgPSBKRmFjdG9yeTo6Z2V0QXBwbGljYXRpb24oKTsNCgkJJGFwcC0+ZW5xdWV1ZU1lc3NhZ2UoJ0ZpcnN0IHNldCB0aGUgY29tcG9uZW50cyBnbG9iYWwgc2V0dGluZ3MgYW5kIHBlcm1pc3Npb25zIGluIHRoZSA8Yj5PcHRpb25zPC9iPiBhcmVhLCBvciB0aGUgZnJvbnQtZW5kIG9mIHRoZSBjb21wb25lbnQgd2lsbCBub3Qgd29yayBhcyBleHBlY3RlZC4gPGJyIC8+UGxlYXNlIG5vdGUgdGhhdCBlYWNoIHZpZXcgb24gdGhlIGZyb250LWVuZCBoYXMgYWNjZXNzIGFuZCBwZXJtaXNzaW9ucywgc28gaWYgeW91IHdvdWxkIGxpa2UgdGhlIHB1YmxpYyB0byBhY2Nlc3MgdGhvc2Ugdmlld3MgdGhleSBtdXN0IGJlIGdpdmVuIHRoZSBhY2Nlc3MgYW5kIHBlcm1pc3Npb24uJywgJ0luZm8nKTs=', '', '', '', '', 'Demo Component', '', '', 'https://www.vdm.io/', '{\"version\":[\"1.0.5\",\"2.0.0\"],\"mysql\":[\"\",\"\"],\"url\":[\"https://github.com/namibia/demo-joomla-3-component/archive/v1.0.5.zip\",\"https://github.com/namibia/demo-joomla-3-component/archive/v2.0.0.zip\"]}', '', 1, '2016-10-18 11:44:09', '2017-08-17 21:50:14', '', '0000-00-00 00:00:00', 24, '', 3, 'qh/GjuMa23QtYorlriJDKokMfAnN1qz+QYNJc+EGKBA=', ''); -- -- Dumping data for table `#__componentbuilder_admin_view` diff --git a/admin/tables/joomla_component.php b/admin/tables/joomla_component.php index 35096ad59..0adf4a6fe 100644 --- a/admin/tables/joomla_component.php +++ b/admin/tables/joomla_component.php @@ -10,8 +10,8 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version @update number 338 of this MVC - @build 7th August, 2017 + @version @update number 355 of this MVC + @build 19th August, 2017 @created 6th May, 2015 @package Component Builder @subpackage joomla_component.php diff --git a/admin/views/componentbuilder/tmpl/default.php b/admin/views/componentbuilder/tmpl/default.php index 6824c5d83..a99a92ce8 100644 --- a/admin/views/componentbuilder/tmpl/default.php +++ b/admin/views/componentbuilder/tmpl/default.php @@ -11,7 +11,7 @@ /-------------------------------------------------------------------------------------------------------------------------------/ @version 2.4.10 - @build 12th August, 2017 + @build 19th August, 2017 @created 30th April, 2015 @package Component Builder @subpackage default.php diff --git a/admin/views/componentbuilder/tmpl/default_closed_issues_the_closed_issues_on_github.php b/admin/views/componentbuilder/tmpl/default_closed_issues_the_closed_issues_on_github.php index b1106b5cc..575448bfb 100644 --- a/admin/views/componentbuilder/tmpl/default_closed_issues_the_closed_issues_on_github.php +++ b/admin/views/componentbuilder/tmpl/default_closed_issues_the_closed_issues_on_github.php @@ -11,7 +11,7 @@ /-------------------------------------------------------------------------------------------------------------------------------/ @version 2.4.10 - @build 12th August, 2017 + @build 19th August, 2017 @created 30th April, 2015 @package Component Builder @subpackage default_closed_issues_the_closed_issues_on_github.php diff --git a/admin/views/componentbuilder/tmpl/default_main.php b/admin/views/componentbuilder/tmpl/default_main.php index 2bf29eb1f..42c3c1639 100644 --- a/admin/views/componentbuilder/tmpl/default_main.php +++ b/admin/views/componentbuilder/tmpl/default_main.php @@ -11,7 +11,7 @@ /-------------------------------------------------------------------------------------------------------------------------------/ @version 2.4.10 - @build 12th August, 2017 + @build 19th August, 2017 @created 30th April, 2015 @package Component Builder @subpackage default_main.php diff --git a/admin/views/componentbuilder/tmpl/default_open_issues_the_open_issues_on_github.php b/admin/views/componentbuilder/tmpl/default_open_issues_the_open_issues_on_github.php index 16553c607..2066b3c26 100644 --- a/admin/views/componentbuilder/tmpl/default_open_issues_the_open_issues_on_github.php +++ b/admin/views/componentbuilder/tmpl/default_open_issues_the_open_issues_on_github.php @@ -11,7 +11,7 @@ /-------------------------------------------------------------------------------------------------------------------------------/ @version 2.4.10 - @build 12th August, 2017 + @build 19th August, 2017 @created 30th April, 2015 @package Component Builder @subpackage default_open_issues_the_open_issues_on_github.php diff --git a/admin/views/componentbuilder/tmpl/default_readme_information.php b/admin/views/componentbuilder/tmpl/default_readme_information.php index 5ad55e594..875083e9a 100644 --- a/admin/views/componentbuilder/tmpl/default_readme_information.php +++ b/admin/views/componentbuilder/tmpl/default_readme_information.php @@ -11,7 +11,7 @@ /-------------------------------------------------------------------------------------------------------------------------------/ @version 2.4.10 - @build 12th August, 2017 + @build 19th August, 2017 @created 30th April, 2015 @package Component Builder @subpackage default_readme_information.php diff --git a/admin/views/componentbuilder/tmpl/default_releases_information.php b/admin/views/componentbuilder/tmpl/default_releases_information.php index 5f664c211..d7452743d 100644 --- a/admin/views/componentbuilder/tmpl/default_releases_information.php +++ b/admin/views/componentbuilder/tmpl/default_releases_information.php @@ -11,7 +11,7 @@ /-------------------------------------------------------------------------------------------------------------------------------/ @version 2.4.10 - @build 12th August, 2017 + @build 19th August, 2017 @created 30th April, 2015 @package Component Builder @subpackage default_releases_information.php diff --git a/admin/views/componentbuilder/tmpl/default_vast_development_method_notice_board.php b/admin/views/componentbuilder/tmpl/default_vast_development_method_notice_board.php index 30854c7c9..f24e3147d 100644 --- a/admin/views/componentbuilder/tmpl/default_vast_development_method_notice_board.php +++ b/admin/views/componentbuilder/tmpl/default_vast_development_method_notice_board.php @@ -11,7 +11,7 @@ /-------------------------------------------------------------------------------------------------------------------------------/ @version 2.4.10 - @build 12th August, 2017 + @build 19th August, 2017 @created 30th April, 2015 @package Component Builder @subpackage default_vast_development_method_notice_board.php diff --git a/admin/views/componentbuilder/tmpl/default_vdm.php b/admin/views/componentbuilder/tmpl/default_vdm.php index 7683a9fc0..e9956e549 100644 --- a/admin/views/componentbuilder/tmpl/default_vdm.php +++ b/admin/views/componentbuilder/tmpl/default_vdm.php @@ -11,7 +11,7 @@ /-------------------------------------------------------------------------------------------------------------------------------/ @version 2.4.10 - @build 12th August, 2017 + @build 19th August, 2017 @created 30th April, 2015 @package Component Builder @subpackage default_vdm.php @@ -27,7 +27,7 @@ defined('_JEXEC') or die('Restricted access'); ?> -<?php echo JText::_('COM_COMPONENTBUILDER'); ?> +<?php echo JText::_('COM_COMPONENTBUILDER'); ?>
    • : manifest->version; ?>  
    • : manifest->creationDate; ?>
    • diff --git a/admin/views/componentbuilder/view.html.php b/admin/views/componentbuilder/view.html.php index 159eaddf2..ca191e834 100644 --- a/admin/views/componentbuilder/view.html.php +++ b/admin/views/componentbuilder/view.html.php @@ -11,7 +11,7 @@ /-------------------------------------------------------------------------------------------------------------------------------/ @version 2.4.10 - @build 12th August, 2017 + @build 19th August, 2017 @created 30th April, 2015 @package Component Builder @subpackage view.html.php diff --git a/admin/views/import/tmpl/default.php b/admin/views/import/tmpl/default.php index c2f7e54d7..1fc224133 100644 --- a/admin/views/import/tmpl/default.php +++ b/admin/views/import/tmpl/default.php @@ -11,7 +11,7 @@ /-------------------------------------------------------------------------------------------------------------------------------/ @version 2.4.10 - @build 12th August, 2017 + @build 19th August, 2017 @created 30th April, 2015 @package Component Builder @subpackage default.php diff --git a/admin/views/import/view.html.php b/admin/views/import/view.html.php index 518555604..8268bb2d2 100644 --- a/admin/views/import/view.html.php +++ b/admin/views/import/view.html.php @@ -11,7 +11,7 @@ /-------------------------------------------------------------------------------------------------------------------------------/ @version 2.4.10 - @build 12th August, 2017 + @build 19th August, 2017 @created 30th April, 2015 @package Component Builder @subpackage view.html.php diff --git a/admin/views/import_joomla_components/tmpl/default.php b/admin/views/import_joomla_components/tmpl/default.php index 597027b65..cadbad96e 100644 --- a/admin/views/import_joomla_components/tmpl/default.php +++ b/admin/views/import_joomla_components/tmpl/default.php @@ -11,7 +11,7 @@ /-------------------------------------------------------------------------------------------------------------------------------/ @version 2.4.10 - @build 12th August, 2017 + @build 19th August, 2017 @created 30th April, 2015 @package Component Builder @subpackage default.php diff --git a/admin/views/import_joomla_components/view.html.php b/admin/views/import_joomla_components/view.html.php index afd5fda09..73cbea708 100644 --- a/admin/views/import_joomla_components/view.html.php +++ b/admin/views/import_joomla_components/view.html.php @@ -11,7 +11,7 @@ /-------------------------------------------------------------------------------------------------------------------------------/ @version 2.4.10 - @build 12th August, 2017 + @build 19th August, 2017 @created 30th April, 2015 @package Component Builder @subpackage view.html.php diff --git a/admin/views/joomla_component/submitbutton.js b/admin/views/joomla_component/submitbutton.js index aaa6c629b..a7704d579 100644 --- a/admin/views/joomla_component/submitbutton.js +++ b/admin/views/joomla_component/submitbutton.js @@ -9,8 +9,8 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version @update number 338 of this MVC - @build 7th August, 2017 + @version @update number 355 of this MVC + @build 19th August, 2017 @created 6th May, 2015 @package Component Builder @subpackage submitbutton.js diff --git a/admin/views/joomla_component/tmpl/edit.php b/admin/views/joomla_component/tmpl/edit.php index 08d337da8..26e86f963 100644 --- a/admin/views/joomla_component/tmpl/edit.php +++ b/admin/views/joomla_component/tmpl/edit.php @@ -10,8 +10,8 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version @update number 338 of this MVC - @build 7th August, 2017 + @version @update number 355 of this MVC + @build 19th August, 2017 @created 6th May, 2015 @package Component Builder @subpackage edit.php diff --git a/admin/views/joomla_component/view.html.php b/admin/views/joomla_component/view.html.php index 22df5dd77..7a31ae9c1 100644 --- a/admin/views/joomla_component/view.html.php +++ b/admin/views/joomla_component/view.html.php @@ -10,8 +10,8 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version @update number 338 of this MVC - @build 7th August, 2017 + @version @update number 355 of this MVC + @build 19th August, 2017 @created 6th May, 2015 @package Component Builder @subpackage view.html.php diff --git a/admin/views/joomla_components/tmpl/default.php b/admin/views/joomla_components/tmpl/default.php index 70158d51f..94c7c6059 100644 --- a/admin/views/joomla_components/tmpl/default.php +++ b/admin/views/joomla_components/tmpl/default.php @@ -10,8 +10,8 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version @update number 338 of this MVC - @build 7th August, 2017 + @version @update number 355 of this MVC + @build 19th August, 2017 @created 6th May, 2015 @package Component Builder @subpackage default.php diff --git a/admin/views/joomla_components/tmpl/default_batch_body.php b/admin/views/joomla_components/tmpl/default_batch_body.php index cd5deb352..ee6c74511 100644 --- a/admin/views/joomla_components/tmpl/default_batch_body.php +++ b/admin/views/joomla_components/tmpl/default_batch_body.php @@ -10,8 +10,8 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version @update number 338 of this MVC - @build 7th August, 2017 + @version @update number 355 of this MVC + @build 19th August, 2017 @created 6th May, 2015 @package Component Builder @subpackage default_batch_body.php diff --git a/admin/views/joomla_components/tmpl/default_batch_footer.php b/admin/views/joomla_components/tmpl/default_batch_footer.php index 39a9cb428..b06eefed9 100644 --- a/admin/views/joomla_components/tmpl/default_batch_footer.php +++ b/admin/views/joomla_components/tmpl/default_batch_footer.php @@ -10,8 +10,8 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version @update number 338 of this MVC - @build 7th August, 2017 + @version @update number 355 of this MVC + @build 19th August, 2017 @created 6th May, 2015 @package Component Builder @subpackage default_batch_footer.php diff --git a/admin/views/joomla_components/tmpl/default_body.php b/admin/views/joomla_components/tmpl/default_body.php index 31af69033..22ff38a66 100644 --- a/admin/views/joomla_components/tmpl/default_body.php +++ b/admin/views/joomla_components/tmpl/default_body.php @@ -10,8 +10,8 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version @update number 338 of this MVC - @build 7th August, 2017 + @version @update number 355 of this MVC + @build 19th August, 2017 @created 6th May, 2015 @package Component Builder @subpackage default_body.php diff --git a/admin/views/joomla_components/tmpl/default_foot.php b/admin/views/joomla_components/tmpl/default_foot.php index b7ccb9e1b..e8394c2a4 100644 --- a/admin/views/joomla_components/tmpl/default_foot.php +++ b/admin/views/joomla_components/tmpl/default_foot.php @@ -10,8 +10,8 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version @update number 338 of this MVC - @build 7th August, 2017 + @version @update number 355 of this MVC + @build 19th August, 2017 @created 6th May, 2015 @package Component Builder @subpackage default_foot.php diff --git a/admin/views/joomla_components/tmpl/default_head.php b/admin/views/joomla_components/tmpl/default_head.php index 2908aeb34..40254f66d 100644 --- a/admin/views/joomla_components/tmpl/default_head.php +++ b/admin/views/joomla_components/tmpl/default_head.php @@ -10,8 +10,8 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version @update number 338 of this MVC - @build 7th August, 2017 + @version @update number 355 of this MVC + @build 19th August, 2017 @created 6th May, 2015 @package Component Builder @subpackage default_head.php diff --git a/admin/views/joomla_components/tmpl/default_toolbar.php b/admin/views/joomla_components/tmpl/default_toolbar.php index 2f1c8ffe6..374ea3eed 100644 --- a/admin/views/joomla_components/tmpl/default_toolbar.php +++ b/admin/views/joomla_components/tmpl/default_toolbar.php @@ -10,8 +10,8 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version @update number 338 of this MVC - @build 7th August, 2017 + @version @update number 355 of this MVC + @build 19th August, 2017 @created 6th May, 2015 @package Component Builder @subpackage default_toolbar.php diff --git a/admin/views/joomla_components/view.html.php b/admin/views/joomla_components/view.html.php index 762119d80..eac187937 100644 --- a/admin/views/joomla_components/view.html.php +++ b/admin/views/joomla_components/view.html.php @@ -10,8 +10,8 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version @update number 338 of this MVC - @build 7th August, 2017 + @version @update number 355 of this MVC + @build 19th August, 2017 @created 6th May, 2015 @package Component Builder @subpackage view.html.php @@ -144,6 +144,11 @@ class ComponentbuilderViewJoomla_components extends JViewLegacy { // add Import Components button. JToolBarHelper::custom('joomla_components.smartImport', 'upload', '', 'COM_COMPONENTBUILDER_IMPORT_COMPONENTS', false); + } + if ($this->user->authorise('joomla_component.backup')) + { + // add Backup button. + JToolBarHelper::custom('joomla_components.backup', 'archive', '', 'COM_COMPONENTBUILDER_BACKUP', false); } if ($this->state->get('filter.published') == -2 && ($this->canState && $this->canDelete)) diff --git a/componentbuilder.xml b/componentbuilder.xml index f6255908c..5b7a049e6 100644 --- a/componentbuilder.xml +++ b/componentbuilder.xml @@ -1,7 +1,7 @@ COM_COMPONENTBUILDER - 12th August, 2017 + 19th August, 2017 Llewellyn van der Merwe joomla@vdm.io http://vdm.bz/component-builder @@ -50,9 +50,23 @@ Whether you're a seasoned [Joomla](http://www.joomla.org/) developer, or have ju - + + controller.php + index.html + router.php + componentbuilder.php + assets + helpers + controllers + models + views + layouts + - + + language/en-GB/en-GB.com_componentbuilder.ini + language/en-GB/en-GB.com_componentbuilder.sys.ini + COM_COMPONENTBUILDER_MENU diff --git a/script.php b/script.php index b48586792..8398c30b4 100644 --- a/script.php +++ b/script.php @@ -11,7 +11,7 @@ /-------------------------------------------------------------------------------------------------------------------------------/ @version 2.4.10 - @build 12th August, 2017 + @build 19th August, 2017 @created 30th April, 2015 @package Component Builder @subpackage script.php @@ -1714,7 +1714,7 @@ class com_componentbuilderInstallerScript // Field to update. $fields = array( - $db->quoteName('params') . ' = ' . $db->quote('{"autorName":"Llewellyn van der Merwe","autorEmail":"joomla@vdm.io","minify":"0","percentagelanguageadd":"50","export_license":"GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html","export_copyright":"Copyright (C) 2015. All Rights Reserved","check_in":"-1 day","save_history":"1","history_limit":"10","uikit_load":"1","uikit_min":"","uikit_style":""}'), + $db->quoteName('params') . ' = ' . $db->quote('{"autorName":"Llewellyn van der Merwe","autorEmail":"joomla@vdm.io","minify":"0","percentagelanguageadd":"50","backup_package_name":"JCB_Backup_[YEAR]_[MONTH]_[DAY]","export_license":"GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html","export_copyright":"Copyright (C) 2015. All Rights Reserved","check_in":"-1 day","save_history":"1","history_limit":"10","uikit_load":"1","uikit_min":"","uikit_style":""}'), ); // Condition. @@ -1726,7 +1726,7 @@ class com_componentbuilderInstallerScript $db->setQuery($query); $allDone = $db->execute(); echo ' - + '; } // do any updates needed @@ -2202,7 +2202,7 @@ class com_componentbuilderInstallerScript echo ' - +

      Upgrade to Version 2.4.10 Was Successful! Let us know if anything is not working as expected.

      '; } diff --git a/site/assets/css/api.css b/site/assets/css/api.css new file mode 100644 index 000000000..dd4585a78 --- /dev/null +++ b/site/assets/css/api.css @@ -0,0 +1,27 @@ +/*--------------------------------------------------------------------------------------------------------| www.vdm.io |------/ + __ __ _ _____ _ _ __ __ _ _ _ + \ \ / / | | | __ \ | | | | | \/ | | | | | | | + \ \ / /_ _ ___| |_ | | | | _____ _____| | ___ _ __ _ __ ___ ___ _ __ | |_ | \ / | ___| |_| |__ ___ __| | + \ \/ / _` / __| __| | | | |/ _ \ \ / / _ \ |/ _ \| '_ \| '_ ` _ \ / _ \ '_ \| __| | |\/| |/ _ \ __| '_ \ / _ \ / _` | + \ / (_| \__ \ |_ | |__| | __/\ V / __/ | (_) | |_) | | | | | | __/ | | | |_ | | | | __/ |_| | | | (_) | (_| | + \/ \__,_|___/\__| |_____/ \___| \_/ \___|_|\___/| .__/|_| |_| |_|\___|_| |_|\__| |_| |_|\___|\__|_| |_|\___/ \__,_| + | | + |_| +/-------------------------------------------------------------------------------------------------------------------------------/ + + @version @update number 7 of this MVC + @build 19th August, 2017 + @created 19th August, 2017 + @package Component Builder + @subpackage api.css + @author Llewellyn van der Merwe + @copyright Copyright (C) 2015. All Rights Reserved + @license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html + + Builds Complex Joomla Components + +/-----------------------------------------------------------------------------------------------------------------------------*/ + +/* CSS Document */ + + diff --git a/site/assets/css/index.html b/site/assets/css/index.html new file mode 100644 index 000000000..fa6d84e80 --- /dev/null +++ b/site/assets/css/index.html @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/site/assets/css/site.css b/site/assets/css/site.css new file mode 100644 index 000000000..30d35ecf7 --- /dev/null +++ b/site/assets/css/site.css @@ -0,0 +1,31 @@ +/*--------------------------------------------------------------------------------------------------------| www.vdm.io |------/ + __ __ _ _____ _ _ __ __ _ _ _ + \ \ / / | | | __ \ | | | | | \/ | | | | | | | + \ \ / /_ _ ___| |_ | | | | _____ _____| | ___ _ __ _ __ ___ ___ _ __ | |_ | \ / | ___| |_| |__ ___ __| | + \ \/ / _` / __| __| | | | |/ _ \ \ / / _ \ |/ _ \| '_ \| '_ ` _ \ / _ \ '_ \| __| | |\/| |/ _ \ __| '_ \ / _ \ / _` | + \ / (_| \__ \ |_ | |__| | __/\ V / __/ | (_) | |_) | | | | | | __/ | | | |_ | | | | __/ |_| | | | (_) | (_| | + \/ \__,_|___/\__| |_____/ \___| \_/ \___|_|\___/| .__/|_| |_| |_|\___|_| |_|\__| |_| |_|\___|\__|_| |_|\___/ \__,_| + | | + |_| +/-------------------------------------------------------------------------------------------------------------------------------/ + + @version 2.4.10 + @build 19th August, 2017 + @created 30th April, 2015 + @package Component Builder + @subpackage site.css + @author Llewellyn van der Merwe + @copyright Copyright (C) 2015. All Rights Reserved + @license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html + + Builds Complex Joomla Components + +/-----------------------------------------------------------------------------------------------------------------------------*/ + +/* CSS Document */ +.no-click { + pointer-events: none; +} +.fieldMedium { width: 130px; } +.fieldSmall { width: 60px; } +code { display: inline-block; margin: 3px;} diff --git a/site/assets/images/index.html b/site/assets/images/index.html new file mode 100644 index 000000000..fa6d84e80 --- /dev/null +++ b/site/assets/images/index.html @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/site/assets/index.html b/site/assets/index.html new file mode 100644 index 000000000..fa6d84e80 --- /dev/null +++ b/site/assets/index.html @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/site/assets/js/index.html b/site/assets/js/index.html new file mode 100644 index 000000000..fa6d84e80 --- /dev/null +++ b/site/assets/js/index.html @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/site/assets/js/site.js b/site/assets/js/site.js new file mode 100644 index 000000000..e69de29bb diff --git a/site/componentbuilder.php b/site/componentbuilder.php new file mode 100644 index 000000000..6c11ea9fc --- /dev/null +++ b/site/componentbuilder.php @@ -0,0 +1,50 @@ + + @copyright Copyright (C) 2015. All Rights Reserved + @license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html + + Builds Complex Joomla Components + +/-----------------------------------------------------------------------------------------------------------------------------*/ + +// No direct access to this file +defined('_JEXEC') or die('Restricted access'); + +// Set the component css/js +$document = JFactory::getDocument(); +$document->addStyleSheet('components/com_componentbuilder/assets/css/site.css'); +$document->addScript('components/com_componentbuilder/assets/js/site.js'); + +// Require helper files +JLoader::register('ComponentbuilderHelper', dirname(__FILE__) . '/helpers/componentbuilder.php'); +JLoader::register('ComponentbuilderEmail', JPATH_COMPONENT_ADMINISTRATOR . '/helpers/componentbuilderemail.php'); +JLoader::register('ComponentbuilderHelperRoute', dirname(__FILE__) . '/helpers/route.php'); + +// import joomla controller library +jimport('joomla.application.component.controller'); + +// Get an instance of the controller prefixed by Componentbuilder +$controller = JControllerLegacy::getInstance('Componentbuilder'); + +// Perform the request task +$jinput = JFactory::getApplication()->input; +$controller->execute($jinput->get('task', null, 'CMD')); + +// Redirect if set by the controller +$controller->redirect(); diff --git a/site/controller.php b/site/controller.php new file mode 100644 index 000000000..e53672f8e --- /dev/null +++ b/site/controller.php @@ -0,0 +1,101 @@ + + @copyright Copyright (C) 2015. All Rights Reserved + @license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html + + Builds Complex Joomla Components + +/-----------------------------------------------------------------------------------------------------------------------------*/ + +// No direct access to this file +defined('_JEXEC') or die('Restricted access'); + +// import Joomla controller library +jimport('joomla.application.component.controller'); + +/** + * Componentbuilder Component Controller + */ +class ComponentbuilderController extends JControllerLegacy +{ + /** + * display task + * + * @return void + */ + function display($cachable = false, $urlparams = false) + { + // set default view if not set + $view = $this->input->getCmd('view', ''); + $isEdit = $this->checkEditView($view); + $layout = $this->input->get('layout', null, 'WORD'); + $id = $this->input->getInt('id'); + $cachable = true; + + // Check for edit form. + if($isEdit) + { + if ($layout == 'edit' && !$this->checkEditId('com_componentbuilder.edit.'.$view, $id)) + { + // Somehow the person just went to the form - we don't allow that. + $this->setError(JText::sprintf('JLIB_APPLICATION_ERROR_UNHELD_ID', $id)); + $this->setMessage($this->getError(), 'error'); + // check if item was opend from other then its own list view + $ref = $this->input->getCmd('ref', 0); + $refid = $this->input->getInt('refid', 0); + // set redirect + if ($refid > 0 && ComponentbuilderHelper::checkString($ref)) + { + // redirect to item of ref + $this->setRedirect(JRoute::_('index.php?option=com_componentbuilder&view='.(string)$ref.'&layout=edit&id='.(int)$refid, false)); + } + elseif (ComponentbuilderHelper::checkString($ref)) + { + + // redirect to ref + $this->setRedirect(JRoute::_('index.php?option=com_componentbuilder&view='.(string)$ref, false)); + } + else + { + // normal redirect back to the list default site view + $this->setRedirect(JRoute::_('index.php?option=com_componentbuilder&view=', false)); + } + return false; + } + } + + return parent::display($cachable, $urlparams); + } + + protected function checkEditView($view) + { + if (ComponentbuilderHelper::checkString($view)) + { + $views = array( + + ); + // check if this is a edit view + if (in_array($view,$views)) + { + return true; + } + } + return false; + } +} diff --git a/site/controllers/api.php b/site/controllers/api.php new file mode 100644 index 000000000..d60acc312 --- /dev/null +++ b/site/controllers/api.php @@ -0,0 +1,268 @@ + + @copyright Copyright (C) 2015. All Rights Reserved + @license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html + + Builds Complex Joomla Components + +/-----------------------------------------------------------------------------------------------------------------------------*/ + +// No direct access to this file +defined('_JEXEC') or die('Restricted access'); + +// import Joomla controllerform library +jimport('joomla.application.component.controller'); + +/** + * Componentbuilder Api Controller + */ +class ComponentbuilderControllerApi extends JControllerForm +{ + /** + * Current or most recently performed task. + * + * @var string + * @since 12.2 + * @note Replaces _task. + */ + protected $task; + + public function __construct($config = array()) + { + $this->view_list = ''; // safeguard for setting the return view listing to the default site view. + parent::__construct($config); + } + + + public function backup() + { + // get params + if (!isset($this->params) || !ComponentbuilderHelper::checkObject($this->params)) + { + $this->params = JComponentHelper::getParams('com_componentbuilder'); + } + // get all component IDs to backup + $pks = componentbuilderHelper::getComponentIDs(); + // Get the model + $model = componentbuilderHelper::getModel('joomla_components', JPATH_ADMINISTRATOR . '/components/com_componentbuilder'); + // set user + $model->user = $this->getApiUser(); + // make sure to set active type to backup + $model->activeType = 'backup'; + // set auto loader + ComponentbuilderHelper::autoLoader('smart'); + // manual backup message + $backupNotice = array(); + // get the data to export + if (ComponentbuilderHelper::checkArray($pks) && $model->getSmartExport($pks)) + { + $backupNotice[] = JText::_('COM_COMPONENTBUILDER_BACKUP_WAS_DONE_SUCCESSFULLY'); + $backupNoticeStatus = 'Success'; + // set the key string + if (componentbuilderHelper::checkString($model->key) && strlen($model->key) == 32) + { + $textNotice = array(); + $keyNotice = '

      ' . JText::sprintf('COM_COMPONENTBUILDER_THE_PACKAGE_KEY_IS_CODESCODE', $model->key) . '

      '; + $textNotice[] = JText::sprintf('COM_COMPONENTBUILDER_THE_PACKAGE_KEY_IS_S', $model->key); + $keyNotice .= JText::_('COM_COMPONENTBUILDER_YOUR_DATA_IS_ENCRYPTED_WITH_A_AES_ONE_HUNDRED_AND_TWENTY_EIGHT_BIT_ENCRYPTION_USING_THE_ABOVE_THIRTY_TWO_CHARACTER_KEY_WITHOUT_THIS_KEY_IT_WILL_TAKE_THE_CURRENT_TECHNOLOGY_WITH_A_BRUTE_FORCE_ATTACK_METHOD_MORE_THEN_A_HREFHTTPRANDOMIZECOMHOWLONGTOHACKPASS_TARGET_BLANK_TITLEHOW_LONG_TO_HACK_PASSSEVEN_HUNDRED_ZERO_ZERO_ZERO_ZERO_ZERO_ZERO_ZERO_ZERO_ZERO_ZEROA_YEARS_TO_CRACK_THEORETICALLY_UNLESS_THEY_HAVE_THIS_KEY_ABOVE_SO_DO_KEEP_IT_SAFE') . '
      '; + // set the package owner info + if ((isset($model->info['getKeyFrom']['company']) && componentbuilderHelper::checkString($model->info['getKeyFrom']['company'])) || (isset($model->info['getKeyFrom']['owner']) && componentbuilderHelper::checkString($model->info['getKeyFrom']['owner']))) + { + $ownerDetails = '

      ' . JText::_('COM_COMPONENTBUILDER_PACKAGE_OWNER_DETAILS') . '

      '; + $textNotice[] = '# ' . JText::_('COM_COMPONENTBUILDER_PACKAGE_OWNER_DETAILS'); + $ownerDetails .= '
        '; + if (isset($model->info['getKeyFrom']['company']) && componentbuilderHelper::checkString($model->info['getKeyFrom']['company'])) + { + $ownerDetails .= '
      • ' . JText::sprintf('COM_COMPONENTBUILDER_EMCOMPANYEM_BSB', $model->info['getKeyFrom']['company']) . '
      • '; + $textNotice[] = '- ' . JText::sprintf('COM_COMPONENTBUILDER_COMPANY_S', $model->info['getKeyFrom']['company']); + } + // add value only if set + if (isset($model->info['getKeyFrom']['owner']) && componentbuilderHelper::checkString($model->info['getKeyFrom']['owner'])) + { + $ownerDetails .= '
      • ' . JText::sprintf('COM_COMPONENTBUILDER_EMOWNEREM_BSB', $model->info['getKeyFrom']['owner']) . '
      • '; + $textNotice[] = '- ' . JText::sprintf('COM_COMPONENTBUILDER_OWNER_S', $model->info['getKeyFrom']['owner']); + } + // add value only if set + if (isset($model->info['getKeyFrom']['website']) && componentbuilderHelper::checkString($model->info['getKeyFrom']['website'])) + { + $ownerDetails .= '
      • ' . JText::sprintf('COM_COMPONENTBUILDER_EMWEBSITEEM_BSB', $model->info['getKeyFrom']['website']) . '
      • '; + $textNotice[] = '- ' . JText::sprintf('COM_COMPONENTBUILDER_WEBSITE_S', $model->info['getKeyFrom']['website']); + } + // add value only if set + if (isset($model->info['getKeyFrom']['email']) && componentbuilderHelper::checkString($model->info['getKeyFrom']['email'])) + { + $ownerDetails .= '
      • ' . JText::sprintf('COM_COMPONENTBUILDER_EMEMAILEM_BSB', $model->info['getKeyFrom']['email']) . '
      • '; + $textNotice[] = '- ' . JText::sprintf('COM_COMPONENTBUILDER_EMAIL_S', $model->info['getKeyFrom']['email']); + } + // add value only if set + if (isset($model->info['getKeyFrom']['license']) && componentbuilderHelper::checkString($model->info['getKeyFrom']['license'])) + { + $ownerDetails .= '
      • ' . JText::sprintf('COM_COMPONENTBUILDER_EMLICENSEEM_BSB', $model->info['getKeyFrom']['license']) . '
      • '; + $textNotice[] = '- ' . JText::sprintf('COM_COMPONENTBUILDER_LICENSE_S', $model->info['getKeyFrom']['license']); + } + // add value only if set + if (isset($model->info['getKeyFrom']['copyright']) && componentbuilderHelper::checkString($model->info['getKeyFrom']['copyright'])) + { + $ownerDetails .= '
      • ' . JText::sprintf('COM_COMPONENTBUILDER_EMCOPYRIGHTEM_BSB', $model->info['getKeyFrom']['copyright']) . '
      • '; + $textNotice[] = '- ' . JText::sprintf('COM_COMPONENTBUILDER_COPYRIGHT_S', $model->info['getKeyFrom']['copyright']); + } + $ownerDetails .= '
      '; + $backupNotice[] = JText::_('COM_COMPONENTBUILDER_OWNER_DETAILS_WAS_SET'); + } + else + { + $ownerDetails = '

      ' . JText::_('COM_COMPONENTBUILDER_PACKAGE_OWNER_NOT_SET') . '

      '; + $textNotice[] = '# ' . JText::_('COM_COMPONENTBUILDER_PACKAGE_OWNER_DETAILS'); + $ownerDetails .= JText::_('COM_COMPONENTBUILDER_TO_CHANGE_THE_PACKAGE_OWNER_DEFAULTS_OPEN_THE_BJCB_GLOBAL_OPTIONSB_GO_TO_THE_BCOMPANYB_TAB_AND_ADD_THE_CORRECT_COMPANY_DETAILS_THERE') . '
      '; + $textNotice[] = JText::_('COM_COMPONENTBUILDER_TO_CHANGE_THE_PACKAGE_OWNER_DEFAULTS_OPEN_THE_JCB_GLOBAL_OPTIONS_GO_TO_THE_COMPANY_TAB_AND_ADD_THE_CORRECT_COMPANY_DETAILS_THERE'); + $ownerDetails .= '

      ' . JText::_('COM_COMPONENTBUILDER_YOU_SHOULD_ADD_THE_CORRECT_OWNER_DETAILS') . '

      '; + $textNotice[] = '## ' . JText::_('COM_COMPONENTBUILDER_YOU_SHOULD_ADD_THE_CORRECT_OWNER_DETAILS'); + $ownerDetails .= JText::_('COM_COMPONENTBUILDER_SINCE_THE_OWNER_DETAILS_ARE_DISPLAYED_DURING_BIMPORT_PROCESSB_BEFORE_ADDING_THE_KEY_THIS_WAY_IF_THE_USERDEV_BDOES_NOTB_HAVE_THE_KEY_THEY_CAN_SEE_BWHERE_TO_GET_ITB') . '
      '; + $textNotice[] = JText::_('COM_COMPONENTBUILDER_SINCE_THE_OWNER_DETAILS_ARE_DISPLAYED_DURING_IMPORT_PROCESS_BEFORE_ADDING_THE_KEY_THIS_WAY_IF_THE_USERDEV_DOES_NOT_HAVE_THE_KEY_THEY_CAN_SEE_WHERE_TO_GET_IT'); + $backupNotice[] = JText::_('COM_COMPONENTBUILDER_CHECK_YOUR_OWNER_DETAILS_IT_HAS_NOT_BEEN_SET_OPEN_THE_JCB_GLOBAL_OPTIONS_GO_TO_THE_COMPANY_TAB_AND_ADD_THE_CORRECT_COMPANY_DETAILS_THERE'); + } + } + else + { + $keyNotice = '

      ' . JText::_('COM_COMPONENTBUILDER_THIS_PACKAGE_HAS_NO_KEY') . '

      '; + $textNotice[] = '# ' . JText::_('COM_COMPONENTBUILDER_THIS_PACKAGE_HAS_NO_KEY'); + $ownerDetails = JText::_('COM_COMPONENTBUILDER_THAT_MEANS_ANYONE_WHO_HAS_THIS_PACKAGE_CAN_INSTALL_IT_INTO_JCB_TO_ADD_AN_EXPORT_KEY_SIMPLY_OPEN_THE_COMPONENT_GO_TO_THE_TAB_CALLED_BSETTINGSB_BOTTOM_RIGHT_THERE_IS_A_FIELD_CALLED_BEXPORT_KEYB') . '
      '; + $textNotice[] = JText::_('COM_COMPONENTBUILDER_THAT_MEANS_ANYONE_WHO_HAS_THIS_PACKAGE_CAN_INSTALL_IT_INTO_JCB_TO_ADD_AN_EXPORT_KEY_SIMPLY_OPEN_THE_COMPONENT_GO_TO_THE_TAB_CALLED_SETTINGS_BOTTOM_RIGHT_THERE_IS_A_FIELD_CALLED_EXPORT_KEY'); + $backupNotice[] = JText::_('COM_COMPONENTBUILDER_NO_KEYS_WERE_FOUND_TO_ADD_AN_EXPORT_KEY_SIMPLY_OPEN_THE_COMPONENT_GO_TO_THE_TAB_CALLED_SETTINGS_BOTTOM_RIGHT_THERE_IS_A_FIELD_CALLED_EXPORT_KEY'); + } + // get email + if ($email = $this->params->get('backup_email', null)) + { + // plain text + $plainText = implode("\n", $textNotice); + // set hash to track changes + $hashTracker = md5($plainText); + if (ComponentbuilderHelper::newHash($hashTracker)) + { + // Build final massage. + $message = $keyNotice . $ownerDetails . '
      HASH: ' . $hashTracker . ''; + // set the subject + $subject = JText::_('COM_COMPONENTBUILDER_JOOMLA_COMPONENT_BUILDER_BACKUP_KEY'); + // email the message + componentbuilderEmail::send($email, $subject, componentbuilderEmail::setHtmlEmailBody($message, $subject), $plainText, 1); + $backupNotice[] = JText::_('COM_COMPONENTBUILDER_EMAIL_WITH_THE_NEW_KEY_WAS_SEND'); + } + else + { + $backupNotice[] = JText::_('COM_COMPONENTBUILDER_KEY_HAS_NOT_CHANGED'); + } + } + } + else + { + $backupNotice[] = JText::_('COM_COMPONENTBUILDER_BACKUP_FAILED_PLEASE_TRY_AGAIN_IF_THE_ERROR_CONTINUE_PLEASE_CONTACT_YOUR_SYSTEM_ADMINISTRATOR'); + $backupNoticeStatus = 'Error'; + if (componentbuilderHelper::checkString($model->packagePath)) + { + // clear all if not successful + ComponentbuilderHelper::removeFolder($model->packagePath); + } + if (componentbuilderHelper::checkString($model->zipPath)) + { + // clear all if not successful + JFile::delete($model->zipPath); + } + } + // quite only if auto backup (adding this script from custom code :) + if ('backup' === 'backup') + { + echo "# " . $backupNoticeStatus . "\n" .implode("\n", $backupNotice); + jexit(); + } + $this->setRedirect(JRoute::_('index.php?option=com_componentbuilder&view=joomla_components', false), implode("
      ", $backupNotice), $backupNoticeStatus); + return; + } + + protected function getApiUser() + { + // return user object + return JFactory::getUser($this->params->get('api', 0, 'INT')); + } + + /** + * Method to check if you can edit an existing record. + * + * Extended classes can override this if necessary. + * + * @param array $data An array of input data. + * @param string $key The name of the key for the primary key; default is id. + * + * @return boolean + * + * @since 12.2 + */ + protected function allowEdit($data = array(), $key = 'id') + { + // to insure no other tampering + return false; + } + + /** + * Method override to check if you can add a new record. + * + * @param array $data An array of input data. + * + * @return boolean + * + * @since 1.6 + */ + protected function allowAdd($data = array()) + { + // to insure no other tampering + return false; + } + + /** + * Method to check if you can save a new or existing record. + * + * Extended classes can override this if necessary. + * + * @param array $data An array of input data. + * @param string $key The name of the key for the primary key. + * + * @return boolean + * + * @since 12.2 + */ + protected function allowSave($data, $key = 'id') + { + // to insure no other tampering + return false; + } + + /** + * Function that allows child controller access to model data + * after the data has been saved. + * + * @param JModelLegacy $model The data model object. + * @param array $validData The validated data. + * + * @return void + * + * @since 12.2 + */ + protected function postSaveHook(JModelLegacy $model, $validData = array()) + { + } +} diff --git a/site/controllers/help.php b/site/controllers/help.php new file mode 100644 index 000000000..846431e53 --- /dev/null +++ b/site/controllers/help.php @@ -0,0 +1,130 @@ + + @copyright Copyright (C) 2015. All Rights Reserved + @license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html + + Builds Complex Joomla Components + +/-----------------------------------------------------------------------------------------------------------------------------*/ + +// No direct access to this file +defined('_JEXEC') or die('Restricted access'); + +// import Joomla controllerform library +jimport('joomla.application.component.controller'); + +/** + * Componentbuilder Help Controller + */ +class ComponentbuilderControllerHelp extends JControllerLegacy +{ + public function __construct($config) + { + parent::__construct($config); + // load the tasks + $this->registerTask('getText', 'help'); + } + + public function help() + { + $user = JFactory::getUser(); + $jinput = JFactory::getApplication()->input; + // Check Token! + $token = JSession::getFormToken(); + $call_token = $jinput->get('token', 0, 'ALNUM'); + if($token == $call_token){ + $task = $this->getTask(); + switch($task){ + case 'getText': + try + { + $idValue = $jinput->get('id', 0, 'INT'); + if($idValue) + { + $result = $this->getHelpDocumentText($idValue); + } + else + { + $result = ''; + } + echo $result; + // stop execution gracefully + jexit(); + } + catch(Exception $e) + { + // stop execution gracefully + jexit(); + } + break; + } + } + else + { + // stop execution gracefully + jexit(); + } + } + + protected function getHelpDocumentText($id) + { + $db = JFactory::getDbo(); + $query = $db->getQuery(true); + $query->select(array('a.title','a.content')); + $query->from('#__componentbuilder_help_document AS a'); + $query->where('a.id = '.(int) $id); + $query->where('a.published = 1'); + $query->where('a.location = 2'); + $db->setQuery($query); + $db->execute(); + if($db->getNumRows()) + { + $text = array(); + $document = $db->loadObject(); + // fix image issue + $images['src="images'] = 'src="'.JURI::root().'images'; + $images["src='images"] = "src='".JURI::root()."images"; + $images['src="/images'] = 'src="'.JURI::root().'images'; + $images["src='/images"] = "src='".JURI::root()."images"; + // set document template + $text[] = ""; + $text[] = ''; + $text[] = ""; + $text[] = ''; + $text[] = "".$document->title.""; + $text[] = ''; + $text[] = ''; + $text[] = ""; + $text[] = '
      '; + $text[] = '
      '; + $text[] = '
      '; + // build the help text + $text[] = '

      '.$document->title."

      "; + $text[] = str_replace(array_keys($images),array_values($images),$document->content); + // end template + $text[] = '


      '; + $text[] = '
      '; + $text[] = ""; + $text[] = ""; + + return implode("\n",$text); + } + return false; + } +} diff --git a/site/controllers/index.html b/site/controllers/index.html new file mode 100644 index 000000000..fa6d84e80 --- /dev/null +++ b/site/controllers/index.html @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/site/helpers/category.php b/site/helpers/category.php new file mode 100644 index 000000000..5f511425d --- /dev/null +++ b/site/helpers/category.php @@ -0,0 +1,52 @@ + + @copyright Copyright (C) 2015. All Rights Reserved + @license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html + + Builds Complex Joomla Components + +/-----------------------------------------------------------------------------------------------------------------------------*/ + +// No direct access to this file +defined('_JEXEC') or die('Restricted access'); + +/** + * Componentbuilder Component Category Tree + */ + +//Insure this view category file is loaded. +$classname = 'componentbuilderFieldsCategories'; +if (!class_exists($classname)) +{ + $path = JPATH_SITE . '/components/com_componentbuilder/helpers/categoryfields.php'; + if (is_file($path)) + { + include_once $path; + } +} +//Insure this view category file is loaded. +$classname = 'componentbuilderFieldtypesCategories'; +if (!class_exists($classname)) +{ + $path = JPATH_SITE . '/components/com_componentbuilder/helpers/categoryfieldtypes.php'; + if (is_file($path)) + { + include_once $path; + } +} diff --git a/site/helpers/categoryfields.php b/site/helpers/categoryfields.php new file mode 100644 index 000000000..292286d60 --- /dev/null +++ b/site/helpers/categoryfields.php @@ -0,0 +1,47 @@ + + @copyright Copyright (C) 2015. All Rights Reserved + @license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html + + Builds Complex Joomla Components + +/-----------------------------------------------------------------------------------------------------------------------------*/ + +// No direct access to this file +defined('_JEXEC') or die('Restricted access'); + +/** + * Componentbuilder Field Component Category Tree + */ +class ComponentbuilderFieldsCategories extends JCategories +{ + /** + * Class constructor + * + * @param array $options Array of options + * + */ + public function __construct($options = array()) + { + $options['table'] = '#__componentbuilder_field'; + $options['extension'] = 'com_componentbuilder.fields'; + + parent::__construct($options); + } +} diff --git a/site/helpers/categoryfieldtypes.php b/site/helpers/categoryfieldtypes.php new file mode 100644 index 000000000..c54446c50 --- /dev/null +++ b/site/helpers/categoryfieldtypes.php @@ -0,0 +1,47 @@ + + @copyright Copyright (C) 2015. All Rights Reserved + @license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html + + Builds Complex Joomla Components + +/-----------------------------------------------------------------------------------------------------------------------------*/ + +// No direct access to this file +defined('_JEXEC') or die('Restricted access'); + +/** + * Componentbuilder Fieldtype Component Category Tree + */ +class ComponentbuilderFieldtypesCategories extends JCategories +{ + /** + * Class constructor + * + * @param array $options Array of options + * + */ + public function __construct($options = array()) + { + $options['table'] = '#__componentbuilder_fieldtype'; + $options['extension'] = 'com_componentbuilder.fieldtypes'; + + parent::__construct($options); + } +} diff --git a/site/helpers/componentbuilder.php b/site/helpers/componentbuilder.php new file mode 100644 index 000000000..bb767ea5b --- /dev/null +++ b/site/helpers/componentbuilder.php @@ -0,0 +1,2269 @@ + + @copyright Copyright (C) 2015. All Rights Reserved + @license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html + + Builds Complex Joomla Components + +/-----------------------------------------------------------------------------------------------------------------------------*/ + +// No direct access to this file +defined('_JEXEC') or die('Restricted access'); + +/** + * Componentbuilder component helper + */ +abstract class ComponentbuilderHelper +{ + + /* + * get all component IDs + */ + public static function getComponentIDs() + { + // Get a db connection. + $db = JFactory::getDbo(); + // Create a new query object. + $query = $db->getQuery(true); + $query->select($db->quoteName(array('id'))); + $query->from($db->quoteName('#__componentbuilder_joomla_component')); + $query->where($db->quoteName('published') . ' >= 1'); // do not backup trash + $db->setQuery($query); + $db->execute(); + if ($db->getNumRows()) + { + return $db->loadColumn(); + } + return false; + } + + /* + * Autoloader + */ + public static function autoLoader($type = 'compiler') + { + // load the type classes + if ('smart' !== $type) + { + foreach (glob(JPATH_ADMINISTRATOR."/components/com_componentbuilder/helpers/".$type."/*.php") as $autoFile) + { + require_once $autoFile; + } + } + // load only if compiler + if ('compiler' === $type) + { + // import the Joomla librarys + jimport('joomla.filesystem.file'); + jimport('joomla.filesystem.folder'); + jimport('joomla.filesystem.archive'); + jimport('joomla.application.component.modellist'); + // include class to minify js + require_once JPATH_ADMINISTRATOR.'/components/com_componentbuilder/helpers/js.php'; + } + // load only if smart + if ('smart' === $type) + { + // import the Joomla libraries + jimport('joomla.filesystem.file'); + jimport('joomla.filesystem.folder'); + jimport('joomla.filesystem.archive'); + jimport('joomla.application.component.modellist'); + } + // load this for all + jimport('joomla.application'); + } + + /** + * Remove folders with files + * + * @param string $dir The path to folder to remove + * @param boolean $git if there is a git folder in that must not be removed + * + * @return boolean True in all is removed + * + */ + public static function removeFolder($dir, $git = false) + { + if (JFolder::exists($dir)) + { + $it = new RecursiveDirectoryIterator($dir); + $it = new RecursiveIteratorIterator($it, RecursiveIteratorIterator::CHILD_FIRST); + foreach ($it as $file) + { + if ('.' === $file->getBasename() || '..' === $file->getBasename()) continue; + if ($file->isDir()) + { + if ($git && strpos($file->getPathname(), $dir.'/.git') !== false) continue; + JFolder::delete($file->getPathname()); + } + else + { + if ($git && strpos($file->getPathname(), $dir.'/.git') !== false) continue; + JFile::delete($file->getPathname()); + } + } + if (!$git && JFolder::delete($dir)) + { + return true; + } + } + return false; + } /** + * The dynamic builder of views, tables and fields + **/ + public static function dynamicBuilder(&$data, $type) + { + self::autoLoader('extrusion'); + $extruder = new Extrusion($data); + } + + /** + * The zipper method + **/ + public static function zip($workingDIR, &$filepath) + { + // store the current joomla working directory + $joomla = getcwd(); + + // we are changing the working directory to the component temp folder + chdir($workingDIR); + + // the full file path of the zip file + $filepath = JPath::clean($filepath); + + // delete an existing zip file (or use an exclusion parameter in JFolder::files() + JFile::delete($filepath); + + // get a list of files in the current directory tree + $files = JFolder::files('.', '', true, true); + $zipArray = array(); + // setup the zip array + foreach ($files as $file) + { + $tmp = array(); + $tmp['name'] = str_replace('./', '', $file); + $tmp['data'] = JFile::read($file); + $tmp['time'] = filemtime($file); + $zipArray[] = $tmp; + } + + // change back to joomla working directory + chdir($joomla); + + // get the zip adapter + $zip = JArchive::getAdapter('zip'); + + //create the zip file + if ($zip->create($filepath, $zipArray)) + { + return true; + } + return false; + } + + /** + * Create file and write data to the file + **/ + public static function writeFile($path, $data) + { + $klaar = false; + // open the file + $fh = fopen($path, "w"); + if (!is_resource($fh)) + { + return $klaar; + } + // write to the file + if (fwrite($fh, $data)) + { + // has been done + $klaar = true; + } + // close file. + fclose($fh); + return $klaar; + } + + /** + * The user notice info File Name + **/ + protected static $usernotice = false; + + /** + * The backup hash file name + **/ + protected static $backuphash = false; + + public static function getFilePath($type, $name = 'listing', $key = '', $fileType = '.json', $PATH = JPATH_COMPONENT_SITE) + { + if (!self::checkString(self::${$type.$name})) + { + // Get local key + $localkey = self::getLocalKey(); + // set the name + $fileName = md5($type.$name.$localkey.$key); + // set file path + self::${$type.$name} = $PATH.'/helpers/'.$fileName.$fileType; + } + // return the path + return self::${$type.$name}; + } + + public static function getFieldOptions($value, $type, $settings = array()) + { + // Get a db connection. + $db = JFactory::getDbo(); + + // Create a new query object. + $query = $db->getQuery(true); + $query->select($db->quoteName(array('properties', 'short_description', 'description'))); + $query->from($db->quoteName('#__componentbuilder_fieldtype')); + $query->where($db->quoteName('published') . ' = 1'); + $query->where($db->quoteName($type) . ' = '. $value); + + // Reset the query using our newly populated query object. + $db->setQuery($query); + $db->execute(); + if ($db->getNumRows()) + { + $result = $db->loadObject(); + $properties = json_decode($result->properties,true); + $pointer = 0; + $field = array('values' => " '
        ', 'short_description' => $result->short_description, 'description' => $result->description); + foreach ($properties['name'] as $line) + { + $field['values_description'] .= '
      • '.$properties['name'][$pointer].' '.$properties['description'][$pointer].'
      • '; + if(isset($settings[$properties['name'][$pointer]])) + { + $field['values'] .= "\n\t".$properties['name'][$pointer].'="'.$settings[$properties['name'][$pointer]].'" '; + } + else + { + $field['values'] .= "\n\t".$properties['name'][$pointer].'="'.$properties['example'][$pointer].'" '; + } + $pointer++; + } + $field['values'] .= "\n/>"; + $field['values_description'] .= '
      '; + // return found field options + return $field; + } + return false; + } + + /** + * get the localkey + **/ + protected static $localkey = false; + + public static function getLocalKey() + { + if (!self::$localkey) + { + // get the main key + self::$localkey = md5(JComponentHelper::getParams('com_componentbuilder')->get('basic_key', 'localKey34fdWEkl')); + } + return self::$localkey; + } + + /** + * indent HTML + */ + public static function indent($html) + { + // load the class + require_once JPATH_ADMINISTRATOR.'/components/com_componentbuilder/helpers/indenter.php'; + // set new indenter + $indenter = new Indenter(); + // return indented html + return $indenter->indent($html); + } + + public static function checkFileType($file, $sufix) { + // now check if the file ends with the sufix + return $sufix === "" || ($sufix == substr(strrchr($file, "."), -strlen($sufix))); + } + + public static function imageInfo($path,$request = 'type') + { + // set image + $image = JPATH_SITE.'/'.$path; + // check if exists + if (file_exists($image) && $result = @getimagesize($image)) + { + // return type request + switch ($request) + { + case 'width': + return $result[0]; + break; + case 'height': + return $result[1]; + break; + case 'type': + $extensions = array( + IMAGETYPE_GIF => "gif", + IMAGETYPE_JPEG => "jpg", + IMAGETYPE_PNG => "png", + IMAGETYPE_SWF => "swf", + IMAGETYPE_PSD => "psd", + IMAGETYPE_BMP => "bmp", + IMAGETYPE_TIFF_II => "tiff", + IMAGETYPE_TIFF_MM => "tiff", + IMAGETYPE_JPC => "jpc", + IMAGETYPE_JP2 => "jp2", + IMAGETYPE_JPX => "jpx", + IMAGETYPE_JB2 => "jb2", + IMAGETYPE_SWC => "swc", + IMAGETYPE_IFF => "iff", + IMAGETYPE_WBMP => "wbmp", + IMAGETYPE_XBM => "xbm", + IMAGETYPE_ICO => "ico" + ); + return $extensions[$result[2]]; + break; + case 'attr': + return $result[3]; + break; + case 'all': + default: + return $result; + break; + } + } + return false; + } + + public static function getBetween($content,$start,$end) + { + $r = explode($start, $content); + if (isset($r[1])) + { + $r = explode($end, $r[1]); + return $r[0]; + } + return ''; + } + + public static function getAllBetween($content,$start,$end) + { + $buket = array(); + for ($i = 0; ; $i++) + { + $found = self::getBetween($content,$start,$end); + if (self::checkString($found)) + { + $buket[] = $found; + $remove = $start.$found.$end; + $content = str_replace($remove,'',$content); + } + else + { + break; + } + // safety catch + if ($i == 500) + { + break; + } + } + return array_unique($buket); + } + + public static function typeField($type,$option = 'default') + { + // list of default fields + // https://docs.joomla.org/Form_field + $fields = array( + 'default' => array( + 'accesslevel','cachehandler','calendar','captcha','category','checkbox', + 'checkboxes','color','combo','componentlayout','contentlanguage','editor', + 'chromestyle','contenttype','databaseconnection','editors','email','file', + 'filelist','folderlist','groupedlist','hidden','file','headertag','helpsite', + 'imagelist','integer','language','list','media','menu','note','password', + 'plugins','range','radio','repeatable','rules','sessionhandler','spacer','sql','tag', + 'tel','menuitem','modulelayout','meter','moduleorder','moduleposition','moduletag', + 'templatestyle','text','textarea','timezone','url','user','usergroup' + ), + 'text' => array( + 'calendar','color','editor','email','password','tel','text','textarea','url','number','range' + ), + 'list' => array( + 'checkboxes','checkbox','list','radio' + ), + 'dynamic' => array( + 'category','headertag','tag','rules','user','file','filelist','folderlist','imagelist','integer','timezone','media','meter' + ) + ); + + if (in_array($type,$fields[$option])) + { + return true; + } + return false; + } + + public static function getImportScripts($type, $fieldName = false) + { + // if field name is pased the convert to type + if ($fieldName) + { + $fieldNames = array( + 'php_import_display' => 'display', + 'php_import_setdata' => 'setdata', + 'php_import_save' => 'save', + 'html_import_view' => 'view', + 'php_import' => 'import', + 'php_import_ext' => 'ext' + ); + // first check if the field name is found + if (isset($fieldNames[$type])) + { + $type = $fieldNames[$type]; + } + else + { + return ''; + } + } + $script = array(); + if ('display' === $type) + { + // set the display script + $script['display'][] = "\tprotected \$headerList;"; + $script['display'][] = "\tprotected \$hasPackage = false;"; + $script['display'][] = "\tprotected \$headers;"; + $script['display'][] = "\tprotected \$hasHeader = 0;"; + $script['display'][] = "\tprotected \$dataType;"; + $script['display'][] = "\n\tpublic function display(\$tpl = null)"; + $script['display'][] = "\t{"; + $script['display'][] = "\t\tif (\$this->getLayout() !== 'modal')"; + $script['display'][] = "\t\t{"; + $script['display'][] = "\t\t\t// Include helper submenu"; + $script['display'][] = "\t\t\t###-#-#-Component###Helper::addSubmenu('import');"; + $script['display'][] = "\t\t}"; + $script['display'][] = "\n\t\t// Check for errors."; + $script['display'][] = "\t\tif (count(\$errors = \$this->get('Errors'))){"; + $script['display'][] = "\t\t\tJError::raiseError(500, implode('
      ', \$errors));"; + $script['display'][] = "\t\t\treturn false;"; + $script['display'][] = "\t\t}"; + $script['display'][] = "\n\t\t\$paths = new stdClass;"; + $script['display'][] = "\t\t\$paths->first = '';"; + $script['display'][] = "\t\t\$state = \$this->get('state');"; + $script['display'][] = "\n\t\t\$this->paths = &\$paths;"; + $script['display'][] = "\t\t\$this->state = &\$state;"; + $script['display'][] = "\t\t// get global action permissions"; + $script['display'][] = "\t\t\$this->canDo = ###-#-#-Component###Helper::getActions('import');"; + $script['display'][] = "\n\t\t// We don't need toolbar in the modal window."; + $script['display'][] = "\t\tif (\$this->getLayout() !== 'modal')"; + $script['display'][] = "\t\t{"; + $script['display'][] = "\t\t\t\$this->addToolbar();"; + $script['display'][] = "\t\t\t\$this->sidebar = JHtmlSidebar::render();"; + $script['display'][] = "\t\t}"; + $script['display'][] = "\n\t\t// get the session object"; + $script['display'][] = "\t\t\$session = JFactory::getSession();"; + $script['display'][] = "\t\t// check if it has package"; + $script['display'][] = "\t\t\$this->hasPackage \t= \$session->get('hasPackage', false);"; + $script['display'][] = "\t\t\$this->dataType \t= \$session->get('dataType', false);"; + $script['display'][] = "\t\tif(\$this->hasPackage && \$this->dataType)"; + $script['display'][] = "\t\t{"; + $script['display'][] = "\t\t\t\$this->headerList \t= json_decode(\$session->get(\$this->dataType.'_VDM_IMPORTHEADERS', false),true);"; + $script['display'][] = "\t\t\t\$this->headers \t\t= ###-#-#-Component###Helper::getFileHeaders(\$this->dataType);"; + $script['display'][] = "\t\t\t// clear the data type"; + $script['display'][] = "\t\t\t\$session->clear('dataType');"; + $script['display'][] = "\t\t}"; + $script['display'][] = "\n\t\t// Display the template"; + $script['display'][] = "\t\tparent::display(\$tpl);"; + $script['display'][] = "\t}"; + } + elseif ('setdata' === $type) + { + // set the setdata script + $script['setdata'] = array(); + $script['setdata'][] = "\t/**"; + $script['setdata'][] = "\t* Set the data from the spreadsheet to the database"; + $script['setdata'][] = "\t*"; + $script['setdata'][] = "\t* @param string \$package Paths to the uploaded package file"; + $script['setdata'][] = "\t*"; + $script['setdata'][] = "\t* @return boolean false on failure"; + $script['setdata'][] = "\t*"; + $script['setdata'][] = "\t**/"; + $script['setdata'][] = "\tprotected function setData(\$package,\$table,\$target_headers)"; + $script['setdata'][] = "\t{"; + $script['setdata'][] = "\t\tif (###-#-#-Component###Helper::checkArray(\$target_headers))"; + $script['setdata'][] = "\t\t{"; + $script['setdata'][] = "\t\t\t// make sure the file is loaded\t\t"; + $script['setdata'][] = "\t\t\tJLoader::import('PHPExcel', JPATH_COMPONENT_ADMINISTRATOR . '/helpers');"; + $script['setdata'][] = "\t\t\t\$jinput = JFactory::getApplication()->input;"; + $script['setdata'][] = "\t\t\tforeach(\$target_headers as \$header)"; + $script['setdata'][] = "\t\t\t{"; + $script['setdata'][] = "\t\t\t\t\$data['target_headers'][\$header] = \$jinput->getString(\$header, null);"; + $script['setdata'][] = "\t\t\t}"; + $script['setdata'][] = "\t\t\t// set the data"; + $script['setdata'][] = "\t\t\tif(isset(\$package['dir']))"; + $script['setdata'][] = "\t\t\t{"; + $script['setdata'][] = "\t\t\t\t\$inputFileType = PHPExcel_IOFactory::identify(\$package['dir']);"; + $script['setdata'][] = "\t\t\t\t\$excelReader = PHPExcel_IOFactory::createReader(\$inputFileType);"; + $script['setdata'][] = "\t\t\t\t\$excelReader->setReadDataOnly(true);"; + $script['setdata'][] = "\t\t\t\t\$excelObj = \$excelReader->load(\$package['dir']);"; + $script['setdata'][] = "\t\t\t\t\$data['array'] = \$excelObj->getActiveSheet()->toArray(null, true,true,true);"; + $script['setdata'][] = "\t\t\t\t\$excelObj->disconnectWorksheets();"; + $script['setdata'][] = "\t\t\t\tunset(\$excelObj);"; + $script['setdata'][] = "\t\t\t\treturn \$this->save(\$data,\$table);"; + $script['setdata'][] = "\t\t\t}"; + $script['setdata'][] = "\t\t}"; + $script['setdata'][] = "\t\treturn false;"; + $script['setdata'][] = "\t}"; + } + elseif ('save' === $type) + { + $script['save'] = array(); + $script['save'][] = "\t/**"; + $script['save'][] = "\t* Save the data from the file to the database"; + $script['save'][] = "\t*"; + $script['save'][] = "\t* @param string \$package Paths to the uploaded package file"; + $script['save'][] = "\t*"; + $script['save'][] = "\t* @return boolean false on failure"; + $script['save'][] = "\t*"; + $script['save'][] = "\t**/"; + $script['save'][] = "\tprotected function save(\$data,\$table)"; + $script['save'][] = "\t{"; + $script['save'][] = "\t\t// import the data if there is any"; + $script['save'][] = "\t\tif(###-#-#-Component###Helper::checkArray(\$data['array']))"; + $script['save'][] = "\t\t{"; + $script['save'][] = "\t\t\t// get user object"; + $script['save'][] = "\t\t\t\$user \t\t= JFactory::getUser();"; + $script['save'][] = "\t\t\t// remove header if it has headers"; + $script['save'][] = "\t\t\t\$id_key \t= \$data['target_headers']['id'];"; + $script['save'][] = "\t\t\t\$published_key \t= \$data['target_headers']['published'];"; + $script['save'][] = "\t\t\t\$ordering_key \t= \$data['target_headers']['ordering'];"; + $script['save'][] = "\t\t\t// get the first array set"; + $script['save'][] = "\t\t\t\$firstSet = reset(\$data['array']);"; + $script['save'][] = ""; + $script['save'][] = "\t\t\t// check if first array is a header array and remove if true"; + $script['save'][] = "\t\t\tif(\$firstSet[\$id_key] == 'id' || \$firstSet[\$published_key] == 'published' || \$firstSet[\$ordering_key] == 'ordering')"; + $script['save'][] = "\t\t\t{"; + $script['save'][] = "\t\t\t\tarray_shift(\$data['array']);"; + $script['save'][] = "\t\t\t}"; + $script['save'][] = "\t\t\t"; + $script['save'][] = "\t\t\t// make sure there is still values in array and that it was not only headers"; + $script['save'][] = "\t\t\tif(###-#-#-Component###Helper::checkArray(\$data['array']) && \$user->authorise(\$table.'.import', 'com_###-#-#-component###') && \$user->authorise('core.import', 'com_###-#-#-component###'))"; + $script['save'][] = "\t\t\t{"; + $script['save'][] = "\t\t\t\t// set target."; + $script['save'][] = "\t\t\t\t\$target\t= array_flip(\$data['target_headers']);"; + $script['save'][] = "\t\t\t\t// Get a db connection."; + $script['save'][] = "\t\t\t\t\$db = JFactory::getDbo();"; + $script['save'][] = "\t\t\t\t// set some defaults"; + $script['save'][] = "\t\t\t\t\$todayDate\t\t= JFactory::getDate()->toSql();"; + $script['save'][] = "\t\t\t\t// get global action permissions"; + $script['save'][] = "\t\t\t\t\$canDo\t\t\t= ###-#-#-Component###Helper::getActions(\$table);"; + $script['save'][] = "\t\t\t\t\$canEdit\t\t= \$canDo->get('core.edit');"; + $script['save'][] = "\t\t\t\t\$canState\t\t= \$canDo->get('core.edit.state');"; + $script['save'][] = "\t\t\t\t\$canCreate\t\t= \$canDo->get('core.create');"; + $script['save'][] = "\t\t\t\t\$hasAlias\t\t= \$this->getAliasesUsed(\$table);"; + $script['save'][] = "\t\t\t\t// prosses the data"; + $script['save'][] = "\t\t\t\tforeach(\$data['array'] as \$row)"; + $script['save'][] = "\t\t\t\t{"; + $script['save'][] = "\t\t\t\t\t\$found = false;"; + $script['save'][] = "\t\t\t\t\tif (isset(\$row[\$id_key]) && is_numeric(\$row[\$id_key]) && \$row[\$id_key] > 0)"; + $script['save'][] = "\t\t\t\t\t{"; + $script['save'][] = "\t\t\t\t\t\t// raw items import & update!"; + $script['save'][] = "\t\t\t\t\t\t\$query = \$db->getQuery(true);"; + $script['save'][] = "\t\t\t\t\t\t\$query"; + $script['save'][] = "\t\t\t\t\t\t\t->select('version')"; + $script['save'][] = "\t\t\t\t\t\t\t->from(\$db->quoteName('#__###-#-#-component###_'.\$table))"; + $script['save'][] = "\t\t\t\t\t\t\t->where(\$db->quoteName('id') . ' = '. \$db->quote(\$row[\$id_key]));"; + $script['save'][] = "\t\t\t\t\t\t// Reset the query using our newly populated query object."; + $script['save'][] = "\t\t\t\t\t\t\$db->setQuery(\$query);"; + $script['save'][] = "\t\t\t\t\t\t\$db->execute();"; + $script['save'][] = "\t\t\t\t\t\t\$found = \$db->getNumRows();"; + $script['save'][] = "\t\t\t\t\t}"; + $script['save'][] = "\t\t\t\t\t"; + $script['save'][] = "\t\t\t\t\tif(\$found && \$canEdit)"; + $script['save'][] = "\t\t\t\t\t{"; + $script['save'][] = "\t\t\t\t\t\t// update item"; + $script['save'][] = "\t\t\t\t\t\t\$id \t\t= \$row[\$id_key];"; + $script['save'][] = "\t\t\t\t\t\t\$version\t= \$db->loadResult();"; + $script['save'][] = "\t\t\t\t\t\t// reset all buckets"; + $script['save'][] = "\t\t\t\t\t\t\$query \t\t= \$db->getQuery(true);"; + $script['save'][] = "\t\t\t\t\t\t\$fields \t= array();"; + $script['save'][] = "\t\t\t\t\t\t// Fields to update."; + $script['save'][] = "\t\t\t\t\t\tforeach(\$row as \$key => \$cell)"; + $script['save'][] = "\t\t\t\t\t\t{"; + $script['save'][] = "\t\t\t\t\t\t\t// ignore column"; + $script['save'][] = "\t\t\t\t\t\t\tif ('IGNORE' == \$target[\$key])"; + $script['save'][] = "\t\t\t\t\t\t\t{"; + $script['save'][] = "\t\t\t\t\t\t\t\tcontinue;"; + $script['save'][] = "\t\t\t\t\t\t\t}"; + $script['save'][] = "\t\t\t\t\t\t\t// update modified"; + $script['save'][] = "\t\t\t\t\t\t\tif ('modified_by' == \$target[\$key])"; + $script['save'][] = "\t\t\t\t\t\t\t{"; + $script['save'][] = "\t\t\t\t\t\t\t\tcontinue;"; + $script['save'][] = "\t\t\t\t\t\t\t}"; + $script['save'][] = "\t\t\t\t\t\t\t// update modified"; + $script['save'][] = "\t\t\t\t\t\t\tif ('modified' == \$target[\$key])"; + $script['save'][] = "\t\t\t\t\t\t\t{"; + $script['save'][] = "\t\t\t\t\t\t\t\tcontinue;"; + $script['save'][] = "\t\t\t\t\t\t\t}"; + $script['save'][] = "\t\t\t\t\t\t\t// update version"; + $script['save'][] = "\t\t\t\t\t\t\tif ('version' == \$target[\$key])"; + $script['save'][] = "\t\t\t\t\t\t\t{"; + $script['save'][] = "\t\t\t\t\t\t\t\t\$cell = (int) \$version + 1;"; + $script['save'][] = "\t\t\t\t\t\t\t}"; + $script['save'][] = "\t\t\t\t\t\t\t// verify publish authority"; + $script['save'][] = "\t\t\t\t\t\t\tif ('published' == \$target[\$key] && !\$canState)"; + $script['save'][] = "\t\t\t\t\t\t\t{"; + $script['save'][] = "\t\t\t\t\t\t\t\tcontinue;"; + $script['save'][] = "\t\t\t\t\t\t\t}"; + $script['save'][] = "\t\t\t\t\t\t\t// set to update array"; + $script['save'][] = "\t\t\t\t\t\t\tif(in_array(\$key, \$data['target_headers']) && is_numeric(\$cell))"; + $script['save'][] = "\t\t\t\t\t\t\t{"; + $script['save'][] = "\t\t\t\t\t\t\t\t\$fields[] = \$db->quoteName(\$target[\$key]) . ' = ' . \$cell;"; + $script['save'][] = "\t\t\t\t\t\t\t}"; + $script['save'][] = "\t\t\t\t\t\t\telseif(in_array(\$key, \$data['target_headers']) && is_string(\$cell))"; + $script['save'][] = "\t\t\t\t\t\t\t{"; + $script['save'][] = "\t\t\t\t\t\t\t\t\$fields[] = \$db->quoteName(\$target[\$key]) . ' = ' . \$db->quote(\$cell);"; + $script['save'][] = "\t\t\t\t\t\t\t}"; + $script['save'][] = "\t\t\t\t\t\t\telseif(in_array(\$key, \$data['target_headers']) && is_null(\$cell))"; + $script['save'][] = "\t\t\t\t\t\t\t{"; + $script['save'][] = "\t\t\t\t\t\t\t\t// if import data is null then set empty"; + $script['save'][] = "\t\t\t\t\t\t\t\t\$fields[] = \$db->quoteName(\$target[\$key]) . \" = ''\";"; + $script['save'][] = "\t\t\t\t\t\t\t}"; + $script['save'][] = "\t\t\t\t\t\t}"; + $script['save'][] = "\t\t\t\t\t\t// load the defaults"; + $script['save'][] = "\t\t\t\t\t\t\$fields[]\t= \$db->quoteName('modified_by') . ' = ' . \$db->quote(\$user->id);"; + $script['save'][] = "\t\t\t\t\t\t\$fields[]\t= \$db->quoteName('modified') . ' = ' . \$db->quote(\$todayDate);"; + $script['save'][] = "\t\t\t\t\t\t// Conditions for which records should be updated."; + $script['save'][] = "\t\t\t\t\t\t\$conditions = array("; + $script['save'][] = "\t\t\t\t\t\t\t\$db->quoteName('id') . ' = ' . \$id"; + $script['save'][] = "\t\t\t\t\t\t);"; + $script['save'][] = "\t\t\t\t\t\t"; + $script['save'][] = "\t\t\t\t\t\t\$query->update(\$db->quoteName('#__###-#-#-component###_'.\$table))->set(\$fields)->where(\$conditions);"; + $script['save'][] = "\t\t\t\t\t\t\$db->setQuery(\$query);"; + $script['save'][] = "\t\t\t\t\t\t\$db->execute();"; + $script['save'][] = "\t\t\t\t\t}"; + $script['save'][] = "\t\t\t\t\telseif (\$canCreate)"; + $script['save'][] = "\t\t\t\t\t{"; + $script['save'][] = "\t\t\t\t\t\t// insert item"; + $script['save'][] = "\t\t\t\t\t\t\$query = \$db->getQuery(true);"; + $script['save'][] = "\t\t\t\t\t\t// reset all buckets"; + $script['save'][] = "\t\t\t\t\t\t\$columns \t= array();"; + $script['save'][] = "\t\t\t\t\t\t\$values \t= array();"; + $script['save'][] = "\t\t\t\t\t\t\$version\t= false;"; + $script['save'][] = "\t\t\t\t\t\t// Insert columns. Insert values."; + $script['save'][] = "\t\t\t\t\t\tforeach(\$row as \$key => \$cell)"; + $script['save'][] = "\t\t\t\t\t\t{"; + $script['save'][] = "\t\t\t\t\t\t\t// ignore column"; + $script['save'][] = "\t\t\t\t\t\t\tif ('IGNORE' == \$target[\$key])"; + $script['save'][] = "\t\t\t\t\t\t\t{"; + $script['save'][] = "\t\t\t\t\t\t\t\tcontinue;"; + $script['save'][] = "\t\t\t\t\t\t\t}"; + $script['save'][] = "\t\t\t\t\t\t\t// remove id"; + $script['save'][] = "\t\t\t\t\t\t\tif ('id' == \$target[\$key])"; + $script['save'][] = "\t\t\t\t\t\t\t{"; + $script['save'][] = "\t\t\t\t\t\t\t\tcontinue;"; + $script['save'][] = "\t\t\t\t\t\t\t}"; + $script['save'][] = "\t\t\t\t\t\t\t// update created"; + $script['save'][] = "\t\t\t\t\t\t\tif ('created_by' == \$target[\$key])"; + $script['save'][] = "\t\t\t\t\t\t\t{"; + $script['save'][] = "\t\t\t\t\t\t\t\tcontinue;"; + $script['save'][] = "\t\t\t\t\t\t\t}"; + $script['save'][] = "\t\t\t\t\t\t\t// update created"; + $script['save'][] = "\t\t\t\t\t\t\tif ('created' == \$target[\$key])"; + $script['save'][] = "\t\t\t\t\t\t\t{"; + $script['save'][] = "\t\t\t\t\t\t\t\tcontinue;"; + $script['save'][] = "\t\t\t\t\t\t\t}"; + $script['save'][] = "\t\t\t\t\t\t\t// Make sure the alias is incremented"; + $script['save'][] = "\t\t\t\t\t\t\tif ('alias' == \$target[\$key])"; + $script['save'][] = "\t\t\t\t\t\t\t{"; + $script['save'][] = "\t\t\t\t\t\t\t\t\$cell = \$this->getAlias(\$cell,\$table);"; + $script['save'][] = "\t\t\t\t\t\t\t}"; + $script['save'][] = "\t\t\t\t\t\t\t// update version"; + $script['save'][] = "\t\t\t\t\t\t\tif ('version' == \$target[\$key])"; + $script['save'][] = "\t\t\t\t\t\t\t{"; + $script['save'][] = "\t\t\t\t\t\t\t\t\$cell = 1;"; + $script['save'][] = "\t\t\t\t\t\t\t\t\$version = true;"; + $script['save'][] = "\t\t\t\t\t\t\t}"; + $script['save'][] = "\t\t\t\t\t\t\t// set to insert array"; + $script['save'][] = "\t\t\t\t\t\t\tif(in_array(\$key, \$data['target_headers']) && is_numeric(\$cell))"; + $script['save'][] = "\t\t\t\t\t\t\t{"; + $script['save'][] = "\t\t\t\t\t\t\t\t\$columns[] \t= \$target[\$key];"; + $script['save'][] = "\t\t\t\t\t\t\t\t\$values[] \t= \$cell;"; + $script['save'][] = "\t\t\t\t\t\t\t}"; + $script['save'][] = "\t\t\t\t\t\t\telseif(in_array(\$key, \$data['target_headers']) && is_string(\$cell))"; + $script['save'][] = "\t\t\t\t\t\t\t{"; + $script['save'][] = "\t\t\t\t\t\t\t\t\$columns[] \t= \$target[\$key];"; + $script['save'][] = "\t\t\t\t\t\t\t\t\$values[] \t= \$db->quote(\$cell);"; + $script['save'][] = "\t\t\t\t\t\t\t}"; + $script['save'][] = "\t\t\t\t\t\t\telseif(in_array(\$key, \$data['target_headers']) && is_null(\$cell))"; + $script['save'][] = "\t\t\t\t\t\t\t{"; + $script['save'][] = "\t\t\t\t\t\t\t\t// if import data is null then set empty"; + $script['save'][] = "\t\t\t\t\t\t\t\t\$columns[] \t= \$target[\$key];"; + $script['save'][] = "\t\t\t\t\t\t\t\t\$values[] \t= \"''\";"; + $script['save'][] = "\t\t\t\t\t\t\t}"; + $script['save'][] = "\t\t\t\t\t\t}"; + $script['save'][] = "\t\t\t\t\t\t// load the defaults"; + $script['save'][] = "\t\t\t\t\t\t\$columns[] \t= 'created_by';"; + $script['save'][] = "\t\t\t\t\t\t\$values[] \t= \$db->quote(\$user->id);"; + $script['save'][] = "\t\t\t\t\t\t\$columns[] \t= 'created';"; + $script['save'][] = "\t\t\t\t\t\t\$values[] \t= \$db->quote(\$todayDate);"; + $script['save'][] = "\t\t\t\t\t\tif (!\$version)"; + $script['save'][] = "\t\t\t\t\t\t{"; + $script['save'][] = "\t\t\t\t\t\t\t\$columns[] \t= 'version';"; + $script['save'][] = "\t\t\t\t\t\t\t\$values[] \t= 1;"; + $script['save'][] = "\t\t\t\t\t\t}"; + $script['save'][] = "\t\t\t\t\t\t// Prepare the insert query."; + $script['save'][] = "\t\t\t\t\t\t\$query"; + $script['save'][] = "\t\t\t\t\t\t\t->insert(\$db->quoteName('#__###-#-#-component###_'.\$table))"; + $script['save'][] = "\t\t\t\t\t\t\t->columns(\$db->quoteName(\$columns))"; + $script['save'][] = "\t\t\t\t\t\t\t->values(implode(',', \$values));"; + $script['save'][] = "\t\t\t\t\t\t// Set the query using our newly populated query object and execute it."; + $script['save'][] = "\t\t\t\t\t\t\$db->setQuery(\$query);"; + $script['save'][] = "\t\t\t\t\t\t\$done = \$db->execute();"; + $script['save'][] = "\t\t\t\t\t\tif (\$done)"; + $script['save'][] = "\t\t\t\t\t\t{"; + $script['save'][] = "\t\t\t\t\t\t\t\$aId = \$db->insertid();"; + $script['save'][] = "\t\t\t\t\t\t\t// make sure the access of asset is set"; + $script['save'][] = "\t\t\t\t\t\t\t###-#-#-Component###Helper::setAsset(\$aId,\$table);"; + $script['save'][] = "\t\t\t\t\t\t}"; + $script['save'][] = "\t\t\t\t\t}"; + $script['save'][] = "\t\t\t\t\telse"; + $script['save'][] = "\t\t\t\t\t{"; + $script['save'][] = "\t\t\t\t\t\treturn false;"; + $script['save'][] = "\t\t\t\t\t}"; + $script['save'][] = "\t\t\t\t}"; + $script['save'][] = "\t\t\t\treturn true;"; + $script['save'][] = "\t\t\t}"; + $script['save'][] = "\t\t}"; + $script['save'][] = "\t\treturn false;"; + $script['save'][] = "\t}"; + } + elseif ('view' === $type) + { + $script['view'] = array(); + $script['view'][] = ""; + $script['view'][] = ""; + $script['view'][] = "\n
      "; + $script['view'][] = "
      \" method=\"post\" name=\"adminForm\" id=\"adminForm\" class=\"form-horizontal form-validate\">"; + $script['view'][] = ""; + $script['view'][] = "\n\tsidebar)) : ?>"; + $script['view'][] = "\t\t
      "; + $script['view'][] = "\t\t\tsidebar; ?>"; + $script['view'][] = "\t\t
      "; + $script['view'][] = "\t\t
      "; + $script['view'][] = "\t"; + $script['view'][] = "\t\t
      "; + $script['view'][] = "\t"; + $script['view'][] = ""; + $script['view'][] = "\n\thasPackage && ###-#-#-Component###Helper::checkArray(\$this->headerList) && ###-#-#-Component###Helper::checkArray(\$this->headers)) : ?>"; + $script['view'][] = "\t\t
      "; + $script['view'][] = "\t\t\t"; + $script['view'][] = "\t\t\t
      "; + $script['view'][] = "\t\t\t\t"; + $script['view'][] = "\t\t\t\t
      "; + $script['view'][] = "\t\t\t\t\t"; + $script['view'][] = "\t\t\t\t
      "; + $script['view'][] = "\t\t\t
      "; + $script['view'][] = "\t\t\theaderList as \$name => \$title): ?>"; + $script['view'][] = "\t\t\t\t
      "; + $script['view'][] = "\t\t\t\t\t"; + $script['view'][] = "\t\t\t\t\t
      "; + $script['view'][] = "\t\t\t\t\t\t"; + $script['view'][] = "\t\t\t\t\t
      "; + $script['view'][] = "\t\t\t\t
      "; + $script['view'][] = "\t\t\t"; + $script['view'][] = "\t\t\t
      "; + $script['view'][] = "\t\t\t\t\" onclick=\"Joomla.continueImport()\" />"; + $script['view'][] = "\t\t\t
      "; + $script['view'][] = "\t\t
      "; + $script['view'][] = "\t\t"; + $script['view'][] = "\t"; + $script['view'][] = "\t\t 'upload')); ?>"; + $script['view'][] = "\t\t"; + $script['view'][] = "\t\t"; + $script['view'][] = "\t\t\t
      "; + $script['view'][] = "\t\t\t\t"; + $script['view'][] = "\t\t\t\t
      "; + $script['view'][] = "\t\t\t\t\t"; + $script['view'][] = "\t\t\t\t\t
      "; + $script['view'][] = "\t\t\t\t\t\t"; + $script['view'][] = "\t\t\t\t\t
      "; + $script['view'][] = "\t\t\t\t
      "; + $script['view'][] = "\t\t\t\t
      "; + $script['view'][] = "\t\t\t\t\t\" onclick=\"Joomla.submitbutton()\" />    (.csv .xls .ods)"; + $script['view'][] = "\t\t\t\t
      "; + $script['view'][] = "\t\t\t
      "; + $script['view'][] = "\t\t"; + $script['view'][] = "\t\t"; + $script['view'][] = "\t\t"; + $script['view'][] = "\t\t\t
      "; + $script['view'][] = "\t\t\t\t"; + $script['view'][] = "\t\t\t\t
      "; + $script['view'][] = "\t\t\t\t\t"; + $script['view'][] = "\t\t\t\t\t
      "; + $script['view'][] = "\t\t\t\t\t\tstate->get('import.directory'); ?>\" />"; + $script['view'][] = "\t\t\t\t\t
      "; + $script['view'][] = "\t\t\t\t
      "; + $script['view'][] = "\t\t\t\t
      "; + $script['view'][] = "\t\t\t\t\t\" onclick=\"Joomla.submitbutton3()\" />    (.csv .xls .ods)"; + $script['view'][] = "\t\t\t\t
      "; + $script['view'][] = "\t\t\t\t
      "; + $script['view'][] = "\t\t"; + $script['view'][] = ""; + $script['view'][] = "\n\t\t"; + $script['view'][] = "\t\t\t
      "; + $script['view'][] = "\t\t\t\t"; + $script['view'][] = "\t\t\t\t
      "; + $script['view'][] = "\t\t\t\t\t"; + $script['view'][] = "\t\t\t\t\t
      "; + $script['view'][] = "\t\t\t\t\t\t"; + $script['view'][] = "\t\t\t\t\t
      "; + $script['view'][] = "\t\t\t\t
      "; + $script['view'][] = "\t\t\t\t
      "; + $script['view'][] = "\t\t\t\t\t\" onclick=\"Joomla.submitbutton4()\" />    (.csv .xls .ods)"; + $script['view'][] = "\t\t\t\t
      "; + $script['view'][] = "\t\t\t
      "; + $script['view'][] = "\t\t"; + $script['view'][] = "\t\t"; + $script['view'][] = "\t\t"; + $script['view'][] = "\t"; + $script['view'][] = "\t"; + $script['view'][] = "\t"; + $script['view'][] = ""; + $script['view'][] = "
      "; + } + elseif ('import' === $type) + { + $script['import'] = array(); + $script['import'][] = "\t/**"; + $script['import'][] = "\t * Import an spreadsheet from either folder, url or upload."; + $script['import'][] = "\t *"; + $script['import'][] = "\t * @return boolean result of import"; + $script['import'][] = "\t *"; + $script['import'][] = "\t */"; + $script['import'][] = "\tpublic function import()"; + $script['import'][] = "\t{"; + $script['import'][] = "\t\t\$this->setState('action', 'import');"; + $script['import'][] = "\t\t\$app \t\t= JFactory::getApplication();"; + $script['import'][] = "\t\t\$session \t= JFactory::getSession();"; + $script['import'][] = "\t\t\$package \t= null;"; + $script['import'][] = "\t\t\$continue\t= false;"; + $script['import'][] = "\t\t// get import type"; + $script['import'][] = "\t\t\$this->getType = \$app->input->getString('gettype', NULL);"; + $script['import'][] = "\t\t// get import type"; + $script['import'][] = "\t\t\$this->dataType\t= \$session->get('dataType_VDM_IMPORTINTO', NULL);"; + $script['import'][] = "\n\t\tif (\$package === null)"; + $script['import'][] = "\t\t{"; + $script['import'][] = "\t\t\tswitch (\$this->getType)"; + $script['import'][] = "\t\t\t{"; + $script['import'][] = "\t\t\t\tcase 'folder':"; + $script['import'][] = "\t\t\t\t\t// Remember the 'Import from Directory' path."; + $script['import'][] = "\t\t\t\t\t\$app->getUserStateFromRequest(\$this->_context . '.import_directory', 'import_directory');"; + $script['import'][] = "\t\t\t\t\t\$package = \$this->_getPackageFromFolder();"; + $script['import'][] = "\t\t\t\t\tbreak;"; + $script['import'][] = "\n\t\t\t\tcase 'upload':"; + $script['import'][] = "\t\t\t\t\t\$package = \$this->_getPackageFromUpload();"; + $script['import'][] = "\t\t\t\t\tbreak;"; + $script['import'][] = "\n\t\t\t\tcase 'url':"; + $script['import'][] = "\t\t\t\t\t\$package = \$this->_getPackageFromUrl();"; + $script['import'][] = "\t\t\t\t\tbreak;"; + $script['import'][] = "\n\t\t\t\tcase 'continue':"; + $script['import'][] = "\t\t\t\t\t\$continue \t= true;"; + $script['import'][] = "\t\t\t\t\t\$package\t= \$session->get('package', null);"; + $script['import'][] = "\t\t\t\t\t\$package\t= json_decode(\$package, true);"; + $script['import'][] = "\t\t\t\t\t// clear session"; + $script['import'][] = "\t\t\t\t\t\$session->clear('package');"; + $script['import'][] = "\t\t\t\t\t\$session->clear('dataType');"; + $script['import'][] = "\t\t\t\t\t\$session->clear('hasPackage');"; + $script['import'][] = "\t\t\t\t\tbreak;"; + $script['import'][] = "\n\t\t\t\tdefault:"; + $script['import'][] = "\t\t\t\t\t\$app->setUserState('com_###-#-#-component###.message', JTe-#-#-xt::_('COM_###-#-#-COMPONENT###_IMPORT_NO_IMPORT_TYPE_FOUND'));"; + $script['import'][] = "\n\t\t\t\t\treturn false;"; + $script['import'][] = "\t\t\t\t\tbreak;"; + $script['import'][] = "\t\t\t}"; + $script['import'][] = "\t\t}"; + $script['import'][] = "\t\t// Was the package valid?"; + $script['import'][] = "\t\tif (!\$package || !\$package['type'])"; + $script['import'][] = "\t\t{"; + $script['import'][] = "\t\t\tif (in_array(\$this->getType, array('upload', 'url')))"; + $script['import'][] = "\t\t\t{"; + $script['import'][] = "\t\t\t\t\$this->remove(\$package['packagename']);"; + $script['import'][] = "\t\t\t}"; + $script['import'][] = "\n\t\t\t\$app->setUserState('com_###-#-#-component###.message', JTe-#-#-xt::_('COM_###-#-#-COMPONENT###_IMPORT_UNABLE_TO_FIND_IMPORT_PACKAGE'));"; + $script['import'][] = "\t\t\treturn false;"; + $script['import'][] = "\t\t}"; + $script['import'][] = "\t\t"; + $script['import'][] = "\t\t// first link data to table headers"; + $script['import'][] = "\t\tif(!\$continue){"; + $script['import'][] = "\t\t\t\$package\t= json_encode(\$package);"; + $script['import'][] = "\t\t\t\$session->set('package', \$package);"; + $script['import'][] = "\t\t\t\$session->set('dataType', \$this->dataType);"; + $script['import'][] = "\t\t\t\$session->set('hasPackage', true);"; + $script['import'][] = "\t\t\treturn true;"; + $script['import'][] = "\t\t}"; + $script['import'][] = "\t\t// set the data"; + $script['import'][] = "\t\t\$headerList = json_decode(\$session->get(\$this->dataType.'_VDM_IMPORTHEADERS', false), true);"; + $script['import'][] = "\t\tif (!\$this->setData(\$package,\$this->dataType,\$headerList))"; + $script['import'][] = "\t\t{"; + $script['import'][] = "\t\t\t// There was an error importing the package"; + $script['import'][] = "\t\t\t\$msg = JTe-#-#-xt::_('COM_###-#-#-COMPONENT###_IMPORT_ERROR');"; + $script['import'][] = "\t\t\t\$back = \$session->get('backto_VDM_IMPORT', NULL);"; + $script['import'][] = "\t\t\tif (\$back)"; + $script['import'][] = "\t\t\t{"; + $script['import'][] = "\t\t\t\t\$app->setUserState('com_###-#-#-component###.redirect_url', 'index.php?option=com_###-#-#-component###&view='.\$back);"; + $script['import'][] = "\t\t\t\t\$session->clear('backto_VDM_IMPORT');"; + $script['import'][] = "\t\t\t}"; + $script['import'][] = "\t\t\t\$result = false;"; + $script['import'][] = "\t\t}"; + $script['import'][] = "\t\telse"; + $script['import'][] = "\t\t{"; + $script['import'][] = "\t\t\t// Package imported sucessfully"; + $script['import'][] = "\t\t\t\$msg = JTe-#-#-xt::sprintf('COM_###-#-#-COMPONENT###_IMPORT_SUCCESS', \$package['packagename']);"; + $script['import'][] = "\t\t\t\$back = \$session->get('backto_VDM_IMPORT', NULL);"; + $script['import'][] = "\t\t\tif (\$back)"; + $script['import'][] = "\t\t\t{"; + $script['import'][] = "\t\t\t \$app->setUserState('com_###-#-#-component###.redirect_url', 'index.php?option=com_###-#-#-component###&view='.\$back);"; + $script['import'][] = "\t\t\t \$session->clear('backto_VDM_IMPORT');"; + $script['import'][] = "\t\t\t}"; + $script['import'][] = "\t\t\t\$result = true;"; + $script['import'][] = "\t\t}"; + $script['import'][] = "\n\t\t// Set some model state values"; + $script['import'][] = "\t\t\$app->enqueueMessage(\$msg);"; + $script['import'][] = "\n\t\t// remove file after import"; + $script['import'][] = "\t\t\$this->remove(\$package['packagename']);"; + $script['import'][] = "\t\t\$session->clear(\$this->getType.'_VDM_IMPORTHEADERS');"; + $script['import'][] = "\t\treturn \$result;"; + $script['import'][] = "\t}"; + } + elseif ('ext' === $type) + { + $script['ext'][] = "\t/**"; + $script['ext'][] = "\t * Check the extension"; + $script['ext'][] = "\t *"; + $script['ext'][] = "\t * @param string \$file Name of the uploaded file"; + $script['ext'][] = "\t *"; + $script['ext'][] = "\t * @return boolean True on success"; + $script['ext'][] = "\t *"; + $script['ext'][] = "\t */"; + $script['ext'][] = "\tprotected function checkExtension(\$file)"; + $script['ext'][] = "\t{"; + $script['ext'][] = "\t\t// check the extention"; + $script['ext'][] = "\t\tswitch(strtolower(pathinfo(\$file, PATHINFO_EXTENSION)))"; + $script['ext'][] = "\t\t{"; + $script['ext'][] = "\t\t\tcase 'xls':"; + $script['ext'][] = "\t\t\tcase 'ods':"; + $script['ext'][] = "\t\t\tcase 'csv':"; + $script['ext'][] = "\t\t\treturn true;"; + $script['ext'][] = "\t\t\tbreak;"; + $script['ext'][] = "\t\t}"; + $script['ext'][] = "\t\treturn false;"; + $script['ext'][] = "\t}"; + } + // return the needed script + if (isset($script[$type])) + { + return str_replace('-#-#-', '', implode("\n",$script[$type])); + } + return false; + } + + /** + * set the session defaults if not set + **/ + protected static function setSessionDefaults() + { + // noting for now + return true; + } + + /** + * the Butler + **/ + public static $session = array(); + + /** + * the Butler Assistant + **/ + protected static $localSession = array(); + + /** + * start a session if not already set, and load with data + **/ + public static function loadSession() + { + if (!isset(self::$session) || !self::checkObject(self::$session)) + { + self::$session = JFactory::getSession(); + } + // set the defaults + self::setSessionDefaults(); + } + + /** + * give Session more to keep + **/ + public static function set($key, $value) + { + // set to local memory to speed up program + self::$localSession[$key] = $value; + // load to session for later use + return self::$session->set($key, self::$localSession[$key]); + } + + /** + * get info from Session + **/ + public static function get($key, $default = null) + { + // check if in local memory + if (!isset(self::$localSession[$key])) + { + // set to local memory to speed up program + self::$localSession[$key] = self::$session->get($key, $default); + } + return self::$localSession[$key]; + } + + + /** + * check if it is a new hash + **/ + public static function newHash($hash, $name = 'backup', $type = 'hash', $key = '', $fileType = '.txt') + { + // make sure we have a hash + if (self::checkString($hash)) + { + // first get the file path + $path_filename = self::getFilePath($name, $type, $key, $fileType, JPATH_COMPONENT_ADMINISTRATOR); + // set as read if not already set + if (($content = @file_get_contents($path_filename)) !== FALSE) + { + if ($hash == $content) + { + return false; + } + } + // set the hash + return self::writeFile($path_filename, $hash); + } + return false; + } + + public static function jsonToString($value, $sperator = ", ", $table = null) + { + // check if string is JSON + $result = json_decode($value, true); + if (json_last_error() === JSON_ERROR_NONE) + { + // is JSON + if (self::checkArray($result)) + { + if (self::checkString($table)) + { + $names = array(); + foreach ($result as $val) + { + if ($name = self::getVar($table, $val, 'id', 'name')) + { + $names[] = $name; + } + } + if (self::checkArray($names)) + { + return (string) implode($sperator,$names); + } + } + return (string) implode($sperator,$result); + } + return (string) json_decode($value); + } + return $value; + } + + /** + * Load the Component xml manifest. + **/ + public static function manifest() + { + $manifestUrl = JPATH_ADMINISTRATOR."/components/com_componentbuilder/componentbuilder.xml"; + return simplexml_load_file($manifestUrl); + } + + /** + * Load the Contributors details. + **/ + public static function getContributors() + { + // get params + $params = JComponentHelper::getParams('com_componentbuilder'); + // start contributors array + $contributors = array(); + // get all Contributors (max 20) + $searchArray = range('0','20'); + foreach($searchArray as $nr) + { + if ((NULL !== $params->get("showContributor".$nr)) && ($params->get("showContributor".$nr) == 2 || $params->get("showContributor".$nr) == 3)) + { + // set link based of selected option + if($params->get("useContributor".$nr) == 1) + { + $link_front = ''; + $link_back = ''; + } + elseif($params->get("useContributor".$nr) == 2) + { + $link_front = ''; + $link_back = ''; + } + else + { + $link_front = ''; + $link_back = ''; + } + $contributors[$nr]['title'] = self::htmlEscape($params->get("titleContributor".$nr)); + $contributors[$nr]['name'] = $link_front.self::htmlEscape($params->get("nameContributor".$nr)).$link_back; + } + } + return $contributors; + } + + /** + * Load the Component Help URLs. + **/ + public static function getHelpUrl($view) + { + $user = JFactory::getUser(); + $groups = $user->get('groups'); + $db = JFactory::getDbo(); + $query = $db->getQuery(true); + $query->select(array('a.id','a.groups','a.target','a.type','a.article','a.url')); + $query->from('#__componentbuilder_help_document AS a'); + $query->where('a.site_view = '.$db->quote($view)); + $query->where('a.location = 2'); + $query->where('a.published = 1'); + $db->setQuery($query); + $db->execute(); + if($db->getNumRows()) + { + $helps = $db->loadObjectList(); + if (self::checkArray($helps)) + { + foreach ($helps as $nr => $help) + { + if ($help->target == 1) + { + $targetgroups = json_decode($help->groups, true); + if (!array_intersect($targetgroups, $groups)) + { + // if user not in those target groups then remove the item + unset($helps[$nr]); + continue; + } + } + // set the return type + switch ($help->type) + { + // set joomla article + case 1: + return self::loadArticleLink($help->article); + break; + // set help text + case 2: + return self::loadHelpTextLink($help->id); + break; + // set Link + case 3: + return $help->url; + break; + } + } + } + } + return false; + } + + /** + * Get the Article Link. + **/ + protected static function loadArticleLink($id) + { + return JURI::root().'index.php?option=com_content&view=article&id='.$id.'&tmpl=component&layout=modal'; + } + + /** + * Get the Help Text Link. + **/ + protected static function loadHelpTextLink($id) + { + $token = JSession::getFormToken(); + return 'index.php?option=com_componentbuilder&task=help.getText&id=' . (int) $id . '&token=' . $token; + } + + /** + * Get any component's model + **/ + public static function getModel($name, $path = JPATH_COMPONENT_SITE, $component = 'componentbuilder') + { + // full path + $fullPath = $path . '/models'; + // load the model file + JModelLegacy::addIncludePath($fullPath); + // get instance + $model = JModelLegacy::getInstance( $name, $component.'Model' ); + // if model not found + if ($model == false) + { + require_once $fullPath.'/'.strtolower($name).'.php'; + // build class name + $class = $prefix.$name; + // initialize the model + new $class(); + $model = JModelLegacy::getInstance($name, $prefix); + } + return $model; + } + + /** + * Add to asset Table + */ + public static function setAsset($id,$table) + { + $parent = JTable::getInstance('Asset'); + $parent->loadByName('com_componentbuilder'); + + $parentId = $parent->id; + $name = 'com_componentbuilder.'.$table.'.'.$id; + $title = ''; + + $asset = JTable::getInstance('Asset'); + $asset->loadByName($name); + + // Check for an error. + $error = $asset->getError(); + + if ($error) + { + $this->setError($error); + + return false; + } + else + { + // Specify how a new or moved node asset is inserted into the tree. + if ($asset->parent_id != $parentId) + { + $asset->setLocation($parentId, 'last-child'); + } + + // Prepare the asset to be stored. + $asset->parent_id = $parentId; + $asset->name = $name; + $asset->title = $title; + // get the default asset rules + $rules = self::getDefaultAssetRules('com_componentbuilder',$table); + if ($rules instanceof JAccessRules) + { + $asset->rules = (string) $rules; + } + + if (!$asset->check() || !$asset->store()) + { + JFactory::getApplication()->enqueueMessage($asset->getError(), 'warning'); + return false; + } + else + { + // Create an asset_id or heal one that is corrupted. + $object = new stdClass(); + + // Must be a valid primary key value. + $object->id = $id; + $object->asset_id = (int) $asset->id; + + // Update their asset_id to link to the asset table. + return JFactory::getDbo()->updateObject('#__componentbuilder_'.$table, $object, 'id'); + } + } + return false; + } + + /** + * Gets the default asset Rules for a component/view. + */ + protected static function getDefaultAssetRules($component,$view) + { + // Need to find the asset id by the name of the component. + $db = JFactory::getDbo(); + $query = $db->getQuery(true) + ->select($db->quoteName('id')) + ->from($db->quoteName('#__assets')) + ->where($db->quoteName('name') . ' = ' . $db->quote($component)); + $db->setQuery($query); + $db->execute(); + if ($db->loadRowList()) + { + // asset alread set so use saved rules + $assetId = (int) $db->loadResult(); + $result = JAccess::getAssetRules($assetId); + if ($result instanceof JAccessRules) + { + $_result = (string) $result; + $_result = json_decode($_result); + foreach ($_result as $name => &$rule) + { + $v = explode('.', $name); + if ($view !== $v[0]) + { + // remove since it is not part of this view + unset($_result->$name); + } + else + { + // clear the value since we inherit + $rule = array(); + } + } + // check if there are any view values remaining + if (count($_result)) + { + $_result = json_encode($_result); + $_result = array($_result); + // Instantiate and return the JAccessRules object for the asset rules. + $rules = new JAccessRules($_result); + + return $rules; + } + return $result; + } + } + return JAccess::getAssetRules(0); + } + + public static function renderBoolButton() + { + $args = func_get_args(); + + // get the radio element + $button = JFormHelper::loadFieldType('radio'); + + // setup the properties + $name = self::htmlEscape($args[0]); + $additional = isset($args[1]) ? (string) $args[1] : ''; + $value = $args[2]; + $yes = isset($args[3]) ? self::htmlEscape($args[3]) : 'JYES'; + $no = isset($args[4]) ? self::htmlEscape($args[4]) : 'JNO'; + + // prepare the xml + $element = new SimpleXMLElement(''); + + // run + $button->setup($element, $value); + + return $button->input; + + } + + /** + * UIKIT Component Classes + **/ + public static $uk_components = array( + 'data-uk-grid' => array( + 'grid' ), + 'uk-accordion' => array( + 'accordion' ), + 'uk-autocomplete' => array( + 'autocomplete' ), + 'data-uk-datepicker' => array( + 'datepicker' ), + 'uk-form-password' => array( + 'form-password' ), + 'uk-form-select' => array( + 'form-select' ), + 'data-uk-htmleditor' => array( + 'htmleditor' ), + 'data-uk-lightbox' => array( + 'lightbox' ), + 'uk-nestable' => array( + 'nestable' ), + 'UIkit.notify' => array( + 'notify' ), + 'data-uk-parallax' => array( + 'parallax' ), + 'uk-search' => array( + 'search' ), + 'uk-slider' => array( + 'slider' ), + 'uk-slideset' => array( + 'slideset' ), + 'uk-slideshow' => array( + 'slideshow', + 'slideshow-fx' ), + 'uk-sortable' => array( + 'sortable' ), + 'data-uk-sticky' => array( + 'sticky' ), + 'data-uk-timepicker' => array( + 'timepicker' ), + 'data-uk-tooltip' => array( + 'tooltip' ), + 'uk-placeholder' => array( + 'placeholder' ), + 'uk-dotnav' => array( + 'dotnav' ), + 'uk-slidenav' => array( + 'slidenav' ), + 'uk-form' => array( + 'form-advanced' ), + 'uk-progress' => array( + 'progress' ), + 'upload-drop' => array( + 'upload', 'form-file' ) + ); + + /** + * Add UIKIT Components + **/ + public static $uikit = false; + + /** + * Get UIKIT Components + **/ + public static function getUikitComp($content,$classes = array()) + { + if (strpos($content,'class="uk-') !== false) + { + // reset + $temp = array(); + foreach (self::$uk_components as $looking => $add) + { + if (strpos($content,$looking) !== false) + { + $temp[] = $looking; + } + } + // make sure uikit is loaded to config + if (strpos($content,'class="uk-') !== false) + { + self::$uikit = true; + } + // sorter + if (self::checkArray($temp)) + { + // merger + if (self::checkArray($classes)) + { + $newTemp = array_merge($temp,$classes); + $temp = array_unique($newTemp); + } + return $temp; + } + } + if (self::checkArray($classes)) + { + return $classes; + } + return false; + } + + public static function getVar($table, $where = null, $whereString = 'user', $what = 'id', $operator = '=', $main = 'componentbuilder') + { + if(!$where) + { + $where = JFactory::getUser()->id; + } + // Get a db connection. + $db = JFactory::getDbo(); + // Create a new query object. + $query = $db->getQuery(true); + $query->select($db->quoteName(array($what))); + if (empty($table)) + { + $query->from($db->quoteName('#__'.$main)); + } + else + { + $query->from($db->quoteName('#__'.$main.'_'.$table)); + } + if (is_numeric($where)) + { + $query->where($db->quoteName($whereString) . ' '.$operator.' '.(int) $where); + } + elseif (is_string($where)) + { + $query->where($db->quoteName($whereString) . ' '.$operator.' '. $db->quote((string)$where)); + } + else + { + return false; + } + $db->setQuery($query); + $db->execute(); + if ($db->getNumRows()) + { + return $db->loadResult(); + } + return false; + } + + public static function getVars($table, $where = null, $whereString = 'user', $what = 'id', $operator = 'IN', $main = 'componentbuilder', $unique = true) + { + if(!$where) + { + $where = JFactory::getUser()->id; + } + + if (!self::checkArray($where) && $where > 0) + { + $where = array($where); + } + + if (self::checkArray($where)) + { + // prep main <-- why? well if $main='' is empty then $table can be categories or users + if (self::checkString($main)) + { + $main = '_'.ltrim($main, '_'); + } + // Get a db connection. + $db = JFactory::getDbo(); + // Create a new query object. + $query = $db->getQuery(true); + + $query->select($db->quoteName(array($what))); + if (empty($table)) + { + $query->from($db->quoteName('#__'.$main)); + } + else + { + $query->from($db->quoteName('#__'.$main.'_'.$table)); + } + $query->where($db->quoteName($whereString) . ' '.$operator.' (' . implode(',',$where) . ')'); + $db->setQuery($query); + $db->execute(); + if ($db->getNumRows()) + { + if ($unique) + { + return array_unique($db->loadColumn()); + } + return $db->loadColumn(); + } + } + return false; + } + + public static function isPublished($id,$type) + { + if ($type == 'raw') + { + $type = 'item'; + } + $db = JFactory::getDbo(); + $query = $db->getQuery(true); + $query->select(array('a.published')); + $query->from('#__componentbuilder_'.$type.' AS a'); + $query->where('a.id = '. (int) $id); + $query->where('a.published = 1'); + $db->setQuery($query); + $db->execute(); + $found = $db->getNumRows(); + if($found) + { + return true; + } + return false; + } + + public static function getGroupName($id) + { + $db = JFactory::getDBO(); + $query = $db->getQuery(true); + $query->select(array('a.title')); + $query->from('#__usergroups AS a'); + $query->where('a.id = '. (int) $id); + $db->setQuery($query); + $db->execute(); + $found = $db->getNumRows(); + if($found) + { + return $db->loadResult(); + } + return $id; + } + + /** + * Get the actions permissions + **/ + public static function getActions($view,&$record = null,$views = null) + { + jimport('joomla.access.access'); + + $user = JFactory::getUser(); + $result = new JObject; + $view = self::safeString($view); + if (self::checkString($views)) + { + $views = self::safeString($views); + } + // get all actions from component + $actions = JAccess::getActions('com_componentbuilder', 'component'); + // set acctions only set in component settiongs + $componentActions = array('core.admin','core.manage','core.options','core.export'); + // loop the actions and set the permissions + foreach ($actions as $action) + { + // set to use component default + $fallback = true; + if (self::checkObject($record) && isset($record->id) && $record->id > 0 && !in_array($action->name,$componentActions)) + { + // The record has been set. Check the record permissions. + $permission = $user->authorise($action->name, 'com_componentbuilder.'.$view.'.' . (int) $record->id); + if (!$permission) // TODO removed && !is_null($permission) + { + if ($action->name == 'core.edit' || $action->name == $view.'.edit') + { + if ($user->authorise('core.edit.own', 'com_componentbuilder.'.$view.'.' . (int) $record->id)) + { + // If the owner matches 'me' then allow. + if (isset($record->created_by) && $record->created_by > 0 && ($record->created_by == $user->id)) + { + $result->set($action->name, true); + // set not to use component default + $fallback = false; + } + else + { + $result->set($action->name, false); + // set not to use component default + $fallback = false; + } + } + elseif ($user->authorise($view.'edit.own', 'com_componentbuilder.'.$view.'.' . (int) $record->id)) + { + // If the owner matches 'me' then allow. + if (isset($record->created_by) && $record->created_by > 0 && ($record->created_by == $user->id)) + { + $result->set($action->name, true); + // set not to use component default + $fallback = false; + } + else + { + $result->set($action->name, false); + // set not to use component default + $fallback = false; + } + } + elseif ($user->authorise('core.edit.own', 'com_componentbuilder')) + { + // If the owner matches 'me' then allow. + if (isset($record->created_by) && $record->created_by > 0 && ($record->created_by == $user->id)) + { + $result->set($action->name, true); + // set not to use component default + $fallback = false; + } + else + { + $result->set($action->name, false); + // set not to use component default + $fallback = false; + } + } + elseif ($user->authorise($view.'edit.own', 'com_componentbuilder')) + { + // If the owner matches 'me' then allow. + if (isset($record->created_by) && $record->created_by > 0 && ($record->created_by == $user->id)) + { + $result->set($action->name, true); + // set not to use component default + $fallback = false; + } + else + { + $result->set($action->name, false); + // set not to use component default + $fallback = false; + } + } + } + } + elseif (self::checkString($views) && isset($record->catid) && $record->catid > 0) + { + // make sure we use the core. action check for the categories + if (strpos($action->name,$view) !== false && strpos($action->name,'core.') === false ) { + $coreCheck = explode('.',$action->name); + $coreCheck[0] = 'core'; + $categoryCheck = implode('.',$coreCheck); + } + else + { + $categoryCheck = $action->name; + } + // The record has a category. Check the category permissions. + $catpermission = $user->authorise($categoryCheck, 'com_componentbuilder.'.$views.'.category.' . (int) $record->catid); + if (!$catpermission && !is_null($catpermission)) + { + if ($action->name == 'core.edit' || $action->name == $view.'.edit') + { + if ($user->authorise('core.edit.own', 'com_componentbuilder.'.$views.'.category.' . (int) $record->catid)) + { + // If the owner matches 'me' then allow. + if (isset($record->created_by) && $record->created_by > 0 && ($record->created_by == $user->id)) + { + $result->set($action->name, true); + // set not to use component default + $fallback = false; + } + else + { + $result->set($action->name, false); + // set not to use component default + $fallback = false; + } + } + elseif ($user->authorise($view.'edit.own', 'com_componentbuilder.'.$views.'.category.' . (int) $record->catid)) + { + // If the owner matches 'me' then allow. + if (isset($record->created_by) && $record->created_by > 0 && ($record->created_by == $user->id)) + { + $result->set($action->name, true); + // set not to use component default + $fallback = false; + } + else + { + $result->set($action->name, false); + // set not to use component default + $fallback = false; + } + } + elseif ($user->authorise('core.edit.own', 'com_componentbuilder')) + { + // If the owner matches 'me' then allow. + if (isset($record->created_by) && $record->created_by > 0 && ($record->created_by == $user->id)) + { + $result->set($action->name, true); + // set not to use component default + $fallback = false; + } + else + { + $result->set($action->name, false); + // set not to use component default + $fallback = false; + } + } + elseif ($user->authorise($view.'edit.own', 'com_componentbuilder')) + { + // If the owner matches 'me' then allow. + if (isset($record->created_by) && $record->created_by > 0 && ($record->created_by == $user->id)) + { + $result->set($action->name, true); + // set not to use component default + $fallback = false; + } + else + { + $result->set($action->name, false); + // set not to use component default + $fallback = false; + } + } + } + } + } + } + // if allowed then fallback on component global settings + if ($fallback) + { + $result->set($action->name, $user->authorise($action->name, 'com_componentbuilder')); + } + } + return $result; + } + + public static function checkJson($string) + { + if (self::checkString($string)) + { + json_decode($string); + return (json_last_error() === JSON_ERROR_NONE); + } + return false; + } + + public static function checkObject($object) + { + if (isset($object) && is_object($object) && count($object) > 0) + { + return true; + } + return false; + } + + public static function checkArray($array, $removeEmptyString = false) + { + if (isset($array) && is_array($array) && count($array) > 0) + { + // also make sure the empty strings are removed + if ($removeEmptyString) + { + foreach ($array as $key => $string) + { + if (empty($string)) + { + unset($array[$key]); + } + } + return self::checkArray($array, false); + } + return true; + } + return false; + } + + public static function checkString($string) + { + if (isset($string) && is_string($string) && strlen($string) > 0) + { + return true; + } + return false; + } + + public static function mergeArrays($arrays) + { + if(self::checkArray($arrays)) + { + $arrayBuket = array(); + foreach ($arrays as $array) + { + if (self::checkArray($array)) + { + $arrayBuket = array_merge($arrayBuket, $array); + } + } + return $arrayBuket; + } + return false; + } + + // typo sorry! + public static function sorten($string, $length = 40, $addTip = true) + { + return self::shorten($string, $length, $addTip); + } + + public static function shorten($string, $length = 40, $addTip = true) + { + if (self::checkString($string)) + { + $initial = strlen($string); + $words = preg_split('/([\s\n\r]+)/', $string, null, PREG_SPLIT_DELIM_CAPTURE); + $words_count = count($words); + + $word_length = 0; + $last_word = 0; + for (; $last_word < $words_count; ++$last_word) + { + $word_length += strlen($words[$last_word]); + if ($word_length > $length) + { + break; + } + } + + $newString = implode(array_slice($words, 0, $last_word)); + $final = strlen($newString); + if ($initial != $final && $addTip) + { + $title = self::shorten($string, 400 , false); + return ''.trim($newString).'...'; + } + elseif ($initial != $final && !$addTip) + { + return trim($newString).'...'; + } + } + return $string; + } + + public static function safeString($string, $type = 'L', $spacer = '_', $replaceNumbers = true) + { + if ($replaceNumbers === true) + { + // remove all numbers and replace with english text version (works well only up to millions) + $string = self::replaceNumbers($string); + } + // 0nly continue if we have a string + if (self::checkString($string)) + { + // create file name without the extention that is safe + if ($type === 'filename') + { + // make sure VDM is not in the string + $string = str_replace('VDM', 'vDm', $string); + // Remove anything which isn't a word, whitespace, number + // or any of the following caracters -_() + // If you don't need to handle multi-byte characters + // you can use preg_replace rather than mb_ereg_replace + // Thanks @Ɓukasz Rysiak! + // $string = mb_ereg_replace("([^\w\s\d\-_\(\)])", '', $string); + $string = preg_replace("([^\w\s\d\-_\(\)])", '', $string); + // http://stackoverflow.com/a/2021729/1429677 + return preg_replace('/\s+/', ' ', $string); + } + // remove all other characters + $string = trim($string); + $string = preg_replace('/'.$spacer.'+/', ' ', $string); + $string = preg_replace('/\s+/', ' ', $string); + $string = preg_replace("/[^A-Za-z ]/", '', $string); + // select final adaptations + if ($type === 'L' || $type === 'strtolower') + { + // replace white space with underscore + $string = preg_replace('/\s+/', $spacer, $string); + // default is to return lower + return strtolower($string); + } + elseif ($type === 'W') + { + // return a string with all first letter of each word uppercase(no undersocre) + return ucwords(strtolower($string)); + } + elseif ($type === 'w' || $type === 'word') + { + // return a string with all lowercase(no undersocre) + return strtolower($string); + } + elseif ($type === 'Ww' || $type === 'Word') + { + // return a string with first letter of the first word uppercase and all the rest lowercase(no undersocre) + return ucfirst(strtolower($string)); + } + elseif ($type === 'WW' || $type === 'WORD') + { + // return a string with all the uppercase(no undersocre) + return strtoupper($string); + } + elseif ($type === 'U' || $type === 'strtoupper') + { + // replace white space with underscore + $string = preg_replace('/\s+/', $spacer, $string); + // return all upper + return strtoupper($string); + } + elseif ($type === 'F' || $type === 'ucfirst') + { + // replace white space with underscore + $string = preg_replace('/\s+/', $spacer, $string); + // return with first caracter to upper + return ucfirst(strtolower($string)); + } + elseif ($type === 'cA' || $type === 'cAmel' || $type === 'camelcase') + { + // convert all words to first letter uppercase + $string = ucwords(strtolower($string)); + // remove white space + $string = preg_replace('/\s+/', '', $string); + // now return first letter lowercase + return lcfirst($string); + } + // return string + return $string; + } + // not a string + return ''; + } + + public static function htmlEscape($var, $charset = 'UTF-8', $shorten = false, $length = 40) + { + if (self::checkString($var)) + { + $filter = new JFilterInput(); + $string = $filter->clean(html_entity_decode(htmlentities($var, ENT_COMPAT, $charset)), 'HTML'); + if ($shorten) + { + return self::shorten($string,$length); + } + return $string; + } + else + { + return ''; + } + } + + public static function replaceNumbers($string) + { + // set numbers array + $numbers = array(); + // first get all numbers + preg_match_all('!\d+!', $string, $numbers); + // check if we have any numbers + if (isset($numbers[0]) && self::checkArray($numbers[0])) + { + foreach ($numbers[0] as $number) + { + $searchReplace[$number] = self::numberToString((int)$number); + } + // now replace numbers in string + $string = str_replace(array_keys($searchReplace), array_values($searchReplace),$string); + // check if we missed any, strange if we did. + return self::replaceNumbers($string); + } + // return the string with no numbers remaining. + return $string; + } + + /** + * Convert an integer into an English word string + * Thanks to Tom Nicholson + * + * @input an int + * @returns a string + **/ + public static function numberToString($x) + { + $nwords = array( "zero", "one", "two", "three", "four", "five", "six", "seven", + "eight", "nine", "ten", "eleven", "twelve", "thirteen", + "fourteen", "fifteen", "sixteen", "seventeen", "eighteen", + "nineteen", "twenty", 30 => "thirty", 40 => "forty", + 50 => "fifty", 60 => "sixty", 70 => "seventy", 80 => "eighty", + 90 => "ninety" ); + + if(!is_numeric($x)) + { + $w = $x; + } + elseif(fmod($x, 1) != 0) + { + $w = $x; + } + else + { + if($x < 0) + { + $w = 'minus '; + $x = -$x; + } + else + { + $w = ''; + // ... now $x is a non-negative integer. + } + + if($x < 21) // 0 to 20 + { + $w .= $nwords[$x]; + } + elseif($x < 100) // 21 to 99 + { + $w .= $nwords[10 * floor($x/10)]; + $r = fmod($x, 10); + if($r > 0) + { + $w .= ' '. $nwords[$r]; + } + } + elseif($x < 1000) // 100 to 999 + { + $w .= $nwords[floor($x/100)] .' hundred'; + $r = fmod($x, 100); + if($r > 0) + { + $w .= ' and '. self::numberToString($r); + } + } + elseif($x < 1000000) // 1000 to 999999 + { + $w .= self::numberToString(floor($x/1000)) .' thousand'; + $r = fmod($x, 1000); + if($r > 0) + { + $w .= ' '; + if($r < 100) + { + $w .= 'and '; + } + $w .= self::numberToString($r); + } + } + else // millions + { + $w .= self::numberToString(floor($x/1000000)) .' million'; + $r = fmod($x, 1000000); + if($r > 0) + { + $w .= ' '; + if($r < 100) + { + $w .= 'and '; + } + $w .= self::numberToString($r); + } + } + } + return $w; + } + + /** + * Random Key + * + * @returns a string + **/ + public static function randomkey($size) + { + $bag = "abcefghijknopqrstuwxyzABCDDEFGHIJKLLMMNOPQRSTUVVWXYZabcddefghijkllmmnopqrstuvvwxyzABCEFGHIJKNOPQRSTUWXYZ"; + $key = array(); + $bagsize = strlen($bag) - 1; + for ($i = 0; $i < $size; $i++) + { + $get = rand(0, $bagsize); + $key[] = $bag[$get]; + } + return implode($key); + } + + public static function getCryptKey($type, $default = null) + { + if ('basic' === $type) + { + // Get the global params + $params = JComponentHelper::getParams('com_componentbuilder', true); + $basic_key = $params->get('basic_key', $default); + if ($basic_key) + { + return $basic_key; + } + } + return false; + } +} diff --git a/site/helpers/headercheck.php b/site/helpers/headercheck.php new file mode 100644 index 000000000..6236cebdd --- /dev/null +++ b/site/helpers/headercheck.php @@ -0,0 +1,85 @@ + + @copyright Copyright (C) 2015. All Rights Reserved + @license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html + + Builds Complex Joomla Components + +/-----------------------------------------------------------------------------------------------------------------------------*/ + +// No direct access to this file +defined('_JEXEC') or die('Restricted access'); + +class componentbuilderHeaderCheck +{ + function js_loaded($script_name) + { + // UIkit check point + if (strpos($script_name,'uikit') !== false) + { + $app = JFactory::getApplication(); + $getTemplateName = $app->getTemplate('template')->template; + + if (strpos($getTemplateName,'yoo') !== false) + { + return true; + } + } + + $document = JFactory::getDocument(); + $head_data = $document->getHeadData(); + foreach (array_keys($head_data['scripts']) as $script) + { + if (stristr($script, $script_name)) + { + return true; + } + } + + return false; + } + + function css_loaded($script_name) + { + // UIkit check point + if (strpos($script_name,'uikit') !== false) + { + $app = JFactory::getApplication(); + $getTemplateName = $app->getTemplate('template')->template; + + if (strpos($getTemplateName,'yoo') !== false) + { + return true; + } + } + + $document = JFactory::getDocument(); + $head_data = $document->getHeadData(); + + foreach (array_keys($head_data['styleSheets']) as $script) + { + if (stristr($script, $script_name)) + { + return true; + } + } + + return false; + } +} \ No newline at end of file diff --git a/site/helpers/index.html b/site/helpers/index.html new file mode 100644 index 000000000..fa6d84e80 --- /dev/null +++ b/site/helpers/index.html @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/site/helpers/route.php b/site/helpers/route.php new file mode 100644 index 000000000..da287a82d --- /dev/null +++ b/site/helpers/route.php @@ -0,0 +1,262 @@ + + @copyright Copyright (C) 2015. All Rights Reserved + @license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html + + Builds Complex Joomla Components + +/-----------------------------------------------------------------------------------------------------------------------------*/ + +// No direct access to this file +defined('_JEXEC') or die('Restricted access'); + +// Component Helper +jimport('joomla.application.component.helper'); +jimport('joomla.application.categories'); + +/** + * Componentbuilder Route Helper + **/ +abstract class ComponentbuilderHelperRoute +{ + protected static $lookup; + + /** + * @param int The route of the Api + */ + public static function getApiRoute($id = 0, $catid = 0) + { + if ($id > 0) + { + // Initialize the needel array. + $needles = array( + 'api' => array((int) $id) + ); + // Create the link + $link = 'index.php?option=com_componentbuilder&view=api&id='. $id; + } + else + { + // Initialize the needel array. + $needles = array(); + //Create the link but don't add the id. + $link = 'index.php?option=com_componentbuilder&view=api'; + } + if ($catid > 1) + { + $categories = JCategories::getInstance('componentbuilder.api'); + $category = $categories->get($catid); + if ($category) + { + $needles['category'] = array_reverse($category->getPath()); + $needles['categories'] = $needles['category']; + $link .= '&catid='.$catid; + } + } + + if ($item = self::_findItem($needles)) + { + $link .= '&Itemid='.$item; + } + + return $link; + } + + /** + * Get the URL route for componentbuilder category from a category ID and language + * + * @param mixed $catid The id of the items's category either an integer id or a instance of JCategoryNode + * @param mixed $language The id of the language being used. + * + * @return string The link to the contact + * + * @since 1.5 + */ + public static function getCategoryRoute_keep_for_later($catid, $language = 0) + { + if ($catid instanceof JCategoryNode) + { + $id = $catid->id; + $category = $catid; + } + else + { + throw new Exception('First parameter must be JCategoryNode'); + } + + $views = array( + "com_componentbuilder.fields" => "field", + "com_componentbuilder.fieldtypes" => "fieldtype"); + $view = $views[$category->extension]; + + if ($id < 1 || !($category instanceof JCategoryNode)) + { + $link = ''; + } + else + { + //Create the link + $link = 'index.php?option=com_componentbuilder&view='.$view.'&category='.$category->slug; + + $needles = array( + $view => array($id), + 'category' => array($id) + ); + + if ($language && $language != "*" && JLanguageMultilang::isEnabled()) + { + $db = JFactory::getDbo(); + $query = $db->getQuery(true) + ->select('a.sef AS sef') + ->select('a.lang_code AS lang_code') + ->from('#__languages AS a'); + + $db->setQuery($query); + $langs = $db->loadObjectList(); + foreach ($langs as $lang) + { + if ($language == $lang->lang_code) + { + $link .= '&lang='.$lang->sef; + $needles['language'] = $language; + } + } + } + + if ($item = self::_findItem($needles,'category')) + { + + $link .= '&Itemid='.$item; + } + else + { + if ($category) + { + $catids = array_reverse($category->getPath()); + $needles = array( + 'category' => $catids + ); + if ($item = self::_findItem($needles,'category')) + { + $link .= '&Itemid='.$item; + } + elseif ($item = self::_findItem(null, 'category')) + { + $link .= '&Itemid='.$item; + } + } + } + } + return $link; + } + + protected static function _findItem($needles = null,$type = null) + { + $app = JFactory::getApplication(); + $menus = $app->getMenu('site'); + $language = isset($needles['language']) ? $needles['language'] : '*'; + + // Prepare the reverse lookup array. + if (!isset(self::$lookup[$language])) + { + self::$lookup[$language] = array(); + + $component = JComponentHelper::getComponent('com_componentbuilder'); + + $attributes = array('component_id'); + $values = array($component->id); + + if ($language != '*') + { + $attributes[] = 'language'; + $values[] = array($needles['language'], '*'); + } + + $items = $menus->getItems($attributes, $values); + + foreach ($items as $item) + { + if (isset($item->query) && isset($item->query['view'])) + { + $view = $item->query['view']; + + if (!isset(self::$lookup[$language][$view])) + { + self::$lookup[$language][$view] = array(); + } + + if (isset($item->query['id'])) + { + /** + * Here it will become a bit tricky + * language != * can override existing entries + * language == * cannot override existing entries + */ + if (!isset(self::$lookup[$language][$view][$item->query['id']]) || $item->language != '*') + { + self::$lookup[$language][$view][$item->query['id']] = $item->id; + } + } + } + } + } + + if ($needles) + { + foreach ($needles as $view => $ids) + { + if (isset(self::$lookup[$language][$view])) + { + foreach ($ids as $id) + { + if (isset(self::$lookup[$language][$view][(int) $id])) + { + return self::$lookup[$language][$view][(int) $id]; + } + } + } + } + } + + if ($type) + { + // Check if the global menu item has been set. + $params = JComponentHelper::getParams('com_componentbuilder'); + if ($item = $params->get($type.'_menu', 0)) + { + return $item; + } + } + + // Check if the active menuitem matches the requested language + $active = $menus->getActive(); + + if ($active + && $active->component == 'com_componentbuilder' + && ($language == '*' || in_array($active->language, array('*', $language)) || !JLanguageMultilang::isEnabled())) + { + return $active->id; + } + + // If not found, return language specific home link + $default = $menus->getDefault($language); + + return !empty($default->id) ? $default->id : null; + } +} diff --git a/site/index.html b/site/index.html new file mode 100644 index 000000000..fa6d84e80 --- /dev/null +++ b/site/index.html @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/site/language/en-GB/en-GB.com_componentbuilder.ini b/site/language/en-GB/en-GB.com_componentbuilder.ini new file mode 100644 index 000000000..413e48851 --- /dev/null +++ b/site/language/en-GB/en-GB.com_componentbuilder.ini @@ -0,0 +1,53 @@ +COM_COMPONENTBUILDER="Component Builder" +COM_COMPONENTBUILDER_API="Api" +COM_COMPONENTBUILDER_API_DESC="Sync Portal API" +COM_COMPONENTBUILDER_BACKUP_FAILED_PLEASE_TRY_AGAIN_IF_THE_ERROR_CONTINUE_PLEASE_CONTACT_YOUR_SYSTEM_ADMINISTRATOR="Backup failed, please try again. If the error continue, please contact your system administrator." +COM_COMPONENTBUILDER_BACKUP_WAS_DONE_SUCCESSFULLY="Backup was done successfully" +COM_COMPONENTBUILDER_CHECK_YOUR_OWNER_DETAILS_IT_HAS_NOT_BEEN_SET_OPEN_THE_JCB_GLOBAL_OPTIONS_GO_TO_THE_COMPANY_TAB_AND_ADD_THE_CORRECT_COMPANY_DETAILS_THERE="Check your owner details, it has not been set. Open the JCB Global Options, go to the Company tab and add the correct company details there." +COM_COMPONENTBUILDER_COMPANY_S="Company: %s" +COM_COMPONENTBUILDER_COPYRIGHT_S="Copyright: %s" +COM_COMPONENTBUILDER_CREATE_NEW_S="Create New %s" +COM_COMPONENTBUILDER_EDIT_S="Edit %s" +COM_COMPONENTBUILDER_EMAIL_S="Email: %s" +COM_COMPONENTBUILDER_EMAIL_WITH_THE_NEW_KEY_WAS_SEND="Email with the new key was send" +COM_COMPONENTBUILDER_EMCOMPANYEM_BSB="Company: %s" +COM_COMPONENTBUILDER_EMCOPYRIGHTEM_BSB="Copyright: %s" +COM_COMPONENTBUILDER_EMEMAILEM_BSB="Email: %s" +COM_COMPONENTBUILDER_EMLICENSEEM_BSB="License: %s" +COM_COMPONENTBUILDER_EMOWNEREM_BSB="Owner: %s" +COM_COMPONENTBUILDER_EMWEBSITEEM_BSB="Website: %s" +COM_COMPONENTBUILDER_ERROR="Error!" +COM_COMPONENTBUILDER_JOOMLA_COMPONENT_BUILDER_BACKUP_KEY="Joomla Component Builder - Backup Key" +COM_COMPONENTBUILDER_KEY_HAS_NOT_CHANGED="Key has not changed" +COM_COMPONENTBUILDER_LICENSE_S="License: %s" +COM_COMPONENTBUILDER_NEW="New" +COM_COMPONENTBUILDER_NO_KEYS_WERE_FOUND_TO_ADD_AN_EXPORT_KEY_SIMPLY_OPEN_THE_COMPONENT_GO_TO_THE_TAB_CALLED_SETTINGS_BOTTOM_RIGHT_THERE_IS_A_FIELD_CALLED_EXPORT_KEY="No keys were found. To add an export key simply open the component, go to the tab called settings, bottom right there is a field called Export Key." +COM_COMPONENTBUILDER_OWNER_DETAILS_WAS_SET="Owner details was set" +COM_COMPONENTBUILDER_OWNER_S="Owner: %s" +COM_COMPONENTBUILDER_PACKAGE_OWNER_DETAILS="Package Owner Details" +COM_COMPONENTBUILDER_PACKAGE_OWNER_NOT_SET="Package Owner Not Set" +COM_COMPONENTBUILDER_SINCE_THE_OWNER_DETAILS_ARE_DISPLAYED_DURING_BIMPORT_PROCESSB_BEFORE_ADDING_THE_KEY_THIS_WAY_IF_THE_USERDEV_BDOES_NOTB_HAVE_THE_KEY_THEY_CAN_SEE_BWHERE_TO_GET_ITB="Since the owner details are displayed during import process before adding the key, this way if the user/dev does not have the key they can see where to get it." +COM_COMPONENTBUILDER_SINCE_THE_OWNER_DETAILS_ARE_DISPLAYED_DURING_IMPORT_PROCESS_BEFORE_ADDING_THE_KEY_THIS_WAY_IF_THE_USERDEV_DOES_NOT_HAVE_THE_KEY_THEY_CAN_SEE_WHERE_TO_GET_IT="Since the owner details are displayed during import process before adding the key, this way if the user/dev does not have the key they can see where to get it." +COM_COMPONENTBUILDER_THAT_MEANS_ANYONE_WHO_HAS_THIS_PACKAGE_CAN_INSTALL_IT_INTO_JCB_TO_ADD_AN_EXPORT_KEY_SIMPLY_OPEN_THE_COMPONENT_GO_TO_THE_TAB_CALLED_BSETTINGSB_BOTTOM_RIGHT_THERE_IS_A_FIELD_CALLED_BEXPORT_KEYB="That means anyone who has this package can install it into JCB. To add an export key simply open the component, go to the tab called settings, bottom right there is a field called Export Key." +COM_COMPONENTBUILDER_THAT_MEANS_ANYONE_WHO_HAS_THIS_PACKAGE_CAN_INSTALL_IT_INTO_JCB_TO_ADD_AN_EXPORT_KEY_SIMPLY_OPEN_THE_COMPONENT_GO_TO_THE_TAB_CALLED_SETTINGS_BOTTOM_RIGHT_THERE_IS_A_FIELD_CALLED_EXPORT_KEY="That means anyone who has this package can install it into JCB. To add an export key simply open the component, go to the tab called settings, bottom right there is a field called Export Key." +COM_COMPONENTBUILDER_THE_PACKAGE_KEY_IS_CODESCODE="The package key is: %s" +COM_COMPONENTBUILDER_THE_PACKAGE_KEY_IS_S="The package key is: %s" +COM_COMPONENTBUILDER_THIS_PACKAGE_HAS_NO_KEY="This package has no key." +COM_COMPONENTBUILDER_TO_CHANGE_THE_PACKAGE_OWNER_DEFAULTS_OPEN_THE_BJCB_GLOBAL_OPTIONSB_GO_TO_THE_BCOMPANYB_TAB_AND_ADD_THE_CORRECT_COMPANY_DETAILS_THERE="To change the package owner defaults. Open the JCB Global Options, go to the Company tab and add the correct company details there." +COM_COMPONENTBUILDER_TO_CHANGE_THE_PACKAGE_OWNER_DEFAULTS_OPEN_THE_JCB_GLOBAL_OPTIONS_GO_TO_THE_COMPANY_TAB_AND_ADD_THE_CORRECT_COMPANY_DETAILS_THERE="To change the package owner defaults. Open the JCB Global Options, go to the Company tab and add the correct company details there." +COM_COMPONENTBUILDER_WEBSITE_S="Website: %s" +COM_COMPONENTBUILDER_YOUR_DATA_IS_ENCRYPTED_WITH_A_AES_ONE_HUNDRED_AND_TWENTY_EIGHT_BIT_ENCRYPTION_USING_THE_ABOVE_THIRTY_TWO_CHARACTER_KEY_WITHOUT_THIS_KEY_IT_WILL_TAKE_THE_CURRENT_TECHNOLOGY_WITH_A_BRUTE_FORCE_ATTACK_METHOD_MORE_THEN_A_HREFHTTPRANDOMIZECOMHOWLONGTOHACKPASS_TARGET_BLANK_TITLEHOW_LONG_TO_HACK_PASSSEVEN_HUNDRED_ZERO_ZERO_ZERO_ZERO_ZERO_ZERO_ZERO_ZERO_ZERO_ZEROA_YEARS_TO_CRACK_THEORETICALLY_UNLESS_THEY_HAVE_THIS_KEY_ABOVE_SO_DO_KEEP_IT_SAFE="Your data is encrypted with a AES 128 bit encryption using the above 32 character key. Without this key it will take the current technology with a brute force attack method more then 700 000 000 000 000 000 000 000 000 000 000 years to crack theoretically. Unless they have this key above, so do keep it safe." +COM_COMPONENTBUILDER_YOU_SHOULD_ADD_THE_CORRECT_OWNER_DETAILS="You should add the correct owner details." +COM_CONTENT_FIELD_MODIFIED_DESC="The last date this item was modified." +JGLOBAL_FIELD_ID_DESC="Record number in the database." +JGLOBAL_FIELD_ID_LABEL="ID" +JGLOBAL_FIELD_MODIFIED_BY_DESC="The user who did the last modification." +JGLOBAL_FIELD_MODIFIED_BY_LABEL="Modified By" +JGLOBAL_FIELD_MODIFIED_LABEL="Modified Date" +JTOOLBAR_APPLY="Save" +JTOOLBAR_CANCEL="Cancel" +JTOOLBAR_CLOSE="Close" +JTOOLBAR_HELP="Help" +JTOOLBAR_SAVE="Save & Close" +JTOOLBAR_SAVE_AND_NEW="Save & New" +JTOOLBAR_SAVE_AS_COPY="Save as Copy" diff --git a/site/language/en-GB/en-GB.com_componentbuilder.sys.ini b/site/language/en-GB/en-GB.com_componentbuilder.sys.ini new file mode 100644 index 000000000..d00ef7909 --- /dev/null +++ b/site/language/en-GB/en-GB.com_componentbuilder.sys.ini @@ -0,0 +1 @@ +COM_COMPONENTBUILDER="Component Builder" diff --git a/site/language/en-GB/index.html b/site/language/en-GB/index.html new file mode 100644 index 000000000..fa6d84e80 --- /dev/null +++ b/site/language/en-GB/index.html @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/site/language/index.html b/site/language/index.html new file mode 100644 index 000000000..fa6d84e80 --- /dev/null +++ b/site/language/index.html @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/site/layouts/index.html b/site/layouts/index.html new file mode 100644 index 000000000..fa6d84e80 --- /dev/null +++ b/site/layouts/index.html @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/site/models/api.php b/site/models/api.php new file mode 100644 index 000000000..1948e8044 --- /dev/null +++ b/site/models/api.php @@ -0,0 +1,176 @@ + + @copyright Copyright (C) 2015. All Rights Reserved + @license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html + + Builds Complex Joomla Components + +/-----------------------------------------------------------------------------------------------------------------------------*/ + +// No direct access to this file +defined('_JEXEC') or die('Restricted access'); + +// import Joomla modelitem library +jimport('joomla.application.component.modelitem'); + +/** + * Componentbuilder Api Model + */ +class ComponentbuilderModelApi extends JModelItem +{ + /** + * Model context string. + * + * @var string + */ + protected $_context = 'com_componentbuilder.api'; + + /** + * Model user data. + * + * @var strings + */ + protected $user; + protected $userId; + protected $guest; + protected $groups; + protected $levels; + protected $app; + protected $input; + protected $uikitComp; + + /** + * @var object item + */ + protected $item; + + /** + * Method to auto-populate the model state. + * + * Note. Calling getState in this method will result in recursion. + * + * @since 1.6 + * + * @return void + */ + protected function populateState() + { + $this->app = JFactory::getApplication(); + $this->input = $this->app->input; + // Get the itme main id + $id = $this->input->getInt('id', null); + $this->setState('api.id', $id); + + // Load the parameters. + $params = $this->app->getParams(); + $this->setState('params', $params); + parent::populateState(); + } + + /** + * Method to get article data. + * + * @param integer $pk The id of the article. + * + * @return mixed Menu item data object on success, false on failure. + */ + public function getItem($pk = null) + { + $this->user = JFactory::getUser(); + $this->userId = $this->user->get('id'); + $this->guest = $this->user->get('guest'); + $this->groups = $this->user->get('groups'); + $this->authorisedGroups = $this->user->getAuthorisedGroups(); + $this->levels = $this->user->getAuthorisedViewLevels(); + $this->initSet = true; + + $pk = (!empty($pk)) ? $pk : (int) $this->getState('api.id'); + + if ($this->_item === null) + { + $this->_item = array(); + } + + if (!isset($this->_item[$pk])) + { + try + { + // Get a db connection. + $db = JFactory::getDbo(); + + // Create a new query object. + $query = $db->getQuery(true); + + // Get from #__componentbuilder_joomla_component as a + $query->select($db->quoteName( + array('a.ordering'), + array('ordering'))); + $query->from($db->quoteName('#__componentbuilder_joomla_component', 'a')); + + // Reset the query using our newly populated query object. + $db->setQuery($query); + // Load the results as a stdClass object. + $data = $db->loadObject(); + + if (empty($data)) + { + $app = JFactory::getApplication(); + // If no data is found redirect to default page and show warning. + $app->enqueueMessage(JText::_('COM_COMPONENTBUILDER_NOT_FOUND_OR_ACCESS_DENIED'), 'warning'); + $app->redirect(JURI::root()); + return false; + } + + // set data object to item. + $this->_item[$pk] = $data; + } + catch (Exception $e) + { + if ($e->getCode() == 404) + { + // Need to go thru the error handler to allow Redirect to work. + JError::raiseWaring(404, $e->getMessage()); + } + else + { + $this->setError($e); + $this->_item[$pk] = false; + } + } + } + + return $this->_item[$pk]; + } + + + /** + * Get the uikit needed components + * + * @return mixed An array of objects on success. + * + */ + public function getUikitComp() + { + if (isset($this->uikitComp) && ComponentbuilderHelper::checkArray($this->uikitComp)) + { + return $this->uikitComp; + } + return false; + } +} diff --git a/site/models/index.html b/site/models/index.html new file mode 100644 index 000000000..fa6d84e80 --- /dev/null +++ b/site/models/index.html @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/site/router.php b/site/router.php new file mode 100644 index 000000000..0b0649571 --- /dev/null +++ b/site/router.php @@ -0,0 +1,240 @@ + + @copyright Copyright (C) 2015. All Rights Reserved + @license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html + + Builds Complex Joomla Components + +/-----------------------------------------------------------------------------------------------------------------------------*/ + +// No direct access to this file +defined('_JEXEC') or die('Restricted access'); + +/** + * Routing class from com_componentbuilder + * + * @since 3.3 + */ +class ComponentbuilderRouter extends JComponentRouterBase +{ + /** + * Build the route for the com_componentbuilder component + * + * @param array &$query An array of URL arguments + * + * @return array The URL arguments to use to assemble the subsequent URL. + * + * @since 3.3 + */ + public function build(&$query) + { + $segments = array(); + + // Get a menu item based on Itemid or currently active + $params = JComponentHelper::getParams('com_componentbuilder'); + + if (empty($query['Itemid'])) + { + $menuItem = $this->menu->getActive(); + } + else + { + $menuItem = $this->menu->getItem($query['Itemid']); + } + + $mView = (empty($menuItem->query['view'])) ? null : $menuItem->query['view']; + $mId = (empty($menuItem->query['id'])) ? null : $menuItem->query['id']; + + if (isset($query['view'])) + { + $view = $query['view']; + + if (empty($query['Itemid'])) + { + $segments[] = $query['view']; + } + + unset($query['view']); + } + + // Are we dealing with a item that is attached to a menu item? + if (isset($view) && ($mView == $view) and (isset($query['id'])) and ($mId == (int) $query['id'])) + { + unset($query['view']); + unset($query['catid']); + unset($query['id']); + return $segments; + } + + if (isset($view) && isset($query['id']) && ($view === 'api')) + { + if ($mId != (int) $query['id'] || $mView != $view) + { + if (($view === 'api')) + { + $segments[] = $view; + $id = explode(':', $query['id']); + if (count($id) == 2) + { + $segments[] = $id[1]; + } + else + { + $segments[] = $id[0]; + } + } + } + unset($query['id']); + } + + $total = count($segments); + + for ($i = 0; $i < $total; $i++) + { + $segments[$i] = str_replace(':', '-', $segments[$i]); + } + + return $segments; + + } + + /** + * Parse the segments of a URL. + * + * @param array &$segments The segments of the URL to parse. + * + * @return array The URL attributes to be used by the application. + * + * @since 3.3 + */ + public function parse(&$segments) + { + $count = count($segments); + $vars = array(); + + //Handle View and Identifier + switch($segments[0]) + { + case 'api': + $vars['view'] = 'api'; + if (is_numeric($segments[$count-1])) + { + $vars['id'] = (int) $segments[$count-1]; + } + elseif ($segments[$count-1]) + { + $id = $this->getVar('joomla_component', $segments[$count-1], 'alias', 'id'); + if($id) + { + $vars['id'] = $id; + } + } + break; + } + + return $vars; + } + + protected function getVar($table, $where = null, $whereString = null, $what = null, $category = false, $operator = '=', $main = 'componentbuilder') + { + if(!$where || !$what || !$whereString) + { + return false; + } + // Get a db connection. + $db = JFactory::getDbo(); + // Create a new query object. + $query = $db->getQuery(true); + + $query->select($db->quoteName(array($what))); + if ('categories' == $table || 'category' == $table || $category) + { + $getTable = '#__categories'; + $query->from($db->quoteName($getTable)); + } + else + { + // we must check if the table exist (TODO not ideal) + $tables = $db->getTableList(); + $app = JFactory::getApplication(); + $prefix = $app->get('dbprefix'); + $check = $prefix.$main.'_'.$table; + if (in_array($check, $tables)) + { + $getTable = '#__'.$main.'_'.$table; + $query->from($db->quoteName($getTable)); + } + else + { + return false; + } + } + if (is_numeric($where)) + { + return false; + } + elseif ($this->checkString($where)) + { + // we must first check if this table has the column + $columns = $db->getTableColumns($getTable); + if (isset($columns[$whereString])) + { + $query->where($db->quoteName($whereString) . ' '.$operator.' '. $db->quote((string)$where)); + } + else + { + return false; + } + } + else + { + return false; + } + $db->setQuery($query); + $db->execute(); + if ($db->getNumRows()) + { + return $db->loadResult(); + } + return false; + } + + protected function checkString($string) + { + if (isset($string) && is_string($string) && strlen($string) > 0) + { + return true; + } + return false; + } +} + +function ComponentbuilderBuildRoute(&$query) +{ + $router = new ComponentbuilderRouter; + + return $router->build($query); +} + +function ComponentbuilderParseRoute($segments) +{ + $router = new ContentRouter; + + return $router->parse($segments); +} \ No newline at end of file diff --git a/site/views/api/index.html b/site/views/api/index.html new file mode 100644 index 000000000..fa6d84e80 --- /dev/null +++ b/site/views/api/index.html @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/site/views/api/submitbutton.js b/site/views/api/submitbutton.js new file mode 100644 index 000000000..2151e1a73 --- /dev/null +++ b/site/views/api/submitbutton.js @@ -0,0 +1,49 @@ +/*--------------------------------------------------------------------------------------------------------| www.vdm.io |------/ + __ __ _ _____ _ _ __ __ _ _ _ + \ \ / / | | | __ \ | | | | | \/ | | | | | | | + \ \ / /_ _ ___| |_ | | | | _____ _____| | ___ _ __ _ __ ___ ___ _ __ | |_ | \ / | ___| |_| |__ ___ __| | + \ \/ / _` / __| __| | | | |/ _ \ \ / / _ \ |/ _ \| '_ \| '_ ` _ \ / _ \ '_ \| __| | |\/| |/ _ \ __| '_ \ / _ \ / _` | + \ / (_| \__ \ |_ | |__| | __/\ V / __/ | (_) | |_) | | | | | | __/ | | | |_ | | | | __/ |_| | | | (_) | (_| | + \/ \__,_|___/\__| |_____/ \___| \_/ \___|_|\___/| .__/|_| |_| |_|\___|_| |_|\__| |_| |_|\___|\__|_| |_|\___/ \__,_| + | | + |_| +/-------------------------------------------------------------------------------------------------------------------------------/ + + @version 2.4.10 + @build 19th August, 2017 + @created 30th April, 2015 + @package Component Builder + @subpackage submitbutton.js + @author Llewellyn van der Merwe + @copyright Copyright (C) 2015. All Rights Reserved + @license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html + + Builds Complex Joomla Components + +/-----------------------------------------------------------------------------------------------------------------------------*/ + +Joomla.submitbutton = function(task) +{ + if (task == ''){ + return false; + } else { + var isValid=true; + var action = task.split('.'); + if (action[1] != 'cancel' && action[1] != 'close'){ + var forms = $$('form.form-validate'); + for (var i=0;i + @copyright Copyright (C) 2015. All Rights Reserved + @license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html + + Builds Complex Joomla Components + +/-----------------------------------------------------------------------------------------------------------------------------*/ + +// No direct access to this file +defined('_JEXEC') or die('Restricted access'); + +?> + +
      +

      +
      diff --git a/site/views/api/tmpl/index.html b/site/views/api/tmpl/index.html new file mode 100644 index 000000000..fa6d84e80 --- /dev/null +++ b/site/views/api/tmpl/index.html @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/site/views/api/view.html.php b/site/views/api/view.html.php new file mode 100644 index 000000000..e91eeff6d --- /dev/null +++ b/site/views/api/view.html.php @@ -0,0 +1,129 @@ + + @copyright Copyright (C) 2015. All Rights Reserved + @license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html + + Builds Complex Joomla Components + +/-----------------------------------------------------------------------------------------------------------------------------*/ + +// No direct access to this file +defined('_JEXEC') or die('Restricted access'); + +// import Joomla view library +jimport('joomla.application.component.view'); + +/** + * Componentbuilder View class for the Api + */ +class ComponentbuilderViewApi extends JViewLegacy +{ + // Overwriting JView display method + function display($tpl = null) + { + // get combined params of both component and menu + $this->app = JFactory::getApplication(); + $this->params = $this->app->getParams(); + $this->menu = $this->app->getMenu()->getActive(); + // get the user object + $this->user = JFactory::getUser(); + // Initialise variables. + $this->item = $this->get('Item'); + + // Check for errors. + if (count($errors = $this->get('Errors'))) + { + JError::raiseError(500, implode(PHP_EOL, $errors)); + return false; + } + + // Set the toolbar + $this->addToolBar(); + + // set the document + $this->_prepareDocument(); + + parent::display($tpl); + } + + /** + * Prepares the document + */ + protected function _prepareDocument() + { + + // always make sure jquery is loaded. + JHtml::_('jquery.framework'); + // Load the header checker class. + require_once( JPATH_COMPONENT_SITE.'/helpers/headercheck.php' ); + // Initialize the header checker. + $HeaderCheck = new componentbuilderHeaderCheck; + + // Load uikit options. + $uikit = $this->params->get('uikit_load'); + // Set script size. + $size = $this->params->get('uikit_min'); + // Set css style. + $style = $this->params->get('uikit_style'); + + // The uikit css. + if ((!$HeaderCheck->css_loaded('uikit.min') || $uikit == 1) && $uikit != 2 && $uikit != 3) + { + $this->document->addStyleSheet(JURI::root(true) .'/media/com_componentbuilder/uikit/css/uikit'.$style.$size.'.css'); + } + // The uikit js. + if ((!$HeaderCheck->js_loaded('uikit.min') || $uikit == 1) && $uikit != 2 && $uikit != 3) + { + $this->document->addScript(JURI::root(true) .'/media/com_componentbuilder/uikit/js/uikit'.$size.'.js'); + } + // add the document default css file + $this->document->addStyleSheet(JURI::root(true) .'/components/com_componentbuilder/assets/css/api.css'); + } + + /** + * Setting the toolbar + */ + protected function addToolBar() + { + // adding the joomla toolbar to the front + JLoader::register('JToolbarHelper', JPATH_ADMINISTRATOR.'/includes/toolbar.php'); + + // set help url for this view if found + $help_url = ComponentbuilderHelper::getHelpUrl('api'); + if (ComponentbuilderHelper::checkString($help_url)) + { + JToolbarHelper::help('COM_COMPONENTBUILDER_HELP_MANAGER', false, $help_url); + } + // now initiate the toolbar + $this->toolbar = JToolbar::getInstance(); + } + + /** + * Escapes a value for output in a view script. + * + * @param mixed $var The output to escape. + * + * @return mixed The escaped value. + */ + public function escape($var, $sorten = false, $length = 40) + { + // use the helper htmlEscape method instead. + return ComponentbuilderHelper::htmlEscape($var, $this->_charset, $sorten, $length); + } +} diff --git a/site/views/index.html b/site/views/index.html new file mode 100644 index 000000000..fa6d84e80 --- /dev/null +++ b/site/views/index.html @@ -0,0 +1 @@ + \ No newline at end of file