- = JHtml::_('bootstrap.startTabSet', $displayData . '_tab', array('active' => 'vdm-noticeboard')) ?>
- = JHtml::_('bootstrap.addTab', $displayData . '_tab', 'vdm-noticeboard', JText::_('COM_COMPONENTBUILDER_VDM_BOARD', true)) ?>
+
+ = JHtml::_('bootstrap.startTabSet', $displayData['id'] . '_tab', array('active' => $displayData['active'] . '-noticeboard')) ?>
+ = JHtml::_('bootstrap.addTab', $displayData['id'] . '_tab', 'vdm-noticeboard', JText::_('COM_COMPONENTBUILDER_VDM_BOARD', true)) ?>
= JLayoutHelper::render('jcbnoticeboardvdm', null) ?>
-
+
= JHtml::_('bootstrap.endTab'); ?>
- = JHtml::_('bootstrap.addTab', $displayData . '_tab', 'proboard', JText::_('COM_COMPONENTBUILDER_JCB_PRO_BOARD', true)) ?>
+ = JHtml::_('bootstrap.addTab', $displayData['id'] . '_tab', 'pro-noticeboard', JText::_('COM_COMPONENTBUILDER_JCB_PRO_BOARD', true)) ?>
= JLayoutHelper::render('jcbnoticeboardpro', null) ?>
-
+
= ComponentbuilderHelper::getDynamicContent('banner', '728-90') ?>
= JHtml::_('bootstrap.endTab') ?>
= JHtml::_('bootstrap.endTabSet') ?>
diff --git a/admin/models/compiler.php b/admin/models/compiler.php
index c2ead97c4..75e025c42 100644
--- a/admin/models/compiler.php
+++ b/admin/models/compiler.php
@@ -156,6 +156,51 @@ class ComponentbuilderModelCompiler extends JModelList
return $db->loadObjectList();
}
+ public function getCompilerAnimations(&$errorMessage)
+ {
+ // convert error message to array
+ $errorMessage = array();
+ $searchArray = array(
+ // add banners (width - height)
+ 'banner' => array(
+ '728-90',
+ '160-600'
+ ),
+ // The build-gif by size (width - height)
+ 'builder-gif' => array(
+ '480-540'
+ )
+ );
+ // start search, and get
+ foreach ($searchArray as $type => $sizes)
+ {
+ // per size
+ foreach ($sizes as $size)
+ {
+ // get size
+ if (($set_size = ComponentbuilderHelper::getDynamicContentSize($type, $size)) !== 0)
+ {
+ // we loop over all type size artwork
+ for ($target = 1; $target <= $set_size; $target++)
+ {
+ if (!ComponentbuilderHelper::getDynamicContent($type, $size, false, 0, $target))
+ {
+ $errorMessage[] = JText::sprintf('COM_COMPONENTBUILDER_S_S_NUMBER_BSB_COULD_NOT_BE_DOWNLOADED_SUCCESSFULLY_TO_THIS_JOOMLA_INSTALL', $type, $size, $target);
+ }
+ }
+ }
+ }
+ }
+ // check if we had any errors
+ if (ComponentbuilderHelper::checkArray($errorMessage))
+ {
+ // flatten the error message array
+ $errorMessage = implode('
', $errorMessage);
+ return false;
+ }
+ return true;
+ }
+
public function builder($version, $id, $backup, $repo, $addPlaceholders, $debugLinenr, $minify)
{
$set['version'] = $version;
diff --git a/admin/views/compiler/tmpl/default.php b/admin/views/compiler/tmpl/default.php
index dc730b299..9dbaa950c 100644
--- a/admin/views/compiler/tmpl/default.php
+++ b/admin/views/compiler/tmpl/default.php
@@ -21,6 +21,9 @@ JHtml::_('behavior.keepalive');
$this->app->input->set('hidemainmenu', false);
$selectNotice = '
' . JText::_('COM_COMPONENTBUILDER_HI') . ' ' . $this->user->name . '
';
$selectNotice .= '
' . JText::_('COM_COMPONENTBUILDER_PLEASE_SELECT_A_COMPONENT_THAT_YOU_WOULD_LIKE_TO_COMPILE') . '
';
+
+// set the noticeboard options
+$noticeboardOptions = array('vdm', 'pro');
?>
canDo->get('compiler.access')): ?>
= JText::sprintf('COM_COMPONENTBUILDER_S_PLEASE_WAIT', $this->user->name) ?>
-
= JText::_('COM_COMPONENTBUILDER_THIS_MAY_TAKE_A_WHILE_DEPENDING_ON_THE_SIZE_OF_YOUR_PROJECT') ?>
-
= JText::_('COM_COMPONENTBUILDER_THE_COMPONENT') ?> = JText::_('COM_COMPONENTBUILDER_IS_BEING_COMPILED') ?>.
-
= ComponentbuilderHelper::getDynamicContent('builder-gif', '480-540') ?>
+
= JText::_('COM_COMPONENTBUILDER_THIS_MAY_TAKE_A_WHILE_DEPENDING_ON_THE_SIZE_OF_YOUR_PROJECT') ?>
+
= JText::_('COM_COMPONENTBUILDER_THE_COMPONENT') ?> = JText::_('COM_COMPONENTBUILDER_IS_BEING_COMPILED') ?> .
+
= ComponentbuilderHelper::getDynamicContent('builder-gif', $this->builder_gif_size) ?>
- = JLayoutHelper::render('jcbnoticeboardvdm', null) ?>
-
+ = JLayoutHelper::render('jcbnoticeboard' . $noticeboardOptions[array_rand($noticeboardOptions)], null) ?>
+
= ComponentbuilderHelper::getDynamicContent('banner', '728-90') ?>
diff --git a/admin/views/compiler/view.html.php b/admin/views/compiler/view.html.php
index c2e57ab42..356e1a3b3 100644
--- a/admin/views/compiler/view.html.php
+++ b/admin/views/compiler/view.html.php
@@ -37,8 +37,37 @@ class ComponentbuilderViewCompiler extends JViewLegacy
JHtmlSidebar::setAction('index.php?option=com_componentbuilder&view=compiler');
$this->sidebar = JHtmlSidebar::render();
}
- $this->Components = $this->get('Components');
- $this->form = $this->setForm();
+ $this->Components = $this->get('Components');
+ $this->form = $this->setForm();
+ // set the compiler artwork from global settings
+ $this->builder_gif_size = $this->params->get('builder_gif_size', '480-272');
+ // only run these checks if he has access
+ if ($this->canDo->get('compiler.compiler_animations'))
+ {
+ // if the new artwork is not being targeted hide download option of artwork
+ if ('480-540' !== $this->builder_gif_size)
+ {
+ $this->canDo->set('compiler.compiler_animations', false);
+ }
+ // we count of all the files are already there
+ else
+ {
+ // get all the gif files in the gif folder
+ $all_gifs = scandir(JPATH_ROOT . "/administrator/components/com_componentbuilder/assets/images/builder-gif");
+ // check if we have any values
+ if (ComponentbuilderHelper::checkArray($all_gifs))
+ {
+ // count number of files but remove the 2 dot values
+ $num_gifs = count($all_gifs) - 2;
+ // if we have more or the same number of files that are in the array, the we hide the download option
+ if ($num_gifs >= ComponentbuilderHelper::getDynamicContentSize('builder-gif', '480-540'))
+ {
+ $this->canDo->set('compiler.compiler_animations', false);
+ }
+ }
+ }
+ }
+
// We don't need toolbar in the modal window.
if ($this->getLayout() !== 'modal')
@@ -346,6 +375,11 @@ class ComponentbuilderViewCompiler extends JViewLegacy
// add Translate button.
JToolBarHelper::custom('compiler.runTranslator', 'comments-2 custom-button-runtranslator', '', 'COM_COMPONENTBUILDER_TRANSLATE', false);
}
+ if ($this->canDo->get('compiler.compiler_animations'))
+ {
+ // add Compiler Animations button.
+ JToolBarHelper::custom('compiler.getCompilerAnimations', 'download custom-button-getcompileranimations', '', 'COM_COMPONENTBUILDER_COMPILER_ANIMATIONS', false);
+ }
if ($this->canDo->get('compiler.clear_tmp'))
{
// add Clear tmp button.
diff --git a/script.php b/script.php
index c18c09ed3..0eaeece83 100644
--- a/script.php
+++ b/script.php
@@ -6612,7 +6612,7 @@ class com_componentbuilderInstallerScript
$query = $db->getQuery(true);
// Field to update.
$fields = array(
- $db->quoteName('params') . ' = ' . $db->quote('{"autorName":"Llewellyn van der Merwe","autorEmail":"llewellyn@joomlacomponentbuilder.com","subform_layouts":"default","editor":"none","manage_jcb_package_directories":"2","set_browser_storage":"1","storage_time_to_live":"global","add_menu_prefix":"1","menu_prefix":"»","minify":"0","language":"en-GB","percentagelanguageadd":"50","export_language_strings":"1","assets_table_fix":"1","compiler_field_builder_type":"2","field_name_builder":"1","type_name_builder":"1","development_method":"1","expansion":"0","return_options_build":"2","cronjob_backup_type":"1","cronjob_backup_server":"0","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":""}'),
+ $db->quoteName('params') . ' = ' . $db->quote('{"autorName":"Llewellyn van der Merwe","autorEmail":"llewellyn@joomlacomponentbuilder.com","subform_layouts":"default","editor":"none","manage_jcb_package_directories":"2","set_browser_storage":"1","storage_time_to_live":"global","builder_gif_size":"480-540","add_menu_prefix":"1","menu_prefix":"»","minify":"0","language":"en-GB","percentagelanguageadd":"50","export_language_strings":"1","assets_table_fix":"1","compiler_field_builder_type":"2","field_name_builder":"1","type_name_builder":"1","development_method":"1","expansion":"0","return_options_build":"2","cronjob_backup_type":"1","cronjob_backup_server":"0","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.
$conditions = array(
@@ -6629,7 +6629,7 @@ class com_componentbuilderInstallerScript
{
$rule_length = $db->loadResult();
// Check the size of the rules column
- if ($rule_length <= 94240)
+ if ($rule_length <= 94400)
{
// Fix the assets table rules column size
$fix_rules_size = "ALTER TABLE `#__assets` CHANGE `rules` `rules` MEDIUMTEXT NOT NULL COMMENT 'JSON encoded access control. Enlarged to MEDIUMTEXT by JCB';";
diff --git a/site/helpers/componentbuilder.php b/site/helpers/componentbuilder.php
index e7d06c6a3..ee9c3e309 100644
--- a/site/helpers/componentbuilder.php
+++ b/site/helpers/componentbuilder.php
@@ -1980,23 +1980,23 @@ abstract class ComponentbuilderHelper
array(
'url' => 'https://cdn.joomla.org/volunteers/joomla-heart-wide.gif',
'hash' => 'f857e3a38facaeac9eba3cffa912b620',
- 'html' => '