Release of v3.2.5

Add [AllowDynamicProperties] in the base view class for J5. Move the _prepareDocument  above the display call in the base view class. Remove all backward compatibility issues, so JCB will not need the [Backward Compatibility] plugin to run. Added new import powers for custom import of spreadsheets. Move the setDocument and _prepareDocument above the display in the site view and custom admin view. Update the trashhelper layout to work in Joomla 5. Add AllowDynamicProperties (Joomla 4+5) to view class to allow Custom Dynamic Get methods to work without issues. Fix Save failed issue in dynamicGet. #1148. Move all [TEXT, EDITOR, TEXTAREA] fields from [NOT NULL] to [NULL]. Add the DateHelper class and improve the date methods. Add simple SessionHelper class. Add first classes for the new import engine. Improve the [VDM Registry] to be Joomla Registry Compatible. Move all registries to the [VDM Registry] class. Fix Checked Out to be null and not 0. (#1194). Fix created_by, modified_by, checked_out fields in the compiler of the SQL. (#1194). Update all core date fields in table class. (#1188). Update created_by, modified_by, checked_out fields in table class. Implementation of the decentralized Super-Power CORE repository network. (#1190). Fix the noticeboard to display Llewellyn's Joomla Social feed.
This commit is contained in:
Robot 2025-02-14 22:59:16 +02:00
parent 714cb5588a
commit f8b0a5df54
Signed by: Robot
GPG Key ID: 14DECD44E7E1BB95
1474 changed files with 133744 additions and 48350 deletions

View File

@ -1,3 +1,26 @@
# v3.2.5
- Add [AllowDynamicProperties] in the base view class for J5
- Move the _prepareDocument above the display call in the base view class
- Remove all backward compatibility issues, so JCB will not need the [Backward Compatibility] plugin to run.
- Added new import powers for custom import of spreadsheets.
- Move the setDocument and _prepareDocument above the display in the site view and custom admin view.
- Update the trashhelper layout to work in Joomla 5.
- Add AllowDynamicProperties (Joomla 4+5) to view class to allow Custom Dynamic Get methods to work without issues.
- Fix Save failed issue in dynamicGet. #1148
- Move all [TEXT, EDITOR, TEXTAREA] fields from [NOT NULL] to [NULL]
- Add the DateHelper class and improve the date methods.
- Add simple SessionHelper class.
- Add first classes for the new import engine.
- Improve the [VDM Registry] to be Joomla Registry Compatible
- Move all registries to the [VDM Registry] class
- Fix Checked Out to be null and not 0. (#1194)
- Fix created_by, modified_by, checked_out fields in the compiler of the SQL. (#1194)
- Update all core date fields in table class. (#1188)
- Update created_by, modified_by, checked_out fields in table class.
- Implementation of the decentralized Super-Power CORE repository network. (#1190)
- Fix the noticeboard to display Llewellyn's Joomla Social feed
# v3.2.4
- Add [push] option to Powers area.

View File

@ -9,7 +9,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 save you lots of time and money. A real must have!
You can install it quite easily and with no limitations. On [gitea](https://git.vdm.dev/joomla/Component-Builder/tags) is the latest release (3.2.4) with **ALL** its features and **ALL** concepts totally open-source and free!
You can install it quite easily and with no limitations. On [gitea](https://git.vdm.dev/joomla/Component-Builder/tags) is the latest release (3.2.5) 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)
@ -144,14 +144,14 @@ TODO
+ *Author*: [Llewellyn van der Merwe](mailto:joomla@vdm.io)
+ *Name*: [Component Builder](https://git.vdm.dev/joomla/Component-Builder)
+ *First Build*: 30th April, 2015
+ *Last Build*: 20th September, 2024
+ *Version*: 3.2.4
+ *Last Build*: 14th February, 2025
+ *Version*: 3.2.5
+ *Copyright*: Copyright (C) 2015 Vast Development Method. All rights reserved.
+ *License*: GNU General Public License version 2 or later; see LICENSE.txt
+ *Line count*: **851089**
+ *Line count*: **885901**
+ *Field count*: **2098**
+ *File count*: **5786**
+ *Folder count*: **505**
+ *File count*: **5977**
+ *Folder count*: **507**
> This **component** was build with a [Joomla](https://extensions.joomla.org/extension/component-builder/) [Automated Component Builder](https://www.joomlacomponentbuilder.com).
> Developed by [Llewellyn van der Merwe](mailto:joomla@vdm.io)

View File

@ -9,7 +9,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 save you lots of time and money. A real must have!
You can install it quite easily and with no limitations. On [gitea](https://git.vdm.dev/joomla/Component-Builder/tags) is the latest release (3.2.4) with **ALL** its features and **ALL** concepts totally open-source and free!
You can install it quite easily and with no limitations. On [gitea](https://git.vdm.dev/joomla/Component-Builder/tags) is the latest release (3.2.5) 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)
@ -144,14 +144,14 @@ TODO
+ *Author*: [Llewellyn van der Merwe](mailto:joomla@vdm.io)
+ *Name*: [Component Builder](https://git.vdm.dev/joomla/Component-Builder)
+ *First Build*: 30th April, 2015
+ *Last Build*: 20th September, 2024
+ *Version*: 3.2.4
+ *Last Build*: 14th February, 2025
+ *Version*: 3.2.5
+ *Copyright*: Copyright (C) 2015 Vast Development Method. All rights reserved.
+ *License*: GNU General Public License version 2 or later; see LICENSE.txt
+ *Line count*: **851089**
+ *Line count*: **885901**
+ *Field count*: **2098**
+ *File count*: **5786**
+ *Folder count*: **505**
+ *File count*: **5977**
+ *Folder count*: **507**
> This **component** was build with a [Joomla](https://extensions.joomla.org/extension/component-builder/) [Automated Component Builder](https://www.joomlacomponentbuilder.com).
> Developed by [Llewellyn van der Merwe](mailto:joomla@vdm.io)

View File

@ -16,4 +16,97 @@ html, body {
.jcb-sponsor-banner {
-webkit-box-shadow: 0 0 7px 1px #f0f0f0;
box-shadow: 0 0 7px 1px #f0f0f0;
}
/* Spinning effect within the mastadon-display-block */
.mastadon-display-block .spinning i {
animation: spin 1s linear infinite;
}
.mastadon-display-block .enlarge-and-disappear {
animation: enlarge-fade-out 1s forwards;
}
@keyframes spin {
from {
transform: rotate(0deg);
}
to {
transform: rotate(360deg);
}
}
@keyframes enlarge-fade-out {
0% {
transform: scale(1);
opacity: 1;
}
100% {
transform: scale(2);
opacity: 0;
}
}
/* Placeholder container scoped to mastadon-display-block */
.mastadon-display-block .placeholder {
display: flex;
flex-direction: column;
gap: 10px;
margin-bottom: 16px;
padding: 16px;
background-color: #fff;
border: 1px solid #ddd;
border-radius: 4px;
}
.mastadon-display-block .placeholder-line {
height: 12px;
background-color: #f0f0f0;
border-radius: 4px;
animation: pulse 1.5s infinite;
}
.mastadon-display-block .placeholder-line:nth-child(1) {
width: 80%;
}
.mastadon-display-block .placeholder-line:nth-child(2) {
width: 60%;
}
.mastadon-display-block .placeholder-line:nth-child(3) {
width: 40%;
}
.mastadon-display-block .placeholder-circle {
width: 50px;
height: 50px;
background-color: #f0f0f0;
border-radius: 50%;
animation: pulse 1.5s infinite;
margin-top: 10px;
}
@keyframes pulse {
0% {
opacity: 1;
}
50% {
opacity: 0.5;
}
100% {
opacity: 1;
}
}
.mastadon-display-block .loading {
visibility: visible;
position: relative;
}
.social-icon-details {
min-height: 50px;
width: 100%;
padding: 5px;
box-sizing: border-box;
font-size: 10px;
text-align: right;
}

302
admin/assets/js/compiler.js Normal file
View File

@ -0,0 +1,302 @@
/**
* @package Joomla.Component.Builder
*
* @created 30th April, 2015
* @author Llewellyn van der Merwe <https://dev.vdm.io>
* @git Joomla Component Builder <https://git.vdm.dev/joomla/Component-Builder>
* @copyright Copyright (C) 2015 Vast Development Method. All rights reserved.
* @license GNU General Public License version 2 or later; see LICENSE.txt
*/
/* JS Document */
class MastodonFeed {
constructor(containerId, refreshButtonId) {
this.container = document.getElementById(containerId);
this.refreshButton = document.getElementById(refreshButtonId);
// Get settings from data attributes
this.mastodonInstance = this.container.dataset.instance;
this.accountId = this.container.dataset.accountId;
this.postCount = parseInt(this.container.dataset.postCount) || 5;
this.cacheKey = "mastodon-feed-cache";
this.cacheExpiration = 24 * 60 * 60 * 1000; // 24 hours in milliseconds
// Initialize the feed
this.initFeed();
// Attach event listener for the refresh button
this.refreshButton.addEventListener("click", () => this.clearCacheAndReload());
}
async initFeed() {
const cachedData = this.getCachedData();
if (cachedData) {
this.renderFeed(cachedData);
} else {
await this.loadFeed();
}
}
getCachedData() {
const cache = localStorage.getItem(this.cacheKey);
if (!cache) return null;
const parsedCache = JSON.parse(cache);
const now = new Date().getTime();
if (now - parsedCache.timestamp > this.cacheExpiration) {
// Cache is expired
this.clearCache();
return null;
}
return parsedCache.data;
}
setCachedData(data) {
const cache = {
timestamp: new Date().getTime(),
data: data,
};
localStorage.setItem(this.cacheKey, JSON.stringify(cache));
}
clearCache() {
localStorage.removeItem(this.cacheKey);
}
async loadFeed() {
try {
const response = await fetch(`${this.mastodonInstance}/api/v1/accounts/${this.accountId}/statuses?limit=${this.postCount}`);
if (!response.ok) {
throw new Error(`Failed to fetch Mastodon feed: ${response.statusText}`);
}
const posts = await response.json();
this.setCachedData(posts); // Cache the data
this.renderFeed(posts);
} catch (error) {
console.error("Error loading Mastodon feed:", error);
this.container.innerHTML = `<div class="alert alert-danger">Error loading feed. Please try again later.</div>`;
}
}
renderFeed(posts) {
// Clear existing content
this.container.innerHTML = "";
posts.forEach(post => {
if (!post.content) return; // Ignore posts with no content
// Create post element
const listItem = document.createElement("div");
listItem.className = "well well-small";
const postContent = document.createElement("div");
const user = post.account;
const avatar = user.avatar_static;
const displayName = user.display_name || user.username;
// User header
const header = document.createElement("div");
header.className = "media";
const avatarLink = document.createElement("a");
avatarLink.href = user.url;
avatarLink.className = "pull-left";
const avatarImg = document.createElement("img");
avatarImg.src = avatar;
avatarImg.alt = displayName;
avatarImg.className = "img-circle";
avatarImg.style.width = "40px";
avatarLink.appendChild(avatarImg);
const userInfo = document.createElement("div");
userInfo.className = "media-body";
const nameLink = document.createElement("a");
nameLink.href = user.url;
nameLink.className = "muted";
nameLink.textContent = displayName;
const username = document.createElement("span");
username.className = "small muted";
username.textContent = ` (@${user.username})`;
const userHeader = document.createElement("h5");
userHeader.appendChild(nameLink);
userHeader.appendChild(username);
userInfo.appendChild(userHeader);
header.appendChild(avatarLink);
header.appendChild(userInfo);
// Post content
const content = document.createElement("p");
content.innerHTML = post.content;
// Interactions
const interactions = document.createElement("div");
interactions.className = "btn-group";
// View Post link
const viewPost = document.createElement("a");
viewPost.href = post.url;
viewPost.className = "btn btn-small btn-primary";
viewPost.innerHTML = `View Post&nbsp;&nbsp;
&nbsp;&nbsp;<i class="icon-comments"></i> ${post.replies_count}&nbsp;
&nbsp;&nbsp;<i class="icon-thumbs-up"></i> ${post.favourites_count}&nbsp;
<i class="icon-loop"></i> ${post.reblogs_count}`;
interactions.appendChild(viewPost);
// Join Me link
const joinLink = document.createElement("a");
joinLink.href = "https://joomla.social/invite/gzAvC48K";
joinLink.className = "btn btn-small btn-success";
joinLink.textContent = "Join Me";
interactions.appendChild(joinLink);
// Assemble post
postContent.appendChild(header);
postContent.appendChild(content);
postContent.appendChild(interactions);
listItem.appendChild(postContent);
this.container.appendChild(listItem);
this.container.classList.remove('loading');
});
}
clearCacheAndReload() {
// Add spinning effect to the refresh button
this.refreshButton.classList.add('spinning');
// Show placeholder content
this.container.classList.add('loading');
this.container.innerHTML = this.generatePlaceholder();
// Clear cache and reload feed
this.clearCache();
// Wait for 3 seconds
setTimeout(() => {
// Enlarge and fade out the refresh button
this.refreshButton.classList.add('enlarge-and-disappear');
// After the animation, reset the button and content
setTimeout(() => {
this.refreshButton.classList.remove('spinning', 'enlarge-and-disappear');
this.refreshButton.style.display = '';
// Remove placeholder and restore actual content
this.loadFeed();
}, 1000); // Animation time for fade-out
}, 3000); // Spinning duration
}
generatePlaceholder() {
let placeholders = '';
for (let i = 0; i < this.postCount; i++) {
placeholders += `
<div class="placeholder">
<div class="placeholder-circle"></div>
<div class="placeholder-line"></div>
<div class="placeholder-line"></div>
<div class="placeholder-line"></div>
<div class="placeholder-line"></div>
</div>
`;
}
return placeholders;
}
}
class IconWaveAnimator {
constructor(containerId, detailsId) {
this.details = document.getElementById(detailsId);
this.container = document.getElementById(containerId);
this.icons = this.container.querySelectorAll("i");
this.links = this.container.querySelectorAll("a");
this.init();
}
init() {
// set the icon hover events
this.setupHoverEvents();
// Random chance to do nothing (1 out of 10)
if (Math.random() < 0.1) return;
// Randomize the initial delay before starting
const initialDelay = Math.random() * 2000 + 2000; // 24 seconds
setTimeout(() => {
this.randomBehavior();
}, initialDelay);
// Occasionally trigger a second wave after 10 seconds
if (Math.random() > 0.5) {
setTimeout(() => {
this.mexicanWave(false); // Reverse wave
}, 10000);
}
}
mexicanWave(forward = true) {
let delay = 0;
const iconsArray = Array.from(this.icons);
(forward ? iconsArray : iconsArray.reverse()).forEach((icon) => {
setTimeout(() => {
icon.style.transition = "transform 0.3s ease-in-out";
icon.style.transform = "scale(1.3)";
setTimeout(() => {
icon.style.transform = "scale(1)";
}, 300);
}, delay);
delay += 150; // Stagger the effect for the wave
});
}
randomBehavior() {
const waveDirection = Math.random() > 0.5 ? "forward" : "backward";
const waveCount = Math.floor(Math.random() * 10) + 1; // 1 to 5 waves
const interval = Math.random() * 2000 + 3000; // 3 to 5 seconds
let executedCount = 0;
const intervalId = setInterval(() => {
if (executedCount >= waveCount) {
clearInterval(intervalId);
return;
}
this.mexicanWave(waveDirection === "forward");
executedCount++;
}, interval);
}
setupHoverEvents() {
this.links.forEach((link) => {
link.addEventListener("mouseenter", () => this.showDetails(link));
link.addEventListener("mouseleave", () => this.clearDetails());
});
}
showDetails(link) {
const description = link.dataset.description;
if (this.details && description) {
this.details.textContent = description;
}
}
clearDetails() {
if (this.details) {
this.details.textContent = "";
}
}
}

View File

@ -35,6 +35,9 @@ class ###Component###View###SView### extends HtmlView
$this->user = Factory::getUser();
// get global action permissions
$this->canDo = ###Component###Helper::getActions('###sview###');###CUSTOM_ADMIN_DIPLAY_METHOD###
// Display the template
parent::display($tpl);
}###CUSTOM_ADMIN_EXTRA_DIPLAY_METHODS###
/**
@ -96,7 +99,7 @@ class ###Component###View###SView### extends HtmlView
*/
public function getDocument()
{
$this->document ??= JFactory::getDocument();
$this->document ??= Factory::getDocument();
return $this->document;
}

View File

@ -72,11 +72,11 @@ class ###Component###View###View### extends HtmlView
throw new Exception(implode("\n", $errors), 500);
}
// Display the template
parent::display($tpl);
// Set the document
$this->setDocument();
// Display the template
parent::display($tpl);
}
@ -113,6 +113,11 @@ class ###Component###View###View### extends HtmlView
*/
protected function setDocument()
{
// Load Core
Html::_('behavior.core');
// Load jQuery
Html::_('jquery.framework');
$isNew = ($this->item->id < 1);
$this->getDocument()->setTitle(Text::_($isNew ? 'COM_###COMPONENT###_###VIEW###_NEW' : 'COM_###COMPONENT###_###VIEW###_EDIT'));
Html::_('stylesheet', "administrator/components/com_###component###/assets/css/###view###.css", ['version' => 'auto']);###AJAXTOKE######LINKEDVIEWTABLESCRIPTS###
@ -126,7 +131,7 @@ class ###Component###View###View### extends HtmlView
*/
public function getDocument()
{
$this->document ??= JFactory::getDocument();
$this->document ??= Factory::getDocument();
return $this->document;
}

View File

@ -72,11 +72,11 @@ class ###Component###View###View### extends HtmlView
throw new Exception(implode("\n", $errors), 500);
}
// Display the template
parent::display($tpl);
// Set the document
$this->setDocument();
// Display the template
parent::display($tpl);
}
@ -114,6 +114,11 @@ class ###Component###View###View### extends HtmlView
*/
protected function setDocument()
{
// Load Core
Html::_('behavior.core');
// Load jQuery
Html::_('jquery.framework');
$isNew = ($this->item->id < 1);
$this->getDocument()->setTitle(Text::_($isNew ? 'COM_###COMPONENT###_###VIEW###_NEW' : 'COM_###COMPONENT###_###VIEW###_EDIT'));
// only add the ISIS template css & js if needed (default is 1 = true)
@ -139,7 +144,7 @@ class ###Component###View###View### extends HtmlView
*/
public function getDocument()
{
$this->document ??= JFactory::getDocument();
$this->document ??= Factory::getDocument();
return $this->document;
}

View File

@ -100,4 +100,14 @@ class ###Component###ViewImport extends HtmlView
ToolbarHelper::help('COM_###COMPONENT###_HELP_MANAGER', false, $this->help_url);
}
}
/**
* Get the Document (helper method toward Joomla 4 and 5)
*/
public function getDocument()
{
$this->document ??= Factory::getDocument();
return $this->document;
}
}

View File

@ -51,4 +51,14 @@ class ###Component###View###View### extends HtmlView
ToolbarHelper::help('COM_###COMPONENT###_HELP_MANAGER', false, $this->help_url);
}
}
/**
* Get the Document (helper method toward Joomla 4 and 5)
*/
public function getDocument()
{
$this->document ??= Factory::getDocument();
return $this->document;
}
}

View File

@ -65,11 +65,11 @@ class ###Component###View###Views### extends HtmlView
throw new Exception(implode("\n", $errors), 500);
}
// Display the template
parent::display($tpl);
// Set the document
$this->setDocument();
// Display the template
parent::display($tpl);
}
/**
@ -151,6 +151,11 @@ class ###Component###View###Views### extends HtmlView
*/
protected function setDocument()
{
// Load Core
Html::_('behavior.core');
// Load jQuery
Html::_('jquery.framework');
if (!isset($this->document))
{
$this->document = Factory::getDocument();
@ -192,7 +197,7 @@ class ###Component###View###Views### extends HtmlView
*/
public function getDocument()
{
$this->document ??= JFactory::getDocument();
$this->document ??= Factory::getDocument();
return $this->document;
}###FILTERFUNCTIONS###

View File

@ -35,6 +35,9 @@ class ###Component###View###SViews### extends HtmlView
$this->user = Factory::getUser();
// get global action permissions
$this->canDo = ###Component###Helper::getActions('###sview###');###CUSTOM_ADMIN_DIPLAY_METHOD###
// Display the template
parent::display($tpl);
}###CUSTOM_ADMIN_EXTRA_DIPLAY_METHODS###
/**
@ -86,7 +89,7 @@ class ###Component###View###SViews### extends HtmlView
*/
public function getDocument()
{
$this->document ??= JFactory::getDocument();
$this->document ??= Factory::getDocument();
return $this->document;
}

View File

@ -33,6 +33,9 @@ class ###Component###View###SViews### extends HtmlView
$this->menu = $this->app->getMenu()->getActive();
// get the user object
$this->user = Factory::getUser();###SITE_DIPLAY_METHOD###
// Display the template
parent::display($tpl);
}###SITE_EXTRA_DIPLAY_METHODS###
/**
@ -78,7 +81,7 @@ class ###Component###View###SViews### extends HtmlView
*/
public function getDocument()
{
$this->document ??= JFactory::getDocument();
$this->document ??= Factory::getDocument();
return $this->document;
}

View File

@ -33,6 +33,9 @@ class ###Component###View###SView### extends HtmlView
$this->menu = $this->app->getMenu()->getActive();
// get the user object
$this->user = Factory::getUser();###SITE_DIPLAY_METHOD###
// Display the template
parent::display($tpl);
}###SITE_EXTRA_DIPLAY_METHODS###
/**
@ -78,7 +81,7 @@ class ###Component###View###SView### extends HtmlView
*/
public function getDocument()
{
$this->document ??= JFactory::getDocument();
$this->document ??= Factory::getDocument();
return $this->document;
}

View File

@ -25,6 +25,7 @@ namespace ###NAMESPACEPREFIX###\Component\###ComponentNamespace###\Administrator
*
* @since 1.6
*/
#[\AllowDynamicProperties]
class HtmlView extends BaseHtmlView
{
/**
@ -89,9 +90,10 @@ class HtmlView extends BaseHtmlView
* @param string $tpl The name of the template file to parse; automatically searches through the template paths.
*
* @return void
* @throws \Exception
* @since 1.6
*/
public function display($tpl = null)
public function display($tpl = null): void
{
// Assign data to the view
$this->items = $this->get('Items');

View File

@ -25,6 +25,7 @@ namespace ###NAMESPACEPREFIX###\Component\###ComponentNamespace###\Administrator
*
* @since 1.6
*/
#[\AllowDynamicProperties]
class HtmlView extends BaseHtmlView
{
/**
@ -113,9 +114,10 @@ class HtmlView extends BaseHtmlView
* @param string $tpl The name of the template file to parse; automatically searches through the template paths.
*
* @return void
* @throws \Exception
* @since 1.6
*/
public function display($tpl = null)
public function display($tpl = null): void
{
// set params
$this->params = ComponentHelper::getParams('com_###component###');

View File

@ -25,6 +25,7 @@ namespace ###NAMESPACEPREFIX###\Component\###ComponentNamespace###\Administrator
*
* @since 1.6
*/
#[\AllowDynamicProperties]
class HtmlView extends BaseHtmlView
{
/**
@ -65,9 +66,10 @@ class HtmlView extends BaseHtmlView
* @param string $tpl The name of the template file to parse; automatically searches through the template paths.
*
* @return void
* @throws \Exception
* @since 1.6
*/
public function display($tpl = null)
public function display($tpl = null): void
{
// get component params
$this->params = ComponentHelper::getParams('com_###component###');
@ -82,6 +84,8 @@ class HtmlView extends BaseHtmlView
// Set the html view document stuff
$this->_prepareDocument();
parent::display($tpl);
}###CUSTOM_ADMIN_EXTRA_DIPLAY_METHODS###
/**

View File

@ -105,9 +105,12 @@ class ###SViews###Model extends ListModel
];
/**
* A custom property for UIKit components. (not used unless you load v2)
* A custom property for UI Kit components.
*
* @var mixed Property for storing UI Kit component-related data or objects.
* @since 3.2.0
*/
protected $uikitComp;
protected $uikitComp = [];
/**
* Constructor

View File

@ -25,6 +25,7 @@ namespace ###NAMESPACEPREFIX###\Component\###ComponentNamespace###\Administrator
*
* @since 1.6
*/
#[\AllowDynamicProperties]
class HtmlView extends BaseHtmlView
{
/**
@ -33,9 +34,10 @@ class HtmlView extends BaseHtmlView
* @param string $tpl The name of the template file to parse; automatically searches through the template paths.
*
* @return void
* @throws \Exception
* @since 1.6
*/
public function display($tpl = null)
public function display($tpl = null): void
{
// get component params
$this->params = ComponentHelper::getParams('com_###component###');
@ -50,6 +52,8 @@ class HtmlView extends BaseHtmlView
// Set the html view document stuff
$this->_prepareDocument();
parent::display($tpl);
}###CUSTOM_ADMIN_EXTRA_DIPLAY_METHODS###
/**

View File

@ -115,10 +115,10 @@ class ###SView###Model extends ItemModel
/**
* A custom property for UI Kit components.
*
* @var array|null Property for storing UI Kit component-related data or objects.
* @var mixed Property for storing UI Kit component-related data or objects.
* @since 3.2.0
*/
protected ?array $uikitComp;
protected $uikitComp = [];
/**
* @var object item

View File

@ -25,13 +25,17 @@ namespace ###NAMESPACEPREFIX###\Component\###ComponentNamespace###\Administrator
*
* @since 1.6
*/
#[\AllowDynamicProperties]
class HtmlView extends BaseHtmlView
{
/**
* View display method
*
* @return void
* @throws \Exception
* @since 1.6
*/
function display($tpl = null)
function display($tpl = null): void
{
// Assign data to the view
$this->icons = $this->get('Icons');

View File

@ -81,9 +81,10 @@ class HtmlView extends BaseHtmlView
* @param string $tpl The name of the template file to parse; automatically searches through the template paths.
*
* @return void
* @throws \Exception
* @since 1.6
*/
public function display($tpl = null)
public function display($tpl = null): void
{
// get combined params of both component and menu
$this->app ??= Factory::getApplication();
@ -93,6 +94,8 @@ class HtmlView extends BaseHtmlView
$this->scripts = $this->get('Scripts');
// get the user object
$this->user ??= $this->app->getIdentity();###SITE_DIPLAY_METHOD###
parent::display($tpl);
}###SITE_EXTRA_DIPLAY_METHODS###
/**

View File

@ -65,9 +65,10 @@ class HtmlView extends BaseHtmlView
* @param string $tpl The name of the template file to parse; automatically searches through the template paths.
*
* @return void
* @throws \Exception
* @since 1.6
*/
public function display($tpl = null)
public function display($tpl = null): void
{
// get combined params of both component and menu
$this->app ??= Factory::getApplication();
@ -77,6 +78,8 @@ class HtmlView extends BaseHtmlView
$this->scripts = $this->get('Scripts') ?? [];
// get the user object
$this->user ??= $this->getCurrentUser();###SITE_DIPLAY_METHOD###
parent::display($tpl);
}###SITE_EXTRA_DIPLAY_METHODS###
/**

View File

@ -57,7 +57,7 @@
buttons="add,remove,move"
description="COM_COMPONENTBUILDER_CONFIG_SUBFORM_LAYOUTS_DESCRIPTION"
icon="list"
max="9"
max="10"
min="1">
<form hidden="true" name="list_subform_layouts_modal" repeat="true">
<!-- View_field Field. Type: List. (joomla) -->
@ -73,6 +73,8 @@
<!-- Option Set. -->
<option value="default">
COM_COMPONENTBUILDER_CONFIG_DEFAULT</option>
<option value="admin_view.ajax_input">
COM_COMPONENTBUILDER_CONFIG_ADMIN_VIEWS_AJAX_INPUT</option>
<option value="admin_custom_tabs.tabs">
COM_COMPONENTBUILDER_CONFIG_ADMIN_CUSTOM_TABS_TABS</option>
<option value="admin_fields.addfields">
@ -93,6 +95,8 @@
COM_COMPONENTBUILDER_CONFIG_COMPONENT_CUSTOM_ADMIN_MENUS_ADDCUSTOMMENUS</option>
<option value="component_site_views.addsite_views">
COM_COMPONENTBUILDER_CONFIG_COMPONENT_SITE_VIEWS_ADDSITE_VIEWS</option>
<option value="custom_admin_view.ajax_input">
COM_COMPONENTBUILDER_CONFIG_CUSTOM_ADMIN_VIEWS_AJAX_INPUT</option>
<option value="dynamic_get.join_db_table">
COM_COMPONENTBUILDER_CONFIG_DYNAMIC_GET_JOIN_DB_TABLE</option>
<option value="dynamic_get.join_view_table">
@ -103,6 +107,8 @@
COM_COMPONENTBUILDER_CONFIG_JOOMLA_MODULE_UPDATES_VERSION_UPDATE</option>
<option value="joomla_plugin_updates.version_update">
COM_COMPONENTBUILDER_CONFIG_JOOMLA_PLUGIN_UPDATES_VERSION_UPDATE</option>
<option value="site_view.ajax_input">
COM_COMPONENTBUILDER_CONFIG_SITE_VIEWS_AJAX_INPUT</option>
</field>
<!-- Layout Field. Type: List. (joomla) -->
<field

View File

@ -192,7 +192,7 @@ class ComponentbuilderControllerJoomla_components extends AdminController
// Sanitize the input
ArrayHelper::toInteger($pks);
// check if there is any selections
if (!JCBArrayHelper::check($pks))
if (!UtilitiesArrayHelper::check($pks))
{
// Redirect to the list screen with error.
$message = Text::_('COM_COMPONENTBUILDER_NO_COMPONENTS_WERE_SELECTED_PLEASE_MAKE_A_SELECTION_AND_TRY_AGAIN');
@ -431,7 +431,7 @@ class ComponentbuilderControllerJoomla_components extends AdminController
// Sanitize the input
ArrayHelper::toInteger($pks);
// check if there is any selections
if (!JCBArrayHelper::check($pks))
if (!UtilitiesArrayHelper::check($pks))
{
// Redirect to the list screen with error.
$message = Text::_('COM_COMPONENTBUILDER_NO_COMPONENT_WAS_SELECTED_PLEASE_MAKE_A_SELECTION_OF_ONE_COMPONENT_AND_TRY_AGAIN');

View File

@ -136,7 +136,7 @@ class ComponentbuilderControllerSnippets extends AdminController
$input = Factory::getApplication()->input;
$pks = $input->post->get('cid', array(), 'array');
// Sanitize the input
JArrayHelper::toInteger($pks);
ArrayHelper::toInteger($pks);
// check if there is any selections
if (!UtilitiesArrayHelper::check($pks))
{

View File

@ -52,6 +52,7 @@ use VDM\Joomla\Componentbuilder\Compiler\Utilities\FieldHelper;
use VDM\Joomla\Componentbuilder\Compiler\Factory as CompilerFactory;
use VDM\Joomla\Utilities\Base64Helper;
use VDM\Joomla\FOF\Encrypt\AES;
use VDM\Joomla\Utilities\DateHelper;
use VDM\Joomla\Utilities\String\ClassfunctionHelper;
use VDM\Joomla\Utilities\String\FieldHelper as StringFieldHelper;
use VDM\Joomla\Utilities\String\TypeHelper;
@ -2164,7 +2165,7 @@ abstract class ComponentbuilderHelper
{
if (!isset(self::$session) || !ObjectHelper::check(self::$session))
{
self::$session = Factory::getSession();
self::$session = Factory::getApplication()->getSession();
}
// set the defaults
self::setSessionDefaults();
@ -2177,7 +2178,7 @@ abstract class ComponentbuilderHelper
{
if (!isset(self::$session) || !ObjectHelper::check(self::$session))
{
self::$session = Factory::getSession();
self::$session = Factory::getApplication()->getSession();
}
// set to local memory to speed up program
self::$localSession[$key] = $value;
@ -2192,7 +2193,7 @@ abstract class ComponentbuilderHelper
{
if (!isset(self::$session) || !ObjectHelper::check(self::$session))
{
self::$session = Factory::getSession();
self::$session = Factory::getApplication()->getSession();
}
// check if in local memory
if (!isset(self::$localSession[$key]))
@ -5228,193 +5229,245 @@ abstract class ComponentbuilderHelper
/**
* Change to nice fancy date
* Convert a date to a human-readable fancy format (e.g., "1st of January 2024").
*
* @param string|int $date The date as a string or timestamp.
* @param bool $checkStamp Whether to check if the input is a timestamp.
*
* @return string Formatted date.
* @since 3.0.0
* @deprecated 4.0.0 Use DateHelper::fancyDate($date, $checkStamp);
*/
public static function fancyDate($date, $check_stamp = true)
public static function fancyDate($date, bool $checkStamp = true): string
{
if ($check_stamp && !self::isValidTimeStamp($date))
{
$date = strtotime($date);
}
return date('jS \o\f F Y',$date);
return DateHelper::fancyDate($date, $checkStamp);
}
/**
* get date based in period past
* Get a formatted date based on the time period (dynamic format based on age of the date).
*
* @param string|int $date The date as a string or timestamp.
* @param bool $checkStamp Whether to check if the input is a timestamp.
*
* @return string Formatted date.
* @since 3.0.0
* @deprecated 4.0.0 Use DateHelper::fancyDynamicDate($date, $checkStamp);
*/
public static function fancyDynamicDate($date, $check_stamp = true)
public static function fancyDynamicDate($date, bool $checkStamp = true): string
{
if ($check_stamp && !self::isValidTimeStamp($date))
{
$date = strtotime($date);
}
// older then year
$lastyear = date("Y", strtotime("-1 year"));
$tragetyear = date("Y", $date);
if ($tragetyear <= $lastyear)
{
return date('m/d/y', $date);
}
// same day
$yesterday = strtotime("-1 day");
if ($date > $yesterday)
{
return date('g:i A', $date);
}
// just month day
return date('M j', $date);
return DateHelper::fancyDynamicDate($date, $checkStamp);
}
/**
* Change to nice fancy day time and date
* Convert a date to a human-readable day, time, and date format (e.g., "Mon 12am 1st of January 2024").
*
* @param string|int $date The date as a string or timestamp.
* @param bool $checkStamp Whether to check if the input is a timestamp.
*
* @return string Formatted day, time, and date.
* @since 3.0.0
* @deprecated 4.0.0 Use DateHelper::fancyDayTimeDate($date, $checkStamp);
*/
public static function fancyDayTimeDate($time, $check_stamp = true)
public static function fancyDayTimeDate($date, bool $checkStamp = true): string
{
if ($check_stamp && !self::isValidTimeStamp($time))
{
$time = strtotime($time);
}
return date('D ga jS \o\f F Y',$time);
return DateHelper::fancyDayTimeDate($date, $checkStamp);
}
/**
* Change to nice fancy time and date
* Convert a date to a human-readable time and date format (e.g., "(12:00) 1st of January 2024").
*
* @param string|int $date The date as a string or timestamp.
* @param bool $checkStamp Whether to check if the input is a timestamp.
*
* @return string Formatted time and date.
* @since 3.0.0
* @deprecated 4.0.0 Use DateHelper::fancyDateTime($date, $checkStamp);
*/
public static function fancyDateTime($time, $check_stamp = true)
public static function fancyDateTime($date, bool $checkStamp = true): string
{
if ($check_stamp && !self::isValidTimeStamp($time))
{
$time = strtotime($time);
}
return date('(G:i) jS \o\f F Y',$time);
return DateHelper::fancyDateTime($date, $checkStamp);
}
/**
* Change to nice hour:minutes time
* Convert a time to a human-readable format (e.g., "12:00").
*
* @param string|int $date The date as a string or timestamp.
* @param bool $checkStamp Whether to check if the input is a timestamp.
*
* @return string Formatted time.
* @since 3.0.0
* @deprecated 4.0.0 Use DateHelper::fancyTime($date, $checkStamp);
*/
public static function fancyTime($time, $check_stamp = true)
public static function fancyTime($date, bool $checkStamp = true): string
{
if ($check_stamp && !self::isValidTimeStamp($time))
{
$time = strtotime($time);
}
return date('G:i',$time);
return DateHelper::fancyTime($date, $checkStamp);
}
/**
* set the date day as Sunday through Saturday
* Convert a date to the day name (e.g., "Sunday").
*
* @param string|int $date The date as a string or timestamp.
* @param bool $checkStamp Whether to check if the input is a timestamp.
*
* @return string Day name.
* @since 3.0.0
* @deprecated 4.0.0 Use DateHelper::setDayName($date, $checkStamp);
*/
public static function setDayName($date, $check_stamp = true)
public static function setDayName($date, bool $checkStamp = true): string
{
if ($check_stamp && !self::isValidTimeStamp($date))
{
$date = strtotime($date);
}
return date('l', $date);
return DateHelper::setDayName($date, $checkStamp);
}
/**
* set the date month as January through December
* Convert a date to the month name (e.g., "January").
*
* @param string|int $date The date as a string or timestamp.
* @param bool $checkStamp Whether to check if the input is a timestamp.
*
* @return string Month name.
* @since 3.0.0
* @deprecated 4.0.0 Use DateHelper::setMonthName($date, $checkStamp);
*/
public static function setMonthName($date, $check_stamp = true)
public static function setMonthName($date, bool $checkStamp = true): string
{
if ($check_stamp && !self::isValidTimeStamp($date))
{
$date = strtotime($date);
}
return date('F', $date);
return DateHelper::setMonthName($date, $checkStamp);
}
/**
* set the date day as 1st
* Convert a date to the day with suffix (e.g., "1st").
*
* @param string|int $date The date as a string or timestamp.
* @param bool $checkStamp Whether to check if the input is a timestamp.
*
* @return string Day with suffix.
* @since 3.0.0
* @deprecated 4.0.0 Use DateHelper::setDay($date, $checkStamp);
*/
public static function setDay($date, $check_stamp = true)
public static function setDay($date, bool $checkStamp = true): string
{
if ($check_stamp && !self::isValidTimeStamp($date))
{
$date = strtotime($date);
}
return date('jS', $date);
return DateHelper::setDay($date, $checkStamp);
}
/**
* set the date month as 5
* Convert a date to the numeric month (e.g., "5").
*
* @param string|int $date The date as a string or timestamp.
* @param bool $checkStamp Whether to check if the input is a timestamp.
*
* @return string Numeric month.
* @since 3.0.0
* @deprecated 4.0.0 Use DateHelper::setMonth($date, $checkStamp);
*/
public static function setMonth($date, $check_stamp = true)
public static function setMonth($date, bool $checkStamp = true): string
{
if ($check_stamp && !self::isValidTimeStamp($date))
{
$date = strtotime($date);
}
return date('n', $date);
return DateHelper::setMonth($date, $checkStamp);
}
/**
* set the date year as 2004 (for charts)
* Convert a date to the full year (e.g., "2024").
*
* @param string|int $date The date as a string or timestamp.
* @param bool $checkStamp Whether to check if the input is a timestamp.
*
* @return string Full year.
* @since 3.0.0
* @deprecated 4.0.0 Use DateHelper::setYear($date, $checkStamp);
*/
public static function setYear($date, $check_stamp = true)
public static function setYear($date, bool $checkStamp = true): string
{
if ($check_stamp && !self::isValidTimeStamp($date))
{
$date = strtotime($date);
}
return date('Y', $date);
return DateHelper::setYear($date, $checkStamp);
}
/**
* set the date as 2004/05 (for charts)
* Convert a date to a year/month format (e.g., "2024/05").
*
* @param string|int $date The date as a string or timestamp.
* @param string $spacer The spacer between year and month.
* @param bool $checkStamp Whether to check if the input is a timestamp.
*
* @return string Year/Month format.
* @since 3.0.0
* @deprecated 4.0.0 Use DateHelper::setYearMonth($date, $spacer, $checkStamp);
*/
public static function setYearMonth($date, $spacer = '/', $check_stamp = true)
public static function setYearMonth($date, string $spacer = '/', bool $checkStamp = true): string
{
if ($check_stamp && !self::isValidTimeStamp($date))
{
$date = strtotime($date);
}
return date('Y' . $spacer . 'm', $date);
return DateHelper::setYearMonth($date, $spacer, $checkStamp);
}
/**
* set the date as 2004/05/03 (for charts)
* Convert a date to a year/month/day format (e.g., "2024/05/03").
*
* @param string|int $date The date as a string or timestamp.
* @param string $spacer The spacer between year and month.
* @param bool $checkStamp Whether to check if the input is a timestamp.
*
* @return string Year/Month/Day format.
* @since 3.0.0
* @deprecated 4.0.0 Use DateHelper::setYearMonthDay($date, $spacer, $checkStamp);
*/
public static function setYearMonthDay($date, $spacer = '/', $check_stamp = true)
public static function setYearMonthDay($date, string $spacer = '/', bool $checkStamp = true): string
{
if ($check_stamp && !self::isValidTimeStamp($date))
{
$date = strtotime($date);
}
return date('Y' . $spacer . 'm' . $spacer . 'd', $date);
return DateHelper::setYearMonthDay($date, $spacer, $checkStamp);
}
/**
* set the date as 03/05/2004
* Convert a date to a day/month/year format (e.g., "03/05/2024").
*
* @param string|int $date The date as a string or timestamp.
* @param string $spacer The spacer between year and month.
* @param bool $checkStamp Whether to check if the input is a timestamp.
*
* @return string Day/Month/Year format.
* @since 3.0.0
* @deprecated 4.0.0 Use DateHelper::setDayMonthYear($date, $spacer, $checkStamp);
*/
public static function setDayMonthYear($date, $spacer = '/', $check_stamp = true)
public static function setDayMonthYear($date, string $spacer = '/', bool $checkStamp = true): string
{
if ($check_stamp && !self::isValidTimeStamp($date))
{
$date = strtotime($date);
}
return date('d' . $spacer . 'm' . $spacer . 'Y', $date);
return DateHelper::setDayMonthYear($date, $spacer, $checkStamp);
}
/**
* Check if string is a valid time stamp
* Convert a date string to a valid timestamp.
*
* @param string|int $date The date as a string or timestamp.
* @param bool $checkStamp Whether to check if the input is a timestamp.
*
* @return int The valid timestamp.
* @since 3.0.0
* @deprecated 4.0.0 Use DateHelper::getValidTimestamp($date, $checkStamp);
*/
public static function isValidTimeStamp($timestamp)
public static function getValidTimestamp($date, bool $checkStamp): int
{
return ((int) $timestamp === $timestamp)
&& ($timestamp <= PHP_INT_MAX)
&& ($timestamp >= ~PHP_INT_MAX);
return DateHelper::getValidTimestamp($date, $checkStamp);
}
/**
* Check if string is a valid date
* https://www.php.net/manual/en/function.checkdate.php#113205
* Check if the input is a valid Unix timestamp.
*
* @param mixed $timestamp The timestamp to validate.
*
* @return bool True if valid timestamp, false otherwise.
* @since 3.0.0
* @deprecated 4.0.0 Use DateHelper::isValidTimeStamp($timestamp);
*/
public static function isValidateDate($date, $format = 'Y-m-d H:i:s')
public static function isValidTimeStamp($timestamp): bool
{
$d = DateTime::createFromFormat($format, $date);
return $d && $d->format($format) == $date;
return DateHelper::isValidTimeStamp($timestamp);
}
/**
* Check if a string is a valid date according to the specified format.
*
* @param string $date The date string to validate.
* @param string $format The format to check against (default is 'Y-m-d H:i:s').
*
* @return bool True if valid date, false otherwise.
* @since 3.0.0
* @deprecated 4.0.0 Use DateHelper::isValidateDate($date, $format);
*/
public static function isValidateDate($date, string $format = 'Y-m-d H:i:s'): bool
{
return DateHelper::isValidateDate($date, $format);
}
/**

View File

@ -1287,7 +1287,6 @@ COM_COMPONENTBUILDER_ALIGNMENT="Alignment"
COM_COMPONENTBUILDER_ALL="All"
COM_COMPONENTBUILDER_ALLOWS_YOU_TO_OVERRIDE_THE_BUILD_DATE_BY_SELECTING_A_DATE_MANUALLY_FROM_THE_CALENDER="Allows you to override the build date by selecting a date manually from the calender."
COM_COMPONENTBUILDER_ALL_FOUND_INSTANCES_IN_S_WHERE_REPLACED="All found instances in %s where replaced"
COM_COMPONENTBUILDER_ALL_IS_GOOD_PLEASE_CHECK_AGAIN_LATER="All is good, please check again later"
COM_COMPONENTBUILDER_ALL_IS_GOOD_THERE_IS_NO_NOTICE_AT_THIS_TIME="All is good, there is no notice at this time."
COM_COMPONENTBUILDER_ALL_OF_THESE_PACKAGES_ARE_A_FULLY_DEVELOPEDMAPPED_COMPONENTS_FOR_JCB_THEY_CAN_BE_SEEN_AS_DEMO_CONTENT_OR_BASE_IMAGES_FROM_WHICH_TO_START_YOUR_PROJECTBR_ALWAYS_MAKE_SURE_YOU_ARE_ON_THE_LATEST_VERSION_OF_JCB_BEFORE_IMPORTING_ANY_OF_THESE_PACKAGES_SHOULD_ANY_OF_THEM_FAIL_TO_IMPORT_A_S_PLEASE_LET_US_KNOWA="All of these packages are a fully developed/mapped components for JCB. They can be seen as demo content, or base images from which to start your project.<br />Always make sure you are on the latest version of JCB before importing any of these packages, should any of them fail to import <a %s >please let us know</a>."
COM_COMPONENTBUILDER_ALL_THE_FIELDS_AND_VIEWS_FROM_YOUR_SQL_DUMP_HAS_BEEN_CREATED_AND_LINKED_TO_THIS_COMPONENT="All the fields and views from your sql dump has been created and linked to this component."
@ -1351,6 +1350,7 @@ COM_COMPONENTBUILDER_BTHE_TMP_FOLDER_HAS_BEEN_CLEARED_SUCCESSFULLYB="<b>The tmp
COM_COMPONENTBUILDER_BUILD="Build"
COM_COMPONENTBUILDER_BUILDIN="Build-in"
COM_COMPONENTBUILDER_BUILD_DATE="Build Date"
COM_COMPONENTBUILDER_BUILD_INNOVATE_AND_THRIVE_WITH_LLEWELLYN_ON_GITHUB_TURNING_IDEAS_INTO_IMPACT="Build, Innovate, and Thrive with Llewellyn on GitHub: Turning Ideas into Impact!"
COM_COMPONENTBUILDER_BULK="Bulk"
COM_COMPONENTBUILDER_BULK_GET_ALL_NEW_SNIPPETS="Bulk Get All New Snippets"
COM_COMPONENTBUILDER_BULK_TOOLS="Bulk Tools"
@ -1647,6 +1647,7 @@ COM_COMPONENTBUILDER_CLONE_FAILED="Clone failed!"
COM_COMPONENTBUILDER_CLOSE_NEW="Close & New"
COM_COMPONENTBUILDER_CODE="Code"
COM_COMPONENTBUILDER_CODESTRINGS="code/strings"
COM_COMPONENTBUILDER_COLLABORATE_AND_INNOVATE_WITH_LLEWELLYN_ON_GIT_BUILDING_A_BETTER_CODE_FUTURE="Collaborate and Innovate with Llewellyn on Git: Building a Better Code Future!"
COM_COMPONENTBUILDER_COMMUNITY_PACKAGES="Community Packages"
COM_COMPONENTBUILDER_COMPANY="Company"
COM_COMPONENTBUILDER_COMPANY_NAME="Company Name"
@ -2963,7 +2964,6 @@ COM_COMPONENTBUILDER_COMPONENT_FILES_FOLDERS_SAVE_WARNING="Alias already existed
COM_COMPONENTBUILDER_COMPONENT_FILES_FOLDERS_STATUS="Status"
COM_COMPONENTBUILDER_COMPONENT_FILES_FOLDERS_VERSION_DESC="A count of the number of times this Component Files & Folders has been revised."
COM_COMPONENTBUILDER_COMPONENT_FILES_FOLDERS_VERSION_LABEL="Version"
COM_COMPONENTBUILDER_COMPONENT_GLOBAL_SETTINGS="Component Global Settings"
COM_COMPONENTBUILDER_COMPONENT_MODULES="Component Modules"
COM_COMPONENTBUILDER_COMPONENT_MODULES_ADDJOOMLA_MODULES_DESCRIPTION="Setup the Joomla modules for this component."
COM_COMPONENTBUILDER_COMPONENT_MODULES_ADDJOOMLA_MODULES_LABEL="Joomla Modules"
@ -3179,6 +3179,7 @@ COM_COMPONENTBUILDER_COMPONENT_ROUTER_SITEVIEW_LABEL="View"
COM_COMPONENTBUILDER_COMPONENT_ROUTER_STATUS="Status"
COM_COMPONENTBUILDER_COMPONENT_ROUTER_VERSION_DESC="A count of the number of times this Component Router has been revised."
COM_COMPONENTBUILDER_COMPONENT_ROUTER_VERSION_LABEL="Version"
COM_COMPONENTBUILDER_COMPONENT_SETTINGS="Component Settings"
COM_COMPONENTBUILDER_COMPONENT_SITE_VIEWS="Component Site Views"
COM_COMPONENTBUILDER_COMPONENT_SITE_VIEWS_ACCESS_DESCRIPTION="Select if this view<br />should use access."
COM_COMPONENTBUILDER_COMPONENT_SITE_VIEWS_ACCESS_LABEL="Add Access"
@ -3298,6 +3299,7 @@ COM_COMPONENTBUILDER_CONFIG_ADMIN_CUSTOM_TABS_TABS="Admin Custom Tabs (tabs)"
COM_COMPONENTBUILDER_CONFIG_ADMIN_FIELDS_ADDFIELDS="Admin Fields (addfields)"
COM_COMPONENTBUILDER_CONFIG_ADMIN_FIELDS_CONDITIONS_ADDCONDITIONS="Admin Fields Conditions (addconditions)"
COM_COMPONENTBUILDER_CONFIG_ADMIN_FIELDS_RELATIONS_ADDRELATIONS="Admin Fields Relations (addrelations)"
COM_COMPONENTBUILDER_CONFIG_ADMIN_VIEWS_AJAX_INPUT="Admin Views (ajax_input)"
COM_COMPONENTBUILDER_CONFIG_ALMOST_FLAT_LOAD="Almost Flat"
COM_COMPONENTBUILDER_CONFIG_ALPHANUMERIC="Alphanumeric"
COM_COMPONENTBUILDER_CONFIG_ALPHANUMERICDOT="Alphanumeric+dot"
@ -3364,6 +3366,7 @@ COM_COMPONENTBUILDER_CONFIG_CRONJOB_BACKUP_SERVER_DESCRIPTION="Select your backu
COM_COMPONENTBUILDER_CONFIG_CRONJOB_BACKUP_SERVER_LABEL="Cronjob Backup Server"
COM_COMPONENTBUILDER_CONFIG_CRONJOB_BACKUP_TYPE_DESCRIPTION="Select how you would like to backup JCB"
COM_COMPONENTBUILDER_CONFIG_CRONJOB_BACKUP_TYPE_LABEL="Cronjob Backup type"
COM_COMPONENTBUILDER_CONFIG_CUSTOM_ADMIN_VIEWS_AJAX_INPUT="Custom Admin Views (ajax_input)"
COM_COMPONENTBUILDER_CONFIG_CUSTOM_FOLDER_PATH_DESCRIPTION="Here you can set the path to the custom folder"
COM_COMPONENTBUILDER_CONFIG_CUSTOM_FOLDER_PATH_HINT="/home/user/custom"
COM_COMPONENTBUILDER_CONFIG_CUSTOM_FOLDER_PATH_LABEL="Custom Folder Path"
@ -3565,6 +3568,7 @@ COM_COMPONENTBUILDER_CONFIG_SET_BROWSER_STORAGE_LABEL="Browser Storage"
COM_COMPONENTBUILDER_CONFIG_SHOW="Show"
COM_COMPONENTBUILDER_CONFIG_SHOW_ALL="Show All"
COM_COMPONENTBUILDER_CONFIG_SIMPLEXMLELEMENT_CLASS="SimpleXMLElement Class"
COM_COMPONENTBUILDER_CONFIG_SITE_VIEWS_AJAX_INPUT="Site Views (ajax_input)"
COM_COMPONENTBUILDER_CONFIG_SMTP="SMTP"
COM_COMPONENTBUILDER_CONFIG_SMTPAUTH_DESCRIPTION="Select yes if your SMTP host requires SMTP Authentication."
COM_COMPONENTBUILDER_CONFIG_SMTPAUTH_LABEL="SMTP Authentication"
@ -3609,6 +3613,7 @@ COM_COMPONENTBUILDER_CONFIG_VDM_PACKAGES="VDM Packages"
COM_COMPONENTBUILDER_CONFIG_VIEW_FIELD_LABEL="View & Field"
COM_COMPONENTBUILDER_CONFIG_YES="Yes"
COM_COMPONENTBUILDER_CONFIRMATION_STEP_BEFORE_IMPORTING="Confirmation Step Before Importing!"
COM_COMPONENTBUILDER_CONNECT_AND_ENGAGE_WITH_LLEWELLYN_ON_JOOMLA_SOCIAL_EMPOWERING_COMMUNITIES_ONE_POST_AT_A_TIME="Connect and Engage with Llewellyn on Joomla Social: Empowering Communities, One Post at a Time!"
COM_COMPONENTBUILDER_CONTEXT="Context"
COM_COMPONENTBUILDER_CONTRIBUTE_TO_JCB="Contribute to JCB"
COM_COMPONENTBUILDER_CONTRIBUTOR="Contributor"
@ -4123,9 +4128,9 @@ COM_COMPONENTBUILDER_CUSTOM_CODE_HASHENDTARGET_DESCRIPTION="The end hash target
COM_COMPONENTBUILDER_CUSTOM_CODE_HASHENDTARGET_HINT="autogenerated md5 hash"
COM_COMPONENTBUILDER_CUSTOM_CODE_HASHENDTARGET_LABEL="End Hash Target"
COM_COMPONENTBUILDER_CUSTOM_CODE_HASHENDTARGET_MESSAGE="Error! Please add some text here."
COM_COMPONENTBUILDER_CUSTOM_CODE_HASHTARGET_DESCRIPTION="The start hash target to help insert the code at the correct place, if the line position change. This hash is the md5 of a few lines above the custom code"
COM_COMPONENTBUILDER_CUSTOM_CODE_HASHTARGET_DESCRIPTION="The end hash target to help insert the code until the correct place, if the line position change. This hash is the md5 of a few lines below the custom code"
COM_COMPONENTBUILDER_CUSTOM_CODE_HASHTARGET_HINT="autogenerated md5 hash"
COM_COMPONENTBUILDER_CUSTOM_CODE_HASHTARGET_LABEL="Start Hash Target"
COM_COMPONENTBUILDER_CUSTOM_CODE_HASHTARGET_LABEL="End Hash Target"
COM_COMPONENTBUILDER_CUSTOM_CODE_HASHTARGET_MESSAGE="Error! Please add some text here."
COM_COMPONENTBUILDER_CUSTOM_CODE_HASH_AUTOMATION="Hash (automation)"
COM_COMPONENTBUILDER_CUSTOM_CODE_HTML="HTML"
@ -4218,6 +4223,7 @@ COM_COMPONENTBUILDER_DISPLAY_SWITCH_FOR_DYNAMIC_PLACEMENT_IN_RELATION_TO_THE_USE
COM_COMPONENTBUILDER_DIVERGED="Diverged"
COM_COMPONENTBUILDER_DIVERGED_MEANS_YOUR_BLOCAL_SNIPPETB_WITH_THE_SAME_NAME_LIBRARY_AND_TYPE_HAS_A_BDIVERGEDB_FROM_THE_COMMUNITY_SNIPPET_WITH_THE_SAME_NAME_LIBRARY_AND_TYPE_IN_THAT_IT_DOES_NOT_HAVE_THE_SAME_BCREATIONB_OR_BMODIFIED_DATEB="Diverged means your <b>local snippet</b> (with the same name, library and type) has a <b>diverged</b> from the community snippet (with the same name, library and type) in that it does not have the same <b>creation</b> or <b>modified date</b>."
COM_COMPONENTBUILDER_DOES_THIS_PACKAGE_REQUIRE_A_KEY_TO_INSTALL="Does this package require a key to install."
COM_COMPONENTBUILDER_DONATE_TOWARDS_JCB_HELP_LLEWELLYN_FINANCIALLY_SO_HE_CAN_CONTINUE_DEVELOPING_THIS_GREAT_TOOL="Donate towards JCB: Help Llewellyn financially so he can continue developing this great tool!"
COM_COMPONENTBUILDER_DONATE_TO_JCB="Donate to JCB"
COM_COMPONENTBUILDER_DONATIONS="Donations!"
COM_COMPONENTBUILDER_DOWNLOAD_UPDATE="Download Update"
@ -4564,6 +4570,7 @@ COM_COMPONENTBUILDER_EVERY_LANGUAGE="Every language"
COM_COMPONENTBUILDER_EXACT_LENGTH_ONLY_FOUR_TEXT_FIELD="Exact Length (only 4 text_field)"
COM_COMPONENTBUILDER_EXAMPLE="Example"
COM_COMPONENTBUILDER_EXIT_TRASH="Exit trash"
COM_COMPONENTBUILDER_EXPLORE_LEARN_AND_CREATE_WITH_LLEWELLYN_ON_YOUTUBE_YOUR_GATEWAY_TO_INSPIRATION="Explore, Learn, and Create with Llewellyn on YouTube: Your Gateway to Inspiration!"
COM_COMPONENTBUILDER_EXPORTIMPORT_DATA="Export/Import Data"
COM_COMPONENTBUILDER_EXPORT_COMPLETED="Export Completed!"
COM_COMPONENTBUILDER_EXPORT_DATA="Export Data"
@ -5513,8 +5520,6 @@ COM_COMPONENTBUILDER_JCB_PACKAGE_INFO_PATH_DOES_NOT_WORK_WE_ADVICE_YOU_BNOT_TO_C
COM_COMPONENTBUILDER_JCB_PROMOTES_EFFICIENCY="JCB Promotes Efficiency"
COM_COMPONENTBUILDER_JCB_PROMOTES_GOODWILL="JCB Promotes Goodwill"
COM_COMPONENTBUILDER_JCB_PROVIDES_A_BETTER_EXPERIENCE="JCB Provides a Better Experience"
COM_COMPONENTBUILDER_JCB_PRO_BOARD="JCB Pro board"
COM_COMPONENTBUILDER_JCB_PRO_NOTICE_BOARD="JCB Pro Notice Board"
COM_COMPONENTBUILDER_JCB_REDUCES_DEVELOPMENT_COSTS="JCB Reduces Development Costs"
COM_COMPONENTBUILDER_JCB_SAVES_TIME="JCB Saves Time"
COM_COMPONENTBUILDER_JCB_STREAMLINES_DEVELOPMENT="JCB Streamlines Development"
@ -5532,9 +5537,12 @@ COM_COMPONENTBUILDER_JCB_YOUR_SUPPORT_MATTERS_MOST="JCB: Your Support Matters Mo
COM_COMPONENTBUILDER_JOIN_FIELDS="Join Fields"
COM_COMPONENTBUILDER_JOIN_JCBS_COMMUNITY="Join JCB's Community"
COM_COMPONENTBUILDER_JOIN_JCBS_JOURNEY="Join JCB's Journey"
COM_COMPONENTBUILDER_JOIN_JCBS_LEAD_DEVELOPER_ON_JOOMLA_SOCIAL_A_MASTODON_INSTANCE="Join JCB's lead developer on Joomla! social a Mastodon instance."
COM_COMPONENTBUILDER_JOIN_JCBS_MISSION="Join JCB's Mission"
COM_COMPONENTBUILDER_JOIN_JCBS_SUCCESS="Join JCB's Success"
COM_COMPONENTBUILDER_JOIN_JCBS_VISION="Join JCB's Vision"
COM_COMPONENTBUILDER_JOIN_LLEWELLYN_ON_THE_JOOMLA_VOLUNTEER_PORTAL_SHAPING_THE_FUTURE_TOGETHER="Join Llewellyn on the Joomla Volunteer Portal: Shaping the Future Together!"
COM_COMPONENTBUILDER_JOIN_THE_CONVERSATION_WITH_LLEWELLYN_ON_X_WHERE_IDEAS_TAKE_FLIGHT="Join the Conversation with Llewellyn on X: Where Ideas Take Flight!"
COM_COMPONENTBUILDER_JOIN_TYPE="Join Type"
COM_COMPONENTBUILDER_JOOMLA_COMPONENT="Joomla Component"
COM_COMPONENTBUILDER_JOOMLA_COMPONENTS="Joomla Components"
@ -5741,6 +5749,7 @@ COM_COMPONENTBUILDER_JOOMLA_COMPONENT_GUID_DESCRIPTION="Globally Unique Identifi
COM_COMPONENTBUILDER_JOOMLA_COMPONENT_GUID_HINT="Auto Generated"
COM_COMPONENTBUILDER_JOOMLA_COMPONENT_GUID_LABEL="GUID"
COM_COMPONENTBUILDER_JOOMLA_COMPONENT_ID="Id"
COM_COMPONENTBUILDER_JOOMLA_COMPONENT_IMAGE="Joomla Component Image"
COM_COMPONENTBUILDER_JOOMLA_COMPONENT_IMAGE_DESCRIPTION="The component image (product box) for the dashboard and install page, must be 300px X 300px."
COM_COMPONENTBUILDER_JOOMLA_COMPONENT_IMAGE_LABEL="Component Image"
COM_COMPONENTBUILDER_JOOMLA_COMPONENT_IMPORT_JCB_PACKAGES_BUTTON_ACCESS="Joomla Component Import JCB Packages Button Access"
@ -7528,6 +7537,8 @@ COM_COMPONENTBUILDER_LINK_LOCAL_DYNAMIC="Link & Local (dynamic)"
COM_COMPONENTBUILDER_LINK_TO_THE_CONTRIBUTOR="Link to the contributor"
COM_COMPONENTBUILDER_LIST_FIELD="List Field"
COM_COMPONENTBUILDER_LIST_VIEW="List View"
COM_COMPONENTBUILDER_LLEWELLYNS_JOOMLA_SOCIAL_FEED="Llewellyn's Joomla! Social Feed"
COM_COMPONENTBUILDER_LLEWELLYN_ON_DOCKER_CONTAINERIZE_YOUR_CREATIVITY="Llewellyn on Docker: Containerize Your Creativity!"
COM_COMPONENTBUILDER_LOADING="loading"
COM_COMPONENTBUILDER_LOADING_THE_PRIVATE_KEY_FILE_FAILED="Loading the private key file failed"
COM_COMPONENTBUILDER_LOADING_THE_PRIVATE_KEY_TEXT_FAILED="Loading the private key text failed"
@ -7610,7 +7621,6 @@ COM_COMPONENTBUILDER_ONLY_ONE_COMPONENT_CAN_BE_CLONED_AT_A_TIME_PLEASE_SELECT_ON
COM_COMPONENTBUILDER_ONLY_SZIP_FILE_WAS_REMOVED_THE_FROM_TMP_FOLDER_DURING_INSTALLATION="Only (%s.zip) file was removed the from tmp folder during installation!"
COM_COMPONENTBUILDER_ONLY_USE_THE_BNONE_DBB_OPTION_IF_YOU_ARE_PLANNING_ON_TARGETING_THIS_FIELD_WITH_JAVASCRIPTCUSTOM_PHP_TO_MOVE_ITS_VALUE_INTO_ANOTHER_FIELD_THAT_DOES_GET_SAVED_TO_THE_DATABASE="Only use the <b>None DB</b> option if you are planning on targeting this field with JavaScript/Custom PHP to move its value into another field that does get saved to the database."
COM_COMPONENTBUILDER_OPEN_LIBRARY_SNIPPETS="Open Library Snippets"
COM_COMPONENTBUILDER_OPTIONS="Options"
COM_COMPONENTBUILDER_ORDER_BEFORE="Order Before"
COM_COMPONENTBUILDER_ORDER_IN_EDIT="Order in Edit"
COM_COMPONENTBUILDER_ORDER_IN_LIST_VIEWS="Order in list views"
@ -7923,6 +7933,7 @@ COM_COMPONENTBUILDER_PUSH_FAILED="Push Failed!"
COM_COMPONENTBUILDER_README="Readme"
COM_COMPONENTBUILDER_READY_TO_COMPILE_A_COMPONENT="Ready to compile a component"
COM_COMPONENTBUILDER_REFRESH="Refresh"
COM_COMPONENTBUILDER_REFRESH_FEED="Refresh Feed"
COM_COMPONENTBUILDER_REGEX_SEARCH="Regex Search"
COM_COMPONENTBUILDER_REMOVE="Remove"
COM_COMPONENTBUILDER_REMOVING_ALL_ZIP_PACKAGES_FROM_THE_TEMPORARY_FOLDER_OF_THE_JOOMLA_INSTALL="Removing all zip packages from the temporary folder of the Joomla install"
@ -9136,7 +9147,6 @@ COM_COMPONENTBUILDER_THE_POWER_HAS_SUCCESSFULLY_BEEN_PUSHED="The power has succe
COM_COMPONENTBUILDER_THE_POWER_HAS_SUCCESSFULLY_BEEN_RESET="The power has successfully been reset."
COM_COMPONENTBUILDER_THE_PRIVATE_KEY_FIELD_COULD_NOT_BE_LOADED_FOR_BSB_SERVER="The private key field could not be loaded for <b>%s</b> server!"
COM_COMPONENTBUILDER_THE_PRIVATE_KEY_FILE_COULD_NOT_BE_LOADEDFOUND_FOR_BSB_SERVER="The private key file could not be loaded/found for <b>%s</b> server!"
COM_COMPONENTBUILDER_THE_PRO_BOARD_IS_LOADING="The pro board is loading"
COM_COMPONENTBUILDER_THE_PUSH_OF_THESE_JOOMLA_FIELD_TYPES_HAS_FAILED="The push of these Joomla Field Types has failed."
COM_COMPONENTBUILDER_THE_PUSH_OF_THESE_JOOMLA_POWERS_HAS_FAILED="The push of these Joomla Powers has failed."
COM_COMPONENTBUILDER_THE_PUSH_OF_THESE_POWERS_HAS_FAILED="The push of these Powers has failed."
@ -9244,6 +9254,7 @@ COM_COMPONENTBUILDER_TYPE_TEMPLATE="Template"
COM_COMPONENTBUILDER_TYPE_VALIDATION_RULE="Validation Rule"
COM_COMPONENTBUILDER_UNACTIVE_ONLY_FOUR_TEXT_FIELD="Unactive (only 4 text_field)"
COM_COMPONENTBUILDER_UNDERNEATH_TABS="Underneath Tabs"
COM_COMPONENTBUILDER_UNLOCK_TRUST_AND_SECURITY_WITH_LLEWELLYNS_GPG_KEY_YOUR_GATEWAY_TO_VERIFIED_CONNECTIONS="Unlock Trust and Security with Llewellyn's GPG Key: Your Gateway to Verified Connections!"
COM_COMPONENTBUILDER_UPDATE="Update"
COM_COMPONENTBUILDER_UPDATE_ALL="Update All"
COM_COMPONENTBUILDER_UPDATE_ALL_DIVERGED_SNIPPETS="Update All Diverged Snippets"
@ -9342,7 +9353,6 @@ COM_COMPONENTBUILDER_VALIDATION_RULE_STATUS="Status"
COM_COMPONENTBUILDER_VALIDATION_RULE_VERSION_DESC="A count of the number of times this Validation Rule has been revised."
COM_COMPONENTBUILDER_VALIDATION_RULE_VERSION_LABEL="Version"
COM_COMPONENTBUILDER_VALUE="Value"
COM_COMPONENTBUILDER_VDM_BOARD="VDM board"
COM_COMPONENTBUILDER_VDM_NOTICE_BOARD="VDM Notice Board"
COM_COMPONENTBUILDER_VDM_PACKAGES="VDM Packages"
COM_COMPONENTBUILDER_VERSION="Version"

View File

@ -20,8 +20,8 @@ use Joomla\CMS\Layout\LayoutHelper;
?>
<div class="well well-small">
<h2 class="module-title nav-header"><?= Text::_('COM_COMPONENTBUILDER_JCB_PRO_NOTICE_BOARD') ?></h2>
<div class="proboard-md"><small><?= Text::_('COM_COMPONENTBUILDER_THE_PRO_BOARD_IS_LOADING') ?><span class="loading-dots">.</span></small></div>
<div style="text-align:right;"><small><a href="https://vdm.bz/get-jcb-pro-membership" target="_blank" style="color:gray">JCB PRO</a></small></div>
</div>
<div id="noticeboard">
<?php echo LayoutHelper::render('mastodon', $displayData ?? []); ?>
</div>
<?php echo LayoutHelper::render('socialnetworking', null); ?>
<div><?php echo ComponentbuilderHelper::getDynamicContent('banner', '728-90'); ?></div>

View File

@ -1,34 +0,0 @@
<?php
/**
* @package Joomla.Component.Builder
*
* @created 30th April, 2015
* @author Llewellyn van der Merwe <https://dev.vdm.io>
* @git Joomla Component Builder <https://git.vdm.dev/joomla/Component-Builder>
* @copyright Copyright (C) 2015 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('JPATH_BASE') or die('Restricted access');
use Joomla\CMS\Factory;
use Joomla\CMS\Language\Text;
use Joomla\CMS\HTML\HTMLHelper as Html;
use Joomla\CMS\Layout\LayoutHelper;
?>
<div id="<?php echo $displayData['id']; ?>">
<?php echo Html::_('bootstrap.startTabSet', $displayData['id'] . '_tab', array('active' => $displayData['active'] . '-noticeboard')); ?>
<?php echo Html::_('bootstrap.addTab', $displayData['id'] . '_tab', 'vdm-noticeboard', Text::_('COM_COMPONENTBUILDER_VDM_BOARD', true)); ?>
<?php echo LayoutHelper::render('jcbnoticeboardvdm', null); ?>
<div class="p-md-3"><?php echo ComponentbuilderHelper::getDynamicContent('banner', '728-90'); ?></div>
<?php echo Html::_('bootstrap.endTab'); ?>
<?php echo Html::_('bootstrap.addTab', $displayData['id'] . '_tab', 'pro-noticeboard', Text::_('COM_COMPONENTBUILDER_JCB_PRO_BOARD', true)); ?>
<?php echo LayoutHelper::render('jcbnoticeboardpro', null); ?>
<div class="p-md-3"><?php echo ComponentbuilderHelper::getDynamicContent('banner', '728-90'); ?></div>
<?php echo Html::_('bootstrap.endTab'); ?>
<?php echo Html::_('bootstrap.endTabSet'); ?>
</div>

View File

@ -1,27 +0,0 @@
<?php
/**
* @package Joomla.Component.Builder
*
* @created 30th April, 2015
* @author Llewellyn van der Merwe <https://dev.vdm.io>
* @git Joomla Component Builder <https://git.vdm.dev/joomla/Component-Builder>
* @copyright Copyright (C) 2015 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('JPATH_BASE') or die('Restricted access');
use Joomla\CMS\Factory;
use Joomla\CMS\Language\Text;
use Joomla\CMS\HTML\HTMLHelper as Html;
use Joomla\CMS\Layout\LayoutHelper;
?>
<div class="well well-small">
<h2 class="module-title nav-header"><?= Text::_('COM_COMPONENTBUILDER_VDM_NOTICE_BOARD') ?><span class="vdm-new-notice" style="display:none; color:red;"> (<?= Text::_('COM_COMPONENTBUILDER_NEW_NOTICE') ?>)</span></h2>
<div class="noticeboard-md"><small><?= Text::_('COM_COMPONENTBUILDER_THE_NOTICE_BOARD_IS_LOADING') ?><span class="loading-dots">.</span></small></div>
<div style="text-align:right;"><small><a href="https://github.com/Llewellynvdm" target="_blank" style="color:gray">&lt;&lt;ewe&gt;&gt;yn</a></small></div>
</div>

View File

@ -0,0 +1,71 @@
<?php
/**
* @package Joomla.Component.Builder
*
* @created 30th April, 2015
* @author Llewellyn van der Merwe <https://dev.vdm.io>
* @git Joomla Component Builder <https://git.vdm.dev/joomla/Component-Builder>
* @copyright Copyright (C) 2015 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('JPATH_BASE') or die('Restricted access');
use Joomla\CMS\Factory;
use Joomla\CMS\Language\Text;
use Joomla\CMS\HTML\HTMLHelper as Html;
use Joomla\CMS\Layout\LayoutHelper;
// Extract all keys from $displayData as individual variables.
extract($displayData ?? []);
// The 'id' parameter, defaulting to mastodon-feed.
$id ??= 'mastodon-feed';
// The button 'id' parameter, defaulting to refresh-feed.
$button_id ??= 'refresh-feed';
// The mastodon instance URL
$instance ??= 'https://joomla.social';
// The user account ID
$account ??= '112766899254600077';
// The number of post to load
$posts ??= 5;
// The 'invite_url' parameter, defaulting to https://joomla.social/invite/gzAvC48K.
$invite_url ??= 'https://joomla.social/invite/gzAvC48K';
// The 'invite_heading' parameter.
$invite_heading ??= Text::_("COM_COMPONENTBUILDER_LLEWELLYNS_JOOMLA_SOCIAL_FEED");
// The 'invite_title' parameter.
$invite_title ??= Text::_("COM_COMPONENTBUILDER_JOIN_JCBS_LEAD_DEVELOPER_ON_JOOMLA_SOCIAL_A_MASTODON_INSTANCE");
?>
<div class="well well-small mastadon-display-block">
<h2>
<a
href="<?php echo $invite_url; ?>"
title="<?php echo $invite_title; ?>">
<?php echo $invite_heading; ?>
</a>&nbsp;&nbsp;
<a
type="button"
id="<?php echo $button_id; ?>"
href="#"
title="<?php echo Text::_('COM_COMPONENTBUILDER_REFRESH_FEED'); ?>">
<i class="icon-loop"></i>
</a>
</h2>
<div id="<?php echo $id; ?>"
data-instance="<?php echo $instance; ?>"
data-account-id="<?php echo $account; ?>"
data-post-count="<?php echo $posts; ?>">
</div>
<script>
new MastodonFeed("<?php echo $id; ?>", "<?php echo $button_id; ?>");
</script>
</div>

View File

@ -0,0 +1,61 @@
<?php
/**
* @package Joomla.Component.Builder
*
* @created 30th April, 2015
* @author Llewellyn van der Merwe <https://dev.vdm.io>
* @git Joomla Component Builder <https://git.vdm.dev/joomla/Component-Builder>
* @copyright Copyright (C) 2015 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('JPATH_BASE') or die('Restricted access');
use Joomla\CMS\Factory;
use Joomla\CMS\Language\Text;
use Joomla\CMS\HTML\HTMLHelper as Html;
use Joomla\CMS\Layout\LayoutHelper;
?>
<div id="llewellyns-social-icons" class="social-icons" style="float: right;">
<a href="https://volunteers.joomla.org/joomlers/1396-llewellyn-van-der-merwe" class="text-decoration-none me-2" data-description="<?php echo Text::_('COM_COMPONENTBUILDER_JOIN_LLEWELLYN_ON_THE_JOOMLA_VOLUNTEER_PORTAL_SHAPING_THE_FUTURE_TOGETHER'); ?>">
<i class="icon-joomla"></i>
</a>
<a href="https://git.vdm.dev/octoleo" class="text-decoration-none me-2" data-description="--quiet">
<i class="icon-shield"></i>
</a>
<a href="https://git.vdm.dev/Llewellyn" class="text-decoration-none me-2" data-description="<?php echo Text::_('COM_COMPONENTBUILDER_COLLABORATE_AND_INNOVATE_WITH_LLEWELLYN_ON_GIT_BUILDING_A_BETTER_CODE_FUTURE'); ?>">
<i class="icon-tree"></i>
</a>
<a href="https://joomla.social/@llewellyn" class="text-decoration-none me-2" data-description="<?php echo Text::_('COM_COMPONENTBUILDER_CONNECT_AND_ENGAGE_WITH_LLEWELLYN_ON_JOOMLA_SOCIAL_EMPOWERING_COMMUNITIES_ONE_POST_AT_A_TIME'); ?>">
<i class="icon-puzzle"></i>
</a>
<a href="https://x.com/llewellynvdm" class="text-decoration-none me-2" data-description="<?php echo Text::_('COM_COMPONENTBUILDER_JOIN_THE_CONVERSATION_WITH_LLEWELLYN_ON_X_WHERE_IDEAS_TAKE_FLIGHT'); ?>">
<i class="icon-signup"></i>
</a>
<a href="https://github.com/Llewellynvdm" class="text-decoration-none me-2" data-description="<?php echo Text::_('COM_COMPONENTBUILDER_BUILD_INNOVATE_AND_THRIVE_WITH_LLEWELLYN_ON_GITHUB_TURNING_IDEAS_INTO_IMPACT'); ?>">
<i class="icon-cog"></i>
</a>
<a href="https://www.youtube.com/@OctoYou" class="text-decoration-none me-2" data-description="<?php echo Text::_('COM_COMPONENTBUILDER_EXPLORE_LEARN_AND_CREATE_WITH_LLEWELLYN_ON_YOUTUBE_YOUR_GATEWAY_TO_INSPIRATION'); ?>">
<i class="icon-youtube"></i>
</a>
<a href="https://hub.docker.com/u/llewellyn" class="text-decoration-none me-2" data-description="<?php echo Text::_('COM_COMPONENTBUILDER_LLEWELLYN_ON_DOCKER_CONTAINERIZE_YOUR_CREATIVITY'); ?>">
<i class="icon-box-add"></i>
</a>
<a href="https://opencollective.com/joomla-component-builder" class="text-decoration-none me-2" data-description="<?php echo Text::_('COM_COMPONENTBUILDER_DONATE_TOWARDS_JCB_HELP_LLEWELLYN_FINANCIALLY_SO_HE_CAN_CONTINUE_DEVELOPING_THIS_GREAT_TOOL'); ?>">
<i class="icon-heart"></i>
</a>
<a href="https://git.vdm.dev/Llewellyn/gpg" class="text-decoration-none" data-description="<?php echo Text::_("COM_COMPONENTBUILDER_UNLOCK_TRUST_AND_SECURITY_WITH_LLEWELLYNS_GPG_KEY_YOUR_GATEWAY_TO_VERIFIED_CONNECTIONS"); ?>">
<i class="icon-key"></i>
</a>
</div>
<br>
<div id="llewellyns-social-icon-details" class="social-icon-details" style="float: right;"></div>
<script>
document.addEventListener("DOMContentLoaded", () => {
new IconWaveAnimator("llewellyns-social-icons", "llewellyns-social-icon-details");
});
</script>

View File

@ -42,7 +42,7 @@ $headers ??= [Text::_('COM_COMPONENTBUILDER_NO'), Text::_('COM_COMPONENTBUILDER_
$items ??= 6;
?>
<div class="<?php echo $$table_container_class; ?>">
<div class="<?php echo $table_container_class; ?>">
<table id="<?php echo $table_id; ?>" class="<?php echo $table_class; ?>">
<thead>
<?php if (is_array($headers)): ?>

View File

@ -31,16 +31,16 @@ use Joomla\CMS\Layout\LayoutHelper;
document.adminForm.elements['checkall-toggle'].checked=1;
Joomla.checkAll(document.adminForm.elements['checkall-toggle']);
// check to confirm the deletion
if(confirm('<?= Text::_("COM_COMPONENTBUILDER_ARE_YOU_SURE_YOU_WANT_TO_DELETE_CONFIRMING_WILL_PERMANENTLY_DELETE_THE_SELECTED_ITEMS") ?>')) {
Joomla.submitbutton('<?= $displayData->get("name") ?>.delete');
if(confirm('<?php echo Text::_("COM_COMPONENTBUILDER_ARE_YOU_SURE_YOU_WANT_TO_DELETE_CONFIRMING_WILL_PERMANENTLY_DELETE_THE_SELECTED_ITEMS") ?>')) {
Joomla.submitbutton('<?php echo $displayData->getName(); ?>.delete');
} else {
document.adminForm.elements['checkall-toggle'].checked=0;
Joomla.checkAll(document.adminForm.elements['checkall-toggle']);
}
} else {
// confirm deletion of those selected
if (confirm('<?= Text::_("COM_COMPONENTBUILDER_ARE_YOU_SURE_YOU_WANT_TO_DELETE_CONFIRMING_WILL_PERMANENTLY_DELETE_THE_SELECTED_ITEMS") ?>')) {
Joomla.submitbutton('<?= $displayData->get("name") ?>.delete');
if (confirm('<?php echo Text::_("COM_COMPONENTBUILDER_ARE_YOU_SURE_YOU_WANT_TO_DELETE_CONFIRMING_WILL_PERMANENTLY_DELETE_THE_SELECTED_ITEMS") ?>')) {
Joomla.submitbutton('<?php echo $displayData->getName(); ?>.delete');
};
}
return false;
@ -56,23 +56,23 @@ use Joomla\CMS\Layout\LayoutHelper;
<?php if (empty($displayData->items)): ?>
<h4 class="alert-heading">
<span class="icon-trash"></span>
<?= Text::_("COM_COMPONENTBUILDER_TRASH_AREA") ?>
<?php echo Text::_("COM_COMPONENTBUILDER_TRASH_AREA") ?>
</h4>
<p><?= Text::_("COM_COMPONENTBUILDER_YOU_ARE_CURRENTLY_VIEWING_THE_TRASH_AREA_AND_YOU_DONT_HAVE_ANY_ITEMS_IN_TRASH_AT_THE_MOMENT") ?></p>
<p><?php echo Text::_("COM_COMPONENTBUILDER_YOU_ARE_CURRENTLY_VIEWING_THE_TRASH_AREA_AND_YOU_DONT_HAVE_ANY_ITEMS_IN_TRASH_AT_THE_MOMENT") ?></p>
<?php else: ?>
<h4 class="alert-heading">
<span class="icon-trash"></span>
<?= Text::_("COM_COMPONENTBUILDER_TRASHED_ITEMS") ?>
<?php echo Text::_("COM_COMPONENTBUILDER_TRASHED_ITEMS") ?>
</h4>
<p><?= Text::_("COM_COMPONENTBUILDER_YOU_ARE_CURRENTLY_VIEWING_THE_TRASHED_ITEMS") ?></p>
<p><?php echo Text::_("COM_COMPONENTBUILDER_YOU_ARE_CURRENTLY_VIEWING_THE_TRASHED_ITEMS") ?></p>
<button onclick="emptyTrash();" class="btn btn-small btn-danger">
<span class="icon-delete" aria-hidden="true"></span>
<?= Text::_("COM_COMPONENTBUILDER_EMPTY_TRASH") ?>
<?php echo Text::_("COM_COMPONENTBUILDER_EMPTY_TRASH") ?>
</button>
<?php endif; ?>
<button onclick="exitTrash();" class="btn btn-small">
<span class="icon-back" aria-hidden="true"></span>
<?= Text::_("COM_COMPONENTBUILDER_EXIT_TRASH") ?>
<?php echo Text::_("COM_COMPONENTBUILDER_EXIT_TRASH") ?>
</button>
</div>
<?php endif; ?>

View File

@ -24,6 +24,7 @@ use Joomla\Registry\Registry;
use Joomla\String\StringHelper;
use Joomla\Utilities\ArrayHelper;
use Joomla\CMS\Helper\TagsHelper;
use VDM\Joomla\Utilities\SessionHelper;
use VDM\Joomla\Utilities\StringHelper as UtilitiesStringHelper;
use VDM\Joomla\Utilities\ObjectHelper;
use VDM\Joomla\Utilities\GuidHelper;
@ -114,7 +115,7 @@ class ComponentbuilderModelAdmin_fields_relations extends AdminModel
$id = $_id;
}
// set the id and view name to session
if ($vdm = ComponentbuilderHelper::get('admin_fields_relations__'.$id))
if (($vdm = SessionHelper::get('admin_fields_relations__'.$id)) !== null)
{
$this->vastDevMod = $vdm;
}
@ -122,17 +123,17 @@ class ComponentbuilderModelAdmin_fields_relations extends AdminModel
{
// set the vast development method key
$this->vastDevMod = UtilitiesStringHelper::random(50);
ComponentbuilderHelper::set($this->vastDevMod, 'admin_fields_relations__'.$id);
ComponentbuilderHelper::set('admin_fields_relations__'.$id, $this->vastDevMod);
SessionHelper::set($this->vastDevMod, 'admin_fields_relations__'.$id);
SessionHelper::set('admin_fields_relations__'.$id, $this->vastDevMod);
// set a return value if found
$jinput = Factory::getApplication()->input;
$return = $jinput->get('return', null, 'base64');
ComponentbuilderHelper::set($this->vastDevMod . '__return', $return);
SessionHelper::set($this->vastDevMod . '__return', $return);
// set a GUID value if found
if (isset($item) && ObjectHelper::check($item) && isset($item->guid)
&& GuidHelper::valid($item->guid))
{
ComponentbuilderHelper::set($this->vastDevMod . '__guid', $item->guid);
SessionHelper::set($this->vastDevMod . '__guid', $item->guid);
}
}
}
@ -187,7 +188,7 @@ class ComponentbuilderModelAdmin_fields_relations extends AdminModel
$id = $item->id;
}
// set the id and view name to session
if ($vdm = ComponentbuilderHelper::get('admin_fields_relations__'.$id))
if (($vdm = SessionHelper::get('admin_fields_relations__'.$id)) !== null)
{
$this->vastDevMod = $vdm;
}
@ -195,17 +196,17 @@ class ComponentbuilderModelAdmin_fields_relations extends AdminModel
{
// set the vast development method key
$this->vastDevMod = UtilitiesStringHelper::random(50);
ComponentbuilderHelper::set($this->vastDevMod, 'admin_fields_relations__'.$id);
ComponentbuilderHelper::set('admin_fields_relations__'.$id, $this->vastDevMod);
SessionHelper::set($this->vastDevMod, 'admin_fields_relations__'.$id);
SessionHelper::set('admin_fields_relations__'.$id, $this->vastDevMod);
// set a return value if found
$jinput = Factory::getApplication()->input;
$return = $jinput->get('return', null, 'base64');
ComponentbuilderHelper::set($this->vastDevMod . '__return', $return);
SessionHelper::set($this->vastDevMod . '__return', $return);
// set a GUID value if found
if (isset($item) && ObjectHelper::check($item) && isset($item->guid)
&& GuidHelper::valid($item->guid))
{
ComponentbuilderHelper::set($this->vastDevMod . '__guid', $item->guid);
SessionHelper::set($this->vastDevMod . '__guid', $item->guid);
}
}
}

View File

@ -24,6 +24,7 @@ use Joomla\Registry\Registry;
use Joomla\String\StringHelper;
use Joomla\Utilities\ArrayHelper;
use Joomla\CMS\Helper\TagsHelper;
use VDM\Joomla\Utilities\SessionHelper;
use VDM\Joomla\Utilities\StringHelper as UtilitiesStringHelper;
use VDM\Joomla\Utilities\ObjectHelper;
use VDM\Joomla\Utilities\GuidHelper;
@ -263,7 +264,7 @@ class ComponentbuilderModelAdmin_view extends AdminModel
$id = $_id;
}
// set the id and view name to session
if ($vdm = ComponentbuilderHelper::get('admin_view__'.$id))
if (($vdm = SessionHelper::get('admin_view__'.$id)) !== null)
{
$this->vastDevMod = $vdm;
}
@ -271,17 +272,17 @@ class ComponentbuilderModelAdmin_view extends AdminModel
{
// set the vast development method key
$this->vastDevMod = UtilitiesStringHelper::random(50);
ComponentbuilderHelper::set($this->vastDevMod, 'admin_view__'.$id);
ComponentbuilderHelper::set('admin_view__'.$id, $this->vastDevMod);
SessionHelper::set($this->vastDevMod, 'admin_view__'.$id);
SessionHelper::set('admin_view__'.$id, $this->vastDevMod);
// set a return value if found
$jinput = Factory::getApplication()->input;
$return = $jinput->get('return', null, 'base64');
ComponentbuilderHelper::set($this->vastDevMod . '__return', $return);
SessionHelper::set($this->vastDevMod . '__return', $return);
// set a GUID value if found
if (isset($item) && ObjectHelper::check($item) && isset($item->guid)
&& GuidHelper::valid($item->guid))
{
ComponentbuilderHelper::set($this->vastDevMod . '__guid', $item->guid);
SessionHelper::set($this->vastDevMod . '__guid', $item->guid);
}
}
}
@ -612,7 +613,7 @@ class ComponentbuilderModelAdmin_view extends AdminModel
$id = $item->id;
}
// set the id and view name to session
if ($vdm = ComponentbuilderHelper::get('admin_view__'.$id))
if (($vdm = SessionHelper::get('admin_view__'.$id)) !== null)
{
$this->vastDevMod = $vdm;
}
@ -620,17 +621,17 @@ class ComponentbuilderModelAdmin_view extends AdminModel
{
// set the vast development method key
$this->vastDevMod = UtilitiesStringHelper::random(50);
ComponentbuilderHelper::set($this->vastDevMod, 'admin_view__'.$id);
ComponentbuilderHelper::set('admin_view__'.$id, $this->vastDevMod);
SessionHelper::set($this->vastDevMod, 'admin_view__'.$id);
SessionHelper::set('admin_view__'.$id, $this->vastDevMod);
// set a return value if found
$jinput = Factory::getApplication()->input;
$return = $jinput->get('return', null, 'base64');
ComponentbuilderHelper::set($this->vastDevMod . '__return', $return);
SessionHelper::set($this->vastDevMod . '__return', $return);
// set a GUID value if found
if (isset($item) && ObjectHelper::check($item) && isset($item->guid)
&& GuidHelper::valid($item->guid))
{
ComponentbuilderHelper::set($this->vastDevMod . '__guid', $item->guid);
SessionHelper::set($this->vastDevMod . '__guid', $item->guid);
}
}
// update the fields
@ -799,6 +800,9 @@ class ComponentbuilderModelAdmin_view extends AdminModel
}
}
// update the ajax_input (sub form) layout
$form->setFieldAttribute('ajax_input', 'layout', ComponentbuilderHelper::getSubformLayout('admin_view', 'ajax_input'));
// update all editors to use this components global editor
$global_editor = ComponentHelper::getParams('com_componentbuilder')->get('editor', 'none');
// now get all the editor fields
@ -1013,7 +1017,7 @@ class ComponentbuilderModelAdmin_view extends AdminModel
// change to false
$form->setFieldAttribute($requiredField, 'required', 'false');
// also clear the data set
$data[$requiredField] = '';
unset($data[$requiredField]);
}
}
}

View File

@ -28,6 +28,7 @@ use VDM\Joomla\Componentbuilder\Search\Factory as SearchFactory;
use VDM\Joomla\Utilities\ArrayHelper as UtilitiesArrayHelper;
use VDM\Joomla\Utilities\GetHelper;
use VDM\Joomla\Utilities\GuidHelper;
use VDM\Joomla\Utilities\SessionHelper;
use VDM\Joomla\Utilities\Base64Helper;
use VDM\Joomla\Componentbuilder\Compiler\Utilities\FieldHelper;
use Joomla\CMS\Uri\Uri;
@ -164,35 +165,73 @@ class ComponentbuilderModelAjax extends ListModel
}
/**
* set the component display
**/
* Generate the component details display in HTML.
*
* @param object $object The component object containing details.
* @return string The HTML string for displaying component details.
*/
protected function componentDetailsDisplay($object)
{
// set some vars
$image = (StringHelper::check($object->image)) ? '<img alt="Joomla Component Image" src="'. Uri::root() . $object->image . '" style="float: right;">': '';
$desc = (StringHelper::check($object->description)) ? $object->description : $object->short_description;
$placeholder = ($object->add_placeholders == 1) ? '<span class="btn btn-small btn-success"> ' . Text::_('COM_COMPONENTBUILDER_YES') . ' </span>' : '<span class="btn btn-small btn-danger"> ' .Text::_('COM_COMPONENTBUILDER_NO') . ' </span>' ;
$debug = ($object->debug_linenr == 1) ? '<span class="btn btn-small btn-success"> ' .Text::_('COM_COMPONENTBUILDER_YES') . '</span>' : ' <span class="btn btn-small btn-danger"> ' .Text::_('COM_COMPONENTBUILDER_NO') . ' </span>' ;
$html = array();
$html[] = '<h3>' . $object->name . ' (v' . $object->component_version . ')</h3>';
$html[] = '<p>' . $desc . $image . '</p>';
$html[] = '<ul>';
$html[] = '<li>' . Text::_('COM_COMPONENTBUILDER_COMPANY') . ': <b>' . $object->companyname . '</b></li>';
$html[] = '<li>' . Text::_('COM_COMPONENTBUILDER_AUTHOR') . ': <b>' . $object->author . '</b></li>';
$html[] = '<li>' . Text::_('COM_COMPONENTBUILDER_EMAIL') . ': <b>' . $object->email . '</b></li>';
$html[] = '<li>' . Text::_('COM_COMPONENTBUILDER_WEBSITE') . ': <b>' . $object->website . '</b></li>';
$html[] = '</ul>';
$html[] = '<h4>' . Text::_('COM_COMPONENTBUILDER_COMPONENT_GLOBAL_SETTINGS') . '</h4>';
// Helper variables with null coalescing to ensure robust value assignment
$imageSrc = !empty($object->image) ? htmlspecialchars($object->image, ENT_QUOTES) : null;
$image = $imageSrc
? '<img alt="' . Text::_('COM_COMPONENTBUILDER_JOOMLA_COMPONENT_IMAGE') . '" src="' . Uri::root() . $imageSrc . '" style="float: right; max-width: 250px; margin-left: 15px;">'
: '';
$description = htmlspecialchars(!empty($object->description) ? $object->description : $object->short_description, ENT_QUOTES);
$placeholderStatus = $object->add_placeholders
? '<span class="badge badge-success">' . Text::_('COM_COMPONENTBUILDER_YES') . '</span>'
: '<span class="badge badge-danger">' . Text::_('COM_COMPONENTBUILDER_NO') . '</span>';
$debugStatus = $object->debug_linenr
? '<span class="badge badge-success">' . Text::_('COM_COMPONENTBUILDER_YES') . '</span>'
: '<span class="badge badge-danger">' . Text::_('COM_COMPONENTBUILDER_NO') . '</span>';
// Author and company details
$company = '<ul>';
$company .= '<li><strong>' . Text::_('COM_COMPONENTBUILDER_COMPANY') . ':</strong> ' . htmlspecialchars($object->companyname, ENT_QUOTES) . '</li>';
$company .= '<li><strong>' . Text::_('COM_COMPONENTBUILDER_AUTHOR') . ':</strong> ' . htmlspecialchars($object->author, ENT_QUOTES) . '</li>';
$company .= '<li><strong>' . Text::_('COM_COMPONENTBUILDER_EMAIL') . ':</strong> <a href="mailto:' . htmlspecialchars($object->email, ENT_QUOTES) . '">' . htmlspecialchars($object->email, ENT_QUOTES) . '</a></li>';
$company .= '<li><strong>' . Text::_('COM_COMPONENTBUILDER_WEBSITE') . ':</strong> <a href="' . htmlspecialchars($object->website, ENT_QUOTES) . '" target="_blank" rel="noopener">' . htmlspecialchars($object->website, ENT_QUOTES) . '</a></li>';
$company .= '</ul>';
// Build HTML output
$html = [];
// Header with component name and version
$html[] = '<div class="component-details">';
$html[] = '<h3>' . htmlspecialchars($object->name, ENT_QUOTES) . ' (v' . htmlspecialchars($object->component_version, ENT_QUOTES) . ')</h3>';
// Description with optional image
$html[] = '<div class="description" style="overflow: hidden;">';
$html[] = '<p>' . $image . $description . $company . '</p>';
$html[] = '</div>';
// Component settings
$html[] = '<h4>' . Text::_('COM_COMPONENTBUILDER_COMPONENT_SETTINGS') . '</h4>';
$html[] = '<p>';
$html[] = Text::_('COM_COMPONENTBUILDER_ADD_CUSTOM_CODE_PLACEHOLDERS') . '<br />' . $placeholder . '<br />';
$html[] = Text::_('COM_COMPONENTBUILDER_DEBUG_LINE_NUMBERS') . '<br />' . $debug ;
$html[] = Text::_('COM_COMPONENTBUILDER_ADD_CUSTOM_CODE_PLACEHOLDERS') . ': ' . $placeholderStatus . '<br>';
$html[] = Text::_('COM_COMPONENTBUILDER_DEBUG_LINE_NUMBERS') . ': ' . $debugStatus;
$html[] = '</p>';
// License details
$html[] = '<h4>' . Text::_('COM_COMPONENTBUILDER_LICENSE') . '</h4>';
$html[] = '<p>' . $object->license . '</p>';
$html[] = '<p>' . nl2br(htmlspecialchars($object->license, ENT_QUOTES)) . '</p>';
// Copyright
$html[] = '<h4>' . Text::_('COM_COMPONENTBUILDER_COPYRIGHT') . '</h4>';
$html[] = '<p>' . $object->copyright . '<br /><br />';
$html[] = '<a href="index.php?option=com_componentbuilder&ref=compiler&view=joomla_components&task=joomla_component.edit&id=' . (int) $object->id . '" class="btn btn-small span12"><span class="icon-edit"></span> ' . Text::_('COM_COMPONENTBUILDER_EDIT') . ' ' .$object->system_name . '</a></p>';
// now return the diplay
$html[] = '<p>' . nl2br(htmlspecialchars($object->copyright, ENT_QUOTES)) . '</p>';
// Edit button
$html[] = '<p>';
$html[] = '<a href="index.php?option=com_componentbuilder&ref=compiler&view=joomla_components&task=joomla_component.edit&id=' . (int) $object->id . '" class="btn btn-primary btn-block">';
$html[] = '<span class="icon-edit"></span> ' . Text::_('COM_COMPONENTBUILDER_EDIT') . ' ' . htmlspecialchars($object->system_name, ENT_QUOTES);
$html[] = '</a>';
$html[] = '</p>';
$html[] = '</div>'; // Close component-details
return implode("\n", $html);
}
@ -1595,7 +1634,7 @@ class ComponentbuilderModelAjax extends ListModel
* @var array
* @since 3.0.13
*/
protected $viewid = [];
protected array $viewid = [];
/**
* Get the view details via the session
@ -1615,7 +1654,7 @@ class ComponentbuilderModelAjax extends ListModel
if ($vdm)
{
// set view and id
if ($view = ComponentbuilderHelper::get($vdm))
if (($view = SessionHelper::get($vdm)) !== null)
{
$current = (array) explode('__', $view);
if (StringHelper::check($current[0]) && isset($current[1]) && is_numeric($current[1]))
@ -1628,7 +1667,7 @@ class ComponentbuilderModelAjax extends ListModel
}
}
// set GUID if found
if (($guid = ComponentbuilderHelper::get($vdm . '__guid')) !== false)
if (($guid = SessionHelper::get($vdm . '__guid')) !== null)
{
if (GuidHelper::valid($guid))
{
@ -1636,7 +1675,7 @@ class ComponentbuilderModelAjax extends ListModel
}
}
// set return if found
if (($return = ComponentbuilderHelper::get($vdm . '__return')) !== false)
if (($return = SessionHelper::get($vdm . '__return')) !== null)
{
if (StringHelper::check($return))
{

View File

@ -24,6 +24,7 @@ use Joomla\Registry\Registry;
use Joomla\String\StringHelper;
use Joomla\Utilities\ArrayHelper;
use Joomla\CMS\Helper\TagsHelper;
use VDM\Joomla\Utilities\SessionHelper;
use VDM\Joomla\Utilities\StringHelper as UtilitiesStringHelper;
use VDM\Joomla\Utilities\ObjectHelper;
use VDM\Joomla\Utilities\GuidHelper;
@ -118,7 +119,7 @@ class ComponentbuilderModelClass_extends extends AdminModel
$id = $_id;
}
// set the id and view name to session
if ($vdm = ComponentbuilderHelper::get('class_extends__'.$id))
if (($vdm = SessionHelper::get('class_extends__'.$id)) !== null)
{
$this->vastDevMod = $vdm;
}
@ -126,17 +127,17 @@ class ComponentbuilderModelClass_extends extends AdminModel
{
// set the vast development method key
$this->vastDevMod = UtilitiesStringHelper::random(50);
ComponentbuilderHelper::set($this->vastDevMod, 'class_extends__'.$id);
ComponentbuilderHelper::set('class_extends__'.$id, $this->vastDevMod);
SessionHelper::set($this->vastDevMod, 'class_extends__'.$id);
SessionHelper::set('class_extends__'.$id, $this->vastDevMod);
// set a return value if found
$jinput = Factory::getApplication()->input;
$return = $jinput->get('return', null, 'base64');
ComponentbuilderHelper::set($this->vastDevMod . '__return', $return);
SessionHelper::set($this->vastDevMod . '__return', $return);
// set a GUID value if found
if (isset($item) && ObjectHelper::check($item) && isset($item->guid)
&& GuidHelper::valid($item->guid))
{
ComponentbuilderHelper::set($this->vastDevMod . '__guid', $item->guid);
SessionHelper::set($this->vastDevMod . '__guid', $item->guid);
}
}
}
@ -195,7 +196,7 @@ class ComponentbuilderModelClass_extends extends AdminModel
$id = $item->id;
}
// set the id and view name to session
if ($vdm = ComponentbuilderHelper::get('class_extends__'.$id))
if (($vdm = SessionHelper::get('class_extends__'.$id)) !== null)
{
$this->vastDevMod = $vdm;
}
@ -203,17 +204,17 @@ class ComponentbuilderModelClass_extends extends AdminModel
{
// set the vast development method key
$this->vastDevMod = UtilitiesStringHelper::random(50);
ComponentbuilderHelper::set($this->vastDevMod, 'class_extends__'.$id);
ComponentbuilderHelper::set('class_extends__'.$id, $this->vastDevMod);
SessionHelper::set($this->vastDevMod, 'class_extends__'.$id);
SessionHelper::set('class_extends__'.$id, $this->vastDevMod);
// set a return value if found
$jinput = Factory::getApplication()->input;
$return = $jinput->get('return', null, 'base64');
ComponentbuilderHelper::set($this->vastDevMod . '__return', $return);
SessionHelper::set($this->vastDevMod . '__return', $return);
// set a GUID value if found
if (isset($item) && ObjectHelper::check($item) && isset($item->guid)
&& GuidHelper::valid($item->guid))
{
ComponentbuilderHelper::set($this->vastDevMod . '__guid', $item->guid);
SessionHelper::set($this->vastDevMod . '__guid', $item->guid);
}
}
}

View File

@ -24,6 +24,7 @@ use Joomla\Registry\Registry;
use Joomla\String\StringHelper;
use Joomla\Utilities\ArrayHelper;
use Joomla\CMS\Helper\TagsHelper;
use VDM\Joomla\Utilities\SessionHelper;
use VDM\Joomla\Utilities\StringHelper as UtilitiesStringHelper;
use VDM\Joomla\Utilities\ObjectHelper;
use VDM\Joomla\Utilities\GuidHelper;
@ -122,7 +123,7 @@ class ComponentbuilderModelClass_method extends AdminModel
$id = $_id;
}
// set the id and view name to session
if ($vdm = ComponentbuilderHelper::get('class_method__'.$id))
if (($vdm = SessionHelper::get('class_method__'.$id)) !== null)
{
$this->vastDevMod = $vdm;
}
@ -130,17 +131,17 @@ class ComponentbuilderModelClass_method extends AdminModel
{
// set the vast development method key
$this->vastDevMod = UtilitiesStringHelper::random(50);
ComponentbuilderHelper::set($this->vastDevMod, 'class_method__'.$id);
ComponentbuilderHelper::set('class_method__'.$id, $this->vastDevMod);
SessionHelper::set($this->vastDevMod, 'class_method__'.$id);
SessionHelper::set('class_method__'.$id, $this->vastDevMod);
// set a return value if found
$jinput = Factory::getApplication()->input;
$return = $jinput->get('return', null, 'base64');
ComponentbuilderHelper::set($this->vastDevMod . '__return', $return);
SessionHelper::set($this->vastDevMod . '__return', $return);
// set a GUID value if found
if (isset($item) && ObjectHelper::check($item) && isset($item->guid)
&& GuidHelper::valid($item->guid))
{
ComponentbuilderHelper::set($this->vastDevMod . '__guid', $item->guid);
SessionHelper::set($this->vastDevMod . '__guid', $item->guid);
}
}
}
@ -205,7 +206,7 @@ class ComponentbuilderModelClass_method extends AdminModel
$id = $item->id;
}
// set the id and view name to session
if ($vdm = ComponentbuilderHelper::get('class_method__'.$id))
if (($vdm = SessionHelper::get('class_method__'.$id)) !== null)
{
$this->vastDevMod = $vdm;
}
@ -213,17 +214,17 @@ class ComponentbuilderModelClass_method extends AdminModel
{
// set the vast development method key
$this->vastDevMod = UtilitiesStringHelper::random(50);
ComponentbuilderHelper::set($this->vastDevMod, 'class_method__'.$id);
ComponentbuilderHelper::set('class_method__'.$id, $this->vastDevMod);
SessionHelper::set($this->vastDevMod, 'class_method__'.$id);
SessionHelper::set('class_method__'.$id, $this->vastDevMod);
// set a return value if found
$jinput = Factory::getApplication()->input;
$return = $jinput->get('return', null, 'base64');
ComponentbuilderHelper::set($this->vastDevMod . '__return', $return);
SessionHelper::set($this->vastDevMod . '__return', $return);
// set a GUID value if found
if (isset($item) && ObjectHelper::check($item) && isset($item->guid)
&& GuidHelper::valid($item->guid))
{
ComponentbuilderHelper::set($this->vastDevMod . '__guid', $item->guid);
SessionHelper::set($this->vastDevMod . '__guid', $item->guid);
}
}
}
@ -554,7 +555,7 @@ class ComponentbuilderModelClass_method extends AdminModel
// change to false
$form->setFieldAttribute($requiredField, 'required', 'false');
// also clear the data set
$data[$requiredField] = '';
unset($data[$requiredField]);
}
}
}

View File

@ -24,6 +24,7 @@ use Joomla\Registry\Registry;
use Joomla\String\StringHelper;
use Joomla\Utilities\ArrayHelper;
use Joomla\CMS\Helper\TagsHelper;
use VDM\Joomla\Utilities\SessionHelper;
use VDM\Joomla\Utilities\StringHelper as UtilitiesStringHelper;
use VDM\Joomla\Utilities\ObjectHelper;
use VDM\Joomla\Utilities\GuidHelper;
@ -119,7 +120,7 @@ class ComponentbuilderModelClass_property extends AdminModel
$id = $_id;
}
// set the id and view name to session
if ($vdm = ComponentbuilderHelper::get('class_property__'.$id))
if (($vdm = SessionHelper::get('class_property__'.$id)) !== null)
{
$this->vastDevMod = $vdm;
}
@ -127,17 +128,17 @@ class ComponentbuilderModelClass_property extends AdminModel
{
// set the vast development method key
$this->vastDevMod = UtilitiesStringHelper::random(50);
ComponentbuilderHelper::set($this->vastDevMod, 'class_property__'.$id);
ComponentbuilderHelper::set('class_property__'.$id, $this->vastDevMod);
SessionHelper::set($this->vastDevMod, 'class_property__'.$id);
SessionHelper::set('class_property__'.$id, $this->vastDevMod);
// set a return value if found
$jinput = Factory::getApplication()->input;
$return = $jinput->get('return', null, 'base64');
ComponentbuilderHelper::set($this->vastDevMod . '__return', $return);
SessionHelper::set($this->vastDevMod . '__return', $return);
// set a GUID value if found
if (isset($item) && ObjectHelper::check($item) && isset($item->guid)
&& GuidHelper::valid($item->guid))
{
ComponentbuilderHelper::set($this->vastDevMod . '__guid', $item->guid);
SessionHelper::set($this->vastDevMod . '__guid', $item->guid);
}
}
}
@ -196,7 +197,7 @@ class ComponentbuilderModelClass_property extends AdminModel
$id = $item->id;
}
// set the id and view name to session
if ($vdm = ComponentbuilderHelper::get('class_property__'.$id))
if (($vdm = SessionHelper::get('class_property__'.$id)) !== null)
{
$this->vastDevMod = $vdm;
}
@ -204,17 +205,17 @@ class ComponentbuilderModelClass_property extends AdminModel
{
// set the vast development method key
$this->vastDevMod = UtilitiesStringHelper::random(50);
ComponentbuilderHelper::set($this->vastDevMod, 'class_property__'.$id);
ComponentbuilderHelper::set('class_property__'.$id, $this->vastDevMod);
SessionHelper::set($this->vastDevMod, 'class_property__'.$id);
SessionHelper::set('class_property__'.$id, $this->vastDevMod);
// set a return value if found
$jinput = Factory::getApplication()->input;
$return = $jinput->get('return', null, 'base64');
ComponentbuilderHelper::set($this->vastDevMod . '__return', $return);
SessionHelper::set($this->vastDevMod . '__return', $return);
// set a GUID value if found
if (isset($item) && ObjectHelper::check($item) && isset($item->guid)
&& GuidHelper::valid($item->guid))
{
ComponentbuilderHelper::set($this->vastDevMod . '__guid', $item->guid);
SessionHelper::set($this->vastDevMod . '__guid', $item->guid);
}
}
}
@ -545,7 +546,7 @@ class ComponentbuilderModelClass_property extends AdminModel
// change to false
$form->setFieldAttribute($requiredField, 'required', 'false');
// also clear the data set
$data[$requiredField] = '';
unset($data[$requiredField]);
}
}
}

View File

@ -21,6 +21,10 @@ use Joomla\Utilities\ArrayHelper;
use VDM\Joomla\Componentbuilder\Compiler\Helper\Compiler;
use VDM\Joomla\Utilities\ArrayHelper as UtilitiesArrayHelper;
use VDM\Joomla\Utilities\JsonHelper;
use Joomla\CMS\Filesystem\Folder;
use Joomla\CMS\Filesystem\File;
use Joomla\CMS\Installer\InstallerHelper;
use Joomla\CMS\Installer\Installer;
/**
* Componentbuilder List Model for Compiler
@ -162,7 +166,7 @@ class ComponentbuilderModelCompiler extends ListModel
jimport('joomla.filesystem.folder');
jimport('joomla.filesystem.file');
if (JFolder::exists($dir))
if (is_dir($dir))
{
$it = new RecursiveDirectoryIterator($dir);
$it = new RecursiveIteratorIterator($it, RecursiveIteratorIterator::CHILD_FIRST);
@ -171,19 +175,19 @@ class ComponentbuilderModelCompiler extends ListModel
if ('.' === $file->getBasename() || '..' === $file->getBasename()) continue;
if ($file->isDir())
{
JFolder::delete($file->getPathname());
Folder::delete($file->getPathname());
}
else
{
if ($file->getBasename() !== 'index.html')
{
JFile::delete($file->getPathname());
File::delete($file->getPathname());
}
}
}
if ($removeDir)
{
if (JFolder::delete($dir))
if (Folder::delete($dir))
{
return true;
}
@ -228,7 +232,7 @@ class ComponentbuilderModelCompiler extends ListModel
$tmp_dest = $config->get('tmp_path');
// Unpack the downloaded package file.
$package = JInstallerHelper::unpack($tmp_dest . '/' . $p_file, true);
$package = InstallerHelper::unpack($tmp_dest . '/' . $p_file, true);
// insure the install type is folder (JCB zip file is in the folder)
$installType = 'folder';
@ -253,7 +257,7 @@ class ComponentbuilderModelCompiler extends ListModel
}
// Get an installer instance.
$installer = JInstaller::getInstance();
$installer = Installer::getInstance();
// Install the package.
if (!$installer->install($package['dir']))
@ -290,7 +294,7 @@ class ComponentbuilderModelCompiler extends ListModel
$package['packagefile'] = $config->get('tmp_path') . '/' . $package['packagefile'];
}
JInstallerHelper::cleanupInstall($package['packagefile'], $package['extractdir']);
InstallerHelper::cleanupInstall($package['packagefile'], $package['extractdir']);
// Clear the cached extension data and menu cache
$this->cleanCache('_system', 0);

View File

@ -24,6 +24,7 @@ use Joomla\Registry\Registry;
use Joomla\String\StringHelper;
use Joomla\Utilities\ArrayHelper;
use Joomla\CMS\Helper\TagsHelper;
use VDM\Joomla\Utilities\SessionHelper;
use VDM\Joomla\Utilities\StringHelper as UtilitiesStringHelper;
use VDM\Joomla\Utilities\ObjectHelper;
use VDM\Joomla\Utilities\GuidHelper;
@ -122,7 +123,7 @@ class ComponentbuilderModelComponent_dashboard extends AdminModel
$id = $_id;
}
// set the id and view name to session
if ($vdm = ComponentbuilderHelper::get('component_dashboard__'.$id))
if (($vdm = SessionHelper::get('component_dashboard__'.$id)) !== null)
{
$this->vastDevMod = $vdm;
}
@ -130,17 +131,17 @@ class ComponentbuilderModelComponent_dashboard extends AdminModel
{
// set the vast development method key
$this->vastDevMod = UtilitiesStringHelper::random(50);
ComponentbuilderHelper::set($this->vastDevMod, 'component_dashboard__'.$id);
ComponentbuilderHelper::set('component_dashboard__'.$id, $this->vastDevMod);
SessionHelper::set($this->vastDevMod, 'component_dashboard__'.$id);
SessionHelper::set('component_dashboard__'.$id, $this->vastDevMod);
// set a return value if found
$jinput = Factory::getApplication()->input;
$return = $jinput->get('return', null, 'base64');
ComponentbuilderHelper::set($this->vastDevMod . '__return', $return);
SessionHelper::set($this->vastDevMod . '__return', $return);
// set a GUID value if found
if (isset($item) && ObjectHelper::check($item) && isset($item->guid)
&& GuidHelper::valid($item->guid))
{
ComponentbuilderHelper::set($this->vastDevMod . '__guid', $item->guid);
SessionHelper::set($this->vastDevMod . '__guid', $item->guid);
}
}
}
@ -201,7 +202,7 @@ class ComponentbuilderModelComponent_dashboard extends AdminModel
$id = $item->id;
}
// set the id and view name to session
if ($vdm = ComponentbuilderHelper::get('component_dashboard__'.$id))
if (($vdm = SessionHelper::get('component_dashboard__'.$id)) !== null)
{
$this->vastDevMod = $vdm;
}
@ -209,17 +210,17 @@ class ComponentbuilderModelComponent_dashboard extends AdminModel
{
// set the vast development method key
$this->vastDevMod = UtilitiesStringHelper::random(50);
ComponentbuilderHelper::set($this->vastDevMod, 'component_dashboard__'.$id);
ComponentbuilderHelper::set('component_dashboard__'.$id, $this->vastDevMod);
SessionHelper::set($this->vastDevMod, 'component_dashboard__'.$id);
SessionHelper::set('component_dashboard__'.$id, $this->vastDevMod);
// set a return value if found
$jinput = Factory::getApplication()->input;
$return = $jinput->get('return', null, 'base64');
ComponentbuilderHelper::set($this->vastDevMod . '__return', $return);
SessionHelper::set($this->vastDevMod . '__return', $return);
// set a GUID value if found
if (isset($item) && ObjectHelper::check($item) && isset($item->guid)
&& GuidHelper::valid($item->guid))
{
ComponentbuilderHelper::set($this->vastDevMod . '__guid', $item->guid);
SessionHelper::set($this->vastDevMod . '__guid', $item->guid);
}
}
// update the fields

View File

@ -24,6 +24,7 @@ use Joomla\Registry\Registry;
use Joomla\String\StringHelper;
use Joomla\Utilities\ArrayHelper;
use Joomla\CMS\Helper\TagsHelper;
use VDM\Joomla\Utilities\SessionHelper;
use VDM\Joomla\Utilities\StringHelper as UtilitiesStringHelper;
use VDM\Joomla\Utilities\ObjectHelper;
use VDM\Joomla\Utilities\GuidHelper;
@ -123,7 +124,7 @@ class ComponentbuilderModelComponent_router extends AdminModel
$id = $_id;
}
// set the id and view name to session
if ($vdm = ComponentbuilderHelper::get('component_router__'.$id))
if (($vdm = SessionHelper::get('component_router__'.$id)) !== null)
{
$this->vastDevMod = $vdm;
}
@ -131,17 +132,17 @@ class ComponentbuilderModelComponent_router extends AdminModel
{
// set the vast development method key
$this->vastDevMod = UtilitiesStringHelper::random(50);
ComponentbuilderHelper::set($this->vastDevMod, 'component_router__'.$id);
ComponentbuilderHelper::set('component_router__'.$id, $this->vastDevMod);
SessionHelper::set($this->vastDevMod, 'component_router__'.$id);
SessionHelper::set('component_router__'.$id, $this->vastDevMod);
// set a return value if found
$jinput = Factory::getApplication()->input;
$return = $jinput->get('return', null, 'base64');
ComponentbuilderHelper::set($this->vastDevMod . '__return', $return);
SessionHelper::set($this->vastDevMod . '__return', $return);
// set a GUID value if found
if (isset($item) && ObjectHelper::check($item) && isset($item->guid)
&& GuidHelper::valid($item->guid))
{
ComponentbuilderHelper::set($this->vastDevMod . '__guid', $item->guid);
SessionHelper::set($this->vastDevMod . '__guid', $item->guid);
}
}
}
@ -214,7 +215,7 @@ class ComponentbuilderModelComponent_router extends AdminModel
$id = $item->id;
}
// set the id and view name to session
if ($vdm = ComponentbuilderHelper::get('component_router__'.$id))
if (($vdm = SessionHelper::get('component_router__'.$id)) !== null)
{
$this->vastDevMod = $vdm;
}
@ -222,17 +223,17 @@ class ComponentbuilderModelComponent_router extends AdminModel
{
// set the vast development method key
$this->vastDevMod = UtilitiesStringHelper::random(50);
ComponentbuilderHelper::set($this->vastDevMod, 'component_router__'.$id);
ComponentbuilderHelper::set('component_router__'.$id, $this->vastDevMod);
SessionHelper::set($this->vastDevMod, 'component_router__'.$id);
SessionHelper::set('component_router__'.$id, $this->vastDevMod);
// set a return value if found
$jinput = Factory::getApplication()->input;
$return = $jinput->get('return', null, 'base64');
ComponentbuilderHelper::set($this->vastDevMod . '__return', $return);
SessionHelper::set($this->vastDevMod . '__return', $return);
// set a GUID value if found
if (isset($item) && ObjectHelper::check($item) && isset($item->guid)
&& GuidHelper::valid($item->guid))
{
ComponentbuilderHelper::set($this->vastDevMod . '__guid', $item->guid);
SessionHelper::set($this->vastDevMod . '__guid', $item->guid);
}
}
}

View File

@ -455,97 +455,6 @@ class ComponentbuilderModelComponentbuilder extends ListModel
}
public function getNoticeboard()
{
// get the document to load the scripts
$document = Factory::getDocument();
Html::_('script', "media/com_componentbuilder/js/marked.js", ['version' => 'auto']);
$document->addScriptDeclaration('
var token = "' . Session::getFormToken() . '";
var noticeboard = "https://vdm.bz/componentbuilder-noticeboard-md";
document.addEventListener("DOMContentLoaded", function() {
fetch(noticeboard)
.then(response => {
if (!response.ok) {
throw new Error("Network response was not ok");
}
return response.text();
})
.then(board => {
if (board.length > 5) {
document.getElementById("noticeboard-md").innerHTML = marked.parse(board);
getIS(1, board)
.then(result => {
if (result) {
document.querySelectorAll("#cpanel_tabTabs a").forEach(link => {
if (link.href.includes("#vast_development_method") || link.href.includes("#notice_board")) {
var textVDM = link.textContent;
link.innerHTML = "<span class=\"label label-important vdm-new-notice\">1</span> " + textVDM;
link.id = "vdm-new-notice";
document.getElementById("vdm-new-notice").addEventListener("click", () => {
getIS(2, board)
.then(result => {
if (result) {
document.querySelectorAll(".vdm-new-notice").forEach(element => {
element.style.opacity = 0;
});
}
});
});
}
});
}
});
} else {
document.getElementById("noticeboard-md").innerHTML = "'.Text::_('COM_COMPONENTBUILDER_ALL_IS_GOOD_PLEASE_CHECK_AGAIN_LATER').'.";
}
})
.catch(error => {
console.error("There was an error!", error);
document.getElementById("noticeboard-md").innerHTML = "'.Text::_('COM_COMPONENTBUILDER_ALL_IS_GOOD_PLEASE_CHECK_AGAIN_LATER').'.";
});
});
// to check is READ/NEW
function getIS(type, notice) {
let getUrl = "";
if (type === 1) {
getUrl = "index.php?option=com_componentbuilder&task=ajax.isNew&format=json&raw=true";
} else if (type === 2) {
getUrl = "index.php?option=com_componentbuilder&task=ajax.isRead&format=json&raw=true";
}
let request = new URLSearchParams();
if (token.length > 0 && notice.length) {
request.append(token, "1");
request.append("notice", notice);
}
return fetch(getUrl, {
method: "POST",
headers: {
"Content-Type": "application/x-www-form-urlencoded;charset=UTF-8"
},
body: request
}).then(response => response.json());
}
document.addEventListener("DOMContentLoaded", function() {
document.querySelectorAll(".loading-dots").forEach(function(loading_dots) {
let x = 0;
let intervalId = setInterval(function() {
if (!loading_dots.classList.contains("loading-dots")) {
clearInterval(intervalId);
return;
}
let dots = ".".repeat(x % 8);
loading_dots.textContent = dots;
x++;
}, 500);
});
});');
return '<div id="noticeboard-md">'.Text::_('COM_COMPONENTBUILDER_THE_NOTICE_BOARD_IS_LOADING').'.<span class="loading-dots">.</span></small></div>';
}
public function getReadme()
{
$document = Factory::getDocument();

View File

@ -24,6 +24,7 @@ use Joomla\Registry\Registry;
use Joomla\String\StringHelper;
use Joomla\Utilities\ArrayHelper;
use Joomla\CMS\Helper\TagsHelper;
use VDM\Joomla\Utilities\SessionHelper;
use VDM\Joomla\Utilities\StringHelper as UtilitiesStringHelper;
use VDM\Joomla\Utilities\ObjectHelper;
use VDM\Joomla\Utilities\GuidHelper;
@ -180,7 +181,7 @@ class ComponentbuilderModelCustom_admin_view extends AdminModel
$id = $_id;
}
// set the id and view name to session
if ($vdm = ComponentbuilderHelper::get('custom_admin_view__'.$id))
if (($vdm = SessionHelper::get('custom_admin_view__'.$id)) !== null)
{
$this->vastDevMod = $vdm;
}
@ -188,17 +189,17 @@ class ComponentbuilderModelCustom_admin_view extends AdminModel
{
// set the vast development method key
$this->vastDevMod = UtilitiesStringHelper::random(50);
ComponentbuilderHelper::set($this->vastDevMod, 'custom_admin_view__'.$id);
ComponentbuilderHelper::set('custom_admin_view__'.$id, $this->vastDevMod);
SessionHelper::set($this->vastDevMod, 'custom_admin_view__'.$id);
SessionHelper::set('custom_admin_view__'.$id, $this->vastDevMod);
// set a return value if found
$jinput = Factory::getApplication()->input;
$return = $jinput->get('return', null, 'base64');
ComponentbuilderHelper::set($this->vastDevMod . '__return', $return);
SessionHelper::set($this->vastDevMod . '__return', $return);
// set a GUID value if found
if (isset($item) && ObjectHelper::check($item) && isset($item->guid)
&& GuidHelper::valid($item->guid))
{
ComponentbuilderHelper::set($this->vastDevMod . '__guid', $item->guid);
SessionHelper::set($this->vastDevMod . '__guid', $item->guid);
}
}
}
@ -349,7 +350,7 @@ class ComponentbuilderModelCustom_admin_view extends AdminModel
$id = $item->id;
}
// set the id and view name to session
if ($vdm = ComponentbuilderHelper::get('custom_admin_view__'.$id))
if (($vdm = SessionHelper::get('custom_admin_view__'.$id)) !== null)
{
$this->vastDevMod = $vdm;
}
@ -357,17 +358,17 @@ class ComponentbuilderModelCustom_admin_view extends AdminModel
{
// set the vast development method key
$this->vastDevMod = UtilitiesStringHelper::random(50);
ComponentbuilderHelper::set($this->vastDevMod, 'custom_admin_view__'.$id);
ComponentbuilderHelper::set('custom_admin_view__'.$id, $this->vastDevMod);
SessionHelper::set($this->vastDevMod, 'custom_admin_view__'.$id);
SessionHelper::set('custom_admin_view__'.$id, $this->vastDevMod);
// set a return value if found
$jinput = Factory::getApplication()->input;
$return = $jinput->get('return', null, 'base64');
ComponentbuilderHelper::set($this->vastDevMod . '__return', $return);
SessionHelper::set($this->vastDevMod . '__return', $return);
// set a GUID value if found
if (isset($item) && ObjectHelper::check($item) && isset($item->guid)
&& GuidHelper::valid($item->guid))
{
ComponentbuilderHelper::set($this->vastDevMod . '__guid', $item->guid);
SessionHelper::set($this->vastDevMod . '__guid', $item->guid);
}
}
@ -503,6 +504,9 @@ class ComponentbuilderModelCustom_admin_view extends AdminModel
}
}
// update the ajax_input (sub form) layout
$form->setFieldAttribute('ajax_input', 'layout', ComponentbuilderHelper::getSubformLayout('custom_admin_view', 'ajax_input'));
// update all editors to use this components global editor
$global_editor = ComponentHelper::getParams('com_componentbuilder')->get('editor', 'none');
// now get all the editor fields

View File

@ -24,6 +24,7 @@ use Joomla\Registry\Registry;
use Joomla\String\StringHelper;
use Joomla\Utilities\ArrayHelper;
use Joomla\CMS\Helper\TagsHelper;
use VDM\Joomla\Utilities\SessionHelper;
use VDM\Joomla\Utilities\StringHelper as UtilitiesStringHelper;
use VDM\Joomla\Utilities\ObjectHelper;
use VDM\Joomla\Utilities\GuidHelper;
@ -134,7 +135,7 @@ class ComponentbuilderModelCustom_code extends AdminModel
$id = $_id;
}
// set the id and view name to session
if ($vdm = ComponentbuilderHelper::get('custom_code__'.$id))
if (($vdm = SessionHelper::get('custom_code__'.$id)) !== null)
{
$this->vastDevMod = $vdm;
}
@ -142,17 +143,17 @@ class ComponentbuilderModelCustom_code extends AdminModel
{
// set the vast development method key
$this->vastDevMod = UtilitiesStringHelper::random(50);
ComponentbuilderHelper::set($this->vastDevMod, 'custom_code__'.$id);
ComponentbuilderHelper::set('custom_code__'.$id, $this->vastDevMod);
SessionHelper::set($this->vastDevMod, 'custom_code__'.$id);
SessionHelper::set('custom_code__'.$id, $this->vastDevMod);
// set a return value if found
$jinput = Factory::getApplication()->input;
$return = $jinput->get('return', null, 'base64');
ComponentbuilderHelper::set($this->vastDevMod . '__return', $return);
SessionHelper::set($this->vastDevMod . '__return', $return);
// set a GUID value if found
if (isset($item) && ObjectHelper::check($item) && isset($item->guid)
&& GuidHelper::valid($item->guid))
{
ComponentbuilderHelper::set($this->vastDevMod . '__guid', $item->guid);
SessionHelper::set($this->vastDevMod . '__guid', $item->guid);
}
}
}
@ -205,7 +206,7 @@ class ComponentbuilderModelCustom_code extends AdminModel
$id = $item->id;
}
// set the id and view name to session
if ($vdm = ComponentbuilderHelper::get('custom_code__'.$id))
if (($vdm = SessionHelper::get('custom_code__'.$id)) !== null)
{
$this->vastDevMod = $vdm;
}
@ -213,17 +214,17 @@ class ComponentbuilderModelCustom_code extends AdminModel
{
// set the vast development method key
$this->vastDevMod = UtilitiesStringHelper::random(50);
ComponentbuilderHelper::set($this->vastDevMod, 'custom_code__'.$id);
ComponentbuilderHelper::set('custom_code__'.$id, $this->vastDevMod);
SessionHelper::set($this->vastDevMod, 'custom_code__'.$id);
SessionHelper::set('custom_code__'.$id, $this->vastDevMod);
// set a return value if found
$jinput = Factory::getApplication()->input;
$return = $jinput->get('return', null, 'base64');
ComponentbuilderHelper::set($this->vastDevMod . '__return', $return);
SessionHelper::set($this->vastDevMod . '__return', $return);
// set a GUID value if found
if (isset($item) && ObjectHelper::check($item) && isset($item->guid)
&& GuidHelper::valid($item->guid))
{
ComponentbuilderHelper::set($this->vastDevMod . '__guid', $item->guid);
SessionHelper::set($this->vastDevMod . '__guid', $item->guid);
}
}
}
@ -547,7 +548,7 @@ class ComponentbuilderModelCustom_code extends AdminModel
// change to false
$form->setFieldAttribute($requiredField, 'required', 'false');
// also clear the data set
$data[$requiredField] = '';
unset($data[$requiredField]);
}
}
}

View File

@ -24,6 +24,7 @@ use Joomla\Registry\Registry;
use Joomla\String\StringHelper;
use Joomla\Utilities\ArrayHelper;
use Joomla\CMS\Helper\TagsHelper;
use VDM\Joomla\Utilities\SessionHelper;
use VDM\Joomla\Utilities\StringHelper as UtilitiesStringHelper;
use VDM\Joomla\Utilities\ObjectHelper;
use VDM\Joomla\Utilities\GuidHelper;
@ -174,7 +175,7 @@ class ComponentbuilderModelDynamic_get extends AdminModel
$id = $_id;
}
// set the id and view name to session
if ($vdm = ComponentbuilderHelper::get('dynamic_get__'.$id))
if (($vdm = SessionHelper::get('dynamic_get__'.$id)) !== null)
{
$this->vastDevMod = $vdm;
}
@ -182,17 +183,17 @@ class ComponentbuilderModelDynamic_get extends AdminModel
{
// set the vast development method key
$this->vastDevMod = UtilitiesStringHelper::random(50);
ComponentbuilderHelper::set($this->vastDevMod, 'dynamic_get__'.$id);
ComponentbuilderHelper::set('dynamic_get__'.$id, $this->vastDevMod);
SessionHelper::set($this->vastDevMod, 'dynamic_get__'.$id);
SessionHelper::set('dynamic_get__'.$id, $this->vastDevMod);
// set a return value if found
$jinput = Factory::getApplication()->input;
$return = $jinput->get('return', null, 'base64');
ComponentbuilderHelper::set($this->vastDevMod . '__return', $return);
SessionHelper::set($this->vastDevMod . '__return', $return);
// set a GUID value if found
if (isset($item) && ObjectHelper::check($item) && isset($item->guid)
&& GuidHelper::valid($item->guid))
{
ComponentbuilderHelper::set($this->vastDevMod . '__guid', $item->guid);
SessionHelper::set($this->vastDevMod . '__guid', $item->guid);
}
}
}
@ -349,7 +350,7 @@ class ComponentbuilderModelDynamic_get extends AdminModel
$id = $item->id;
}
// set the id and view name to session
if ($vdm = ComponentbuilderHelper::get('dynamic_get__'.$id))
if (($vdm = SessionHelper::get('dynamic_get__'.$id)) !== null)
{
$this->vastDevMod = $vdm;
}
@ -357,17 +358,17 @@ class ComponentbuilderModelDynamic_get extends AdminModel
{
// set the vast development method key
$this->vastDevMod = UtilitiesStringHelper::random(50);
ComponentbuilderHelper::set($this->vastDevMod, 'dynamic_get__'.$id);
ComponentbuilderHelper::set('dynamic_get__'.$id, $this->vastDevMod);
SessionHelper::set($this->vastDevMod, 'dynamic_get__'.$id);
SessionHelper::set('dynamic_get__'.$id, $this->vastDevMod);
// set a return value if found
$jinput = Factory::getApplication()->input;
$return = $jinput->get('return', null, 'base64');
ComponentbuilderHelper::set($this->vastDevMod . '__return', $return);
SessionHelper::set($this->vastDevMod . '__return', $return);
// set a GUID value if found
if (isset($item) && ObjectHelper::check($item) && isset($item->guid)
&& GuidHelper::valid($item->guid))
{
ComponentbuilderHelper::set($this->vastDevMod . '__guid', $item->guid);
SessionHelper::set($this->vastDevMod . '__guid', $item->guid);
}
}
@ -738,7 +739,7 @@ class ComponentbuilderModelDynamic_get extends AdminModel
// change to false
$form->setFieldAttribute($requiredField, 'required', 'false');
// also clear the data set
$data[$requiredField] = '';
unset($data[$requiredField]);
}
}
}

View File

@ -24,6 +24,7 @@ use Joomla\Registry\Registry;
use Joomla\String\StringHelper;
use Joomla\Utilities\ArrayHelper;
use Joomla\CMS\Helper\TagsHelper;
use VDM\Joomla\Utilities\SessionHelper;
use VDM\Joomla\Utilities\StringHelper as UtilitiesStringHelper;
use VDM\Joomla\Utilities\ObjectHelper;
use VDM\Joomla\Utilities\GuidHelper;
@ -167,7 +168,7 @@ class ComponentbuilderModelField extends AdminModel
$id = $_id;
}
// set the id and view name to session
if ($vdm = ComponentbuilderHelper::get('field__'.$id))
if (($vdm = SessionHelper::get('field__'.$id)) !== null)
{
$this->vastDevMod = $vdm;
}
@ -175,17 +176,17 @@ class ComponentbuilderModelField extends AdminModel
{
// set the vast development method key
$this->vastDevMod = UtilitiesStringHelper::random(50);
ComponentbuilderHelper::set($this->vastDevMod, 'field__'.$id);
ComponentbuilderHelper::set('field__'.$id, $this->vastDevMod);
SessionHelper::set($this->vastDevMod, 'field__'.$id);
SessionHelper::set('field__'.$id, $this->vastDevMod);
// set a return value if found
$jinput = Factory::getApplication()->input;
$return = $jinput->get('return', null, 'base64');
ComponentbuilderHelper::set($this->vastDevMod . '__return', $return);
SessionHelper::set($this->vastDevMod . '__return', $return);
// set a GUID value if found
if (isset($item) && ObjectHelper::check($item) && isset($item->guid)
&& GuidHelper::valid($item->guid))
{
ComponentbuilderHelper::set($this->vastDevMod . '__guid', $item->guid);
SessionHelper::set($this->vastDevMod . '__guid', $item->guid);
}
}
}
@ -286,7 +287,7 @@ class ComponentbuilderModelField extends AdminModel
$id = $item->id;
}
// set the id and view name to session
if ($vdm = ComponentbuilderHelper::get('field__'.$id))
if (($vdm = SessionHelper::get('field__'.$id)) !== null)
{
$this->vastDevMod = $vdm;
}
@ -294,17 +295,17 @@ class ComponentbuilderModelField extends AdminModel
{
// set the vast development method key
$this->vastDevMod = UtilitiesStringHelper::random(50);
ComponentbuilderHelper::set($this->vastDevMod, 'field__'.$id);
ComponentbuilderHelper::set('field__'.$id, $this->vastDevMod);
SessionHelper::set($this->vastDevMod, 'field__'.$id);
SessionHelper::set('field__'.$id, $this->vastDevMod);
// set a return value if found
$jinput = Factory::getApplication()->input;
$return = $jinput->get('return', null, 'base64');
ComponentbuilderHelper::set($this->vastDevMod . '__return', $return);
SessionHelper::set($this->vastDevMod . '__return', $return);
// set a GUID value if found
if (isset($item) && ObjectHelper::check($item) && isset($item->guid)
&& GuidHelper::valid($item->guid))
{
ComponentbuilderHelper::set($this->vastDevMod . '__guid', $item->guid);
SessionHelper::set($this->vastDevMod . '__guid', $item->guid);
}
}
}
@ -633,7 +634,7 @@ class ComponentbuilderModelField extends AdminModel
// change to false
$form->setFieldAttribute($requiredField, 'required', 'false');
// also clear the data set
$data[$requiredField] = '';
unset($data[$requiredField]);
}
}
}

View File

@ -15,6 +15,7 @@ defined('_JEXEC') or die('Restricted access');
use Joomla\CMS\Factory;
use Joomla\CMS\Language\Text;
use Joomla\CMS\HTML\HTMLHelper as Html;
use Joomla\CMS\Uri\Uri;
// import the list field type
jimport('joomla.form.helper');
@ -68,7 +69,7 @@ class JFormFieldClassextends extends JFormFieldList
$ref = '&amp;ref=' . $values['view'] . '&amp;refid=' . $values['id'];
$refJ = '&ref=' . $values['view'] . '&refid=' . $values['id'];
// get the return value.
$_uri = (string) \Joomla\CMS\Uri\Uri::getInstance();
$_uri = (string) Uri::getInstance();
$_return = urlencode(base64_encode($_uri));
// load return value.
$ref .= '&amp;return=' . $_return;

View File

@ -15,6 +15,7 @@ defined('_JEXEC') or die('Restricted access');
use Joomla\CMS\Factory;
use Joomla\CMS\Language\Text;
use Joomla\CMS\HTML\HTMLHelper as Html;
use Joomla\CMS\Uri\Uri;
// import the list field type
jimport('joomla.form.helper');
@ -68,7 +69,7 @@ class JFormFieldClasspowers extends JFormFieldList
$ref = '&amp;ref=' . $values['view'] . '&amp;refid=' . $values['id'];
$refJ = '&ref=' . $values['view'] . '&refid=' . $values['id'];
// get the return value.
$_uri = (string) \Joomla\CMS\Uri\Uri::getInstance();
$_uri = (string) Uri::getInstance();
$_return = urlencode(base64_encode($_uri));
// load return value.
$ref .= '&amp;return=' . $_return;

View File

@ -15,6 +15,7 @@ defined('_JEXEC') or die('Restricted access');
use Joomla\CMS\Factory;
use Joomla\CMS\Language\Text;
use Joomla\CMS\HTML\HTMLHelper as Html;
use Joomla\CMS\Uri\Uri;
// import the list field type
jimport('joomla.form.helper');
@ -68,7 +69,7 @@ class JFormFieldCron_servers extends JFormFieldList
$ref = '&amp;ref=' . $values['view'] . '&amp;refid=' . $values['id'];
$refJ = '&ref=' . $values['view'] . '&refid=' . $values['id'];
// get the return value.
$_uri = (string) \Joomla\CMS\Uri\Uri::getInstance();
$_uri = (string) Uri::getInstance();
$_return = urlencode(base64_encode($_uri));
// load return value.
$ref .= '&amp;return=' . $_return;

View File

@ -15,6 +15,7 @@ defined('_JEXEC') or die('Restricted access');
use Joomla\CMS\Factory;
use Joomla\CMS\Language\Text;
use Joomla\CMS\HTML\HTMLHelper as Html;
use Joomla\CMS\Filesystem\Folder;
// import the list field type
jimport('joomla.form.helper');
@ -44,12 +45,12 @@ class JFormFieldCustomfilelist extends JFormFieldList
// set the default
$options[] = Html::_('select.option', '', Text::sprintf('COM_COMPONENTBUILDER_PLEASE_ADD_FILES_TO_S',$localfolder));
// setup the folder if it does not exist
if (!\JFolder::exists($localfolder))
if (!is_dir($localfolder))
{
\JFolder::create($localfolder);
Folder::create($localfolder);
}
// now check if there are files in the folder
if ($files = \JFolder::files($localfolder))
if ($files = Folder::files($localfolder))
{
$options = array();
foreach ($files as $file)

View File

@ -15,6 +15,7 @@ defined('_JEXEC') or die('Restricted access');
use Joomla\CMS\Factory;
use Joomla\CMS\Language\Text;
use Joomla\CMS\HTML\HTMLHelper as Html;
use Joomla\CMS\Uri\Uri;
// import the list field type
jimport('joomla.form.helper');
@ -68,7 +69,7 @@ class JFormFieldDynamicget extends JFormFieldList
$ref = '&amp;ref=' . $values['view'] . '&amp;refid=' . $values['id'];
$refJ = '&ref=' . $values['view'] . '&refid=' . $values['id'];
// get the return value.
$_uri = (string) \Joomla\CMS\Uri\Uri::getInstance();
$_uri = (string) Uri::getInstance();
$_return = urlencode(base64_encode($_uri));
// load return value.
$ref .= '&amp;return=' . $_return;

View File

@ -15,6 +15,7 @@ defined('_JEXEC') or die('Restricted access');
use Joomla\CMS\Factory;
use Joomla\CMS\Language\Text;
use Joomla\CMS\HTML\HTMLHelper as Html;
use Joomla\CMS\Uri\Uri;
// import the list field type
jimport('joomla.form.helper');
@ -68,7 +69,7 @@ class JFormFieldExcludedlanguages extends JFormFieldList
$ref = '&amp;ref=' . $values['view'] . '&amp;refid=' . $values['id'];
$refJ = '&ref=' . $values['view'] . '&refid=' . $values['id'];
// get the return value.
$_uri = (string) \Joomla\CMS\Uri\Uri::getInstance();
$_uri = (string) Uri::getInstance();
$_return = urlencode(base64_encode($_uri));
// load return value.
$ref .= '&amp;return=' . $_return;

View File

@ -15,6 +15,7 @@ defined('_JEXEC') or die('Restricted access');
use Joomla\CMS\Factory;
use Joomla\CMS\Language\Text;
use Joomla\CMS\HTML\HTMLHelper as Html;
use Joomla\CMS\Uri\Uri;
// import the list field type
jimport('joomla.form.helper');
@ -68,7 +69,7 @@ class JFormFieldFieldtypes extends JFormFieldList
$ref = '&amp;ref=' . $values['view'] . '&amp;refid=' . $values['id'];
$refJ = '&ref=' . $values['view'] . '&refid=' . $values['id'];
// get the return value.
$_uri = (string) \Joomla\CMS\Uri\Uri::getInstance();
$_uri = (string) Uri::getInstance();
$_return = urlencode(base64_encode($_uri));
// load return value.
$ref .= '&amp;return=' . $_return;

View File

@ -15,6 +15,7 @@ defined('_JEXEC') or die('Restricted access');
use Joomla\CMS\Factory;
use Joomla\CMS\Language\Text;
use Joomla\CMS\HTML\HTMLHelper as Html;
use Joomla\CMS\Uri\Uri;
// import the list field type
jimport('joomla.form.helper');
@ -68,7 +69,7 @@ class JFormFieldInterfacepowers extends JFormFieldList
$ref = '&amp;ref=' . $values['view'] . '&amp;refid=' . $values['id'];
$refJ = '&ref=' . $values['view'] . '&refid=' . $values['id'];
// get the return value.
$_uri = (string) \Joomla\CMS\Uri\Uri::getInstance();
$_uri = (string) Uri::getInstance();
$_return = urlencode(base64_encode($_uri));
// load return value.
$ref .= '&amp;return=' . $_return;

View File

@ -15,6 +15,7 @@ defined('_JEXEC') or die('Restricted access');
use Joomla\CMS\Factory;
use Joomla\CMS\Language\Text;
use Joomla\CMS\HTML\HTMLHelper as Html;
use Joomla\CMS\Uri\Uri;
// import the list field type
jimport('joomla.form.helper');
@ -68,7 +69,7 @@ class JFormFieldJoomlacomponent extends JFormFieldList
$ref = '&amp;ref=' . $values['view'] . '&amp;refid=' . $values['id'];
$refJ = '&ref=' . $values['view'] . '&refid=' . $values['id'];
// get the return value.
$_uri = (string) \Joomla\CMS\Uri\Uri::getInstance();
$_uri = (string) Uri::getInstance();
$_return = urlencode(base64_encode($_uri));
// load return value.
$ref .= '&amp;return=' . $_return;

View File

@ -15,6 +15,7 @@ defined('_JEXEC') or die('Restricted access');
use Joomla\CMS\Factory;
use Joomla\CMS\Language\Text;
use Joomla\CMS\HTML\HTMLHelper as Html;
use Joomla\CMS\Uri\Uri;
// import the list field type
jimport('joomla.form.helper');
@ -68,7 +69,7 @@ class JFormFieldJoomlaplugingroups extends JFormFieldList
$ref = '&amp;ref=' . $values['view'] . '&amp;refid=' . $values['id'];
$refJ = '&ref=' . $values['view'] . '&refid=' . $values['id'];
// get the return value.
$_uri = (string) \Joomla\CMS\Uri\Uri::getInstance();
$_uri = (string) Uri::getInstance();
$_return = urlencode(base64_encode($_uri));
// load return value.
$ref .= '&amp;return=' . $_return;

View File

@ -15,6 +15,7 @@ defined('_JEXEC') or die('Restricted access');
use Joomla\CMS\Factory;
use Joomla\CMS\Language\Text;
use Joomla\CMS\HTML\HTMLHelper as Html;
use Joomla\CMS\Uri\Uri;
// import the list field type
jimport('joomla.form.helper');
@ -68,7 +69,7 @@ class JFormFieldJoomlaplugins extends JFormFieldList
$ref = '&amp;ref=' . $values['view'] . '&amp;refid=' . $values['id'];
$refJ = '&ref=' . $values['view'] . '&refid=' . $values['id'];
// get the return value.
$_uri = (string) \Joomla\CMS\Uri\Uri::getInstance();
$_uri = (string) Uri::getInstance();
$_return = urlencode(base64_encode($_uri));
// load return value.
$ref .= '&amp;return=' . $_return;

View File

@ -15,6 +15,7 @@ defined('_JEXEC') or die('Restricted access');
use Joomla\CMS\Factory;
use Joomla\CMS\Language\Text;
use Joomla\CMS\HTML\HTMLHelper as Html;
use Joomla\CMS\Uri\Uri;
// import the list field type
jimport('joomla.form.helper');
@ -68,7 +69,7 @@ class JFormFieldLibraries extends JFormFieldList
$ref = '&amp;ref=' . $values['view'] . '&amp;refid=' . $values['id'];
$refJ = '&ref=' . $values['view'] . '&refid=' . $values['id'];
// get the return value.
$_uri = (string) \Joomla\CMS\Uri\Uri::getInstance();
$_uri = (string) Uri::getInstance();
$_return = urlencode(base64_encode($_uri));
// load return value.
$ref .= '&amp;return=' . $_return;

View File

@ -15,6 +15,7 @@ defined('_JEXEC') or die('Restricted access');
use Joomla\CMS\Factory;
use Joomla\CMS\Language\Text;
use Joomla\CMS\HTML\HTMLHelper as Html;
use Joomla\CMS\Uri\Uri;
// import the list field type
jimport('joomla.form.helper');
@ -68,7 +69,7 @@ class JFormFieldLibrariesx extends JFormFieldList
$ref = '&amp;ref=' . $values['view'] . '&amp;refid=' . $values['id'];
$refJ = '&ref=' . $values['view'] . '&refid=' . $values['id'];
// get the return value.
$_uri = (string) \Joomla\CMS\Uri\Uri::getInstance();
$_uri = (string) Uri::getInstance();
$_return = urlencode(base64_encode($_uri));
// load return value.
$ref .= '&amp;return=' . $_return;

View File

@ -15,6 +15,7 @@ defined('_JEXEC') or die('Restricted access');
use Joomla\CMS\Factory;
use Joomla\CMS\Language\Text;
use Joomla\CMS\HTML\HTMLHelper as Html;
use Joomla\CMS\Uri\Uri;
// import the list field type
jimport('joomla.form.helper');
@ -68,7 +69,7 @@ class JFormFieldLibrary extends JFormFieldList
$ref = '&amp;ref=' . $values['view'] . '&amp;refid=' . $values['id'];
$refJ = '&ref=' . $values['view'] . '&refid=' . $values['id'];
// get the return value.
$_uri = (string) \Joomla\CMS\Uri\Uri::getInstance();
$_uri = (string) Uri::getInstance();
$_return = urlencode(base64_encode($_uri));
// load return value.
$ref .= '&amp;return=' . $_return;

View File

@ -15,6 +15,7 @@ defined('_JEXEC') or die('Restricted access');
use Joomla\CMS\Factory;
use Joomla\CMS\Language\Text;
use Joomla\CMS\HTML\HTMLHelper as Html;
use Joomla\CMS\Uri\Uri;
// import the list field type
jimport('joomla.form.helper');
@ -68,7 +69,7 @@ class JFormFieldMaingets extends JFormFieldList
$ref = '&amp;ref=' . $values['view'] . '&amp;refid=' . $values['id'];
$refJ = '&ref=' . $values['view'] . '&refid=' . $values['id'];
// get the return value.
$_uri = (string) \Joomla\CMS\Uri\Uri::getInstance();
$_uri = (string) Uri::getInstance();
$_return = urlencode(base64_encode($_uri));
// load return value.
$ref .= '&amp;return=' . $_return;

View File

@ -15,6 +15,7 @@ defined('_JEXEC') or die('Restricted access');
use Joomla\CMS\Factory;
use Joomla\CMS\Language\Text;
use Joomla\CMS\HTML\HTMLHelper as Html;
use Joomla\CMS\Uri\Uri;
// import the list field type
jimport('joomla.form.helper');
@ -68,7 +69,7 @@ class JFormFieldServers extends JFormFieldList
$ref = '&amp;ref=' . $values['view'] . '&amp;refid=' . $values['id'];
$refJ = '&ref=' . $values['view'] . '&refid=' . $values['id'];
// get the return value.
$_uri = (string) \Joomla\CMS\Uri\Uri::getInstance();
$_uri = (string) Uri::getInstance();
$_return = urlencode(base64_encode($_uri));
// load return value.
$ref .= '&amp;return=' . $_return;

View File

@ -16,6 +16,7 @@ use Joomla\CMS\Factory;
use Joomla\CMS\Language\Text;
use Joomla\CMS\HTML\HTMLHelper as Html;
use VDM\Joomla\Utilities\StringHelper;
use Joomla\CMS\Uri\Uri;
// import the list field type
jimport('joomla.form.helper');
@ -69,7 +70,7 @@ class JFormFieldSnippets extends JFormFieldList
$ref = '&amp;ref=' . $values['view'] . '&amp;refid=' . $values['id'];
$refJ = '&ref=' . $values['view'] . '&refid=' . $values['id'];
// get the return value.
$_uri = (string) \Joomla\CMS\Uri\Uri::getInstance();
$_uri = (string) Uri::getInstance();
$_return = urlencode(base64_encode($_uri));
// load return value.
$ref .= '&amp;return=' . $_return;

View File

@ -24,6 +24,7 @@ use Joomla\Registry\Registry;
use Joomla\String\StringHelper;
use Joomla\Utilities\ArrayHelper;
use Joomla\CMS\Helper\TagsHelper;
use VDM\Joomla\Utilities\SessionHelper;
use VDM\Joomla\Utilities\StringHelper as UtilitiesStringHelper;
use VDM\Joomla\Utilities\ObjectHelper;
use VDM\Joomla\Utilities\GuidHelper;
@ -141,7 +142,7 @@ class ComponentbuilderModelFieldtype extends AdminModel
$id = $_id;
}
// set the id and view name to session
if ($vdm = ComponentbuilderHelper::get('fieldtype__'.$id))
if (($vdm = SessionHelper::get('fieldtype__'.$id)) !== null)
{
$this->vastDevMod = $vdm;
}
@ -149,17 +150,17 @@ class ComponentbuilderModelFieldtype extends AdminModel
{
// set the vast development method key
$this->vastDevMod = UtilitiesStringHelper::random(50);
ComponentbuilderHelper::set($this->vastDevMod, 'fieldtype__'.$id);
ComponentbuilderHelper::set('fieldtype__'.$id, $this->vastDevMod);
SessionHelper::set($this->vastDevMod, 'fieldtype__'.$id);
SessionHelper::set('fieldtype__'.$id, $this->vastDevMod);
// set a return value if found
$jinput = Factory::getApplication()->input;
$return = $jinput->get('return', null, 'base64');
ComponentbuilderHelper::set($this->vastDevMod . '__return', $return);
SessionHelper::set($this->vastDevMod . '__return', $return);
// set a GUID value if found
if (isset($item) && ObjectHelper::check($item) && isset($item->guid)
&& GuidHelper::valid($item->guid))
{
ComponentbuilderHelper::set($this->vastDevMod . '__guid', $item->guid);
SessionHelper::set($this->vastDevMod . '__guid', $item->guid);
}
}
}
@ -214,7 +215,7 @@ class ComponentbuilderModelFieldtype extends AdminModel
$id = $item->id;
}
// set the id and view name to session
if ($vdm = ComponentbuilderHelper::get('fieldtype__'.$id))
if (($vdm = SessionHelper::get('fieldtype__'.$id)) !== null)
{
$this->vastDevMod = $vdm;
}
@ -222,17 +223,17 @@ class ComponentbuilderModelFieldtype extends AdminModel
{
// set the vast development method key
$this->vastDevMod = UtilitiesStringHelper::random(50);
ComponentbuilderHelper::set($this->vastDevMod, 'fieldtype__'.$id);
ComponentbuilderHelper::set('fieldtype__'.$id, $this->vastDevMod);
SessionHelper::set($this->vastDevMod, 'fieldtype__'.$id);
SessionHelper::set('fieldtype__'.$id, $this->vastDevMod);
// set a return value if found
$jinput = Factory::getApplication()->input;
$return = $jinput->get('return', null, 'base64');
ComponentbuilderHelper::set($this->vastDevMod . '__return', $return);
SessionHelper::set($this->vastDevMod . '__return', $return);
// set a GUID value if found
if (isset($item) && ObjectHelper::check($item) && isset($item->guid)
&& GuidHelper::valid($item->guid))
{
ComponentbuilderHelper::set($this->vastDevMod . '__guid', $item->guid);
SessionHelper::set($this->vastDevMod . '__guid', $item->guid);
}
}
// check what type of properties array we have here (should be subform... but just incase)
@ -813,7 +814,7 @@ class ComponentbuilderModelFieldtype extends AdminModel
// change to false
$form->setFieldAttribute($requiredField, 'required', 'false');
// also clear the data set
$data[$requiredField] = '';
unset($data[$requiredField]);
}
}
}

View File

@ -2470,6 +2470,7 @@
name="table"
label="COM_COMPONENTBUILDER_ADMIN_VIEW_TABLE_LABEL"
class="list_class"
layout="joomla.form.field.list-fancy-select"
multiple="false"
default="0"
button="false"

View File

@ -101,7 +101,6 @@
label="COM_COMPONENTBUILDER_COMPONENT_ADMIN_VIEWS_JOOMLA_COMPONENT_LABEL"
description="COM_COMPONENTBUILDER_COMPONENT_ADMIN_VIEWS_JOOMLA_COMPONENT_DESCRIPTION"
class="list_class"
layout="joomla.form.field.list-fancy-select"
multiple="false"
required="true"
readonly="true"

View File

@ -101,7 +101,6 @@
label="COM_COMPONENTBUILDER_COMPONENT_CONFIG_JOOMLA_COMPONENT_LABEL"
description="COM_COMPONENTBUILDER_COMPONENT_CONFIG_JOOMLA_COMPONENT_DESCRIPTION"
class="list_class"
layout="joomla.form.field.list-fancy-select"
multiple="false"
required="true"
readonly="true"

View File

@ -101,7 +101,6 @@
label="COM_COMPONENTBUILDER_COMPONENT_CUSTOM_ADMIN_MENUS_JOOMLA_COMPONENT_LABEL"
description="COM_COMPONENTBUILDER_COMPONENT_CUSTOM_ADMIN_MENUS_JOOMLA_COMPONENT_DESCRIPTION"
class="list_class"
layout="joomla.form.field.list-fancy-select"
multiple="false"
required="true"
readonly="true"

View File

@ -101,7 +101,6 @@
label="COM_COMPONENTBUILDER_COMPONENT_CUSTOM_ADMIN_VIEWS_JOOMLA_COMPONENT_LABEL"
description="COM_COMPONENTBUILDER_COMPONENT_CUSTOM_ADMIN_VIEWS_JOOMLA_COMPONENT_DESCRIPTION"
class="list_class"
layout="joomla.form.field.list-fancy-select"
multiple="false"
required="true"
readonly="true"

View File

@ -101,7 +101,6 @@
label="COM_COMPONENTBUILDER_COMPONENT_DASHBOARD_JOOMLA_COMPONENT_LABEL"
description="COM_COMPONENTBUILDER_COMPONENT_DASHBOARD_JOOMLA_COMPONENT_DESCRIPTION"
class="list_class"
layout="joomla.form.field.list-fancy-select"
multiple="false"
required="true"
readonly="true"
@ -171,7 +170,6 @@
label="COM_COMPONENTBUILDER_COMPONENT_DASHBOARD_HTML_LABEL"
rows="20"
cols="30"
default=""
class="text_area tab_html"
filter="raw"
hint="COM_COMPONENTBUILDER_COMPONENT_DASHBOARD_HTML_HINT"

View File

@ -101,7 +101,6 @@
label="COM_COMPONENTBUILDER_COMPONENT_FILES_FOLDERS_JOOMLA_COMPONENT_LABEL"
description="COM_COMPONENTBUILDER_COMPONENT_FILES_FOLDERS_JOOMLA_COMPONENT_DESCRIPTION"
class="list_class"
layout="joomla.form.field.list-fancy-select"
multiple="false"
required="true"
readonly="true"

View File

@ -101,7 +101,6 @@
label="COM_COMPONENTBUILDER_COMPONENT_MODULES_JOOMLA_COMPONENT_LABEL"
description="COM_COMPONENTBUILDER_COMPONENT_MODULES_JOOMLA_COMPONENT_DESCRIPTION"
class="list_class"
layout="joomla.form.field.list-fancy-select"
multiple="false"
required="true"
readonly="true"

View File

@ -101,7 +101,6 @@
label="COM_COMPONENTBUILDER_COMPONENT_MYSQL_TWEAKS_JOOMLA_COMPONENT_LABEL"
description="COM_COMPONENTBUILDER_COMPONENT_MYSQL_TWEAKS_JOOMLA_COMPONENT_DESCRIPTION"
class="list_class"
layout="joomla.form.field.list-fancy-select"
multiple="false"
required="true"
readonly="true"
@ -184,7 +183,6 @@
label="COM_COMPONENTBUILDER_COMPONENT_MYSQL_TWEAKS_IDS_LABEL"
rows="20"
cols="40"
default=""
description="COM_COMPONENTBUILDER_COMPONENT_MYSQL_TWEAKS_IDS_DESCRIPTION"
class="text_area ids_selection"
filter="raw"

View File

@ -101,7 +101,6 @@
label="COM_COMPONENTBUILDER_COMPONENT_PLACEHOLDERS_JOOMLA_COMPONENT_LABEL"
description="COM_COMPONENTBUILDER_COMPONENT_PLACEHOLDERS_JOOMLA_COMPONENT_DESCRIPTION"
class="list_class"
layout="joomla.form.field.list-fancy-select"
multiple="false"
required="true"
readonly="true"

View File

@ -101,7 +101,6 @@
label="COM_COMPONENTBUILDER_COMPONENT_PLUGINS_JOOMLA_COMPONENT_LABEL"
description="COM_COMPONENTBUILDER_COMPONENT_PLUGINS_JOOMLA_COMPONENT_DESCRIPTION"
class="list_class"
layout="joomla.form.field.list-fancy-select"
multiple="false"
required="true"
readonly="true"

View File

@ -101,7 +101,6 @@
label="COM_COMPONENTBUILDER_COMPONENT_ROUTER_JOOMLA_COMPONENT_LABEL"
description="COM_COMPONENTBUILDER_COMPONENT_ROUTER_JOOMLA_COMPONENT_DESCRIPTION"
class="list_class"
layout="joomla.form.field.list-fancy-select"
multiple="false"
required="true"
readonly="true"

View File

@ -101,7 +101,6 @@
label="COM_COMPONENTBUILDER_COMPONENT_SITE_VIEWS_JOOMLA_COMPONENT_LABEL"
description="COM_COMPONENTBUILDER_COMPONENT_SITE_VIEWS_JOOMLA_COMPONENT_DESCRIPTION"
class="list_class"
layout="joomla.form.field.list-fancy-select"
multiple="false"
required="true"
readonly="true"

View File

@ -101,7 +101,6 @@
label="COM_COMPONENTBUILDER_COMPONENT_UPDATES_JOOMLA_COMPONENT_LABEL"
description="COM_COMPONENTBUILDER_COMPONENT_UPDATES_JOOMLA_COMPONENT_DESCRIPTION"
class="list_class"
layout="joomla.form.field.list-fancy-select"
multiple="false"
required="true"
readonly="true"
@ -156,7 +155,6 @@
label="COM_COMPONENTBUILDER_COMPONENT_UPDATES_MYSQL_LABEL"
rows="30"
cols="15"
default=""
description="COM_COMPONENTBUILDER_COMPONENT_UPDATES_MYSQL_DESCRIPTION"
class="text_area mysql_update"
filter="raw"

View File

@ -329,7 +329,6 @@
label="COM_COMPONENTBUILDER_FIELDTYPE_EXAMPLE_LABEL"
rows="2"
cols="15"
default=""
description="COM_COMPONENTBUILDER_FIELDTYPE_EXAMPLE_DESCRIPTION"
message="COM_COMPONENTBUILDER_FIELDTYPE_EXAMPLE_MESSAGE"
class="text_area span12"

View File

@ -140,7 +140,6 @@
label="COM_COMPONENTBUILDER_JOOMLA_MODULE_UPDATES_MYSQL_LABEL"
rows="30"
cols="15"
default=""
description="COM_COMPONENTBUILDER_JOOMLA_MODULE_UPDATES_MYSQL_DESCRIPTION"
class="text_area mysql_update"
filter="raw"

View File

@ -140,7 +140,6 @@
label="COM_COMPONENTBUILDER_JOOMLA_PLUGIN_UPDATES_MYSQL_LABEL"
rows="30"
cols="15"
default=""
description="COM_COMPONENTBUILDER_JOOMLA_PLUGIN_UPDATES_MYSQL_DESCRIPTION"
class="text_area mysql_update"
filter="raw"

View File

@ -163,7 +163,6 @@
label="COM_COMPONENTBUILDER_SERVER_PRIVATE_KEY_LABEL"
rows="15"
cols="5"
default=""
description="COM_COMPONENTBUILDER_SERVER_PRIVATE_KEY_DESCRIPTION"
class="input-xxlarge span12"
hint="COM_COMPONENTBUILDER_SERVER_PRIVATE_KEY_HINT"

View File

@ -433,7 +433,7 @@ class ComponentbuilderModelHelp_document extends AdminModel
// change to false
$form->setFieldAttribute($requiredField, 'required', 'false');
// also clear the data set
$data[$requiredField] = '';
unset($data[$requiredField]);
}
}
}

View File

@ -201,7 +201,7 @@ class ComponentbuilderModelImport_joomla_components extends BaseDatabaseModel
// set auto loader
ComponentbuilderHelper::autoLoader('smart');
// get install folder
$dir = JFile::stripExt($package['dir']);
$dir = File::stripExt($package['dir']);
// remove unziped folder
ComponentbuilderHelper::removeFolder($dir);
}
@ -307,7 +307,7 @@ class ComponentbuilderModelImport_joomla_components extends BaseDatabaseModel
// set auto loader
ComponentbuilderHelper::autoLoader('smart');
// extract the package
if (JFile::exists($package['dir']))
if (is_file($package['dir']))
{
// does this package pass a checksum
$checksum = false;
@ -355,12 +355,12 @@ class ComponentbuilderModelImport_joomla_components extends BaseDatabaseModel
// get the zip adapter
$zip = JArchive::getAdapter('zip');
// set the directory name
$this->dir = JFile::stripExt($package['dir']);
$this->dir = File::stripExt($package['dir']);
// unzip the package
$zip->extract($package['dir'], $this->dir);
// check for database file
$infoFile = $this->dir . '/info.vdm';
if (JFile::exists($infoFile))
if (is_file($infoFile))
{
// load the data
if ($info = FileHelper::getContent($infoFile))
@ -631,13 +631,13 @@ class ComponentbuilderModelImport_joomla_components extends BaseDatabaseModel
// set auto loader
ComponentbuilderHelper::autoLoader('smart');
// extract the package
if (JFile::exists($package['dir']))
if (is_file($package['dir']))
{
// set the directory name
$this->dir = JFile::stripExt($package['dir']);
$this->dir = File::stripExt($package['dir']);
// check for database file
$dbFile = $this->dir . '/db.vdm';
if (!JFile::exists($dbFile))
if (!is_file($dbFile))
{
// get the zip adapter
$zip = JArchive::getAdapter('zip');
@ -645,7 +645,7 @@ class ComponentbuilderModelImport_joomla_components extends BaseDatabaseModel
$zip->extract($package['dir'], $this->dir);
}
// check again
if (JFile::exists($dbFile))
if (is_file($dbFile))
{
// load the data
if ($data = FileHelper::getContent($dbFile))
@ -938,10 +938,10 @@ class ComponentbuilderModelImport_joomla_components extends BaseDatabaseModel
$success = true;
// check if we have custom files
$customDir = str_replace('//', '/', $this->dir . '/custom');
if (JFolder::exists($customDir))
if (is_dir($customDir))
{
// great we have some custom stuff lets move it
if (!JFolder::copy($customDir, $customPath,'',true))
if (!Folder::copy($customDir, $customPath,'',true))
{
$this->app->enqueueMessage(Text::_('COM_COMPONENTBUILDER_BCUSTOM_FILESB_NOT_MOVED_TO_CORRECT_LOCATION'), 'error');
$success = false;
@ -954,10 +954,10 @@ class ComponentbuilderModelImport_joomla_components extends BaseDatabaseModel
}
// check if we have images
$imageDir = str_replace('//', '/', $this->dir . '/images');
if (JFolder::exists($imageDir))
if (is_dir($imageDir))
{
// great we have some images lets move them
if (!JFolder::copy($imageDir, $imagesPath,'',true))
if (!Folder::copy($imageDir, $imagesPath,'',true))
{
$this->app->enqueueMessage(Text::_('COM_COMPONENTBUILDER_BIMAGESB_NOT_MOVED_TO_CORRECT_LOCATION'), 'error');
$success = false;
@ -970,10 +970,10 @@ class ComponentbuilderModelImport_joomla_components extends BaseDatabaseModel
}
// now move the dynamic files if found
$dynamicDir = str_replace('//', '/', $this->dir . '/dynamic');
if (JFolder::exists($dynamicDir))
if (is_dir($dynamicDir))
{
// get a list of folders
$folders = JFolder::folders($dynamicDir);
$folders = Folder::folders($dynamicDir);
// check if we have files
if(UtilitiesArrayHelper::check($folders))
{
@ -981,7 +981,7 @@ class ComponentbuilderModelImport_joomla_components extends BaseDatabaseModel
{
$destination = $this->setDynamicPath($folder);
$fullPath = str_replace('//', '/', $dynamicDir . '/' . $folder);
if (!JFolder::exists($fullPath) || !JFolder::copy($fullPath, $destination,'',true))
if (!is_dir($fullPath) || !Folder::copy($fullPath, $destination,'',true))
{
$this->app->enqueueMessage(Text::sprintf('COM_COMPONENTBUILDER_FOLDER_BSB_WAS_NOT_MOVED_TO_BSB', $folder, $destination), 'error');
$success = false;
@ -994,7 +994,7 @@ class ComponentbuilderModelImport_joomla_components extends BaseDatabaseModel
}
}
// get a list of files
$files = JFolder::files($dynamicDir);
$files = Folder::files($dynamicDir);
// check if we have files
if(UtilitiesArrayHelper::check($files))
{
@ -1002,7 +1002,7 @@ class ComponentbuilderModelImport_joomla_components extends BaseDatabaseModel
{
$destination = $this->setDynamicPath($file);
$fullPath = str_replace('//', '/', $dynamicDir . '/' . $file);
if (!JFile::exists($fullPath) || !JFile::copy($fullPath, $destination))
if (!is_file($fullPath) || !File::copy($fullPath, $destination))
{
$this->app->enqueueMessage(Text::sprintf('COM_COMPONENTBUILDER_FILE_BSB_WAS_NOT_MOVED_TO_BSB', $file, $destination), 'error');
$success = false;
@ -1037,7 +1037,7 @@ class ComponentbuilderModelImport_joomla_components extends BaseDatabaseModel
{
$subPath = str_replace('//', '/', $this->dir . '/' . $folder);
// go to the package sub folder if found
if (JFolder::exists($subPath))
if (is_dir($subPath))
{
$this->unLockFile($subPath);
}
@ -1057,7 +1057,7 @@ class ComponentbuilderModelImport_joomla_components extends BaseDatabaseModel
// we are changing the working directory to the tmp path (important)
chdir($tmpPath);
// get a list of files in the current directory tree (all)
$files = JFolder::files('.', '.', true, true);
$files = Folder::files('.', '.', true, true);
// read in the file content
foreach ($files as $file)
{

View File

@ -24,6 +24,7 @@ use Joomla\Registry\Registry;
use Joomla\String\StringHelper;
use Joomla\Utilities\ArrayHelper;
use Joomla\CMS\Helper\TagsHelper;
use VDM\Joomla\Utilities\SessionHelper;
use VDM\Joomla\Utilities\StringHelper as UtilitiesStringHelper;
use VDM\Joomla\Utilities\ObjectHelper;
use VDM\Joomla\Utilities\GuidHelper;
@ -298,7 +299,7 @@ class ComponentbuilderModelJoomla_component extends AdminModel
$id = $_id;
}
// set the id and view name to session
if ($vdm = ComponentbuilderHelper::get('joomla_component__'.$id))
if (($vdm = SessionHelper::get('joomla_component__'.$id)) !== null)
{
$this->vastDevMod = $vdm;
}
@ -306,17 +307,17 @@ class ComponentbuilderModelJoomla_component extends AdminModel
{
// set the vast development method key
$this->vastDevMod = UtilitiesStringHelper::random(50);
ComponentbuilderHelper::set($this->vastDevMod, 'joomla_component__'.$id);
ComponentbuilderHelper::set('joomla_component__'.$id, $this->vastDevMod);
SessionHelper::set($this->vastDevMod, 'joomla_component__'.$id);
SessionHelper::set('joomla_component__'.$id, $this->vastDevMod);
// set a return value if found
$jinput = Factory::getApplication()->input;
$return = $jinput->get('return', null, 'base64');
ComponentbuilderHelper::set($this->vastDevMod . '__return', $return);
SessionHelper::set($this->vastDevMod . '__return', $return);
// set a GUID value if found
if (isset($item) && ObjectHelper::check($item) && isset($item->guid)
&& GuidHelper::valid($item->guid))
{
ComponentbuilderHelper::set($this->vastDevMod . '__guid', $item->guid);
SessionHelper::set($this->vastDevMod . '__guid', $item->guid);
}
}
}
@ -528,7 +529,7 @@ class ComponentbuilderModelJoomla_component extends AdminModel
$id = $item->id;
}
// set the id and view name to session
if ($vdm = ComponentbuilderHelper::get('joomla_component__'.$id))
if (($vdm = SessionHelper::get('joomla_component__'.$id)) !== null)
{
$this->vastDevMod = $vdm;
}
@ -536,17 +537,17 @@ class ComponentbuilderModelJoomla_component extends AdminModel
{
// set the vast development method key
$this->vastDevMod = UtilitiesStringHelper::random(50);
ComponentbuilderHelper::set($this->vastDevMod, 'joomla_component__'.$id);
ComponentbuilderHelper::set('joomla_component__'.$id, $this->vastDevMod);
SessionHelper::set($this->vastDevMod, 'joomla_component__'.$id);
SessionHelper::set('joomla_component__'.$id, $this->vastDevMod);
// set a return value if found
$jinput = Factory::getApplication()->input;
$return = $jinput->get('return', null, 'base64');
ComponentbuilderHelper::set($this->vastDevMod . '__return', $return);
SessionHelper::set($this->vastDevMod . '__return', $return);
// set a GUID value if found
if (isset($item) && ObjectHelper::check($item) && isset($item->guid)
&& GuidHelper::valid($item->guid))
{
ComponentbuilderHelper::set($this->vastDevMod . '__guid', $item->guid);
SessionHelper::set($this->vastDevMod . '__guid', $item->guid);
}
}
@ -919,7 +920,7 @@ class ComponentbuilderModelJoomla_component extends AdminModel
// change to false
$form->setFieldAttribute($requiredField, 'required', 'false');
// also clear the data set
$data[$requiredField] = '';
unset($data[$requiredField]);
}
}
}

View File

@ -24,10 +24,12 @@ use VDM\Joomla\Utilities\FileHelper;
use VDM\Joomla\Utilities\ObjectHelper;
use VDM\Joomla\Utilities\GetHelper;
use VDM\Joomla\Utilities\JsonHelper;
use VDM\Joomla\Utilities\Base64Helper;
use VDM\Joomla\Utilities\ArrayHelper as UtilitiesArrayHelper;
use VDM\Joomla\Utilities\Base64Helper;
use VDM\Joomla\Utilities\StringHelper;
use VDM\Joomla\FOF\Encrypt\AES;
use Joomla\CMS\Filesystem\Folder;
use Joomla\CMS\Filesystem\File;
/**
* Joomla_components List Model
@ -125,14 +127,14 @@ class ComponentbuilderModelJoomla_components extends ListModel
}
// has any data been set for this component
if (JCBArrayHelper::check($pks))
if (UtilitiesArrayHelper::check($pks))
{
// load the linked stuff
$this->getLinkedToComponents($pks);
}
// has any data been set for this component
if (isset($this->smartBox['joomla_component']) && JCBArrayHelper::check($this->smartBox['joomla_component']))
if (isset($this->smartBox['joomla_component']) && UtilitiesArrayHelper::check($this->smartBox['joomla_component']))
{
// set the folder and move the files of each component to the folder
return $this->smartCloner();
@ -205,7 +207,7 @@ class ComponentbuilderModelJoomla_components extends ListModel
}
// create the folders
JFolder::create($this->packagePath);
Folder::create($this->packagePath);
// update $pks with returned IDs
$pks = array();
@ -293,14 +295,14 @@ class ComponentbuilderModelJoomla_components extends ListModel
}
// has any data been set for this component
if (JCBArrayHelper::check($pks))
if (UtilitiesArrayHelper::check($pks))
{
// load the linked stuff
$this->getLinkedToComponents($pks);
}
// has any data been set for this component
if (isset($this->smartBox['joomla_component']) && JCBArrayHelper::check($this->smartBox['joomla_component']))
if (isset($this->smartBox['joomla_component']) && UtilitiesArrayHelper::check($this->smartBox['joomla_component']))
{
// set the folder and move the files of each component to the folder
return $this->smartExportBuilder();
@ -337,7 +339,7 @@ class ComponentbuilderModelJoomla_components extends ListModel
$this->setData($table, $pks, $field);
}
// add fields conditions and relations
if (isset($this->smartIDs['admin_view']) && JCBArrayHelper::check($this->smartIDs['admin_view']))
if (isset($this->smartIDs['admin_view']) && UtilitiesArrayHelper::check($this->smartIDs['admin_view']))
{
$this->setData('admin_fields', array_values($this->smartIDs['admin_view']), 'admin_view');
$this->setData('admin_fields_conditions', array_values($this->smartIDs['admin_view']), 'admin_view');
@ -345,41 +347,41 @@ class ComponentbuilderModelJoomla_components extends ListModel
$this->setData('admin_custom_tabs', array_values($this->smartIDs['admin_view']), 'admin_view');
}
// add joomla module
if (isset($this->smartIDs['joomla_module']) && JCBArrayHelper::check($this->smartIDs['joomla_module']))
if (isset($this->smartIDs['joomla_module']) && UtilitiesArrayHelper::check($this->smartIDs['joomla_module']))
{
$this->setData('joomla_module', array_values($this->smartIDs['joomla_module']), 'id');
$this->setData('joomla_module_updates', array_values($this->smartIDs['joomla_module']), 'joomla_module');
$this->setData('joomla_module_files_folders_urls', array_values($this->smartIDs['joomla_module']), 'joomla_module');
}
// add joomla plugin
if (isset($this->smartIDs['joomla_plugin']) && JCBArrayHelper::check($this->smartIDs['joomla_plugin']))
if (isset($this->smartIDs['joomla_plugin']) && UtilitiesArrayHelper::check($this->smartIDs['joomla_plugin']))
{
$this->setData('joomla_plugin', array_values($this->smartIDs['joomla_plugin']), 'id');
$this->setData('joomla_plugin_updates', array_values($this->smartIDs['joomla_plugin']), 'joomla_plugin');
$this->setData('joomla_plugin_files_folders_urls', array_values($this->smartIDs['joomla_plugin']), 'joomla_plugin');
}
// add validation rules
if (isset($this->smartIDs['validation_rule']) && JCBArrayHelper::check($this->smartIDs['validation_rule']))
if (isset($this->smartIDs['validation_rule']) && UtilitiesArrayHelper::check($this->smartIDs['validation_rule']))
{
$this->setData('validation_rule', array_values($this->smartIDs['validation_rule']), 'name');
}
// add field types
if (isset($this->smartIDs['fieldtype']) && JCBArrayHelper::check($this->smartIDs['fieldtype']))
if (isset($this->smartIDs['fieldtype']) && UtilitiesArrayHelper::check($this->smartIDs['fieldtype']))
{
$this->setData('fieldtype', array_values($this->smartIDs['fieldtype']), 'id');
}
// add templates
if (isset($this->smartIDs['template']) && JCBArrayHelper::check($this->smartIDs['template']))
if (isset($this->smartIDs['template']) && UtilitiesArrayHelper::check($this->smartIDs['template']))
{
$this->setData('template', array_values($this->smartIDs['template']), 'id');
}
// add layouts
if (isset($this->smartIDs['layout']) && JCBArrayHelper::check($this->smartIDs['layout']))
if (isset($this->smartIDs['layout']) && UtilitiesArrayHelper::check($this->smartIDs['layout']))
{
$this->setData('layout', array_values($this->smartIDs['layout']), 'id');
}
// add dynamic get
if (isset($this->smartIDs['dynamic_get']) && JCBArrayHelper::check($this->smartIDs['dynamic_get']))
if (isset($this->smartIDs['dynamic_get']) && UtilitiesArrayHelper::check($this->smartIDs['dynamic_get']))
{
$this->setData('dynamic_get', array_values($this->smartIDs['dynamic_get']), 'id');
}
@ -387,49 +389,49 @@ class ComponentbuilderModelJoomla_components extends ListModel
if ('clone' !== $this->activeType)
{
// add class_property
if (isset($this->smartIDs['class_property']) && JCBArrayHelper::check($this->smartIDs['class_property']))
if (isset($this->smartIDs['class_property']) && UtilitiesArrayHelper::check($this->smartIDs['class_property']))
{
$this->setData('class_property', array_values($this->smartIDs['class_property']), 'id');
}
// add class_method
if (isset($this->smartIDs['class_method']) && JCBArrayHelper::check($this->smartIDs['class_method']))
if (isset($this->smartIDs['class_method']) && UtilitiesArrayHelper::check($this->smartIDs['class_method']))
{
$this->setData('class_method', array_values($this->smartIDs['class_method']), 'id');
}
// add joomla_plugin_group
if (isset($this->smartIDs['joomla_plugin_group']) && JCBArrayHelper::check($this->smartIDs['joomla_plugin_group']))
if (isset($this->smartIDs['joomla_plugin_group']) && UtilitiesArrayHelper::check($this->smartIDs['joomla_plugin_group']))
{
$this->setData('joomla_plugin_group', array_values($this->smartIDs['joomla_plugin_group']), 'id');
}
// add class_extends
if (isset($this->smartIDs['class_extends']) && JCBArrayHelper::check($this->smartIDs['class_extends']))
if (isset($this->smartIDs['class_extends']) && UtilitiesArrayHelper::check($this->smartIDs['class_extends']))
{
$this->setData('class_extends', array_values($this->smartIDs['class_extends']), 'id');
}
// add snippets
if (isset($this->smartIDs['snippet']) && JCBArrayHelper::check($this->smartIDs['snippet']))
if (isset($this->smartIDs['snippet']) && UtilitiesArrayHelper::check($this->smartIDs['snippet']))
{
$this->setData('snippet', array_values($this->smartIDs['snippet']), 'id');
}
// add custom code
if (isset($this->smartIDs['custom_code']) && JCBArrayHelper::check($this->smartIDs['custom_code']))
if (isset($this->smartIDs['custom_code']) && UtilitiesArrayHelper::check($this->smartIDs['custom_code']))
{
$this->setData('custom_code', array_values($this->smartIDs['custom_code']), 'id');
}
// add placeholder
if (isset($this->smartIDs['placeholder']) && JCBArrayHelper::check($this->smartIDs['placeholder']))
if (isset($this->smartIDs['placeholder']) && UtilitiesArrayHelper::check($this->smartIDs['placeholder']))
{
$this->setData('placeholder', array_values($this->smartIDs['placeholder']), 'id');
}
// add powers
if (isset($this->smartIDs['power']) && JCBArrayHelper::check($this->smartIDs['power']))
if (isset($this->smartIDs['power']) && UtilitiesArrayHelper::check($this->smartIDs['power']))
{
$this->setData('power', array_values($this->smartIDs['power']), 'guid');
}
// set limiter
$limit = 0;
// and add those custom codes found in custom codes
while (isset($this->smartIDs['custom_code']) && JCBArrayHelper::check($this->smartIDs['custom_code']) && $limit < 100)
while (isset($this->smartIDs['custom_code']) && UtilitiesArrayHelper::check($this->smartIDs['custom_code']) && $limit < 100)
{
$this->setData('custom_code', array_values($this->smartIDs['custom_code']), 'id');
// make sure we break
@ -446,7 +448,7 @@ class ComponentbuilderModelJoomla_components extends ListModel
protected function getComponents($pks)
{
// setup the query
if (JCBArrayHelper::check($pks))
if (UtilitiesArrayHelper::check($pks))
{
// Get the user object.
if (!ObjectHelper::check($this->user))
@ -485,7 +487,7 @@ class ComponentbuilderModelJoomla_components extends ListModel
// load the items from db
$items = $this->_db->loadObjectList();
// check if we have items
if (JCBArrayHelper::check($items))
if (UtilitiesArrayHelper::check($items))
{
// set params
if (!ObjectHelper::check($this->params))
@ -538,7 +540,7 @@ class ComponentbuilderModelJoomla_components extends ListModel
$value = json_decode($value, true);
}
// now update the fields
if (JCBArrayHelper::check($value))
if (UtilitiesArrayHelper::check($value))
{
foreach ($value as $id)
{
@ -577,7 +579,7 @@ class ComponentbuilderModelJoomla_components extends ListModel
$values = json_decode($values, true);
}
// check that the array has values
if (JCBArrayHelper::check($values))
if (UtilitiesArrayHelper::check($values))
{
// check if the key is an array (targeting subform)
if ('subform' === $type && $key)
@ -604,7 +606,7 @@ class ComponentbuilderModelJoomla_components extends ListModel
}
}
// only return if we set the ids
if (JCBArrayHelper::check($bucket))
if (UtilitiesArrayHelper::check($bucket))
{
// now set the values back
return array_unique($bucket);
@ -616,7 +618,7 @@ class ComponentbuilderModelJoomla_components extends ListModel
$_key = explode('.', $key);
foreach ($values as $value)
{
if (isset($value[$_key[0]]) && JCBArrayHelper::check($value[$_key[0]]))
if (isset($value[$_key[0]]) && UtilitiesArrayHelper::check($value[$_key[0]]))
{
foreach ($value[$_key[0]] as $_value)
{
@ -639,7 +641,7 @@ class ComponentbuilderModelJoomla_components extends ListModel
}
}
// only return if we set the ids
if (JCBArrayHelper::check($bucket))
if (UtilitiesArrayHelper::check($bucket))
{
// now set the values back
return array_unique($bucket);
@ -676,11 +678,11 @@ class ComponentbuilderModelJoomla_components extends ListModel
{
foreach ($values[$key] as $k => $val)
{
if (strpos($k, 'power_') !== false && JCBArrayHelper::check($val))
if (strpos($k, 'power_') !== false && UtilitiesArrayHelper::check($val))
{
foreach ($val as $v)
{
if (JCBArrayHelper::check($v) && isset($v['power']))
if (UtilitiesArrayHelper::check($v) && isset($v['power']))
{
$bucket[$v['power']] = $v['power'];
}
@ -688,7 +690,7 @@ class ComponentbuilderModelJoomla_components extends ListModel
}
}
// only return if we set the ids
if (JCBArrayHelper::check($bucket))
if (UtilitiesArrayHelper::check($bucket))
{
// now return the values back
return array_values($bucket);
@ -718,7 +720,7 @@ class ComponentbuilderModelJoomla_components extends ListModel
}
// make sure we have an array of values
if (!JCBArrayHelper::check($values, true) || !StringHelper::check($table) || !StringHelper::check($key))
if (!UtilitiesArrayHelper::check($values, true) || !StringHelper::check($table) || !StringHelper::check($key))
{
return false;
}
@ -769,7 +771,7 @@ class ComponentbuilderModelJoomla_components extends ListModel
// reset the search array (only search for template/layouts)
$searchTLArray = array();
// check if we have items
if (JCBArrayHelper::check($items))
if (UtilitiesArrayHelper::check($items))
{
// set search array if site/custom admin view
if ('site_view' === $table || 'custom_admin_view' === $table)
@ -1018,7 +1020,7 @@ class ComponentbuilderModelJoomla_components extends ListModel
$fieldsSets[] = (int) $fields;
}
// get fields
if (JCBArrayHelper::check($fieldsSets))
if (UtilitiesArrayHelper::check($fieldsSets))
{
$this->setData('field', $fieldsSets, 'id');
}
@ -1042,7 +1044,7 @@ class ComponentbuilderModelJoomla_components extends ListModel
}
}
// check if a search is required
if (isset($searchTLArray) && JCBArrayHelper::check($searchTLArray)){
if (isset($searchTLArray) && UtilitiesArrayHelper::check($searchTLArray)){
// add search array templates and layouts
foreach ($searchTLArray as $scripter => $add)
@ -1198,7 +1200,7 @@ class ComponentbuilderModelJoomla_components extends ListModel
protected function smartCloner()
{
// check if data is set
if (isset($this->smartBox) && JCBArrayHelper::check($this->smartBox))
if (isset($this->smartBox) && UtilitiesArrayHelper::check($this->smartBox))
{
// get the import_joomla_components
$model = ComponentbuilderHelper::getModel('import_joomla_components');
@ -1256,7 +1258,7 @@ class ComponentbuilderModelJoomla_components extends ListModel
protected function smartExportBuilder()
{
// check if data is set
if (isset($this->smartBox) && JCBArrayHelper::check($this->smartBox))
if (isset($this->smartBox) && UtilitiesArrayHelper::check($this->smartBox))
{
// set db data
$data = serialize($this->smartBox);
@ -1271,7 +1273,7 @@ class ComponentbuilderModelJoomla_components extends ListModel
$this->info['source']['copyright'] = $this->params->get('export_copyright', null);
// lock the data if set
if (JCBArrayHelper::check($this->key))
if (UtilitiesArrayHelper::check($this->key))
{
// lock the data
$this->key = md5(implode('', $this->key));
@ -1289,7 +1291,7 @@ class ComponentbuilderModelJoomla_components extends ListModel
$this->info['getKeyFrom']['copyright'] = $this->info['source']['copyright'];
// add buy link if only one link is set
if (isset($this->info['export_buy_link'])
&& JCBArrayHelper::check($this->info['export_buy_link'])
&& UtilitiesArrayHelper::check($this->info['export_buy_link'])
&& count((array) $this->info['export_buy_link']) == 1)
{
$this->info['getKeyFrom']['buy_link'] = array_values($this->info['export_buy_link'])[0];
@ -1347,10 +1349,10 @@ class ComponentbuilderModelJoomla_components extends ListModel
$this->lockFiles();
// remove old zip files with the same name
if (JFile::exists($this->zipPath))
if (is_file($this->zipPath))
{
// remove file if found
JFile::delete($this->zipPath);
File::delete($this->zipPath);
}
// zip the folder
@ -1372,7 +1374,7 @@ class ComponentbuilderModelJoomla_components extends ListModel
}
// remove the local file
JFile::delete($this->zipPath);
File::delete($this->zipPath);
}
// remove the folder
@ -1431,7 +1433,7 @@ class ComponentbuilderModelJoomla_components extends ListModel
chdir($tmpPath);
// get a list of files in the current directory tree (all)
$files = JFolder::files('.', '.', true, true);
$files = Folder::files('.', '.', true, true);
// read in the file content
foreach ($files as $file)
@ -1455,7 +1457,7 @@ class ComponentbuilderModelJoomla_components extends ListModel
protected function moveIt($paths, $type, $dynamic = false)
{
// make sure we have an array
if (!JCBArrayHelper::check($paths))
if (!UtilitiesArrayHelper::check($paths))
{
return false;
}
@ -1486,7 +1488,7 @@ class ComponentbuilderModelJoomla_components extends ListModel
if (!FileHelper::exists($tmpPath))
{
// create the folders if not found
JFolder::create($tmpPath);
Folder::create($tmpPath);
}
// now move it
@ -1510,10 +1512,10 @@ class ComponentbuilderModelJoomla_components extends ListModel
$customFilePath = str_replace('//', '/', $this->customPath.'/'.$item);
}
// now check if file exist
if (!JFile::exists($tmpFilePath) && JFile::exists($customFilePath))
if (!is_file($tmpFilePath) && is_file($customFilePath))
{
// move the file to its place
JFile::copy($customFilePath, $tmpFilePath);
File::copy($customFilePath, $tmpFilePath);
}
}
@ -1528,14 +1530,14 @@ class ComponentbuilderModelJoomla_components extends ListModel
if (!FileHelper::exists($imageFolderPath))
{
// create the folders if not found
JFolder::create($imageFolderPath);
Folder::create($imageFolderPath);
}
$tmpImagePath = str_replace('//', '/', $this->packagePath.'/'.$item);
$customImagePath = str_replace('//', '/', JPATH_ROOT.'/'.$item);
if (!JFile::exists($tmpImagePath) && JFile::exists($customImagePath))
if (!is_file($tmpImagePath) && is_file($customImagePath))
{
// move the file to its place
JFile::copy($customImagePath, $tmpImagePath);
File::copy($customImagePath, $tmpImagePath);
}
}
@ -1557,7 +1559,7 @@ class ComponentbuilderModelJoomla_components extends ListModel
if (!FileHelper::exists($tmpFolderPath) && FileHelper::exists($customFolderPath))
{
// move the folder to its place
JFolder::copy($customFolderPath, $tmpFolderPath,'',true);
Folder::copy($customFolderPath, $tmpFolderPath,'',true);
}
}
}
@ -1656,27 +1658,27 @@ class ComponentbuilderModelJoomla_components extends ListModel
$temp2 = GetHelper::allBetween($default, '$this->loadTemplate("','")');
$templates = array();
$again = array();
if (JCBArrayHelper::check($temp1) && JCBArrayHelper::check($temp2))
if (UtilitiesArrayHelper::check($temp1) && UtilitiesArrayHelper::check($temp2))
{
$templates = array_merge($temp1,$temp2);
}
else
{
if (JCBArrayHelper::check($temp1))
if (UtilitiesArrayHelper::check($temp1))
{
$templates = $temp1;
}
elseif (JCBArrayHelper::check($temp2))
elseif (UtilitiesArrayHelper::check($temp2))
{
$templates = $temp2;
}
}
if (JCBArrayHelper::check($templates))
if (UtilitiesArrayHelper::check($templates))
{
foreach ($templates as $template)
{
$data = $this->getDataWithAlias($template, 'template');
if (JCBArrayHelper::check($data))
if (UtilitiesArrayHelper::check($data))
{
if (!isset($this->smartIDs['template']) || !isset($this->smartIDs['template'][$data['id']]))
{
@ -1691,27 +1693,27 @@ class ComponentbuilderModelJoomla_components extends ListModel
// set the layout data
$lay1 = GetHelper::allBetween($default, "LayoutHelper::render('","',");
$lay2 = GetHelper::allBetween($default, 'LayoutHelper::render("','",');
if (JCBArrayHelper::check($lay1) && JCBArrayHelper::check($lay2))
if (UtilitiesArrayHelper::check($lay1) && UtilitiesArrayHelper::check($lay2))
{
$layouts = array_merge($lay1,$lay2);
}
else
{
if (JCBArrayHelper::check($lay1))
if (UtilitiesArrayHelper::check($lay1))
{
$layouts = $lay1;
}
elseif (JCBArrayHelper::check($lay2))
elseif (UtilitiesArrayHelper::check($lay2))
{
$layouts = $lay2;
}
}
if (isset($layouts) && JCBArrayHelper::check($layouts))
if (isset($layouts) && UtilitiesArrayHelper::check($layouts))
{
foreach ($layouts as $layout)
{
$data = $this->getDataWithAlias($layout, 'layout');
if (JCBArrayHelper::check($data))
if (UtilitiesArrayHelper::check($data))
{
if (!isset($this->smartIDs['layout']) || !isset($this->smartIDs['layout'][$data['id']]))
{
@ -1723,7 +1725,7 @@ class ComponentbuilderModelJoomla_components extends ListModel
}
}
}
if (JCBArrayHelper::check($again))
if (UtilitiesArrayHelper::check($again))
{
foreach ($again as $get)
{
@ -1734,12 +1736,12 @@ class ComponentbuilderModelJoomla_components extends ListModel
if ($user)
{
// add templates
if (isset($this->smartIDs['template']) && JCBArrayHelper::check($this->smartIDs['template']))
if (isset($this->smartIDs['template']) && UtilitiesArrayHelper::check($this->smartIDs['template']))
{
$this->setData('template', array_values($this->smartIDs['template']), 'id');
}
// add layouts
if (isset($this->smartIDs['layout']) && JCBArrayHelper::check($this->smartIDs['layout']))
if (isset($this->smartIDs['layout']) && UtilitiesArrayHelper::check($this->smartIDs['layout']))
{
$this->setData('layout', array_values($this->smartIDs['layout']), 'id');
}
@ -1828,7 +1830,7 @@ class ComponentbuilderModelJoomla_components extends ListModel
{
// search the value to see if it has custom code
$codeArray = GetHelper::allBetween($value, '[CUSTOMC' . 'ODE=',']');
if (JCBArrayHelper::check($codeArray))
if (UtilitiesArrayHelper::check($codeArray))
{
foreach ($codeArray as $func)
{
@ -1864,12 +1866,12 @@ class ComponentbuilderModelJoomla_components extends ListModel
elseif ('placeholder' === $type)
{
// check if we already have the placeholder search array
if (!JCBArrayHelper::check($this->placeholderM) && !JCBArrayHelper::check($this->placeholderS))
if (!UtilitiesArrayHelper::check($this->placeholderM) && !UtilitiesArrayHelper::check($this->placeholderS))
{
$this->placeholderS = ComponentbuilderHelper::getVars($type, 1, 'published', 'target');
}
// only continue search if placeholders found
if (JCBArrayHelper::check($this->placeholderS))
if (UtilitiesArrayHelper::check($this->placeholderS))
{
foreach ($this->placeholderS as $remove => $placeholder)
{
@ -1932,7 +1934,7 @@ class ComponentbuilderModelJoomla_components extends ListModel
{
$items = $this->_db->loadObjectList();
// check if we have items
if (JCBArrayHelper::check($items))
if (UtilitiesArrayHelper::check($items))
{
if (!isset($this->smartBox['language_translation']))
{

View File

@ -24,6 +24,7 @@ use Joomla\Registry\Registry;
use Joomla\String\StringHelper;
use Joomla\Utilities\ArrayHelper;
use Joomla\CMS\Helper\TagsHelper;
use VDM\Joomla\Utilities\SessionHelper;
use VDM\Joomla\Utilities\StringHelper as UtilitiesStringHelper;
use VDM\Joomla\Utilities\ObjectHelper;
use VDM\Joomla\Utilities\GuidHelper;
@ -204,7 +205,7 @@ class ComponentbuilderModelJoomla_module extends AdminModel
$id = $_id;
}
// set the id and view name to session
if ($vdm = ComponentbuilderHelper::get('joomla_module__'.$id))
if (($vdm = SessionHelper::get('joomla_module__'.$id)) !== null)
{
$this->vastDevMod = $vdm;
}
@ -212,17 +213,17 @@ class ComponentbuilderModelJoomla_module extends AdminModel
{
// set the vast development method key
$this->vastDevMod = UtilitiesStringHelper::random(50);
ComponentbuilderHelper::set($this->vastDevMod, 'joomla_module__'.$id);
ComponentbuilderHelper::set('joomla_module__'.$id, $this->vastDevMod);
SessionHelper::set($this->vastDevMod, 'joomla_module__'.$id);
SessionHelper::set('joomla_module__'.$id, $this->vastDevMod);
// set a return value if found
$jinput = Factory::getApplication()->input;
$return = $jinput->get('return', null, 'base64');
ComponentbuilderHelper::set($this->vastDevMod . '__return', $return);
SessionHelper::set($this->vastDevMod . '__return', $return);
// set a GUID value if found
if (isset($item) && ObjectHelper::check($item) && isset($item->guid)
&& GuidHelper::valid($item->guid))
{
ComponentbuilderHelper::set($this->vastDevMod . '__guid', $item->guid);
SessionHelper::set($this->vastDevMod . '__guid', $item->guid);
}
}
}
@ -377,7 +378,7 @@ class ComponentbuilderModelJoomla_module extends AdminModel
$id = $item->id;
}
// set the id and view name to session
if ($vdm = ComponentbuilderHelper::get('joomla_module__'.$id))
if (($vdm = SessionHelper::get('joomla_module__'.$id)) !== null)
{
$this->vastDevMod = $vdm;
}
@ -385,17 +386,17 @@ class ComponentbuilderModelJoomla_module extends AdminModel
{
// set the vast development method key
$this->vastDevMod = UtilitiesStringHelper::random(50);
ComponentbuilderHelper::set($this->vastDevMod, 'joomla_module__'.$id);
ComponentbuilderHelper::set('joomla_module__'.$id, $this->vastDevMod);
SessionHelper::set($this->vastDevMod, 'joomla_module__'.$id);
SessionHelper::set('joomla_module__'.$id, $this->vastDevMod);
// set a return value if found
$jinput = Factory::getApplication()->input;
$return = $jinput->get('return', null, 'base64');
ComponentbuilderHelper::set($this->vastDevMod . '__return', $return);
SessionHelper::set($this->vastDevMod . '__return', $return);
// set a GUID value if found
if (isset($item) && ObjectHelper::check($item) && isset($item->guid)
&& GuidHelper::valid($item->guid))
{
ComponentbuilderHelper::set($this->vastDevMod . '__guid', $item->guid);
SessionHelper::set($this->vastDevMod . '__guid', $item->guid);
}
}
}

View File

@ -24,6 +24,7 @@ use Joomla\Registry\Registry;
use Joomla\String\StringHelper;
use Joomla\Utilities\ArrayHelper;
use Joomla\CMS\Helper\TagsHelper;
use VDM\Joomla\Utilities\SessionHelper;
use VDM\Joomla\Utilities\StringHelper as UtilitiesStringHelper;
use VDM\Joomla\Utilities\ObjectHelper;
use VDM\Joomla\Utilities\GuidHelper;
@ -181,7 +182,7 @@ class ComponentbuilderModelJoomla_plugin extends AdminModel
$id = $_id;
}
// set the id and view name to session
if ($vdm = ComponentbuilderHelper::get('joomla_plugin__'.$id))
if (($vdm = SessionHelper::get('joomla_plugin__'.$id)) !== null)
{
$this->vastDevMod = $vdm;
}
@ -189,17 +190,17 @@ class ComponentbuilderModelJoomla_plugin extends AdminModel
{
// set the vast development method key
$this->vastDevMod = UtilitiesStringHelper::random(50);
ComponentbuilderHelper::set($this->vastDevMod, 'joomla_plugin__'.$id);
ComponentbuilderHelper::set('joomla_plugin__'.$id, $this->vastDevMod);
SessionHelper::set($this->vastDevMod, 'joomla_plugin__'.$id);
SessionHelper::set('joomla_plugin__'.$id, $this->vastDevMod);
// set a return value if found
$jinput = Factory::getApplication()->input;
$return = $jinput->get('return', null, 'base64');
ComponentbuilderHelper::set($this->vastDevMod . '__return', $return);
SessionHelper::set($this->vastDevMod . '__return', $return);
// set a GUID value if found
if (isset($item) && ObjectHelper::check($item) && isset($item->guid)
&& GuidHelper::valid($item->guid))
{
ComponentbuilderHelper::set($this->vastDevMod . '__guid', $item->guid);
SessionHelper::set($this->vastDevMod . '__guid', $item->guid);
}
}
}
@ -342,7 +343,7 @@ class ComponentbuilderModelJoomla_plugin extends AdminModel
$id = $item->id;
}
// set the id and view name to session
if ($vdm = ComponentbuilderHelper::get('joomla_plugin__'.$id))
if (($vdm = SessionHelper::get('joomla_plugin__'.$id)) !== null)
{
$this->vastDevMod = $vdm;
}
@ -350,17 +351,17 @@ class ComponentbuilderModelJoomla_plugin extends AdminModel
{
// set the vast development method key
$this->vastDevMod = UtilitiesStringHelper::random(50);
ComponentbuilderHelper::set($this->vastDevMod, 'joomla_plugin__'.$id);
ComponentbuilderHelper::set('joomla_plugin__'.$id, $this->vastDevMod);
SessionHelper::set($this->vastDevMod, 'joomla_plugin__'.$id);
SessionHelper::set('joomla_plugin__'.$id, $this->vastDevMod);
// set a return value if found
$jinput = Factory::getApplication()->input;
$return = $jinput->get('return', null, 'base64');
ComponentbuilderHelper::set($this->vastDevMod . '__return', $return);
SessionHelper::set($this->vastDevMod . '__return', $return);
// set a GUID value if found
if (isset($item) && ObjectHelper::check($item) && isset($item->guid)
&& GuidHelper::valid($item->guid))
{
ComponentbuilderHelper::set($this->vastDevMod . '__guid', $item->guid);
SessionHelper::set($this->vastDevMod . '__guid', $item->guid);
}
}
}

View File

@ -24,6 +24,7 @@ use Joomla\Registry\Registry;
use Joomla\String\StringHelper;
use Joomla\Utilities\ArrayHelper;
use Joomla\CMS\Helper\TagsHelper;
use VDM\Joomla\Utilities\SessionHelper;
use VDM\Joomla\Utilities\StringHelper as UtilitiesStringHelper;
use VDM\Joomla\Utilities\ObjectHelper;
use VDM\Joomla\Utilities\GuidHelper;
@ -114,7 +115,7 @@ class ComponentbuilderModelLanguage_translation extends AdminModel
$id = $_id;
}
// set the id and view name to session
if ($vdm = ComponentbuilderHelper::get('language_translation__'.$id))
if (($vdm = SessionHelper::get('language_translation__'.$id)) !== null)
{
$this->vastDevMod = $vdm;
}
@ -122,17 +123,17 @@ class ComponentbuilderModelLanguage_translation extends AdminModel
{
// set the vast development method key
$this->vastDevMod = UtilitiesStringHelper::random(50);
ComponentbuilderHelper::set($this->vastDevMod, 'language_translation__'.$id);
ComponentbuilderHelper::set('language_translation__'.$id, $this->vastDevMod);
SessionHelper::set($this->vastDevMod, 'language_translation__'.$id);
SessionHelper::set('language_translation__'.$id, $this->vastDevMod);
// set a return value if found
$jinput = Factory::getApplication()->input;
$return = $jinput->get('return', null, 'base64');
ComponentbuilderHelper::set($this->vastDevMod . '__return', $return);
SessionHelper::set($this->vastDevMod . '__return', $return);
// set a GUID value if found
if (isset($item) && ObjectHelper::check($item) && isset($item->guid)
&& GuidHelper::valid($item->guid))
{
ComponentbuilderHelper::set($this->vastDevMod . '__guid', $item->guid);
SessionHelper::set($this->vastDevMod . '__guid', $item->guid);
}
}
}
@ -193,7 +194,7 @@ class ComponentbuilderModelLanguage_translation extends AdminModel
$id = $item->id;
}
// set the id and view name to session
if ($vdm = ComponentbuilderHelper::get('language_translation__'.$id))
if (($vdm = SessionHelper::get('language_translation__'.$id)) !== null)
{
$this->vastDevMod = $vdm;
}
@ -201,17 +202,17 @@ class ComponentbuilderModelLanguage_translation extends AdminModel
{
// set the vast development method key
$this->vastDevMod = UtilitiesStringHelper::random(50);
ComponentbuilderHelper::set($this->vastDevMod, 'language_translation__'.$id);
ComponentbuilderHelper::set('language_translation__'.$id, $this->vastDevMod);
SessionHelper::set($this->vastDevMod, 'language_translation__'.$id);
SessionHelper::set('language_translation__'.$id, $this->vastDevMod);
// set a return value if found
$jinput = Factory::getApplication()->input;
$return = $jinput->get('return', null, 'base64');
ComponentbuilderHelper::set($this->vastDevMod . '__return', $return);
SessionHelper::set($this->vastDevMod . '__return', $return);
// set a GUID value if found
if (isset($item) && ObjectHelper::check($item) && isset($item->guid)
&& GuidHelper::valid($item->guid))
{
ComponentbuilderHelper::set($this->vastDevMod . '__guid', $item->guid);
SessionHelper::set($this->vastDevMod . '__guid', $item->guid);
}
}
}

View File

@ -24,6 +24,7 @@ use Joomla\Registry\Registry;
use Joomla\String\StringHelper;
use Joomla\Utilities\ArrayHelper;
use Joomla\CMS\Helper\TagsHelper;
use VDM\Joomla\Utilities\SessionHelper;
use VDM\Joomla\Utilities\StringHelper as UtilitiesStringHelper;
use VDM\Joomla\Utilities\ObjectHelper;
use VDM\Joomla\Utilities\GuidHelper;
@ -136,7 +137,7 @@ class ComponentbuilderModelLayout extends AdminModel
$id = $_id;
}
// set the id and view name to session
if ($vdm = ComponentbuilderHelper::get('layout__'.$id))
if (($vdm = SessionHelper::get('layout__'.$id)) !== null)
{
$this->vastDevMod = $vdm;
}
@ -144,17 +145,17 @@ class ComponentbuilderModelLayout extends AdminModel
{
// set the vast development method key
$this->vastDevMod = UtilitiesStringHelper::random(50);
ComponentbuilderHelper::set($this->vastDevMod, 'layout__'.$id);
ComponentbuilderHelper::set('layout__'.$id, $this->vastDevMod);
SessionHelper::set($this->vastDevMod, 'layout__'.$id);
SessionHelper::set('layout__'.$id, $this->vastDevMod);
// set a return value if found
$jinput = Factory::getApplication()->input;
$return = $jinput->get('return', null, 'base64');
ComponentbuilderHelper::set($this->vastDevMod . '__return', $return);
SessionHelper::set($this->vastDevMod . '__return', $return);
// set a GUID value if found
if (isset($item) && ObjectHelper::check($item) && isset($item->guid)
&& GuidHelper::valid($item->guid))
{
ComponentbuilderHelper::set($this->vastDevMod . '__guid', $item->guid);
SessionHelper::set($this->vastDevMod . '__guid', $item->guid);
}
}
}
@ -221,7 +222,7 @@ class ComponentbuilderModelLayout extends AdminModel
$id = $item->id;
}
// set the id and view name to session
if ($vdm = ComponentbuilderHelper::get('layout__'.$id))
if (($vdm = SessionHelper::get('layout__'.$id)) !== null)
{
$this->vastDevMod = $vdm;
}
@ -229,17 +230,17 @@ class ComponentbuilderModelLayout extends AdminModel
{
// set the vast development method key
$this->vastDevMod = UtilitiesStringHelper::random(50);
ComponentbuilderHelper::set($this->vastDevMod, 'layout__'.$id);
ComponentbuilderHelper::set('layout__'.$id, $this->vastDevMod);
SessionHelper::set($this->vastDevMod, 'layout__'.$id);
SessionHelper::set('layout__'.$id, $this->vastDevMod);
// set a return value if found
$jinput = Factory::getApplication()->input;
$return = $jinput->get('return', null, 'base64');
ComponentbuilderHelper::set($this->vastDevMod . '__return', $return);
SessionHelper::set($this->vastDevMod . '__return', $return);
// set a GUID value if found
if (isset($item) && ObjectHelper::check($item) && isset($item->guid)
&& GuidHelper::valid($item->guid))
{
ComponentbuilderHelper::set($this->vastDevMod . '__guid', $item->guid);
SessionHelper::set($this->vastDevMod . '__guid', $item->guid);
}
}
}

View File

@ -24,6 +24,7 @@ use Joomla\Registry\Registry;
use Joomla\String\StringHelper;
use Joomla\Utilities\ArrayHelper;
use Joomla\CMS\Helper\TagsHelper;
use VDM\Joomla\Utilities\SessionHelper;
use VDM\Joomla\Utilities\StringHelper as UtilitiesStringHelper;
use VDM\Joomla\Utilities\ObjectHelper;
use VDM\Joomla\Utilities\GuidHelper;
@ -152,7 +153,7 @@ class ComponentbuilderModelLibrary extends AdminModel
$id = $_id;
}
// set the id and view name to session
if ($vdm = ComponentbuilderHelper::get('library__'.$id))
if (($vdm = SessionHelper::get('library__'.$id)) !== null)
{
$this->vastDevMod = $vdm;
}
@ -160,17 +161,17 @@ class ComponentbuilderModelLibrary extends AdminModel
{
// set the vast development method key
$this->vastDevMod = UtilitiesStringHelper::random(50);
ComponentbuilderHelper::set($this->vastDevMod, 'library__'.$id);
ComponentbuilderHelper::set('library__'.$id, $this->vastDevMod);
SessionHelper::set($this->vastDevMod, 'library__'.$id);
SessionHelper::set('library__'.$id, $this->vastDevMod);
// set a return value if found
$jinput = Factory::getApplication()->input;
$return = $jinput->get('return', null, 'base64');
ComponentbuilderHelper::set($this->vastDevMod . '__return', $return);
SessionHelper::set($this->vastDevMod . '__return', $return);
// set a GUID value if found
if (isset($item) && ObjectHelper::check($item) && isset($item->guid)
&& GuidHelper::valid($item->guid))
{
ComponentbuilderHelper::set($this->vastDevMod . '__guid', $item->guid);
SessionHelper::set($this->vastDevMod . '__guid', $item->guid);
}
}
}
@ -239,7 +240,7 @@ class ComponentbuilderModelLibrary extends AdminModel
$id = $item->id;
}
// set the id and view name to session
if ($vdm = ComponentbuilderHelper::get('library__'.$id))
if (($vdm = SessionHelper::get('library__'.$id)) !== null)
{
$this->vastDevMod = $vdm;
}
@ -247,17 +248,17 @@ class ComponentbuilderModelLibrary extends AdminModel
{
// set the vast development method key
$this->vastDevMod = UtilitiesStringHelper::random(50);
ComponentbuilderHelper::set($this->vastDevMod, 'library__'.$id);
ComponentbuilderHelper::set('library__'.$id, $this->vastDevMod);
SessionHelper::set($this->vastDevMod, 'library__'.$id);
SessionHelper::set('library__'.$id, $this->vastDevMod);
// set a return value if found
$jinput = Factory::getApplication()->input;
$return = $jinput->get('return', null, 'base64');
ComponentbuilderHelper::set($this->vastDevMod . '__return', $return);
SessionHelper::set($this->vastDevMod . '__return', $return);
// set a GUID value if found
if (isset($item) && ObjectHelper::check($item) && isset($item->guid)
&& GuidHelper::valid($item->guid))
{
ComponentbuilderHelper::set($this->vastDevMod . '__guid', $item->guid);
SessionHelper::set($this->vastDevMod . '__guid', $item->guid);
}
}
}
@ -569,7 +570,7 @@ class ComponentbuilderModelLibrary extends AdminModel
// change to false
$form->setFieldAttribute($requiredField, 'required', 'false');
// also clear the data set
$data[$requiredField] = '';
unset($data[$requiredField]);
}
}
}

View File

@ -24,6 +24,7 @@ use Joomla\Registry\Registry;
use Joomla\String\StringHelper;
use Joomla\Utilities\ArrayHelper;
use Joomla\CMS\Helper\TagsHelper;
use VDM\Joomla\Utilities\SessionHelper;
use VDM\Joomla\Utilities\StringHelper as UtilitiesStringHelper;
use VDM\Joomla\Utilities\ObjectHelper;
use VDM\Joomla\Utilities\GuidHelper;
@ -116,7 +117,7 @@ class ComponentbuilderModelPlaceholder extends AdminModel
$id = $_id;
}
// set the id and view name to session
if ($vdm = ComponentbuilderHelper::get('placeholder__'.$id))
if (($vdm = SessionHelper::get('placeholder__'.$id)) !== null)
{
$this->vastDevMod = $vdm;
}
@ -124,17 +125,17 @@ class ComponentbuilderModelPlaceholder extends AdminModel
{
// set the vast development method key
$this->vastDevMod = UtilitiesStringHelper::random(50);
ComponentbuilderHelper::set($this->vastDevMod, 'placeholder__'.$id);
ComponentbuilderHelper::set('placeholder__'.$id, $this->vastDevMod);
SessionHelper::set($this->vastDevMod, 'placeholder__'.$id);
SessionHelper::set('placeholder__'.$id, $this->vastDevMod);
// set a return value if found
$jinput = Factory::getApplication()->input;
$return = $jinput->get('return', null, 'base64');
ComponentbuilderHelper::set($this->vastDevMod . '__return', $return);
SessionHelper::set($this->vastDevMod . '__return', $return);
// set a GUID value if found
if (isset($item) && ObjectHelper::check($item) && isset($item->guid)
&& GuidHelper::valid($item->guid))
{
ComponentbuilderHelper::set($this->vastDevMod . '__guid', $item->guid);
SessionHelper::set($this->vastDevMod . '__guid', $item->guid);
}
}
}
@ -187,7 +188,7 @@ class ComponentbuilderModelPlaceholder extends AdminModel
$id = $item->id;
}
// set the id and view name to session
if ($vdm = ComponentbuilderHelper::get('placeholder__'.$id))
if (($vdm = SessionHelper::get('placeholder__'.$id)) !== null)
{
$this->vastDevMod = $vdm;
}
@ -195,17 +196,17 @@ class ComponentbuilderModelPlaceholder extends AdminModel
{
// set the vast development method key
$this->vastDevMod = UtilitiesStringHelper::random(50);
ComponentbuilderHelper::set($this->vastDevMod, 'placeholder__'.$id);
ComponentbuilderHelper::set('placeholder__'.$id, $this->vastDevMod);
SessionHelper::set($this->vastDevMod, 'placeholder__'.$id);
SessionHelper::set('placeholder__'.$id, $this->vastDevMod);
// set a return value if found
$jinput = Factory::getApplication()->input;
$return = $jinput->get('return', null, 'base64');
ComponentbuilderHelper::set($this->vastDevMod . '__return', $return);
SessionHelper::set($this->vastDevMod . '__return', $return);
// set a GUID value if found
if (isset($item) && ObjectHelper::check($item) && isset($item->guid)
&& GuidHelper::valid($item->guid))
{
ComponentbuilderHelper::set($this->vastDevMod . '__guid', $item->guid);
SessionHelper::set($this->vastDevMod . '__guid', $item->guid);
}
}
}

View File

@ -25,6 +25,7 @@ use Joomla\String\StringHelper;
use Joomla\Utilities\ArrayHelper;
use Joomla\CMS\Helper\TagsHelper;
use VDM\Joomla\Componentbuilder\Power\Factory as PowerFactory;
use VDM\Joomla\Utilities\SessionHelper;
use VDM\Joomla\Utilities\StringHelper as UtilitiesStringHelper;
use VDM\Joomla\Utilities\ObjectHelper;
use VDM\Joomla\Utilities\GuidHelper;
@ -162,7 +163,7 @@ class ComponentbuilderModelPower extends AdminModel
$id = $_id;
}
// set the id and view name to session
if ($vdm = ComponentbuilderHelper::get('power__'.$id))
if (($vdm = SessionHelper::get('power__'.$id)) !== null)
{
$this->vastDevMod = $vdm;
}
@ -170,17 +171,17 @@ class ComponentbuilderModelPower extends AdminModel
{
// set the vast development method key
$this->vastDevMod = UtilitiesStringHelper::random(50);
ComponentbuilderHelper::set($this->vastDevMod, 'power__'.$id);
ComponentbuilderHelper::set('power__'.$id, $this->vastDevMod);
SessionHelper::set($this->vastDevMod, 'power__'.$id);
SessionHelper::set('power__'.$id, $this->vastDevMod);
// set a return value if found
$jinput = Factory::getApplication()->input;
$return = $jinput->get('return', null, 'base64');
ComponentbuilderHelper::set($this->vastDevMod . '__return', $return);
SessionHelper::set($this->vastDevMod . '__return', $return);
// set a GUID value if found
if (isset($item) && ObjectHelper::check($item) && isset($item->guid)
&& GuidHelper::valid($item->guid))
{
ComponentbuilderHelper::set($this->vastDevMod . '__guid', $item->guid);
SessionHelper::set($this->vastDevMod . '__guid', $item->guid);
}
}
}
@ -307,7 +308,7 @@ class ComponentbuilderModelPower extends AdminModel
$id = $item->id;
}
// set the id and view name to session
if ($vdm = ComponentbuilderHelper::get('power__'.$id))
if (($vdm = SessionHelper::get('power__'.$id)) !== null)
{
$this->vastDevMod = $vdm;
}
@ -315,17 +316,17 @@ class ComponentbuilderModelPower extends AdminModel
{
// set the vast development method key
$this->vastDevMod = UtilitiesStringHelper::random(50);
ComponentbuilderHelper::set($this->vastDevMod, 'power__'.$id);
ComponentbuilderHelper::set('power__'.$id, $this->vastDevMod);
SessionHelper::set($this->vastDevMod, 'power__'.$id);
SessionHelper::set('power__'.$id, $this->vastDevMod);
// set a return value if found
$jinput = Factory::getApplication()->input;
$return = $jinput->get('return', null, 'base64');
ComponentbuilderHelper::set($this->vastDevMod . '__return', $return);
SessionHelper::set($this->vastDevMod . '__return', $return);
// set a GUID value if found
if (isset($item) && ObjectHelper::check($item) && isset($item->guid)
&& GuidHelper::valid($item->guid))
{
ComponentbuilderHelper::set($this->vastDevMod . '__guid', $item->guid);
SessionHelper::set($this->vastDevMod . '__guid', $item->guid);
}
}
}

View File

@ -490,7 +490,7 @@ class ComponentbuilderModelServer extends AdminModel
// change to false
$form->setFieldAttribute($requiredField, 'required', 'false');
// also clear the data set
$data[$requiredField] = '';
unset($data[$requiredField]);
}
}
}

View File

@ -24,6 +24,7 @@ use Joomla\Registry\Registry;
use Joomla\String\StringHelper;
use Joomla\Utilities\ArrayHelper;
use Joomla\CMS\Helper\TagsHelper;
use VDM\Joomla\Utilities\SessionHelper;
use VDM\Joomla\Utilities\StringHelper as UtilitiesStringHelper;
use VDM\Joomla\Utilities\ObjectHelper;
use VDM\Joomla\Utilities\GuidHelper;
@ -183,7 +184,7 @@ class ComponentbuilderModelSite_view extends AdminModel
$id = $_id;
}
// set the id and view name to session
if ($vdm = ComponentbuilderHelper::get('site_view__'.$id))
if (($vdm = SessionHelper::get('site_view__'.$id)) !== null)
{
$this->vastDevMod = $vdm;
}
@ -191,17 +192,17 @@ class ComponentbuilderModelSite_view extends AdminModel
{
// set the vast development method key
$this->vastDevMod = UtilitiesStringHelper::random(50);
ComponentbuilderHelper::set($this->vastDevMod, 'site_view__'.$id);
ComponentbuilderHelper::set('site_view__'.$id, $this->vastDevMod);
SessionHelper::set($this->vastDevMod, 'site_view__'.$id);
SessionHelper::set('site_view__'.$id, $this->vastDevMod);
// set a return value if found
$jinput = Factory::getApplication()->input;
$return = $jinput->get('return', null, 'base64');
ComponentbuilderHelper::set($this->vastDevMod . '__return', $return);
SessionHelper::set($this->vastDevMod . '__return', $return);
// set a GUID value if found
if (isset($item) && ObjectHelper::check($item) && isset($item->guid)
&& GuidHelper::valid($item->guid))
{
ComponentbuilderHelper::set($this->vastDevMod . '__guid', $item->guid);
SessionHelper::set($this->vastDevMod . '__guid', $item->guid);
}
}
}
@ -352,7 +353,7 @@ class ComponentbuilderModelSite_view extends AdminModel
$id = $item->id;
}
// set the id and view name to session
if ($vdm = ComponentbuilderHelper::get('site_view__'.$id))
if (($vdm = SessionHelper::get('site_view__'.$id)) !== null)
{
$this->vastDevMod = $vdm;
}
@ -360,17 +361,17 @@ class ComponentbuilderModelSite_view extends AdminModel
{
// set the vast development method key
$this->vastDevMod = UtilitiesStringHelper::random(50);
ComponentbuilderHelper::set($this->vastDevMod, 'site_view__'.$id);
ComponentbuilderHelper::set('site_view__'.$id, $this->vastDevMod);
SessionHelper::set($this->vastDevMod, 'site_view__'.$id);
SessionHelper::set('site_view__'.$id, $this->vastDevMod);
// set a return value if found
$jinput = Factory::getApplication()->input;
$return = $jinput->get('return', null, 'base64');
ComponentbuilderHelper::set($this->vastDevMod . '__return', $return);
SessionHelper::set($this->vastDevMod . '__return', $return);
// set a GUID value if found
if (isset($item) && ObjectHelper::check($item) && isset($item->guid)
&& GuidHelper::valid($item->guid))
{
ComponentbuilderHelper::set($this->vastDevMod . '__guid', $item->guid);
SessionHelper::set($this->vastDevMod . '__guid', $item->guid);
}
}
@ -524,6 +525,9 @@ class ComponentbuilderModelSite_view extends AdminModel
}
}
// update the ajax_input (sub form) layout
$form->setFieldAttribute('ajax_input', 'layout', ComponentbuilderHelper::getSubformLayout('site_view', 'ajax_input'));
// update all editors to use this components global editor
$global_editor = ComponentHelper::getParams('com_componentbuilder')->get('editor', 'none');
// now get all the editor fields

View File

@ -22,6 +22,8 @@ use Joomla\CMS\Helper\TagsHelper;
use VDM\Joomla\Utilities\ArrayHelper as UtilitiesArrayHelper;
use VDM\Joomla\Utilities\ObjectHelper;
use VDM\Joomla\Utilities\StringHelper;
use Joomla\CMS\Filesystem\Folder;
use Joomla\CMS\Filesystem\File;
/**
* Snippets List Model
@ -112,20 +114,20 @@ class ComponentbuilderModelSnippets extends ListModel
// get the shared paths
$this->fullPath = rtrim(ComponentbuilderHelper::getFolderPath('path', 'sharepath', Factory::getConfig()->get('tmp_path')), '/') . '/snippets';
// remove old folder with the same name
if (JFolder::exists($this->fullPath))
if (is_dir($this->fullPath))
{
// remove if old folder is found
ComponentbuilderHelper::removeFolder($this->fullPath);
}
// create the full path
JFolder::create($this->fullPath);
Folder::create($this->fullPath);
// set zip path
$this->zipPath = $this->fullPath .'.zip';
// remove old zip files with the same name
if (JFile::exists($this->zipPath))
if (is_file($this->zipPath))
{
// remove file if found
JFile::delete($this->zipPath);
File::delete($this->zipPath);
}
// prep the item
foreach($items as $item)

View File

@ -24,6 +24,7 @@ use Joomla\Registry\Registry;
use Joomla\String\StringHelper;
use Joomla\Utilities\ArrayHelper;
use Joomla\CMS\Helper\TagsHelper;
use VDM\Joomla\Utilities\SessionHelper;
use VDM\Joomla\Utilities\StringHelper as UtilitiesStringHelper;
use VDM\Joomla\Utilities\ObjectHelper;
use VDM\Joomla\Utilities\GuidHelper;
@ -136,7 +137,7 @@ class ComponentbuilderModelTemplate extends AdminModel
$id = $_id;
}
// set the id and view name to session
if ($vdm = ComponentbuilderHelper::get('template__'.$id))
if (($vdm = SessionHelper::get('template__'.$id)) !== null)
{
$this->vastDevMod = $vdm;
}
@ -144,17 +145,17 @@ class ComponentbuilderModelTemplate extends AdminModel
{
// set the vast development method key
$this->vastDevMod = UtilitiesStringHelper::random(50);
ComponentbuilderHelper::set($this->vastDevMod, 'template__'.$id);
ComponentbuilderHelper::set('template__'.$id, $this->vastDevMod);
SessionHelper::set($this->vastDevMod, 'template__'.$id);
SessionHelper::set('template__'.$id, $this->vastDevMod);
// set a return value if found
$jinput = Factory::getApplication()->input;
$return = $jinput->get('return', null, 'base64');
ComponentbuilderHelper::set($this->vastDevMod . '__return', $return);
SessionHelper::set($this->vastDevMod . '__return', $return);
// set a GUID value if found
if (isset($item) && ObjectHelper::check($item) && isset($item->guid)
&& GuidHelper::valid($item->guid))
{
ComponentbuilderHelper::set($this->vastDevMod . '__guid', $item->guid);
SessionHelper::set($this->vastDevMod . '__guid', $item->guid);
}
}
}
@ -221,7 +222,7 @@ class ComponentbuilderModelTemplate extends AdminModel
$id = $item->id;
}
// set the id and view name to session
if ($vdm = ComponentbuilderHelper::get('template__'.$id))
if (($vdm = SessionHelper::get('template__'.$id)) !== null)
{
$this->vastDevMod = $vdm;
}
@ -229,17 +230,17 @@ class ComponentbuilderModelTemplate extends AdminModel
{
// set the vast development method key
$this->vastDevMod = UtilitiesStringHelper::random(50);
ComponentbuilderHelper::set($this->vastDevMod, 'template__'.$id);
ComponentbuilderHelper::set('template__'.$id, $this->vastDevMod);
SessionHelper::set($this->vastDevMod, 'template__'.$id);
SessionHelper::set('template__'.$id, $this->vastDevMod);
// set a return value if found
$jinput = Factory::getApplication()->input;
$return = $jinput->get('return', null, 'base64');
ComponentbuilderHelper::set($this->vastDevMod . '__return', $return);
SessionHelper::set($this->vastDevMod . '__return', $return);
// set a GUID value if found
if (isset($item) && ObjectHelper::check($item) && isset($item->guid)
&& GuidHelper::valid($item->guid))
{
ComponentbuilderHelper::set($this->vastDevMod . '__guid', $item->guid);
SessionHelper::set($this->vastDevMod . '__guid', $item->guid);
}
}
}

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