Compare commits

...

9 Commits

403 changed files with 4199 additions and 3732 deletions

View File

@ -1,8 +1,8 @@
# Component Builder (2.1.12)
# Component Builder (2.1.17)
This is a [Joomla 3.x] (http://www.joomla.org/) component.
![Component Builder image] (https://raw.githubusercontent.com/vdm-io/Joomla-Component-Builder/master/admin/assets/images/component-300.png "The Component Builder")
![Component Builder image] (https://raw.githubusercontent.com/vdm-io/Joomla-Component-Builder/master/admin/assets/images/component-300.jpg "The Component Builder")
The Component Builder for Joomla that is highly advanced, truly able to build extremely complex components in a fraction of the time.
@ -32,13 +32,19 @@ Would you require more help please open and issue here on [gitHub today](https:/
+ *Author*: [Llewellyn van der Merwe] (mailto:info@vdm.io)
+ *Name*: [Component Builder] (https://www.vdm.io/joomla-component-builder)
+ *First Build*: 30th April, 2015
+ *Last Build*: 3rd June, 2016
+ *Version*: 2.1.12
+ *Last Build*: 3rd September, 2016
+ *Version*: 2.1.17
+ *Copyright*: Copyright (C) 2015. All Rights Reserved
+ *License*: GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html
+ *Line count*: **83152**
+ *File count*: **505**
+ *Line count*: **83550**
+ *File count*: **510**
+ *Folder count*: **98**
> This **component** was build with a Joomla [Automated Component Builder] (https://www.vdm.io/joomla-component-builder).
> Developed by [Llewellyn van der Merwe] (mailto:joomla@vdm.io)
> Developed by [Llewellyn van der Merwe] (mailto:joomla@vdm.io)
## Donations
If you want to support this project, please consider donating:
* PayPal: pay@vdm.io
* Bitcoin: 3H35PYwikEosvcjxHXGPLS1GufZ4b4iFu3

View File

@ -9,8 +9,8 @@
|_|
/-------------------------------------------------------------------------------------------------------------------------------/
@version 2.1.12
@build 3rd June, 2016
@version 2.1.17
@build 3rd September, 2016
@created 30th April, 2015
@package Component Builder
@subpackage admin.css

View File

@ -9,8 +9,8 @@
|_|
/-------------------------------------------------------------------------------------------------------------------------------/
@version 2.1.12
@build 3rd June, 2016
@version 2.1.17
@build 3rd September, 2016
@created 30th April, 2015
@package Component Builder
@subpackage admin_view.css

View File

@ -9,8 +9,8 @@
|_|
/-------------------------------------------------------------------------------------------------------------------------------/
@version 2.1.12
@build 3rd June, 2016
@version 2.1.17
@build 3rd September, 2016
@created 30th April, 2015
@package Component Builder
@subpackage admin_views.css

View File

@ -9,8 +9,8 @@
|_|
/-------------------------------------------------------------------------------------------------------------------------------/
@version 2.1.12
@build 3rd June, 2016
@version 2.1.17
@build 3rd September, 2016
@created 30th April, 2015
@package Component Builder
@subpackage component.css

View File

@ -9,8 +9,8 @@
|_|
/-------------------------------------------------------------------------------------------------------------------------------/
@version 2.1.12
@build 3rd June, 2016
@version 2.1.17
@build 3rd September, 2016
@created 30th April, 2015
@package Component Builder
@subpackage components.css

View File

@ -9,8 +9,8 @@
|_|
/-------------------------------------------------------------------------------------------------------------------------------/
@version 2.1.12
@build 3rd June, 2016
@version 2.1.17
@build 3rd September, 2016
@created 30th April, 2015
@package Component Builder
@subpackage custom_admin_view.css

View File

@ -9,8 +9,8 @@
|_|
/-------------------------------------------------------------------------------------------------------------------------------/
@version 2.1.12
@build 3rd June, 2016
@version 2.1.17
@build 3rd September, 2016
@created 30th April, 2015
@package Component Builder
@subpackage custom_admin_views.css

View File

@ -9,8 +9,8 @@
|_|
/-------------------------------------------------------------------------------------------------------------------------------/
@version 2.1.12
@build 3rd June, 2016
@version 2.1.17
@build 3rd September, 2016
@created 30th April, 2015
@package Component Builder
@subpackage dashboard.css

View File

@ -9,8 +9,8 @@
|_|
/-------------------------------------------------------------------------------------------------------------------------------/
@version 2.1.12
@build 3rd June, 2016
@version 2.1.17
@build 3rd September, 2016
@created 30th April, 2015
@package Component Builder
@subpackage dynamic_get.css

View File

@ -9,8 +9,8 @@
|_|
/-------------------------------------------------------------------------------------------------------------------------------/
@version 2.1.12
@build 3rd June, 2016
@version 2.1.17
@build 3rd September, 2016
@created 30th April, 2015
@package Component Builder
@subpackage dynamic_gets.css

View File

@ -9,8 +9,8 @@
|_|
/-------------------------------------------------------------------------------------------------------------------------------/
@version 2.1.12
@build 3rd June, 2016
@version 2.1.17
@build 3rd September, 2016
@created 30th April, 2015
@package Component Builder
@subpackage field.css

View File

@ -9,8 +9,8 @@
|_|
/-------------------------------------------------------------------------------------------------------------------------------/
@version 2.1.12
@build 3rd June, 2016
@version 2.1.17
@build 3rd September, 2016
@created 30th April, 2015
@package Component Builder
@subpackage fields.css

View File

@ -9,8 +9,8 @@
|_|
/-------------------------------------------------------------------------------------------------------------------------------/
@version 2.1.12
@build 3rd June, 2016
@version 2.1.17
@build 3rd September, 2016
@created 30th April, 2015
@package Component Builder
@subpackage fieldtype.css

View File

@ -9,8 +9,8 @@
|_|
/-------------------------------------------------------------------------------------------------------------------------------/
@version 2.1.12
@build 3rd June, 2016
@version 2.1.17
@build 3rd September, 2016
@created 30th April, 2015
@package Component Builder
@subpackage fieldtypes.css

View File

@ -9,8 +9,8 @@
|_|
/-------------------------------------------------------------------------------------------------------------------------------/
@version 2.1.12
@build 3rd June, 2016
@version 2.1.17
@build 3rd September, 2016
@created 30th April, 2015
@package Component Builder
@subpackage help_document.css

View File

@ -9,8 +9,8 @@
|_|
/-------------------------------------------------------------------------------------------------------------------------------/
@version 2.1.12
@build 3rd June, 2016
@version 2.1.17
@build 3rd September, 2016
@created 30th April, 2015
@package Component Builder
@subpackage help_documents.css

View File

@ -9,8 +9,8 @@
|_|
/-------------------------------------------------------------------------------------------------------------------------------/
@version 2.1.12
@build 3rd June, 2016
@version 2.1.17
@build 3rd September, 2016
@created 30th April, 2015
@package Component Builder
@subpackage layout.css

View File

@ -9,8 +9,8 @@
|_|
/-------------------------------------------------------------------------------------------------------------------------------/
@version 2.1.12
@build 3rd June, 2016
@version 2.1.17
@build 3rd September, 2016
@created 30th April, 2015
@package Component Builder
@subpackage layouts.css

View File

@ -9,8 +9,8 @@
|_|
/-------------------------------------------------------------------------------------------------------------------------------/
@version 2.1.12
@build 3rd June, 2016
@version 2.1.17
@build 3rd September, 2016
@created 30th April, 2015
@package Component Builder
@subpackage site_view.css

View File

@ -9,8 +9,8 @@
|_|
/-------------------------------------------------------------------------------------------------------------------------------/
@version 2.1.12
@build 3rd June, 2016
@version 2.1.17
@build 3rd September, 2016
@created 30th April, 2015
@package Component Builder
@subpackage site_views.css

View File

@ -9,8 +9,8 @@
|_|
/-------------------------------------------------------------------------------------------------------------------------------/
@version 2.1.12
@build 3rd June, 2016
@version 2.1.17
@build 3rd September, 2016
@created 30th April, 2015
@package Component Builder
@subpackage snippet.css

View File

@ -9,8 +9,8 @@
|_|
/-------------------------------------------------------------------------------------------------------------------------------/
@version 2.1.12
@build 3rd June, 2016
@version 2.1.17
@build 3rd September, 2016
@created 30th April, 2015
@package Component Builder
@subpackage snippets.css

View File

@ -9,8 +9,8 @@
|_|
/-------------------------------------------------------------------------------------------------------------------------------/
@version 2.1.12
@build 3rd June, 2016
@version 2.1.17
@build 3rd September, 2016
@created 30th April, 2015
@package Component Builder
@subpackage template.css

View File

@ -9,8 +9,8 @@
|_|
/-------------------------------------------------------------------------------------------------------------------------------/
@version 2.1.12
@build 3rd June, 2016
@version 2.1.17
@build 3rd September, 2016
@created 30th April, 2015
@package Component Builder
@subpackage templates.css

Binary file not shown.

After

Width:  |  Height:  |  Size: 23 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 126 KiB

View File

@ -102,9 +102,15 @@ abstract class ###Component###Helper
$db = JFactory::getDbo();
// Create a new query object.
$query = $db->getQuery(true);
$query->select($db->quoteName(array($what)));
$query->from($db->quoteName('#__'.$main.'_'.$table));
if (empty($table))
{
$query->from($db->quoteName('#__'.$main));
}
else
{
$query->from($db->quoteName('#__'.$main.'_'.$table));
}
if (is_numeric($where))
{
$query->where($db->quoteName($whereString) . ' '.$operator.' '.(int) $where);
@ -480,7 +486,7 @@ abstract class ###Component###Helper
if (!$asset->check() || !$asset->store())
{
JError::raiseWarning(500, $asset->getError());
JFactory::getApplication()->enqueueMessage($asset->getError(), 'warning');
return false;
}
else

View File

@ -234,13 +234,13 @@ abstract class ###Component###Email
$numReplyTo = count($mailreply);
for ($i=0; $i < $numReplyTo; $i++)
{
$mail->addReplyTo( array($mailreply[$i], $replyname[$i]) );
$mail->addReplyTo($mailreply[$i], $replyname[$i]);
}
}
elseif (!empty($mailreply))
{
$mail->ClearReplyTos();
$mail->addReplyTo( array( $mailreply, $replyname ) );
$mail->addReplyTo($mailreply, $replyname);
}
// check if we can add the DKIM to email
@ -268,6 +268,12 @@ abstract class ###Component###Email
@unlink($tmp);
}
if (method_exists('###Component###Helper','storeMessage'))
{
// store the massage if the method is set
###Component###Helper::storeMessage($sendmail, $recipient, $subject, $body, $textonly, $mode, 'email');
}
return $sendmail;
}
}

View File

@ -171,7 +171,7 @@ abstract class ###Component###Helper
if (!$asset->check() || !$asset->store())
{
JError::raiseWarning(500, $asset->getError());
JFactory::getApplication()->enqueueMessage($asset->getError(), 'warning');
return false;
}
else
@ -276,9 +276,15 @@ abstract class ###Component###Helper
$db = JFactory::getDbo();
// Create a new query object.
$query = $db->getQuery(true);
$query->select($db->quoteName(array($what)));
$query->from($db->quoteName('#__'.$main.'_'.$table));
$query->select($db->quoteName(array($what)));
if (empty($table))
{
$query->from($db->quoteName('#__'.$main));
}
else
{
$query->from($db->quoteName('#__'.$main.'_'.$table));
}
if (is_numeric($where))
{
$query->where($db->quoteName($whereString) . ' '.$operator.' '.(int) $where);

View File

@ -63,9 +63,9 @@ class ###Component###ControllerAjax extends JControllerLegacy
}
else
{
if(array_key_exists('callback',$_GET))
if($callback = $jinput->get('callback', null, 'CMD'))
{
echo $_GET['callback']."(".json_encode(false).");";
echo $callback."(".json_encode(false).");";
}
else
{

View File

@ -63,9 +63,9 @@ class ###Component###ControllerAjax extends JControllerLegacy
}
else
{
if(array_key_exists('callback',$_GET))
if($callback = $jinput->get('callback', null, 'CMD'))
{
echo $_GET['callback']."(".json_encode(false).");";
echo $callback."(".json_encode(false).");";
}
else
{

View File

@ -97,9 +97,10 @@ class ###Component###Model###SView### extends JModelItem
// check if this user has permission to access item
if (!$this->user->authorise('###sview###.access', 'com_###component###'))
{
JError::raiseWarning(500, JText::_('Not authorised!'));
$app = JFactory::getApplication();
$app->enqueueMessage(JText::_('Not authorised!'), 'error');
// redirect away if not a correct (TODO for now we go to default view)
JFactory::getApplication()->redirect('index.php?option=com_###component###');
$app->redirect('index.php?option=com_###component###');
return false;
}
$this->userId = $this->user->get('id');
@ -126,7 +127,7 @@ class ###Component###Model###SView### extends JModelItem
if ($e->getCode() == 404)
{
// Need to go thru the error handler to allow Redirect to work.
JError::raiseError(404, $e->getMessage());
JError::raiseWaring(404, $e->getMessage());
}
else
{

View File

@ -99,9 +99,10 @@ class ###Component###Model###SView### extends JModelItem
// check if this user has permission to access item
if (!$this->user->authorise('site.###sview###.access', 'com_###component###'))
{
JError::raiseWarning(500, JText::_('Not authorised!'));
$app = JFactory::getApplication();
$app->enqueueMessage(JText::_('Not authorised!'), 'error');
// redirect away if not a correct (TODO for now we go to default view)
JFactory::getApplication()->redirect(JRoute::_('index.php?option=com_###component###&view=###SITE_DEFAULT_VIEW###'));
$app->redirect(JRoute::_('index.php?option=com_###component###&view=###SITE_DEFAULT_VIEW###'));
return false;
}
$this->userId = $this->user->get('id');
@ -128,7 +129,7 @@ class ###Component###Model###SView### extends JModelItem
if ($e->getCode() == 404)
{
// Need to go thru the error handler to allow Redirect to work.
JError::raiseError(404, $e->getMessage());
JError::raiseWaring(404, $e->getMessage());
}
else
{

View File

@ -201,7 +201,8 @@ class ###Component###ModelImport extends JModelLegacy
protected function _getPackageFromUpload()
{
// Get the uploaded file information
$input = JFactory::getApplication()->input;
$app = JFactory::getApplication();
$input = $app->input;
// Do not change the filter type 'raw'. We need this to let files containing PHP code to upload. See JInputFiles::get.
$userfile = $input->files->get('import_package', null, 'raw');
@ -209,21 +210,21 @@ class ###Component###ModelImport extends JModelLegacy
// Make sure that file uploads are enabled in php
if (!(bool) ini_get('file_uploads'))
{
JError::raiseWarning('', JText::_('COM_###COMPONENT###_IMPORT_MSG_WARNIMPORTFILE'));
$app->enqueueMessage(JText::_('COM_###COMPONENT###_IMPORT_MSG_WARNIMPORTFILE'), 'warning');
return false;
}
// If there is no uploaded file, we have a problem...
if (!is_array($userfile))
{
JError::raiseWarning('', JText::_('COM_###COMPONENT###_IMPORT_MSG_NO_FILE_SELECTED'));
$app->enqueueMessage(JText::_('COM_###COMPONENT###_IMPORT_MSG_NO_FILE_SELECTED'), 'warning');
return false;
}
// Check if there was a problem uploading the file.
if ($userfile['error'] || $userfile['size'] < 1)
{
JError::raiseWarning('', JText::_('COM_###COMPONENT###_IMPORT_MSG_WARNIMPORTUPLOADERROR'));
$app->enqueueMessage(JText::_('COM_###COMPONENT###_IMPORT_MSG_WARNIMPORTUPLOADERROR'), 'warning');
return false;
}
@ -261,7 +262,8 @@ class ###Component###ModelImport extends JModelLegacy
*/
protected function _getPackageFromFolder()
{
$input = JFactory::getApplication()->input;
$app = JFactory::getApplication();
$input = $app->input;
// Get the path to the package to import
$p_dir = $input->getString('import_directory');
@ -269,7 +271,7 @@ class ###Component###ModelImport extends JModelLegacy
// Did you give us a valid path?
if (!file_exists($p_dir))
{
JError::raiseWarning('', JText::_('COM_###COMPONENT###_IMPORT_MSG_PLEASE_ENTER_A_PACKAGE_DIRECTORY'));
$app->enqueueMessage(JText::_('COM_###COMPONENT###_IMPORT_MSG_PLEASE_ENTER_A_PACKAGE_DIRECTORY'), 'warning');
return false;
}
@ -279,7 +281,7 @@ class ###Component###ModelImport extends JModelLegacy
// Did you give us a valid package?
if (!$type)
{
JError::raiseWarning('', JText::_('COM_###COMPONENT###_IMPORT_MSG_PATH_DOES_NOT_HAVE_A_VALID_PACKAGE'));
$app->enqueueMessage(JText::_('COM_###COMPONENT###_IMPORT_MSG_PATH_DOES_NOT_HAVE_A_VALID_PACKAGE'), 'warning');
}
// check the extention
@ -290,7 +292,7 @@ class ###Component###ModelImport extends JModelLegacy
break;
default:
JError::raiseWarning('', JText::_('COM_###COMPONENT###_IMPORT_MSG_DOES_NOT_HAVE_A_VALID_FILE_TYPE'));
$app->enqueueMessage(JText::_('COM_###COMPONENT###_IMPORT_MSG_DOES_NOT_HAVE_A_VALID_FILE_TYPE'), 'warning');
return false;
break;
}
@ -310,15 +312,16 @@ class ###Component###ModelImport extends JModelLegacy
*/
protected function _getPackageFromUrl()
{
$input = JFactory::getApplication()->input;
$app = JFactory::getApplication();
$input = $app->input;
// Get the URL of the package to import
$url = $input->getString('import_url');
// Did you give us a URL?
if (!$url)
{
JError::raiseWarning('', JText::_('COM_###COMPONENT###_IMPORT_MSG_ENTER_A_URL'));
$app->enqueueMessage(JText::_('COM_###COMPONENT###_IMPORT_MSG_ENTER_A_URL'), 'warning');
return false;
}
@ -328,7 +331,7 @@ class ###Component###ModelImport extends JModelLegacy
// Was the package downloaded?
if (!$p_file)
{
JError::raiseWarning('', JText::_('COM_###COMPONENT###_IMPORT_MSG_INVALID_URL'));
$app->enqueueMessage(JText::_('COM_###COMPONENT###_IMPORT_MSG_INVALID_URL'), 'warning');
return false;
}
@ -349,6 +352,7 @@ class ###Component###ModelImport extends JModelLegacy
*/
protected function check($archivename)
{
$app = JFactory::getApplication();
// Clean the name
$archivename = JPath::clean($archivename);
@ -362,7 +366,7 @@ class ###Component###ModelImport extends JModelLegacy
default:
// Cleanup the import files
$this->remove($archivename);
JError::raiseWarning('', JText::_('COM_###COMPONENT###_IMPORT_MSG_DOES_NOT_HAVE_A_VALID_FILE_TYPE'));
$app->enqueueMessage(JText::_('COM_###COMPONENT###_IMPORT_MSG_DOES_NOT_HAVE_A_VALID_FILE_TYPE'), 'warning');
return false;
break;
}

View File

@ -91,7 +91,8 @@ class ###Component###Model###View### extends JModelLegacy
protected function _getPackageFromUpload()
{
// Get the uploaded file information
$input = JFactory::getApplication()->input;
$app = JFactory::getApplication();
$input = $app->input;
// Do not change the filter type 'raw'. We need this to let files containing PHP code to upload. See JInputFiles::get.
$userfile = $input->files->get('import_package', null, 'raw');
@ -99,21 +100,21 @@ class ###Component###Model###View### extends JModelLegacy
// Make sure that file uploads are enabled in php
if (!(bool) ini_get('file_uploads'))
{
JError::raiseWarning('', JText::_('COM_###COMPONENT###_IMPORT_MSG_WARNIMPORTFILE'));
$app->enqueueMessage(JText::_('COM_###COMPONENT###_IMPORT_MSG_WARNIMPORTFILE'), 'warning');
return false;
}
// If there is no uploaded file, we have a problem...
if (!is_array($userfile))
{
JError::raiseWarning('', JText::_('COM_###COMPONENT###_IMPORT_MSG_NO_FILE_SELECTED'));
$app->enqueueMessage(JText::_('COM_###COMPONENT###_IMPORT_MSG_NO_FILE_SELECTED'), 'warning');
return false;
}
// Check if there was a problem uploading the file.
if ($userfile['error'] || $userfile['size'] < 1)
{
JError::raiseWarning('', JText::_('COM_###COMPONENT###_IMPORT_MSG_WARNIMPORTUPLOADERROR'));
$app->enqueueMessage(JText::_('COM_###COMPONENT###_IMPORT_MSG_WARNIMPORTUPLOADERROR'), 'warning');
return false;
}
@ -151,7 +152,8 @@ class ###Component###Model###View### extends JModelLegacy
*/
protected function _getPackageFromFolder()
{
$input = JFactory::getApplication()->input;
$app = JFactory::getApplication();
$input = $app->input;
// Get the path to the package to import
$p_dir = $input->getString('import_directory');
@ -159,7 +161,7 @@ class ###Component###Model###View### extends JModelLegacy
// Did you give us a valid path?
if (!file_exists($p_dir))
{
JError::raiseWarning('', JText::_('COM_###COMPONENT###_IMPORT_MSG_PLEASE_ENTER_A_PACKAGE_DIRECTORY'));
$app->enqueueMessage(JText::_('COM_###COMPONENT###_IMPORT_MSG_PLEASE_ENTER_A_PACKAGE_DIRECTORY'), 'warning');
return false;
}
@ -169,7 +171,7 @@ class ###Component###Model###View### extends JModelLegacy
// Did you give us a valid package?
if (!$type)
{
JError::raiseWarning('', JText::_('COM_###COMPONENT###_IMPORT_MSG_PATH_DOES_NOT_HAVE_A_VALID_PACKAGE'));
$app->enqueueMessage(JText::_('COM_###COMPONENT###_IMPORT_MSG_PATH_DOES_NOT_HAVE_A_VALID_PACKAGE'), 'warning');
}
// check the extention
@ -180,7 +182,7 @@ class ###Component###Model###View### extends JModelLegacy
break;
default:
JError::raiseWarning('', JText::_('COM_###COMPONENT###_IMPORT_MSG_DOES_NOT_HAVE_A_VALID_FILE_TYPE'));
$app->enqueueMessage(JText::_('COM_###COMPONENT###_IMPORT_MSG_DOES_NOT_HAVE_A_VALID_FILE_TYPE'), 'warning');
return false;
break;
}
@ -200,7 +202,8 @@ class ###Component###Model###View### extends JModelLegacy
*/
protected function _getPackageFromUrl()
{
$input = JFactory::getApplication()->input;
$app = JFactory::getApplication();
$input = $app->input;
// Get the URL of the package to import
$url = $input->getString('import_url');
@ -208,7 +211,7 @@ class ###Component###Model###View### extends JModelLegacy
// Did you give us a URL?
if (!$url)
{
JError::raiseWarning('', JText::_('COM_###COMPONENT###_IMPORT_MSG_ENTER_A_URL'));
$app->enqueueMessage(JText::_('COM_###COMPONENT###_IMPORT_MSG_ENTER_A_URL'), 'warning');
return false;
}
@ -218,7 +221,7 @@ class ###Component###Model###View### extends JModelLegacy
// Was the package downloaded?
if (!$p_file)
{
JError::raiseWarning('', JText::_('COM_###COMPONENT###_IMPORT_MSG_INVALID_URL'));
$app->enqueueMessage(JText::_('COM_###COMPONENT###_IMPORT_MSG_INVALID_URL'), 'warning');
return false;
}
@ -239,6 +242,7 @@ class ###Component###Model###View### extends JModelLegacy
*/
protected function check($archivename)
{
$app = JFactory::getApplication();
// Clean the name
$archivename = JPath::clean($archivename);
@ -252,7 +256,7 @@ class ###Component###Model###View### extends JModelLegacy
default:
// Cleanup the import files
$this->remove($archivename);
JError::raiseWarning('', JText::_('COM_###COMPONENT###_IMPORT_MSG_DOES_NOT_HAVE_A_VALID_FILE_TYPE'));
$app->enqueueMessage(JText::_('COM_###COMPONENT###_IMPORT_MSG_DOES_NOT_HAVE_A_VALID_FILE_TYPE'), 'warning');
return false;
break;
}

View File

@ -95,7 +95,7 @@ class ###Component###Model###Views### extends JModelList
public function getItems()
{###LICENSE_LOCKED_CHECK### ###CHECKINCALL###
// load parent items
$items = parent::getItems();###GET_ITEMS_METHOD_STRING_FIX### ###SELECTIONTRANSLATIONFIX###
$items = parent::getItems();###GET_ITEMS_METHOD_STRING_FIX### ###SELECTIONTRANSLATIONFIX### ###GET_ITEMS_METHOD_AFTER_ALL###
// return items
return $items;

View File

@ -81,9 +81,10 @@ class ###Component###Model###SViews### extends JModelList
// check if this user has permission to access items
if (!$user->authorise('###sviews###.access', 'com_###component###'))
{
JError::raiseWarning(500, JText::_('Not authorised!'));
$app = JFactory::getApplication();
$app->enqueueMessage(JText::_('Not authorised!'), 'error');
// redirect away if not a correct (TODO for now we go to default view)
JFactory::getApplication()->redirect('index.php?option=com_###component###');
$app->redirect('index.php?option=com_###component###');
return false;
}###LICENSE_LOCKED_CHECK### ###CUSTOM_ADMIN_BEFORE_GET_ITEMS###
// load parent items

View File

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

View File

@ -55,7 +55,8 @@ class ###Component###ControllerAjax extends JControllerLegacy
// Check Token!
$token = JSession::getFormToken();
$call_token = $jinput->get('token', 0, 'ALNUM');
if($user->id != 0 && $token == $call_token){
if($user->id != 0 && $token == $call_token)
{
$task = $this->getTask();
switch($task){
case 'fieldRequired':
@ -73,26 +74,37 @@ class ###Component###ControllerAjax extends JControllerLegacy
{
$result = false;
}
if(array_key_exists('callback',$_GET)){
echo $_GET['callback'] . "(".json_encode($result).");";
} else {
if($callback = $jinput->get('callback', null, 'CMD'))
{
echo $callback . "(".json_encode($result).");";
}
else
{
echo "(".json_encode($result).");";
}
}
catch(Exception $e)
catch(Exception $e)
{
if(array_key_exists('callback',$_GET)){
echo $_GET['callback']."(".json_encode($e).");";
} else {
if($callback = $jinput->get('callback', null, 'CMD'))
{
echo $callback."(".json_encode($e).");";
}
else
{
echo "(".json_encode($e).");";
}
}
break;
}
} else {
if(array_key_exists('callback',$_GET)){
echo $_GET['callback']."(".json_encode(false).");";
} else {
}
else
{
if($callback = $jinput->get('callback', null, 'CMD'))
{
echo $callback."(".json_encode(false).");";
}
else
{
echo "(".json_encode(false).");";
}
}

View File

@ -32,7 +32,7 @@ defined('_JEXEC') or die('Restricted access');
// Access check.
if (!JFactory::getUser()->authorise('core.manage', 'com_###component###'))
{
return JError::raiseWarning(404, JText::_('JERROR_ALERTNOAUTHOR'));
return JError::raiseWaring(404, JText::_('JERROR_ALERTNOAUTHOR'));
};
// Load cms libraries

View File

@ -35,20 +35,9 @@ JHtml::_('behavior.formvalidation');
JHtml::_('formbehavior.chosen', 'select');
JHtml::_('behavior.keepalive');
?>
<?php if ($this->canDo->get('###sview###.access')): ?>
<script type="text/javascript">
Joomla.submitbutton = function(task) {
if (task == '###sview###.back') {
parent.history.back();
return false;
} else {
var form = document.getElementById('adminForm');
form.task.value = task;
form.submit();
}
}
</script>
<form action="<?php echo JRoute::_('index.php?option=com_costbenefitprojection&view=###sview###&id='.$this->item->id); ?>" method="post" name="adminForm" id="adminForm" class="form-validate" enctype="multipart/form-data">
<?php if ($this->canDo->get('###sview###.access')): ?>###CUSTOM_ADMIN_SUBMITBUTTON_SCRIPT###
<?php $urlId = (isset($this->item->id)) ? '&id='. (int) $this->item->id : ''; ?>
<form action="<?php echo JRoute::_('index.php?option=com_###component###&view=###sview###'.$urlId); ?>" method="post" name="adminForm" id="adminForm" class="form-validate" enctype="multipart/form-data">
<input type="hidden" name="task" value="" />
<?php echo JHtml::_('form.token'); ?>
</form>###CUSTOM_ADMIN_BODY###

View File

@ -32,6 +32,7 @@ defined('_JEXEC') or die('Restricted access');###LICENSE_LOCKED_DEFINED###
JHtml::_('jquery.framework');
JHtml::_('bootstrap.tooltip');
JHtml::_('script', 'system/core.js', false, true);
JHtml::_('behavior.keepalive');
?>
<script type="text/javascript">
<?php if ($this->hasPackage && ###Component###Helper::checkArray($this->headerList)) : ?>

View File

@ -32,4 +32,5 @@ defined('_JEXEC') or die('Restricted access');###LICENSE_LOCKED_DEFINED###
JHtml::_('jquery.framework');
JHtml::_('bootstrap.tooltip');
JHtml::_('script', 'system/core.js', false, true);
JHtml::_('behavior.keepalive');
?>###IMPORT_DEFAULT_VIEW_CUSTOM###

View File

@ -35,19 +35,7 @@ JHtml::_('behavior.formvalidation');
JHtml::_('formbehavior.chosen', 'select');
JHtml::_('behavior.keepalive');
?>
<?php if ($this->canDo->get('###sview###.access')): ?>
<script type="text/javascript">
Joomla.submitbutton = function(task) {
if (task == '###sview###.back') {
parent.history.back();
return false;
} else {
var form = document.getElementById('adminForm');
form.task.value = task;
form.submit();
}
}
</script>
<?php if ($this->canDo->get('###sview###.access')): ?>###CUSTOM_ADMIN_SUBMITBUTTON_SCRIPT###
<form action="<?php echo JRoute::_('index.php?option=com_###component###&view=###sviews###'); ?>" method="post" name="adminForm" id="adminForm" class="form-validate" enctype="multipart/form-data">
<input type="hidden" name="task" value="" />###HIDDEN_INPUT_VALUES###
<?php echo JHtml::_('form.token'); ?>

View File

@ -10,8 +10,8 @@
|_|
/-------------------------------------------------------------------------------------------------------------------------------/
@version 2.1.12
@build 3rd June, 2016
@version 2.1.17
@build 3rd September, 2016
@created 30th April, 2015
@package Component Builder
@subpackage componentbuilder.php
@ -30,7 +30,7 @@ defined('_JEXEC') or die('Restricted access');
// Access check.
if (!JFactory::getUser()->authorise('core.manage', 'com_componentbuilder'))
{
return JError::raiseWarning(404, JText::_('JERROR_ALERTNOAUTHOR'));
return JError::raiseWaring(404, JText::_('JERROR_ALERTNOAUTHOR'));
};
// Load cms libraries

View File

@ -10,8 +10,8 @@
|_|
/-------------------------------------------------------------------------------------------------------------------------------/
@version 2.1.12
@build 3rd June, 2016
@version 2.1.17
@build 3rd September, 2016
@created 30th April, 2015
@package Component Builder
@subpackage controller.php

View File

@ -10,8 +10,8 @@
|_|
/-------------------------------------------------------------------------------------------------------------------------------/
@version 2.1.12
@build 3rd June, 2016
@version 2.1.17
@build 3rd September, 2016
@created 30th April, 2015
@package Component Builder
@subpackage admin_view.php

View File

@ -10,8 +10,8 @@
|_|
/-------------------------------------------------------------------------------------------------------------------------------/
@version 2.1.12
@build 3rd June, 2016
@version 2.1.17
@build 3rd September, 2016
@created 30th April, 2015
@package Component Builder
@subpackage admin_views.php

View File

@ -10,8 +10,8 @@
|_|
/-------------------------------------------------------------------------------------------------------------------------------/
@version 2.1.12
@build 3rd June, 2016
@version 2.1.17
@build 3rd September, 2016
@created 30th April, 2015
@package Component Builder
@subpackage ajax.json.php
@ -81,9 +81,9 @@ class ComponentbuilderControllerAjax extends JControllerLegacy
{
$result = false;
}
if(array_key_exists('callback',$_GET))
if($callback = $jinput->get('callback', null, 'CMD'))
{
echo $_GET['callback'] . "(".json_encode($result).");";
echo $callback . "(".json_encode($result).");";
}
elseif($returnRaw)
{
@ -96,9 +96,9 @@ class ComponentbuilderControllerAjax extends JControllerLegacy
}
catch(Exception $e)
{
if(array_key_exists('callback',$_GET))
if($callback = $jinput->get('callback', null, 'CMD'))
{
echo $_GET['callback']."(".json_encode($e).");";
echo $callback."(".json_encode($e).");";
}
else
{
@ -119,9 +119,9 @@ class ComponentbuilderControllerAjax extends JControllerLegacy
{
$result = false;
}
if(array_key_exists('callback',$_GET))
if($callback = $jinput->get('callback', null, 'CMD'))
{
echo $_GET['callback'] . "(".json_encode($result).");";
echo $callback . "(".json_encode($result).");";
}
elseif($returnRaw)
{
@ -134,9 +134,9 @@ class ComponentbuilderControllerAjax extends JControllerLegacy
}
catch(Exception $e)
{
if(array_key_exists('callback',$_GET))
if($callback = $jinput->get('callback', null, 'CMD'))
{
echo $_GET['callback']."(".json_encode($e).");";
echo $callback."(".json_encode($e).");";
}
else
{
@ -157,9 +157,9 @@ class ComponentbuilderControllerAjax extends JControllerLegacy
{
$result = false;
}
if(array_key_exists('callback',$_GET))
if($callback = $jinput->get('callback', null, 'CMD'))
{
echo $_GET['callback'] . "(".json_encode($result).");";
echo $callback . "(".json_encode($result).");";
}
elseif($returnRaw)
{
@ -172,9 +172,9 @@ class ComponentbuilderControllerAjax extends JControllerLegacy
}
catch(Exception $e)
{
if(array_key_exists('callback',$_GET))
if($callback = $jinput->get('callback', null, 'CMD'))
{
echo $_GET['callback']."(".json_encode($e).");";
echo $callback."(".json_encode($e).");";
}
else
{
@ -195,9 +195,9 @@ class ComponentbuilderControllerAjax extends JControllerLegacy
{
$result = false;
}
if(array_key_exists('callback',$_GET))
if($callback = $jinput->get('callback', null, 'CMD'))
{
echo $_GET['callback'] . "(".json_encode($result).");";
echo $callback . "(".json_encode($result).");";
}
elseif($returnRaw)
{
@ -210,9 +210,9 @@ class ComponentbuilderControllerAjax extends JControllerLegacy
}
catch(Exception $e)
{
if(array_key_exists('callback',$_GET))
if($callback = $jinput->get('callback', null, 'CMD'))
{
echo $_GET['callback']."(".json_encode($e).");";
echo $callback."(".json_encode($e).");";
}
else
{
@ -233,9 +233,9 @@ class ComponentbuilderControllerAjax extends JControllerLegacy
{
$result = false;
}
if(array_key_exists('callback',$_GET))
if($callback = $jinput->get('callback', null, 'CMD'))
{
echo $_GET['callback'] . "(".json_encode($result).");";
echo $callback . "(".json_encode($result).");";
}
elseif($returnRaw)
{
@ -248,9 +248,9 @@ class ComponentbuilderControllerAjax extends JControllerLegacy
}
catch(Exception $e)
{
if(array_key_exists('callback',$_GET))
if($callback = $jinput->get('callback', null, 'CMD'))
{
echo $_GET['callback']."(".json_encode($e).");";
echo $callback."(".json_encode($e).");";
}
else
{
@ -271,9 +271,9 @@ class ComponentbuilderControllerAjax extends JControllerLegacy
{
$result = false;
}
if(array_key_exists('callback',$_GET))
if($callback = $jinput->get('callback', null, 'CMD'))
{
echo $_GET['callback'] . "(".json_encode($result).");";
echo $callback . "(".json_encode($result).");";
}
elseif($returnRaw)
{
@ -286,9 +286,9 @@ class ComponentbuilderControllerAjax extends JControllerLegacy
}
catch(Exception $e)
{
if(array_key_exists('callback',$_GET))
if($callback = $jinput->get('callback', null, 'CMD'))
{
echo $_GET['callback']."(".json_encode($e).");";
echo $callback."(".json_encode($e).");";
}
else
{
@ -310,9 +310,9 @@ class ComponentbuilderControllerAjax extends JControllerLegacy
{
$result = false;
}
if(array_key_exists('callback',$_GET))
if($callback = $jinput->get('callback', null, 'CMD'))
{
echo $_GET['callback'] . "(".json_encode($result).");";
echo $callback . "(".json_encode($result).");";
}
elseif($returnRaw)
{
@ -325,9 +325,9 @@ class ComponentbuilderControllerAjax extends JControllerLegacy
}
catch(Exception $e)
{
if(array_key_exists('callback',$_GET))
if($callback = $jinput->get('callback', null, 'CMD'))
{
echo $_GET['callback']."(".json_encode($e).");";
echo $callback."(".json_encode($e).");";
}
else
{
@ -348,9 +348,9 @@ class ComponentbuilderControllerAjax extends JControllerLegacy
{
$result = false;
}
if(array_key_exists('callback',$_GET))
if($callback = $jinput->get('callback', null, 'CMD'))
{
echo $_GET['callback'] . "(".json_encode($result).");";
echo $callback . "(".json_encode($result).");";
}
elseif($returnRaw)
{
@ -363,9 +363,9 @@ class ComponentbuilderControllerAjax extends JControllerLegacy
}
catch(Exception $e)
{
if(array_key_exists('callback',$_GET))
if($callback = $jinput->get('callback', null, 'CMD'))
{
echo $_GET['callback']."(".json_encode($e).");";
echo $callback."(".json_encode($e).");";
}
else
{
@ -388,9 +388,9 @@ class ComponentbuilderControllerAjax extends JControllerLegacy
{
$result = false;
}
if(array_key_exists('callback',$_GET))
if($callback = $jinput->get('callback', null, 'CMD'))
{
echo $_GET['callback'] . "(".json_encode($result).");";
echo $callback . "(".json_encode($result).");";
}
elseif($returnRaw)
{
@ -403,9 +403,9 @@ class ComponentbuilderControllerAjax extends JControllerLegacy
}
catch(Exception $e)
{
if(array_key_exists('callback',$_GET))
if($callback = $jinput->get('callback', null, 'CMD'))
{
echo $_GET['callback']."(".json_encode($e).");";
echo $callback."(".json_encode($e).");";
}
else
{
@ -428,9 +428,9 @@ class ComponentbuilderControllerAjax extends JControllerLegacy
{
$result = false;
}
if(array_key_exists('callback',$_GET))
if($callback = $jinput->get('callback', null, 'CMD'))
{
echo $_GET['callback'] . "(".json_encode($result).");";
echo $callback . "(".json_encode($result).");";
}
elseif($returnRaw)
{
@ -443,9 +443,9 @@ class ComponentbuilderControllerAjax extends JControllerLegacy
}
catch(Exception $e)
{
if(array_key_exists('callback',$_GET))
if($callback = $jinput->get('callback', null, 'CMD'))
{
echo $_GET['callback']."(".json_encode($e).");";
echo $callback."(".json_encode($e).");";
}
else
{
@ -466,9 +466,9 @@ class ComponentbuilderControllerAjax extends JControllerLegacy
{
$result = false;
}
if(array_key_exists('callback',$_GET))
if($callback = $jinput->get('callback', null, 'CMD'))
{
echo $_GET['callback'] . "(".json_encode($result).");";
echo $callback . "(".json_encode($result).");";
}
elseif($returnRaw)
{
@ -481,9 +481,9 @@ class ComponentbuilderControllerAjax extends JControllerLegacy
}
catch(Exception $e)
{
if(array_key_exists('callback',$_GET))
if($callback = $jinput->get('callback', null, 'CMD'))
{
echo $_GET['callback']."(".json_encode($e).");";
echo $callback."(".json_encode($e).");";
}
else
{
@ -495,9 +495,9 @@ class ComponentbuilderControllerAjax extends JControllerLegacy
}
else
{
if(array_key_exists('callback',$_GET))
if($callback = $jinput->get('callback', null, 'CMD'))
{
echo $_GET['callback']."(".json_encode(false).");";
echo $callback."(".json_encode(false).");";
}
else
{

View File

@ -10,8 +10,8 @@
|_|
/-------------------------------------------------------------------------------------------------------------------------------/
@version 2.1.12
@build 3rd June, 2016
@version 2.1.17
@build 3rd September, 2016
@created 30th April, 2015
@package Component Builder
@subpackage compiler.php

View File

@ -10,8 +10,8 @@
|_|
/-------------------------------------------------------------------------------------------------------------------------------/
@version 2.1.12
@build 3rd June, 2016
@version 2.1.17
@build 3rd September, 2016
@created 30th April, 2015
@package Component Builder
@subpackage component.php

View File

@ -10,8 +10,8 @@
|_|
/-------------------------------------------------------------------------------------------------------------------------------/
@version 2.1.12
@build 3rd June, 2016
@version 2.1.17
@build 3rd September, 2016
@created 30th April, 2015
@package Component Builder
@subpackage componentbuilder.php

View File

@ -10,8 +10,8 @@
|_|
/-------------------------------------------------------------------------------------------------------------------------------/
@version 2.1.12
@build 3rd June, 2016
@version 2.1.17
@build 3rd September, 2016
@created 30th April, 2015
@package Component Builder
@subpackage components.php

View File

@ -10,8 +10,8 @@
|_|
/-------------------------------------------------------------------------------------------------------------------------------/
@version 2.1.12
@build 3rd June, 2016
@version 2.1.17
@build 3rd September, 2016
@created 30th April, 2015
@package Component Builder
@subpackage custom_admin_view.php

View File

@ -10,8 +10,8 @@
|_|
/-------------------------------------------------------------------------------------------------------------------------------/
@version 2.1.12
@build 3rd June, 2016
@version 2.1.17
@build 3rd September, 2016
@created 30th April, 2015
@package Component Builder
@subpackage custom_admin_views.php

View File

@ -10,8 +10,8 @@
|_|
/-------------------------------------------------------------------------------------------------------------------------------/
@version 2.1.12
@build 3rd June, 2016
@version 2.1.17
@build 3rd September, 2016
@created 30th April, 2015
@package Component Builder
@subpackage dynamic_get.php

View File

@ -10,8 +10,8 @@
|_|
/-------------------------------------------------------------------------------------------------------------------------------/
@version 2.1.12
@build 3rd June, 2016
@version 2.1.17
@build 3rd September, 2016
@created 30th April, 2015
@package Component Builder
@subpackage dynamic_gets.php

View File

@ -10,8 +10,8 @@
|_|
/-------------------------------------------------------------------------------------------------------------------------------/
@version 2.1.12
@build 3rd June, 2016
@version 2.1.17
@build 3rd September, 2016
@created 30th April, 2015
@package Component Builder
@subpackage field.php

View File

@ -10,8 +10,8 @@
|_|
/-------------------------------------------------------------------------------------------------------------------------------/
@version 2.1.12
@build 3rd June, 2016
@version 2.1.17
@build 3rd September, 2016
@created 30th April, 2015
@package Component Builder
@subpackage fields.php

View File

@ -10,8 +10,8 @@
|_|
/-------------------------------------------------------------------------------------------------------------------------------/
@version 2.1.12
@build 3rd June, 2016
@version 2.1.17
@build 3rd September, 2016
@created 30th April, 2015
@package Component Builder
@subpackage fieldtype.php

View File

@ -10,8 +10,8 @@
|_|
/-------------------------------------------------------------------------------------------------------------------------------/
@version 2.1.12
@build 3rd June, 2016
@version 2.1.17
@build 3rd September, 2016
@created 30th April, 2015
@package Component Builder
@subpackage fieldtypes.php

View File

@ -10,8 +10,8 @@
|_|
/-------------------------------------------------------------------------------------------------------------------------------/
@version 2.1.12
@build 3rd June, 2016
@version 2.1.17
@build 3rd September, 2016
@created 30th April, 2015
@package Component Builder
@subpackage help.php

View File

@ -10,8 +10,8 @@
|_|
/-------------------------------------------------------------------------------------------------------------------------------/
@version 2.1.12
@build 3rd June, 2016
@version 2.1.17
@build 3rd September, 2016
@created 30th April, 2015
@package Component Builder
@subpackage help_document.php

View File

@ -10,8 +10,8 @@
|_|
/-------------------------------------------------------------------------------------------------------------------------------/
@version 2.1.12
@build 3rd June, 2016
@version 2.1.17
@build 3rd September, 2016
@created 30th April, 2015
@package Component Builder
@subpackage help_documents.php

View File

@ -10,8 +10,8 @@
|_|
/-------------------------------------------------------------------------------------------------------------------------------/
@version 2.1.12
@build 3rd June, 2016
@version 2.1.17
@build 3rd September, 2016
@created 30th April, 2015
@package Component Builder
@subpackage import.php

View File

@ -10,8 +10,8 @@
|_|
/-------------------------------------------------------------------------------------------------------------------------------/
@version 2.1.12
@build 3rd June, 2016
@version 2.1.17
@build 3rd September, 2016
@created 30th April, 2015
@package Component Builder
@subpackage layout.php

View File

@ -10,8 +10,8 @@
|_|
/-------------------------------------------------------------------------------------------------------------------------------/
@version 2.1.12
@build 3rd June, 2016
@version 2.1.17
@build 3rd September, 2016
@created 30th April, 2015
@package Component Builder
@subpackage layouts.php

View File

@ -10,8 +10,8 @@
|_|
/-------------------------------------------------------------------------------------------------------------------------------/
@version 2.1.12
@build 3rd June, 2016
@version 2.1.17
@build 3rd September, 2016
@created 30th April, 2015
@package Component Builder
@subpackage site_view.php

View File

@ -10,8 +10,8 @@
|_|
/-------------------------------------------------------------------------------------------------------------------------------/
@version 2.1.12
@build 3rd June, 2016
@version 2.1.17
@build 3rd September, 2016
@created 30th April, 2015
@package Component Builder
@subpackage site_views.php

View File

@ -10,8 +10,8 @@
|_|
/-------------------------------------------------------------------------------------------------------------------------------/
@version 2.1.12
@build 3rd June, 2016
@version 2.1.17
@build 3rd September, 2016
@created 30th April, 2015
@package Component Builder
@subpackage snippet.php

View File

@ -10,8 +10,8 @@
|_|
/-------------------------------------------------------------------------------------------------------------------------------/
@version 2.1.12
@build 3rd June, 2016
@version 2.1.17
@build 3rd September, 2016
@created 30th April, 2015
@package Component Builder
@subpackage snippets.php

View File

@ -10,8 +10,8 @@
|_|
/-------------------------------------------------------------------------------------------------------------------------------/
@version 2.1.12
@build 3rd June, 2016
@version 2.1.17
@build 3rd September, 2016
@created 30th April, 2015
@package Component Builder
@subpackage template.php

View File

@ -10,8 +10,8 @@
|_|
/-------------------------------------------------------------------------------------------------------------------------------/
@version 2.1.12
@build 3rd June, 2016
@version 2.1.17
@build 3rd September, 2016
@created 30th April, 2015
@package Component Builder
@subpackage templates.php

View File

@ -82,6 +82,23 @@ class Compiler extends Infusion
}
return false;
}
/**
* Set the line number in comments
*
* @param int $nr The line number
*
* @return void
*
*/
private function setLine($nr)
{
if ($this->loadLineNr)
{
return ' [Compiler '.$nr.']';
}
return '';
}
protected function updateFiles()
{

View File

@ -332,6 +332,23 @@ class Get
return false;
}
/**
* Set the line number in comments
*
* @param int $nr The line number
*
* @return void
*
*/
private function setLine($nr)
{
if ($this->loadLineNr)
{
return ' [Get '.$nr.']';
}
return '';
}
/**
* get all Component Data
*
@ -1011,90 +1028,52 @@ class Get
// setup linked views to global data sets
$this->linkedAdminViews[$name_single] = $linked_views_sorted;
unset($linked_views_sorted);
// add_javascript_view_file
if ($view->add_javascript_view_file == 1)
{
$view->javascript_view_file = base64_decode($view->javascript_view_file);
$this->customScriptBuilder['view_file'][$name_single] = $view->javascript_view_file;
if (strpos($view->javascript_view_file,"token") !== false && strpos($view->javascript_view_file,"task=ajax") !== false)
{
if (!$this->customScriptBuilder['token'][$name_single])
{
$this->customScriptBuilder['token'][$name_single] = true;
}
}
unset($view->javascript_view_file);
}
// add_javascript_view_footer
if ($view->add_javascript_view_footer == 1)
{
$view->javascript_view_footer = base64_decode($view->javascript_view_footer);
if (!isset($this->customScriptBuilder['view_footer'][$name_single]))
{
$this->customScriptBuilder['view_footer'][$name_single] = '';
}
$this->customScriptBuilder['view_footer'][$name_single] .= $view->javascript_view_footer;
if (strpos($view->javascript_view_footer,"token") !== false && strpos($view->javascript_view_footer,"task=ajax") !== false)
{
if (!$this->customScriptBuilder['token'][$name_single])
{
$this->customScriptBuilder['token'][$name_single] = true;
}
}
unset($view->javascript_view_footer);
}
// add_javascript_view_file
if ($view->add_javascript_views_file == 1)
{
$view->javascript_views_file = base64_decode($view->javascript_views_file);
$this->customScriptBuilder['views_file'][$name_list] = $view->javascript_views_file;
if (strpos($view->javascript_views_file,"token") !== false && strpos($view->javascript_views_file,"task=ajax") !== false)
{
if (!$this->customScriptBuilder['token'][$name_list])
{
$this->customScriptBuilder['token'][$name_list] = true;
}
}
unset($view->javascript_views_file);
}
// add_javascript_views_footer
if ($view->add_javascript_views_footer == 1)
{
$view->javascript_views_footer = base64_decode($view->javascript_views_footer);
$this->customScriptBuilder['views_footer'][$name_list] .= $view->javascript_views_footer;
if (strpos($view->javascript_views_footer,"token") !== false && strpos($view->javascript_views_footer,"task=ajax") !== false)
{
if (!$this->customScriptBuilder['token'][$name_list])
{
$this->customScriptBuilder['token'][$name_list] = true;
}
}
unset($view->javascript_views_footer);
}
// add_css_view
if ($view->add_css_view == 1)
{
if (!isset($this->customScriptBuilder['css_view'][$name_single]))
{
$this->customScriptBuilder['css_view'][$name_single] = '';
}
$this->customScriptBuilder['css_view'][$name_single] .= base64_decode($view->css_view);
unset($view->css_view);
}
// add_css_views
if ($view->add_css_views == 1)
{
if (!isset($this->customScriptBuilder['css_views'][$name_single]))
{
$this->customScriptBuilder['css_views'][$name_single] = '';
}
$this->customScriptBuilder['css_views'][$name_list] .= base64_decode($view->css_views);
unset($view->css_views);
}
// set the lang target
$this->lang = 'admin';
$addArray = array('php_getitem','php_save','php_postsavehook','php_getitems','php_getlistquery','php_allowedit','php_before_delete','php_after_delete','php_batchcopy','php_batchmove','php_document');
foreach ($addArray as $scripter)
// add_javascript
$addArrayJ = array('javascript_view_file','javascript_view_footer','javascript_views_file','javascript_views_footer');
foreach ($addArrayJ as $scripter)
{
if (isset($view->{'add_'.$scripter}) && $view->{'add_'.$scripter} == 1)
{
$view->$scripter = $this->setCustomContentLang(base64_decode($view->$scripter));
$scripter_target = str_replace('javascript_', '', $scripter);
if (!isset($this->customScriptBuilder[$scripter_target][$name_single]))
{
if (!isset($this->customScriptBuilder[$scripter_target]))
{
$this->customScriptBuilder[$scripter_target] = array();
}
$this->customScriptBuilder[$scripter_target][$name_single] = '';
}
$this->customScriptBuilder[$scripter_target][$name_single] .= $view->$scripter;
if (strpos($view->$scripter,"token") !== false && strpos($view->$scripter,"task=ajax") !== false)
{
if (!$this->customScriptBuilder['token'][$name_single])
{
$this->customScriptBuilder['token'][$name_single] = true;
}
}
unset($view->$scripter);
}
}
// add_css
$addArrayC = array('css_view', 'css_views');
foreach ($addArrayC as $scripter)
{
if (isset($view->{'add_'.$scripter}) && $view->{'add_'.$scripter} == 1)
{
if (!isset($this->customScriptBuilder[$scripter][$name_single]))
{
$this->customScriptBuilder[$scripter][$name_single] = '';
}
$this->customScriptBuilder[$scripter][$name_single] .= base64_decode($view->$scripter);
unset($view->$scripter);
}
}
// add_php
$addArrayP = array('php_getitem','php_save','php_postsavehook','php_getitems','php_getitems_after_all','php_getlistquery','php_allowedit','php_before_delete','php_after_delete','php_batchcopy','php_batchmove','php_document');
foreach ($addArrayP as $scripter)
{
if (isset($view->{'add_'.$scripter}) && $view->{'add_'.$scripter} == 1)
{
@ -1394,125 +1373,132 @@ class Get
// Reset the query using our newly populated query object.
$db->setQuery($query);
// Load the results as a list of stdClass objects (see later for more options on retrieving data).
$field = $db->loadObject();
// adding a fix for the changed name of type to fieldtype
$field->type = $field->fieldtype;
// load the values form params
$field->xml = json_decode($field->xml);
// load the type values form type params
$properties = json_decode($field->type_properties,true);
unset($field->type_properties);
if (ComponentbuilderHelper::checkArray($properties))
$db->execute();
if ($db->getNumRows())
{
foreach ($properties as $option => $values)
// Load the results as a list of stdClass objects (see later for more options on retrieving data).
$field = $db->loadObject();
// adding a fix for the changed name of type to fieldtype
$field->type = $field->fieldtype;
// load the values form params
$field->xml = json_decode($field->xml);
// load the type values form type params
$properties = json_decode($field->type_properties,true);
unset($field->type_properties);
if (ComponentbuilderHelper::checkArray($properties))
{
foreach ($values as $nr => $value)
foreach ($properties as $option => $values)
{
$field->properties[$nr][$option] = $value;
}
}
}
// check if we have advanced encryption
if (4 == $field->store && (!isset($this->advancedEncryption) || !$this->advancedEncryption))
{
$this->advancedEncryption = true;
}
// check if we have basic encryption
elseif (3 == $field->store && (!isset($this->basicEncryption) || !$this->basicEncryption))
{
$this->basicEncryption = true;
}
// check if we should load scripts for single view
if (ComponentbuilderHelper::checkString($name_single) && !isset($this->customFieldScript[$name_single][$id]))
{
// add_javascript_view_footer
if ($field->add_javascript_view_footer == 1)
{
if(!isset($this->customScriptBuilder['view_footer']))
{
$this->customScriptBuilder['view_footer'] = array();
}
if (!isset($this->customScriptBuilder['view_footer'][$name_single]))
{
$this->customScriptBuilder['view_footer'][$name_single] = '';
}
$this->customScriptBuilder['view_footer'][$name_single] .= "\n".$this->setCustomContentLang(base64_decode($field->javascript_view_footer));
if (strpos($field->javascript_view_footer,"token") !== false && strpos($field->javascript_view_footer,"task=ajax") !== false)
{
if (!isset($this->customScriptBuilder['token'][$name_single]) || !$this->customScriptBuilder['token'][$name_single])
foreach ($values as $nr => $value)
{
if(!isset($this->customScriptBuilder['token']))
{
$this->customScriptBuilder['token'] = array();
}
$this->customScriptBuilder['token'][$name_single] = true;
$field->properties[$nr][$option] = $value;
}
}
unset($field->javascript_view_footer);
}
// check if we have advanced encryption
if (4 == $field->store && (!isset($this->advancedEncryption) || !$this->advancedEncryption))
{
$this->advancedEncryption = true;
}
// check if we have basic encryption
elseif (3 == $field->store && (!isset($this->basicEncryption) || !$this->basicEncryption))
{
$this->basicEncryption = true;
}
// add_css_view
if ($field->add_css_view == 1)
// check if we should load scripts for single view
if (ComponentbuilderHelper::checkString($name_single) && !isset($this->customFieldScript[$name_single][$id]))
{
if (!isset($this->customScriptBuilder['css_view'][$name_single]))
// add_javascript_view_footer
if ($field->add_javascript_view_footer == 1)
{
$this->customScriptBuilder['css_view'][$name_single] = '';
if (!isset($this->customScriptBuilder['view_footer'][$name_single]))
{
if(!isset($this->customScriptBuilder['view_footer']))
{
$this->customScriptBuilder['view_footer'] = array();
}
$this->customScriptBuilder['view_footer'][$name_single] = '';
}
$this->customScriptBuilder['view_footer'][$name_single] .= "\n".$this->setCustomContentLang(base64_decode($field->javascript_view_footer));
if (strpos($field->javascript_view_footer,"token") !== false && strpos($field->javascript_view_footer,"task=ajax") !== false)
{
if (!isset($this->customScriptBuilder['token'][$name_single]) || !$this->customScriptBuilder['token'][$name_single])
{
if(!isset($this->customScriptBuilder['token']))
{
$this->customScriptBuilder['token'] = array();
}
$this->customScriptBuilder['token'][$name_single] = true;
}
}
unset($field->javascript_view_footer);
}
$this->customScriptBuilder['css_view'][$name_single] .= "\n".base64_decode($field->css_view);
// add_css_view
if ($field->add_css_view == 1)
{
if (!isset($this->customScriptBuilder['css_view'][$name_single]))
{
$this->customScriptBuilder['css_view'][$name_single] = '';
}
$this->customScriptBuilder['css_view'][$name_single] .= "\n".base64_decode($field->css_view);
unset($field->css_view);
}
// add this only once to view.
$this->customFieldScript[$name_single][$id] = true;
}
else
{
// unset if not needed
unset($field->javascript_view_footer);
unset($field->css_view);
}
// add this only once to view.
$this->customFieldScript[$name_single][$id] = true;
}
else
{
// unset if not needed
unset($field->javascript_view_footer);
unset($field->css_view);
}
// check if we should load scripts for list views
if (ComponentbuilderHelper::checkString($name_list))
{
// add_javascript_views_footer
if ($field->add_javascript_views_footer == 1)
// check if we should load scripts for list views
if (ComponentbuilderHelper::checkString($name_list))
{
$this->customScriptBuilder['views_footer'][$name_list] .= $this->setCustomContentLang(base64_decode($field->javascript_views_footer));
if (strpos($field->javascript_views_footer,"token") !== false && strpos($field->javascript_views_footer,"task=ajax") !== false)
// add_javascript_views_footer
if ($field->add_javascript_views_footer == 1)
{
if (!$this->customScriptBuilder['token'][$name_list])
$this->customScriptBuilder['views_footer'][$name_list] .= $this->setCustomContentLang(base64_decode($field->javascript_views_footer));
if (strpos($field->javascript_views_footer,"token") !== false && strpos($field->javascript_views_footer,"task=ajax") !== false)
{
$this->customScriptBuilder['token'][$name_list] = true;
if (!$this->customScriptBuilder['token'][$name_list])
{
$this->customScriptBuilder['token'][$name_list] = true;
}
}
unset($field->javascript_views_footer);
}
unset($field->javascript_views_footer);
}
// add_css_views
if ($field->add_css_views == 1)
{
if (!isset($this->customScriptBuilder['css_views'][$name_list]))
// add_css_views
if ($field->add_css_views == 1)
{
$this->customScriptBuilder['css_views'][$name_list] = '';
if (!isset($this->customScriptBuilder['css_views'][$name_list]))
{
$this->customScriptBuilder['css_views'][$name_list] = '';
}
$this->customScriptBuilder['css_views'][$name_list] .= base64_decode($field->css_views);
unset($field->css_views);
}
$this->customScriptBuilder['css_views'][$name_list] .= base64_decode($field->css_views);
unset($field->css_views);
}
else
{
// unset if not needed
unset($field->javascript_views_footer);
unset($field->css_views);
}
$this->_fieldData[$id] = $field;
}
else
{
// unset if not needed
unset($field->javascript_views_footer);
unset($field->css_views);
return false;
}
$this->_fieldData[$id] = $field;
}
// return the found field data
return $this->_fieldData[$id];

View File

@ -189,6 +189,23 @@ class Structure extends Get
return false;
}
/**
* Set the line number in comments
*
* @param int $nr The line number
*
* @return void
*
*/
private function setLine($nr)
{
if ($this->loadLineNr)
{
return ' [Structure '.$nr.']';
}
return '';
}
/**
* Build the Initial Folders
*

View File

@ -334,6 +334,23 @@ class Fields extends Structure
* @var array
*/
public $movedPublishingFields = array();
/**
* Set the line number in comments
*
* @param int $nr The line number
*
* @return void
*
*/
private function setLine($nr)
{
if ($this->loadLineNr)
{
return ' [Fields '.$nr.']';
}
return '';
}
/**
* set the Field set of a view
@ -655,100 +672,106 @@ class Fields extends Structure
*/
public function setDynamicField(&$field, &$view, &$viewType, &$langView, &$viewName, &$listViewName, &$spacerCounter, &$placeholders, &$dbkey, $build)
{
$name = ComponentbuilderHelper::safeString($field['settings']->name);
$typeName = ComponentbuilderHelper::safeString($field['settings']->type_name);
$multiple = false;
$langLabel = '';
$taber = '';
$fieldSet = '';
// set field attributes
$fieldAttributes = $this->setFieldAttributes($field, $viewType, $name, $typeName, $multiple, $langLabel, $langView, $spacerCounter, $listViewName, $viewName, $placeholders);
// check if values were set
if (ComponentbuilderHelper::checkArray($fieldAttributes))
if (isset($field['settings']) && ComponentbuilderHelper::checkObject($field['settings']))
{
// set the array of field names
$this->setFieldsNames($viewName,$fieldAttributes['name']);
if ($this->defaultField($typeName, 'option'))
// reset some values
$name = ComponentbuilderHelper::safeString($field['settings']->name);
$typeName = ComponentbuilderHelper::safeString($field['settings']->type_name);
$multiple = false;
$langLabel = '';
$taber = '';
$fieldSet = '';
$fieldAttributes = array();
// set field attributes
$fieldAttributes = $this->setFieldAttributes($field, $viewType, $name, $typeName, $multiple, $langLabel, $langView, $spacerCounter, $listViewName, $viewName, $placeholders);
// check if values were set
if (ComponentbuilderHelper::checkArray($fieldAttributes))
{
//reset options array
$optionArray = array();
// now add to the field set
$fieldSet .= $this->setField('option', $taber, $fieldAttributes, $name, $typeName, $langView, $viewName, $listViewName, $placeholders, $optionArray);
if ($build)
// set the array of field names
$this->setFieldsNames($viewName,$fieldAttributes['name']);
if ($this->defaultField($typeName, 'option'))
{
// set builders
$this->setBuilders($langLabel, $langView, $viewName, $listViewName, $name, $view, $field, $typeName, $multiple, false, $optionArray);
}
}
elseif ($this->defaultField($typeName, 'plain'))
{
if ($build)
{
// set builders
$this->setBuilders($langLabel, $langView, $viewName, $listViewName, $name, $view, $field, $typeName, $multiple);
}
// now add to the field set
$fieldSet .= $this->setField('plain', $taber, $fieldAttributes, $name, $typeName, $langView, $viewName, $listViewName, $placeholders, $optionArray);
}
elseif ($this->defaultField($typeName, 'spacer'))
{
if ($build)
{
// make sure spacers gets loaded to layout
$tabName = '';
if (isset($view['settings']->tabs) && isset($view['settings']->tabs[(int) $field['tab']]))
//reset options array
$optionArray = array();
// now add to the field set
$fieldSet .= $this->setField('option', $taber, $fieldAttributes, $name, $typeName, $langView, $viewName, $listViewName, $placeholders, $optionArray);
if ($build)
{
$tabName = $view['settings']->tabs[(int) $field['tab']];
// set builders
$this->setBuilders($langLabel, $langView, $viewName, $listViewName, $name, $view, $field, $typeName, $multiple, false, $optionArray);
}
elseif ((int) $field['tab'] == 15)
{
// set to publishing tab
$tabName = 'publishing';
}
$this->setLayoutBuilder($viewName, $tabName, $name, $field);
}
// now add to the field set
$fieldSet .= $this->setField('spacer', $taber, $fieldAttributes, $name, $typeName, $langView, $viewName, $listViewName, $placeholders, $optionArray);
// increment spacer counter
if ($typeName == 'spacer')
{
$spacerCounter++;
}
}
elseif ($this->defaultField($typeName, 'special'))
{
// set the repeatable field
if ($typeName == 'repeatable')
elseif ($this->defaultField($typeName, 'plain'))
{
if ($build)
{
// set builders
$this->setBuilders($langLabel, $langView, $viewName, $listViewName, $name, $view, $field, $typeName, $multiple, false);
$this->setBuilders($langLabel, $langView, $viewName, $listViewName, $name, $view, $field, $typeName, $multiple);
}
// now add to the field set
$fieldSet .= $this->setField('special', $taber, $fieldAttributes, $name, $typeName, $langView, $viewName, $listViewName, $placeholders, $optionArray);
$fieldSet .= $this->setField('plain', $taber, $fieldAttributes, $name, $typeName, $langView, $viewName, $listViewName, $placeholders, $optionArray);
}
}
elseif (ComponentbuilderHelper::checkArray($fieldAttributes['custom']))
{
// set the custom array
$custom = $fieldAttributes['custom'];
unset($fieldAttributes['custom']);
// set db key
$custom['db'] = $dbkey;
// increment the db key
$dbkey++;
if ($build)
elseif ($this->defaultField($typeName, 'spacer'))
{
// set builders
$this->setBuilders($langLabel, $langView, $viewName, $listViewName, $name, $view, $field, $typeName, $multiple, $custom);
if ($build)
{
// make sure spacers gets loaded to layout
$tabName = '';
if (isset($view['settings']->tabs) && isset($view['settings']->tabs[(int) $field['tab']]))
{
$tabName = $view['settings']->tabs[(int) $field['tab']];
}
elseif ((int) $field['tab'] == 15)
{
// set to publishing tab
$tabName = 'publishing';
}
$this->setLayoutBuilder($viewName, $tabName, $name, $field);
}
// now add to the field set
$fieldSet .= $this->setField('spacer', $taber, $fieldAttributes, $name, $typeName, $langView, $viewName, $listViewName, $placeholders, $optionArray);
// increment spacer counter
if ($typeName == 'spacer')
{
$spacerCounter++;
}
}
elseif ($this->defaultField($typeName, 'special'))
{
// set the repeatable field
if ($typeName == 'repeatable')
{
if ($build)
{
// set builders
$this->setBuilders($langLabel, $langView, $viewName, $listViewName, $name, $view, $field, $typeName, $multiple, false);
}
// now add to the field set
$fieldSet .= $this->setField('special', $taber, $fieldAttributes, $name, $typeName, $langView, $viewName, $listViewName, $placeholders, $optionArray);
}
}
elseif (ComponentbuilderHelper::checkArray($fieldAttributes['custom']))
{
// set the custom array
$custom = $fieldAttributes['custom'];
unset($fieldAttributes['custom']);
// set db key
$custom['db'] = $dbkey;
// increment the db key
$dbkey++;
if ($build)
{
// set builders
$this->setBuilders($langLabel, $langView, $viewName, $listViewName, $name, $view, $field, $typeName, $multiple, $custom);
}
// now add to the field set
$fieldSet .= $this->setField('custom', $taber, $fieldAttributes, $name, $typeName, $langView, $viewName, $listViewName, $placeholders, $optionArray);
}
// now add to the field set
$fieldSet .= $this->setField('custom', $taber, $fieldAttributes, $name, $typeName, $langView, $viewName, $listViewName, $placeholders, $optionArray);
}
return $fieldSet;
}
return $fieldSet;
return '';
}
/**
@ -849,6 +872,11 @@ class Fields extends Structure
$fieldSet .= $optionSet;
$fieldSet .= "\n\t\t" . $taber . "</field>";
}
elseif ($typeName == 'sql')
{
$optionArray = false;
$fieldSet .= "\n\t\t" . $taber . "/>";
}
else
{
$optionArray = false;
@ -919,6 +947,7 @@ class Fields extends Structure
foreach ($fieldsSets as $fieldId)
{
// get the field data
$fieldData = array();
$fieldData['settings'] = $this->getFieldData($fieldId, $viewName);
if (ComponentbuilderHelper::checkObject($fieldData['settings']))
{
@ -926,8 +955,6 @@ class Fields extends Structure
$r_typeName = ComponentbuilderHelper::safeString($fieldData['settings']->type_name);
$r_multiple = false;
$r_langLabel = '';
// make sure that these fields are not required
$fieldData['settings']->xml = str_replace('required="', 'requirenot="', $fieldData['settings']->xml);
// add the tabs needed
$taber = "\t\t\t";
// get field values
@ -1299,6 +1326,11 @@ class Fields extends Structure
// dont load the button to repeatable
$xmlValue = 'false';
}
elseif ($property['name'] == 'required' && $repeatable)
{
// dont load the required to repeatable
$xmlValue = 'false';
}
elseif ($viewType == 2 && ($property['name'] == 'readonly' || $property['name'] == 'disabled'))
{
// set read only
@ -1306,7 +1338,7 @@ class Fields extends Structure
}
elseif ($property['name'] == 'multiple')
{
$xmlValue = ComponentbuilderHelper::getBetween($field['settings']->xml, $property['name'] . '="', '"');
$xmlValue = (string) ComponentbuilderHelper::getBetween($field['settings']->xml, $property['name'] . '="', '"');
// add the multipal
if ('true' == $xmlValue)
{
@ -1333,7 +1365,7 @@ class Fields extends Structure
else
{
// set the rest of the fields
$xmlValue = ComponentbuilderHelper::getBetween($field['settings']->xml, $property['name'] . '="', '"');
$xmlValue = (string) ComponentbuilderHelper::getBetween($field['settings']->xml, $property['name'] . '="', '"');
}
// check if translatable
@ -1462,23 +1494,29 @@ class Fields extends Structure
$field['settings']->datadefault = '0';
}
}
// build the query values
$this->queryBuilder[$viewName][$name] = array(
'type' => $field['settings']->datatype,
'lenght' => $field['settings']->datalenght,
'lenght_other' => $field['settings']->datalenght_other,
'default' => $field['settings']->datadefault,
'other' => $field['settings']->datadefault_other,
'null_switch' => $field['settings']->null_switch);
// don't use these as index or uniqe keys
$notKeys = array('TEXT', 'TINYTEXT', 'MEDIUMTEXT', 'LONGTEXT', 'BLOB', 'TINYBLOB', 'MEDIUMBLOB', 'LONGBLOB');
$textKeys = array('TEXT', 'TINYTEXT', 'MEDIUMTEXT', 'LONGTEXT', 'BLOB', 'TINYBLOB', 'MEDIUMBLOB', 'LONGBLOB');
// build the query values
$this->queryBuilder[$viewName][$name]['type'] = $field['settings']->datatype;
if (!in_array($field['settings']->datatype, $textKeys))
{
$this->queryBuilder[$viewName][$name]['lenght'] = $field['settings']->datalenght;
$this->queryBuilder[$viewName][$name]['lenght_other'] = $field['settings']->datalenght_other;
$this->queryBuilder[$viewName][$name]['default'] = $field['settings']->datadefault;
$this->queryBuilder[$viewName][$name]['other'] = $field['settings']->datadefault_other;
}
else
{
$this->queryBuilder[$viewName][$name]['default'] = 'EMPTY';
}
$this->queryBuilder[$viewName][$name]['null_switch'] = $field['settings']->null_switch;
// set index types
if ($field['settings']->indexes == 1 && !in_array($field['settings']->datatype, $notKeys))
if ($field['settings']->indexes == 1 && !in_array($field['settings']->datatype, $textKeys))
{
// build unique keys of this view for db
$this->dbUniqueKeys[$viewName][] = $name;
}
elseif (($field['settings']->indexes == 2 || $field['alias'] || $field['title'] || $typeName == 'category') && !in_array($field['settings']->datatype, $notKeys))
elseif (($field['settings']->indexes == 2 || $field['alias'] || $field['title'] || $typeName == 'category') && !in_array($field['settings']->datatype, $textKeys))
{
// build keys of this view for db
$this->dbKeys[$viewName][] = $name;

View File

@ -81,11 +81,11 @@ class Interpretation extends Fields
* @return void
*
*/
public function setLine($nr)
private function setLine($nr)
{
if ($this->loadLineNr)
{
return ' ['.__CLASS__.' '.$nr.']';
return ' [Interpretation '.$nr.']';
}
return '';
}
@ -161,8 +161,9 @@ class Interpretation extends Fields
{
$statment[] = "\n\t\tif (!\$this->isHonest())";
$statment[] = "\t\t{";
$statment[] = "\t\t\tJError::raiseWarning(500, JText::_('NIE_REG_NIE'));";
$statment[] = "\t\t\tJFactory::getApplication()->redirect('index.php');";
$statment[] = "\t\t\t\$app = JFactory::getApplication();";
$statment[] = "\t\t\t\$app->enqueueMessage(JText::_('NIE_REG_NIE'), 'error');";
$statment[] = "\t\t\t\$app->redirect('index.php');";
$statment[] = "\t\t\treturn false;";
$statment[] = "\t\t}";
// return the genuine mentod statement
@ -1732,20 +1733,21 @@ class Interpretation extends Fields
$getItem .= "\n\t".$tab."\t{";
if ($type == 'main')
{
$getItem .= "\n\t".$tab."\t\t\$app = JFactory::getApplication();";
$langKeyWord = $this->langPrefix.'_'.ComponentbuilderHelper::safeString('Not found or access denied','U');
if (!isset($this->langContent[$this->lang][$langKeyWord]))
{
$this->langContent[$this->lang][$langKeyWord] = 'Not found, or access denied.';
}
$getItem .= "\n\t".$tab."\t\t//".$this->setLine(__LINE__)." If no data is found redirect to default page and show warning.";
$getItem .= "\n\t".$tab."\t\tJError::raiseWarning(500, JText::_('".$langKeyWord."'));";
$getItem .= "\n\t".$tab."\t\t\$app->enqueueMessage(JText::_('".$langKeyWord."'), 'warning');";
if ('site' == $this->target)
{
$getItem .= "\n\t".$tab."\t\tJFactory::getApplication()->redirect('index.php?option=com_".$this->fileContentStatic['###component###']."&view=".$this->fileContentStatic['###SITE_DEFAULT_VIEW###']."');";
$getItem .= "\n\t".$tab."\t\t\$app->redirect('index.php?option=com_".$this->fileContentStatic['###component###']."&view=".$this->fileContentStatic['###SITE_DEFAULT_VIEW###']."');";
}
else
{
$getItem .= "\n\t".$tab."\t\tJFactory::getApplication()->redirect('index.php?option=com_".$this->fileContentStatic['###component###']."');";
$getItem .= "\n\t".$tab."\t\t\$app->redirect('index.php?option=com_".$this->fileContentStatic['###component###']."');";
}
$getItem .= "\n\t".$tab."\t\treturn false;";
}
@ -2283,6 +2285,32 @@ class Interpretation extends Fields
return $method;
}
public function getCustomScriptBuilder($first, $second, $prefix = '', $note = null, $unset = null, $default = null, $sufix = '')
{
// check if there is any custom script
$script = '';
if (isset($this->customScriptBuilder[$first][$second]) && ComponentbuilderHelper::checkString($this->customScriptBuilder[$first][$second]))
{
// add not if set
if ($note)
{
$script .= $note;
}
$script .= $prefix . str_replace( array_keys($this->placeholders), array_values($this->placeholders), $this->customScriptBuilder[$first][$second]) . $sufix;
// clear some memory
if ($unset)
{
unset($this->customScriptBuilder[$first][$second]);
}
}
// if not found return default
if ($default)
{
return $default;
}
return $script;
}
public function setCustomViewListQuery(&$get,$code,$return = true)
{
if (ComponentbuilderHelper::checkObject($get))
@ -2301,13 +2329,7 @@ class Interpretation extends Fields
$getItem .= "\n\n\t\t//".$this->setLine(__LINE__)." Create a new query object.";
$getItem .= "\n\t\t\$query = \$db->getQuery(true);";
// check if there is any custom script
if (isset($this->customScriptBuilder[$this->target.'_php_getlistquery'][$code]) && ComponentbuilderHelper::checkString($this->customScriptBuilder[$this->target.'_php_getlistquery'][$code]))
{
$getItem .= "\n\n\t\t//".$this->setLine(__LINE__)." Filtering.";
$getItem .= str_replace(array_keys($this->placeholders),array_values($this->placeholders),$this->customScriptBuilder[$this->target.'_php_getlistquery'][$code]);
// clear some memory
unset($this->customScriptBuilder[$this->target.'_php_getlistquery'][$view['settings']->code]);
}
$getItem .= $this->getCustomScriptBuilder($this->target.'_php_getlistquery', $code, '', "\n\n\t\t//".$this->setLine(__LINE__)." Filtering.", true);
// set main get query
$getItem .= $this->setCustomViewQuery($get->main_get,$code);
// setup filters
@ -2469,7 +2491,7 @@ class Interpretation extends Fields
$method .= "\n\n\t\t//".$this->setLine(__LINE__)." Check for errors.";
$method .= "\n\t\tif (count(\$errors = \$this->get('Errors')))";
$method .= "\n\t\t{";
$method .= "\n\t\t\tJError::raiseWarning(500, ".'implode("\n", $errors));';
$method .= "\n\t\t\tJError::raiseError(500, ".'implode("\n", $errors));';
$method .= "\n\t\t\treturn false;";
$method .= "\n\t\t}";
// add custom script
@ -3089,6 +3111,34 @@ class Interpretation extends Fields
return '';
}
public function setCustomViewSubmitButtonScript(&$view)
{
if (ComponentbuilderHelper::checkString($view['settings']->default))
{
// add the script only if there is none set
if (strpos($view['settings']->default, 'Joomla.submitbutton = function(task)') === false)
{
$script = array();
$script[] = "\n<script type=\"text/javascript\">";
$script[] = "\tJoomla.submitbutton = function(task) {";
$script[] = "\t\tif (task == '".$view['settings']->code.".back') {";
$script[] = "\t\t\tparent.history.back();";
$script[] = "\t\t\treturn false;";
$script[] = "\t\t} else {";
$script[] = "\t\t\tvar form = document.getElementById('adminForm');";
$script[] = "\t\t\tform.task.value = task;";
$script[] = "\t\t\tform.submit();";
$script[] = "\t\t}";
$script[] = "\t}";
$script[] = "</script>";
return implode("\n", $script);
}
}
return '';
}
public function setCustomViewCodeBody(&$view)
{
if ($view['settings']->add_php_view == 1)
@ -3322,10 +3372,7 @@ class Interpretation extends Fields
}
// add custom php to getitem method
if (isset($this->customScriptBuilder['php_getitem'][$view]) && ComponentbuilderHelper::checkString($this->customScriptBuilder['php_getitem'][$view]))
{
$script .= "\n\n".str_replace(array_keys($this->placeholders),array_values($this->placeholders),$this->customScriptBuilder['php_getitem'][$view]);
}
$script .= $this->getCustomScriptBuilder('php_getitem', $view, "\n\n");
return $script;
}
@ -3429,43 +3476,9 @@ class Interpretation extends Fields
}
}
// add custom PHP to the save method
if(isset($this->customScriptBuilder['php_save'][$view]) && ComponentbuilderHelper::checkString($this->customScriptBuilder['php_save'][$view]))
{
$script .= "\n\n" . str_replace(array_keys($this->placeholders),array_values($this->placeholders),$this->customScriptBuilder['php_save'][$view]);
}
$script .= $this->getCustomScriptBuilder('php_save', $view, "\n\n");
return $script;
}
public function setJmodelAdminBeforeDelete($view)
{
// add custom PHP to the delete Method
if(isset($this->customScriptBuilder['php_before_delete'][$view]) && ComponentbuilderHelper::checkString($this->customScriptBuilder['php_before_delete'][$view]))
{
return "\n".str_replace(array_keys($this->placeholders),array_values($this->placeholders),$this->customScriptBuilder['php_before_delete'][$view]);
}
return "";
}
public function setJmodelAdminAfterDelete($view)
{
// add custom PHP to the delete Method
if(isset($this->customScriptBuilder['php_after_delete'][$view]) && ComponentbuilderHelper::checkString($this->customScriptBuilder['php_after_delete'][$view]))
{
return "\n\n".str_replace(array_keys($this->placeholders),array_values($this->placeholders),$this->customScriptBuilder['php_after_delete'][$view]);
}
return "";
}
public function setPostSaveHook($view)
{
// add custom PHP to the post save hook Method
if(isset($this->customScriptBuilder['php_postsavehook'][$view]) && ComponentbuilderHelper::checkString($this->customScriptBuilder['php_postsavehook'][$view]))
{
return "\n".str_replace(array_keys($this->placeholders),array_values($this->placeholders),$this->customScriptBuilder['php_postsavehook'][$view])."\n\n\t\treturn;";
}
return "\n\t\treturn;";
}
public function setJtableConstructor($view)
{
@ -4038,14 +4051,7 @@ class Interpretation extends Fields
$title = $this->titleBuilder[$viewName_single];
}
// prepare custom script
if (isset($this->customScriptBuilder['php_batchmove'][$viewName_single]) && ComponentbuilderHelper::checkString($this->customScriptBuilder['php_batchmove'][$viewName_single]))
{
$customScript = "\n\n".str_replace(array_keys($this->placeholders),array_values($this->placeholders),$this->customScriptBuilder['php_batchmove'][$viewName_single]);
}
else
{
$customScript = '';
}
$customScript = $this->getCustomScriptBuilder('php_batchmove', $viewName_single, "\n\n", null, true);
$batchmove[] = "\n\t/**";
$batchmove[] = "\t * Batch move items to a new category";
@ -4235,14 +4241,7 @@ class Interpretation extends Fields
$title = $this->titleBuilder[$viewName_single];
}
// prepare custom script
if (isset($this->customScriptBuilder['php_batchcopy'][$viewName_single]) && ComponentbuilderHelper::checkString($this->customScriptBuilder['php_batchcopy'][$viewName_single]))
{
$customScript = "\n\n".str_replace(array_keys($this->placeholders),array_values($this->placeholders),$this->customScriptBuilder['php_batchcopy'][$viewName_single]);
}
else
{
$customScript = '';
}
$customScript = $this->getCustomScriptBuilder('php_batchcopy', $viewName_single, "\n\n", null, true);
$batchcopy[] = "\n\t/**";
$batchcopy[] = "\t * Batch copy items to a new category or current.";
@ -4642,7 +4641,11 @@ class Interpretation extends Fields
{
$default = $data['other'];
}
if ($default == 'DATETIME' || $default == 'CURRENT_TIMESTAMP')
if ($default == 'EMPTY')
{
$default = $data['null_switch'];
}
elseif ($default == 'DATETIME' || $default == 'CURRENT_TIMESTAMP')
{
$default = $default.' '.$data['null_switch'];
}
@ -4660,7 +4663,7 @@ class Interpretation extends Fields
}
// set the lenght
$lenght = '';
if ($data['lenght'] == 'Other' && isset($data['lenght_other']) && $data['lenght_other'] > 0)
if (isset($data['lenght']) && $data['lenght'] == 'Other' && isset($data['lenght_other']) && $data['lenght_other'] > 0)
{
$lenght = '('.$data['lenght_other'].')';
}
@ -4674,7 +4677,7 @@ class Interpretation extends Fields
// check if default field was over written
if (!isset($this->fieldsNames[$view]['params']))
{
$db .= "\n\t`params` TEXT NOT NULL DEFAULT '',";
$db .= "\n\t`params` TEXT NOT NULL,";
}
// check if default field was over written
if (!isset($this->fieldsNames[$view]['published']))
@ -5220,7 +5223,7 @@ class Interpretation extends Fields
$coreLoadLink = true;
}
// check if the item has permissions.
if ($coreLoadLink && isset($this->permissionBuilder[$coreLink['core.edit']]) && ComponentbuilderHelper::checkArray($this->permissionBuilder[$coreLink['core.edit']]) && in_array($item['custom']['view'],$this->permissionBuilder[$coreLink['core.edit']]))
if ($coreLoadLink && (isset($coreLink['core.edit']) && isset($this->permissionBuilder[$coreLink['core.edit']])) && ComponentbuilderHelper::checkArray($this->permissionBuilder[$coreLink['core.edit']]) && in_array($item['custom']['view'],$this->permissionBuilder[$coreLink['core.edit']]))
{
$accessCheck = "\$this->user->authorise('".$coreLink['core.edit']."', 'com_".$this->fileContentStatic['###component###'].".".$item['custom']['view'].".' . (int)\$item->".$item['id'].")";
}
@ -6660,10 +6663,7 @@ class Interpretation extends Fields
$query .= "\n\t\t\$query->join('LEFT', \$db->quoteName('#__categories', 'c') . ' ON (' . \$db->quoteName('a.".$categoryCodeName."') . ' = ' . \$db->quoteName('c.id') . ')');";
}
// add custom filtering php
if (isset($this->customScriptBuilder['php_getlistquery'][$viewName_single]) && ComponentbuilderHelper::checkString($this->customScriptBuilder['php_getlistquery'][$viewName_single]))
{
$query .= "\n\n".str_replace(array_keys($this->placeholders),array_values($this->placeholders),$this->customScriptBuilder['php_getlistquery'][$viewName_single]);
}
$query .= $this->getCustomScriptBuilder('php_getlistquery', $viewName_single, "\n\n");
// add the custom fields query
$query .= $this->setCustomQuery($viewName_list, $viewName_single);
if ($key && strpos($key,'-R>') === false && strpos($key,'-A>') === false && strpos($parentKey,'-R>') === false && strpos($parentKey,'-A>') === false)
@ -6712,7 +6712,6 @@ class Interpretation extends Fields
$query .= $this->setGetItemsMethodStringFix($viewName_single,$this->fileContentStatic['###Component###'],"\t");
// ###SELECTIONTRANSLATIONFIX### <<<DYNAMIC>>>
$query .= $this->setSelectionTranslationFix($viewName_list,$this->fileContentStatic['###Component###'],"\t");
// filter by child repetable field values
if ($key && strpos($key,'-R>') !== false && strpos($key,'-A>') === false)
{
@ -6816,6 +6815,8 @@ class Interpretation extends Fields
$query .= "\n\t\t\t\treturn false;";
$query .= "\n\t\t\t}";
}
// add custom php to getitems method after all
$query .= $this->getCustomScriptBuilder('php_getitems_after_all', $viewName_single, "\n\n\t");
$query .= "\n\t\t\treturn \$items;";
$query .= "\n\t\t}";
@ -6942,10 +6943,8 @@ class Interpretation extends Fields
$query .= "\n\t\t\t\$query->from(\$db->quoteName('#__".$this->fileContentStatic['###component###']."_".$viewName_single."', 'a'));";
$query .= "\n\t\t\t\$query->where('a.id IN (' . implode(',',\$pks) . ')');";
// add custom filtering php
if (isset($this->customScriptBuilder['php_getlistquery'][$viewName_single]) && ComponentbuilderHelper::checkString($this->customScriptBuilder['php_getlistquery'][$viewName_single]))
{
$query .= "\n\n\t".str_replace(array_keys($this->placeholders),array_values($this->placeholders),$this->customScriptBuilder['php_getlistquery'][$viewName_single]);
}
$query .= $this->getCustomScriptBuilder('php_getlistquery', $viewName_single, "\n\n\t");
if (isset($this->accessBuilder[$viewName_single]) && ComponentbuilderHelper::checkString($this->accessBuilder[$viewName_single]))
{
$query .= "\n\t\t\t//".$this->setLine(__LINE__)." Implement View Level Access";
@ -6964,6 +6963,8 @@ class Interpretation extends Fields
$query .= "\n\t\t\t{";
$query .= "\n\t\t\t\t\$items = \$db->loadObjectList();";
$query .= $this->setGetItemsMethodStringFix($viewName_single,$this->fileContentStatic['###Component###'],"\t\t",true);
// add custom php to getitems method after all
$query .= $this->getCustomScriptBuilder('php_getitems_after_all', $viewName_single, "\n\n\t\t");
$query .= "\n\t\t\t\treturn \$items;";
$query .= "\n\t\t\t}";
$query .= "\n\t\t}";
@ -7139,36 +7140,17 @@ class Interpretation extends Fields
$target = array('admin' => 'import_'.$viewName_list);
$this->buildDynamique($target,'customimport');
// load the custom script to the files
if (isset($this->customScriptBuilder['php_import_display']['import_'.$viewName_list]))
{
// ###IMPORT_DISPLAY_METHOD_CUSTOM### <<<DYNAMIC>>>
$this->fileContentDynamic['import_'.$viewName_list]['###IMPORT_DISPLAY_METHOD_CUSTOM###'] = "\n".str_replace(array_keys($this->placeholders),array_values($this->placeholders),$this->customScriptBuilder['php_import_display']['import_'.$viewName_list]);
unset($this->customScriptBuilder['php_import_display']['import_'.$viewName_list]);
}
if (isset($this->customScriptBuilder['php_import_setdata']['import_'.$viewName_list]))
{
// ###IMPORT_SETDATE_METHOD_CUSTOM### <<<DYNAMIC>>>
$this->fileContentDynamic['import_'.$viewName_list]['###IMPORT_SETDATE_METHOD_CUSTOM###'] = "\n".str_replace(array_keys($this->placeholders),array_values($this->placeholders),$this->customScriptBuilder['php_import_setdata']['import_'.$viewName_list]);
unset($this->customScriptBuilder['php_import_setdata']['import_'.$viewName_list]);
}
if (isset($this->customScriptBuilder['php_import']['import_'.$viewName_list]))
{
// ###IMPORT_METHOD_CUSTOM### <<<DYNAMIC>>>
$this->fileContentDynamic['import_'.$viewName_list]['###IMPORT_METHOD_CUSTOM###'] = "\n".str_replace(array_keys($this->placeholders),array_values($this->placeholders),$this->customScriptBuilder['php_import']['import_'.$viewName_list]);
unset($this->customScriptBuilder['php_import']['import_'.$viewName_list]);
}
if (isset($this->customScriptBuilder['php_import_save']['import_'.$viewName_list]))
{
// ###IMPORT_SAVE_METHOD_CUSTOM### <<<DYNAMIC>>>
$this->fileContentDynamic['import_'.$viewName_list]['###IMPORT_SAVE_METHOD_CUSTOM###'] = "\n".str_replace(array_keys($this->placeholders),array_values($this->placeholders),$this->customScriptBuilder['php_import_save']['import_'.$viewName_list]);
unset($this->customScriptBuilder['php_import_save']['import_'.$viewName_list]);
}
if (isset($this->customScriptBuilder['html_import_view']['import_'.$viewName_list]))
{
// ###IMPORT_DEFAULT_VIEW_CUSTOM### <<<DYNAMIC>>>
$this->fileContentDynamic['import_'.$viewName_list]['###IMPORT_DEFAULT_VIEW_CUSTOM###'] = "\n".str_replace(array_keys($this->placeholders),array_values($this->placeholders),$this->customScriptBuilder['html_import_view']['import_'.$viewName_list]);
unset($this->customScriptBuilder['html_import_view']['import_'.$viewName_list]);
}
// ###IMPORT_DISPLAY_METHOD_CUSTOM### <<<DYNAMIC>>>
$this->fileContentDynamic['import_'.$viewName_list]['###IMPORT_DISPLAY_METHOD_CUSTOM###'] = $this->getCustomScriptBuilder('php_import_display', 'import_'.$viewName_list, "\n", null, true);
// ###IMPORT_SETDATE_METHOD_CUSTOM### <<<DYNAMIC>>>
$this->fileContentDynamic['import_'.$viewName_list]['###IMPORT_SETDATE_METHOD_CUSTOM###'] = $this->getCustomScriptBuilder('php_import_setdata', 'import_'.$viewName_list, "\n", null, true);
// ###IMPORT_METHOD_CUSTOM### <<<DYNAMIC>>>
$this->fileContentDynamic['import_'.$viewName_list]['###IMPORT_METHOD_CUSTOM###'] = $this->getCustomScriptBuilder('php_import', 'import_'.$viewName_list, "\n", null, true);
// ###IMPORT_SAVE_METHOD_CUSTOM### <<<DYNAMIC>>>
$this->fileContentDynamic['import_'.$viewName_list]['###IMPORT_SAVE_METHOD_CUSTOM###'] = $this->getCustomScriptBuilder('php_import_save', 'import_'.$viewName_list, "\n", null, true);
// ###IMPORT_DEFAULT_VIEW_CUSTOM### <<<DYNAMIC>>>
$this->fileContentDynamic['import_'.$viewName_list]['###IMPORT_DEFAULT_VIEW_CUSTOM###'] = $this->getCustomScriptBuilder('html_import_view', 'import_'.$viewName_list, "\n", null, true);
// insure we have the view placeholders setup
$this->fileContentDynamic['import_'.$viewName_list]['###VIEW###'] = 'IMPORT_'.$this->placeholders['###VIEWS###'];
$this->fileContentDynamic['import_'.$viewName_list]['###View###'] = 'Import_'.$this->placeholders['###views###'];
@ -7211,10 +7193,7 @@ class Interpretation extends Fields
$query .= "\n\t\t\$query->join('LEFT', \$db->quoteName('#__categories', 'c') . ' ON (' . \$db->quoteName('a.".$categoryCodeName."') . ' = ' . \$db->quoteName('c.id') . ')');";
}
// add custom filtering php
if (isset($this->customScriptBuilder['php_getlistquery'][$viewName_single]) && ComponentbuilderHelper::checkString($this->customScriptBuilder['php_getlistquery'][$viewName_single]))
{
$query .= "\n\n".str_replace(array_keys($this->placeholders),array_values($this->placeholders),$this->customScriptBuilder['php_getlistquery'][$viewName_single]);
}
$query .= $this->getCustomScriptBuilder('php_getlistquery', $viewName_single, "\n\n");
// add the custom fields query
$query .= $this->setCustomQuery($viewName_list, $viewName_single);
$query .= "\n\n\t\t//".$this->setLine(__LINE__)." Filter by published state";
@ -7471,16 +7450,11 @@ class Interpretation extends Fields
$addButton[] = "\t\t\t//".$this->setLine(__LINE__)." check if button was created for " . $targetView ." field.";
$addButton[] = "\t\t\tif (is_array(\$button) && count(\$button) > 0)";
$addButton[] = "\t\t\t{";
$addButton[] = "\t\t\t\t//".$this->setLine(__LINE__)." Add some final script";
$addButton[] = "\t\t\t\t\$script[] = \"";
$addButton[] = "\t\t\t\t\tjQuery(document).ready(function() {";
$addButton[] = "\t\t\t\t\t\tjQuery('#jform_\".\$buttonName.\"').closest('.control-group').addClass('input-append');";
$addButton[] = "\t\t\t\t\t});\";";
$addButton[] = "\t\t\t\t//".$this->setLine(__LINE__)." Load the needed script.";
$addButton[] = "\t\t\t\t\$document = JFactory::getDocument();";
$addButton[] = "\t\t\t\t\$document->addScriptDeclaration(implode(' ',\$script));";
$addButton[] = "\t\t\t\t//".$this->setLine(__LINE__)." return the button attached to input field.";
$addButton[] = "\t\t\t\treturn \$html . implode('',\$button);";
$addButton[] = "\t\t\t\treturn '<div class=\"input-append\">' .\$html . implode('',\$button).'</div>';";
$addButton[] = "\t\t\t}";
$addButton[] = "\t\t}";
$addButton[] = "\t\treturn \$html;";
@ -7519,12 +7493,10 @@ class Interpretation extends Fields
return '';
}
public function buildTheViewScript($viewArray, $component)
public function buildTheViewScript($viewArray)
{
// set the view name
$viewName = ComponentbuilderHelper::safeString($viewArray['settings']->name_single);
// setup the str_replace values
$placeholders = array('[[[component]]]' => $component, '[[[view]]]' => $viewName);
// add conditions to this view
if (isset($viewArray['settings']->conditions) && ComponentbuilderHelper::checkArray($viewArray['settings']->conditions))
{
@ -7851,12 +7823,12 @@ class Interpretation extends Fields
{
$fileScript = '';
}
$fileScript .= "\n\n".str_replace(array_keys($placeholders),array_values($placeholders),$this->customScriptBuilder['view_file'][$viewName]);
$fileScript .= "\n\n".str_replace(array_keys($this->placeholders),array_values($this->placeholders),$this->customScriptBuilder['view_file'][$viewName]);
}
// add custom script to footer
if (isset($this->customScriptBuilder['view_footer'][$viewName]) && ComponentbuilderHelper::checkString($this->customScriptBuilder['view_footer'][$viewName]))
{
$customFooterScript = "\n\n".str_replace(array_keys($placeholders),array_values($placeholders),$this->customScriptBuilder['view_footer'][$viewName]);
$customFooterScript = "\n\n".str_replace(array_keys($this->placeholders),array_values($this->placeholders),$this->customScriptBuilder['view_footer'][$viewName]);
if (strpos($customFooterScript,'<?php') === false)
{
// only add now if no php is added to the footer script
@ -8634,9 +8606,9 @@ class Interpretation extends Fields
$cases .= "\n\t\t\t\t\t\t{";
$cases .= "\n\t\t\t\t\t\t\t\$result = false;";
$cases .= "\n\t\t\t\t\t\t}";
$cases .= "\n\t\t\t\t\t\tif(array_key_exists('callback',\$_GET))";
$cases .= "\n\t\t\t\t\t\tif(\$callback = \$jinput->get('callback', null, 'CMD'))";
$cases .= "\n\t\t\t\t\t\t{";
$cases .= "\n\t\t\t\t\t\t\techo \$_GET['callback'] . \"(\".json_encode(\$result).\");\";";
$cases .= "\n\t\t\t\t\t\t\techo \$callback . \"(\".json_encode(\$result).\");\";";
$cases .= "\n\t\t\t\t\t\t}";
$cases .= "\n\t\t\t\t\t\telseif(\$returnRaw)";
$cases .= "\n\t\t\t\t\t\t{";
@ -8649,9 +8621,9 @@ class Interpretation extends Fields
$cases .= "\n\t\t\t\t\t}";
$cases .= "\n\t\t\t\t\tcatch(Exception \$e)";
$cases .= "\n\t\t\t\t\t{";
$cases .= "\n\t\t\t\t\t\tif(array_key_exists('callback',\$_GET))";
$cases .= "\n\t\t\t\t\t\tif(\$callback = \$jinput->get('callback', null, 'CMD'))";
$cases .= "\n\t\t\t\t\t\t{";
$cases .= "\n\t\t\t\t\t\t\techo \$_GET['callback'].\"(\".json_encode(\$e).\");\";";
$cases .= "\n\t\t\t\t\t\t\techo \$callback.\"(\".json_encode(\$e).\");\";";
$cases .= "\n\t\t\t\t\t\t}";
$cases .= "\n\t\t\t\t\t\telse";
$cases .= "\n\t\t\t\t\t\t{";
@ -9110,14 +9082,7 @@ class Interpretation extends Fields
// set component name
$component = ComponentbuilderHelper::safeString($this->componentData->name_code);
// prepare custom permission script
if (isset($this->customScriptBuilder['php_allowedit'][$viewName_single]) && ComponentbuilderHelper::checkString($this->customScriptBuilder['php_allowedit'][$viewName_single]))
{
$customAllow = str_replace(array_keys($this->placeholders),array_values($this->placeholders),$this->customScriptBuilder['php_allowedit'][$viewName_single]);
}
else
{
$customAllow = '';
}
$customAllow = $this->getCustomScriptBuilder('php_allowedit', $viewName_single, null, true);
// setup correct core target
$coreLoad = false;
if (isset($this->permissionCore[$viewName_single]))
@ -9542,14 +9507,7 @@ class Interpretation extends Fields
// set component name
$component = ComponentbuilderHelper::safeString($this->componentData->name_code);
// prepare custom permission script
if (isset($this->customScriptBuilder['php_allowedit'][$viewName_single]) && ComponentbuilderHelper::checkString($this->customScriptBuilder['php_allowedit'][$viewName_single]))
{
$customAllow = "\t\t\$recordId\t= (int) isset(\$data[\$key]) ? \$data[\$key] : 0;\n".str_replace(array_keys($this->placeholders),array_values($this->placeholders),$this->customScriptBuilder['php_allowedit'][$viewName_single]);
}
else
{
$customAllow = '';
}
$customAllow = $this->getCustomScriptBuilder('php_allowedit', $viewName_single, "\t\t\$recordId\t= (int) isset(\$data[\$key]) ? \$data[\$key] : 0;\n");
// setup correct core target
$coreLoad = false;
if (isset($this->permissionCore[$viewName_single]))
@ -9645,7 +9603,7 @@ class Interpretation extends Fields
$allow[] = "\t\t\t\treturn;";
$allow[] = "\t\t\t}";
// check if the item has permissions.
if ($coreLoad && isset($this->permissionBuilder[$core['core.delete']]) && ComponentbuilderHelper::checkArray($this->permissionBuilder[$core['core.delete']]) && in_array($viewName_single,$this->permissionBuilder[$core['core.delete']]))
if ($coreLoad && (isset($core['core.delete']) && isset($this->permissionBuilder[$core['core.delete']])) && ComponentbuilderHelper::checkArray($this->permissionBuilder[$core['core.delete']]) && in_array($viewName_single,$this->permissionBuilder[$core['core.delete']]))
{
$allow[] = "\n\t\t\t\$user = JFactory::getUser();";
$allow[] = "\t\t\t//".$this->setLine(__LINE__)." The record has been set. Check the record permissions.";
@ -10140,14 +10098,28 @@ class Interpretation extends Fields
$toolBar .= "\n\t\t\t\t\t\tJToolBarHelper::custom('".$viewName.".save2new', 'save-new.png', 'save-new_f2.png', 'JTOOLBAR_SAVE_AND_NEW', false);";
$toolBar .= "\n\t\t\t\t\t}";
$toolBar .= "\n\t\t\t\t}";
if ($coreLoad && isset($this->historyBuilder[$viewName]) && ComponentbuilderHelper::checkString($this->historyBuilder[$viewName]))
{
$toolBar .= "\n\t\t\t\t\$canVersion = (\$this->canDo->get('core.version') && \$this->canDo->get('".$core['core.version']."'));";
$toolBar .= "\n\t\t\t\tif (\$this->state->params->get('save_history', 1) && \$this->canDo->get('".$core['core.edit']."') && \$canVersion)";
$toolBar .= "\n\t\t\t\t{";
$toolBar .= "\n\t\t\t\t\tJToolbarHelper::versions('com_".$this->fileContentStatic['###component###'].".".$viewName."', \$this->item->id);";
$toolBar .= "\n\t\t\t\t}";
}
if ($coreLoad && isset($core['core.edit']) && isset($this->permissionBuilder['global'][$core['core.edit']]) && ComponentbuilderHelper::checkArray($this->permissionBuilder['global'][$core['core.edit']]) && in_array($viewName,$this->permissionBuilder['global'][$core['core.edit']]))
{
if ($coreLoad && isset($this->historyBuilder[$viewName]) && ComponentbuilderHelper::checkString($this->historyBuilder[$viewName]))
{
$toolBar .= "\n\t\t\t\t\$canVersion = (\$this->canDo->get('core.version') && \$this->canDo->get('".$core['core.version']."'));";
$toolBar .= "\n\t\t\t\tif (\$this->state->params->get('save_history', 1) && \$this->canDo->get('".$core['core.edit']."') && \$canVersion)";
$toolBar .= "\n\t\t\t\t{";
$toolBar .= "\n\t\t\t\t\tJToolbarHelper::versions('com_".$this->fileContentStatic['###component###'].".".$viewName."', \$this->item->id);";
$toolBar .= "\n\t\t\t\t}";
}
}
else
{
if ($coreLoad && isset($this->historyBuilder[$viewName]) && ComponentbuilderHelper::checkString($this->historyBuilder[$viewName]))
{
$toolBar .= "\n\t\t\t\t\$canVersion = (\$this->canDo->get('core.version') && \$this->canDo->get('".$core['core.version']."'));";
$toolBar .= "\n\t\t\t\tif (\$this->state->params->get('save_history', 1) && \$this->canDo->get('core.edit') && \$canVersion)";
$toolBar .= "\n\t\t\t\t{";
$toolBar .= "\n\t\t\t\t\tJToolbarHelper::versions('com_".$this->fileContentStatic['###component###'].".".$viewName."', \$this->item->id);";
$toolBar .= "\n\t\t\t\t}";
}
}
if ($coreLoad && isset($core['core.create']) && isset($this->permissionBuilder['global'][$core['core.create']]) && ComponentbuilderHelper::checkArray($this->permissionBuilder['global'][$core['core.create']]) && in_array($viewName,$this->permissionBuilder['global'][$core['core.create']]))
{
$toolBar .= "\n\t\t\t\tif (\$this->canDo->get('".$core['core.create']."'))";
@ -10639,10 +10611,7 @@ class Interpretation extends Fields
}
// add custom php to getitems method
if (isset($this->customScriptBuilder['php_getitems'][$view]) && ComponentbuilderHelper::checkString($this->customScriptBuilder['php_getitems'][$view]))
{
$fix .= "\n\n".$tab."".str_replace(array_keys($this->placeholders),array_values($this->placeholders),$this->customScriptBuilder['php_getitems'][$view]);
}
$fix .= $this->getCustomScriptBuilder('php_getitems', $view, "\n\n".$tab);
if ($basicCrypt)
{
@ -11082,11 +11051,70 @@ class Interpretation extends Fields
public function addCustomDashboardIcons(&$view,&$counter)
{
$icon = '';
if (isset($this->componentData->custom_admin_views) && ComponentbuilderHelper::checkArray($this->componentData->custom_admin_views))
{
foreach ($this->componentData->custom_admin_views as $nr => $menu)
{
if (!isset($this->customAdminAdded[$menu['settings']->code]) && $menu['dashboard_list'] == 1 && $menu['before'] == $view['adminview'])
{
$type = ComponentbuilderHelper::imageInfo($menu['settings']->icon);
if ($type)
{
$type = $type.".";
// icon builder loader
$this->iconBuilder[$type.$menu['settings']->code] = $menu['settings']->icon;
}
else
{
$type = 'png.';
}
// build lang
$langName = $menu['settings']->name.'<br /><br />';
$langKey = $this->langPrefix.'_DASHBOARD_'.$menu['settings']->CODE;
// add to lang
$this->langContent[$this->lang][$langKey] = $langName;
// set icon
if ($counter == 0)
{
$counter++;
$icon .= "'".$type.$menu['settings']->code."'";
}
else
{
$counter++;
$icon .= ", '".$type.$menu['settings']->code."'";
}
}
elseif(!isset($this->customAdminAdded[$menu['settings']->code]) && $menu['dashboard_list'] == 1 && empty($menu['before']))
{
$type = ComponentbuilderHelper::imageInfo($menu['settings']->icon);
if ($type)
{
$type = $type.".";
// icon builder loader
$this->iconBuilder[$type.$menu['settings']->code] = $menu['settings']->icon;
}
else
{
$type = 'png.';
}
// build lang
$langName = $menu['settings']->name.'<br /><br />';
$langKey = $this->langPrefix.'_DASHBOARD_'.$menu['settings']->CODE;
// add to lang
$this->langContent[$this->lang][$langKey] = $langName;
// set icon
$this->lastCustomDashboardIcon[$nr] = ", '".$type.$menu['settings']->code."'";
}
}
}
// see if we should have custom menus
if (isset($this->componentData->custommenus) && ComponentbuilderHelper::checkArray($this->componentData->custommenus))
{
foreach ($this->componentData->custommenus as $nr => $menu)
{
$nr = $nr + 100;
$nameList = ComponentbuilderHelper::safeString($menu['name_code']);
$nameUpper = ComponentbuilderHelper::safeString($menu['name_code'], 'U');
if ($menu['dashboard_list'] == 1 && $view['adminview'] == $menu['before'])
@ -11118,12 +11146,12 @@ class Interpretation extends Fields
if ($counter == 0)
{
$counter++;
return "'".$type.$nameList."'";
$icon .= "'".$type.$nameList."'";
}
else
{
$counter++;
return ", '".$type.$nameList."'";
$icon .= ", '".$type.$nameList."'";
}
}
}
@ -11158,7 +11186,7 @@ class Interpretation extends Fields
}
}
}
return '';
return $icon;
}
public function setSubMenus()
@ -11415,11 +11443,35 @@ class Interpretation extends Fields
public function addCustomMainMenu(&$view,&$codeName,&$lang)
{
$customMenu = '';
// see if we should have custom admin views
if (isset($this->componentData->custom_admin_views) && ComponentbuilderHelper::checkArray($this->componentData->custom_admin_views))
{
foreach ($this->componentData->custom_admin_views as $nr => $menu)
{
if (!isset($this->customAdminAdded[$menu['settings']->code]))
{
if ($menu['mainmenu'] == 1 && $view['adminview'] == $menu['before'])
{
$this->langContent['adminsys'][$lang.'_'.$menu['settings']->CODE] = $menu['settings']->name;
// add custom menu
$customMenu .= "\n\t\t\t".'<menu option="com_'.$codeName.'" view="'.$menu['settings']->code.'">'.$lang.'_'.$menu['settings']->CODE.'</menu>';
}
elseif($menu['mainmenu'] == 1 && empty($menu['before']))
{
$this->langContent['adminsys'][$lang.'_'.$menu['settings']->CODE] = $menu['settings']->name;
// add custom menu
$this->lastCustomMainMenu[$nr] = "\n\t\t\t".'<menu option="com_'.$codeName.'" view="'.$menu['settings']->code.'">'.$lang.'_'.$menu['settings']->CODE.'</menu>';
}
}
}
}
// see if we should have custom menus
if (isset($this->componentData->custommenus) && ComponentbuilderHelper::checkArray($this->componentData->custommenus))
{
foreach ($this->componentData->custommenus as $nr => $menu)
{
$nr = $nr + 100;
if ($menu['mainmenu'] == 1 && $view['adminview'] == $menu['before'])
{
if (isset($menu['link']) && ComponentbuilderHelper::checkString($menu['link']))
@ -11428,7 +11480,7 @@ class Interpretation extends Fields
$nameUpper = ComponentbuilderHelper::safeString($menu['name'], 'U');
$this->langContent['adminsys'][$lang.'_'.$nameUpper] = $menu['name'];
// add custom menu
return "\n\t\t\t".'<menu link="'.$menu['link'].'">'.$lang.'_'.$nameUpper.'</menu>';
$customMenu .= "\n\t\t\t".'<menu link="'.$menu['link'].'">'.$lang.'_'.$nameUpper.'</menu>';
}
else
{
@ -11436,7 +11488,7 @@ class Interpretation extends Fields
$nameUpper = ComponentbuilderHelper::safeString($menu['name_code'], 'U');
$this->langContent['adminsys'][$lang.'_'.$nameUpper] = $menu['name'];
// add custom menu
return "\n\t\t\t".'<menu option="com_'.$codeName.'" view="'.$nameList.'">'.$lang.'_'.$nameUpper.'</menu>';
$customMenu .= "\n\t\t\t".'<menu option="com_'.$codeName.'" view="'.$nameList.'">'.$lang.'_'.$nameUpper.'</menu>';
}
}
elseif($menu['mainmenu'] == 1 && empty($menu['before']))
@ -11460,7 +11512,7 @@ class Interpretation extends Fields
}
}
}
return '';
return $customMenu;
}
@ -12650,7 +12702,7 @@ for developing fast and powerful web interfaces. For more info visit <a href=\"h
// menucontroller
$menucontrollerView['action'] = $targetView_.$menuController;
$menucontrollerView['implementation'] = '2';
if (ComponentbuilderHelper::checkArray($view['settings']->permissions))
if (isset($view['settings']->permissions) && ComponentbuilderHelper::checkArray($view['settings']->permissions))
{
array_push($view['settings']->permissions,$menucontrollerView);
}

View File

@ -45,11 +45,28 @@ class Infusion extends Interpretation
if (parent::__construct($config))
{
// infuse the data into the structure
return $this->buildFileContent();
return $this->buildFileContent();
}
return false;
}
/**
* Set the line number in comments
*
* @param int $nr The line number
*
* @return void
*
*/
private function setLine($nr)
{
if ($this->loadLineNr)
{
return ' [Infusion '.$nr.']';
}
return '';
}
/**
* Build the content for the structure
*
@ -241,7 +258,7 @@ class Infusion extends Interpretation
$this->fileContentDynamic[$viewName_single]['###ADDTOOLBAR###'] = $this->setAddToolBar($view);
// set the script for this view
$this->buildTheViewScript($view, $this->fileContentStatic['###component###']);
$this->buildTheViewScript($view);
// ###VIEW_SCRIPT###
$this->fileContentDynamic[$viewName_single]['###VIEW_SCRIPT###'] = $this->setViewScript($viewName_single);
@ -293,10 +310,10 @@ class Infusion extends Interpretation
$this->fileContentDynamic[$viewName_single]['###LINKEDVIEWMETHODS###'] = '';
// ###JMODELADMIN_BEFORE_DELETE### <<<DYNAMIC>>>
$this->fileContentDynamic[$viewName_single]['###JMODELADMIN_BEFORE_DELETE###'] = $this->setJmodelAdminBeforeDelete($viewName_single);
$this->fileContentDynamic[$viewName_single]['###JMODELADMIN_BEFORE_DELETE###'] = $this->getCustomScriptBuilder('php_before_delete', $viewName_single, "\n");
// ###JMODELADMIN_AFTER_DELETE### <<<DYNAMIC>>>
$this->fileContentDynamic[$viewName_single]['###JMODELADMIN_AFTER_DELETE###'] = $this->setJmodelAdminAfterDelete($viewName_single);
$this->fileContentDynamic[$viewName_single]['###JMODELADMIN_AFTER_DELETE###'] = $this->getCustomScriptBuilder('php_after_delete', $viewName_single, "\n\n");
// ###CHECKBOX_SAVE### <<<DYNAMIC>>>
$this->fileContentDynamic[$viewName_single]['###CHECKBOX_SAVE###'] = $this->setCheckboxSave($viewName_single);
@ -305,7 +322,7 @@ class Infusion extends Interpretation
$this->fileContentDynamic[$viewName_single]['###METHOD_ITEM_SAVE###'] = $this->setMethodItemSave($viewName_single);
// ###POSTSAVEHOOK### <<<DYNAMIC>>>
$this->fileContentDynamic[$viewName_single]['###POSTSAVEHOOK###'] = $this->setPostSaveHook($viewName_single);
$this->fileContentDynamic[$viewName_single]['###POSTSAVEHOOK###'] = $this->getCustomScriptBuilder('php_postsavehook', $viewName_single, "\n", null, true, "\n\t\treturn;", "\n\n\t\treturn;");
if (isset($this->customScriptBuilder['css_view'][$viewName_single]) && ComponentbuilderHelper::checkString($this->customScriptBuilder['css_view'][$viewName_single]))
{
@ -383,8 +400,11 @@ class Infusion extends Interpretation
$this->fileContentDynamic[$viewName_list]['###CHECKINCALL###'] = '';
}
// ###STORE_METHOD_FIX### <<<DYNAMIC>>>
// ###GET_ITEMS_METHOD_STRING_FIX### <<<DYNAMIC>>>
$this->fileContentDynamic[$viewName_list]['###GET_ITEMS_METHOD_STRING_FIX###'] = $this->setGetItemsMethodStringFix($viewName_single,$this->fileContentStatic['###Component###']);
// ###GET_ITEMS_METHOD_AFTER_ALL### <<<DYNAMIC>>>
$this->fileContentDynamic[$viewName_list]['###GET_ITEMS_METHOD_AFTER_ALL###'] = $this->getCustomScriptBuilder('php_getitems_after_all', $viewName_single, "\n");
// ###SELECTIONTRANSLATIONFIX### <<<DYNAMIC>>>
$this->fileContentDynamic[$viewName_list]['###SELECTIONTRANSLATIONFIX###'] = $this->setSelectionTranslationFix($viewName_list,$this->fileContentStatic['###Component###']);
@ -476,6 +496,9 @@ class Infusion extends Interpretation
// ###MODEL_BATCH_MOVE### <<<DYNAMIC>>>
$this->fileContentDynamic[$viewName_single]['###MODEL_BATCH_MOVE###'] = $this->setBatchMove($viewName_single);
// ###BATCH_ONCLICK_CANCEL_SCRIPT### <<<DYNAMIC>>>
$this->fileContentDynamic[$viewName_list]['###BATCH_ONCLICK_CANCEL_SCRIPT###'] = ''; // TODO <-- must still be build
// ###JCONTROLLERFORM_ALLOWADD### <<<DYNAMIC>>>
$this->fileContentDynamic[$viewName_single]['###JCONTROLLERFORM_ALLOWADD###'] = $this->setJcontrollerAllowAdd($viewName_single,$viewName_list);
@ -675,6 +698,8 @@ class Infusion extends Interpretation
$this->fileContentDynamic[$view['settings']->code]['###CUSTOM_ADMIN_CODE_BODY###'] = $this->setCustomViewCodeBody($view);
// ###CUSTOM_ADMIN_BODY### <<<DYNAMIC>>>
$this->fileContentDynamic[$view['settings']->code]['###CUSTOM_ADMIN_BODY###'] = $this->setCustomViewBody($view);
// ###CUSTOM_ADMIN_SUBMITBUTTON_SCRIPT### <<<DYNAMIC>>>
$this->fileContentDynamic[$view['settings']->code]['###CUSTOM_ADMIN_SUBMITBUTTON_SCRIPT###'] = $this->setCustomViewSubmitButtonScript($view);
// setup the templates
$this->setCustomViewTemplateBody($view);

View File

@ -10,8 +10,8 @@
|_|
/-------------------------------------------------------------------------------------------------------------------------------/
@version 2.1.12
@build 3rd June, 2016
@version 2.1.17
@build 3rd September, 2016
@created 30th April, 2015
@package Component Builder
@subpackage componentbuilder.php
@ -657,9 +657,15 @@ abstract class ComponentbuilderHelper
$db = JFactory::getDbo();
// Create a new query object.
$query = $db->getQuery(true);
$query->select($db->quoteName(array($what)));
$query->from($db->quoteName('#__'.$main.'_'.$table));
if (empty($table))
{
$query->from($db->quoteName('#__'.$main));
}
else
{
$query->from($db->quoteName('#__'.$main.'_'.$table));
}
if (is_numeric($where))
{
$query->where($db->quoteName($whereString) . ' '.$operator.' '.(int) $where);
@ -1035,7 +1041,7 @@ abstract class ComponentbuilderHelper
if (!$asset->check() || !$asset->store())
{
JError::raiseWarning(500, $asset->getError());
JFactory::getApplication()->enqueueMessage($asset->getError(), 'warning');
return false;
}
else

View File

@ -10,8 +10,8 @@
|_|
/-------------------------------------------------------------------------------------------------------------------------------/
@version 2.1.12
@build 3rd June, 2016
@version 2.1.17
@build 3rd September, 2016
@created 30th April, 2015
@package Component Builder
@subpackage batch_.php

View File

@ -10,8 +10,8 @@
|_|
/-------------------------------------------------------------------------------------------------------------------------------/
@version 2.1.12
@build 3rd June, 2016
@version 2.1.17
@build 3rd September, 2016
@created 30th April, 2015
@package Component Builder
@subpackage indenter.php

View File

@ -10,8 +10,8 @@
|_|
/-------------------------------------------------------------------------------------------------------------------------------/
@version 2.1.12
@build 3rd June, 2016
@version 2.1.17
@build 3rd September, 2016
@created 30th April, 2015
@package Component Builder
@subpackage js.php

View File

@ -10,8 +10,8 @@
|_|
/-------------------------------------------------------------------------------------------------------------------------------/
@version 2.1.12
@build 3rd June, 2016
@version 2.1.17
@build 3rd September, 2016
@created 30th April, 2015
@package Component Builder
@subpackage minify.php

View File

@ -103,7 +103,9 @@ COM_COMPONENTBUILDER_ADMIN_VIEW_ADD_PHP_DOCUMENT="Add Php Document"
COM_COMPONENTBUILDER_ADMIN_VIEW_ADD_PHP_DOCUMENT_LABEL="Add PHP (custom document script)"
COM_COMPONENTBUILDER_ADMIN_VIEW_ADD_PHP_GETITEM="Add Php Getitem"
COM_COMPONENTBUILDER_ADMIN_VIEW_ADD_PHP_GETITEMS="Add Php Getitems"
COM_COMPONENTBUILDER_ADMIN_VIEW_ADD_PHP_GETITEMS_LABEL="Add PHP (getItems Method)"
COM_COMPONENTBUILDER_ADMIN_VIEW_ADD_PHP_GETITEMS_AFTER_ALL="Add Php Getitems After All"
COM_COMPONENTBUILDER_ADMIN_VIEW_ADD_PHP_GETITEMS_AFTER_ALL_LABEL="Add PHP (getItems Method - after all)"
COM_COMPONENTBUILDER_ADMIN_VIEW_ADD_PHP_GETITEMS_LABEL="Add PHP (getItems Method - before translation fix & decryption)"
COM_COMPONENTBUILDER_ADMIN_VIEW_ADD_PHP_GETITEM_LABEL="Add PHP (getItem Method)"
COM_COMPONENTBUILDER_ADMIN_VIEW_ADD_PHP_GETLISTQUERY="Add Php Getlistquery"
COM_COMPONENTBUILDER_ADMIN_VIEW_ADD_PHP_GETLISTQUERY_LABEL="Add PHP (getListQuery - JModelList)"
@ -312,6 +314,10 @@ COM_COMPONENTBUILDER_ADMIN_VIEW_PHP_DOCUMENT_HINT="// add custom PHP script to t
COM_COMPONENTBUILDER_ADMIN_VIEW_PHP_DOCUMENT_LABEL="Custom Script (Document)"
COM_COMPONENTBUILDER_ADMIN_VIEW_PHP_GETITEM="Php Getitem"
COM_COMPONENTBUILDER_ADMIN_VIEW_PHP_GETITEMS="Php Getitems"
COM_COMPONENTBUILDER_ADMIN_VIEW_PHP_GETITEMS_AFTER_ALL="Php Getitems After All"
COM_COMPONENTBUILDER_ADMIN_VIEW_PHP_GETITEMS_AFTER_ALL_DESCRIPTION="Add your PHP here! [Do not add the php tags]"
COM_COMPONENTBUILDER_ADMIN_VIEW_PHP_GETITEMS_AFTER_ALL_HINT="// PHP Here that should run in the getItems Method (array) $items is where all values are"
COM_COMPONENTBUILDER_ADMIN_VIEW_PHP_GETITEMS_AFTER_ALL_LABEL="PHP"
COM_COMPONENTBUILDER_ADMIN_VIEW_PHP_GETITEMS_DESCRIPTION="Add your PHP here! [Do not add the php tags]"
COM_COMPONENTBUILDER_ADMIN_VIEW_PHP_GETITEMS_HINT="// PHP Here that should run in the getItems Method (array) $items is where all values are"
COM_COMPONENTBUILDER_ADMIN_VIEW_PHP_GETITEMS_LABEL="PHP"
@ -828,6 +834,12 @@ Project duration: **###projectWeekTime### weeks** or **###projectMonthTime### mo
<br />
> This **component** was build with a Joomla [Automated Component Builder] (https://www.vdm.io/joomla-component-builder).<br />
> Developed by [Llewellyn van der Merwe] (mailto:joomla@vdm.io)<br />
<br />
## Donations<br />
<br />
If you want to support this project, please consider donating:<br />
* PayPal: pay@vdm.io<br />
* Bitcoin: 3H35PYwikEosvcjxHXGPLS1GufZ4b4iFu3
</code></div>"
COM_COMPONENTBUILDER_COMPONENT_NOTE_README_LABEL="Demo README (with all place-holders)"
COM_COMPONENTBUILDER_COMPONENT_NOTE_WHMCS_LISENCING_NOTE_DESCRIPTION="You can use WHMCS licensing addon in your component<br /><strong>Helpful Links</strong><br /><a href='https://www.whmcs.com/addons/licensing-addon/' target='_blank'>https://www.whmcs.com/addons/licensing-addon/</a><br /><a href='http://docs.whmcs.com/Licensing_Addon' target='_blank'>http://docs.whmcs.com/Licensing_Addon</a>"
@ -1321,6 +1333,9 @@ COM_COMPONENTBUILDER_CUSTOM_ADMIN_VIEW_HOME="Home"
COM_COMPONENTBUILDER_CUSTOM_ADMIN_VIEW_HOME_TWO="Home 2"
COM_COMPONENTBUILDER_CUSTOM_ADMIN_VIEW_ICOMOON_DESCRIPTION="Joomla Standard Icomoon Fonts"
COM_COMPONENTBUILDER_CUSTOM_ADMIN_VIEW_ICOMOON_LABEL="Icon"
COM_COMPONENTBUILDER_CUSTOM_ADMIN_VIEW_ICON="Icon"
COM_COMPONENTBUILDER_CUSTOM_ADMIN_VIEW_ICON_DESCRIPTION="Must be 128px x 128px and a png format."
COM_COMPONENTBUILDER_CUSTOM_ADMIN_VIEW_ICON_LABEL="Icon"
COM_COMPONENTBUILDER_CUSTOM_ADMIN_VIEW_ID="Id"
COM_COMPONENTBUILDER_CUSTOM_ADMIN_VIEW_IMAGE="Image"
COM_COMPONENTBUILDER_CUSTOM_ADMIN_VIEW_IMAGES="Images"

View File

@ -10,8 +10,8 @@
|_|
/-------------------------------------------------------------------------------------------------------------------------------/
@version 2.1.12
@build 3rd June, 2016
@version 2.1.17
@build 3rd September, 2016
@created 30th April, 2015
@package Component Builder
@subpackage css_fullwidth.php

View File

@ -10,8 +10,8 @@
|_|
/-------------------------------------------------------------------------------------------------------------------------------/
@version 2.1.12
@build 3rd June, 2016
@version 2.1.17
@build 3rd September, 2016
@created 30th April, 2015
@package Component Builder
@subpackage custom_import_fullwidth.php

View File

@ -10,8 +10,8 @@
|_|
/-------------------------------------------------------------------------------------------------------------------------------/
@version 2.1.12
@build 3rd June, 2016
@version 2.1.17
@build 3rd September, 2016
@created 30th April, 2015
@package Component Builder
@subpackage fields_fullwidth.php
@ -29,7 +29,7 @@
defined('_JEXEC') or die('Restricted access');
// set the defaults
$items = $displayData->vxffields;
$items = $displayData->vxgfields;
$user = JFactory::getUser();
$id = $displayData->item->id;
$edit = "index.php?option=com_componentbuilder&view=fields&task=field.edit";

View File

@ -10,8 +10,8 @@
|_|
/-------------------------------------------------------------------------------------------------------------------------------/
@version 2.1.12
@build 3rd June, 2016
@version 2.1.17
@build 3rd September, 2016
@created 30th April, 2015
@package Component Builder
@subpackage javascript_fullwidth.php

View File

@ -10,8 +10,8 @@
|_|
/-------------------------------------------------------------------------------------------------------------------------------/
@version 2.1.12
@build 3rd June, 2016
@version 2.1.17
@build 3rd September, 2016
@created 30th April, 2015
@package Component Builder
@subpackage mysql_fullwidth.php

View File

@ -10,8 +10,8 @@
|_|
/-------------------------------------------------------------------------------------------------------------------------------/
@version 2.1.12
@build 3rd June, 2016
@version 2.1.17
@build 3rd September, 2016
@created 30th April, 2015
@package Component Builder
@subpackage mysql_left.php

View File

@ -10,8 +10,8 @@
|_|
/-------------------------------------------------------------------------------------------------------------------------------/
@version 2.1.12
@build 3rd June, 2016
@version 2.1.17
@build 3rd September, 2016
@created 30th April, 2015
@package Component Builder
@subpackage php_fullwidth.php
@ -38,6 +38,8 @@ $fields = $displayData->get('fields') ?: array(
'php_getitem',
'add_php_getitems',
'php_getitems',
'add_php_getitems_after_all',
'php_getitems_after_all',
'add_php_getlistquery',
'php_getlistquery',
'add_php_save',

View File

@ -10,8 +10,8 @@
|_|
/-------------------------------------------------------------------------------------------------------------------------------/
@version 2.1.12
@build 3rd June, 2016
@version 2.1.17
@build 3rd September, 2016
@created 30th April, 2015
@package Component Builder
@subpackage publishing.php

View File

@ -10,8 +10,8 @@
|_|
/-------------------------------------------------------------------------------------------------------------------------------/
@version 2.1.12
@build 3rd June, 2016
@version 2.1.17
@build 3rd September, 2016
@created 30th April, 2015
@package Component Builder
@subpackage publlshing.php

View File

@ -10,8 +10,8 @@
|_|
/-------------------------------------------------------------------------------------------------------------------------------/
@version 2.1.12
@build 3rd June, 2016
@version 2.1.17
@build 3rd September, 2016
@created 30th April, 2015
@package Component Builder
@subpackage settings_above.php

View File

@ -10,8 +10,8 @@
|_|
/-------------------------------------------------------------------------------------------------------------------------------/
@version 2.1.12
@build 3rd June, 2016
@version 2.1.17
@build 3rd September, 2016
@created 30th April, 2015
@package Component Builder
@subpackage settings_left.php

View File

@ -10,8 +10,8 @@
|_|
/-------------------------------------------------------------------------------------------------------------------------------/
@version 2.1.12
@build 3rd June, 2016
@version 2.1.17
@build 3rd September, 2016
@created 30th April, 2015
@package Component Builder
@subpackage settings_right.php

View File

@ -10,8 +10,8 @@
|_|
/-------------------------------------------------------------------------------------------------------------------------------/
@version 2.1.12
@build 3rd June, 2016
@version 2.1.17
@build 3rd September, 2016
@created 30th April, 2015
@package Component Builder
@subpackage settings_under.php

View File

@ -10,8 +10,8 @@
|_|
/-------------------------------------------------------------------------------------------------------------------------------/
@version 2.1.12
@build 3rd June, 2016
@version 2.1.17
@build 3rd September, 2016
@created 30th April, 2015
@package Component Builder
@subpackage batchselection.php

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