Added the new placeholder area for global & component level placeholders. Just like customcode you can now with the placeholders generate dynamic behaviour with placeholders all over the JCB custom areas.

This commit is contained in:
Llewellyn van der Merwe 2019-02-16 00:03:21 +02:00
parent d46459301c
commit 25c14b45de
No known key found for this signature in database
GPG Key ID: CAD7B16D27AF28C5
84 changed files with 7147 additions and 42 deletions

View File

@ -12,7 +12,7 @@ The Component Builder for [Joomla](https://extensions.joomla.org/extension/compo
Whether you're a seasoned [Joomla](https://extensions.joomla.org/extension/component-builder/) developer, or have just started, Component Builder will safe you lots of time and money. A real must have!
You can install it quite easily and with no limitations. On [github](https://github.com/vdm-io/Joomla-Component-Builder/releases) is the latest release (2.9.11) with **ALL** its features and **ALL** concepts totally open-source and free!
You can install it quite easily and with no limitations. On [github](https://github.com/vdm-io/Joomla-Component-Builder/releases) is the latest release (2.9.13) with **ALL** its features and **ALL** concepts totally open-source and free!
> Watch Quick Build of a Hello World component in [JCB on Youtube](https://www.youtube.com/watch?v=IQfsLYIeblk&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&index=45)
@ -106,10 +106,11 @@ Where can you get support and help?
+ [German Basic Introduction](https://www.youtube.com/playlist?list=PLQRGFI8XZ_wu0tDFxJtZFwW7AxA4JHQV7)
+ [Hello World Tutorial](https://www.youtube.com/watch?v=IQfsLYIeblk&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&index=45)
+ [The JCB! Wiki](https://github.com/vdm-io/Joomla-Component-Builder/wiki)
+ [JCB Google Group/forum](https://vdm.bz/jcb-forum)
+ [Google Group](https://vdm.bz/jcb-forum)
+ [Report a Security Issue](http://joomlacomponentbuilder.com/report-security-issues)
+ [Community Complaint](http://joomlacomponentbuilder.com/community-complaint)
+ [Open Issue On Github](https://github.com/vdm-io/Joomla-Component-Builder/issues) ^^
+ [Telegram Group](https://t.me/jcb_group)
+ [JCB IRC Channel](https://vdm.bz/jcb-irc)
Since [JCB](http://joomlacomponentbuilder.com) has [become a community](https://github.com/vdm-io/Joomla-Component-Builder/blob/staging/.github/SUPPORT.md) project [VDM.io](https://www.vdm.io/) is **no longer solely responsible** for support.
@ -145,14 +146,14 @@ TODO
+ *Author*: [Llewellyn van der Merwe](mailto:llewellyn@joomlacomponentbuilder.com)
+ *Name*: [Component Builder](https://github.com/vdm-io/Joomla-Component-Builder)
+ *First Build*: 30th April, 2015
+ *Last Build*: 12th February, 2019
+ *Version*: 2.9.11
+ *Last Build*: 15th February, 2019
+ *Version*: 2.9.13
+ *Copyright*: Copyright (C) 2015 - 2018 Vast Development Method. All rights reserved.
+ *License*: GNU General Public License version 2 or later; see LICENSE.txt
+ *Line count*: **195897**
+ *Field count*: **1089**
+ *File count*: **1277**
+ *Folder count*: **201**
+ *Line count*: **202937**
+ *Field count*: **1113**
+ *File count*: **1336**
+ *Folder count*: **209**
> This **component** was build with a [Joomla](https://extensions.joomla.org/extension/component-builder/) [Automated Component Builder](http://joomlacomponentbuilder.com).
> Developed by [Llewellyn van der Merwe](mailto:llewellyn@joomlacomponentbuilder.com)

View File

@ -12,7 +12,7 @@ The Component Builder for [Joomla](https://extensions.joomla.org/extension/compo
Whether you're a seasoned [Joomla](https://extensions.joomla.org/extension/component-builder/) developer, or have just started, Component Builder will safe you lots of time and money. A real must have!
You can install it quite easily and with no limitations. On [github](https://github.com/vdm-io/Joomla-Component-Builder/releases) is the latest release (2.9.11) with **ALL** its features and **ALL** concepts totally open-source and free!
You can install it quite easily and with no limitations. On [github](https://github.com/vdm-io/Joomla-Component-Builder/releases) is the latest release (2.9.13) with **ALL** its features and **ALL** concepts totally open-source and free!
> Watch Quick Build of a Hello World component in [JCB on Youtube](https://www.youtube.com/watch?v=IQfsLYIeblk&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&index=45)
@ -106,10 +106,11 @@ Where can you get support and help?
+ [German Basic Introduction](https://www.youtube.com/playlist?list=PLQRGFI8XZ_wu0tDFxJtZFwW7AxA4JHQV7)
+ [Hello World Tutorial](https://www.youtube.com/watch?v=IQfsLYIeblk&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&index=45)
+ [The JCB! Wiki](https://github.com/vdm-io/Joomla-Component-Builder/wiki)
+ [JCB Google Group/forum](https://vdm.bz/jcb-forum)
+ [Google Group](https://vdm.bz/jcb-forum)
+ [Report a Security Issue](http://joomlacomponentbuilder.com/report-security-issues)
+ [Community Complaint](http://joomlacomponentbuilder.com/community-complaint)
+ [Open Issue On Github](https://github.com/vdm-io/Joomla-Component-Builder/issues) ^^
+ [Telegram Group](https://t.me/jcb_group)
+ [JCB IRC Channel](https://vdm.bz/jcb-irc)
Since [JCB](http://joomlacomponentbuilder.com) has [become a community](https://github.com/vdm-io/Joomla-Component-Builder/blob/staging/.github/SUPPORT.md) project [VDM.io](https://www.vdm.io/) is **no longer solely responsible** for support.
@ -145,14 +146,14 @@ TODO
+ *Author*: [Llewellyn van der Merwe](mailto:llewellyn@joomlacomponentbuilder.com)
+ *Name*: [Component Builder](https://github.com/vdm-io/Joomla-Component-Builder)
+ *First Build*: 30th April, 2015
+ *Last Build*: 12th February, 2019
+ *Version*: 2.9.11
+ *Last Build*: 15th February, 2019
+ *Version*: 2.9.13
+ *Copyright*: Copyright (C) 2015 - 2018 Vast Development Method. All rights reserved.
+ *License*: GNU General Public License version 2 or later; see LICENSE.txt
+ *Line count*: **195897**
+ *Field count*: **1089**
+ *File count*: **1277**
+ *Folder count*: **201**
+ *Line count*: **202937**
+ *Field count*: **1113**
+ *File count*: **1336**
+ *Folder count*: **209**
> This **component** was build with a [Joomla](https://extensions.joomla.org/extension/component-builder/) [Automated Component Builder](http://joomlacomponentbuilder.com).
> Developed by [Llewellyn van der Merwe](mailto:llewellyn@joomlacomponentbuilder.com)

View File

@ -146,6 +146,16 @@
<action name="component_mysql_tweaks.edit.own" title="COM_COMPONENTBUILDER_COMPONENTS_MYSQL_TWEAKS_EDIT_OWN" description="COM_COMPONENTBUILDER_COMPONENTS_MYSQL_TWEAKS_EDIT_OWN_DESC" />
<action name="component_mysql_tweaks.edit.state" title="COM_COMPONENTBUILDER_COMPONENTS_MYSQL_TWEAKS_EDIT_STATE" description="COM_COMPONENTBUILDER_COMPONENTS_MYSQL_TWEAKS_EDIT_STATE_DESC" />
<action name="component_mysql_tweaks.version" title="COM_COMPONENTBUILDER_COMPONENTS_MYSQL_TWEAKS_EDIT_VERSION" description="COM_COMPONENTBUILDER_COMPONENTS_MYSQL_TWEAKS_EDIT_VERSION_DESC" />
<action name="component_placeholders.access" title="COM_COMPONENTBUILDER_COMPONENTS_PLACEHOLDERS_ACCESS" description="COM_COMPONENTBUILDER_COMPONENTS_PLACEHOLDERS_ACCESS_DESC" />
<action name="component_placeholders.batch" title="COM_COMPONENTBUILDER_COMPONENTS_PLACEHOLDERS_BATCH_USE" description="COM_COMPONENTBUILDER_COMPONENTS_PLACEHOLDERS_BATCH_USE_DESC" />
<action name="component_placeholders.create" title="COM_COMPONENTBUILDER_COMPONENTS_PLACEHOLDERS_CREATE" description="COM_COMPONENTBUILDER_COMPONENTS_PLACEHOLDERS_CREATE_DESC" />
<action name="component_placeholders.delete" title="COM_COMPONENTBUILDER_COMPONENTS_PLACEHOLDERS_DELETE" description="COM_COMPONENTBUILDER_COMPONENTS_PLACEHOLDERS_DELETE_DESC" />
<action name="component_placeholders.edit" title="COM_COMPONENTBUILDER_COMPONENTS_PLACEHOLDERS_EDIT" description="COM_COMPONENTBUILDER_COMPONENTS_PLACEHOLDERS_EDIT_DESC" />
<action name="component_placeholders.edit.created_by" title="COM_COMPONENTBUILDER_COMPONENTS_PLACEHOLDERS_EDIT_CREATED_BY" description="COM_COMPONENTBUILDER_COMPONENTS_PLACEHOLDERS_EDIT_CREATED_BY_DESC" />
<action name="component_placeholders.edit.created" title="COM_COMPONENTBUILDER_COMPONENTS_PLACEHOLDERS_EDIT_CREATED_DATE" description="COM_COMPONENTBUILDER_COMPONENTS_PLACEHOLDERS_EDIT_CREATED_DATE_DESC" />
<action name="component_placeholders.edit.own" title="COM_COMPONENTBUILDER_COMPONENTS_PLACEHOLDERS_EDIT_OWN" description="COM_COMPONENTBUILDER_COMPONENTS_PLACEHOLDERS_EDIT_OWN_DESC" />
<action name="component_placeholders.edit.state" title="COM_COMPONENTBUILDER_COMPONENTS_PLACEHOLDERS_EDIT_STATE" description="COM_COMPONENTBUILDER_COMPONENTS_PLACEHOLDERS_EDIT_STATE_DESC" />
<action name="component_placeholders.version" title="COM_COMPONENTBUILDER_COMPONENTS_PLACEHOLDERS_EDIT_VERSION" description="COM_COMPONENTBUILDER_COMPONENTS_PLACEHOLDERS_EDIT_VERSION_DESC" />
<action name="component_site_views.access" title="COM_COMPONENTBUILDER_COMPONENTS_SITE_VIEWS_ACCESS" description="COM_COMPONENTBUILDER_COMPONENTS_SITE_VIEWS_ACCESS_DESC" />
<action name="component_site_views.batch" title="COM_COMPONENTBUILDER_COMPONENTS_SITE_VIEWS_BATCH_USE" description="COM_COMPONENTBUILDER_COMPONENTS_SITE_VIEWS_BATCH_USE_DESC" />
<action name="component_site_views.create" title="COM_COMPONENTBUILDER_COMPONENTS_SITE_VIEWS_CREATE" description="COM_COMPONENTBUILDER_COMPONENTS_SITE_VIEWS_CREATE_DESC" />
@ -221,7 +231,6 @@
<action name="fieldtype.access" title="COM_COMPONENTBUILDER_FIELDTYPES_ACCESS" description="COM_COMPONENTBUILDER_FIELDTYPES_ACCESS_DESC" />
<action name="fieldtype.batch" title="COM_COMPONENTBUILDER_FIELDTYPES_BATCH_USE" description="COM_COMPONENTBUILDER_FIELDTYPES_BATCH_USE_DESC" />
<action name="fieldtype.create" title="COM_COMPONENTBUILDER_FIELDTYPES_CREATE" description="COM_COMPONENTBUILDER_FIELDTYPES_CREATE_DESC" />
<action name="fieldtype.dashboard_add" title="COM_COMPONENTBUILDER_FIELDTYPES_DASHBOARD_ADD" description="COM_COMPONENTBUILDER_FIELDTYPES_DASHBOARD_ADD_DESC" />
<action name="fieldtype.dashboard_list" title="COM_COMPONENTBUILDER_FIELDTYPES_DASHBOARD_LIST" description="COM_COMPONENTBUILDER_FIELDTYPES_DASHBOARD_LIST_DESC" />
<action name="fieldtype.delete" title="COM_COMPONENTBUILDER_FIELDTYPES_DELETE" description="COM_COMPONENTBUILDER_FIELDTYPES_DELETE_DESC" />
<action name="fieldtype.edit" title="COM_COMPONENTBUILDER_FIELDTYPES_EDIT" description="COM_COMPONENTBUILDER_FIELDTYPES_EDIT_DESC" />
@ -339,6 +348,18 @@
<action name="library_files_folders_urls.version" title="COM_COMPONENTBUILDER_LIBRARIES_FILES_FOLDERS_URLS_EDIT_VERSION" description="COM_COMPONENTBUILDER_LIBRARIES_FILES_FOLDERS_URLS_EDIT_VERSION_DESC" />
<action name="library.submenu" title="COM_COMPONENTBUILDER_LIBRARIES_SUBMENU" description="COM_COMPONENTBUILDER_LIBRARIES_SUBMENU_DESC" />
<action name="library.get_snippets" title="COM_COMPONENTBUILDER_LIBRARY_GET_SNIPPETS_BUTTON_ACCESS" description="COM_COMPONENTBUILDER_LIBRARY_GET_SNIPPETS_BUTTON_ACCESS_DESC" />
<action name="placeholder.access" title="COM_COMPONENTBUILDER_PLACEHOLDERS_ACCESS" description="COM_COMPONENTBUILDER_PLACEHOLDERS_ACCESS_DESC" />
<action name="placeholder.batch" title="COM_COMPONENTBUILDER_PLACEHOLDERS_BATCH_USE" description="COM_COMPONENTBUILDER_PLACEHOLDERS_BATCH_USE_DESC" />
<action name="placeholder.create" title="COM_COMPONENTBUILDER_PLACEHOLDERS_CREATE" description="COM_COMPONENTBUILDER_PLACEHOLDERS_CREATE_DESC" />
<action name="placeholder.dashboard_list" title="COM_COMPONENTBUILDER_PLACEHOLDERS_DASHBOARD_LIST" description="COM_COMPONENTBUILDER_PLACEHOLDERS_DASHBOARD_LIST_DESC" />
<action name="placeholder.delete" title="COM_COMPONENTBUILDER_PLACEHOLDERS_DELETE" description="COM_COMPONENTBUILDER_PLACEHOLDERS_DELETE_DESC" />
<action name="placeholder.edit" title="COM_COMPONENTBUILDER_PLACEHOLDERS_EDIT" description="COM_COMPONENTBUILDER_PLACEHOLDERS_EDIT_DESC" />
<action name="placeholder.edit.own" title="COM_COMPONENTBUILDER_PLACEHOLDERS_EDIT_OWN" description="COM_COMPONENTBUILDER_PLACEHOLDERS_EDIT_OWN_DESC" />
<action name="placeholder.edit.state" title="COM_COMPONENTBUILDER_PLACEHOLDERS_EDIT_STATE" description="COM_COMPONENTBUILDER_PLACEHOLDERS_EDIT_STATE_DESC" />
<action name="placeholder.version" title="COM_COMPONENTBUILDER_PLACEHOLDERS_EDIT_VERSION" description="COM_COMPONENTBUILDER_PLACEHOLDERS_EDIT_VERSION_DESC" />
<action name="placeholder.export" title="COM_COMPONENTBUILDER_PLACEHOLDERS_EXPORT" description="COM_COMPONENTBUILDER_PLACEHOLDERS_EXPORT_DESC" />
<action name="placeholder.import" title="COM_COMPONENTBUILDER_PLACEHOLDERS_IMPORT" description="COM_COMPONENTBUILDER_PLACEHOLDERS_IMPORT_DESC" />
<action name="placeholder.submenu" title="COM_COMPONENTBUILDER_PLACEHOLDERS_SUBMENU" description="COM_COMPONENTBUILDER_PLACEHOLDERS_SUBMENU_DESC" />
<action name="server.access" title="COM_COMPONENTBUILDER_SERVERS_ACCESS" description="COM_COMPONENTBUILDER_SERVERS_ACCESS_DESC" />
<action name="server.batch" title="COM_COMPONENTBUILDER_SERVERS_BATCH_USE" description="COM_COMPONENTBUILDER_SERVERS_BATCH_USE_DESC" />
<action name="server.create" title="COM_COMPONENTBUILDER_SERVERS_CREATE" description="COM_COMPONENTBUILDER_SERVERS_CREATE_DESC" />
@ -479,6 +500,15 @@
<action name="custom_code.access" title="COM_COMPONENTBUILDER_CUSTOM_CODES_ACCESS" description="COM_COMPONENTBUILDER_CUSTOM_CODES_ACCESS_DESC" />
<action name="custom_code.version" title="COM_COMPONENTBUILDER_CUSTOM_CODES_EDIT_VERSION" description="COM_COMPONENTBUILDER_CUSTOM_CODES_EDIT_VERSION_DESC" />
</section>
<section name="placeholder">
<action name="placeholder.edit" title="COM_COMPONENTBUILDER_PLACEHOLDERS_EDIT" description="COM_COMPONENTBUILDER_PLACEHOLDERS_EDIT_DESC" />
<action name="placeholder.edit.state" title="COM_COMPONENTBUILDER_PLACEHOLDERS_EDIT_STATE" description="COM_COMPONENTBUILDER_PLACEHOLDERS_EDIT_STATE_DESC" />
<action name="placeholder.edit.own" title="COM_COMPONENTBUILDER_PLACEHOLDERS_EDIT_OWN" description="COM_COMPONENTBUILDER_PLACEHOLDERS_EDIT_OWN_DESC" />
<action name="placeholder.create" title="COM_COMPONENTBUILDER_PLACEHOLDERS_CREATE" description="COM_COMPONENTBUILDER_PLACEHOLDERS_CREATE_DESC" />
<action name="placeholder.delete" title="COM_COMPONENTBUILDER_PLACEHOLDERS_DELETE" description="COM_COMPONENTBUILDER_PLACEHOLDERS_DELETE_DESC" />
<action name="placeholder.access" title="COM_COMPONENTBUILDER_PLACEHOLDERS_ACCESS" description="COM_COMPONENTBUILDER_PLACEHOLDERS_ACCESS_DESC" />
<action name="placeholder.version" title="COM_COMPONENTBUILDER_PLACEHOLDERS_EDIT_VERSION" description="COM_COMPONENTBUILDER_PLACEHOLDERS_EDIT_VERSION_DESC" />
</section>
<section name="library">
<action name="library.edit" title="COM_COMPONENTBUILDER_LIBRARIES_EDIT" description="COM_COMPONENTBUILDER_LIBRARIES_EDIT_DESC" />
<action name="library.edit.own" title="COM_COMPONENTBUILDER_LIBRARIES_EDIT_OWN" description="COM_COMPONENTBUILDER_LIBRARIES_EDIT_OWN_DESC" />
@ -709,6 +739,17 @@
<action name="component_files_folders.access" title="COM_COMPONENTBUILDER_COMPONENTS_FILES_FOLDERS_ACCESS" description="COM_COMPONENTBUILDER_COMPONENTS_FILES_FOLDERS_ACCESS_DESC" />
<action name="component_files_folders.version" title="COM_COMPONENTBUILDER_COMPONENTS_FILES_FOLDERS_EDIT_VERSION" description="COM_COMPONENTBUILDER_COMPONENTS_FILES_FOLDERS_EDIT_VERSION_DESC" />
</section>
<section name="component_placeholders">
<action name="component_placeholders.edit" title="COM_COMPONENTBUILDER_COMPONENTS_PLACEHOLDERS_EDIT" description="COM_COMPONENTBUILDER_COMPONENTS_PLACEHOLDERS_EDIT_DESC" />
<action name="component_placeholders.edit.own" title="COM_COMPONENTBUILDER_COMPONENTS_PLACEHOLDERS_EDIT_OWN" description="COM_COMPONENTBUILDER_COMPONENTS_PLACEHOLDERS_EDIT_OWN_DESC" />
<action name="component_placeholders.edit.state" title="COM_COMPONENTBUILDER_COMPONENTS_PLACEHOLDERS_EDIT_STATE" description="COM_COMPONENTBUILDER_COMPONENTS_PLACEHOLDERS_EDIT_STATE_DESC" />
<action name="component_placeholders.edit.created_by" title="COM_COMPONENTBUILDER_COMPONENTS_PLACEHOLDERS_EDIT_CREATED_BY" description="COM_COMPONENTBUILDER_COMPONENTS_PLACEHOLDERS_EDIT_CREATED_BY_DESC" />
<action name="component_placeholders.edit.created" title="COM_COMPONENTBUILDER_COMPONENTS_PLACEHOLDERS_EDIT_CREATED_DATE" description="COM_COMPONENTBUILDER_COMPONENTS_PLACEHOLDERS_EDIT_CREATED_DATE_DESC" />
<action name="component_placeholders.create" title="COM_COMPONENTBUILDER_COMPONENTS_PLACEHOLDERS_CREATE" description="COM_COMPONENTBUILDER_COMPONENTS_PLACEHOLDERS_CREATE_DESC" />
<action name="component_placeholders.delete" title="COM_COMPONENTBUILDER_COMPONENTS_PLACEHOLDERS_DELETE" description="COM_COMPONENTBUILDER_COMPONENTS_PLACEHOLDERS_DELETE_DESC" />
<action name="component_placeholders.access" title="COM_COMPONENTBUILDER_COMPONENTS_PLACEHOLDERS_ACCESS" description="COM_COMPONENTBUILDER_COMPONENTS_PLACEHOLDERS_ACCESS_DESC" />
<action name="component_placeholders.version" title="COM_COMPONENTBUILDER_COMPONENTS_PLACEHOLDERS_EDIT_VERSION" description="COM_COMPONENTBUILDER_COMPONENTS_PLACEHOLDERS_EDIT_VERSION_DESC" />
</section>
<section name="snippet_type">
<action name="snippet_type.edit" title="COM_COMPONENTBUILDER_SNIPPET_TYPES_EDIT" description="COM_COMPONENTBUILDER_SNIPPET_TYPES_EDIT_DESC" />
<action name="snippet_type.edit.own" title="COM_COMPONENTBUILDER_SNIPPET_TYPES_EDIT_OWN" description="COM_COMPONENTBUILDER_SNIPPET_TYPES_EDIT_OWN_DESC" />

View File

@ -0,0 +1,13 @@
/**
* @package Joomla.Component.Builder
*
* @created 30th April, 2015
* @author Llewellyn van der Merwe <http://www.joomlacomponentbuilder.com>
* @github Joomla Component Builder <https://github.com/vdm-io/Joomla-Component-Builder>
* @copyright Copyright (C) 2015 - 2018 Vast Development Method. All rights reserved.
* @license GNU General Public License version 2 or later; see LICENSE.txt
*/
/* CSS Document */

View File

@ -0,0 +1,13 @@
/**
* @package Joomla.Component.Builder
*
* @created 30th April, 2015
* @author Llewellyn van der Merwe <http://www.joomlacomponentbuilder.com>
* @github Joomla Component Builder <https://github.com/vdm-io/Joomla-Component-Builder>
* @copyright Copyright (C) 2015 - 2018 Vast Development Method. All rights reserved.
* @license GNU General Public License version 2 or later; see LICENSE.txt
*/
/* CSS Document */

View File

@ -0,0 +1,13 @@
/**
* @package Joomla.Component.Builder
*
* @created 30th April, 2015
* @author Llewellyn van der Merwe <http://www.joomlacomponentbuilder.com>
* @github Joomla Component Builder <https://github.com/vdm-io/Joomla-Component-Builder>
* @copyright Copyright (C) 2015 - 2018 Vast Development Method. All rights reserved.
* @license GNU General Public License version 2 or later; see LICENSE.txt
*/
/* CSS Document */

View File

@ -0,0 +1,13 @@
/**
* @package Joomla.Component.Builder
*
* @created 30th April, 2015
* @author Llewellyn van der Merwe <http://www.joomlacomponentbuilder.com>
* @github Joomla Component Builder <https://github.com/vdm-io/Joomla-Component-Builder>
* @copyright Copyright (C) 2015 - 2018 Vast Development Method. All rights reserved.
* @license GNU General Public License version 2 or later; see LICENSE.txt
*/
/* CSS Document */

Binary file not shown.

Before

Width:  |  Height:  |  Size: 24 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 13 KiB

View File

@ -98,6 +98,7 @@ class ComponentbuilderController extends JControllerLegacy
'layout' => 'layouts',
'dynamic_get' => 'dynamic_gets',
'custom_code' => 'custom_codes',
'placeholder' => 'placeholders',
'library' => 'libraries',
'snippet' => 'snippets',
'validation_rule' => 'validation_rules',
@ -120,6 +121,7 @@ class ComponentbuilderController extends JControllerLegacy
'component_config' => 'components_config',
'component_dashboard' => 'components_dashboard',
'component_files_folders' => 'components_files_folders',
'component_placeholders' => 'components_placeholders',
'snippet_type' => 'snippet_types',
'library_config' => 'libraries_config',
'library_files_folders_urls' => 'libraries_files_folders_urls'

View File

@ -0,0 +1,321 @@
<?php
/**
* @package Joomla.Component.Builder
*
* @created 30th April, 2015
* @author Llewellyn van der Merwe <http://www.joomlacomponentbuilder.com>
* @github Joomla Component Builder <https://github.com/vdm-io/Joomla-Component-Builder>
* @copyright Copyright (C) 2015 - 2018 Vast Development Method. All rights reserved.
* @license GNU General Public License version 2 or later; see LICENSE.txt
*/
// No direct access to this file
defined('_JEXEC') or die('Restricted access');
/**
* Component_placeholders Controller
*/
class ComponentbuilderControllerComponent_placeholders extends JControllerForm
{
/**
* Current or most recently performed task.
*
* @var string
* @since 12.2
* @note Replaces _task.
*/
protected $task;
/**
* Class constructor.
*
* @param array $config A named array of configuration variables.
*
* @since 1.6
*/
public function __construct($config = array())
{
$this->view_list = 'Components_placeholders'; // safeguard for setting the return view listing to the main view.
parent::__construct($config);
}
/**
* Method override to check if you can add a new record.
*
* @param array $data An array of input data.
*
* @return boolean
*
* @since 1.6
*/
protected function allowAdd($data = array())
{
// Get user object.
$user = JFactory::getUser();
// Access check.
$access = $user->authorise('component_placeholders.access', 'com_componentbuilder');
if (!$access)
{
return false;
}
// In the absense of better information, revert to the component permissions.
return $user->authorise('component_placeholders.create', $this->option);
}
/**
* Method override to check if you can edit an existing record.
*
* @param array $data An array of input data.
* @param string $key The name of the key for the primary key.
*
* @return boolean
*
* @since 1.6
*/
protected function allowEdit($data = array(), $key = 'id')
{
// get user object.
$user = JFactory::getUser();
// get record id.
$recordId = (int) isset($data[$key]) ? $data[$key] : 0;
// Access check.
$access = ($user->authorise('component_placeholders.access', 'com_componentbuilder.component_placeholders.' . (int) $recordId) && $user->authorise('component_placeholders.access', 'com_componentbuilder'));
if (!$access)
{
return false;
}
if ($recordId)
{
// The record has been set. Check the record permissions.
$permission = $user->authorise('component_placeholders.edit', 'com_componentbuilder.component_placeholders.' . (int) $recordId);
if (!$permission)
{
if ($user->authorise('component_placeholders.edit.own', 'com_componentbuilder.component_placeholders.' . $recordId))
{
// Now test the owner is the user.
$ownerId = (int) isset($data['created_by']) ? $data['created_by'] : 0;
if (empty($ownerId))
{
// Need to do a lookup from the model.
$record = $this->getModel()->getItem($recordId);
if (empty($record))
{
return false;
}
$ownerId = $record->created_by;
}
// If the owner matches 'me' then allow.
if ($ownerId == $user->id)
{
if ($user->authorise('component_placeholders.edit.own', 'com_componentbuilder'))
{
return true;
}
}
}
return false;
}
}
// Since there is no permission, revert to the component permissions.
return $user->authorise('component_placeholders.edit', $this->option);
}
/**
* Gets the URL arguments to append to an item redirect.
*
* @param integer $recordId The primary key id for the item.
* @param string $urlVar The name of the URL variable for the id.
*
* @return string The arguments to append to the redirect URL.
*
* @since 1.6
*/
protected function getRedirectToItemAppend($recordId = null, $urlVar = 'id')
{
// get the referral options (old method use return instead see parent)
$ref = $this->input->get('ref', 0, 'string');
$refid = $this->input->get('refid', 0, 'int');
// get redirect info.
$append = parent::getRedirectToItemAppend($recordId, $urlVar);
// set the referral options
if ($refid && $ref)
{
$append = '&ref=' . (string)$ref . '&refid='. (int)$refid . $append;
}
elseif ($ref)
{
$append = '&ref='. (string)$ref . $append;
}
return $append;
}
/**
* Method to run batch operations.
*
* @param object $model The model.
*
* @return boolean True if successful, false otherwise and internal error is set.
*
* @since 2.5
*/
public function batch($model = null)
{
JSession::checkToken() or jexit(JText::_('JINVALID_TOKEN'));
// Set the model
$model = $this->getModel('Component_placeholders', '', array());
// Preset the redirect
$this->setRedirect(JRoute::_('index.php?option=com_componentbuilder&view=components_placeholders' . $this->getRedirectToListAppend(), false));
return parent::batch($model);
}
/**
* Method to cancel an edit.
*
* @param string $key The name of the primary key of the URL variable.
*
* @return boolean True if access level checks pass, false otherwise.
*
* @since 12.2
*/
public function cancel($key = null)
{
// get the referral options
$this->ref = $this->input->get('ref', 0, 'word');
$this->refid = $this->input->get('refid', 0, 'int');
// Check if there is a return value
$return = $this->input->get('return', null, 'base64');
$cancel = parent::cancel($key);
if (!is_null($return) && JUri::isInternal(base64_decode($return)))
{
$redirect = base64_decode($return);
// Redirect to the return value.
$this->setRedirect(
JRoute::_(
$redirect, false
)
);
}
elseif ($this->refid && $this->ref)
{
$redirect = '&view=' . (string)$this->ref . '&layout=edit&id=' . (int)$this->refid;
// Redirect to the item screen.
$this->setRedirect(
JRoute::_(
'index.php?option=' . $this->option . $redirect, false
)
);
}
elseif ($this->ref)
{
$redirect = '&view='.(string)$this->ref;
// Redirect to the list screen.
$this->setRedirect(
JRoute::_(
'index.php?option=' . $this->option . $redirect, false
)
);
}
return $cancel;
}
/**
* Method to save a record.
*
* @param string $key The name of the primary key of the URL variable.
* @param string $urlVar The name of the URL variable if different from the primary key (sometimes required to avoid router collisions).
*
* @return boolean True if successful, false otherwise.
*
* @since 12.2
*/
public function save($key = null, $urlVar = null)
{
// get the referral options
$this->ref = $this->input->get('ref', 0, 'word');
$this->refid = $this->input->get('refid', 0, 'int');
// Check if there is a return value
$return = $this->input->get('return', null, 'base64');
$canReturn = (!is_null($return) && JUri::isInternal(base64_decode($return)));
if ($this->ref || $this->refid || $canReturn)
{
// to make sure the item is checkedin on redirect
$this->task = 'save';
}
$saved = parent::save($key, $urlVar);
// This is not needed since parent save already does this
// Due to the ref and refid implementation we need to add this
if ($canReturn)
{
$redirect = base64_decode($return);
// Redirect to the return value.
$this->setRedirect(
JRoute::_(
$redirect, false
)
);
}
elseif ($this->refid && $this->ref)
{
$redirect = '&view=' . (string)$this->ref . '&layout=edit&id=' . (int)$this->refid;
// Redirect to the item screen.
$this->setRedirect(
JRoute::_(
'index.php?option=' . $this->option . $redirect, false
)
);
}
elseif ($this->ref)
{
$redirect = '&view=' . (string)$this->ref;
// Redirect to the list screen.
$this->setRedirect(
JRoute::_(
'index.php?option=' . $this->option . $redirect, false
)
);
}
return $saved;
}
/**
* Function that allows child controller access to model data
* after the data has been saved.
*
* @param JModel &$model The data model object.
* @param array $validData The validated data.
*
* @return void
*
* @since 11.1
*/
protected function postSaveHook(JModelLegacy $model, $validData = array())
{
return;
}
}

View File

@ -0,0 +1,43 @@
<?php
/**
* @package Joomla.Component.Builder
*
* @created 30th April, 2015
* @author Llewellyn van der Merwe <http://www.joomlacomponentbuilder.com>
* @github Joomla Component Builder <https://github.com/vdm-io/Joomla-Component-Builder>
* @copyright Copyright (C) 2015 - 2018 Vast Development Method. All rights reserved.
* @license GNU General Public License version 2 or later; see LICENSE.txt
*/
// No direct access to this file
defined('_JEXEC') or die('Restricted access');
/**
* Components_placeholders Controller
*/
class ComponentbuilderControllerComponents_placeholders extends JControllerAdmin
{
/**
* The prefix to use with controller messages.
*
* @var string
* @since 1.6
*/
protected $text_prefix = 'COM_COMPONENTBUILDER_COMPONENTS_PLACEHOLDERS';
/**
* Method to get a model object, loading it if required.
*
* @param string $name The model name. Optional.
* @param string $prefix The class prefix. Optional.
* @param array $config Configuration array for model. Optional.
*
* @return JModelLegacy The model.
*
* @since 1.6
*/
public function getModel($name = 'Component_placeholders', $prefix = 'ComponentbuilderModel', $config = array('ignore_request' => true))
{
return parent::getModel($name, $prefix, $config);
}
}

View File

@ -0,0 +1,321 @@
<?php
/**
* @package Joomla.Component.Builder
*
* @created 30th April, 2015
* @author Llewellyn van der Merwe <http://www.joomlacomponentbuilder.com>
* @github Joomla Component Builder <https://github.com/vdm-io/Joomla-Component-Builder>
* @copyright Copyright (C) 2015 - 2018 Vast Development Method. All rights reserved.
* @license GNU General Public License version 2 or later; see LICENSE.txt
*/
// No direct access to this file
defined('_JEXEC') or die('Restricted access');
/**
* Placeholder Controller
*/
class ComponentbuilderControllerPlaceholder extends JControllerForm
{
/**
* Current or most recently performed task.
*
* @var string
* @since 12.2
* @note Replaces _task.
*/
protected $task;
/**
* Class constructor.
*
* @param array $config A named array of configuration variables.
*
* @since 1.6
*/
public function __construct($config = array())
{
$this->view_list = 'Placeholders'; // safeguard for setting the return view listing to the main view.
parent::__construct($config);
}
/**
* Method override to check if you can add a new record.
*
* @param array $data An array of input data.
*
* @return boolean
*
* @since 1.6
*/
protected function allowAdd($data = array())
{
// Get user object.
$user = JFactory::getUser();
// Access check.
$access = $user->authorise('placeholder.access', 'com_componentbuilder');
if (!$access)
{
return false;
}
// In the absense of better information, revert to the component permissions.
return $user->authorise('placeholder.create', $this->option);
}
/**
* Method override to check if you can edit an existing record.
*
* @param array $data An array of input data.
* @param string $key The name of the key for the primary key.
*
* @return boolean
*
* @since 1.6
*/
protected function allowEdit($data = array(), $key = 'id')
{
// get user object.
$user = JFactory::getUser();
// get record id.
$recordId = (int) isset($data[$key]) ? $data[$key] : 0;
// Access check.
$access = ($user->authorise('placeholder.access', 'com_componentbuilder.placeholder.' . (int) $recordId) && $user->authorise('placeholder.access', 'com_componentbuilder'));
if (!$access)
{
return false;
}
if ($recordId)
{
// The record has been set. Check the record permissions.
$permission = $user->authorise('placeholder.edit', 'com_componentbuilder.placeholder.' . (int) $recordId);
if (!$permission)
{
if ($user->authorise('placeholder.edit.own', 'com_componentbuilder.placeholder.' . $recordId))
{
// Now test the owner is the user.
$ownerId = (int) isset($data['created_by']) ? $data['created_by'] : 0;
if (empty($ownerId))
{
// Need to do a lookup from the model.
$record = $this->getModel()->getItem($recordId);
if (empty($record))
{
return false;
}
$ownerId = $record->created_by;
}
// If the owner matches 'me' then allow.
if ($ownerId == $user->id)
{
if ($user->authorise('placeholder.edit.own', 'com_componentbuilder'))
{
return true;
}
}
}
return false;
}
}
// Since there is no permission, revert to the component permissions.
return $user->authorise('placeholder.edit', $this->option);
}
/**
* Gets the URL arguments to append to an item redirect.
*
* @param integer $recordId The primary key id for the item.
* @param string $urlVar The name of the URL variable for the id.
*
* @return string The arguments to append to the redirect URL.
*
* @since 1.6
*/
protected function getRedirectToItemAppend($recordId = null, $urlVar = 'id')
{
// get the referral options (old method use return instead see parent)
$ref = $this->input->get('ref', 0, 'string');
$refid = $this->input->get('refid', 0, 'int');
// get redirect info.
$append = parent::getRedirectToItemAppend($recordId, $urlVar);
// set the referral options
if ($refid && $ref)
{
$append = '&ref=' . (string)$ref . '&refid='. (int)$refid . $append;
}
elseif ($ref)
{
$append = '&ref='. (string)$ref . $append;
}
return $append;
}
/**
* Method to run batch operations.
*
* @param object $model The model.
*
* @return boolean True if successful, false otherwise and internal error is set.
*
* @since 2.5
*/
public function batch($model = null)
{
JSession::checkToken() or jexit(JText::_('JINVALID_TOKEN'));
// Set the model
$model = $this->getModel('Placeholder', '', array());
// Preset the redirect
$this->setRedirect(JRoute::_('index.php?option=com_componentbuilder&view=placeholders' . $this->getRedirectToListAppend(), false));
return parent::batch($model);
}
/**
* Method to cancel an edit.
*
* @param string $key The name of the primary key of the URL variable.
*
* @return boolean True if access level checks pass, false otherwise.
*
* @since 12.2
*/
public function cancel($key = null)
{
// get the referral options
$this->ref = $this->input->get('ref', 0, 'word');
$this->refid = $this->input->get('refid', 0, 'int');
// Check if there is a return value
$return = $this->input->get('return', null, 'base64');
$cancel = parent::cancel($key);
if (!is_null($return) && JUri::isInternal(base64_decode($return)))
{
$redirect = base64_decode($return);
// Redirect to the return value.
$this->setRedirect(
JRoute::_(
$redirect, false
)
);
}
elseif ($this->refid && $this->ref)
{
$redirect = '&view=' . (string)$this->ref . '&layout=edit&id=' . (int)$this->refid;
// Redirect to the item screen.
$this->setRedirect(
JRoute::_(
'index.php?option=' . $this->option . $redirect, false
)
);
}
elseif ($this->ref)
{
$redirect = '&view='.(string)$this->ref;
// Redirect to the list screen.
$this->setRedirect(
JRoute::_(
'index.php?option=' . $this->option . $redirect, false
)
);
}
return $cancel;
}
/**
* Method to save a record.
*
* @param string $key The name of the primary key of the URL variable.
* @param string $urlVar The name of the URL variable if different from the primary key (sometimes required to avoid router collisions).
*
* @return boolean True if successful, false otherwise.
*
* @since 12.2
*/
public function save($key = null, $urlVar = null)
{
// get the referral options
$this->ref = $this->input->get('ref', 0, 'word');
$this->refid = $this->input->get('refid', 0, 'int');
// Check if there is a return value
$return = $this->input->get('return', null, 'base64');
$canReturn = (!is_null($return) && JUri::isInternal(base64_decode($return)));
if ($this->ref || $this->refid || $canReturn)
{
// to make sure the item is checkedin on redirect
$this->task = 'save';
}
$saved = parent::save($key, $urlVar);
// This is not needed since parent save already does this
// Due to the ref and refid implementation we need to add this
if ($canReturn)
{
$redirect = base64_decode($return);
// Redirect to the return value.
$this->setRedirect(
JRoute::_(
$redirect, false
)
);
}
elseif ($this->refid && $this->ref)
{
$redirect = '&view=' . (string)$this->ref . '&layout=edit&id=' . (int)$this->refid;
// Redirect to the item screen.
$this->setRedirect(
JRoute::_(
'index.php?option=' . $this->option . $redirect, false
)
);
}
elseif ($this->ref)
{
$redirect = '&view=' . (string)$this->ref;
// Redirect to the list screen.
$this->setRedirect(
JRoute::_(
'index.php?option=' . $this->option . $redirect, false
)
);
}
return $saved;
}
/**
* Function that allows child controller access to model data
* after the data has been saved.
*
* @param JModel &$model The data model object.
* @param array $validData The validated data.
*
* @return void
*
* @since 11.1
*/
protected function postSaveHook(JModelLegacy $model, $validData = array())
{
return;
}
}

View File

@ -0,0 +1,106 @@
<?php
/**
* @package Joomla.Component.Builder
*
* @created 30th April, 2015
* @author Llewellyn van der Merwe <http://www.joomlacomponentbuilder.com>
* @github Joomla Component Builder <https://github.com/vdm-io/Joomla-Component-Builder>
* @copyright Copyright (C) 2015 - 2018 Vast Development Method. All rights reserved.
* @license GNU General Public License version 2 or later; see LICENSE.txt
*/
// No direct access to this file
defined('_JEXEC') or die('Restricted access');
/**
* Placeholders Controller
*/
class ComponentbuilderControllerPlaceholders extends JControllerAdmin
{
/**
* The prefix to use with controller messages.
*
* @var string
* @since 1.6
*/
protected $text_prefix = 'COM_COMPONENTBUILDER_PLACEHOLDERS';
/**
* Method to get a model object, loading it if required.
*
* @param string $name The model name. Optional.
* @param string $prefix The class prefix. Optional.
* @param array $config Configuration array for model. Optional.
*
* @return JModelLegacy The model.
*
* @since 1.6
*/
public function getModel($name = 'Placeholder', $prefix = 'ComponentbuilderModel', $config = array('ignore_request' => true))
{
return parent::getModel($name, $prefix, $config);
}
public function exportData()
{
// Check for request forgeries
JSession::checkToken() or die(JText::_('JINVALID_TOKEN'));
// check if export is allowed for this user.
$user = JFactory::getUser();
if ($user->authorise('placeholder.export', 'com_componentbuilder') && $user->authorise('core.export', 'com_componentbuilder'))
{
// Get the input
$input = JFactory::getApplication()->input;
$pks = $input->post->get('cid', array(), 'array');
// Sanitize the input
JArrayHelper::toInteger($pks);
// Get the model
$model = $this->getModel('Placeholders');
// get the data to export
$data = $model->getExportData($pks);
if (ComponentbuilderHelper::checkArray($data))
{
// now set the data to the spreadsheet
$date = JFactory::getDate();
ComponentbuilderHelper::xls($data,'Placeholders_'.$date->format('jS_F_Y'),'Placeholders exported ('.$date->format('jS F, Y').')','placeholders');
}
}
// Redirect to the list screen with error.
$message = JText::_('COM_COMPONENTBUILDER_EXPORT_FAILED');
$this->setRedirect(JRoute::_('index.php?option=com_componentbuilder&view=placeholders', false), $message, 'error');
return;
}
public function importData()
{
// Check for request forgeries
JSession::checkToken() or die(JText::_('JINVALID_TOKEN'));
// check if import is allowed for this user.
$user = JFactory::getUser();
if ($user->authorise('placeholder.import', 'com_componentbuilder') && $user->authorise('core.import', 'com_componentbuilder'))
{
// Get the import model
$model = $this->getModel('Placeholders');
// get the headers to import
$headers = $model->getExImPortHeaders();
if (ComponentbuilderHelper::checkObject($headers))
{
// Load headers to session.
$session = JFactory::getSession();
$headers = json_encode($headers);
$session->set('placeholder_VDM_IMPORTHEADERS', $headers);
$session->set('backto_VDM_IMPORT', 'placeholders');
$session->set('dataType_VDM_IMPORTINTO', 'placeholder');
// Redirect to import view.
$message = JText::_('COM_COMPONENTBUILDER_IMPORT_SELECT_FILE_FOR_PLACEHOLDERS');
$this->setRedirect(JRoute::_('index.php?option=com_componentbuilder&view=import', false), $message);
return;
}
}
// Redirect to the list screen with error.
$message = JText::_('COM_COMPONENTBUILDER_IMPORT_FAILED');
$this->setRedirect(JRoute::_('index.php?option=com_componentbuilder&view=placeholders', false), $message, 'error');
return;
}
}

View File

@ -53,6 +53,13 @@ class Get
*/
public $params;
/**
* The global placeholders
*
* @var array
*/
public $globalPlaceholders = array();
/**
* The placeholders
*
@ -781,6 +788,8 @@ class Get
$this->user = JFactory::getUser();
// Get a db connection.
$this->db = JFactory::getDbo();
// get global placeholders
$this->globalPlaceholders = $this->getGlobalPlaceholders();
// check if this component is install on the current website
if ($paths = $this->getLocalInstallPaths())
{
@ -857,6 +866,36 @@ class Get
return '';
}
/**
* get all System Placeholders
*
* @return array The global placeholders
*
*/
public function getGlobalPlaceholders()
{
// reset bucket
$bucket = array();
// Create a new query object.
$query = $this->db->getQuery(true);
$query->select($this->db->quoteName(array('a.target','a.value')));
// from these tables
$query->from('#__componentbuilder_placeholder AS a');
// Reset the query using our newly populated query object.
$this->db->setQuery($query);
// Load the items
$this->db->execute();
if ($this->db->getNumRows())
{
$bucket = $this->db->loadAssocList('target', 'value');
foreach ($bucket as $key => &$code)
{
$code = base64_decode($code);
}
}
return $bucket;
}
/**
* get all Component Data
*
@ -888,7 +927,8 @@ class Get
'i.php_dashboard_methods',
'f.sql_tweak',
'e.version_update',
'e.id'
'e.id',
'k.addplaceholders'
), array(
'addadmin_views',
'addadmin_views_id',
@ -904,7 +944,8 @@ class Get
'php_dashboard_methods',
'sql_tweak',
'version_update',
'version_update_id'
'version_update_id',
'_placeholders'
)
)
);
@ -919,6 +960,7 @@ class Get
$query->join('LEFT', $this->db->quoteName('#__componentbuilder_component_config', 'h') . ' ON (' . $this->db->quoteName('a.id') . ' = ' . $this->db->quoteName('h.joomla_component') . ')');
$query->join('LEFT', $this->db->quoteName('#__componentbuilder_component_dashboard', 'i') . ' ON (' . $this->db->quoteName('a.id') . ' = ' . $this->db->quoteName('i.joomla_component') . ')');
$query->join('LEFT', $this->db->quoteName('#__componentbuilder_component_files_folders', 'j') . ' ON (' . $this->db->quoteName('a.id') . ' = ' . $this->db->quoteName('j.joomla_component') . ')');
$query->join('LEFT', $this->db->quoteName('#__componentbuilder_component_placeholders', 'k') . ' ON (' . $this->db->quoteName('a.id') . ' = ' . $this->db->quoteName('k.joomla_component') . ')');
$query->where($this->db->quoteName('a.id') . ' = ' . (int) $this->componentID);
// Reset the query using our newly populated query object.
@ -971,6 +1013,26 @@ class Get
$this->placeholders[$this->bbb . 'Component' . $this->ddd] = $this->placeholders[$this->hhh . 'Component' . $this->hhh];
$this->placeholders[$this->bbb . 'COMPONENT' . $this->ddd] = $this->placeholders[$this->hhh . 'COMPONENT' . $this->hhh];
// set the addcustommenus data
$component->_placeholders = (isset($component->_placeholders) && ComponentbuilderHelper::checkJson($component->_placeholders)) ? json_decode($component->_placeholders, true) : null;
if (ComponentbuilderHelper::checkArray($component->_placeholders))
{
foreach($component->_placeholders as $row)
{
$this->globalPlaceholders[$row['target']] = $row['value'];
}
}
unset($component->_placeholders);
// load the global placeholders
if (ComponentbuilderHelper::checkArray($this->globalPlaceholders))
{
foreach ($this->globalPlaceholders as $globalPlaceholder => $gloabalValue)
{
$this->placeholders[$globalPlaceholder] = $gloabalValue;
}
}
// set component sales name
$component->sales_name = ComponentbuilderHelper::safeString($component->system_name);
@ -2810,7 +2872,7 @@ class Get
if (strpos($requeSt_id, '_request_id') !== false || strpos($requeSt_id, '_request_catid') !== false)
{
// keep it then, don't change
$name = $requeSt_id;
$name = $this->setPlaceholders($requeSt_id, $this->placeholders);
}
else
{
@ -2846,7 +2908,7 @@ class Get
else
{
// get value from xml
$xml = ComponentbuilderHelper::safeString(ComponentbuilderHelper::getBetween($field['settings']->xml, 'name="', '"'));
$xml = ComponentbuilderHelper::safeString($this->setPlaceholders(ComponentbuilderHelper::getBetween($field['settings']->xml, 'name="', '"'), $this->placeholders));
// check if a value was found
if (ComponentbuilderHelper::checkString($xml))
{
@ -5662,6 +5724,7 @@ class Get
$placeholders[ComponentbuilderHelper::safeString($this->componentCodeName, 'F') . 'Helper::'] = $this->bbb . 'Component' . $this->ddd . 'Helper::';
$placeholders['COM_' . ComponentbuilderHelper::safeString($this->componentCodeName, 'U')] = 'COM_' . $this->bbb . 'COMPONENT' . $this->ddd;
$placeholders['com_' . $this->componentCodeName] = 'com_' . $this->bbb . 'component' . $this->ddd;
foreach ($paths as $target => $path)
{
// we are changing the working directory to the componet path

View File

@ -2295,7 +2295,7 @@ class Fields extends Structure
else
{
// set the rest of the fields
$xmlValue = (string) ComponentbuilderHelper::getBetween($field['settings']->xml, $property['name'] . '="', '"');
$xmlValue = (string) $this->setPlaceholders(ComponentbuilderHelper::getBetween($field['settings']->xml, $property['name'] . '="', '"'), $placeholders);
}
// check if translatable
@ -2872,6 +2872,14 @@ class Fields extends Structure
// now set the value
$replace[$replacekey] = $replacevalue;
}
// load the global placeholders
if (ComponentbuilderHelper::checkArray($this->globalPlaceholders))
{
foreach ($this->globalPlaceholders as $globalPlaceholder => $gloabalValue)
{
$replace[$globalPlaceholder] = $gloabalValue;
}
}
// start loading the field type
$this->fileContentDynamic['customfield_' . $data['type']] = array();
// Type <<<DYNAMIC>>>

View File

@ -13645,10 +13645,26 @@ class Interpretation extends Fields
$component = ComponentbuilderHelper::safeString($this->componentData->name_code);
$viewName = 'config';
$listViewName = 'configs';
$placeholders = array(
$this->hhh . 'component' . $this->hhh => $component,
$this->hhh . 'view' . $this->hhh => $viewName,
$this->hhh . 'views' . $this->hhh => $listViewName);
// set place holders
$placeholders = array();
$placeholders[$this->hhh . 'component' . $this->hhh] = ComponentbuilderHelper::safeString($this->componentData->name_code);
$placeholders[$this->hhh . 'Component' . $this->hhh] = ComponentbuilderHelper::safeString($this->componentData->name_code, 'F');
$placeholders[$this->hhh . 'COMPONENT' . $this->hhh] = ComponentbuilderHelper::safeString($this->componentData->name_code, 'U');
$placeholders[$this->hhh . 'view' . $this->hhh] = $viewName;
$placeholders[$this->hhh . 'views' . $this->hhh] = $listViewName;
$placeholders[$this->bbb . 'component' . $this->ddd] = $placeholders[$this->hhh . 'component' . $this->hhh];
$placeholders[$this->bbb . 'Component' . $this->ddd] = $placeholders[$this->hhh . 'Component' . $this->hhh];
$placeholders[$this->bbb . 'COMPONENT' . $this->ddd] = $placeholders[$this->hhh . 'COMPONENT' . $this->hhh];
$placeholders[$this->bbb . 'view' . $this->ddd] = $viewName;
$placeholders[$this->bbb . 'views' . $this->ddd] = $listViewName;
// load the global placeholders
if (ComponentbuilderHelper::checkArray($this->globalPlaceholders))
{
foreach ($this->globalPlaceholders as $globalPlaceholder => $gloabalValue)
{
$placeholders[$globalPlaceholder] = $gloabalValue;
}
}
$view = '';
$viewType = 0;
// set the custom table key
@ -13676,8 +13692,8 @@ class Interpretation extends Fields
{
$this->configFieldSetsCustomField[$field['tabname']][] = $xmlField;
// set global params to db on install
$fieldName = ComponentbuilderHelper::safeString(ComponentbuilderHelper::getBetween($xmlField, 'name="', '"'));
$fieldDefault = ComponentbuilderHelper::getBetween($xmlField, 'default="', '"');
$fieldName = ComponentbuilderHelper::safeString($this->setPlaceholders(ComponentbuilderHelper::getBetween($xmlField, 'name="', '"'), $placeholders));
$fieldDefault = $this->setPlaceholders(ComponentbuilderHelper::getBetween($xmlField, 'default="', '"'), $placeholders);
if (isset($field['custom_value']) && ComponentbuilderHelper::checkString($field['custom_value']))
{
// add array if found

View File

@ -213,6 +213,15 @@ class Infusion extends Interpretation
// add the helper emailer if set
$this->fileContentStatic[$this->hhh . 'HELPER_EMAIL' . $this->hhh] = $this->addEmailHelper();
// load the global placeholders
if (ComponentbuilderHelper::checkArray($this->globalPlaceholders))
{
foreach ($this->globalPlaceholders as $globalPlaceholder => $gloabalValue)
{
$this->fileContentStatic[$globalPlaceholder] = $gloabalValue;
}
}
// reset view array
$viewarray = array();
$site_edit_view_array = array();

View File

@ -1179,6 +1179,20 @@ abstract class ComponentbuilderHelper
return false;
}
/**
* validate that a placeholder is unique
**/
public static function validateUniquePlaceholder($string)
{
$string = self::safeString($string);
// this list may grow as we find more cases that break the compiler (just open an issue on github)
if (in_array($string, array('component', 'view', 'views')))
{
return false;
}
return true;
}
/**
* The array of dynamic content
*
@ -4476,6 +4490,10 @@ abstract class ComponentbuilderHelper
{
JHtmlSidebar::addEntry(JText::_('COM_COMPONENTBUILDER_SUBMENU_CUSTOM_CODES'), 'index.php?option=com_componentbuilder&view=custom_codes', $submenu === 'custom_codes');
}
if ($user->authorise('placeholder.access', 'com_componentbuilder') && $user->authorise('placeholder.submenu', 'com_componentbuilder'))
{
JHtmlSidebar::addEntry(JText::_('COM_COMPONENTBUILDER_SUBMENU_PLACEHOLDERS'), 'index.php?option=com_componentbuilder&view=placeholders', $submenu === 'placeholders');
}
if ($user->authorise('library.access', 'com_componentbuilder') && $user->authorise('library.submenu', 'com_componentbuilder'))
{
JHtmlSidebar::addEntry(JText::_('COM_COMPONENTBUILDER_SUBMENU_LIBRARIES'), 'index.php?option=com_componentbuilder&view=libraries', $submenu === 'libraries');

View File

@ -1723,6 +1723,46 @@ COM_COMPONENTBUILDER_COMPONENTS_MYSQL_TWEAKS_N_ITEMS_UNFEATURED="%s Components m
COM_COMPONENTBUILDER_COMPONENTS_MYSQL_TWEAKS_N_ITEMS_UNFEATURED_1="%s Component mysql Tweaks unfeatured."
COM_COMPONENTBUILDER_COMPONENTS_MYSQL_TWEAKS_N_ITEMS_UNPUBLISHED="%s Components mysql Tweaks unpublished."
COM_COMPONENTBUILDER_COMPONENTS_MYSQL_TWEAKS_N_ITEMS_UNPUBLISHED_1="%s Component mysql Tweaks unpublished."
COM_COMPONENTBUILDER_COMPONENTS_PLACEHOLDERS="Components Placeholders"
COM_COMPONENTBUILDER_COMPONENTS_PLACEHOLDERS_ACCESS="Components Placeholders Access"
COM_COMPONENTBUILDER_COMPONENTS_PLACEHOLDERS_ACCESS_DESC="Allows the users in this group to access access components placeholders"
COM_COMPONENTBUILDER_COMPONENTS_PLACEHOLDERS_BATCH_OPTIONS="Batch process the selected Components Placeholders"
COM_COMPONENTBUILDER_COMPONENTS_PLACEHOLDERS_BATCH_TIP="All changes will be applied to all selected Components Placeholders"