"
COM_COMPONENTBUILDER_DASHBOARD_SITE_VIEW_ADD="Add Site View
"
@@ -4226,8 +4301,6 @@ COM_COMPONENTBUILDER_FIELDTYPES_BATCH_USE="Fieldtypes Batch Use"
COM_COMPONENTBUILDER_FIELDTYPES_BATCH_USE_DESC="Allows users in this group to use batch copy/update method of batch fieldtypes"
COM_COMPONENTBUILDER_FIELDTYPES_CREATE="Fieldtypes Create"
COM_COMPONENTBUILDER_FIELDTYPES_CREATE_DESC="Allows the users in this group to create create fieldtypes"
-COM_COMPONENTBUILDER_FIELDTYPES_DASHBOARD_ADD="Fieldtypes Dashboard Add"
-COM_COMPONENTBUILDER_FIELDTYPES_DASHBOARD_ADD_DESC="Allows the users in this group to dashboard add of fieldtype"
COM_COMPONENTBUILDER_FIELDTYPES_DASHBOARD_LIST="Fieldtypes Dashboard List"
COM_COMPONENTBUILDER_FIELDTYPES_DASHBOARD_LIST_DESC="Allows the users in this group to dashboard list of fieldtype"
COM_COMPONENTBUILDER_FIELDTYPES_DELETE="Fieldtypes Delete"
@@ -4764,6 +4837,7 @@ COM_COMPONENTBUILDER_IMPORT_SELECT_FILE_FOR_JOOMLA_COMPONENTS="Select the file t
COM_COMPONENTBUILDER_IMPORT_SELECT_FILE_FOR_LANGUAGES="Select the file to import data to languages."
COM_COMPONENTBUILDER_IMPORT_SELECT_FILE_FOR_LANGUAGE_TRANSLATIONS="Select the file to import data to language_translations."
COM_COMPONENTBUILDER_IMPORT_SELECT_FILE_FOR_LAYOUTS="Select the file to import data to layouts."
+COM_COMPONENTBUILDER_IMPORT_SELECT_FILE_FOR_PLACEHOLDERS="Select the file to import data to placeholders."
COM_COMPONENTBUILDER_IMPORT_SELECT_FILE_FOR_SERVERS="Select the file to import data to servers."
COM_COMPONENTBUILDER_IMPORT_SELECT_FILE_FOR_SITE_VIEWS="Select the file to import data to site_views."
COM_COMPONENTBUILDER_IMPORT_SELECT_FILE_FOR_SNIPPETS="Select the file to import data to snippets."
@@ -6011,8 +6085,83 @@ COM_COMPONENTBUILDER_PAIDLOCKED="Paid/Locked"
COM_COMPONENTBUILDER_PATH_CODESCODE="Path: %s"
COM_COMPONENTBUILDER_PATH_TO_THE_ZIPPED_PACKAGE_IS_CODESCODE_BR_S_S="Path to the zipped package is: %s %s %s"
COM_COMPONENTBUILDER_PERMISSIONS="Permissions"
+COM_COMPONENTBUILDER_PLACEHOLDER="Placeholder"
+COM_COMPONENTBUILDER_PLACEHOLDERS="Placeholders"
+COM_COMPONENTBUILDER_PLACEHOLDERS_ACCESS="Placeholders Access"
+COM_COMPONENTBUILDER_PLACEHOLDERS_ACCESS_DESC="Allows the users in this group to access access placeholders"
+COM_COMPONENTBUILDER_PLACEHOLDERS_BATCH_OPTIONS="Batch process the selected Placeholders"
+COM_COMPONENTBUILDER_PLACEHOLDERS_BATCH_TIP="All changes will be applied to all selected Placeholders"
+COM_COMPONENTBUILDER_PLACEHOLDERS_BATCH_USE="Placeholders Batch Use"
+COM_COMPONENTBUILDER_PLACEHOLDERS_BATCH_USE_DESC="Allows users in this group to use batch copy/update method of batch placeholders"
+COM_COMPONENTBUILDER_PLACEHOLDERS_CREATE="Placeholders Create"
+COM_COMPONENTBUILDER_PLACEHOLDERS_CREATE_DESC="Allows the users in this group to create create placeholders"
+COM_COMPONENTBUILDER_PLACEHOLDERS_DASHBOARD_LIST="Placeholders Dashboard List"
+COM_COMPONENTBUILDER_PLACEHOLDERS_DASHBOARD_LIST_DESC="Allows the users in this group to dashboard list of placeholder"
+COM_COMPONENTBUILDER_PLACEHOLDERS_DELETE="Placeholders Delete"
+COM_COMPONENTBUILDER_PLACEHOLDERS_DELETE_DESC="Allows the users in this group to delete delete placeholders"
+COM_COMPONENTBUILDER_PLACEHOLDERS_EDIT="Placeholders Edit"
+COM_COMPONENTBUILDER_PLACEHOLDERS_EDIT_DESC="Allows the users in this group to edit the placeholder"
+COM_COMPONENTBUILDER_PLACEHOLDERS_EDIT_OWN="Placeholders Edit Own"
+COM_COMPONENTBUILDER_PLACEHOLDERS_EDIT_OWN_DESC="Allows the users in this group to edit edit own placeholders created by them"
+COM_COMPONENTBUILDER_PLACEHOLDERS_EDIT_STATE="Placeholders Edit State"
+COM_COMPONENTBUILDER_PLACEHOLDERS_EDIT_STATE_DESC="Allows the users in this group to update the state of the placeholder"
+COM_COMPONENTBUILDER_PLACEHOLDERS_EDIT_VERSION="Placeholders Edit Version"
+COM_COMPONENTBUILDER_PLACEHOLDERS_EDIT_VERSION_DESC="Allows users in this group to edit versions of version placeholders"
+COM_COMPONENTBUILDER_PLACEHOLDERS_EXPORT="Placeholders Export"
+COM_COMPONENTBUILDER_PLACEHOLDERS_EXPORT_DESC="Allows the users in this group to export export placeholders"
+COM_COMPONENTBUILDER_PLACEHOLDERS_IMPORT="Placeholders Import"
+COM_COMPONENTBUILDER_PLACEHOLDERS_IMPORT_DESC="Allows the users in this group to import import placeholders"
+COM_COMPONENTBUILDER_PLACEHOLDERS_N_ITEMS_ARCHIVED="%s Placeholders archived."
+COM_COMPONENTBUILDER_PLACEHOLDERS_N_ITEMS_ARCHIVED_1="%s Placeholder archived."
+COM_COMPONENTBUILDER_PLACEHOLDERS_N_ITEMS_CHECKED_IN_0="No Placeholder successfully checked in."
+COM_COMPONENTBUILDER_PLACEHOLDERS_N_ITEMS_CHECKED_IN_1="%d Placeholder successfully checked in."
+COM_COMPONENTBUILDER_PLACEHOLDERS_N_ITEMS_CHECKED_IN_MORE="%d Placeholders successfully checked in."
+COM_COMPONENTBUILDER_PLACEHOLDERS_N_ITEMS_DELETED="%s Placeholders deleted."
+COM_COMPONENTBUILDER_PLACEHOLDERS_N_ITEMS_DELETED_1="%s Placeholder deleted."
+COM_COMPONENTBUILDER_PLACEHOLDERS_N_ITEMS_FEATURED="%s Placeholders featured."
+COM_COMPONENTBUILDER_PLACEHOLDERS_N_ITEMS_FEATURED_1="%s Placeholder featured."
+COM_COMPONENTBUILDER_PLACEHOLDERS_N_ITEMS_PUBLISHED="%s Placeholders published."
+COM_COMPONENTBUILDER_PLACEHOLDERS_N_ITEMS_PUBLISHED_1="%s Placeholder published."
+COM_COMPONENTBUILDER_PLACEHOLDERS_N_ITEMS_TRASHED="%s Placeholders trashed."
+COM_COMPONENTBUILDER_PLACEHOLDERS_N_ITEMS_TRASHED_1="%s Placeholder trashed."
+COM_COMPONENTBUILDER_PLACEHOLDERS_N_ITEMS_UNFEATURED="%s Placeholders unfeatured."
+COM_COMPONENTBUILDER_PLACEHOLDERS_N_ITEMS_UNFEATURED_1="%s Placeholder unfeatured."
+COM_COMPONENTBUILDER_PLACEHOLDERS_N_ITEMS_UNPUBLISHED="%s Placeholders unpublished."
+COM_COMPONENTBUILDER_PLACEHOLDERS_N_ITEMS_UNPUBLISHED_1="%s Placeholder unpublished."
COM_COMPONENTBUILDER_PLACEHOLDERS_REMOVED="Placeholders Removed!"
+COM_COMPONENTBUILDER_PLACEHOLDERS_SUBMENU="Placeholders Submenu"
+COM_COMPONENTBUILDER_PLACEHOLDERS_SUBMENU_DESC="Allows the users in this group to submenu of placeholder"
+COM_COMPONENTBUILDER_PLACEHOLDER_CREATED_BY_DESC="The user that created this Placeholder."
+COM_COMPONENTBUILDER_PLACEHOLDER_CREATED_BY_LABEL="Created By"
+COM_COMPONENTBUILDER_PLACEHOLDER_CREATED_DATE_DESC="The date this Placeholder was created."
+COM_COMPONENTBUILDER_PLACEHOLDER_CREATED_DATE_LABEL="Created Date"
+COM_COMPONENTBUILDER_PLACEHOLDER_DETAILS="Details"
+COM_COMPONENTBUILDER_PLACEHOLDER_EDIT="Editing the Placeholder"
+COM_COMPONENTBUILDER_PLACEHOLDER_ERROR_UNIQUE_ALIAS="Another Placeholder has the same alias."
+COM_COMPONENTBUILDER_PLACEHOLDER_ID="Id"
+COM_COMPONENTBUILDER_PLACEHOLDER_MODIFIED_BY_DESC="The last user that modified this Placeholder."
+COM_COMPONENTBUILDER_PLACEHOLDER_MODIFIED_BY_LABEL="Modified By"
+COM_COMPONENTBUILDER_PLACEHOLDER_MODIFIED_DATE_DESC="The date this Placeholder was modified."
+COM_COMPONENTBUILDER_PLACEHOLDER_MODIFIED_DATE_LABEL="Modified Date"
+COM_COMPONENTBUILDER_PLACEHOLDER_NEW="A New Placeholder"
+COM_COMPONENTBUILDER_PLACEHOLDER_ORDERING_LABEL="Ordering"
+COM_COMPONENTBUILDER_PLACEHOLDER_PERMISSION="Permissions"
+COM_COMPONENTBUILDER_PLACEHOLDER_PUBLISHING="Publishing"
COM_COMPONENTBUILDER_PLACEHOLDER_REMOVED="Placeholder Removed!"
+COM_COMPONENTBUILDER_PLACEHOLDER_SAVE_WARNING="Alias already existed so a number was added at the end. You can re-edit the Placeholder to customise the alias."
+COM_COMPONENTBUILDER_PLACEHOLDER_STATUS="Status"
+COM_COMPONENTBUILDER_PLACEHOLDER_TARGET="Target"
+COM_COMPONENTBUILDER_PLACEHOLDER_TARGET_DESCRIPTION="Set the text you would like to target as a placeholder"
+COM_COMPONENTBUILDER_PLACEHOLDER_TARGET_HINT="[[[core]]]"
+COM_COMPONENTBUILDER_PLACEHOLDER_TARGET_LABEL="Target String Placeholder"
+COM_COMPONENTBUILDER_PLACEHOLDER_TARGET_MESSAGE="Error! That target placeholder text already exist. Please add an unique placeholder target."
+COM_COMPONENTBUILDER_PLACEHOLDER_VALUE="Value"
+COM_COMPONENTBUILDER_PLACEHOLDER_VALUE_DESCRIPTION="Set the text you would like to set as the replacement value for the targeted placeholder."
+COM_COMPONENTBUILDER_PLACEHOLDER_VALUE_HINT="membersmanager"
+COM_COMPONENTBUILDER_PLACEHOLDER_VALUE_LABEL="Set String Value"
+COM_COMPONENTBUILDER_PLACEHOLDER_VALUE_MESSAGE="Error! Please add some set target value here."
+COM_COMPONENTBUILDER_PLACEHOLDER_VERSION_DESC="A count of the number of times this Placeholder has been revised."
+COM_COMPONENTBUILDER_PLACEHOLDER_VERSION_LABEL="Revision"
COM_COMPONENTBUILDER_PLACES_ACROSS_JCB_WHERE_THIS_S_IS_LINKED="Places across JCB where this %s is linked."
COM_COMPONENTBUILDER_PLEASE_ADD_FILES_TO_S="Please add files to (%s)"
COM_COMPONENTBUILDER_PLEASE_ADD_FOLDERS_TO_S="Please add folders to (%s)"
@@ -6890,6 +7039,7 @@ COM_COMPONENTBUILDER_SUBMENU_LANGUAGES="Languages"
COM_COMPONENTBUILDER_SUBMENU_LANGUAGE_TRANSLATIONS="Language Translations"
COM_COMPONENTBUILDER_SUBMENU_LAYOUTS="Layouts"
COM_COMPONENTBUILDER_SUBMENU_LIBRARIES="Libraries"
+COM_COMPONENTBUILDER_SUBMENU_PLACEHOLDERS="Placeholders"
COM_COMPONENTBUILDER_SUBMENU_SERVERS="Servers"
COM_COMPONENTBUILDER_SUBMENU_SITE_VIEWS="Site Views"
COM_COMPONENTBUILDER_SUBMENU_SNIPPETS="Snippets"
@@ -7058,6 +7208,7 @@ COM_COMPONENTBUILDER_THE_COMPONENT_CUSTOM_ADMIN_VIEWS="The component custom admi
COM_COMPONENTBUILDER_THE_COMPONENT_DASHBOARD="The component dashboard"
COM_COMPONENTBUILDER_THE_COMPONENT_FILES_FOLDERS="The component files & folders"
COM_COMPONENTBUILDER_THE_COMPONENT_MYSQL_TWEAKS="The component mysql tweaks"
+COM_COMPONENTBUILDER_THE_COMPONENT_PLACEHOLDERS="The component placeholders"
COM_COMPONENTBUILDER_THE_COMPONENT_SITE_VIEWS="The component site views"
COM_COMPONENTBUILDER_THE_COMPONENT_UPDATES="The component updates"
COM_COMPONENTBUILDER_THE_COMPONENT_WITH_ALL_LINKED_ADMIN_VIEWS_FIELDS_LINKED_TO_ADMIN_VIEWS_CUSTOM_ADMIN_VIEWS_SITE_VIEWS_TEMPLATES_AND_LAYOUTS_WERE_CLONED_SUCCESSFUL="The Component with all linked admin views, fields linked to admin views, custom admin views, site views, templates and layouts were cloned successful!"
diff --git a/admin/language/en-GB/en-GB.com_componentbuilder.sys.ini b/admin/language/en-GB/en-GB.com_componentbuilder.sys.ini
index 8cf3736f7..8a2e9fd9f 100644
--- a/admin/language/en-GB/en-GB.com_componentbuilder.sys.ini
+++ b/admin/language/en-GB/en-GB.com_componentbuilder.sys.ini
@@ -261,6 +261,26 @@ COM_COMPONENTBUILDER_COMPONENTS_MYSQL_TWEAKS_EDIT_STATE="Components Mysql Tweaks
COM_COMPONENTBUILDER_COMPONENTS_MYSQL_TWEAKS_EDIT_STATE_DESC="Allows the users in this group to update the state of the component mysql tweaks"
COM_COMPONENTBUILDER_COMPONENTS_MYSQL_TWEAKS_EDIT_VERSION="Components Mysql Tweaks Edit Version"
COM_COMPONENTBUILDER_COMPONENTS_MYSQL_TWEAKS_EDIT_VERSION_DESC="Allows users in this group to edit versions of version components mysql tweaks"
+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_USE="Components Placeholders Batch Use"
+COM_COMPONENTBUILDER_COMPONENTS_PLACEHOLDERS_BATCH_USE_DESC="Allows users in this group to use batch copy/update method of batch components placeholders"
+COM_COMPONENTBUILDER_COMPONENTS_PLACEHOLDERS_CREATE="Components Placeholders Create"
+COM_COMPONENTBUILDER_COMPONENTS_PLACEHOLDERS_CREATE_DESC="Allows the users in this group to create create components placeholders"
+COM_COMPONENTBUILDER_COMPONENTS_PLACEHOLDERS_DELETE="Components Placeholders Delete"
+COM_COMPONENTBUILDER_COMPONENTS_PLACEHOLDERS_DELETE_DESC="Allows the users in this group to delete delete components placeholders"
+COM_COMPONENTBUILDER_COMPONENTS_PLACEHOLDERS_EDIT="Components Placeholders Edit"
+COM_COMPONENTBUILDER_COMPONENTS_PLACEHOLDERS_EDIT_CREATED_BY="Components Placeholders Edit Created By"
+COM_COMPONENTBUILDER_COMPONENTS_PLACEHOLDERS_EDIT_CREATED_BY_DESC="Allows the users in this group to update the created by of the edit created by components placeholders"
+COM_COMPONENTBUILDER_COMPONENTS_PLACEHOLDERS_EDIT_CREATED_DATE="Components Placeholders Edit Created Date"
+COM_COMPONENTBUILDER_COMPONENTS_PLACEHOLDERS_EDIT_CREATED_DATE_DESC="Allows the users in this group to update the created date of the edit created components placeholders"
+COM_COMPONENTBUILDER_COMPONENTS_PLACEHOLDERS_EDIT_DESC="Allows the users in this group to edit the component placeholders"
+COM_COMPONENTBUILDER_COMPONENTS_PLACEHOLDERS_EDIT_OWN="Components Placeholders Edit Own"
+COM_COMPONENTBUILDER_COMPONENTS_PLACEHOLDERS_EDIT_OWN_DESC="Allows the users in this group to edit edit own components placeholders created by them"
+COM_COMPONENTBUILDER_COMPONENTS_PLACEHOLDERS_EDIT_STATE="Components Placeholders Edit State"
+COM_COMPONENTBUILDER_COMPONENTS_PLACEHOLDERS_EDIT_STATE_DESC="Allows the users in this group to update the state of the component placeholders"
+COM_COMPONENTBUILDER_COMPONENTS_PLACEHOLDERS_EDIT_VERSION="Components Placeholders Edit Version"
+COM_COMPONENTBUILDER_COMPONENTS_PLACEHOLDERS_EDIT_VERSION_DESC="Allows users in this group to edit versions of version components placeholders"
COM_COMPONENTBUILDER_COMPONENTS_SITE_VIEWS_ACCESS="Components Site Views Access"
COM_COMPONENTBUILDER_COMPONENTS_SITE_VIEWS_ACCESS_DESC="Allows the users in this group to access access components site views"
COM_COMPONENTBUILDER_COMPONENTS_SITE_VIEWS_BATCH_USE="Components Site Views Batch Use"
@@ -428,8 +448,6 @@ COM_COMPONENTBUILDER_FIELDTYPES_BATCH_USE="Fieldtypes Batch Use"
COM_COMPONENTBUILDER_FIELDTYPES_BATCH_USE_DESC="Allows users in this group to use batch copy/update method of batch fieldtypes"
COM_COMPONENTBUILDER_FIELDTYPES_CREATE="Fieldtypes Create"
COM_COMPONENTBUILDER_FIELDTYPES_CREATE_DESC="Allows the users in this group to create create fieldtypes"
-COM_COMPONENTBUILDER_FIELDTYPES_DASHBOARD_ADD="Fieldtypes Dashboard Add"
-COM_COMPONENTBUILDER_FIELDTYPES_DASHBOARD_ADD_DESC="Allows the users in this group to dashboard add of fieldtype"
COM_COMPONENTBUILDER_FIELDTYPES_DASHBOARD_LIST="Fieldtypes Dashboard List"
COM_COMPONENTBUILDER_FIELDTYPES_DASHBOARD_LIST_DESC="Allows the users in this group to dashboard list of fieldtype"
COM_COMPONENTBUILDER_FIELDTYPES_DELETE="Fieldtypes Delete"
@@ -691,10 +709,35 @@ COM_COMPONENTBUILDER_MENU_JOOMLA_COMPONENTS="Joomla Components"
COM_COMPONENTBUILDER_MENU_LANGUAGE_TRANSLATIONS="Language Translations"
COM_COMPONENTBUILDER_MENU_LAYOUTS="Layouts"
COM_COMPONENTBUILDER_MENU_LIBRARIES="Libraries"
+COM_COMPONENTBUILDER_MENU_PLACEHOLDERS="Placeholders"
COM_COMPONENTBUILDER_MENU_SITE_VIEWS="Site Views"
COM_COMPONENTBUILDER_MENU_SNIPPETS="Snippets"
COM_COMPONENTBUILDER_MENU_TEMPLATES="Templates"
COM_COMPONENTBUILDER_MENU_VALIDATION_RULES="Validation Rules"
+COM_COMPONENTBUILDER_PLACEHOLDERS_ACCESS="Placeholders Access"
+COM_COMPONENTBUILDER_PLACEHOLDERS_ACCESS_DESC="Allows the users in this group to access access placeholders"
+COM_COMPONENTBUILDER_PLACEHOLDERS_BATCH_USE="Placeholders Batch Use"
+COM_COMPONENTBUILDER_PLACEHOLDERS_BATCH_USE_DESC="Allows users in this group to use batch copy/update method of batch placeholders"
+COM_COMPONENTBUILDER_PLACEHOLDERS_CREATE="Placeholders Create"
+COM_COMPONENTBUILDER_PLACEHOLDERS_CREATE_DESC="Allows the users in this group to create create placeholders"
+COM_COMPONENTBUILDER_PLACEHOLDERS_DASHBOARD_LIST="Placeholders Dashboard List"
+COM_COMPONENTBUILDER_PLACEHOLDERS_DASHBOARD_LIST_DESC="Allows the users in this group to dashboard list of placeholder"
+COM_COMPONENTBUILDER_PLACEHOLDERS_DELETE="Placeholders Delete"
+COM_COMPONENTBUILDER_PLACEHOLDERS_DELETE_DESC="Allows the users in this group to delete delete placeholders"
+COM_COMPONENTBUILDER_PLACEHOLDERS_EDIT="Placeholders Edit"
+COM_COMPONENTBUILDER_PLACEHOLDERS_EDIT_DESC="Allows the users in this group to edit the placeholder"
+COM_COMPONENTBUILDER_PLACEHOLDERS_EDIT_OWN="Placeholders Edit Own"
+COM_COMPONENTBUILDER_PLACEHOLDERS_EDIT_OWN_DESC="Allows the users in this group to edit edit own placeholders created by them"
+COM_COMPONENTBUILDER_PLACEHOLDERS_EDIT_STATE="Placeholders Edit State"
+COM_COMPONENTBUILDER_PLACEHOLDERS_EDIT_STATE_DESC="Allows the users in this group to update the state of the placeholder"
+COM_COMPONENTBUILDER_PLACEHOLDERS_EDIT_VERSION="Placeholders Edit Version"
+COM_COMPONENTBUILDER_PLACEHOLDERS_EDIT_VERSION_DESC="Allows users in this group to edit versions of version placeholders"
+COM_COMPONENTBUILDER_PLACEHOLDERS_EXPORT="Placeholders Export"
+COM_COMPONENTBUILDER_PLACEHOLDERS_EXPORT_DESC="Allows the users in this group to export export placeholders"
+COM_COMPONENTBUILDER_PLACEHOLDERS_IMPORT="Placeholders Import"
+COM_COMPONENTBUILDER_PLACEHOLDERS_IMPORT_DESC="Allows the users in this group to import import placeholders"
+COM_COMPONENTBUILDER_PLACEHOLDERS_SUBMENU="Placeholders Submenu"
+COM_COMPONENTBUILDER_PLACEHOLDERS_SUBMENU_DESC="Allows the users in this group to submenu of placeholder"
COM_COMPONENTBUILDER_SERVERS_ACCESS="Servers Access"
COM_COMPONENTBUILDER_SERVERS_ACCESS_DESC="Allows the users in this group to access access servers"
COM_COMPONENTBUILDER_SERVERS_BATCH_USE="Servers Batch Use"
diff --git a/admin/layouts/component_placeholders/details_above.php b/admin/layouts/component_placeholders/details_above.php
new file mode 100644
index 000000000..da98e936b
--- /dev/null
+++ b/admin/layouts/component_placeholders/details_above.php
@@ -0,0 +1,31 @@
+
+ * @github 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');
+
+$form = $displayData->getForm();
+
+$fields = $displayData->get('fields') ?: array(
+ 'joomla_component'
+);
+
+$hiddenFields = $displayData->get('hidden_fields') ?: array();
+
+?>
+
+
+
+
+
\ No newline at end of file
diff --git a/admin/views/components_placeholders/tmpl/default_batch_body.php b/admin/views/components_placeholders/tmpl/default_batch_body.php
new file mode 100644
index 000000000..cd9ecb2e4
--- /dev/null
+++ b/admin/views/components_placeholders/tmpl/default_batch_body.php
@@ -0,0 +1,18 @@
+
+ * @github 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');
+
+?>
+
+
+batchDisplay; ?>
\ No newline at end of file
diff --git a/admin/views/components_placeholders/tmpl/default_batch_footer.php b/admin/views/components_placeholders/tmpl/default_batch_footer.php
new file mode 100644
index 000000000..4c9d880be
--- /dev/null
+++ b/admin/views/components_placeholders/tmpl/default_batch_footer.php
@@ -0,0 +1,23 @@
+
+ * @github 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');
+
+?>
+
+
+
+
\ No newline at end of file
diff --git a/admin/views/components_placeholders/tmpl/default_body.php b/admin/views/components_placeholders/tmpl/default_body.php
new file mode 100644
index 000000000..f83164b68
--- /dev/null
+++ b/admin/views/components_placeholders/tmpl/default_body.php
@@ -0,0 +1,94 @@
+
+ * @github 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');
+
+$edit = "index.php?option=com_componentbuilder&view=components_placeholders&task=component_placeholders.edit";
+
+?>
+items as $i => $item): ?>
+ user->authorise('core.manage', 'com_checkin') || $item->checked_out == $this->user->id || $item->checked_out == 0;
+ $userChkOut = JFactory::getUser($item->checked_out);
+ $canDo = ComponentbuilderHelper::getActions('component_placeholders',$item,'components_placeholders');
+ ?>
+
+
\ No newline at end of file
diff --git a/admin/views/components_placeholders/tmpl/default_foot.php b/admin/views/components_placeholders/tmpl/default_foot.php
new file mode 100644
index 000000000..297242b41
--- /dev/null
+++ b/admin/views/components_placeholders/tmpl/default_foot.php
@@ -0,0 +1,18 @@
+
+ * @github 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');
+
+?>
+
+
pagination->getListFooter(); ?>
+
\ No newline at end of file
diff --git a/admin/views/components_placeholders/tmpl/default_head.php b/admin/views/components_placeholders/tmpl/default_head.php
new file mode 100644
index 000000000..96dfd9341
--- /dev/null
+++ b/admin/views/components_placeholders/tmpl/default_head.php
@@ -0,0 +1,47 @@
+
+ * @github 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');
+
+?>
+
\ No newline at end of file
diff --git a/admin/views/components_placeholders/tmpl/default_toolbar.php b/admin/views/components_placeholders/tmpl/default_toolbar.php
new file mode 100644
index 000000000..0090ad08c
--- /dev/null
+++ b/admin/views/components_placeholders/tmpl/default_toolbar.php
@@ -0,0 +1,45 @@
+
+ * @github 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');
+
+?>
+
+
+
+
+
+
+
+
+
+
+
+ pagination->getLimitBox(); ?>
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/admin/views/components_placeholders/tmpl/index.html b/admin/views/components_placeholders/tmpl/index.html
new file mode 100644
index 000000000..fa6d84e80
--- /dev/null
+++ b/admin/views/components_placeholders/tmpl/index.html
@@ -0,0 +1 @@
+
\ No newline at end of file
diff --git a/admin/views/components_placeholders/view.html.php b/admin/views/components_placeholders/view.html.php
new file mode 100644
index 000000000..f0f076420
--- /dev/null
+++ b/admin/views/components_placeholders/view.html.php
@@ -0,0 +1,226 @@
+
+ * @github 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');
+
+/**
+ * Componentbuilder View class for the Components_placeholders
+ */
+class ComponentbuilderViewComponents_placeholders extends JViewLegacy
+{
+ /**
+ * Components_placeholders view display method
+ * @return void
+ */
+ function display($tpl = null)
+ {
+ if ($this->getLayout() !== 'modal')
+ {
+ // Include helper submenu
+ ComponentbuilderHelper::addSubmenu('components_placeholders');
+ }
+
+ // Assign data to the view
+ $this->items = $this->get('Items');
+ $this->pagination = $this->get('Pagination');
+ $this->state = $this->get('State');
+ $this->user = JFactory::getUser();
+ $this->listOrder = $this->escape($this->state->get('list.ordering'));
+ $this->listDirn = $this->escape($this->state->get('list.direction'));
+ $this->saveOrder = $this->listOrder == 'ordering';
+ // set the return here value
+ $this->return_here = urlencode(base64_encode((string) JUri::getInstance()));
+ // get global action permissions
+ $this->canDo = ComponentbuilderHelper::getActions('component_placeholders');
+ $this->canEdit = $this->canDo->get('component_placeholders.edit');
+ $this->canState = $this->canDo->get('component_placeholders.edit.state');
+ $this->canCreate = $this->canDo->get('component_placeholders.create');
+ $this->canDelete = $this->canDo->get('component_placeholders.delete');
+ $this->canBatch = $this->canDo->get('core.batch');
+
+ // We don't need toolbar in the modal window.
+ if ($this->getLayout() !== 'modal')
+ {
+ $this->addToolbar();
+ $this->sidebar = JHtmlSidebar::render();
+ // load the batch html
+ if ($this->canCreate && $this->canEdit && $this->canState)
+ {
+ $this->batchDisplay = JHtmlBatch_::render();
+ }
+ }
+
+ // Check for errors.
+ if (count($errors = $this->get('Errors')))
+ {
+ throw new Exception(implode("\n", $errors), 500);
+ }
+
+ // Display the template
+ parent::display($tpl);
+
+ // Set the document
+ $this->setDocument();
+ }
+
+ /**
+ * Setting the toolbar
+ */
+ protected function addToolBar()
+ {
+ JToolBarHelper::title(JText::_('COM_COMPONENTBUILDER_COMPONENTS_PLACEHOLDERS'), 'joomla');
+ JHtmlSidebar::setAction('index.php?option=com_componentbuilder&view=components_placeholders');
+ JFormHelper::addFieldPath(JPATH_COMPONENT . '/models/fields');
+
+ if ($this->canCreate)
+ {
+ JToolBarHelper::addNew('component_placeholders.add');
+ }
+
+ // Only load if there are items
+ if (ComponentbuilderHelper::checkArray($this->items))
+ {
+ if ($this->canEdit)
+ {
+ JToolBarHelper::editList('component_placeholders.edit');
+ }
+
+ if ($this->canState)
+ {
+ JToolBarHelper::publishList('components_placeholders.publish');
+ JToolBarHelper::unpublishList('components_placeholders.unpublish');
+ JToolBarHelper::archiveList('components_placeholders.archive');
+
+ if ($this->canDo->get('core.admin'))
+ {
+ JToolBarHelper::checkin('components_placeholders.checkin');
+ }
+ }
+
+ // Add a batch button
+ if ($this->canBatch && $this->canCreate && $this->canEdit && $this->canState)
+ {
+ // Get the toolbar object instance
+ $bar = JToolBar::getInstance('toolbar');
+ // set the batch button name
+ $title = JText::_('JTOOLBAR_BATCH');
+ // Instantiate a new JLayoutFile instance and render the batch button
+ $layout = new JLayoutFile('joomla.toolbar.batch');
+ // add the button to the page
+ $dhtml = $layout->render(array('title' => $title));
+ $bar->appendButton('Custom', $dhtml, 'batch');
+ }
+
+ if ($this->state->get('filter.published') == -2 && ($this->canState && $this->canDelete))
+ {
+ JToolbarHelper::deleteList('', 'components_placeholders.delete', 'JTOOLBAR_EMPTY_TRASH');
+ }
+ elseif ($this->canState && $this->canDelete)
+ {
+ JToolbarHelper::trash('components_placeholders.trash');
+ }
+ }
+
+ // set help url for this view if found
+ $help_url = ComponentbuilderHelper::getHelpUrl('components_placeholders');
+ if (ComponentbuilderHelper::checkString($help_url))
+ {
+ JToolbarHelper::help('COM_COMPONENTBUILDER_HELP_MANAGER', false, $help_url);
+ }
+
+ // add the options comp button
+ if ($this->canDo->get('core.admin') || $this->canDo->get('core.options'))
+ {
+ JToolBarHelper::preferences('com_componentbuilder');
+ }
+
+ if ($this->canState)
+ {
+ JHtmlSidebar::addFilter(
+ JText::_('JOPTION_SELECT_PUBLISHED'),
+ 'filter_published',
+ JHtml::_('select.options', JHtml::_('jgrid.publishedOptions'), 'value', 'text', $this->state->get('filter.published'), true)
+ );
+ // only load if batch allowed
+ if ($this->canBatch)
+ {
+ JHtmlBatch_::addListSelection(
+ JText::_('COM_COMPONENTBUILDER_KEEP_ORIGINAL_STATE'),
+ 'batch[published]',
+ JHtml::_('select.options', JHtml::_('jgrid.publishedOptions', array('all' => false)), 'value', 'text', '', true)
+ );
+ }
+ }
+
+ JHtmlSidebar::addFilter(
+ JText::_('JOPTION_SELECT_ACCESS'),
+ 'filter_access',
+ JHtml::_('select.options', JHtml::_('access.assetgroups'), 'value', 'text', $this->state->get('filter.access'))
+ );
+
+ if ($this->canBatch && $this->canCreate && $this->canEdit)
+ {
+ JHtmlBatch_::addListSelection(
+ JText::_('COM_COMPONENTBUILDER_KEEP_ORIGINAL_ACCESS'),
+ 'batch[access]',
+ JHtml::_('select.options', JHtml::_('access.assetgroups'), 'value', 'text')
+ );
+ }
+ }
+
+ /**
+ * Method to set up the document properties
+ *
+ * @return void
+ */
+ protected function setDocument()
+ {
+ if (!isset($this->document))
+ {
+ $this->document = JFactory::getDocument();
+ }
+ $this->document->setTitle(JText::_('COM_COMPONENTBUILDER_COMPONENTS_PLACEHOLDERS'));
+ $this->document->addStyleSheet(JURI::root() . "administrator/components/com_componentbuilder/assets/css/components_placeholders.css", (ComponentbuilderHelper::jVersion()->isCompatible('3.8.0')) ? array('version' => 'auto') : 'text/css');
+ }
+
+ /**
+ * Escapes a value for output in a view script.
+ *
+ * @param mixed $var The output to escape.
+ *
+ * @return mixed The escaped value.
+ */
+ public function escape($var)
+ {
+ if(strlen($var) > 50)
+ {
+ // use the helper htmlEscape method instead and shorten the string
+ return ComponentbuilderHelper::htmlEscape($var, $this->_charset, true);
+ }
+ // use the helper htmlEscape method instead.
+ return ComponentbuilderHelper::htmlEscape($var, $this->_charset);
+ }
+
+ /**
+ * Returns an array of fields the table can be sorted by
+ *
+ * @return array Array containing the field name to sort by as the key and display text as value
+ */
+ protected function getSortFields()
+ {
+ return array(
+ 'a.sorting' => JText::_('JGRID_HEADING_ORDERING'),
+ 'a.published' => JText::_('JSTATUS'),
+ 'a.id' => JText::_('JGRID_HEADING_ID')
+ );
+ }
+}
diff --git a/admin/views/joomla_components/tmpl/default_body.php b/admin/views/joomla_components/tmpl/default_body.php
index 95607e7a7..ab944a8d6 100644
--- a/admin/views/joomla_components/tmpl/default_body.php
+++ b/admin/views/joomla_components/tmpl/default_body.php
@@ -104,6 +104,11 @@ $edit = "index.php?option=com_componentbuilder&view=joomla_components&task=jooml
'icon' => 'options')
);
$_buttons[1] = array(
+ array(
+ 'view' => 'component_placeholders',
+ 'views' => 'components_placeholders',
+ 'title' => JText::_('COM_COMPONENTBUILDER_THE_COMPONENT_PLACEHOLDERS'),
+ 'icon' => 'search'),
array(
'view' => 'component_updates',
'views' => 'components_updates',
diff --git a/admin/views/placeholder/submitbutton.js b/admin/views/placeholder/submitbutton.js
new file mode 100644
index 000000000..c5286068e
--- /dev/null
+++ b/admin/views/placeholder/submitbutton.js
@@ -0,0 +1,25 @@
+/**
+ * @package Joomla.Component.Builder
+ *
+ * @created 30th April, 2015
+ * @author Llewellyn van der Merwe
+ * @github 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
+ */
+
+Joomla.submitbutton = function(task)
+{
+ if (task == ''){
+ return false;
+ } else {
+ var action = task.split('.');
+ if (action[1] == 'cancel' || action[1] == 'close' || document.formvalidator.isValid(document.getElementById("adminForm"))){
+ Joomla.submitform(task, document.getElementById("adminForm"));
+ return true;
+ } else {
+ alert(Joomla.JText._('placeholder, some values are not acceptable.','Some values are unacceptable'));
+ return false;
+ }
+ }
+}
\ No newline at end of file
diff --git a/admin/views/placeholder/tmpl/edit.php b/admin/views/placeholder/tmpl/edit.php
new file mode 100644
index 000000000..973df6709
--- /dev/null
+++ b/admin/views/placeholder/tmpl/edit.php
@@ -0,0 +1,107 @@
+
+ * @github 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');
+
+JHtml::addIncludePath(JPATH_COMPONENT.'/helpers/html');
+JHtml::_('behavior.tooltip');
+JHtml::_('behavior.formvalidation');
+JHtml::_('formbehavior.chosen', 'select');
+JHtml::_('behavior.keepalive');
+$componentParams = $this->params; // will be removed just use $this->params instead
+?>
+
+
+
+
+
+
\ No newline at end of file
diff --git a/admin/views/placeholders/tmpl/default_batch_body.php b/admin/views/placeholders/tmpl/default_batch_body.php
new file mode 100644
index 000000000..c99931aaa
--- /dev/null
+++ b/admin/views/placeholders/tmpl/default_batch_body.php
@@ -0,0 +1,18 @@
+
+ * @github 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');
+
+?>
+
+
+batchDisplay; ?>
\ No newline at end of file
diff --git a/admin/views/placeholders/tmpl/default_batch_footer.php b/admin/views/placeholders/tmpl/default_batch_footer.php
new file mode 100644
index 000000000..43d4ffea1
--- /dev/null
+++ b/admin/views/placeholders/tmpl/default_batch_footer.php
@@ -0,0 +1,23 @@
+
+ * @github 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');
+
+?>
+
+
+
+
\ No newline at end of file
diff --git a/admin/views/placeholders/tmpl/default_body.php b/admin/views/placeholders/tmpl/default_body.php
new file mode 100644
index 000000000..cb71e094c
--- /dev/null
+++ b/admin/views/placeholders/tmpl/default_body.php
@@ -0,0 +1,97 @@
+
+ * @github 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');
+
+$edit = "index.php?option=com_componentbuilder&view=placeholders&task=placeholder.edit";
+
+?>
+items as $i => $item): ?>
+ user->authorise('core.manage', 'com_checkin') || $item->checked_out == $this->user->id || $item->checked_out == 0;
+ $userChkOut = JFactory::getUser($item->checked_out);
+ $canDo = ComponentbuilderHelper::getActions('placeholder',$item,'placeholders');
+ ?>
+
+
\ No newline at end of file
diff --git a/admin/views/placeholders/tmpl/default_foot.php b/admin/views/placeholders/tmpl/default_foot.php
new file mode 100644
index 000000000..db893039b
--- /dev/null
+++ b/admin/views/placeholders/tmpl/default_foot.php
@@ -0,0 +1,18 @@
+
+ * @github 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');
+
+?>
+
+
pagination->getListFooter(); ?>
+
\ No newline at end of file
diff --git a/admin/views/placeholders/tmpl/default_head.php b/admin/views/placeholders/tmpl/default_head.php
new file mode 100644
index 000000000..854979239
--- /dev/null
+++ b/admin/views/placeholders/tmpl/default_head.php
@@ -0,0 +1,50 @@
+
+ * @github 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');
+
+?>
+
\ No newline at end of file
diff --git a/admin/views/placeholders/tmpl/default_toolbar.php b/admin/views/placeholders/tmpl/default_toolbar.php
new file mode 100644
index 000000000..6e9b61a9b
--- /dev/null
+++ b/admin/views/placeholders/tmpl/default_toolbar.php
@@ -0,0 +1,45 @@
+
+ * @github 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');
+
+?>
+
+
+
+
+
+
+
+
+
+
+
+ pagination->getLimitBox(); ?>
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/admin/views/placeholders/tmpl/index.html b/admin/views/placeholders/tmpl/index.html
new file mode 100644
index 000000000..fa6d84e80
--- /dev/null
+++ b/admin/views/placeholders/tmpl/index.html
@@ -0,0 +1 @@
+
\ No newline at end of file
diff --git a/admin/views/placeholders/view.html.php b/admin/views/placeholders/view.html.php
new file mode 100644
index 000000000..72b6f85a0
--- /dev/null
+++ b/admin/views/placeholders/view.html.php
@@ -0,0 +1,238 @@
+
+ * @github 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');
+
+/**
+ * Componentbuilder View class for the Placeholders
+ */
+class ComponentbuilderViewPlaceholders extends JViewLegacy
+{
+ /**
+ * Placeholders view display method
+ * @return void
+ */
+ function display($tpl = null)
+ {
+ if ($this->getLayout() !== 'modal')
+ {
+ // Include helper submenu
+ ComponentbuilderHelper::addSubmenu('placeholders');
+ }
+
+ // Assign data to the view
+ $this->items = $this->get('Items');
+ $this->pagination = $this->get('Pagination');
+ $this->state = $this->get('State');
+ $this->user = JFactory::getUser();
+ $this->listOrder = $this->escape($this->state->get('list.ordering'));
+ $this->listDirn = $this->escape($this->state->get('list.direction'));
+ $this->saveOrder = $this->listOrder == 'ordering';
+ // set the return here value
+ $this->return_here = urlencode(base64_encode((string) JUri::getInstance()));
+ // get global action permissions
+ $this->canDo = ComponentbuilderHelper::getActions('placeholder');
+ $this->canEdit = $this->canDo->get('placeholder.edit');
+ $this->canState = $this->canDo->get('placeholder.edit.state');
+ $this->canCreate = $this->canDo->get('placeholder.create');
+ $this->canDelete = $this->canDo->get('placeholder.delete');
+ $this->canBatch = $this->canDo->get('core.batch');
+
+ // We don't need toolbar in the modal window.
+ if ($this->getLayout() !== 'modal')
+ {
+ $this->addToolbar();
+ $this->sidebar = JHtmlSidebar::render();
+ // load the batch html
+ if ($this->canCreate && $this->canEdit && $this->canState)
+ {
+ $this->batchDisplay = JHtmlBatch_::render();
+ }
+ }
+
+ // Check for errors.
+ if (count($errors = $this->get('Errors')))
+ {
+ throw new Exception(implode("\n", $errors), 500);
+ }
+
+ // Display the template
+ parent::display($tpl);
+
+ // Set the document
+ $this->setDocument();
+ }
+
+ /**
+ * Setting the toolbar
+ */
+ protected function addToolBar()
+ {
+ JToolBarHelper::title(JText::_('COM_COMPONENTBUILDER_PLACEHOLDERS'), 'search');
+ JHtmlSidebar::setAction('index.php?option=com_componentbuilder&view=placeholders');
+ JFormHelper::addFieldPath(JPATH_COMPONENT . '/models/fields');
+
+ if ($this->canCreate)
+ {
+ JToolBarHelper::addNew('placeholder.add');
+ }
+
+ // Only load if there are items
+ if (ComponentbuilderHelper::checkArray($this->items))
+ {
+ if ($this->canEdit)
+ {
+ JToolBarHelper::editList('placeholder.edit');
+ }
+
+ if ($this->canState)
+ {
+ JToolBarHelper::publishList('placeholders.publish');
+ JToolBarHelper::unpublishList('placeholders.unpublish');
+ JToolBarHelper::archiveList('placeholders.archive');
+
+ if ($this->canDo->get('core.admin'))
+ {
+ JToolBarHelper::checkin('placeholders.checkin');
+ }
+ }
+
+ // Add a batch button
+ if ($this->canBatch && $this->canCreate && $this->canEdit && $this->canState)
+ {
+ // Get the toolbar object instance
+ $bar = JToolBar::getInstance('toolbar');
+ // set the batch button name
+ $title = JText::_('JTOOLBAR_BATCH');
+ // Instantiate a new JLayoutFile instance and render the batch button
+ $layout = new JLayoutFile('joomla.toolbar.batch');
+ // add the button to the page
+ $dhtml = $layout->render(array('title' => $title));
+ $bar->appendButton('Custom', $dhtml, 'batch');
+ }
+
+ if ($this->state->get('filter.published') == -2 && ($this->canState && $this->canDelete))
+ {
+ JToolbarHelper::deleteList('', 'placeholders.delete', 'JTOOLBAR_EMPTY_TRASH');
+ }
+ elseif ($this->canState && $this->canDelete)
+ {
+ JToolbarHelper::trash('placeholders.trash');
+ }
+
+ if ($this->canDo->get('core.export') && $this->canDo->get('placeholder.export'))
+ {
+ JToolBarHelper::custom('placeholders.exportData', 'download', '', 'COM_COMPONENTBUILDER_EXPORT_DATA', true);
+ }
+ }
+
+ if ($this->canDo->get('core.import') && $this->canDo->get('placeholder.import'))
+ {
+ JToolBarHelper::custom('placeholders.importData', 'upload', '', 'COM_COMPONENTBUILDER_IMPORT_DATA', false);
+ }
+
+ // set help url for this view if found
+ $help_url = ComponentbuilderHelper::getHelpUrl('placeholders');
+ if (ComponentbuilderHelper::checkString($help_url))
+ {
+ JToolbarHelper::help('COM_COMPONENTBUILDER_HELP_MANAGER', false, $help_url);
+ }
+
+ // add the options comp button
+ if ($this->canDo->get('core.admin') || $this->canDo->get('core.options'))
+ {
+ JToolBarHelper::preferences('com_componentbuilder');
+ }
+
+ if ($this->canState)
+ {
+ JHtmlSidebar::addFilter(
+ JText::_('JOPTION_SELECT_PUBLISHED'),
+ 'filter_published',
+ JHtml::_('select.options', JHtml::_('jgrid.publishedOptions'), 'value', 'text', $this->state->get('filter.published'), true)
+ );
+ // only load if batch allowed
+ if ($this->canBatch)
+ {
+ JHtmlBatch_::addListSelection(
+ JText::_('COM_COMPONENTBUILDER_KEEP_ORIGINAL_STATE'),
+ 'batch[published]',
+ JHtml::_('select.options', JHtml::_('jgrid.publishedOptions', array('all' => false)), 'value', 'text', '', true)
+ );
+ }
+ }
+
+ JHtmlSidebar::addFilter(
+ JText::_('JOPTION_SELECT_ACCESS'),
+ 'filter_access',
+ JHtml::_('select.options', JHtml::_('access.assetgroups'), 'value', 'text', $this->state->get('filter.access'))
+ );
+
+ if ($this->canBatch && $this->canCreate && $this->canEdit)
+ {
+ JHtmlBatch_::addListSelection(
+ JText::_('COM_COMPONENTBUILDER_KEEP_ORIGINAL_ACCESS'),
+ 'batch[access]',
+ JHtml::_('select.options', JHtml::_('access.assetgroups'), 'value', 'text')
+ );
+ }
+ }
+
+ /**
+ * Method to set up the document properties
+ *
+ * @return void
+ */
+ protected function setDocument()
+ {
+ if (!isset($this->document))
+ {
+ $this->document = JFactory::getDocument();
+ }
+ $this->document->setTitle(JText::_('COM_COMPONENTBUILDER_PLACEHOLDERS'));
+ $this->document->addStyleSheet(JURI::root() . "administrator/components/com_componentbuilder/assets/css/placeholders.css", (ComponentbuilderHelper::jVersion()->isCompatible('3.8.0')) ? array('version' => 'auto') : 'text/css');
+ }
+
+ /**
+ * Escapes a value for output in a view script.
+ *
+ * @param mixed $var The output to escape.
+ *
+ * @return mixed The escaped value.
+ */
+ public function escape($var)
+ {
+ if(strlen($var) > 50)
+ {
+ // use the helper htmlEscape method instead and shorten the string
+ return ComponentbuilderHelper::htmlEscape($var, $this->_charset, true);
+ }
+ // use the helper htmlEscape method instead.
+ return ComponentbuilderHelper::htmlEscape($var, $this->_charset);
+ }
+
+ /**
+ * Returns an array of fields the table can be sorted by
+ *
+ * @return array Array containing the field name to sort by as the key and display text as value
+ */
+ protected function getSortFields()
+ {
+ return array(
+ 'a.sorting' => JText::_('JGRID_HEADING_ORDERING'),
+ 'a.published' => JText::_('JSTATUS'),
+ 'a.target' => JText::_('COM_COMPONENTBUILDER_PLACEHOLDER_TARGET_LABEL'),
+ 'a.value' => JText::_('COM_COMPONENTBUILDER_PLACEHOLDER_VALUE_LABEL'),
+ 'a.id' => JText::_('JGRID_HEADING_ID')
+ );
+ }
+}
diff --git a/componentbuilder.xml b/componentbuilder.xml
index 7c1c0cbea..367da45e0 100644
--- a/componentbuilder.xml
+++ b/componentbuilder.xml
@@ -1,15 +1,15 @@
COM_COMPONENTBUILDER
- 12th February, 2019
+ 15th February, 2019Llewellyn van der Merwellewellyn@joomlacomponentbuilder.comhttp://www.joomlacomponentbuilder.comCopyright (C) 2015 - 2018 Vast Development Method. All rights reserved.GNU General Public License version 2 or later; see LICENSE.txt
- 2.9.11
+ 2.9.13Component Builder (v.2.9.11)
+
Component Builder (v.2.9.13)
The Component Builder for [Joomla](https://extensions.joomla.org/extension/component-builder/) is highly advanced tool that is truly able to build extremely complex components in a fraction of the time.
@@ -84,6 +84,7 @@ Whether you're a seasoned [Joomla](https://extensions.joomla.org/extension/compo
+
diff --git a/componentbuilder_update_server.xml b/componentbuilder_update_server.xml
index 872042f9b..e92d17657 100644
--- a/componentbuilder_update_server.xml
+++ b/componentbuilder_update_server.xml
@@ -594,4 +594,38 @@
http://www.joomlacomponentbuilder.com
+
+ Component Builder
+ Builds Complex Joomla Components
+ com_componentbuilder
+ component
+ 2.9.12
+ http://www.joomlacomponentbuilder.com
+
+ https://github.com/vdm-io/Joomla-Component-Builder/releases/download/v2.9.12/JCB_v2.9.12.zip
+
+
+ stable
+
+ Llewellyn van der Merwe
+ http://www.joomlacomponentbuilder.com
+
+
+
+ Component Builder
+ Builds Complex Joomla Components
+ com_componentbuilder
+ component
+ 2.9.13
+ http://www.joomlacomponentbuilder.com
+
+ http://domain.com/demo.zip
+
+
+ stable
+
+ Llewellyn van der Merwe
+ http://www.joomlacomponentbuilder.com
+
+
\ No newline at end of file
diff --git a/script.php b/script.php
index bbc0e6e4a..7dcaa6b61 100644
--- a/script.php
+++ b/script.php
@@ -730,6 +730,92 @@ class com_componentbuilderInstallerScript
}
}
+ // Create a new query object.
+ $query = $db->getQuery(true);
+ // Select id from content type table
+ $query->select($db->quoteName('type_id'));
+ $query->from($db->quoteName('#__content_types'));
+ // Where Placeholder alias is found
+ $query->where( $db->quoteName('type_alias') . ' = '. $db->quote('com_componentbuilder.placeholder') );
+ $db->setQuery($query);
+ // Execute query to see if alias is found
+ $db->execute();
+ $placeholder_found = $db->getNumRows();
+ // Now check if there were any rows
+ if ($placeholder_found)
+ {
+ // Since there are load the needed placeholder type ids
+ $placeholder_ids = $db->loadColumn();
+ // Remove Placeholder from the content type table
+ $placeholder_condition = array( $db->quoteName('type_alias') . ' = '. $db->quote('com_componentbuilder.placeholder') );
+ // Create a new query object.
+ $query = $db->getQuery(true);
+ $query->delete($db->quoteName('#__content_types'));
+ $query->where($placeholder_condition);
+ $db->setQuery($query);
+ // Execute the query to remove Placeholder items
+ $placeholder_done = $db->execute();
+ if ($placeholder_done)
+ {
+ // If succesfully remove Placeholder add queued success message.
+ $app->enqueueMessage(JText::_('The (com_componentbuilder.placeholder) type alias was removed from the #__content_type table'));
+ }
+
+ // Remove Placeholder items from the contentitem tag map table
+ $placeholder_condition = array( $db->quoteName('type_alias') . ' = '. $db->quote('com_componentbuilder.placeholder') );
+ // Create a new query object.
+ $query = $db->getQuery(true);
+ $query->delete($db->quoteName('#__contentitem_tag_map'));
+ $query->where($placeholder_condition);
+ $db->setQuery($query);
+ // Execute the query to remove Placeholder items
+ $placeholder_done = $db->execute();
+ if ($placeholder_done)
+ {
+ // If succesfully remove Placeholder add queued success message.
+ $app->enqueueMessage(JText::_('The (com_componentbuilder.placeholder) type alias was removed from the #__contentitem_tag_map table'));
+ }
+
+ // Remove Placeholder items from the ucm content table
+ $placeholder_condition = array( $db->quoteName('core_type_alias') . ' = ' . $db->quote('com_componentbuilder.placeholder') );
+ // Create a new query object.
+ $query = $db->getQuery(true);
+ $query->delete($db->quoteName('#__ucm_content'));
+ $query->where($placeholder_condition);
+ $db->setQuery($query);
+ // Execute the query to remove Placeholder items
+ $placeholder_done = $db->execute();
+ if ($placeholder_done)
+ {
+ // If succesfully remove Placeholder add queued success message.
+ $app->enqueueMessage(JText::_('The (com_componentbuilder.placeholder) type alias was removed from the #__ucm_content table'));
+ }
+
+ // Make sure that all the Placeholder items are cleared from DB
+ foreach ($placeholder_ids as $placeholder_id)
+ {
+ // Remove Placeholder items from the ucm base table
+ $placeholder_condition = array( $db->quoteName('ucm_type_id') . ' = ' . $placeholder_id);
+ // Create a new query object.
+ $query = $db->getQuery(true);
+ $query->delete($db->quoteName('#__ucm_base'));
+ $query->where($placeholder_condition);
+ $db->setQuery($query);
+ // Execute the query to remove Placeholder items
+ $db->execute();
+
+ // Remove Placeholder items from the ucm history table
+ $placeholder_condition = array( $db->quoteName('ucm_type_id') . ' = ' . $placeholder_id);
+ // Create a new query object.
+ $query = $db->getQuery(true);
+ $query->delete($db->quoteName('#__ucm_history'));
+ $query->where($placeholder_condition);
+ $db->setQuery($query);
+ // Execute the query to remove Placeholder items
+ $db->execute();
+ }
+ }
+
// Create a new query object.
$query = $db->getQuery(true);
// Select id from content type table
@@ -2794,6 +2880,92 @@ class com_componentbuilderInstallerScript
}
}
+ // Create a new query object.
+ $query = $db->getQuery(true);
+ // Select id from content type table
+ $query->select($db->quoteName('type_id'));
+ $query->from($db->quoteName('#__content_types'));
+ // Where Component_placeholders alias is found
+ $query->where( $db->quoteName('type_alias') . ' = '. $db->quote('com_componentbuilder.component_placeholders') );
+ $db->setQuery($query);
+ // Execute query to see if alias is found
+ $db->execute();
+ $component_placeholders_found = $db->getNumRows();
+ // Now check if there were any rows
+ if ($component_placeholders_found)
+ {
+ // Since there are load the needed component_placeholders type ids
+ $component_placeholders_ids = $db->loadColumn();
+ // Remove Component_placeholders from the content type table
+ $component_placeholders_condition = array( $db->quoteName('type_alias') . ' = '. $db->quote('com_componentbuilder.component_placeholders') );
+ // Create a new query object.
+ $query = $db->getQuery(true);
+ $query->delete($db->quoteName('#__content_types'));
+ $query->where($component_placeholders_condition);
+ $db->setQuery($query);
+ // Execute the query to remove Component_placeholders items
+ $component_placeholders_done = $db->execute();
+ if ($component_placeholders_done)
+ {
+ // If succesfully remove Component_placeholders add queued success message.
+ $app->enqueueMessage(JText::_('The (com_componentbuilder.component_placeholders) type alias was removed from the #__content_type table'));
+ }
+
+ // Remove Component_placeholders items from the contentitem tag map table
+ $component_placeholders_condition = array( $db->quoteName('type_alias') . ' = '. $db->quote('com_componentbuilder.component_placeholders') );
+ // Create a new query object.
+ $query = $db->getQuery(true);
+ $query->delete($db->quoteName('#__contentitem_tag_map'));
+ $query->where($component_placeholders_condition);
+ $db->setQuery($query);
+ // Execute the query to remove Component_placeholders items
+ $component_placeholders_done = $db->execute();
+ if ($component_placeholders_done)
+ {
+ // If succesfully remove Component_placeholders add queued success message.
+ $app->enqueueMessage(JText::_('The (com_componentbuilder.component_placeholders) type alias was removed from the #__contentitem_tag_map table'));
+ }
+
+ // Remove Component_placeholders items from the ucm content table
+ $component_placeholders_condition = array( $db->quoteName('core_type_alias') . ' = ' . $db->quote('com_componentbuilder.component_placeholders') );
+ // Create a new query object.
+ $query = $db->getQuery(true);
+ $query->delete($db->quoteName('#__ucm_content'));
+ $query->where($component_placeholders_condition);
+ $db->setQuery($query);
+ // Execute the query to remove Component_placeholders items
+ $component_placeholders_done = $db->execute();
+ if ($component_placeholders_done)
+ {
+ // If succesfully remove Component_placeholders add queued success message.
+ $app->enqueueMessage(JText::_('The (com_componentbuilder.component_placeholders) type alias was removed from the #__ucm_content table'));
+ }
+
+ // Make sure that all the Component_placeholders items are cleared from DB
+ foreach ($component_placeholders_ids as $component_placeholders_id)
+ {
+ // Remove Component_placeholders items from the ucm base table
+ $component_placeholders_condition = array( $db->quoteName('ucm_type_id') . ' = ' . $component_placeholders_id);
+ // Create a new query object.
+ $query = $db->getQuery(true);
+ $query->delete($db->quoteName('#__ucm_base'));
+ $query->where($component_placeholders_condition);
+ $db->setQuery($query);
+ // Execute the query to remove Component_placeholders items
+ $db->execute();
+
+ // Remove Component_placeholders items from the ucm history table
+ $component_placeholders_condition = array( $db->quoteName('ucm_type_id') . ' = ' . $component_placeholders_id);
+ // Create a new query object.
+ $query = $db->getQuery(true);
+ $query->delete($db->quoteName('#__ucm_history'));
+ $query->where($component_placeholders_condition);
+ $db->setQuery($query);
+ // Execute the query to remove Component_placeholders items
+ $db->execute();
+ }
+ }
+
// Create a new query object.
$query = $db->getQuery(true);
// Select id from content type table
@@ -3599,6 +3771,18 @@ class com_componentbuilderInstallerScript
// Set the object into the content types table.
$custom_code_Inserted = $db->insertObject('#__content_types', $custom_code);
+ // Create the placeholder content type object.
+ $placeholder = new stdClass();
+ $placeholder->type_title = 'Componentbuilder Placeholder';
+ $placeholder->type_alias = 'com_componentbuilder.placeholder';
+ $placeholder->table = '{"special": {"dbtable": "#__componentbuilder_placeholder","key": "id","type": "Placeholder","prefix": "componentbuilderTable","config": "array()"},"common": {"dbtable": "#__ucm_content","key": "ucm_id","type": "Corecontent","prefix": "JTable","config": "array()"}}';
+ $placeholder->field_mappings = '{"common": {"core_content_item_id": "id","core_title": "target","core_state": "published","core_alias": "null","core_created_time": "created","core_modified_time": "modified","core_body": "null","core_hits": "hits","core_publish_up": "null","core_publish_down": "null","core_access": "access","core_params": "params","core_featured": "null","core_metadata": "null","core_language": "null","core_images": "null","core_urls": "null","core_version": "version","core_ordering": "ordering","core_metakey": "null","core_metadesc": "null","core_catid": "null","core_xreference": "null","asset_id": "asset_id"},"special": {"target":"target","value":"value"}}';
+ $placeholder->router = 'ComponentbuilderHelperRoute::getPlaceholderRoute';
+ $placeholder->content_history_options = '{"formFile": "administrator/components/com_componentbuilder/models/forms/placeholder.xml","hideFields": ["asset_id","checked_out","checked_out_time","version"],"ignoreChanges": ["modified_by","modified","checked_out","checked_out_time","version","hits"],"convertToInt": ["published","ordering"],"displayLookup": [{"sourceColumn": "created_by","targetTable": "#__users","targetColumn": "id","displayColumn": "name"},{"sourceColumn": "access","targetTable": "#__viewlevels","targetColumn": "id","displayColumn": "title"},{"sourceColumn": "modified_by","targetTable": "#__users","targetColumn": "id","displayColumn": "name"}]}';
+
+ // Set the object into the content types table.
+ $placeholder_Inserted = $db->insertObject('#__content_types', $placeholder);
+
// Create the library content type object.
$library = new stdClass();
$library->type_title = 'Componentbuilder Library';
@@ -3887,6 +4071,18 @@ class com_componentbuilderInstallerScript
// Set the object into the content types table.
$component_files_folders_Inserted = $db->insertObject('#__content_types', $component_files_folders);
+ // Create the component_placeholders content type object.
+ $component_placeholders = new stdClass();
+ $component_placeholders->type_title = 'Componentbuilder Component_placeholders';
+ $component_placeholders->type_alias = 'com_componentbuilder.component_placeholders';
+ $component_placeholders->table = '{"special": {"dbtable": "#__componentbuilder_component_placeholders","key": "id","type": "Component_placeholders","prefix": "componentbuilderTable","config": "array()"},"common": {"dbtable": "#__ucm_content","key": "ucm_id","type": "Corecontent","prefix": "JTable","config": "array()"}}';
+ $component_placeholders->field_mappings = '{"common": {"core_content_item_id": "id","core_title": "joomla_component","core_state": "published","core_alias": "null","core_created_time": "created","core_modified_time": "modified","core_body": "null","core_hits": "hits","core_publish_up": "null","core_publish_down": "null","core_access": "access","core_params": "params","core_featured": "null","core_metadata": "null","core_language": "null","core_images": "null","core_urls": "null","core_version": "version","core_ordering": "ordering","core_metakey": "null","core_metadesc": "null","core_catid": "null","core_xreference": "null","asset_id": "asset_id"},"special": {"joomla_component":"joomla_component"}}';
+ $component_placeholders->router = 'ComponentbuilderHelperRoute::getComponent_placeholdersRoute';
+ $component_placeholders->content_history_options = '{"formFile": "administrator/components/com_componentbuilder/models/forms/component_placeholders.xml","hideFields": ["asset_id","checked_out","checked_out_time","version"],"ignoreChanges": ["modified_by","modified","checked_out","checked_out_time","version","hits"],"convertToInt": ["published","ordering","joomla_component"],"displayLookup": [{"sourceColumn": "created_by","targetTable": "#__users","targetColumn": "id","displayColumn": "name"},{"sourceColumn": "access","targetTable": "#__viewlevels","targetColumn": "id","displayColumn": "title"},{"sourceColumn": "modified_by","targetTable": "#__users","targetColumn": "id","displayColumn": "name"},{"sourceColumn": "joomla_component","targetTable": "#__componentbuilder_joomla_component","targetColumn": "id","displayColumn": "system_name"}]}';
+
+ // Set the object into the content types table.
+ $component_placeholders_Inserted = $db->insertObject('#__content_types', $component_placeholders);
+
// Create the snippet_type content type object.
$snippet_type = new stdClass();
$snippet_type->type_title = 'Componentbuilder Snippet_type';
@@ -4181,6 +4377,35 @@ class com_componentbuilderInstallerScript
$custom_code_Inserted = $db->insertObject('#__content_types', $custom_code);
}
+ // Create the placeholder content type object.
+ $placeholder = new stdClass();
+ $placeholder->type_title = 'Componentbuilder Placeholder';
+ $placeholder->type_alias = 'com_componentbuilder.placeholder';
+ $placeholder->table = '{"special": {"dbtable": "#__componentbuilder_placeholder","key": "id","type": "Placeholder","prefix": "componentbuilderTable","config": "array()"},"common": {"dbtable": "#__ucm_content","key": "ucm_id","type": "Corecontent","prefix": "JTable","config": "array()"}}';
+ $placeholder->field_mappings = '{"common": {"core_content_item_id": "id","core_title": "target","core_state": "published","core_alias": "null","core_created_time": "created","core_modified_time": "modified","core_body": "null","core_hits": "hits","core_publish_up": "null","core_publish_down": "null","core_access": "access","core_params": "params","core_featured": "null","core_metadata": "null","core_language": "null","core_images": "null","core_urls": "null","core_version": "version","core_ordering": "ordering","core_metakey": "null","core_metadesc": "null","core_catid": "null","core_xreference": "null","asset_id": "asset_id"},"special": {"target":"target","value":"value"}}';
+ $placeholder->router = 'ComponentbuilderHelperRoute::getPlaceholderRoute';
+ $placeholder->content_history_options = '{"formFile": "administrator/components/com_componentbuilder/models/forms/placeholder.xml","hideFields": ["asset_id","checked_out","checked_out_time","version"],"ignoreChanges": ["modified_by","modified","checked_out","checked_out_time","version","hits"],"convertToInt": ["published","ordering"],"displayLookup": [{"sourceColumn": "created_by","targetTable": "#__users","targetColumn": "id","displayColumn": "name"},{"sourceColumn": "access","targetTable": "#__viewlevels","targetColumn": "id","displayColumn": "title"},{"sourceColumn": "modified_by","targetTable": "#__users","targetColumn": "id","displayColumn": "name"}]}';
+
+ // Check if placeholder type is already in content_type DB.
+ $placeholder_id = null;
+ $query = $db->getQuery(true);
+ $query->select($db->quoteName(array('type_id')));
+ $query->from($db->quoteName('#__content_types'));
+ $query->where($db->quoteName('type_alias') . ' LIKE '. $db->quote($placeholder->type_alias));
+ $db->setQuery($query);
+ $db->execute();
+
+ // Set the object into the content types table.
+ if ($db->getNumRows())
+ {
+ $placeholder->type_id = $db->loadResult();
+ $placeholder_Updated = $db->updateObject('#__content_types', $placeholder, 'type_id');
+ }
+ else
+ {
+ $placeholder_Inserted = $db->insertObject('#__content_types', $placeholder);
+ }
+
// Create the library content type object.
$library = new stdClass();
$library->type_title = 'Componentbuilder Library';
@@ -4877,6 +5102,35 @@ class com_componentbuilderInstallerScript
$component_files_folders_Inserted = $db->insertObject('#__content_types', $component_files_folders);
}
+ // Create the component_placeholders content type object.
+ $component_placeholders = new stdClass();
+ $component_placeholders->type_title = 'Componentbuilder Component_placeholders';
+ $component_placeholders->type_alias = 'com_componentbuilder.component_placeholders';
+ $component_placeholders->table = '{"special": {"dbtable": "#__componentbuilder_component_placeholders","key": "id","type": "Component_placeholders","prefix": "componentbuilderTable","config": "array()"},"common": {"dbtable": "#__ucm_content","key": "ucm_id","type": "Corecontent","prefix": "JTable","config": "array()"}}';
+ $component_placeholders->field_mappings = '{"common": {"core_content_item_id": "id","core_title": "joomla_component","core_state": "published","core_alias": "null","core_created_time": "created","core_modified_time": "modified","core_body": "null","core_hits": "hits","core_publish_up": "null","core_publish_down": "null","core_access": "access","core_params": "params","core_featured": "null","core_metadata": "null","core_language": "null","core_images": "null","core_urls": "null","core_version": "version","core_ordering": "ordering","core_metakey": "null","core_metadesc": "null","core_catid": "null","core_xreference": "null","asset_id": "asset_id"},"special": {"joomla_component":"joomla_component"}}';
+ $component_placeholders->router = 'ComponentbuilderHelperRoute::getComponent_placeholdersRoute';
+ $component_placeholders->content_history_options = '{"formFile": "administrator/components/com_componentbuilder/models/forms/component_placeholders.xml","hideFields": ["asset_id","checked_out","checked_out_time","version"],"ignoreChanges": ["modified_by","modified","checked_out","checked_out_time","version","hits"],"convertToInt": ["published","ordering","joomla_component"],"displayLookup": [{"sourceColumn": "created_by","targetTable": "#__users","targetColumn": "id","displayColumn": "name"},{"sourceColumn": "access","targetTable": "#__viewlevels","targetColumn": "id","displayColumn": "title"},{"sourceColumn": "modified_by","targetTable": "#__users","targetColumn": "id","displayColumn": "name"},{"sourceColumn": "joomla_component","targetTable": "#__componentbuilder_joomla_component","targetColumn": "id","displayColumn": "system_name"}]}';
+
+ // Check if component_placeholders type is already in content_type DB.
+ $component_placeholders_id = null;
+ $query = $db->getQuery(true);
+ $query->select($db->quoteName(array('type_id')));
+ $query->from($db->quoteName('#__content_types'));
+ $query->where($db->quoteName('type_alias') . ' LIKE '. $db->quote($component_placeholders->type_alias));
+ $db->setQuery($query);
+ $db->execute();
+
+ // Set the object into the content types table.
+ if ($db->getNumRows())
+ {
+ $component_placeholders->type_id = $db->loadResult();
+ $component_placeholders_Updated = $db->updateObject('#__content_types', $component_placeholders, 'type_id');
+ }
+ else
+ {
+ $component_placeholders_Inserted = $db->insertObject('#__content_types', $component_placeholders);
+ }
+
// Create the snippet_type content type object.
$snippet_type = new stdClass();
$snippet_type->type_title = 'Componentbuilder Snippet_type';
@@ -5172,7 +5426,7 @@ class com_componentbuilderInstallerScript
echo '
-
Upgrade to Version 2.9.11 Was Successful! Let us know if anything is not working as expected.
';
+
Upgrade to Version 2.9.13 Was Successful! Let us know if anything is not working as expected.
';
}
}
diff --git a/site/helpers/componentbuilder.php b/site/helpers/componentbuilder.php
index a2ba3a50c..51bd47f03 100644
--- a/site/helpers/componentbuilder.php
+++ b/site/helpers/componentbuilder.php
@@ -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
*