Compare commits

...

4 Commits

398 changed files with 6917 additions and 4800 deletions

View File

@ -1,4 +1,4 @@
# Component Builder (2.2.3)
# Component Builder (2.2.6)
This is a [Joomla 3.x](http://www.joomla.org/) component.
@ -8,7 +8,7 @@ The Component Builder for [Joomla](http://www.joomla.org/) that is highly advanc
Whether you're a seasoned [Joomla](http://www.joomla.org/) developer, or have just started, Component Builder will safe you lots of time and money. A real must have!
You can install it quite easily and with no limitations. On [github](https://github.com/vdm-io/Joomla-Component-Builder/releases) is the latest release (2.2.3) with **ALL** its features and **ALL** concepts totally open-source and free!
You can install it quite easily and with no limitations. On [github](https://github.com/vdm-io/Joomla-Component-Builder/releases) is the latest release (2.2.6) with **ALL** its features and **ALL** concepts totally open-source and free!
Once installed upgrades are quick and easy via the default Joomla upgrade area.
@ -81,7 +81,7 @@ Once installed upgrades are quick and easy via the default Joomla upgrade area.
+ Help View Integration*
+ Training & Help Videos* tutorials in the component included.
[**GET ACCESS NOW!**](https://www.vdm.io/joomla-component-builder#get)
[**GET ACCESS NOW!**](http://vdm.bz/component-builder)
# gitHub Support
@ -100,23 +100,23 @@ Component Builder is mapped as a component in itself on my local development env
# Build Details
+ *Company*: [Vast Development Method](https://www.vdm.io/joomla-component-builder)
+ *Company*: [Vast Development Method](http://vdm.bz/component-builder)
+ *Author*: [Llewellyn van der Merwe](mailto:info@vdm.io)
+ *Name*: [Component Builder](https://www.vdm.io/joomla-component-builder)
+ *Name*: [Component Builder](http://vdm.bz/component-builder)
+ *First Build*: 30th April, 2015
+ *Last Build*: 22nd November, 2016
+ *Version*: 2.2.3
+ *Last Build*: 30th December, 2016
+ *Version*: 2.2.6
+ *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*: **86456**
+ *File count*: **540**
+ *Folder count*: **99**
+ *Line count*: **87155**
+ *File count*: **545**
+ *Folder count*: **100**
> This **component** was build with a Joomla [Automated Component Builder](https://www.vdm.io/joomla-component-builder).
> 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)
## Donations
If you want to support this project, please consider donating:
Come on buy me a coffee :)
* PayPal: pay@vdm.io
* Bitcoin: 3H35PYwikEosvcjxHXGPLS1GufZ4b4iFu3

View File

@ -1,4 +1,4 @@
# Component Builder (2.2.3)
# Component Builder (2.2.6)
This is a [Joomla 3.x](http://www.joomla.org/) component.
@ -8,7 +8,7 @@ The Component Builder for [Joomla](http://www.joomla.org/) that is highly advanc
Whether you're a seasoned [Joomla](http://www.joomla.org/) developer, or have just started, Component Builder will safe you lots of time and money. A real must have!
You can install it quite easily and with no limitations. On [github](https://github.com/vdm-io/Joomla-Component-Builder/releases) is the latest release (2.2.3) with **ALL** its features and **ALL** concepts totally open-source and free!
You can install it quite easily and with no limitations. On [github](https://github.com/vdm-io/Joomla-Component-Builder/releases) is the latest release (2.2.6) with **ALL** its features and **ALL** concepts totally open-source and free!
Once installed upgrades are quick and easy via the default Joomla upgrade area.
@ -81,7 +81,7 @@ Once installed upgrades are quick and easy via the default Joomla upgrade area.
+ Help View Integration*
+ Training & Help Videos* tutorials in the component included.
[**GET ACCESS NOW!**](https://www.vdm.io/joomla-component-builder#get)
[**GET ACCESS NOW!**](http://vdm.bz/component-builder)
# gitHub Support
@ -100,23 +100,23 @@ Component Builder is mapped as a component in itself on my local development env
# Build Details
+ *Company*: [Vast Development Method](https://www.vdm.io/joomla-component-builder)
+ *Company*: [Vast Development Method](http://vdm.bz/component-builder)
+ *Author*: [Llewellyn van der Merwe](mailto:info@vdm.io)
+ *Name*: [Component Builder](https://www.vdm.io/joomla-component-builder)
+ *Name*: [Component Builder](http://vdm.bz/component-builder)
+ *First Build*: 30th April, 2015
+ *Last Build*: 22nd November, 2016
+ *Version*: 2.2.3
+ *Last Build*: 30th December, 2016
+ *Version*: 2.2.6
+ *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*: **86456**
+ *File count*: **540**
+ *Folder count*: **99**
+ *Line count*: **87155**
+ *File count*: **545**
+ *Folder count*: **100**
> This **component** was build with a Joomla [Automated Component Builder](https://www.vdm.io/joomla-component-builder).
> 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)
## Donations
If you want to support this project, please consider donating:
Come on buy me a coffee :)
* PayPal: pay@vdm.io
* Bitcoin: 3H35PYwikEosvcjxHXGPLS1GufZ4b4iFu3

View File

@ -9,12 +9,12 @@
|_|
/-------------------------------------------------------------------------------------------------------------------------------/
@version 2.2.3
@build 22nd November, 2016
@version 2.2.6
@build 30th December, 2016
@created 30th April, 2015
@package Component Builder
@subpackage admin.css
@author Llewellyn van der Merwe <https://www.vdm.io/joomla-component-builder>
@author Llewellyn van der Merwe <http://vdm.bz/component-builder>
@copyright Copyright (C) 2015. All Rights Reserved
@license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html

View File

@ -9,12 +9,12 @@
|_|
/-------------------------------------------------------------------------------------------------------------------------------/
@version 2.2.3
@build 22nd November, 2016
@version 2.2.6
@build 30th December, 2016
@created 30th April, 2015
@package Component Builder
@subpackage admin_view.css
@author Llewellyn van der Merwe <https://www.vdm.io/joomla-component-builder>
@author Llewellyn van der Merwe <http://vdm.bz/component-builder>
@copyright Copyright (C) 2015. All Rights Reserved
@license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html

View File

@ -9,12 +9,12 @@
|_|
/-------------------------------------------------------------------------------------------------------------------------------/
@version 2.2.3
@build 22nd November, 2016
@version 2.2.6
@build 30th December, 2016
@created 30th April, 2015
@package Component Builder
@subpackage admin_views.css
@author Llewellyn van der Merwe <https://www.vdm.io/joomla-component-builder>
@author Llewellyn van der Merwe <http://vdm.bz/component-builder>
@copyright Copyright (C) 2015. All Rights Reserved
@license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html

View File

@ -9,12 +9,12 @@
|_|
/-------------------------------------------------------------------------------------------------------------------------------/
@version 2.2.3
@build 22nd November, 2016
@version 2.2.6
@build 30th December, 2016
@created 30th April, 2015
@package Component Builder
@subpackage component.css
@author Llewellyn van der Merwe <https://www.vdm.io/joomla-component-builder>
@author Llewellyn van der Merwe <http://vdm.bz/component-builder>
@copyright Copyright (C) 2015. All Rights Reserved
@license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html

View File

@ -9,12 +9,12 @@
|_|
/-------------------------------------------------------------------------------------------------------------------------------/
@version 2.2.3
@build 22nd November, 2016
@version 2.2.6
@build 30th December, 2016
@created 30th April, 2015
@package Component Builder
@subpackage components.css
@author Llewellyn van der Merwe <https://www.vdm.io/joomla-component-builder>
@author Llewellyn van der Merwe <http://vdm.bz/component-builder>
@copyright Copyright (C) 2015. All Rights Reserved
@license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html

View File

@ -9,12 +9,12 @@
|_|
/-------------------------------------------------------------------------------------------------------------------------------/
@version 2.2.3
@build 22nd November, 2016
@version 2.2.6
@build 30th December, 2016
@created 30th April, 2015
@package Component Builder
@subpackage custom_admin_view.css
@author Llewellyn van der Merwe <https://www.vdm.io/joomla-component-builder>
@author Llewellyn van der Merwe <http://vdm.bz/component-builder>
@copyright Copyright (C) 2015. All Rights Reserved
@license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html

View File

@ -9,12 +9,12 @@
|_|
/-------------------------------------------------------------------------------------------------------------------------------/
@version 2.2.3
@build 22nd November, 2016
@version 2.2.6
@build 30th December, 2016
@created 30th April, 2015
@package Component Builder
@subpackage custom_admin_views.css
@author Llewellyn van der Merwe <https://www.vdm.io/joomla-component-builder>
@author Llewellyn van der Merwe <http://vdm.bz/component-builder>
@copyright Copyright (C) 2015. All Rights Reserved
@license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html

View File

@ -9,12 +9,12 @@
|_|
/-------------------------------------------------------------------------------------------------------------------------------/
@version 2.2.3
@build 22nd November, 2016
@version 2.2.6
@build 30th December, 2016
@created 30th April, 2015
@package Component Builder
@subpackage dashboard.css
@author Llewellyn van der Merwe <https://www.vdm.io/joomla-component-builder>
@author Llewellyn van der Merwe <http://vdm.bz/component-builder>
@copyright Copyright (C) 2015. All Rights Reserved
@license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html

View File

@ -9,12 +9,12 @@
|_|
/-------------------------------------------------------------------------------------------------------------------------------/
@version 2.2.3
@build 22nd November, 2016
@version 2.2.6
@build 30th December, 2016
@created 30th April, 2015
@package Component Builder
@subpackage dynamic_get.css
@author Llewellyn van der Merwe <https://www.vdm.io/joomla-component-builder>
@author Llewellyn van der Merwe <http://vdm.bz/component-builder>
@copyright Copyright (C) 2015. All Rights Reserved
@license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html

View File

@ -9,12 +9,12 @@
|_|
/-------------------------------------------------------------------------------------------------------------------------------/
@version 2.2.3
@build 22nd November, 2016
@version 2.2.6
@build 30th December, 2016
@created 30th April, 2015
@package Component Builder
@subpackage dynamic_gets.css
@author Llewellyn van der Merwe <https://www.vdm.io/joomla-component-builder>
@author Llewellyn van der Merwe <http://vdm.bz/component-builder>
@copyright Copyright (C) 2015. All Rights Reserved
@license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html

View File

@ -9,12 +9,12 @@
|_|
/-------------------------------------------------------------------------------------------------------------------------------/
@version 2.2.3
@build 22nd November, 2016
@version 2.2.6
@build 30th December, 2016
@created 30th April, 2015
@package Component Builder
@subpackage field.css
@author Llewellyn van der Merwe <https://www.vdm.io/joomla-component-builder>
@author Llewellyn van der Merwe <http://vdm.bz/component-builder>
@copyright Copyright (C) 2015. All Rights Reserved
@license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html

View File

@ -9,12 +9,12 @@
|_|
/-------------------------------------------------------------------------------------------------------------------------------/
@version 2.2.3
@build 22nd November, 2016
@version 2.2.6
@build 30th December, 2016
@created 30th April, 2015
@package Component Builder
@subpackage fields.css
@author Llewellyn van der Merwe <https://www.vdm.io/joomla-component-builder>
@author Llewellyn van der Merwe <http://vdm.bz/component-builder>
@copyright Copyright (C) 2015. All Rights Reserved
@license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html

View File

@ -9,12 +9,12 @@
|_|
/-------------------------------------------------------------------------------------------------------------------------------/
@version 2.2.3
@build 22nd November, 2016
@version 2.2.6
@build 30th December, 2016
@created 30th April, 2015
@package Component Builder
@subpackage fieldtype.css
@author Llewellyn van der Merwe <https://www.vdm.io/joomla-component-builder>
@author Llewellyn van der Merwe <http://vdm.bz/component-builder>
@copyright Copyright (C) 2015. All Rights Reserved
@license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html

View File

@ -9,12 +9,12 @@
|_|
/-------------------------------------------------------------------------------------------------------------------------------/
@version 2.2.3
@build 22nd November, 2016
@version 2.2.6
@build 30th December, 2016
@created 30th April, 2015
@package Component Builder
@subpackage fieldtypes.css
@author Llewellyn van der Merwe <https://www.vdm.io/joomla-component-builder>
@author Llewellyn van der Merwe <http://vdm.bz/component-builder>
@copyright Copyright (C) 2015. All Rights Reserved
@license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html

View File

@ -9,12 +9,12 @@
|_|
/-------------------------------------------------------------------------------------------------------------------------------/
@version 2.2.3
@build 22nd November, 2016
@version 2.2.6
@build 30th December, 2016
@created 30th April, 2015
@package Component Builder
@subpackage help_document.css
@author Llewellyn van der Merwe <https://www.vdm.io/joomla-component-builder>
@author Llewellyn van der Merwe <http://vdm.bz/component-builder>
@copyright Copyright (C) 2015. All Rights Reserved
@license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html

View File

@ -9,12 +9,12 @@
|_|
/-------------------------------------------------------------------------------------------------------------------------------/
@version 2.2.3
@build 22nd November, 2016
@version 2.2.6
@build 30th December, 2016
@created 30th April, 2015
@package Component Builder
@subpackage help_documents.css
@author Llewellyn van der Merwe <https://www.vdm.io/joomla-component-builder>
@author Llewellyn van der Merwe <http://vdm.bz/component-builder>
@copyright Copyright (C) 2015. All Rights Reserved
@license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html

View File

@ -9,12 +9,12 @@
|_|
/-------------------------------------------------------------------------------------------------------------------------------/
@version 2.2.3
@build 22nd November, 2016
@version 2.2.6
@build 30th December, 2016
@created 30th April, 2015
@package Component Builder
@subpackage layout.css
@author Llewellyn van der Merwe <https://www.vdm.io/joomla-component-builder>
@author Llewellyn van der Merwe <http://vdm.bz/component-builder>
@copyright Copyright (C) 2015. All Rights Reserved
@license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html

View File

@ -9,12 +9,12 @@
|_|
/-------------------------------------------------------------------------------------------------------------------------------/
@version 2.2.3
@build 22nd November, 2016
@version 2.2.6
@build 30th December, 2016
@created 30th April, 2015
@package Component Builder
@subpackage layouts.css
@author Llewellyn van der Merwe <https://www.vdm.io/joomla-component-builder>
@author Llewellyn van der Merwe <http://vdm.bz/component-builder>
@copyright Copyright (C) 2015. All Rights Reserved
@license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html

View File

@ -9,12 +9,12 @@
|_|
/-------------------------------------------------------------------------------------------------------------------------------/
@version 2.2.3
@build 22nd November, 2016
@version 2.2.6
@build 30th December, 2016
@created 30th April, 2015
@package Component Builder
@subpackage site_view.css
@author Llewellyn van der Merwe <https://www.vdm.io/joomla-component-builder>
@author Llewellyn van der Merwe <http://vdm.bz/component-builder>
@copyright Copyright (C) 2015. All Rights Reserved
@license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html

View File

@ -9,12 +9,12 @@
|_|
/-------------------------------------------------------------------------------------------------------------------------------/
@version 2.2.3
@build 22nd November, 2016
@version 2.2.6
@build 30th December, 2016
@created 30th April, 2015
@package Component Builder
@subpackage site_views.css
@author Llewellyn van der Merwe <https://www.vdm.io/joomla-component-builder>
@author Llewellyn van der Merwe <http://vdm.bz/component-builder>
@copyright Copyright (C) 2015. All Rights Reserved
@license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html

View File

@ -9,12 +9,12 @@
|_|
/-------------------------------------------------------------------------------------------------------------------------------/
@version 2.2.3
@build 22nd November, 2016
@version 2.2.6
@build 30th December, 2016
@created 30th April, 2015
@package Component Builder
@subpackage snippet.css
@author Llewellyn van der Merwe <https://www.vdm.io/joomla-component-builder>
@author Llewellyn van der Merwe <http://vdm.bz/component-builder>
@copyright Copyright (C) 2015. All Rights Reserved
@license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html

View File

@ -9,12 +9,12 @@
|_|
/-------------------------------------------------------------------------------------------------------------------------------/
@version 2.2.3
@build 22nd November, 2016
@version 2.2.6
@build 30th December, 2016
@created 30th April, 2015
@package Component Builder
@subpackage snippets.css
@author Llewellyn van der Merwe <https://www.vdm.io/joomla-component-builder>
@author Llewellyn van der Merwe <http://vdm.bz/component-builder>
@copyright Copyright (C) 2015. All Rights Reserved
@license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html

View File

@ -9,12 +9,12 @@
|_|
/-------------------------------------------------------------------------------------------------------------------------------/
@version 2.2.3
@build 22nd November, 2016
@version 2.2.6
@build 30th December, 2016
@created 30th April, 2015
@package Component Builder
@subpackage template.css
@author Llewellyn van der Merwe <https://www.vdm.io/joomla-component-builder>
@author Llewellyn van der Merwe <http://vdm.bz/component-builder>
@copyright Copyright (C) 2015. All Rights Reserved
@license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html

View File

@ -9,12 +9,12 @@
|_|
/-------------------------------------------------------------------------------------------------------------------------------/
@version 2.2.3
@build 22nd November, 2016
@version 2.2.6
@build 30th December, 2016
@created 30th April, 2015
@package Component Builder
@subpackage templates.css
@author Llewellyn van der Merwe <https://www.vdm.io/joomla-component-builder>
@author Llewellyn van der Merwe <http://vdm.bz/component-builder>
@copyright Copyright (C) 2015. All Rights Reserved
@license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html

View File

@ -33,7 +33,7 @@ defined('_JEXEC') or die('Restricted access');
* ###Component### component helper.
*/
abstract class ###Component###Helper
{###ADMIN_GLOBAL_EVENT_HELPER### ###CUSTOM_HELPER_SCRIPT###
{###ADMIN_GLOBAL_EVENT_HELPER### ###CUSTOM_HELPER_SCRIPT### ###BOTH_CUSTOM_HELPER_SCRIPT###
/**
* Load the Component xml manifest.
**/
@ -265,7 +265,7 @@ abstract class ###Component###Helper
{
// The record has been set. Check the record permissions.
$permission = $user->authorise($action->name, 'com_###component###.'.$view.'.' . (int) $record->id);
if (!$permission && !is_null($permission))
if (!$permission) // TODO removed && !is_null($permission)
{
if ($action->name == 'core.edit' || $action->name == $view.'.edit')
{
@ -600,10 +600,22 @@ abstract class ###Component###Helper
return false;
}
public static function checkArray($array)
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;

View File

@ -33,7 +33,7 @@ defined('_JEXEC') or die('Restricted access');
* ###Component### component helper
*/
abstract class ###Component###Helper
{###SITE_GLOBAL_EVENT_HELPER### ###SITE_CUSTOM_HELPER_SCRIPT###
{###SITE_GLOBAL_EVENT_HELPER### ###SITE_CUSTOM_HELPER_SCRIPT### ###BOTH_CUSTOM_HELPER_SCRIPT###
public static function jsonToString($value, $sperator = ", ", $table = null)
{
@ -408,7 +408,7 @@ abstract class ###Component###Helper
{
// The record has been set. Check the record permissions.
$permission = $user->authorise($action->name, 'com_###component###.'.$view.'.' . (int) $record->id);
if (!$permission && !is_null($permission))
if (!$permission) // TODO removed && !is_null($permission)
{
if ($action->name == 'core.edit' || $action->name == $view.'.edit')
{
@ -592,10 +592,22 @@ abstract class ###Component###Helper
return false;
}
public static function checkArray($array)
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;

View File

@ -181,7 +181,7 @@ class ###Component###Model###View### extends JModelAdmin
* @since 1.6
*/
protected function prepareTable($table)
{
{###LICENSE_TABLE_LOCKED_CHECK###
$date = JFactory::getDate();
$user = JFactory::getUser();

View File

@ -181,7 +181,7 @@ class ###Component###Model###View### extends JModelAdmin
* @since 1.6
*/
protected function prepareTable($table)
{
{###LICENSE_TABLE_LOCKED_CHECK###
$date = JFactory::getDate();
$user = JFactory::getUser();

View File

@ -99,7 +99,7 @@ class ###Component###Model###SView### extends JModelItem
{
$app = JFactory::getApplication();
$app->enqueueMessage(JText::_('Not authorised!'), 'error');
// redirect away if not a correct (TODO for now we go to default view)
// redirect away if not a correct to cPanel/default view
$app->redirect('index.php?option=com_###component###');
return false;
}

View File

@ -95,16 +95,7 @@ class ###Component###Model###SView### extends JModelItem
*/
public function getItem($pk = null)
{
$this->user = JFactory::getUser();
// check if this user has permission to access item
if (!$this->user->authorise('site.###sview###.access', 'com_###component###'))
{
$app = JFactory::getApplication();
$app->enqueueMessage(JText::_('Not authorised!'), 'error');
// redirect away if not a correct (TODO for now we go to default view)
$app->redirect(JRoute::_('index.php?option=com_###component###&view=###SITE_DEFAULT_VIEW###'));
return false;
}
$this->user = JFactory::getUser();###USER_PERMISSION_CHECK_ACCESS###
$this->userId = $this->user->get('id');
$this->guest = $this->user->get('guest');
$this->groups = $this->user->get('groups');

View File

@ -77,16 +77,7 @@ class ###Component###Model###SViews### extends JModelList
*/
public function getItems()
{
$user = JFactory::getUser();
// check if this user has permission to access items
if (!$user->authorise('site.###sview###.access', 'com_###component###'))
{
$app = JFactory::getApplication();
$app->enqueueMessage(JText::_('Not authorised!'), 'error');
// redirect away if not a correct (TODO for now we go to default view)
$app->redirect(JRoute::_('index.php?option=com_###component###&view=###SITE_DEFAULT_VIEW###'));
return false;
}###LICENSE_LOCKED_CHECK### ###SITE_BEFORE_GET_ITEMS###
$user = JFactory::getUser();###USER_PERMISSION_CHECK_ACCESS### ###LICENSE_LOCKED_CHECK### ###SITE_BEFORE_GET_ITEMS###
// load parent items
$items = parent::getItems();

View File

@ -127,16 +127,10 @@ class ###Component###Router extends JComponentRouterBase
* @since 3.3
*/
public function parse(&$segments)
{
//var_dump($segments);
//$app = JFactory::getApplication();
//$menu = $app->getMenu();
//$item = $menu->getActive();
{
$count = count($segments);
$vars = array();
//var_dump($item->query['view']);
//Handle View and Identifier
switch($segments[0])
{###ROUTER_PARSE_SWITCH###
@ -145,7 +139,7 @@ class ###Component###Router extends JComponentRouterBase
return $vars;
}
protected function getVar($table, $where = null, $whereString = 'user', $what = 'id', $operator = '=', $main = '###component###')
protected function getVar($table, $where = null, $whereString = 'user', $what = 'id', $category = false, $operator = '=', $main = '###component###')
{
if(!$where)
{
@ -157,7 +151,7 @@ class ###Component###Router extends JComponentRouterBase
$query = $db->getQuery(true);
$query->select($db->quoteName(array($what)));
if ('categories' == $table || 'category' == $table)
if ('categories' == $table || 'category' == $table || $category)
{
$query->from($db->quoteName('#__categories'));
}

View File

@ -10,12 +10,12 @@
|_|
/-------------------------------------------------------------------------------------------------------------------------------/
@version 2.2.3
@build 22nd November, 2016
@version 2.2.6
@build 30th December, 2016
@created 30th April, 2015
@package Component Builder
@subpackage componentbuilder.php
@author Llewellyn van der Merwe <https://www.vdm.io/joomla-component-builder>
@author Llewellyn van der Merwe <http://vdm.bz/component-builder>
@copyright Copyright (C) 2015. All Rights Reserved
@license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html

View File

@ -10,12 +10,12 @@
|_|
/-------------------------------------------------------------------------------------------------------------------------------/
@version 2.2.3
@build 22nd November, 2016
@version 2.2.6
@build 30th December, 2016
@created 30th April, 2015
@package Component Builder
@subpackage controller.php
@author Llewellyn van der Merwe <https://www.vdm.io/joomla-component-builder>
@author Llewellyn van der Merwe <http://vdm.bz/component-builder>
@copyright Copyright (C) 2015. All Rights Reserved
@license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html

View File

@ -10,12 +10,12 @@
|_|
/-------------------------------------------------------------------------------------------------------------------------------/
@version 2.2.3
@build 22nd November, 2016
@version 2.2.6
@build 30th December, 2016
@created 30th April, 2015
@package Component Builder
@subpackage admin_view.php
@author Llewellyn van der Merwe <https://www.vdm.io/joomla-component-builder>
@author Llewellyn van der Merwe <http://vdm.bz/component-builder>
@copyright Copyright (C) 2015. All Rights Reserved
@license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html
@ -99,7 +99,7 @@ class ComponentbuilderControllerAdmin_view extends JControllerForm
{
// The record has been set. Check the record permissions.
$permission = $user->authorise('core.edit', 'com_componentbuilder.admin_view.' . (int) $recordId);
if (!$permission && !is_null($permission))
if (!$permission)
{
if ($user->authorise('core.edit.own', 'com_componentbuilder.admin_view.' . $recordId))
{

View File

@ -10,12 +10,12 @@
|_|
/-------------------------------------------------------------------------------------------------------------------------------/
@version 2.2.3
@build 22nd November, 2016
@version 2.2.6
@build 30th December, 2016
@created 30th April, 2015
@package Component Builder
@subpackage admin_views.php
@author Llewellyn van der Merwe <https://www.vdm.io/joomla-component-builder>
@author Llewellyn van der Merwe <http://vdm.bz/component-builder>
@copyright Copyright (C) 2015. All Rights Reserved
@license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html

View File

@ -10,12 +10,12 @@
|_|
/-------------------------------------------------------------------------------------------------------------------------------/
@version 2.2.3
@build 22nd November, 2016
@version 2.2.6
@build 30th December, 2016
@created 30th April, 2015
@package Component Builder
@subpackage ajax.json.php
@author Llewellyn van der Merwe <https://www.vdm.io/joomla-component-builder>
@author Llewellyn van der Merwe <http://vdm.bz/component-builder>
@copyright Copyright (C) 2015. All Rights Reserved
@license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html

View File

@ -10,12 +10,12 @@
|_|
/-------------------------------------------------------------------------------------------------------------------------------/
@version 2.2.3
@build 22nd November, 2016
@version 2.2.6
@build 30th December, 2016
@created 30th April, 2015
@package Component Builder
@subpackage compiler.php
@author Llewellyn van der Merwe <https://www.vdm.io/joomla-component-builder>
@author Llewellyn van der Merwe <http://vdm.bz/component-builder>
@copyright Copyright (C) 2015. All Rights Reserved
@license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html

View File

@ -10,12 +10,12 @@
|_|
/-------------------------------------------------------------------------------------------------------------------------------/
@version 2.2.3
@build 22nd November, 2016
@version 2.2.6
@build 30th December, 2016
@created 30th April, 2015
@package Component Builder
@subpackage component.php
@author Llewellyn van der Merwe <https://www.vdm.io/joomla-component-builder>
@author Llewellyn van der Merwe <http://vdm.bz/component-builder>
@copyright Copyright (C) 2015. All Rights Reserved
@license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html
@ -85,7 +85,7 @@ class ComponentbuilderControllerComponent extends JControllerForm
{
// The record has been set. Check the record permissions.
$permission = $user->authorise('core.edit', 'com_componentbuilder.component.' . (int) $recordId);
if (!$permission && !is_null($permission))
if (!$permission)
{
if ($user->authorise('core.edit.own', 'com_componentbuilder.component.' . $recordId))
{

View File

@ -10,12 +10,12 @@
|_|
/-------------------------------------------------------------------------------------------------------------------------------/
@version 2.2.3
@build 22nd November, 2016
@version 2.2.6
@build 30th December, 2016
@created 30th April, 2015
@package Component Builder
@subpackage componentbuilder.php
@author Llewellyn van der Merwe <https://www.vdm.io/joomla-component-builder>
@author Llewellyn van der Merwe <http://vdm.bz/component-builder>
@copyright Copyright (C) 2015. All Rights Reserved
@license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html

View File

@ -10,12 +10,12 @@
|_|
/-------------------------------------------------------------------------------------------------------------------------------/
@version 2.2.3
@build 22nd November, 2016
@version 2.2.6
@build 30th December, 2016
@created 30th April, 2015
@package Component Builder
@subpackage components.php
@author Llewellyn van der Merwe <https://www.vdm.io/joomla-component-builder>
@author Llewellyn van der Merwe <http://vdm.bz/component-builder>
@copyright Copyright (C) 2015. All Rights Reserved
@license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html

View File

@ -10,12 +10,12 @@
|_|
/-------------------------------------------------------------------------------------------------------------------------------/
@version 2.2.3
@build 22nd November, 2016
@version 2.2.6
@build 30th December, 2016
@created 30th April, 2015
@package Component Builder
@subpackage custom_admin_view.php
@author Llewellyn van der Merwe <https://www.vdm.io/joomla-component-builder>
@author Llewellyn van der Merwe <http://vdm.bz/component-builder>
@copyright Copyright (C) 2015. All Rights Reserved
@license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html
@ -99,7 +99,7 @@ class ComponentbuilderControllerCustom_admin_view extends JControllerForm
{
// The record has been set. Check the record permissions.
$permission = $user->authorise('core.edit', 'com_componentbuilder.custom_admin_view.' . (int) $recordId);
if (!$permission && !is_null($permission))
if (!$permission)
{
if ($user->authorise('core.edit.own', 'com_componentbuilder.custom_admin_view.' . $recordId))
{

View File

@ -10,12 +10,12 @@
|_|
/-------------------------------------------------------------------------------------------------------------------------------/
@version 2.2.3
@build 22nd November, 2016
@version 2.2.6
@build 30th December, 2016
@created 30th April, 2015
@package Component Builder
@subpackage custom_admin_views.php
@author Llewellyn van der Merwe <https://www.vdm.io/joomla-component-builder>
@author Llewellyn van der Merwe <http://vdm.bz/component-builder>
@copyright Copyright (C) 2015. All Rights Reserved
@license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html

View File

@ -10,12 +10,12 @@
|_|
/-------------------------------------------------------------------------------------------------------------------------------/
@version 2.2.3
@build 22nd November, 2016
@version 2.2.6
@build 30th December, 2016
@created 30th April, 2015
@package Component Builder
@subpackage dynamic_get.php
@author Llewellyn van der Merwe <https://www.vdm.io/joomla-component-builder>
@author Llewellyn van der Merwe <http://vdm.bz/component-builder>
@copyright Copyright (C) 2015. All Rights Reserved
@license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html
@ -99,7 +99,7 @@ class ComponentbuilderControllerDynamic_get extends JControllerForm
{
// The record has been set. Check the record permissions.
$permission = $user->authorise('dynamic_get.edit', 'com_componentbuilder.dynamic_get.' . (int) $recordId);
if (!$permission && !is_null($permission))
if (!$permission)
{
if ($user->authorise('dynamic_get.edit.own', 'com_componentbuilder.dynamic_get.' . $recordId))
{

View File

@ -10,12 +10,12 @@
|_|
/-------------------------------------------------------------------------------------------------------------------------------/
@version 2.2.3
@build 22nd November, 2016
@version 2.2.6
@build 30th December, 2016
@created 30th April, 2015
@package Component Builder
@subpackage dynamic_gets.php
@author Llewellyn van der Merwe <https://www.vdm.io/joomla-component-builder>
@author Llewellyn van der Merwe <http://vdm.bz/component-builder>
@copyright Copyright (C) 2015. All Rights Reserved
@license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html

View File

@ -10,12 +10,12 @@
|_|
/-------------------------------------------------------------------------------------------------------------------------------/
@version 2.2.3
@build 22nd November, 2016
@version 2.2.6
@build 30th December, 2016
@created 30th April, 2015
@package Component Builder
@subpackage field.php
@author Llewellyn van der Merwe <https://www.vdm.io/joomla-component-builder>
@author Llewellyn van der Merwe <http://vdm.bz/component-builder>
@copyright Copyright (C) 2015. All Rights Reserved
@license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html
@ -117,7 +117,7 @@ class ComponentbuilderControllerField extends JControllerForm
{
// The record has been set. Check the record permissions.
$permission = $user->authorise('field.edit', 'com_componentbuilder.field.' . (int) $recordId);
if (!$permission && !is_null($permission))
if (!$permission)
{
if ($user->authorise('field.edit.own', 'com_componentbuilder.field.' . $recordId))
{

View File

@ -10,12 +10,12 @@
|_|
/-------------------------------------------------------------------------------------------------------------------------------/
@version 2.2.3
@build 22nd November, 2016
@version 2.2.6
@build 30th December, 2016
@created 30th April, 2015
@package Component Builder
@subpackage fields.php
@author Llewellyn van der Merwe <https://www.vdm.io/joomla-component-builder>
@author Llewellyn van der Merwe <http://vdm.bz/component-builder>
@copyright Copyright (C) 2015. All Rights Reserved
@license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html

View File

@ -10,12 +10,12 @@
|_|
/-------------------------------------------------------------------------------------------------------------------------------/
@version 2.2.3
@build 22nd November, 2016
@version 2.2.6
@build 30th December, 2016
@created 30th April, 2015
@package Component Builder
@subpackage fieldtype.php
@author Llewellyn van der Merwe <https://www.vdm.io/joomla-component-builder>
@author Llewellyn van der Merwe <http://vdm.bz/component-builder>
@copyright Copyright (C) 2015. All Rights Reserved
@license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html
@ -117,7 +117,7 @@ class ComponentbuilderControllerFieldtype extends JControllerForm
{
// The record has been set. Check the record permissions.
$permission = $user->authorise('fieldtype.edit', 'com_componentbuilder.fieldtype.' . (int) $recordId);
if (!$permission && !is_null($permission))
if (!$permission)
{
if ($user->authorise('fieldtype.edit.own', 'com_componentbuilder.fieldtype.' . $recordId))
{

View File

@ -10,12 +10,12 @@
|_|
/-------------------------------------------------------------------------------------------------------------------------------/
@version 2.2.3
@build 22nd November, 2016
@version 2.2.6
@build 30th December, 2016
@created 30th April, 2015
@package Component Builder
@subpackage fieldtypes.php
@author Llewellyn van der Merwe <https://www.vdm.io/joomla-component-builder>
@author Llewellyn van der Merwe <http://vdm.bz/component-builder>
@copyright Copyright (C) 2015. All Rights Reserved
@license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html

View File

@ -10,12 +10,12 @@
|_|
/-------------------------------------------------------------------------------------------------------------------------------/
@version 2.2.3
@build 22nd November, 2016
@version 2.2.6
@build 30th December, 2016
@created 30th April, 2015
@package Component Builder
@subpackage help.php
@author Llewellyn van der Merwe <https://www.vdm.io/joomla-component-builder>
@author Llewellyn van der Merwe <http://vdm.bz/component-builder>
@copyright Copyright (C) 2015. All Rights Reserved
@license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html

View File

@ -10,12 +10,12 @@
|_|
/-------------------------------------------------------------------------------------------------------------------------------/
@version 2.2.3
@build 22nd November, 2016
@version 2.2.6
@build 30th December, 2016
@created 30th April, 2015
@package Component Builder
@subpackage help_document.php
@author Llewellyn van der Merwe <https://www.vdm.io/joomla-component-builder>
@author Llewellyn van der Merwe <http://vdm.bz/component-builder>
@copyright Copyright (C) 2015. All Rights Reserved
@license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html
@ -99,7 +99,7 @@ class ComponentbuilderControllerHelp_document extends JControllerForm
{
// The record has been set. Check the record permissions.
$permission = $user->authorise('help_document.edit', 'com_componentbuilder.help_document.' . (int) $recordId);
if (!$permission && !is_null($permission))
if (!$permission)
{
if ($user->authorise('help_document.edit.own', 'com_componentbuilder.help_document.' . $recordId))
{

View File

@ -10,12 +10,12 @@
|_|
/-------------------------------------------------------------------------------------------------------------------------------/
@version 2.2.3
@build 22nd November, 2016
@version 2.2.6
@build 30th December, 2016
@created 30th April, 2015
@package Component Builder
@subpackage help_documents.php
@author Llewellyn van der Merwe <https://www.vdm.io/joomla-component-builder>
@author Llewellyn van der Merwe <http://vdm.bz/component-builder>
@copyright Copyright (C) 2015. All Rights Reserved
@license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html

View File

@ -10,12 +10,12 @@
|_|
/-------------------------------------------------------------------------------------------------------------------------------/
@version 2.2.3
@build 22nd November, 2016
@version 2.2.6
@build 30th December, 2016
@created 30th April, 2015
@package Component Builder
@subpackage import.php
@author Llewellyn van der Merwe <https://www.vdm.io/joomla-component-builder>
@author Llewellyn van der Merwe <http://vdm.bz/component-builder>
@copyright Copyright (C) 2015. All Rights Reserved
@license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html

View File

@ -10,12 +10,12 @@
|_|
/-------------------------------------------------------------------------------------------------------------------------------/
@version 2.2.3
@build 22nd November, 2016
@version 2.2.6
@build 30th December, 2016
@created 30th April, 2015
@package Component Builder
@subpackage layout.php
@author Llewellyn van der Merwe <https://www.vdm.io/joomla-component-builder>
@author Llewellyn van der Merwe <http://vdm.bz/component-builder>
@copyright Copyright (C) 2015. All Rights Reserved
@license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html
@ -99,7 +99,7 @@ class ComponentbuilderControllerLayout extends JControllerForm
{
// The record has been set. Check the record permissions.
$permission = $user->authorise('core.edit', 'com_componentbuilder.layout.' . (int) $recordId);
if (!$permission && !is_null($permission))
if (!$permission)
{
if ($user->authorise('core.edit.own', 'com_componentbuilder.layout.' . $recordId))
{

View File

@ -10,12 +10,12 @@
|_|
/-------------------------------------------------------------------------------------------------------------------------------/
@version 2.2.3
@build 22nd November, 2016
@version 2.2.6
@build 30th December, 2016
@created 30th April, 2015
@package Component Builder
@subpackage layouts.php
@author Llewellyn van der Merwe <https://www.vdm.io/joomla-component-builder>
@author Llewellyn van der Merwe <http://vdm.bz/component-builder>
@copyright Copyright (C) 2015. All Rights Reserved
@license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html

View File

@ -10,12 +10,12 @@
|_|
/-------------------------------------------------------------------------------------------------------------------------------/
@version 2.2.3
@build 22nd November, 2016
@version 2.2.6
@build 30th December, 2016
@created 30th April, 2015
@package Component Builder
@subpackage site_view.php
@author Llewellyn van der Merwe <https://www.vdm.io/joomla-component-builder>
@author Llewellyn van der Merwe <http://vdm.bz/component-builder>
@copyright Copyright (C) 2015. All Rights Reserved
@license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html
@ -99,7 +99,7 @@ class ComponentbuilderControllerSite_view extends JControllerForm
{
// The record has been set. Check the record permissions.
$permission = $user->authorise('core.edit', 'com_componentbuilder.site_view.' . (int) $recordId);
if (!$permission && !is_null($permission))
if (!$permission)
{
if ($user->authorise('core.edit.own', 'com_componentbuilder.site_view.' . $recordId))
{

View File

@ -10,12 +10,12 @@
|_|
/-------------------------------------------------------------------------------------------------------------------------------/
@version 2.2.3
@build 22nd November, 2016
@version 2.2.6
@build 30th December, 2016
@created 30th April, 2015
@package Component Builder
@subpackage site_views.php
@author Llewellyn van der Merwe <https://www.vdm.io/joomla-component-builder>
@author Llewellyn van der Merwe <http://vdm.bz/component-builder>
@copyright Copyright (C) 2015. All Rights Reserved
@license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html

View File

@ -10,12 +10,12 @@
|_|
/-------------------------------------------------------------------------------------------------------------------------------/
@version 2.2.3
@build 22nd November, 2016
@version 2.2.6
@build 30th December, 2016
@created 30th April, 2015
@package Component Builder
@subpackage snippet.php
@author Llewellyn van der Merwe <https://www.vdm.io/joomla-component-builder>
@author Llewellyn van der Merwe <http://vdm.bz/component-builder>
@copyright Copyright (C) 2015. All Rights Reserved
@license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html
@ -99,7 +99,7 @@ class ComponentbuilderControllerSnippet extends JControllerForm
{
// The record has been set. Check the record permissions.
$permission = $user->authorise('core.edit', 'com_componentbuilder.snippet.' . (int) $recordId);
if (!$permission && !is_null($permission))
if (!$permission)
{
if ($user->authorise('core.edit.own', 'com_componentbuilder.snippet.' . $recordId))
{

View File

@ -10,12 +10,12 @@
|_|
/-------------------------------------------------------------------------------------------------------------------------------/
@version 2.2.3
@build 22nd November, 2016
@version 2.2.6
@build 30th December, 2016
@created 30th April, 2015
@package Component Builder
@subpackage snippets.php
@author Llewellyn van der Merwe <https://www.vdm.io/joomla-component-builder>
@author Llewellyn van der Merwe <http://vdm.bz/component-builder>
@copyright Copyright (C) 2015. All Rights Reserved
@license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html

View File

@ -10,12 +10,12 @@
|_|
/-------------------------------------------------------------------------------------------------------------------------------/
@version 2.2.3
@build 22nd November, 2016
@version 2.2.6
@build 30th December, 2016
@created 30th April, 2015
@package Component Builder
@subpackage template.php
@author Llewellyn van der Merwe <https://www.vdm.io/joomla-component-builder>
@author Llewellyn van der Merwe <http://vdm.bz/component-builder>
@copyright Copyright (C) 2015. All Rights Reserved
@license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html
@ -99,7 +99,7 @@ class ComponentbuilderControllerTemplate extends JControllerForm
{
// The record has been set. Check the record permissions.
$permission = $user->authorise('core.edit', 'com_componentbuilder.template.' . (int) $recordId);
if (!$permission && !is_null($permission))
if (!$permission)
{
if ($user->authorise('core.edit.own', 'com_componentbuilder.template.' . $recordId))
{

View File

@ -10,12 +10,12 @@
|_|
/-------------------------------------------------------------------------------------------------------------------------------/
@version 2.2.3
@build 22nd November, 2016
@version 2.2.6
@build 30th December, 2016
@created 30th April, 2015
@package Component Builder
@subpackage templates.php
@author Llewellyn van der Merwe <https://www.vdm.io/joomla-component-builder>
@author Llewellyn van der Merwe <http://vdm.bz/component-builder>
@copyright Copyright (C) 2015. All Rights Reserved
@license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html

View File

@ -96,6 +96,11 @@ class Dropbox
* the error messages
*/
public $error_summary = array();
/**
* force the update to reset
**/
public $forceReset = false;
/**
* Constructor
@ -116,6 +121,7 @@ class Dropbox
* =============
* $details
* =============
* sourceID
* dropboxOption
* dropboxTarget
* addTypes
@ -217,16 +223,20 @@ class Dropbox
protected function makeGetCall()
{
$query = json_encode($this->query);
$options = array(
'http' => array(
'header' => "Content-Type: application/json\r\n".
"Authorization: Bearer ".$this->oauthToken,
'method' => "POST",
'content' => $query
),
);
'method' => "POST"
),
);
if ($this->checkArray($this->query))
{
$this->query = json_encode($this->query);
}
$options['http']['content'] = $this->query;
$context = stream_context_create($options);
$response = file_get_contents($this->url.$this->domainpath[$this->type], false, $context);
@ -246,8 +256,6 @@ class Dropbox
protected function makeCurlCall()
{
$query = json_encode($this->query);
$headers = array('Authorization: Bearer '. $this->oauthToken,
'Content-Type: application/json'
);
@ -255,7 +263,12 @@ class Dropbox
$ch = curl_init($this->url.$this->domainpath[$this->type]);
curl_setopt($ch, CURLOPT_HTTPHEADER, $headers);
curl_setopt($ch, CURLOPT_POSTFIELDS, $query);
// check if query is set
if ($this->checkArray($this->query))
{
$this->query = json_encode($this->query);
}
curl_setopt($ch, CURLOPT_POSTFIELDS, $this->query);
curl_setopt($ch, CURLOPT_POST, true);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
// curl_setopt($ch, CURLOPT_VERBOSE, 1); // debug
@ -278,6 +291,7 @@ class Dropbox
if (isset($data->error_summary))
{
$this->error_summary[] = $data->error_summary;
$this->forceReset = true;
return false;
}
@ -330,6 +344,7 @@ class Dropbox
$this->error_summary[] = $this->type.'_error';
break;
}
$this->forceReset = true;
return false;
}
@ -338,13 +353,14 @@ class Dropbox
// we need to store the url to DB
if (isset($this->mediaData[$path]))
{
$localListing = array();
$localListing['id'] = 0;
$localListing['name'] = $this->mediaData[$path]['name'];
$localListing['size'] = $this->mediaData[$path]['size'];
$localListing['key'] = $path;
$localListing['url'] = $url;
$localListing['build'] = $this->build;
$localListing = array();
$localListing['id'] = 0;
$localListing['name'] = $this->mediaData[$path]['name'];
$localListing['size'] = $this->mediaData[$path]['size'];
$localListing['key'] = $path;
$localListing['url'] = $url;
$localListing['build'] = $this->build;
$localListing['external_source'] = (int) $this->sourceID;
// free some memory
unset($this->mediaData[$path]);
// check if item already set

View File

@ -69,11 +69,6 @@ class Dropboxupdater
protected $updateInfo;
protected $infoFilePath;
/**
* get the localkey
**/
protected $localkey = false;
/**
* Main dropbox class
**/
@ -302,6 +297,8 @@ class Dropboxupdater
{
// reset config
$this->detailsConfig = array();
// the source ID
$this->detailsConfig['sourceID'] = $this->data->id;
// get the legal files set
$this->detailsConfig['addTypes'] = $this->data->filetypes;
// set other config settings
@ -348,7 +345,7 @@ class Dropboxupdater
protected function setUpdateInfoData()
{
// set the info file name
$fileName = md5($this->fileKey.'info'.$this->localkey);
$fileName = md5($this->fileKey.'info');
// set file path
$this->infoFilePath = JPATH_COMPONENT_SITE.'/helpers/'.$fileName.'.json';
@ -402,7 +399,7 @@ class Dropboxupdater
protected function doUpdate()
{
// we need more then the normal time to run this script 5 minutes at least.
ini_set('max_execution_time', 500);
ini_set('max_execution_time', $this->app_params->get('max_execution_time', 500));
// get data of all the shared links of all target items
if (!$this->dropbox->getFiles($this->data->oauthtoken, $this->data->permissiontype, $this->detailsConfig))
{
@ -412,23 +409,23 @@ class Dropboxupdater
// if this is a manual update, then revoke the token
if ($this->forceUpdate)
{
$this->dropbox->revokeToken($this->data->oauthtoken);
$this->dropbox->revokeToken();
}
return true;
}
protected function resetUpdate()
public function resetUpdate()
{
if ($this->okay)
if ($this->okay || (isset($this->dropbox->forceReset) && $this->dropbox->forceReset))
{
// make sure the update reset
$this->updateInfo->nextupdate = $this->next;
$this->updateInfo->updateactive = false;
$this->updateInfo->updatenow = false;
return $this->saveUpdateInfo();
// store final update
$this->saveUpdateInfo();
}
return false;
return $this->okay;
}
protected function saveJson($data,$filename)

View File

@ -681,6 +681,16 @@ class Get
$this->customScriptBuilder['component_php_admin_event'] = '';
}
unset($component->php_admin_event);
// add_php_helper_both
if ($component->add_php_helper_both == 1)
{
$this->lang = 'both';
$this->customScriptBuilder['component_php_helper_both'] = "\n\n".$this->setCustomContentLang(base64_decode($component->php_helper_both));
}
else
{
$this->customScriptBuilder['component_php_helper_both'] = '';
}
// add_php_helper_site
if ($component->add_php_helper_site == 1)
{
@ -2421,7 +2431,7 @@ class Get
* @return string The unique localkey
*
*/
public function uniquekey($size, $random = false)
public function uniquekey($size, $random = false, $newBag = "vvvvvvvvvvvvvvvvvvv")
{
if ($random)
{
@ -2429,7 +2439,7 @@ class Get
}
else
{
$bag = "vvvvvvvvvvvvvvvvvvv";
$bag = $newBag;
}
$key = array();
$bagsize = strlen($bag) - 1;

View File

@ -118,12 +118,15 @@ class Interpretation extends Fields
{
if ($this->componentData->add_license && $this->componentData->license_type == 3)
{
$_VDM = '_'.ComponentbuilderHelper::safeString($this->uniquekey(10),'U');
// add it to the system
$this->fileContentStatic['###HELPER_SITE_LICENSE_LOCK###'] = $this->setHelperLincenseLock($_VDM,'site');
$this->fileContentStatic['###HELPER_LICENSE_LOCK###'] = $this->setHelperLincenseLock($_VDM,'admin');
$this->fileContentStatic['###LICENSE_LOCKED_INT###'] = $this->setInitLincenseLock($_VDM);
$this->fileContentStatic['###LICENSE_LOCKED_DEFINED###'] = "\n\n".'defined(\''.$_VDM.'\') or die(JText::_(\'NIE_REG_NIE\'));';
if (!isset($this->fileContentStatic['###HELPER_SITE_LICENSE_LOCK###']))
{
$_VDM = '_'.ComponentbuilderHelper::safeString($this->uniquekey(10),'U');
// add it to the system
$this->fileContentStatic['###HELPER_SITE_LICENSE_LOCK###'] = $this->setHelperLincenseLock($_VDM,'site');
$this->fileContentStatic['###HELPER_LICENSE_LOCK###'] = $this->setHelperLincenseLock($_VDM,'admin');
$this->fileContentStatic['###LICENSE_LOCKED_INT###'] = $this->setInitLincenseLock($_VDM);
$this->fileContentStatic['###LICENSE_LOCKED_DEFINED###'] = "\n\n".'defined(\''.$_VDM.'\') or die(JText::_(\'NIE_REG_NIE\'));';
}
}
else
{
@ -138,27 +141,33 @@ class Interpretation extends Fields
/**
* @param $view
*/
public function setLockLicensePer(&$view)
public function setLockLicensePer(&$view, $target)
{
if ($this->componentData->add_license && $this->componentData->license_type == 3)
{
$boolMethod = 'isHonest';
$globalbool = ComponentbuilderHelper::safeString($this->uniquekey(4));
// add it to the system
$this->fileContentDynamic[$view]['###LICENSE_LOCKED_SET_BOOL###'] = $this->setBoolLincenseLock($boolMethod,$globalbool);
$this->fileContentDynamic[$view]['###LICENSE_LOCKED_CHECK###'] = $this->checkStatmentLicenseLocked();
if (!isset($this->fileContentDynamic[$view]['###BOOLMETHOD###']))
{
$boolMethod = 'get'.ComponentbuilderHelper::safeString($this->uniquekey(3, false, 'ddd'), 'W');
$globalbool = 'set'.ComponentbuilderHelper::safeString($this->uniquekey(3), 'W');
// add it to the system
$this->fileContentDynamic[$view]['###LICENSE_LOCKED_SET_BOOL###'] = $this->setBoolLincenseLock($boolMethod,$globalbool);
$this->fileContentDynamic[$view]['###LICENSE_LOCKED_CHECK###'] = $this->checkStatmentLicenseLocked($boolMethod);
$this->fileContentDynamic[$view]['###LICENSE_TABLE_LOCKED_CHECK###'] = $this->checkStatmentLicenseLocked($boolMethod, '$table');
$this->fileContentDynamic[$view]['###BOOLMETHOD###'] = $boolMethod;
}
}
else
{
// don't add it to the system
$this->fileContentDynamic[$view]['###LICENSE_LOCKED_SET_BOOL###'] = '';
$this->fileContentDynamic[$view]['###LICENSE_LOCKED_CHECK###'] = '';
$this->fileContentDynamic[$view]['###LICENSE_TABLE_LOCKED_CHECK###'] = '';
}
}
public function checkStatmentLicenseLocked($boolMethod,$globalbool)
public function checkStatmentLicenseLocked($boolMethod, $thIIS = '$this')
{
$statment[] = "\n\t\tif (!\$this->isHonest())";
$statment[] = "\n\t\tif (!".$thIIS."->".$boolMethod."())";
$statment[] = "\t\t{";
$statment[] = "\t\t\t\$app = JFactory::getApplication();";
$statment[] = "\t\t\t\$app->enqueueMessage(JText::_('NIE_REG_NIE'), 'error');";
@ -172,11 +181,15 @@ class Interpretation extends Fields
public function setBoolLincenseLock($boolMethod,$globalbool)
{
$bool[] = "\n\n\t/**";
$bool[] = "\t* The private bool.";
$bool[] = "\t**/";
$bool[] = "\tprivate $".$globalbool.";";
$bool[] = "\n\t/**";
$bool[] = "\t* Check if this install has a license.";
$bool[] = "\t**/";
$bool[] = "\tpublic function ".$boolMethod."()";
$bool[] = "\t{";
$bool[] = "\t\tif(isset(\$this->".$globalbool."))";
$bool[] = "\t\tif(!empty(\$this->".$globalbool."))";
$bool[] = "\t\t{";
$bool[] = "\t\t\treturn \$this->".$globalbool.";";
$bool[] = "\t\t}";
@ -186,7 +199,7 @@ class Interpretation extends Fields
$bool[] = "\t\tif (\$license_key)";
$bool[] = "\t\t{";
$bool[] = "\t\t\t//".$this->setLine(__LINE__)." load the file";
$bool[] = "\t\t\tJLoader::import( 'vdm', JPATH_COMPONENT_ADMINISTRATOR);";
$bool[] = "\t\t\tJLoader::import( 'vdm', JPATH_ADMINISTRATOR .'/components/com_".$this->fileContentStatic['###component###']."');";
$bool[] = "\t\t\t\$the = new VDM(\$license_key);";
$bool[] = "\t\t\t\$this->".$globalbool." = \$the->_is;";
$bool[] = "\t\t\treturn \$this->".$globalbool.";";
@ -210,7 +223,7 @@ class Interpretation extends Fields
$helper[] = "\t\tif (\$license_key)";
$helper[] = "\t\t{";
$helper[] = "\t\t\t//".$this->setLine(__LINE__)." load the file";
$helper[] = "\t\t\tJLoader::import( 'vdm', JPATH_COMPONENT_ADMINISTRATOR);";
$helper[] = "\t\t\tJLoader::import( 'vdm', JPATH_ADMINISTRATOR .'/components/com_".$this->fileContentStatic['###component###']."');";
$helper[] = "\t\t\t\$the = new VDM(\$license_key);";
$helper[] = "\t\t\treturn \$the->_is;";
$helper[] = "\t\t}";
@ -1326,7 +1339,7 @@ class Interpretation extends Fields
{
if ($array['decode'] == 'json')
{
$if = "\n\t".$tab."\tif (".$this->fileContentStatic['###Component###']."Helper::checkString(".$string."->".$field."))\n\t".$tab."\t{";
$if = "\n\t".$tab."\tif (".$this->fileContentStatic['###Component###']."Helper::checkJson(".$string."->".$field."))\n\t".$tab."\t{";
// json_decode
$decoder = $string."->".$field." = json_decode(".$string."->".$field.", true);";
// TODO Use the type of field to prepare it even more for use in the view
@ -1686,7 +1699,7 @@ class Interpretation extends Fields
* @param $string
* @param string $type
* @return mixed
*/
*/
public function removeAsDot($string, $type = '')
{
if (strpos($string,'.') !== false)
@ -1699,6 +1712,56 @@ class Interpretation extends Fields
}
return $field;
}
/**
* @param type $view
* @param type $type
*/
public function setUserPermissionCheckAccess($view, $type)
{
if (isset($view['access']) && $view['access'] == 1)
{
switch($type)
{
case 1:
$userString = '$this->user';
break;
default:
$userString = '$user';
break;
}
// check that the default and the redirect page is not the same
if ($this->fileContentStatic['###SITE_DEFAULT_VIEW###'] != $view['settings']->code)
{
$redirectMessage = "\t\t\t//".$this->setLine(__LINE__)." redirect away to the default view if no access allowed.";
$redirectString = "JRoute::_('index.php?option=com_".$this->fileContentStatic['###component###']."&view=".$this->fileContentStatic['###SITE_DEFAULT_VIEW###']."')";
}
else
{
$redirectMessage = "\t\t\t//".$this->setLine(__LINE__)." redirect away to the home page if no access allowed.";
$redirectString = 'JURI::root()';
}
$accessCheck[] = "\n\t\t//".$this->setLine(__LINE__)." check if this user has permission to access item";
$accessCheck[] = "\t\tif (!".$userString."->authorise('site.".$view['settings']->code.".access', 'com_".$this->fileContentStatic['###component###']."'))";
$accessCheck[] = "\t\t{";
$accessCheck[] = "\t\t\t\$app = JFactory::getApplication();";
// set lang
$langKeyWord = $this->langPrefix.'_'.ComponentbuilderHelper::safeString('Not authorised to view '.$view['settings']->code.'!','U');
if (!isset($this->langContent['site'][$langKeyWord]))
{
$this->langContent['site'][$langKeyWord] = 'Not authorised to view '.$view['settings']->code.'!';
}
$accessCheck[] = "\t\t\t\$app->enqueueMessage(JText::_('".$langKeyWord."'), 'error');";
$accessCheck[] = $redirectMessage;
$accessCheck[] = "\t\t\t\$app->redirect(".$redirectString.");";
$accessCheck[] = "\t\t\treturn false;";
$accessCheck[] = "\t\t}";
// return the access check
return implode("\n",$accessCheck);
}
return '';
}
/**
* @param $get
@ -1706,7 +1769,7 @@ class Interpretation extends Fields
* @param string $tab
* @param string $type
* @return string
*/
*/
public function setCustomViewGetItem(&$get, &$code, $tab = '', $type = 'main')
{
if (ComponentbuilderHelper::checkObject($get))
@ -1745,7 +1808,16 @@ class Interpretation extends Fields
$getItem .= "\n\t".$tab."\t\t\$app->enqueueMessage(JText::_('".$langKeyWord."'), 'warning');";
if ('site' == $this->target)
{
$getItem .= "\n\t".$tab."\t\t\$app->redirect('index.php?option=com_".$this->fileContentStatic['###component###']."&view=".$this->fileContentStatic['###SITE_DEFAULT_VIEW###']."');";
// check that the default and the redirect page is not the same
if ($this->fileContentStatic['###SITE_DEFAULT_VIEW###'] != $code)
{
$redirectString = "JRoute::_('index.php?option=com_".$this->fileContentStatic['###component###']."&view=".$this->fileContentStatic['###SITE_DEFAULT_VIEW###']."')";
}
else
{
$redirectString = 'JURI::root()';
}
$getItem .= "\n\t".$tab."\t\t\$app->redirect(".$redirectString.");";
}
else
{
@ -2107,7 +2179,7 @@ class Interpretation extends Fields
{
$methods .= "\n\n\t\t//".$this->setLine(__LINE__)." Check if \$" . $default['on_field'] . " is an array with values.";
$methods .= "\n\t\t\$array = \$" . $default['on_field'] . ";";
$methods .= "\n\t\tif (isset(\$array) && ".$this->fileContentStatic['###Component###']."Helper::checkArray(\$array))";
$methods .= "\n\t\tif (isset(\$array) && ".$this->fileContentStatic['###Component###']."Helper::checkArray(\$array, true))";
$methods .= "\n\t\t{";
$methods .= "\n\t\t\t\$query->where('".$get['join_field']." ".$get['operator']." (' . implode(',', \$array) . ')');";
$methods .= "\n\t\t}";
@ -2361,13 +2433,16 @@ class Interpretation extends Fields
$getItem = '';
$this->siteDecrypt['basic'][$code] = false;
$this->siteDecrypt['advanced'][$code] = false;
$Component = $this->fileContentStatic['###Component###'];
if (ComponentbuilderHelper::checkObject($get))
{
$getItem .= "\n\n\t\t//".$this->setLine(__LINE__)." Convert the parameter fields into objects.";
$getItem .= "\n\t\tforeach (\$items as \$nr => &\$item)";
$getItem .= "\n\t\tif (".$Component."Helper::checkArray(\$items))";
$getItem .= "\n\t\t{";
$getItem .= "\n\t\t\t//".$this->setLine(__LINE__)." Always create a slug for sef URL's";
$getItem .= "\n\t\t\t\$item->slug = (isset(\$item->alias)) ? \$item->id.':'.\$item->alias : \$item->id;";
$getItem .= "\n\t\t\tforeach (\$items as \$nr => &\$item)";
$getItem .= "\n\t\t\t{";
$getItem .= "\n\t\t\t\t//".$this->setLine(__LINE__)." Always create a slug for sef URL's";
$getItem .= "\n\t\t\t\t\$item->slug = (isset(\$item->alias) && isset(\$item->id)) ? \$item->id.':'.\$item->alias : \$item->id;";
if (isset($get->main_get) && ComponentbuilderHelper::checkArray($get->main_get))
{
$asBucket = array();
@ -2379,7 +2454,7 @@ class Interpretation extends Fields
if (ComponentbuilderHelper::checkArray($decodeChecker))
{
// set decoding of needed fields
$getItem .= $this->setCustomViewFieldDecode($main_get,$decodeChecker,"\$item",$code,"\t");
$getItem .= $this->setCustomViewFieldDecode($main_get,$decodeChecker,"\$item",$code,"\t\t");
}
}
// also filter fields if needed
@ -2388,7 +2463,7 @@ class Interpretation extends Fields
$decodeFilter = $this->siteFieldDecodeFilter[$this->target][$code][$main_get['key']][$main_get['as']];
if (ComponentbuilderHelper::checkArray($decodeFilter))
{
$getItem .= $this->setCustomViewFieldDecodeFilter($main_get,$decodeFilter,"\$item",'$items[$nr]',$code,"\t");
$getItem .= $this->setCustomViewFieldDecodeFilter($main_get,$decodeFilter,"\$item",'$items[$nr]',$code,"\t\t");
}
}
if (isset($this->siteFieldData['uikit'][$code][$main_get['key']][$main_get['as']]))
@ -2397,25 +2472,26 @@ class Interpretation extends Fields
if (ComponentbuilderHelper::checkArray($uikitChecker))
{
// set uikit checkers on needed fields
$getItem .= $this->setCustomViewFieldUikitChecker($main_get,$uikitChecker,"\$item",$code,"\t");
$getItem .= $this->setCustomViewFieldUikitChecker($main_get,$uikitChecker,"\$item",$code,"\t\t");
}
}
$asBucket[] = $main_get['as'];
}
}
// setup Globals
$getItem .= $this->setCustomViewGlobals($get->global,'$item',$asBucket,"\t");
$getItem .= $this->setCustomViewGlobals($get->global,'$item',$asBucket,"\t\t");
// setup the custom gets that returns multipal values
$getItem .= $this->setCustomViewCustomJoin($get->custom_get,"\$item",$code,$asBucket,"\t");
$getItem .= $this->setCustomViewCustomJoin($get->custom_get,"\$item",$code,$asBucket,"\t\t");
// set calculations
if ($get->addcalculation == 1)
{
$get->php_calculation = (array) explode("\n",$get->php_calculation);
if (ComponentbuilderHelper::checkArray($get->php_calculation))
{
$getItem .= str_replace(array_keys($this->placeholders),array_values($this->placeholders),"\n\t\t\t".implode("\n\t\t\t",$get->php_calculation));
$getItem .= str_replace(array_keys($this->placeholders),array_values($this->placeholders),"\n\t\t\t\t".implode("\n\t\t\t\t",$get->php_calculation));
}
}
$getItem .= "\n\t\t\t}";
$getItem .= "\n\t\t}";
// remove empty foreach
if (strlen($getItem) <= 100)
@ -2426,7 +2502,6 @@ class Interpretation extends Fields
if ($this->siteDecrypt['basic'][$code] || $this->siteDecrypt['advanced'][$code])
{
$Component = $this->fileContentStatic['###Component###'];
$script = '';
if ($this->siteDecrypt['basic'][$code])
{
@ -3979,8 +4054,16 @@ class Interpretation extends Fields
return '';
}
public function routerParseSwitch(&$view)
public function routerParseSwitch(&$view, $viewArray = null)
{
$isCategory = '';
if ($viewArray && ComponentbuilderHelper::checkArray($viewArray))
{
if (isset($viewArray['settings']->main_get->db_table_main) && $viewArray['settings']->main_get->db_table_main == 'categories')
{
$isCategory = ', true'; // TODO we will keep an eye on this....
}
}
// add if tags is added, also for all front item views
if (1)
{
@ -3995,7 +4078,7 @@ class Interpretation extends Fields
$routerSwitch[] = "\t\t\t\t}";
$routerSwitch[] = "\t\t\t\telse";
$routerSwitch[] = "\t\t\t\t{";
$routerSwitch[] = "\t\t\t\t\t\$id = \$this->getVar('".$view."', \$segments[\$count-1], 'alias', 'id');";
$routerSwitch[] = "\t\t\t\t\t\$id = \$this->getVar('".$view."', \$segments[\$count-1], 'alias', 'id'".$isCategory.");";
$routerSwitch[] = "\t\t\t\t\tif(\$id)";
$routerSwitch[] = "\t\t\t\t\t{";
$routerSwitch[] = "\t\t\t\t\t\t\$vars['id'] = \$id;";
@ -4642,7 +4725,7 @@ class Interpretation extends Fields
// check if default field was over written
if (!isset($this->fieldsNames[$view]['id']))
{
$db .= "\n\t`id` int(11) NOT NULL AUTO_INCREMENT,";
$db .= "\n\t`id` INT(11) NOT NULL AUTO_INCREMENT,";
}
$db .= "\n\t`asset_id` INT(255) UNSIGNED NOT NULL DEFAULT '0',";
ksort($fields);
@ -4695,17 +4778,17 @@ class Interpretation extends Fields
// check if default field was over written
if (!isset($this->fieldsNames[$view]['published']))
{
$db .= "\n\t`published` tinyint(1) NOT NULL DEFAULT '1',";
$db .= "\n\t`published` TINYINT(1) NOT NULL DEFAULT '1',";
}
// check if default field was over written
if (!isset($this->fieldsNames[$view]['created_by']))
{
$db .= "\n\t`created_by` int(11) NOT NULL DEFAULT '0',";
$db .= "\n\t`created_by` INT(11) NOT NULL DEFAULT '0',";
}
// check if default field was over written
if (!isset($this->fieldsNames[$view]['modified_by']))
{
$db .= "\n\t`modified_by` int(11) NOT NULL DEFAULT '0',";
$db .= "\n\t`modified_by` INT(11) NOT NULL DEFAULT '0',";
}
// check if default field was over written
if (!isset($this->fieldsNames[$view]['created']))
@ -4720,7 +4803,7 @@ class Interpretation extends Fields
// check if default field was over written
if (!isset($this->fieldsNames[$view]['checked_out']))
{
$db .= "\n\t`checked_out` int(11) NOT NULL,";
$db .= "\n\t`checked_out` INT(11) NOT NULL,";
}
// check if default field was over written
if (!isset($this->fieldsNames[$view]['checked_out_time']))
@ -4730,22 +4813,22 @@ class Interpretation extends Fields
// check if default field was over written
if (!isset($this->fieldsNames[$view]['version']))
{
$db .= "\n\t`version` int(11) NOT NULL DEFAULT '1',";
$db .= "\n\t`version` INT(11) NOT NULL DEFAULT '1',";
}
// check if default field was over written
if (!isset($this->fieldsNames[$view]['hits']))
{
$db .= "\n\t`hits` int(11) NOT NULL DEFAULT '0',";
$db .= "\n\t`hits` INT(11) NOT NULL DEFAULT '0',";
}
// check if view has access
if (isset($this->accessBuilder[$view]) && ComponentbuilderHelper::checkString($this->accessBuilder[$view]))
{
$db .= "\n\t`access` int(11) DEFAULT NULL,";
$db .= "\n\t`access` INT(11) DEFAULT NULL,";
}
// check if default field was over written
if (!isset($this->fieldsNames[$view]['ordering']))
{
$db .= "\n\t`ordering` int(11) NOT NULL DEFAULT '0',";
$db .= "\n\t`ordering` INT(11) NOT NULL DEFAULT '0',";
}
// check if metadata is added to this view
if (isset($this->metadataBuilder[$view]) && ComponentbuilderHelper::checkString($this->metadataBuilder[$view]))
@ -7375,7 +7458,8 @@ class Interpretation extends Fields
$addButton[] = "\t\t\t\$script = array();";
$addButton[] = "\t\t\t\$buttonName = \$this->getAttribute('name');";
$addButton[] = "\t\t\t//".$this->setLine(__LINE__)." get the input from url";
$addButton[] = "\t\t\t\$jinput = JFactory::getApplication()->input;";
$addButton[] = "\t\t\t\$app = JFactory::getApplication();";
$addButton[] = "\t\t\t\$jinput = \$app->input;";
$addButton[] = "\t\t\t//".$this->setLine(__LINE__)." get the view name & id";
$addButton[] = "\t\t\t\$values = \$jinput->getArray(array(";
$addButton[] = "\t\t\t\t'id' => 'int',";
@ -7402,11 +7486,11 @@ class Interpretation extends Fields
// check if the item has permissions.
if ($coreLoad && isset($core['core.create']) && isset($this->permissionBuilder['global'][$core['core.create']]) && ComponentbuilderHelper::checkArray($this->permissionBuilder['global'][$core['core.create']]) && in_array($targetView,$this->permissionBuilder['global'][$core['core.create']]))
{
$addButton[] = "\t\t\tif (\$user->authorise('".$core['core.create']."', 'com_".$this->fileContentStatic['###component###']."'))";
$addButton[] = "\t\t\tif (\$user->authorise('".$core['core.create']."', 'com_".$this->fileContentStatic['###component###']."') && \$app->isAdmin()) // TODO for now only in admin area.";
}
else
{
$addButton[] = "\t\t\tif (\$user->authorise('core.create', 'com_".$this->fileContentStatic['###component###']."'))";
$addButton[] = "\t\t\tif (\$user->authorise('core.create', 'com_".$this->fileContentStatic['###component###']."') && \$app->isAdmin()) // TODO for now only in admin area.";
}
$addButton[] = "\t\t\t{";
$addButton[] = "\t\t\t\t//".$this->setLine(__LINE__)." build Create button";
@ -7423,11 +7507,11 @@ class Interpretation extends Fields
// check if the item has permissions.
if ($coreLoad && isset($core['core.edit']) && isset($this->permissionBuilder['global'][$core['core.edit']]) && ComponentbuilderHelper::checkArray($this->permissionBuilder['global'][$core['core.edit']]) && in_array($targetView,$this->permissionBuilder['global'][$core['core.edit']]))
{
$addButton[] = "\t\t\tif ((\$buttonName == '".$targetView."' || \$buttonName == '".$targetViews."') && \$user->authorise('".$core['core.edit']."', 'com_".$this->fileContentStatic['###component###']."'))";
$addButton[] = "\t\t\tif ((\$buttonName == '".$targetView."' || \$buttonName == '".$targetViews."') && \$user->authorise('".$core['core.edit']."', 'com_".$this->fileContentStatic['###component###']."') && \$app->isAdmin()) // TODO for now only in admin area.";
}
else
{
$addButton[] = "\t\t\tif ((\$buttonName == '".$targetView."' || \$buttonName == '".$targetViews."') && \$user->authorise('core.edit', 'com_".$this->fileContentStatic['###component###']."'))";
$addButton[] = "\t\t\tif ((\$buttonName == '".$targetView."' || \$buttonName == '".$targetViews."') && \$user->authorise('core.edit', 'com_".$this->fileContentStatic['###component###']."') && \$app->isAdmin()) // TODO for now only in admin area.";
}
$addButton[] = "\t\t\t{";
$addButton[] = "\t\t\t\t//".$this->setLine(__LINE__)." build edit button";
@ -9149,7 +9233,7 @@ class Interpretation extends Fields
{
$allow[] = "\t\t\t\$permission = \$user->authorise('core.edit', 'com_".$component.".".$otherView.".' . (int) \$recordId);";
}
$allow[] = "\t\t\tif (!\$permission && !is_null(\$permission))";
$allow[] = "\t\t\tif (!\$permission)";
$allow[] = "\t\t\t{";
// check if the item has permissions.
if ($coreLoad && isset($core['core.edit.own']) && isset($this->permissionBuilder[$core['core.edit.own']]) && ComponentbuilderHelper::checkArray($this->permissionBuilder[$core['core.edit.own']]) && in_array($otherView,$this->permissionBuilder[$core['core.edit.own']]))
@ -9245,7 +9329,7 @@ class Interpretation extends Fields
{
$allow[] = "\t\t\t\$permission = \$user->authorise('core.edit', 'com_".$component.".".$viewName_single.".' . (int) \$recordId);";
}
$allow[] = "\t\t\tif (!\$permission && !is_null(\$permission))";
$allow[] = "\t\t\tif (!\$permission)";
$allow[] = "\t\t\t{";
// check if the item has permissions.
if ($coreLoad && isset($core['core.edit.own']) && isset($this->permissionBuilder[$core['core.edit.own']]) && ComponentbuilderHelper::checkArray($this->permissionBuilder[$core['core.edit.own']]) && in_array($viewName_single,$this->permissionBuilder[$core['core.edit.own']]))
@ -9310,12 +9394,17 @@ class Interpretation extends Fields
$component = ComponentbuilderHelper::safeString($this->componentData->name_code);
// allways load these
$allow = array();
$allow[] = "\t\t//".$this->setLine(__LINE__)." Get the form.";
$allow[] = "\n\t\t//".$this->setLine(__LINE__)." Get the form.";
$allow[] = "\t\t\$form = \$this->loadForm('com_".$component.".".$viewName_single."', '".$viewName_single."', array('control' => 'jform', 'load_data' => \$loadData));";
$allow[] = "\n\t\tif (empty(\$form))";
$allow[] = "\t\t{";
$allow[] = "\t\t\treturn false;";
$allow[] = "\t\t}";
// load license locker
if ($this->componentData->add_license && $this->componentData->license_type == 3 && isset($this->fileContentDynamic[$viewName_single]['###BOOLMETHOD###']))
{
$allow[] = $this->checkStatmentLicenseLocked($this->fileContentDynamic[$viewName_single]['###BOOLMETHOD###']);
}
// setup correct core target
$coreLoad = false;
if (isset($this->permissionCore[$viewName_single]))
@ -11596,6 +11685,7 @@ class Interpretation extends Fields
// these can be added anytime really (but looks best after groups
$this->setUikitConfigFieldsets($lang);
$this->setGooglechartConfigFieldsets($lang);
$this->setEmailHelperConfigFieldsets($lang);
$this->setEncryptionConfigFieldsets($lang);
// these are the coustom settings
$this->setCustomControlConfigFieldsets($lang);
@ -12171,6 +12261,476 @@ for developing fast and powerful web interfaces. For more info visit <a href=\"h
}
public function setEmailHelperConfigFieldsets($lang)
{
if (isset($this->componentData->add_email_helper) && $this->componentData->add_email_helper)
{
// main lang prefix
$lang = $lang.'';
// set main lang string
$this->langContent[$this->lang][$lang.'_MAIL_CONFIGURATION'] = "Mail Configuration";
$this->langContent[$this->lang][$lang.'_DKIM'] = "DKIM";
// start building field set for email helper functions
$this->configFieldSets[] = "\n\t<fieldset";
$this->configFieldSets[] = "\t\tname=\"mail_configuration_custom_config\"";
$this->configFieldSets[] = "\t\tlabel=\"".$lang."_MAIL_CONFIGURATION\">";
// add custom Mail Configurations
if (isset($this->configFieldSetsCustomField['Mail Configuration']) && ComponentbuilderHelper::checkArray($this->configFieldSetsCustomField['Mail Configuration']))
{
$this->configFieldSets[] = implode("\t\t",$this->configFieldSetsCustomField['Mail Configuration']);
unset($this->configFieldSetsCustomField['Mail Configuration']);
}
else
{
// set all the laguage strings
$this->langContent[$this->lang][$lang.'_MAILONLINE_LABEL'] = "Mailer Status";
$this->langContent[$this->lang][$lang.'_MAILONLINE_DESCRIPTION'] = "Warning this will stop all emails from going out.";
$this->langContent[$this->lang][$lang.'_ON'] = "On";
$this->langContent[$this->lang][$lang.'_OFF'] = "Off";
$this->langContent[$this->lang][$lang.'_MAILER_LABEL'] = "Mailer";
$this->langContent[$this->lang][$lang.'_MAILER_DESCRIPTION'] = "Select what mailer you would like to use to send emails.";
$this->langContent[$this->lang][$lang.'_GLOBAL'] = "Global";
$this->langContent[$this->lang][$lang.'_PHP_MAIL'] = "PHP Mail";
$this->langContent[$this->lang][$lang.'_SENDMAIL'] = "Sendmail";
$this->langContent[$this->lang][$lang.'_SMTP'] = "SMTP";
$this->langContent[$this->lang][$lang.'_EMAILFROM_LABEL'] = " From Email";
$this->langContent[$this->lang][$lang.'_EMAILFROM_DESCRIPTION'] = "The global email address that will be used to send system email.";
$this->langContent[$this->lang][$lang.'_EMAILFROM_HINT'] = "Email Address Here";
$this->langContent[$this->lang][$lang.'_FROMNAME_LABEL'] = "From Name";
$this->langContent[$this->lang][$lang.'_FROMNAME_DESCRIPTION'] = "Text displayed in the header &quot;From:&quot; field when sending a site email. Usually the site name.";
$this->langContent[$this->lang][$lang.'_FROMNAME_HINT'] = "From Name Here";
$this->langContent[$this->lang][$lang.'_EMAILREPLY_LABEL'] = " Reply Email";
$this->langContent[$this->lang][$lang.'_EMAILREPLY_DESCRIPTION'] = "The global email address that will be used to set as the reply email. (leave blank for none)";
$this->langContent[$this->lang][$lang.'_EMAILREPLY_HINT'] = "Email Address Here";
$this->langContent[$this->lang][$lang.'_REPLYNAME_LABEL'] = "Reply Name";
$this->langContent[$this->lang][$lang.'_REPLYNAME_DESCRIPTION'] = "Text displayed in the header &quot;Reply To:&quot; field when replying to the site email. Usually the the person that receives the response. (leave blank for none)";
$this->langContent[$this->lang][$lang.'_REPLYNAME_HINT'] = "Reply Name Here";
$this->langContent[$this->lang][$lang.'_SENDMAIL_LABEL'] = "Sendmail Path";
$this->langContent[$this->lang][$lang.'_SENDMAIL_DESCRIPTION'] = "Enter the path to the sendmail program directory on your host server.";
$this->langContent[$this->lang][$lang.'_SENDMAIL_HINT'] = "/usr/sbin/sendmail";
$this->langContent[$this->lang][$lang.'_SMTPAUTH_LABEL'] = "SMTP Authentication";
$this->langContent[$this->lang][$lang.'_SMTPAUTH_DESCRIPTION'] = "Select yes if your SMTP host requires SMTP Authentication.";
$this->langContent[$this->lang][$lang.'_YES'] = "Yes";
$this->langContent[$this->lang][$lang.'_NO'] = "No";
$this->langContent[$this->lang][$lang.'_SMTPSECURE_LABEL'] = "SMTP Security";
$this->langContent[$this->lang][$lang.'_SMTPSECURE_DESCRIPTION'] = "Select the security model that your SMTP server uses.";
$this->langContent[$this->lang][$lang.'_NONE'] = "None";
$this->langContent[$this->lang][$lang.'_SSL'] = "SSL";
$this->langContent[$this->lang][$lang.'_TLS'] = "TLS";
$this->langContent[$this->lang][$lang.'_SMTPPORT_LABEL'] = "SMTP Port";
$this->langContent[$this->lang][$lang.'_SMTPPORT_DESCRIPTION'] = "Enter the port number of your SMTP server. Use 25 for most unsecured servers and 465 for most secure servers.";
$this->langContent[$this->lang][$lang.'_SMTPPORT_HINT'] = "25";
$this->langContent[$this->lang][$lang.'_SMTPUSER_LABEL'] = "SMTP Username";
$this->langContent[$this->lang][$lang.'_SMTPUSER_DESCRIPTION'] = "Enter the username for access to the SMTP host.";
$this->langContent[$this->lang][$lang.'_SMTPUSER_HINT'] = "email@demo.com";
$this->langContent[$this->lang][$lang.'_SMTPPASS_LABEL'] = "SMTP Password";
$this->langContent[$this->lang][$lang.'_SMTPPASS_DESCRIPTION'] = "Enter the password for access to the SMTP host.";
$this->langContent[$this->lang][$lang.'_SMTPHOST_LABEL'] = "SMTP Host";
$this->langContent[$this->lang][$lang.'_SMTPHOST_DESCRIPTION'] = "Enter the name of the SMTP host.";
$this->langContent[$this->lang][$lang.'_SMTPHOST_HINT'] = "localhost";
// set the mailer fields
$this->configFieldSets[] = "\n\t\t<!--".$this->setLine(__LINE__)." Mailonline Field. Type: Radio. (joomla) -->";
$this->configFieldSets[] = "\t\t<field";
$this->configFieldSets[] = "\t\t\ttype=\"radio\"";
$this->configFieldSets[] = "\t\t\tname=\"mailonline\"";
$this->configFieldSets[] = "\t\t\tlabel=\"".$lang."_MAILONLINE_LABEL\"";
$this->configFieldSets[] = "\t\t\tdescription=\"".$lang."_MAILONLINE_DESCRIPTION\"";
$this->configFieldSets[] = "\t\t\tclass=\"btn-group btn-group-yesno\"";
$this->configFieldSets[] = "\t\t\tdefault=\"1\">";
$this->configFieldSets[] = "\t\t\t<!--".$this->setLine(__LINE__)." Option Set. -->";
$this->configFieldSets[] = "\t\t\t<option value=\"1\">";
$this->configFieldSets[] = "\t\t\t\t".$lang."_ON</option>";
$this->configFieldSets[] = "\t\t\t<option value=\"0\">";
$this->configFieldSets[] = "\t\t\t\t".$lang."_OFF</option>";
$this->configFieldSets[] = "\t\t</field>\t\t";
$this->configFieldSets[] = "\t\t<!--".$this->setLine(__LINE__)." Mailer Field. Type: List. (joomla) -->";
$this->configFieldSets[] = "\t\t<field";
$this->configFieldSets[] = "\t\t\ttype=\"list\"";
$this->configFieldSets[] = "\t\t\tname=\"mailer\"";
$this->configFieldSets[] = "\t\t\tlabel=\"".$lang."_MAILER_LABEL\"";
$this->configFieldSets[] = "\t\t\tdescription=\"".$lang."_MAILER_DESCRIPTION\"";
$this->configFieldSets[] = "\t\t\tclass=\"list_class\"";
$this->configFieldSets[] = "\t\t\tmultiple=\"false\"";
$this->configFieldSets[] = "\t\t\tfilter=\"WORD\"";
$this->configFieldSets[] = "\t\t\trequired=\"true\"";
$this->configFieldSets[] = "\t\t\tdefault=\"global\">";
$this->configFieldSets[] = "\t\t\t<!--".$this->setLine(__LINE__)." Option Set. -->";
$this->configFieldSets[] = "\t\t\t<option value=\"global\">";
$this->configFieldSets[] = "\t\t\t\t".$lang."_GLOBAL</option>";
$this->configFieldSets[] = "\t\t\t<option value=\"default\">";
$this->configFieldSets[] = "\t\t\t\t".$lang."_PHP_MAIL</option>";
$this->configFieldSets[] = "\t\t\t<option value=\"sendmail\">";
$this->configFieldSets[] = "\t\t\t\t".$lang."_SENDMAIL</option>";
$this->configFieldSets[] = "\t\t\t<option value=\"smtp\">";
$this->configFieldSets[] = "\t\t\t\t".$lang."_SMTP</option>";
$this->configFieldSets[] = "\t\t</field>\t\t";
$this->configFieldSets[] = "\t\t<!--".$this->setLine(__LINE__)." Emailfrom Field. Type: Text. (joomla) -->";
$this->configFieldSets[] = "\t\t<field";
$this->configFieldSets[] = "\t\t\ttype=\"text\"";
$this->configFieldSets[] = "\t\t\tname=\"emailfrom\"";
$this->configFieldSets[] = "\t\t\tlabel=\"".$lang."_EMAILFROM_LABEL\"";
$this->configFieldSets[] = "\t\t\tsize=\"60\"";
$this->configFieldSets[] = "\t\t\tmaxlength=\"150\"";
$this->configFieldSets[] = "\t\t\tdescription=\"".$lang."_EMAILFROM_DESCRIPTION\"";
$this->configFieldSets[] = "\t\t\tclass=\"text_area\"";
$this->configFieldSets[] = "\t\t\tfilter=\"STRING\"";
$this->configFieldSets[] = "\t\t\tvalidate=\"email\"";
$this->configFieldSets[] = "\t\t\tmessage=\"Error! Please add email address here.\"";
$this->configFieldSets[] = "\t\t\thint=\"".$lang."_EMAILFROM_HINT\"";
$this->configFieldSets[] = "\t\t\tshowon=\"mailer:smtp,sendmail,default\"";
$this->configFieldSets[] = "\t\t/>\t\t";
$this->configFieldSets[] = "\t\t<!--".$this->setLine(__LINE__)." Fromname Field. Type: Text. (joomla) -->";
$this->configFieldSets[] = "\t\t<field";
$this->configFieldSets[] = "\t\t\ttype=\"text\"";
$this->configFieldSets[] = "\t\t\tname=\"fromname\"";
$this->configFieldSets[] = "\t\t\tlabel=\"".$lang."_FROMNAME_LABEL\"";
$this->configFieldSets[] = "\t\t\tsize=\"60\"";
$this->configFieldSets[] = "\t\t\tmaxlength=\"150\"";
$this->configFieldSets[] = "\t\t\tdescription=\"".$lang."_FROMNAME_DESCRIPTION\"";
$this->configFieldSets[] = "\t\t\tclass=\"text_area\"";
$this->configFieldSets[] = "\t\t\tfilter=\"STRING\"";
$this->configFieldSets[] = "\t\t\tmessage=\"Error! Please add some name here.\"";
$this->configFieldSets[] = "\t\t\thint=\"".$lang."_FROMNAME_HINT\"";
$this->configFieldSets[] = "\t\t\tshowon=\"mailer:smtp,sendmail,default\"";
$this->configFieldSets[] = "\t\t/>\t\t";
$this->configFieldSets[] = "\t\t<!--".$this->setLine(__LINE__)." Emailreply Field. Type: Text. (joomla) -->";
$this->configFieldSets[] = "\t\t<field";
$this->configFieldSets[] = "\t\t\ttype=\"text\"";
$this->configFieldSets[] = "\t\t\tname=\"emailreply\"";
$this->configFieldSets[] = "\t\t\tlabel=\"".$lang."_EMAILREPLY_LABEL\"";
$this->configFieldSets[] = "\t\t\tsize=\"60\"";
$this->configFieldSets[] = "\t\t\tmaxlength=\"150\"";
$this->configFieldSets[] = "\t\t\tdescription=\"".$lang."_EMAILREPLY_DESCRIPTION\"";
$this->configFieldSets[] = "\t\t\tclass=\"text_area\"";
$this->configFieldSets[] = "\t\t\tfilter=\"STRING\"";
$this->configFieldSets[] = "\t\t\tvalidate=\"email\"";
$this->configFieldSets[] = "\t\t\tmessage=\"Error! Please add email address here.\"";
$this->configFieldSets[] = "\t\t\thint=\"".$lang."_EMAILREPLY_HINT\"";
$this->configFieldSets[] = "\t\t\tshowon=\"mailer:smtp,sendmail,default\"";
$this->configFieldSets[] = "\t\t/>\t\t";
$this->configFieldSets[] = "\t\t<!--".$this->setLine(__LINE__)." Replyname Field. Type: Text. (joomla) -->";
$this->configFieldSets[] = "\t\t<field";
$this->configFieldSets[] = "\t\t\ttype=\"text\"";
$this->configFieldSets[] = "\t\t\tname=\"replyname\"";
$this->configFieldSets[] = "\t\t\tlabel=\"".$lang."_REPLYNAME_LABEL\"";
$this->configFieldSets[] = "\t\t\tsize=\"60\"";
$this->configFieldSets[] = "\t\t\tmaxlength=\"150\"";
$this->configFieldSets[] = "\t\t\tdescription=\"".$lang."_REPLYNAME_DESCRIPTION\"";
$this->configFieldSets[] = "\t\t\tclass=\"text_area\"";
$this->configFieldSets[] = "\t\t\tfilter=\"STRING\"";
$this->configFieldSets[] = "\t\t\tmessage=\"Error! Please add some name here.\"";
$this->configFieldSets[] = "\t\t\thint=\"".$lang."_REPLYNAME_HINT\"";
$this->configFieldSets[] = "\t\t\tshowon=\"mailer:smtp,sendmail,default\"";
$this->configFieldSets[] = "\t\t/>\t\t";
$this->configFieldSets[] = "\t\t<!--".$this->setLine(__LINE__)." Sendmail Field. Type: Text. (joomla) -->";
$this->configFieldSets[] = "\t\t<field";
$this->configFieldSets[] = "\t\t\ttype=\"text\"";
$this->configFieldSets[] = "\t\t\tname=\"sendmail\"";
$this->configFieldSets[] = "\t\t\tlabel=\"".$lang."_SENDMAIL_LABEL\"";
$this->configFieldSets[] = "\t\t\tsize=\"60\"";
$this->configFieldSets[] = "\t\t\tmaxlength=\"150\"";
$this->configFieldSets[] = "\t\t\tdescription=\"".$lang."_SENDMAIL_DESCRIPTION\"";
$this->configFieldSets[] = "\t\t\tclass=\"text_area\"";
$this->configFieldSets[] = "\t\t\trequired=\"false\"";
$this->configFieldSets[] = "\t\t\tfilter=\"PATH\"";
$this->configFieldSets[] = "\t\t\tmessage=\"Error! Please add path to you local sendmail here.\"";
$this->configFieldSets[] = "\t\t\thint=\"".$lang."_SENDMAIL_HINT\"";
$this->configFieldSets[] = "\t\t\tshowon=\"mailer:sendmail\"";
$this->configFieldSets[] = "\t\t/>\t\t";
$this->configFieldSets[] = "\t\t<!--".$this->setLine(__LINE__)." Smtpauth Field. Type: Radio. (joomla) -->";
$this->configFieldSets[] = "\t\t<field";
$this->configFieldSets[] = "\t\t\ttype=\"radio\"";
$this->configFieldSets[] = "\t\t\tname=\"smtpauth\"";
$this->configFieldSets[] = "\t\t\tlabel=\"".$lang."_SMTPAUTH_LABEL\"";
$this->configFieldSets[] = "\t\t\tdescription=\"".$lang."_SMTPAUTH_DESCRIPTION\"";
$this->configFieldSets[] = "\t\t\tclass=\"btn-group btn-group-yesno\"";
$this->configFieldSets[] = "\t\t\tdefault=\"0\"";
$this->configFieldSets[] = "\t\t\tshowon=\"mailer:smtp\">";
$this->configFieldSets[] = "\t\t\t<!--".$this->setLine(__LINE__)." Option Set. -->";
$this->configFieldSets[] = "\t\t\t<option value=\"1\">";
$this->configFieldSets[] = "\t\t\t\t".$lang."_YES</option>";
$this->configFieldSets[] = "\t\t\t<option value=\"0\">";
$this->configFieldSets[] = "\t\t\t\t".$lang."_NO</option>";
$this->configFieldSets[] = "\t\t</field>\t\t";
$this->configFieldSets[] = "\t\t<!--".$this->setLine(__LINE__)." Smtpsecure Field. Type: List. (joomla) -->";
$this->configFieldSets[] = "\t\t<field";
$this->configFieldSets[] = "\t\t\ttype=\"list\"";
$this->configFieldSets[] = "\t\t\tname=\"smtpsecure\"";
$this->configFieldSets[] = "\t\t\tlabel=\"".$lang."_SMTPSECURE_LABEL\"";
$this->configFieldSets[] = "\t\t\tdescription=\"".$lang."_SMTPSECURE_DESCRIPTION\"";
$this->configFieldSets[] = "\t\t\tclass=\"list_class\"";
$this->configFieldSets[] = "\t\t\tmultiple=\"false\"";
$this->configFieldSets[] = "\t\t\tfilter=\"WORD\"";
$this->configFieldSets[] = "\t\t\tdefault=\"none\"";
$this->configFieldSets[] = "\t\t\tshowon=\"mailer:smtp\">";
$this->configFieldSets[] = "\t\t\t<!--".$this->setLine(__LINE__)." Option Set. -->";
$this->configFieldSets[] = "\t\t\t<option value=\"none\">";
$this->configFieldSets[] = "\t\t\t\t".$lang."_NONE</option>";
$this->configFieldSets[] = "\t\t\t<option value=\"ssl\">";
$this->configFieldSets[] = "\t\t\t\t".$lang."_SSL</option>";
$this->configFieldSets[] = "\t\t\t<option value=\"tls\">";
$this->configFieldSets[] = "\t\t\t\t".$lang."_TLS</option>";
$this->configFieldSets[] = "\t\t</field>\t\t";
$this->configFieldSets[] = "\t\t<!--".$this->setLine(__LINE__)." Smtpport Field. Type: Text. (joomla) -->";
$this->configFieldSets[] = "\t\t<field";
$this->configFieldSets[] = "\t\t\ttype=\"text\"";
$this->configFieldSets[] = "\t\t\tname=\"smtpport\"";
$this->configFieldSets[] = "\t\t\tlabel=\"".$lang."_SMTPPORT_LABEL\"";
$this->configFieldSets[] = "\t\t\tsize=\"60\"";
$this->configFieldSets[] = "\t\t\tmaxlength=\"150\"";
$this->configFieldSets[] = "\t\t\tdefault=\"25\"";
$this->configFieldSets[] = "\t\t\tdescription=\"".$lang."_SMTPPORT_DESCRIPTION\"";
$this->configFieldSets[] = "\t\t\tclass=\"text_area\"";
$this->configFieldSets[] = "\t\t\tfilter=\"INT\"";
$this->configFieldSets[] = "\t\t\tmessage=\"Error! Please add the port number of your SMTP server here.\"";
$this->configFieldSets[] = "\t\t\thint=\"".$lang."_SMTPPORT_HINT\"";
$this->configFieldSets[] = "\t\t\tshowon=\"mailer:smtp\"";
$this->configFieldSets[] = "\t\t/>\t\t";
$this->configFieldSets[] = "\t\t<!--".$this->setLine(__LINE__)." Smtpuser Field. Type: Text. (joomla) -->";
$this->configFieldSets[] = "\t\t<field";
$this->configFieldSets[] = "\t\t\ttype=\"text\"";
$this->configFieldSets[] = "\t\t\tname=\"smtpuser\"";
$this->configFieldSets[] = "\t\t\tlabel=\"".$lang."_SMTPUSER_LABEL\"";
$this->configFieldSets[] = "\t\t\tsize=\"60\"";
$this->configFieldSets[] = "\t\t\tmaxlength=\"150\"";
$this->configFieldSets[] = "\t\t\tdescription=\"".$lang."_SMTPUSER_DESCRIPTION\"";
$this->configFieldSets[] = "\t\t\tclass=\"text_area\"";
$this->configFieldSets[] = "\t\t\tfilter=\"STRING\"";
$this->configFieldSets[] = "\t\t\tmessage=\"Error! Please add the username for SMTP server here.\"";
$this->configFieldSets[] = "\t\t\thint=\"".$lang."_SMTPUSER_HINT\"";
$this->configFieldSets[] = "\t\t\tshowon=\"mailer:smtp\"";
$this->configFieldSets[] = "\t\t/>\t\t";
$this->configFieldSets[] = "\t\t<!--".$this->setLine(__LINE__)." Smtppass Field. Type: Password. (joomla) -->";
$this->configFieldSets[] = "\t\t<field";
$this->configFieldSets[] = "\t\t\ttype=\"password\"";
$this->configFieldSets[] = "\t\t\tname=\"smtppass\"";
$this->configFieldSets[] = "\t\t\tlabel=\"".$lang."_SMTPPASS_LABEL\"";
$this->configFieldSets[] = "\t\t\tsize=\"60\"";
$this->configFieldSets[] = "\t\t\tdescription=\"".$lang."_SMTPPASS_DESCRIPTION\"";
$this->configFieldSets[] = "\t\t\tclass=\"text_area\"";
$this->configFieldSets[] = "\t\t\tfilter=\"raw\"";
$this->configFieldSets[] = "\t\t\tmessage=\"Error! Please add the password for SMTP server here.\"";
$this->configFieldSets[] = "\t\t\tshowon=\"mailer:smtp\"";
$this->configFieldSets[] = "\t\t/>\t\t";
$this->configFieldSets[] = "\t\t<!--".$this->setLine(__LINE__)." Smtphost Field. Type: Text. (joomla) -->";
$this->configFieldSets[] = "\t\t<field";
$this->configFieldSets[] = "\t\t\ttype=\"text\"";
$this->configFieldSets[] = "\t\t\tname=\"smtphost\"";
$this->configFieldSets[] = "\t\t\tlabel=\"".$lang."_SMTPHOST_LABEL\"";
$this->configFieldSets[] = "\t\t\tsize=\"60\"";
$this->configFieldSets[] = "\t\t\tmaxlength=\"150\"";
$this->configFieldSets[] = "\t\t\tdefault=\"localhost\"";
$this->configFieldSets[] = "\t\t\tdescription=\"".$lang."_SMTPHOST_DESCRIPTION\"";
$this->configFieldSets[] = "\t\t\tclass=\"text_area\"";
$this->configFieldSets[] = "\t\t\tfilter=\"STRING\"";
$this->configFieldSets[] = "\t\t\tmessage=\"Error! Please add the name of the SMTP host here.\"";
$this->configFieldSets[] = "\t\t\thint=\"".$lang."_SMTPHOST_HINT\"";
$this->configFieldSets[] = "\t\t\tshowon=\"mailer:smtp\"";
$this->configFieldSets[] = "\t\t/>";
}
// close that fieldset
$this->configFieldSets[] = "\t</fieldset>";
// start dkim field set
$this->configFieldSets[] = "\t<fieldset";
$this->configFieldSets[] = "\t\tname=\"dkim_custom_config\"";
$this->configFieldSets[] = "\t\tlabel=\"".$lang."_DKIM\">";
// add custom DKIM fields
if (isset($this->configFieldSetsCustomField['DKIM']) && ComponentbuilderHelper::checkArray($this->configFieldSetsCustomField['DKIM']))
{
$this->configFieldSets[] = implode("\t\t",$this->configFieldSetsCustomField['DKIM']);
unset($this->configFieldSetsCustomField['DKIM']);
}
else
{
$this->langContent[$this->lang][$lang.'_DKIM_LABEL'] = "Enable DKIM";
$this->langContent[$this->lang][$lang.'_DKIM_DESCRIPTION'] = "Set this option to Yes if you want to sign your emails using DKIM.";
$this->langContent[$this->lang][$lang.'_YES'] = "Yes";
$this->langContent[$this->lang][$lang.'_NO'] = "No";
$this->langContent[$this->lang][$lang.'_DKIM_DOMAIN_LABEL'] = "Domain";
$this->langContent[$this->lang][$lang.'_DKIM_DOMAIN_DESCRIPTION'] = "Set the domain. Eg. domain.com";
$this->langContent[$this->lang][$lang.'_DKIM_DOMAIN_HINT'] = "domain.com";
$this->langContent[$this->lang][$lang.'_DKIM_SELECTOR_LABEL'] = "Selector";
$this->langContent[$this->lang][$lang.'_DKIM_SELECTOR_DESCRIPTION'] = "Set your DKIM/DNS selector.";
$this->langContent[$this->lang][$lang.'_DKIM_SELECTOR_HINT'] = "vdm";
$this->langContent[$this->lang][$lang.'_DKIM_PASSPHRASE_LABEL'] = "Passphrase";
$this->langContent[$this->lang][$lang.'_DKIM_PASSPHRASE_DESCRIPTION'] = "Enter your passphrase here.";
$this->langContent[$this->lang][$lang.'_DKIM_IDENTITY_LABEL'] = "Identity";
$this->langContent[$this->lang][$lang.'_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.";
$this->langContent[$this->lang][$lang.'_DKIM_IDENTITY_HINT'] = "you@yourdomain.com";
$this->langContent[$this->lang][$lang.'_DKIM_PRIVATE_KEY_LABEL'] = "Private key";
$this->langContent[$this->lang][$lang.'_DKIM_PRIVATE_KEY_DESCRIPTION'] = "set private key";
$this->langContent[$this->lang][$lang.'_DKIM_PUBLIC_KEY_LABEL'] = "Public key";
$this->langContent[$this->lang][$lang.'_DKIM_PUBLIC_KEY_DESCRIPTION'] = "set public key";
$this->langContent[$this->lang][$lang.'_NOTE_DKIM_USE_LABEL'] = "Server Configuration";
$this->langContent[$this->lang][$lang.'_NOTE_DKIM_USE_DESCRIPTION'] = "<p>Using the below details, you need to configure your DNS by adding a TXT record on your domain: <b><span id='a_dkim_domain'></span></b></p>
<script>
jQuery(document).ready(function()
{
// house cleaning
if( !jQuery('#jform_dkim_domain').val() ) {
jQuery('#jform_dkim_domain').val(window.location.hostname);
}
jQuery('#jform_dkim_key').click(function(){
jQuery(this).select();
});
jQuery('#jform_dkim_value').click(function(){
jQuery(this).select();
});
vdm_dkim();
});
function vdm_dkim() {
jQuery('#a_dkim_domain').text(jQuery('#jform_dkim_domain').val());
jQuery('#jform_dkim_key').val(jQuery('#jform_dkim_selector').val() + '._domainkey');
if( !jQuery('#jform_dkim_public_key').val() ) {
jQuery('#jform_dkim_value').val('v=DKIM1;k=rsa;g=*;s=email;h=sha1;t=s;p=PUBLICKEY');
} else {
jQuery('#jform_dkim_value').val('v=DKIM1;k=rsa;g=*;s=email;h=sha1;t=s;p=' + jQuery('#jform_dkim_public_key').val());
}
}
</script>";
$this->langContent[$this->lang][$lang.'_DKIM_KEY_LABEL'] = "Key";
$this->langContent[$this->lang][$lang.'_DKIM_KEY_DESCRIPTION'] = "This is the KEY to use in the DNS record.";
$this->langContent[$this->lang][$lang.'_DKIM_KEY_HINT'] = "vdm._domainkey";
$this->langContent[$this->lang][$lang.'_DKIM_VALUE_LABEL'] = "Value";
$this->langContent[$this->lang][$lang.'_DKIM_VALUE_DESCRIPTION'] = "This is the TXT value to use in the DNS. Replace the PUBLICKEY with your public key.";
$this->langContent[$this->lang][$lang.'_DKIM_VALUE_HINT'] = "v=DKIM1;k=rsa;g=*;s=email;h=sha1;t=s;p=PUBLICKEY";
$this->configFieldSets[] = "\n\t\t<!--".$this->setLine(__LINE__)." Dkim Field. Type: Radio. (joomla) -->";
$this->configFieldSets[] = "\t\t<field";
$this->configFieldSets[] = "\t\t\ttype=\"radio\"";
$this->configFieldSets[] = "\t\t\tname=\"dkim\"";
$this->configFieldSets[] = "\t\t\tlabel=\"".$lang."_DKIM_LABEL\"";
$this->configFieldSets[] = "\t\t\tdescription=\"".$lang."_DKIM_DESCRIPTION\"";
$this->configFieldSets[] = "\t\t\tclass=\"btn-group btn-group-yesno\"";
$this->configFieldSets[] = "\t\t\tdefault=\"0\"";
$this->configFieldSets[] = "\t\t\trequired=\"true\">";
$this->configFieldSets[] = "\t\t\t<!--".$this->setLine(__LINE__)." Option Set. -->";
$this->configFieldSets[] = "\t\t\t<option value=\"1\">";
$this->configFieldSets[] = "\t\t\t\t".$lang."_YES</option>";
$this->configFieldSets[] = "\t\t\t<option value=\"0\">";
$this->configFieldSets[] = "\t\t\t\t".$lang."_NO</option>";
$this->configFieldSets[] = "\t\t</field>\t\t";
$this->configFieldSets[] = "\t\t<!--".$this->setLine(__LINE__)." Dkim_domain Field. Type: Text. (joomla) -->";
$this->configFieldSets[] = "\t\t<field";
$this->configFieldSets[] = "\t\t\ttype=\"text\"";
$this->configFieldSets[] = "\t\t\tname=\"dkim_domain\"";
$this->configFieldSets[] = "\t\t\tlabel=\"".$lang."_DKIM_DOMAIN_LABEL\"";
$this->configFieldSets[] = "\t\t\tsize=\"60\"";
$this->configFieldSets[] = "\t\t\tmaxlength=\"150\"";
$this->configFieldSets[] = "\t\t\tdescription=\"".$lang."_DKIM_DOMAIN_DESCRIPTION\"";
$this->configFieldSets[] = "\t\t\tclass=\"text_area\"";
$this->configFieldSets[] = "\t\t\tfilter=\"STRING\"";
$this->configFieldSets[] = "\t\t\tmessage=\"Error! Please add DKIM Domain here.\"";
$this->configFieldSets[] = "\t\t\thint=\"".$lang."_DKIM_DOMAIN_HINT\"";
$this->configFieldSets[] = "\t\t\tshowon=\"dkim:1\"";
$this->configFieldSets[] = "\t\t\tonchange=\"vdm_dkim();\"";
$this->configFieldSets[] = "\t\t/>\t\t";
$this->configFieldSets[] = "\t\t<!--".$this->setLine(__LINE__)." Dkim_selector Field. Type: Text. (joomla) -->";
$this->configFieldSets[] = "\t\t<field";
$this->configFieldSets[] = "\t\t\ttype=\"text\"";
$this->configFieldSets[] = "\t\t\tname=\"dkim_selector\"";
$this->configFieldSets[] = "\t\t\tlabel=\"".$lang."_DKIM_SELECTOR_LABEL\"";
$this->configFieldSets[] = "\t\t\tsize=\"60\"";
$this->configFieldSets[] = "\t\t\tmaxlength=\"150\"";
$this->configFieldSets[] = "\t\t\tdefault=\"vdm\"";
$this->configFieldSets[] = "\t\t\tdescription=\"".$lang."_DKIM_SELECTOR_DESCRIPTION\"";
$this->configFieldSets[] = "\t\t\tclass=\"text_area\"";
$this->configFieldSets[] = "\t\t\tfilter=\"STRING\"";
$this->configFieldSets[] = "\t\t\tmessage=\"Error! Please add DKIM/DNS selector here.\"";
$this->configFieldSets[] = "\t\t\thint=\"".$lang."_DKIM_SELECTOR_HINT\"";
$this->configFieldSets[] = "\t\t\tshowon=\"dkim:1\"";
$this->configFieldSets[] = "\t\t\tonchange=\"vdm_dkim();\"";
$this->configFieldSets[] = "\t\t/>\t\t";
$this->configFieldSets[] = "\t\t<!--".$this->setLine(__LINE__)." Dkim_passphrase Field. Type: Password. (joomla) -->";
$this->configFieldSets[] = "\t\t<field";
$this->configFieldSets[] = "\t\t\ttype=\"password\"";
$this->configFieldSets[] = "\t\t\tname=\"dkim_passphrase\"";
$this->configFieldSets[] = "\t\t\tlabel=\"".$lang."_DKIM_PASSPHRASE_LABEL\"";
$this->configFieldSets[] = "\t\t\tsize=\"60\"";
$this->configFieldSets[] = "\t\t\tdescription=\"".$lang."_DKIM_PASSPHRASE_DESCRIPTION\"";
$this->configFieldSets[] = "\t\t\tclass=\"text_area\"";
$this->configFieldSets[] = "\t\t\tfilter=\"raw\"";
$this->configFieldSets[] = "\t\t\tmessage=\"Error! Please add passphrase here.\"";
$this->configFieldSets[] = "\t\t\tshowon=\"dkim:1\"";
$this->configFieldSets[] = "\t\t/>\t\t";
$this->configFieldSets[] = "\t\t<!--".$this->setLine(__LINE__)." Dkim_identity Field. Type: Text. (joomla) -->";
$this->configFieldSets[] = "\t\t<field";
$this->configFieldSets[] = "\t\t\ttype=\"text\"";
$this->configFieldSets[] = "\t\t\tname=\"dkim_identity\"";
$this->configFieldSets[] = "\t\t\tlabel=\"".$lang."_DKIM_IDENTITY_LABEL\"";
$this->configFieldSets[] = "\t\t\tsize=\"60\"";
$this->configFieldSets[] = "\t\t\tmaxlength=\"150\"";
$this->configFieldSets[] = "\t\t\tdescription=\"".$lang."_DKIM_IDENTITY_DESCRIPTION\"";
$this->configFieldSets[] = "\t\t\tclass=\"text_area\"";
$this->configFieldSets[] = "\t\t\tfilter=\"raw\"";
$this->configFieldSets[] = "\t\t\tmessage=\"Error! Please add DKIM Identity here.\"";
$this->configFieldSets[] = "\t\t\thint=\"".$lang."_DKIM_IDENTITY_HINT\"";
$this->configFieldSets[] = "\t\t\tshowon=\"dkim:1\"";
$this->configFieldSets[] = "\t\t/>\t\t";
$this->configFieldSets[] = "\t\t<!--".$this->setLine(__LINE__)." Dkim_private_key Field. Type: Textarea. (joomla) -->";
$this->configFieldSets[] = "\t\t<field";
$this->configFieldSets[] = "\t\t\ttype=\"textarea\"";
$this->configFieldSets[] = "\t\t\tname=\"dkim_private_key\"";
$this->configFieldSets[] = "\t\t\tlabel=\"".$lang."_DKIM_PRIVATE_KEY_LABEL\"";
$this->configFieldSets[] = "\t\t\trows=\"15\"";
$this->configFieldSets[] = "\t\t\tcols=\"5\"";
$this->configFieldSets[] = "\t\t\tdescription=\"".$lang."_DKIM_PRIVATE_KEY_DESCRIPTION\"";
$this->configFieldSets[] = "\t\t\tclass=\"input-xxlarge span12\"";
$this->configFieldSets[] = "\t\t\tshowon=\"dkim:1\"";
$this->configFieldSets[] = "\t\t/>\t\t";
$this->configFieldSets[] = "\t\t<!--".$this->setLine(__LINE__)." Dkim_public_key Field. Type: Textarea. (joomla) -->";
$this->configFieldSets[] = "\t\t<field";
$this->configFieldSets[] = "\t\t\ttype=\"textarea\"";
$this->configFieldSets[] = "\t\t\tname=\"dkim_public_key\"";
$this->configFieldSets[] = "\t\t\tlabel=\"".$lang."_DKIM_PUBLIC_KEY_LABEL\"";
$this->configFieldSets[] = "\t\t\trows=\"5\"";
$this->configFieldSets[] = "\t\t\tcols=\"5\"";
$this->configFieldSets[] = "\t\t\tdescription=\"".$lang."_DKIM_PUBLIC_KEY_DESCRIPTION\"";
$this->configFieldSets[] = "\t\t\tclass=\"input-xxlarge span12\"";
$this->configFieldSets[] = "\t\t\tshowon=\"dkim:1\"";
$this->configFieldSets[] = "\t\t\tonchange=\"vdm_dkim();\"";
$this->configFieldSets[] = "\t\t/>\t\t";
$this->configFieldSets[] = "\t\t<!--".$this->setLine(__LINE__)." Note_dkim_use Field. Type: Note. A None Database Field. (joomla) -->";
$this->configFieldSets[] = "\t\t<field type=\"note\" name=\"note_dkim_use\" label=\"".$lang."_NOTE_DKIM_USE_LABEL\" description=\"".$lang."_NOTE_DKIM_USE_DESCRIPTION\" heading=\"h4\" class=\"note_dkim_use\" showon=\"dkim:1\" />\t\t";
$this->configFieldSets[] = "\t\t<!--".$this->setLine(__LINE__)." Dkim_key Field. Type: Text. (joomla) -->";
$this->configFieldSets[] = "\t\t<field";
$this->configFieldSets[] = "\t\t\ttype=\"text\"";
$this->configFieldSets[] = "\t\t\tname=\"dkim_key\"";
$this->configFieldSets[] = "\t\t\tlabel=\"".$lang."_DKIM_KEY_LABEL\"";
$this->configFieldSets[] = "\t\t\tsize=\"40\"";
$this->configFieldSets[] = "\t\t\tmaxlength=\"150\"";
$this->configFieldSets[] = "\t\t\tdescription=\"".$lang."_DKIM_KEY_DESCRIPTION\"";
$this->configFieldSets[] = "\t\t\tclass=\"text_area\"";
$this->configFieldSets[] = "\t\t\tfilter=\"STRING\"";
$this->configFieldSets[] = "\t\t\tmessage=\"Error! Please add KEY here.\"";
$this->configFieldSets[] = "\t\t\thint=\"".$lang."_DKIM_KEY_HINT\"";
$this->configFieldSets[] = "\t\t\tshowon=\"dkim:1\"";
$this->configFieldSets[] = "\t\t/>\t\t";
$this->configFieldSets[] = "\t\t<!--".$this->setLine(__LINE__)." Dkim_value Field. Type: Text. (joomla) -->";
$this->configFieldSets[] = "\t\t<field";
$this->configFieldSets[] = "\t\t\ttype=\"text\"";
$this->configFieldSets[] = "\t\t\tname=\"dkim_value\"";
$this->configFieldSets[] = "\t\t\tlabel=\"".$lang."_DKIM_VALUE_LABEL\"";
$this->configFieldSets[] = "\t\t\tsize=\"80\"";
$this->configFieldSets[] = "\t\t\tmaxlength=\"350\"";
$this->configFieldSets[] = "\t\t\tdescription=\"".$lang."_DKIM_VALUE_DESCRIPTION\"";
$this->configFieldSets[] = "\t\t\tclass=\"text_area\"";
$this->configFieldSets[] = "\t\t\tfilter=\"STRING\"";
$this->configFieldSets[] = "\t\t\tmessage=\"Error! Please add TXT record here.\"";
$this->configFieldSets[] = "\t\t\thint=\"".$lang."_DKIM_VALUE_HINT\"";
$this->configFieldSets[] = "\t\t\tshowon=\"dkim:1\"";
$this->configFieldSets[] = "\t\t/>";
}
// close that fieldset
$this->configFieldSets[] = "\t</fieldset>";
}
}
public function setGooglechartConfigFieldsets($lang)
{
if ($this->googlechart)
@ -12657,9 +13217,12 @@ for developing fast and powerful web interfaces. For more info visit <a href=\"h
$siteTitle = $this->langPrefix.'_'.ComponentbuilderHelper::safeString($siteName.' Access Site','U');
$siteDesc = $this->langPrefix.'_'.ComponentbuilderHelper::safeString($siteName.' Access Site','U').'_DESC';
$sortKey = ComponentbuilderHelper::safeString($siteName.' Access Site');
$this->langContent['admin'][$siteTitle] = $siteName.' (Site) Access';
$this->langContent['admin'][$siteDesc] = ' Allows the users in this group to access site '.ComponentbuilderHelper::safeString($siteName,'w').'.';
$this->componentGlobal[$sortKey] = "\t\t".'<action name="site.'.$siteCode.'.access" title="'.$siteTitle.'" description="'.$siteDesc.'" />';
if (isset($site_view['access']) && $site_view['access'] == 1)
{
$this->langContent['admin'][$siteTitle] = $siteName.' (Site) Access';
$this->langContent['admin'][$siteDesc] = ' Allows the users in this group to access site '.ComponentbuilderHelper::safeString($siteName,'w').'.';
$this->componentGlobal[$sortKey] = "\t\t".'<action name="site.'.$siteCode.'.access" title="'.$siteTitle.'" description="'.$siteDesc.'" />';
}
// add the custom permissions to use the buttons of this view
/* if (ComponentbuilderHelper::checkArray($site_view['settings']->custom_buttons))
{

View File

@ -153,6 +153,9 @@ class Infusion extends Interpretation
// ###CUSTOM_HELPER_SCRIPT###
$this->fileContentStatic['###CUSTOM_HELPER_SCRIPT###'] = str_replace(array_keys($this->placeholders),array_values($this->placeholders),$this->customScriptBuilder['component_php_helper_admin']);
// ###BOTH_CUSTOM_HELPER_SCRIPT###
$this->fileContentStatic['###BOTH_CUSTOM_HELPER_SCRIPT###'] = str_replace(array_keys($this->placeholders),array_values($this->placeholders),$this->customScriptBuilder['component_php_helper_both']);
// ###ADMIN_GLOBAL_EVENT_HELPER###
$this->fileContentStatic['###ADMIN_GLOBAL_EVENT_HELPER###'] = '';
@ -249,8 +252,8 @@ class Infusion extends Interpretation
$this->placeholders['###View###'] = $viewName_f;
// set license per view if needed
$this->setLockLicensePer($viewName_single);
$this->setLockLicensePer($viewName_list);
$this->setLockLicensePer($viewName_single, $this->target);
$this->setLockLicensePer($viewName_list, $this->target);
// ###FIELDSETS### <<<DYNAMIC>>>
$this->fileContentDynamic[$viewName_single]['###FIELDSETS###'] = $this->setFieldSet($view, $this->fileContentStatic['###component###']);
@ -607,7 +610,7 @@ class Infusion extends Interpretation
$this->placeholders['[[[SVIEWS]]]'] = $view['settings']->CODE;
// set license per view if needed
$this->setLockLicensePer($view['settings']->code);
$this->setLockLicensePer($view['settings']->code, $this->target);
if ($view['settings']->main_get->gettype == 1)
{
@ -854,7 +857,7 @@ class Infusion extends Interpretation
$this->placeholders['[[[SVIEWS]]]'] = $view['settings']->CODE;
// set license per view if needed
$this->setLockLicensePer($view['settings']->code);
$this->setLockLicensePer($view['settings']->code, $this->target);
// set the site default view
if ($view['default_view'] == 1)
@ -871,11 +874,13 @@ class Infusion extends Interpretation
// insure the needed route helper is loaded
$this->fileContentStatic['###ROUTEHELPER###'] .= $this->setRouterHelp($view['settings']->code,$view['settings']->code, true);
// build route details
$this->fileContentStatic['###ROUTER_PARSE_SWITCH###'] .= $this->routerParseSwitch($view['settings']->code);
$this->fileContentStatic['###ROUTER_PARSE_SWITCH###'] .= $this->routerParseSwitch($view['settings']->code, $view);
$this->fileContentStatic['###ROUTER_BUILD_VIEWS###'] .= $this->routerBuildViews($view['settings']->code);
if ($view['settings']->main_get->gettype == 1)
{
// set user permission access check ###USER_PERMISSION_CHECK_ACCESS### <<<DYNAMIC>>>
$this->fileContentDynamic[$view['settings']->code]['###USER_PERMISSION_CHECK_ACCESS###'] = $this->setUserPermissionCheckAccess($view, 1);
// check if there is any custom script
if (isset($this->customScriptBuilder[$this->target.'_php_before_getitem'][$view['settings']->code]) && ComponentbuilderHelper::checkString($this->customScriptBuilder[$this->target.'_php_before_getitem'][$view['settings']->code]))
{
@ -910,7 +915,9 @@ class Infusion extends Interpretation
}
}
elseif ($view['settings']->main_get->gettype == 2)
{
{
// set user permission access check ###USER_PERMISSION_CHECK_ACCESS### <<<DYNAMIC>>>
$this->fileContentDynamic[$view['settings']->code]['###USER_PERMISSION_CHECK_ACCESS###'] = $this->setUserPermissionCheckAccess($view, 2);
// ###SITE_GET_LIST_QUERY### <<<DYNAMIC>>>
$this->fileContentDynamic[$view['settings']->code]['###SITE_GET_LIST_QUERY###'] = $this->setCustomViewListQuery($view['settings']->main_get, $view['settings']->code);

View File

@ -10,12 +10,12 @@
|_|
/-------------------------------------------------------------------------------------------------------------------------------/
@version 2.2.3
@build 22nd November, 2016
@version 2.2.6
@build 30th December, 2016
@created 30th April, 2015
@package Component Builder
@subpackage componentbuilder.php
@author Llewellyn van der Merwe <https://www.vdm.io/joomla-component-builder>
@author Llewellyn van der Merwe <http://vdm.bz/component-builder>
@copyright Copyright (C) 2015. All Rights Reserved
@license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html
@ -33,23 +33,37 @@ abstract class ComponentbuilderHelper
{
/*
* Compiler autoloader
* Autoloader
*/
public static function autoLoader()
public static function autoLoader($type = 'compiler')
{
// load the compiler classes
foreach (glob(JPATH_ADMINISTRATOR."/components/com_componentbuilder/helpers/compiler/*.php") as $compilerFile)
foreach (glob(JPATH_ADMINISTRATOR."/components/com_componentbuilder/helpers/".$type."/*.php") as $autoFile)
{
require_once $compilerFile;
require_once $autoFile;
}
// import the Joomla librarys
jimport('joomla.filesystem.file');
jimport('joomla.filesystem.folder');
jimport('joomla.filesystem.archive');
jimport('joomla.application.component.modellist');
// 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 this for all
jimport('joomla.application');
// include class to minify js
require_once JPATH_ADMINISTRATOR.'/components/com_componentbuilder/helpers/js.php';
}
/**
* The dynamic builder of views, tables and fields
**/
public static function dynamicBuilder(&$data, $type)
{
self::autoLoader('extrusion');
$extruder = new Extrusion($data);
}
/**
@ -71,6 +85,48 @@ abstract class ComponentbuilderHelper
// 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' => "<field ", 'values_description' => '<ul>', 'short_description' => $result->short_description, 'description' => $result->description);
foreach ($properties['name'] as $line)
{
$field['values_description'] .= '<li><b>'.$properties['name'][$pointer].'</b> '.$properties['description'][$pointer].'</li>';
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'] .= '</ul>';
// return found field options
return $field;
}
return false;
}
/**
* get the localkey
@ -222,7 +278,7 @@ abstract class ComponentbuilderHelper
return true;
}
return false;
}
}
/**
* Load the Component xml manifest.
**/
@ -854,7 +910,7 @@ abstract class ComponentbuilderHelper
{
// The record has been set. Check the record permissions.
$permission = $user->authorise($action->name, 'com_componentbuilder.'.$view.'.' . (int) $record->id);
if (!$permission && !is_null($permission))
if (!$permission) // TODO removed && !is_null($permission)
{
if ($action->name == 'core.edit' || $action->name == $view.'.edit')
{
@ -1189,10 +1245,22 @@ abstract class ComponentbuilderHelper
return false;
}
public static function checkArray($array)
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;

View File

@ -0,0 +1,389 @@
<?php
/*--------------------------------------------------------------------------------------------------------| www.vdm.io |------/
__ __ _ _____ _ _ __ __ _ _ _
\ \ / / | | | __ \ | | | | | \/ | | | | | | |
\ \ / /_ _ ___| |_ | | | | _____ _____| | ___ _ __ _ __ ___ ___ _ __ | |_ | \ / | ___| |_| |__ ___ __| |
\ \/ / _` / __| __| | | | |/ _ \ \ / / _ \ |/ _ \| '_ \| '_ ` _ \ / _ \ '_ \| __| | |\/| |/ _ \ __| '_ \ / _ \ / _` |
\ / (_| \__ \ |_ | |__| | __/\ V / __/ | (_) | |_) | | | | | | __/ | | | |_ | | | | __/ |_| | | | (_) | (_| |
\/ \__,_|___/\__| |_____/ \___| \_/ \___|_|\___/| .__/|_| |_| |_|\___|_| |_|\__| |_| |_|\___|\__|_| |_|\___/ \__,_|
| |
|_|
/-------------------------------------------------------------------------------------------------------------------------------/
@version 1.0.0
@created 26th December, 2016
@package Component Builder
@subpackage mapping.php
@author Llewellyn van der Merwe <http://www.vdm.io>
@my wife Roline van der Merwe <http://www.vdm.io/>
@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');
/**
* Mapping class
*/
class Mapping
{
/**
* Some default fields
*/
protected $buildcompsql;
public $id;
public $name_code;
public $addadmin_views;
public $addSql = array();
public $source = array();
public $sql = array();
/**
* The map of the needed fields and views
*/
public $map;
/**
* The app to load messages mostly
*/
public $app;
/**
* The needed set of keys needed to set
*/
protected $setting = array('id' => 'default', 'buildcompsql' => 'base64', 'addadmin_views' => 'json', 'name_code' => 'safeString');
/**
* The needed set of keys needed to set
*/
protected $notRequiered = array('id', 'asset_id', 'published',
'created_by', 'modified_by', 'created', 'modified', 'checked_out','checked_out_time',
'version', 'hits', 'access', 'ordering',
'metakey', 'metadesc', 'metadata', 'params');
/**
* The datatypes and it linked field types (basic)
* (TODO) We may need to set this dynamicly
*/
protected $dataTypes = array( 'CHAR' => 'Text', 'VARCHAR' => 'Text',
'TEXT' => 'Textarea', 'MEDIUMTEXT' => 'Textarea',
'LONGTEXT' => 'Textarea', 'DATE' => 'Text', 'TIME' => 'Text',
'DATETIME' => 'Calendar', 'INT' => 'Text', 'TINYINT' => 'Text',
'BIGINT' => 'Text', 'FLOAT' => 'Text', 'DECIMAL' => 'Text',
'DOUBLE' => 'Text');
/**
* The datasize identifiers
*/
protected $dataSize = array( 'CHAR', 'VARCHAR', 'INT', 'TINYINT',
'BIGINT', 'FLOAT', 'DECIMAL', 'DOUBLE');
/**
* The default identifiers
*/
protected $defaults = array(0, 1, "CURRENT_TIMESTAMP", "DATETIME"); // Other
/**
* The sizes identifiers
*/
protected $sizes = array("1", "7", "10", "11", "50", "64", "100", "255", "1024", "2048"); // Other
/**
* Constructor
*/
public function __construct($data = false)
{
// set the app to insure messages can be set
$this->app = JFactory::getApplication();
if ($data)
{
if (isset($data['buildcomp']) && 1 == $data['buildcomp'] && isset($data['buildcompsql']))
{
foreach ($data as $key => $value)
{
if (isset($this->setting[$key]))
{
switch($this->setting[$key])
{
case 'base64':
// set needed value
$this->$key = base64_decode($value);
break;
case 'json':
// set needed value
$this->$key = json_decode($value, true);
break;
case 'safeString':
// set needed value
$this->$key = ComponentbuilderHelper::safeString($value);
break;
default :
$this->$key = $value;
break;
}
}
}
// set the map of the views needed
if ($this->setMap())
{
return true;
}
$this->app->enqueueMessage(
JText::_('No "CREATE TABLE.." were found, please check your sql.'),
'Error'
);
return false;
}
return false; // not set so just return without any error
}
$this->app->enqueueMessage(
JText::_('Could not find the data needed to continue.'),
'Error'
);
return false;
}
/**
* The mapping function
* To Map the views and fields that are needed
*/
protected function setMap()
{
// start parsing the sql dump data
$queries = JDatabaseDriver::splitSql($this->buildcompsql);
if (ComponentbuilderHelper::checkArray($queries))
{
foreach ($queries as $query)
{
// only use create table queries
if (strpos($query, 'CREATE TABLE IF NOT EXISTS `') !== false)
{
if ($tableName = $this->getTableName($query))
{
// now get the fields/columns of this view/table
if ($fields = $this->getFields($query))
{
// make sure it is all lower case from here on
$tableName = strtolower($tableName);
$this->map[$tableName] = $fields;
}
}
else
{
continue;
}
}
// get the insert data if set
if (strpos($query, 'INSERT INTO `') !== false)
{
if ($tableName = $this->getTableName($query))
{
$this->addSql[$tableName] = 1;
$this->source[$tableName] = 2;
$this->sql[$tableName] = $query;
}
}
}
// check if the mapping was done
if (ComponentbuilderHelper::checkArray($this->map))
{
return true;
}
}
return false;
}
/**
* Get the table name
*/
protected function getTableName(&$query)
{
$tableName = ComponentbuilderHelper::getBetween($query, '`#__', "`");
// if it still was not found
if (!ComponentbuilderHelper::checkString($tableName))
{
// skip this query
return false;
}
// clean the table name (so only view name remain)
if (strpos($tableName, $this->name_code) !== false)
{
$tableName = trim(str_replace($this->name_code, '', $tableName), '_');
}
// if found
if (ComponentbuilderHelper::checkString($tableName))
{
return $tableName;
}
// skip this query
return false;
}
/**
* Get the field details
*/
protected function getFields(&$query)
{
$rows = array_map('trim', explode("\n", $query));
$fields = array();
foreach ($rows as $row)
{
// make sure we have a lower case string
$row = strtoupper($row);
$field = array();
$name = '';
if (0 === strpos($row, '`'))
{
// get field name
$name = ComponentbuilderHelper::getBetween($row, '`', '`');
}
if (0 === strpos($row, "'"))
{
// get field name
$name = ComponentbuilderHelper::getBetween($row, "'", "'");
}
// check if the name was found
if (ComponentbuilderHelper::checkString($name))
{
// insure we have the name in lower case from here on
$name = strtolower($name);
// only continue if field is requered
if (in_array($name, $this->notRequiered))
{
continue;
}
// check if the field type is found
if ($fieldType = $this->getType($row, $field, $name))
{
$field['row'] = $row;
$field['name'] = $name;
$field['label'] = ComponentbuilderHelper::safeString($name, 'W');
$field['fieldType'] = $fieldType;
$field['size'] = $this->getSize($row, $field);
$field['sizeOther'] = '';
if (!in_array($field['size'], $this->sizes))
{
if (ComponentbuilderHelper::checkString($field['size']))
{
$field['sizeOther'] = $field['size'];
$field['size'] = 'Other';
}
}
$field['default'] = $this->getDefault($row);
$field['defaultOther'] = '';
if (!in_array($field['default'], $this->defaults))
{
if (ComponentbuilderHelper::checkString($field['default']))
{
$field['defaultOther'] = $field['default'];
$field['default'] = 'Other';
}
}
$field['null'] = $this->getNullValue($row, $field);
// check if field is a key
$field['key'] = $this->getKeyStatus($rows, $name);
// load to fields
$fields[] = $field;
}
}
}
if (ComponentbuilderHelper::checkArray($fields))
{
return $fields;
}
return false;
}
/**
* Get the field types
*/
protected function getType($row, &$field, &$name)
{
// first remove field name
$row = str_replace($name, '', $row);
// get the data type first
foreach ($this->dataTypes as $type => $fieldType)
{
if (strpos($row, $type) !== false)
{
$field['dataType'] = $type;
return $fieldType;
}
}
return false;
}
/**
* Get the field size
*/
protected function getSize(&$row, $field)
{
if (in_array($field['dataType'], $this->dataSize))
{
return ComponentbuilderHelper::getBetween($row, $field['dataType'].'(', ')');
}
return '';
}
/**
* Get the field default
*/
protected function getDefault(&$row)
{
// get default value
if (strpos($row, 'DEFAULT "') !== false) // to sure it this is correct...
{
return ComponentbuilderHelper::getBetween($row, 'DEFAULT "', '"');
}
// get default value
if (strpos($row, "DEFAULT '") !== false)
{
return ComponentbuilderHelper::getBetween($row, "DEFAULT '", "'");
}
return '';
}
/**
* Get the field Null Value
*/
protected function getNullValue(&$row, &$field)
{
// get the result of null
if (strpos($row, 'NOT NULL') !== false)
{
return 'NOT NULL';
}
if (strpos($row, 'DEFAULT NULL') !== false)
{
$field['default'] = 'NULL';
return '';
}
return 'NULL';
}
/**
* Get the field key status
*/
protected function getKeyStatus(&$rows, &$name)
{
// get the data type first
foreach ($rows as $row)
{
if (strpos($row, 'UNIQUE KEY ') !== false && stripos($row, $name) !== false)
{
return 1;
}
if ((strpos($row, 'PRIMARY KEY ') !== false && stripos($row, $name) !== false) || (strpos($row, 'KEY ') !== false && stripos($row, $name) !== false))
{
return 2;
}
}
return 0;
}
}

View File

@ -0,0 +1,294 @@
<?php
/*--------------------------------------------------------------------------------------------------------| www.vdm.io |------/
__ __ _ _____ _ _ __ __ _ _ _
\ \ / / | | | __ \ | | | | | \/ | | | | | | |
\ \ / /_ _ ___| |_ | | | | _____ _____| | ___ _ __ _ __ ___ ___ _ __ | |_ | \ / | ___| |_| |__ ___ __| |
\ \/ / _` / __| __| | | | |/ _ \ \ / / _ \ |/ _ \| '_ \| '_ ` _ \ / _ \ '_ \| __| | |\/| |/ _ \ __| '_ \ / _ \ / _` |
\ / (_| \__ \ |_ | |__| | __/\ V / __/ | (_) | |_) | | | | | | __/ | | | |_ | | | | __/ |_| | | | (_) | (_| |
\/ \__,_|___/\__| |_____/ \___| \_/ \___|_|\___/| .__/|_| |_| |_|\___|_| |_|\__| |_| |_|\___|\__|_| |_|\___/ \__,_|
| |
|_|
/-------------------------------------------------------------------------------------------------------------------------------/
@version 1.0.0
@created 26th December, 2016
@package Component Builder
@subpackage builder.php
@author Llewellyn van der Merwe <http://www.vdm.io>
@my wife Roline van der Merwe <http://www.vdm.io/>
@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');
/**
* Builder class
*/
class Builder extends Mapping
{
/**
* Some default fields
*/
public $user;
public $today;
public $db;
public $views = array();
protected $fields = array();
protected $title = array();
protected $description = array();
protected $alias = array();
protected $list = array();
/**
* Field that should not be used in name, alias, disc, and list view
* (TODO) We may need to set this dynamicly
*/
protected $avoidList = array('not_required');
/***
* Constructor
*/
public function __construct(&$data)
{
// first we run the perent constructor
if (parent::__construct($data))
{
// always reset the building values if found
$data['buildcomp'] = 0;
$data['buildcompsql'] = '';
// set some globals
$this->db = JFactory::getDbo();
$this->user = JFactory::getUser();
$this->today = JFactory::getDate()->toSql();
// no start the building of the views and fields
if ($this->setBuild())
{
return true;
}
}
return false;
}
/**
* The building function
* To build the views and fields that are needed
*/
protected function setBuild()
{
foreach ($this->map as $view => $fields)
{
// set this field with all its needed data
foreach ($fields as $field)
{
$this->setField($view, $field);
}
// set this view with all its needed data
$this->setView($view);
}
return true;
}
/**
* The building function for views
*/
protected function setView(&$name)
{
// set the view object
$object = new stdClass();
$object->system_name = ComponentbuilderHelper::safeString($name, 'W') . ' (dynamic build)';
$object->name_single = $name;
$object->name_list = $name. 's';
$object->short_description = $name. ' view (dynamic build)';
$object->type = 1;
$object->description = $name. ' view (dynamic build)';
$object->add_fadein = 1;
$object->add_sql = (isset($this->addSql[$name])) ? $this->addSql[$name]: 0;
$object->source = (isset($this->source[$name])) ? $this->source[$name]: 0;
$object->sql = (isset($this->sql[$name])) ? base64_encode($this->sql[$name]): '';
$object->addpermissions = '{"action":["view.edit","view.edit.own","view.edit.state","view.create","view.delete","view.access"],"implementation":["3","3","3","3","3","3"]}';
$object->addfields = $this->addFields($name);
$object->created = $this->today;
$object->created_by = $this->user->id;
$object->published = 1;
// add to data base
if ($this->db->insertObject('#__componentbuilder_admin_view', $object))
{
// make sure the access of asset is set
$id = $this->db->insertid();
ComponentbuilderHelper::setAsset($id, 'admin_view');
// load the views
$this->views[] = $id;
return true;
}
return false;
}
/**
* Add the fields to the view
*/
protected function addFields(&$view)
{
if (isset($this->fields[$view]))
{
// set some defaults
$addField = array (
'field' => array(),
'list' => array(),
'order_list' => array(),
'title' => array(),
'alias' => array(),
'sort' => array(),
'search' => array(),
'filter' => array(),
'link' => array(),
'tab' => array(),
'alignment' => array(),
'order_edit' => array(),
'permission' => array()
);
$fixLink = (isset($this->title[$view])) ? 0 : 1;
// build the field data... hmmm
foreach ($this->fields[$view] as $nr => $id)
{
$alignment = 1;
if ($nr % 2 == 0)
{
$alignment = 2;
}
// some defaults
$isTitle = (isset($this->title[$view]) && $this->title[$view] == $id) ? 1 : 0;
$isAlias = (isset($this->alias[$view]) && $this->alias[$view] == $id) ? 1 : 0;
$isList = ($key = array_search($id, $this->list[$view])) ? 1 : 0;
$isLink = ($isTitle) ? 1 : (($isList && $fixLink) ? 1 : 0);
if ($isLink)
{
$fixLink = 0;
}
// load the field values
$addField['field'][] = $id;
$addField['list'][] = $isList;
$addField['order_list'][] = ($key) ? $key : 0;
$addField['title'][] = $isTitle;
$addField['alias'][] = $isAlias;
$addField['sort'][] = $isList;
$addField['search'][] = $isList;
$addField['filter'][] = $isList;
$addField['link'][] = $isLink;
$addField['tab'][] = 1;
$addField['alignment'][] = ($isTitle || $isAlias) ? 4 : $alignment;
$addField['order_edit'][] = $nr;
$addField['permission'][] = 0;
}
return json_encode($addField);
}
return '';
}
/**
* The building function for fields
*/
protected function setField(&$view, &$field)
{
if ($fieldType = $this->getFieldType($field['fieldType']))
{
// set the field object
$object = new stdClass();
$object->name = $field['label'] . ' (dynamic build)';
$object->fieldtype = $fieldType;
$object->datatype = $field['dataType'];
$object->indexes = $field['key'];
$object->null_switch = $field['null'];
$object->datalenght = $field['size'];
$object->datalenght_other = $field['sizeOther'];
$object->datadefault = $field['default'];
$object->datadefault_other = $field['defaultOther'];
$object->created = $this->today;
$object->created_by = $this->user->id;
$object->published = 1;
$object->store = 0;
$object->xml = $this->setFieldXML($field, $fieldType);
// add to data base
if ($this->db->insertObject('#__componentbuilder_field', $object))
{
// make sure the access of asset is set
$id = $this->db->insertid();
ComponentbuilderHelper::setAsset($id, 'field');
// check if any field for this field was already set, if not set array
if (!isset($this->fields[$view]))
{
$this->fields[$view] = array();
}
// load the field
$this->fields[$view][] = $id;
if (!isset($this->list[$view]))
{
$this->list[$view] = array();
}
// insure that some fields are avoided
if (!in_array($field['name'], $this->avoidList))
{
// set the name/title field if found
if (!isset($this->title[$view]) && (stripos($field['name'], 'name') !== false || stripos($field['name'], 'title') !== false))
{
$this->title[$view] = $id;
$this->list[$view][] = $id;
}
// set the alias field if found
elseif (!isset($this->alias[$id]) && stripos($field['name'], 'alias') !== false)
{
$this->alias[$view] = $id;
}
// set the alias field if found
elseif (!isset($this->description[$id]) && stripos($field['name'], 'desc') !== false)
{
$this->description[$view] = $id;
$this->list[$view][] = $id;
}
elseif ('Text' == $field['fieldType'] && count($this->list[$view]) < 5)
{
$this->list[$view][] = $id;
}
}
return true;
}
}
return false;
}
/**
* get the field type id from system
*/
protected function getFieldType($fieldName)
{
// load the field settings
return ComponentbuilderHelper::getVar('fieldtype', $fieldName, 'name', 'id');
}
/**
* The building function for field xml
*/
protected function setFieldXML(&$field, $fieldId)
{
// load the field settings
$settings = array();
$settings['name'] = $field['name'];
$settings['description'] = 'The '.strtolower($field['label']) . ' is set here.';
$settings['message'] = "Error! Please add some ".strtolower($field['label'])." here.";
$settings['label'] = $field['label'];
$settings['default'] = ($field['default'] == 'Other') ? $field['defaultOther'] : $field['default'];
$settings['hint'] = $field['label'] .' Here!';
// okay set the xml field values
if ($fieldOptions = ComponentbuilderHelper::getFieldOptions($fieldId, 'id', $settings))
{
return json_encode($fieldOptions['values']);
}
return '';
}
}

View File

@ -0,0 +1,141 @@
<?php
/*--------------------------------------------------------------------------------------------------------| www.vdm.io |------/
__ __ _ _____ _ _ __ __ _ _ _
\ \ / / | | | __ \ | | | | | \/ | | | | | | |
\ \ / /_ _ ___| |_ | | | | _____ _____| | ___ _ __ _ __ ___ ___ _ __ | |_ | \ / | ___| |_| |__ ___ __| |
\ \/ / _` / __| __| | | | |/ _ \ \ / / _ \ |/ _ \| '_ \| '_ ` _ \ / _ \ '_ \| __| | |\/| |/ _ \ __| '_ \ / _ \ / _` |
\ / (_| \__ \ |_ | |__| | __/\ V / __/ | (_) | |_) | | | | | | __/ | | | |_ | | | | __/ |_| | | | (_) | (_| |
\/ \__,_|___/\__| |_____/ \___| \_/ \___|_|\___/| .__/|_| |_| |_|\___|_| |_|\__| |_| |_|\___|\__|_| |_|\___/ \__,_|
| |
|_|
/-------------------------------------------------------------------------------------------------------------------------------/
@version 1.0.0
@created 26th December, 2016
@package Component Builder
@subpackage extrusion.php
@author Llewellyn van der Merwe <http://www.vdm.io>
@my wife Roline van der Merwe <http://www.vdm.io/>
@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');
/**
* Extrusion class
*/
class Extrusion extends Builder
{
/***
* Constructor
*/
public function __construct(&$data)
{
// first we run the perent constructor
if (parent::__construct($data))
{
// link the view data to the component
$data['addadmin_views'] = $this->linkAdminViews();
if (ComponentbuilderHelper::checkJson($data['addadmin_views']))
{
$this->app->enqueueMessage(
JText::_('All the fields and views from your sql dump has been created and linked to this component.'),
'Success'
);
return true;
}
}
return false;
}
/**
* link the build views to the component
*/
protected function linkAdminViews()
{
// check if views were set
if (ComponentbuilderHelper::checkArray($this->views))
{
// insure arrays are set
if (!isset($this->addadmin_views['adminview']))
{
$this->addadmin_views['adminview'] = array();
}
if (!isset($this->addadmin_views['icomoon']))
{
$this->addadmin_views['icomoon'] = array();
}
if (!isset($this->addadmin_views['mainmenu']))
{
$this->addadmin_views['mainmenu'] = array();
}
if (!isset($this->addadmin_views['dashboard_add']))
{
$this->addadmin_views['dashboard_add'] = array();
}
if (!isset($this->addadmin_views['dashboard_list']))
{
$this->addadmin_views['dashboard_list'] = array();
}
if (!isset($this->addadmin_views['submenu']))
{
$this->addadmin_views['submenu'] = array();
}
if (!isset($this->addadmin_views['checkin']))
{
$this->addadmin_views['checkin'] = array();
}
if (!isset($this->addadmin_views['history']))
{
$this->addadmin_views['history'] = array();
}
if (!isset($this->addadmin_views['metadata']))
{
$this->addadmin_views['metadata'] = array();
}
if (!isset($this->addadmin_views['access']))
{
$this->addadmin_views['access'] = array();
}
if (!isset($this->addadmin_views['port']))
{
$this->addadmin_views['port'] = array();
}
if (!isset($this->addadmin_views['edit_create_site_view']))
{
$this->addadmin_views['edit_create_site_view'] = array();
}
if (!isset($this->addadmin_views['order']))
{
$this->addadmin_views['order'] = array();
}
// set the admin view data linking
foreach ($this->views as $id)
{
$this->addadmin_views['adminview'][] = $id;
$this->addadmin_views['icomoon'][] = 'joomla';
$this->addadmin_views['mainmenu'][] = 1;
$this->addadmin_views['dashboard_add'][] = 1;
$this->addadmin_views['dashboard_list'][] = 1;
$this->addadmin_views['submenu'][] = 1;
$this->addadmin_views['checkin'][] = 1;
$this->addadmin_views['history'][] = 1;
$this->addadmin_views['metadata'][] = 1;
$this->addadmin_views['access'][] = 1;
$this->addadmin_views['port'][] = 1;
$this->addadmin_views['edit_create_site_view'][] = 0;
$this->addadmin_views['order'][] = count($this->addadmin_views['order']) + 1;
}
}
if (isset($this->addadmin_views) && ComponentbuilderHelper::checkArray($this->addadmin_views))
{
return json_encode($this->addadmin_views);
}
return '';
}
}

View File

@ -0,0 +1 @@
<html><body bgcolor="#FFFFFF"></body></html>

View File

@ -10,12 +10,12 @@
|_|
/-------------------------------------------------------------------------------------------------------------------------------/
@version 2.2.3
@build 22nd November, 2016
@version 2.2.6
@build 30th December, 2016
@created 30th April, 2015
@package Component Builder
@subpackage batch_.php
@author Llewellyn van der Merwe <https://www.vdm.io/joomla-component-builder>
@author Llewellyn van der Merwe <http://vdm.bz/component-builder>
@copyright Copyright (C) 2015. All Rights Reserved
@license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html

View File

@ -10,12 +10,12 @@
|_|
/-------------------------------------------------------------------------------------------------------------------------------/
@version 2.2.3
@build 22nd November, 2016
@version 2.2.6
@build 30th December, 2016
@created 30th April, 2015
@package Component Builder
@subpackage indenter.php
@author Llewellyn van der Merwe <https://www.vdm.io/joomla-component-builder>
@author Llewellyn van der Merwe <http://vdm.bz/component-builder>
@copyright Copyright (C) 2015. All Rights Reserved
@license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html

View File

@ -10,12 +10,12 @@
|_|
/-------------------------------------------------------------------------------------------------------------------------------/
@version 2.2.3
@build 22nd November, 2016
@version 2.2.6
@build 30th December, 2016
@created 30th April, 2015
@package Component Builder
@subpackage js.php
@author Llewellyn van der Merwe <https://www.vdm.io/joomla-component-builder>
@author Llewellyn van der Merwe <http://vdm.bz/component-builder>
@copyright Copyright (C) 2015. All Rights Reserved
@license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html

View File

@ -10,12 +10,12 @@
|_|
/-------------------------------------------------------------------------------------------------------------------------------/
@version 2.2.3
@build 22nd November, 2016
@version 2.2.6
@build 30th December, 2016
@created 30th April, 2015
@package Component Builder
@subpackage minify.php
@author Llewellyn van der Merwe <https://www.vdm.io/joomla-component-builder>
@author Llewellyn van der Merwe <http://vdm.bz/component-builder>
@copyright Copyright (C) 2015. All Rights Reserved
@license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html

View File

@ -756,6 +756,8 @@ COM_COMPONENTBUILDER_COMPONENT_ADD_PHP_DASHBOARD_METHODS="Add Php Dashboard Meth
COM_COMPONENTBUILDER_COMPONENT_ADD_PHP_DASHBOARD_METHODS_LABEL="Add PHP (dashboard Methods)"
COM_COMPONENTBUILDER_COMPONENT_ADD_PHP_HELPER_ADMIN="Add Php Helper Admin"
COM_COMPONENTBUILDER_COMPONENT_ADD_PHP_HELPER_ADMIN_LABEL="Add PHP (helper_admin Class)"
COM_COMPONENTBUILDER_COMPONENT_ADD_PHP_HELPER_BOTH="Add Php Helper Both"
COM_COMPONENTBUILDER_COMPONENT_ADD_PHP_HELPER_BOTH_LABEL="Add PHP (helper Classes - Both admin & site)"
COM_COMPONENTBUILDER_COMPONENT_ADD_PHP_HELPER_SITE="Add Php Helper Site"
COM_COMPONENTBUILDER_COMPONENT_ADD_PHP_HELPER_SITE_LABEL="Add PHP (helper_site Class)"
COM_COMPONENTBUILDER_COMPONENT_ADD_PHP_METHOD_UNINSTALL="Add Php Method Uninstall"
@ -832,6 +834,13 @@ COM_COMPONENTBUILDER_COMPONENT_BOX_REMOVE="Box Remove"
COM_COMPONENTBUILDER_COMPONENT_BRIEFCASE="Briefcase"
COM_COMPONENTBUILDER_COMPONENT_BRUSH="Brush"
COM_COMPONENTBUILDER_COMPONENT_BUBBLE_QUOTE="Bubble Quote"
COM_COMPONENTBUILDER_COMPONENT_BUILDCOMP="Buildcomp"
COM_COMPONENTBUILDER_COMPONENT_BUILDCOMPSQL="Buildcompsql"
COM_COMPONENTBUILDER_COMPONENT_BUILDCOMPSQL_DESCRIPTION="Add your MySQL here!"
COM_COMPONENTBUILDER_COMPONENT_BUILDCOMPSQL_HINT="// Add MySQL Table Dump Here"
COM_COMPONENTBUILDER_COMPONENT_BUILDCOMPSQL_LABEL="MySQL"
COM_COMPONENTBUILDER_COMPONENT_BUILDCOMP_DESCRIPTION="To build the component fields and back-end views dynamically using a mySQL table file."
COM_COMPONENTBUILDER_COMPONENT_BUILDCOMP_LABEL="Build Backend-views Dynamically"
COM_COMPONENTBUILDER_COMPONENT_CALENDAR="Calendar"
COM_COMPONENTBUILDER_COMPONENT_CALENDAR_THREE="Calendar 3"
COM_COMPONENTBUILDER_COMPONENT_CALENDAR_TWO="Calendar 2"
@ -884,6 +893,7 @@ COM_COMPONENTBUILDER_COMPONENT_CUBE="Cube"
COM_COMPONENTBUILDER_COMPONENT_CUSTOMADMINVIEW="Customadminview"
COM_COMPONENTBUILDER_COMPONENT_CUSTOMADMINVIEW_DESCRIPTION="Select a custom admin view"
COM_COMPONENTBUILDER_COMPONENT_CUSTOMADMINVIEW_LABEL="View"
COM_COMPONENTBUILDER_COMPONENT_CUSTOM_ADMIN_VIEWS="Custom Admin Views"
COM_COMPONENTBUILDER_COMPONENT_CUSTOM_USED_IN_CUSTOM_CODE="Custom (used in custom code)"
COM_COMPONENTBUILDER_COMPONENT_CUSTOM_VALUE_DESCRIPTION="Enter custom value in needed"
COM_COMPONENTBUILDER_COMPONENT_CUSTOM_VALUE_HINT="Custom Value Here"
@ -909,6 +919,7 @@ COM_COMPONENTBUILDER_COMPONENT_DESCRIPTION_HINT="Add Description Here"
COM_COMPONENTBUILDER_COMPONENT_DESCRIPTION_LABEL="Description"
COM_COMPONENTBUILDER_COMPONENT_DETAILS="Details"
COM_COMPONENTBUILDER_COMPONENT_DOWNLOAD="Download"
COM_COMPONENTBUILDER_COMPONENT_DYNAMIC_BUILD_BETA="Dynamic Build (beta)"
COM_COMPONENTBUILDER_COMPONENT_DYNAMIC_INTEGRATION="Dynamic Integration"
COM_COMPONENTBUILDER_COMPONENT_EDIT="Editing the Component"
COM_COMPONENTBUILDER_COMPONENT_EDIT_CREATE_SITE_VIEW_DESCRIPTION="add site edit & create view for this admin view"
@ -1059,6 +1070,8 @@ COM_COMPONENTBUILDER_COMPONENT_NOTE_ADD_FILES_DESCRIPTION="You can add custom fi
COM_COMPONENTBUILDER_COMPONENT_NOTE_ADD_FILES_LABEL="Adding Custom Files"
COM_COMPONENTBUILDER_COMPONENT_NOTE_ADD_FOLDERS_DESCRIPTION="You can add custom folders to the component, simply add the folders to the administrator/components/com_componentbuilder/custom folder and then select them here."
COM_COMPONENTBUILDER_COMPONENT_NOTE_ADD_FOLDERS_LABEL="Adding Custom Folders"
COM_COMPONENTBUILDER_COMPONENT_NOTE_BUILDCOMP_DYNAMIC_DESCRIPTION="You can dynamically build the components back-end views and fields by adding a mySQL table dump, that has all the tables, or some more tables with its columns and data types. A very basic and generic set of fields and tables will be created, and added to the existing fields and tables of this component. <b>This is in beta testing, so this feature is still under development and will only be fully functional around June 2017...</b>"
COM_COMPONENTBUILDER_COMPONENT_NOTE_BUILDCOMP_DYNAMIC_LABEL="Dynamic Builder Option"
COM_COMPONENTBUILDER_COMPONENT_NOTE_MYSQL_TWEAK_OPTIONS_DESCRIPTION="In each admin view you can add data from a MySQL Table (this is done in the admin view MySQL tab). Here you can limit that data in relation to this component. This feature is useful when an admin view with demo data is used in more then one component, and you would like to exclude some demo data without creating a new admin view."
COM_COMPONENTBUILDER_COMPONENT_NOTE_MYSQL_TWEAK_OPTIONS_LABEL=" MySql Tweak Options"
COM_COMPONENTBUILDER_COMPONENT_NOTE_ON_CONTRIBUTORS_DESCRIPTION="Only add contributors if you would like them listed on the component dashboard."
@ -1085,7 +1098,7 @@ COM_COMPONENTBUILDER_COMPONENT_NOTE_README_DESCRIPTION="<div style='margin: 10px
## Build Time<br />
<br />
**###totalHours### Hours** or **###totalDays### Eight Hour Days** (actual time the author saved - <br />
due to [Automated Component Builder](https://www.vdm.io/joomla-component-builder))<br />
due to [Automated Component Builder](http://vdm.bz/component-builder))<br />
<br />
> (if creating a folder and file took **5 seconds** and writing one line of code took **10 seconds**,<br />
> never making one mistake or taking any coffee break.)<br />
@ -1110,7 +1123,7 @@ due to [Automated Component Builder](https://www.vdm.io/joomla-component-builder
<br />
Project duration: **###projectWeekTime### weeks** or **###projectMonthTime### months**<br />
<br />
> This **component** was build with a Joomla [Automated Component Builder](https://www.vdm.io/joomla-component-builder).<br />
> This **component** was build with a Joomla [Automated Component Builder](http://vdm.bz/component-builder).<br />
> Developed by [Llewellyn van der Merwe](mailto:joomla@vdm.io)<br />
<br />
## Donations<br />
@ -1166,6 +1179,10 @@ COM_COMPONENTBUILDER_COMPONENT_PHP_HELPER_ADMIN="Php Helper Admin"
COM_COMPONENTBUILDER_COMPONENT_PHP_HELPER_ADMIN_DESCRIPTION="Add your PHP here! [Do not add the php tags]"
COM_COMPONENTBUILDER_COMPONENT_PHP_HELPER_ADMIN_HINT="// The PHP abstract Methods to add to the component helper class. Only Methods! as it will directly be add as methods to the helper class!"
COM_COMPONENTBUILDER_COMPONENT_PHP_HELPER_ADMIN_LABEL="PHP"
COM_COMPONENTBUILDER_COMPONENT_PHP_HELPER_BOTH="Php Helper Both"
COM_COMPONENTBUILDER_COMPONENT_PHP_HELPER_BOTH_DESCRIPTION="Add your PHP here! [Do not add the php tags]"
COM_COMPONENTBUILDER_COMPONENT_PHP_HELPER_BOTH_HINT="// The PHP abstract Methods to add to the component helper class. Only Methods! as it will directly be add as methods to the helper class!"
COM_COMPONENTBUILDER_COMPONENT_PHP_HELPER_BOTH_LABEL="PHP (for both admin & site)"
COM_COMPONENTBUILDER_COMPONENT_PHP_HELPER_SITE="Php Helper Site"
COM_COMPONENTBUILDER_COMPONENT_PHP_HELPER_SITE_DESCRIPTION="Add your PHP here! [Do not add the php tags]"
COM_COMPONENTBUILDER_COMPONENT_PHP_HELPER_SITE_HINT="// The PHP abstract Methods to add to the component helper class. Only Methods! as it will directly be add as methods to the helper class!"

View File

@ -10,12 +10,12 @@
|_|
/-------------------------------------------------------------------------------------------------------------------------------/
@version 2.2.3
@build 22nd November, 2016
@version 2.2.6
@build 30th December, 2016
@created 30th April, 2015
@package Component Builder
@subpackage css_fullwidth.php
@author Llewellyn van der Merwe <https://www.vdm.io/joomla-component-builder>
@author Llewellyn van der Merwe <http://vdm.bz/component-builder>
@copyright Copyright (C) 2015. All Rights Reserved
@license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html

View File

@ -10,12 +10,12 @@
|_|
/-------------------------------------------------------------------------------------------------------------------------------/
@version 2.2.3
@build 22nd November, 2016
@version 2.2.6
@build 30th December, 2016
@created 30th April, 2015
@package Component Builder
@subpackage custom_buttons_fullwidth.php
@author Llewellyn van der Merwe <https://www.vdm.io/joomla-component-builder>
@author Llewellyn van der Merwe <http://vdm.bz/component-builder>
@copyright Copyright (C) 2015. All Rights Reserved
@license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html

View File

@ -10,12 +10,12 @@
|_|
/-------------------------------------------------------------------------------------------------------------------------------/
@version 2.2.3
@build 22nd November, 2016
@version 2.2.6
@build 30th December, 2016
@created 30th April, 2015
@package Component Builder
@subpackage custom_buttons_left.php
@author Llewellyn van der Merwe <https://www.vdm.io/joomla-component-builder>
@author Llewellyn van der Merwe <http://vdm.bz/component-builder>
@copyright Copyright (C) 2015. All Rights Reserved
@license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html

View File

@ -10,12 +10,12 @@
|_|
/-------------------------------------------------------------------------------------------------------------------------------/
@version 2.2.3
@build 22nd November, 2016
@version 2.2.6
@build 30th December, 2016
@created 30th April, 2015
@package Component Builder
@subpackage custom_import_fullwidth.php
@author Llewellyn van der Merwe <https://www.vdm.io/joomla-component-builder>
@author Llewellyn van der Merwe <http://vdm.bz/component-builder>
@copyright Copyright (C) 2015. All Rights Reserved
@license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html

View File

@ -10,12 +10,12 @@
|_|
/-------------------------------------------------------------------------------------------------------------------------------/
@version 2.2.3
@build 22nd November, 2016
@version 2.2.6
@build 30th December, 2016
@created 30th April, 2015
@package Component Builder
@subpackage fields_fullwidth.php
@author Llewellyn van der Merwe <https://www.vdm.io/joomla-component-builder>
@author Llewellyn van der Merwe <http://vdm.bz/component-builder>
@copyright Copyright (C) 2015. All Rights Reserved
@license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html
@ -28,7 +28,7 @@
defined('_JEXEC') or die('Restricted access');
// set the defaults
$items = $displayData->vxpfields;
$items = $displayData->vxtfields;
$user = JFactory::getUser();
$id = $displayData->item->id;
$edit = "index.php?option=com_componentbuilder&view=fields&task=field.edit";

View File

@ -10,12 +10,12 @@
|_|
/-------------------------------------------------------------------------------------------------------------------------------/
@version 2.2.3
@build 22nd November, 2016
@version 2.2.6
@build 30th December, 2016
@created 30th April, 2015
@package Component Builder
@subpackage javascript_fullwidth.php
@author Llewellyn van der Merwe <https://www.vdm.io/joomla-component-builder>
@author Llewellyn van der Merwe <http://vdm.bz/component-builder>
@copyright Copyright (C) 2015. All Rights Reserved
@license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html

View File

@ -10,12 +10,12 @@
|_|
/-------------------------------------------------------------------------------------------------------------------------------/
@version 2.2.3
@build 22nd November, 2016
@version 2.2.6
@build 30th December, 2016
@created 30th April, 2015
@package Component Builder
@subpackage mysql_fullwidth.php
@author Llewellyn van der Merwe <https://www.vdm.io/joomla-component-builder>
@author Llewellyn van der Merwe <http://vdm.bz/component-builder>
@copyright Copyright (C) 2015. All Rights Reserved
@license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html

View File

@ -10,12 +10,12 @@
|_|
/-------------------------------------------------------------------------------------------------------------------------------/
@version 2.2.3
@build 22nd November, 2016
@version 2.2.6
@build 30th December, 2016
@created 30th April, 2015
@package Component Builder
@subpackage mysql_left.php
@author Llewellyn van der Merwe <https://www.vdm.io/joomla-component-builder>
@author Llewellyn van der Merwe <http://vdm.bz/component-builder>
@copyright Copyright (C) 2015. All Rights Reserved
@license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html

View File

@ -10,12 +10,12 @@
|_|
/-------------------------------------------------------------------------------------------------------------------------------/
@version 2.2.3
@build 22nd November, 2016
@version 2.2.6
@build 30th December, 2016
@created 30th April, 2015
@package Component Builder
@subpackage php_fullwidth.php
@author Llewellyn van der Merwe <https://www.vdm.io/joomla-component-builder>
@author Llewellyn van der Merwe <http://vdm.bz/component-builder>
@copyright Copyright (C) 2015. All Rights Reserved
@license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html

View File

@ -10,12 +10,12 @@
|_|
/-------------------------------------------------------------------------------------------------------------------------------/
@version 2.2.3
@build 22nd November, 2016
@version 2.2.6
@build 30th December, 2016
@created 30th April, 2015
@package Component Builder
@subpackage publishing.php
@author Llewellyn van der Merwe <https://www.vdm.io/joomla-component-builder>
@author Llewellyn van der Merwe <http://vdm.bz/component-builder>
@copyright Copyright (C) 2015. All Rights Reserved
@license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html

View File

@ -10,12 +10,12 @@
|_|
/-------------------------------------------------------------------------------------------------------------------------------/
@version 2.2.3
@build 22nd November, 2016
@version 2.2.6
@build 30th December, 2016
@created 30th April, 2015
@package Component Builder
@subpackage publlshing.php
@author Llewellyn van der Merwe <https://www.vdm.io/joomla-component-builder>
@author Llewellyn van der Merwe <http://vdm.bz/component-builder>
@copyright Copyright (C) 2015. All Rights Reserved
@license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html

View File

@ -10,12 +10,12 @@
|_|
/-------------------------------------------------------------------------------------------------------------------------------/
@version 2.2.3
@build 22nd November, 2016
@version 2.2.6
@build 30th December, 2016
@created 30th April, 2015
@package Component Builder
@subpackage settings_above.php
@author Llewellyn van der Merwe <https://www.vdm.io/joomla-component-builder>
@author Llewellyn van der Merwe <http://vdm.bz/component-builder>
@copyright Copyright (C) 2015. All Rights Reserved
@license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html

View File

@ -10,12 +10,12 @@
|_|
/-------------------------------------------------------------------------------------------------------------------------------/
@version 2.2.3
@build 22nd November, 2016
@version 2.2.6
@build 30th December, 2016
@created 30th April, 2015
@package Component Builder
@subpackage settings_left.php
@author Llewellyn van der Merwe <https://www.vdm.io/joomla-component-builder>
@author Llewellyn van der Merwe <http://vdm.bz/component-builder>
@copyright Copyright (C) 2015. All Rights Reserved
@license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html

View File

@ -10,12 +10,12 @@
|_|
/-------------------------------------------------------------------------------------------------------------------------------/
@version 2.2.3
@build 22nd November, 2016
@version 2.2.6
@build 30th December, 2016
@created 30th April, 2015
@package Component Builder
@subpackage settings_right.php
@author Llewellyn van der Merwe <https://www.vdm.io/joomla-component-builder>
@author Llewellyn van der Merwe <http://vdm.bz/component-builder>
@copyright Copyright (C) 2015. All Rights Reserved
@license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html

View File

@ -10,12 +10,12 @@
|_|
/-------------------------------------------------------------------------------------------------------------------------------/
@version 2.2.3
@build 22nd November, 2016
@version 2.2.6
@build 30th December, 2016
@created 30th April, 2015
@package Component Builder
@subpackage settings_under.php
@author Llewellyn van der Merwe <https://www.vdm.io/joomla-component-builder>
@author Llewellyn van der Merwe <http://vdm.bz/component-builder>
@copyright Copyright (C) 2015. All Rights Reserved
@license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html

View File

@ -10,12 +10,12 @@
|_|
/-------------------------------------------------------------------------------------------------------------------------------/
@version 2.2.3
@build 22nd November, 2016
@version 2.2.6
@build 30th December, 2016
@created 30th April, 2015
@package Component Builder
@subpackage batchselection.php
@author Llewellyn van der Merwe <https://www.vdm.io/joomla-component-builder>
@author Llewellyn van der Merwe <http://vdm.bz/component-builder>
@copyright Copyright (C) 2015. All Rights Reserved
@license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html

View File

@ -10,12 +10,12 @@
|_|
/-------------------------------------------------------------------------------------------------------------------------------/
@version 2.2.3
@build 22nd November, 2016
@version 2.2.6
@build 30th December, 2016
@created 30th April, 2015
@package Component Builder
@subpackage admin_views_fullwidth.php
@author Llewellyn van der Merwe <https://www.vdm.io/joomla-component-builder>
@author Llewellyn van der Merwe <http://vdm.bz/component-builder>
@copyright Copyright (C) 2015. All Rights Reserved
@license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html
@ -28,7 +28,7 @@
defined('_JEXEC') or die('Restricted access');
// set the defaults
$items = $displayData->vwjadmin_views;
$items = $displayData->vwmadmin_views;
$user = JFactory::getUser();
$id = $displayData->item->id;
$edit = "index.php?option=com_componentbuilder&view=admin_views&task=admin_view.edit";

View File

@ -0,0 +1,138 @@
<?php
/*--------------------------------------------------------------------------------------------------------| www.vdm.io |------/
__ __ _ _____ _ _ __ __ _ _ _
\ \ / / | | | __ \ | | | | | \/ | | | | | | |
\ \ / /_ _ ___| |_ | | | | _____ _____| | ___ _ __ _ __ ___ ___ _ __ | |_ | \ / | ___| |_| |__ ___ __| |
\ \/ / _` / __| __| | | | |/ _ \ \ / / _ \ |/ _ \| '_ \| '_ ` _ \ / _ \ '_ \| __| | |\/| |/ _ \ __| '_ \ / _ \ / _` |
\ / (_| \__ \ |_ | |__| | __/\ V / __/ | (_) | |_) | | | | | | __/ | | | |_ | | | | __/ |_| | | | (_) | (_| |
\/ \__,_|___/\__| |_____/ \___| \_/ \___|_|\___/| .__/|_| |_| |_|\___|_| |_|\__| |_| |_|\___|\__|_| |_|\___/ \__,_|
| |
|_|
/-------------------------------------------------------------------------------------------------------------------------------/
@version 2.2.6
@build 30th December, 2016
@created 30th April, 2015
@package Component Builder
@subpackage custom_admin_views_fullwidth.php
@author Llewellyn van der Merwe <http://vdm.bz/component-builder>
@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 defaults
$items = $displayData->vwncustom_admin_views;
$user = JFactory::getUser();
$id = $displayData->item->id;
$edit = "index.php?option=com_componentbuilder&view=custom_admin_views&task=custom_admin_view.edit";
$ref = ($id) ? "&ref=component&refid=".$id : "";
$new = "index.php?option=com_componentbuilder&view=custom_admin_view&layout=edit".$ref;
$can = ComponentbuilderHelper::getActions('custom_admin_view');
?>
<div class="form-vertical">
<?php if ($can->get('core.create')): ?>
<a class="btn btn-small btn-success" href="<?php echo $new; ?>"><span class="icon-new icon-white"></span> <?php echo JText::_('COM_COMPONENTBUILDER_NEW'); ?></a><br /><br />
<?php endif; ?>
<?php if (ComponentbuilderHelper::checkArray($items)): ?>
<table class="footable table data custom_admin_views" data-show-toggle="true" data-toggle-column="first" data-sorting="true" data-paging="true" data-paging-size="20" data-filtering="true">
<thead>
<tr>
<th data-type="html" data-sort-use="text">
<?php echo JText::_('COM_COMPONENTBUILDER_CUSTOM_ADMIN_VIEW_SYSTEM_NAME_LABEL'); ?>
</th>
<th data-breakpoints="xs sm" data-type="html" data-sort-use="text">
<?php echo JText::_('COM_COMPONENTBUILDER_CUSTOM_ADMIN_VIEW_NAME_LABEL'); ?>
</th>
<th data-breakpoints="xs sm" data-type="html" data-sort-use="text">
<?php echo JText::_('COM_COMPONENTBUILDER_CUSTOM_ADMIN_VIEW_ALIAS_LABEL'); ?>
</th>
<th data-breakpoints="xs sm md" data-type="html" data-sort-use="text">
<?php echo JText::_('COM_COMPONENTBUILDER_CUSTOM_ADMIN_VIEW_DESCRIPTION_LABEL'); ?>
</th>
<th data-breakpoints="xs sm md" data-type="html" data-sort-use="text">
<?php echo JText::_('COM_COMPONENTBUILDER_CUSTOM_ADMIN_VIEW_SNIPPET_LABEL'); ?>
</th>
<th width="10" data-breakpoints="xs sm md">
<?php echo JText::_('COM_COMPONENTBUILDER_CUSTOM_ADMIN_VIEW_STATUS'); ?>
</th>
<th width="5" data-type="number" data-breakpoints="xs sm md">
<?php echo JText::_('COM_COMPONENTBUILDER_CUSTOM_ADMIN_VIEW_ID'); ?>
</th>
</tr>
</thead>
<tbody>
<?php foreach ($items as $i => $item): ?>
<?php
$canCheckin = $user->authorise('core.manage', 'com_checkin') || $item->checked_out == $user->id || $item->checked_out == 0;
$userChkOut = JFactory::getUser($item->checked_out);
$canDo = ComponentbuilderHelper::getActions('custom_admin_view',$item,'custom_admin_views');
?>
<tr>
<td class="nowrap">
<?php if ($canDo->get('core.edit')): ?>
<a href="<?php echo $edit; ?>&id=<?php echo $item->id; ?>&ref=component&refid=<?php echo $id; ?>"><?php echo $displayData->escape($item->system_name); ?></a>
<?php if ($item->checked_out): ?>
<?php echo JHtml::_('jgrid.checkedout', $i, $userChkOut->name, $item->checked_out_time, 'custom_admin_views.', $canCheckin); ?>
<?php endif; ?>
<?php else: ?>
<div class="name"><?php echo $displayData->escape($item->system_name); ?></div>
<?php endif; ?>
</td>
<td>
<?php echo $displayData->escape($item->name); ?>
</td>
<td>
<?php echo $displayData->escape($item->alias); ?>
</td>
<td>
<?php echo $displayData->escape($item->description); ?>
</td>
<td>
<?php echo $displayData->escape($item->snippet_name); ?>
</td>
<?php if ($item->published == 1):?>
<td class="center" data-sort-value="1">
<span class="status-metro status-published" title="<?php echo JText::_('PUBLISHED'); ?>">
<?php echo JText::_('PUBLISHED'); ?>
</span>
</td>
<?php elseif ($item->published == 0):?>
<td class="center" data-sort-value="2">
<span class="status-metro status-inactive" title="<?php echo JText::_('INACTIVE'); ?>">
<?php echo JText::_('INACTIVE'); ?>
</span>
</td>
<?php elseif ($item->published == 2):?>
<td class="center" data-sort-value="3">
<span class="status-metro status-archived" title="<?php echo JText::_('ARCHIVED'); ?>">
<?php echo JText::_('ARCHIVED'); ?>
</span>
</td>
<?php elseif ($item->published == -2):?>
<td class="center" data-sort-value="4">
<span class="status-metro status-trashed" title="<?php echo JText::_('ARCHIVED'); ?>">
<?php echo JText::_('ARCHIVED'); ?>
</span>
</td>
<?php endif; ?>
<td class="nowrap center hidden-phone">
<?php echo $item->id; ?>
</td>
</tr>
<?php endforeach; ?>
</tbody>
</table>
<?php else: ?>
<div class="alert alert-no-items">
<?php echo JText::_('JGLOBAL_NO_MATCHING_RESULTS'); ?>
</div>
<?php endif; ?>
</div>

View File

@ -10,12 +10,12 @@
|_|
/-------------------------------------------------------------------------------------------------------------------------------/
@version 2.2.3
@build 22nd November, 2016
@version 2.2.6
@build 30th December, 2016
@created 30th April, 2015
@package Component Builder
@subpackage details_above.php
@author Llewellyn van der Merwe <https://www.vdm.io/joomla-component-builder>
@author Llewellyn van der Merwe <http://vdm.bz/component-builder>
@copyright Copyright (C) 2015. All Rights Reserved
@license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html

View File

@ -10,12 +10,12 @@
|_|
/-------------------------------------------------------------------------------------------------------------------------------/
@version 2.2.3
@build 22nd November, 2016
@version 2.2.6
@build 30th December, 2016
@created 30th April, 2015
@package Component Builder
@subpackage details_left.php
@author Llewellyn van der Merwe <https://www.vdm.io/joomla-component-builder>
@author Llewellyn van der Merwe <http://vdm.bz/component-builder>
@copyright Copyright (C) 2015. All Rights Reserved
@license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html

View File

@ -10,12 +10,12 @@
|_|
/-------------------------------------------------------------------------------------------------------------------------------/
@version 2.2.3
@build 22nd November, 2016
@version 2.2.6
@build 30th December, 2016
@created 30th April, 2015
@package Component Builder
@subpackage details_right.php
@author Llewellyn van der Merwe <https://www.vdm.io/joomla-component-builder>
@author Llewellyn van der Merwe <http://vdm.bz/component-builder>
@copyright Copyright (C) 2015. All Rights Reserved
@license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html

View File

@ -10,12 +10,12 @@
|_|
/-------------------------------------------------------------------------------------------------------------------------------/
@version 2.2.3
@build 22nd November, 2016
@version 2.2.6
@build 30th December, 2016
@created 30th April, 2015
@package Component Builder
@subpackage details_under.php
@author Llewellyn van der Merwe <https://www.vdm.io/joomla-component-builder>
@author Llewellyn van der Merwe <http://vdm.bz/component-builder>
@copyright Copyright (C) 2015. All Rights Reserved
@license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html

Some files were not shown because too many files have changed in this diff Show More