Compare commits

...

7 Commits

Author SHA1 Message Date
4d47f8292f added another fields to admin view to target list controller and model. Also improve compiler to add these new custom script to correct areas 2017-03-02 02:55:04 +02:00
a1ff74f157 Resolves #43 to insure that fields are sorted by tab once save, thanks to @Peeripapo 2017-02-24 16:57:40 +02:00
dc1217e6d1 Resolved #42 to insure the strpos always returns the correct data type. Improvements to some of the UI surrounding the custom code area. Added an edit button for the component being compiled on the complier page. 2017-02-23 02:29:37 +02:00
f2e4df6ecb Improved the custom code by adding the feature that shows where the manual custom code is used, including better placeholder information. Added component information to the compiler view. 2017-02-17 20:35:18 +02:00
a197f503a9 changed component table name to joomla-component to add history/version tracking back to components 2017-02-16 16:02:23 +02:00
79ab3164a6 few changes in comments, descriptions and fields. Included JS files to custom code engine 2017-02-14 02:33:24 +02:00
290a51dd5a Further improved #37 to ensure language strings are set and reversed, also add extra buttons to the compiler page. Major restructure of custom code implementation to make it more stable. Resolved #40 by updating the default field sql values. 2017-02-14 01:24:38 +02:00
349 changed files with 8191 additions and 6486 deletions

View File

@ -1,4 +1,4 @@
# Component Builder (2.3.2)
# Component Builder (2.3.6)
This is a [Joomla 3.x](http://www.joomla.org/) component.
@ -8,7 +8,7 @@ The Component Builder for [Joomla](http://www.joomla.org/) that is highly advanc
Whether you're a seasoned [Joomla](http://www.joomla.org/) developer, or have just started, Component Builder will safe you lots of time and money. A real must have!
You can install it quite easily and with no limitations. On [github](https://github.com/vdm-io/Joomla-Component-Builder/releases) is the latest release (2.3.2) with **ALL** its features and **ALL** concepts totally open-source and free!
You can install it quite easily and with no limitations. On [github](https://github.com/vdm-io/Joomla-Component-Builder/releases) is the latest release (2.3.6) with **ALL** its features and **ALL** concepts totally open-source and free!
Once installed upgrades are quick and easy via the default Joomla upgrade area.
@ -104,12 +104,12 @@ Component Builder is mapped as a component in itself on my local development env
+ *Author*: [Llewellyn van der Merwe](mailto:joomla@vdm.io)
+ *Name*: [Component Builder](http://vdm.bz/component-builder)
+ *First Build*: 30th April, 2015
+ *Last Build*: 11th February, 2017
+ *Version*: 2.3.2
+ *Last Build*: 1st March, 2017
+ *Version*: 2.3.6
+ *Copyright*: Copyright (C) 2015. All Rights Reserved
+ *License*: GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html
+ *Line count*: **91443**
+ *File count*: **592**
+ *Line count*: **92671**
+ *File count*: **596**
+ *Folder count*: **105**
> This **component** was build with a Joomla [Automated Component Builder](http://vdm.bz/component-builder).

View File

@ -1,4 +1,4 @@
# Component Builder (2.3.2)
# Component Builder (2.3.6)
This is a [Joomla 3.x](http://www.joomla.org/) component.
@ -8,7 +8,7 @@ The Component Builder for [Joomla](http://www.joomla.org/) that is highly advanc
Whether you're a seasoned [Joomla](http://www.joomla.org/) developer, or have just started, Component Builder will safe you lots of time and money. A real must have!
You can install it quite easily and with no limitations. On [github](https://github.com/vdm-io/Joomla-Component-Builder/releases) is the latest release (2.3.2) with **ALL** its features and **ALL** concepts totally open-source and free!
You can install it quite easily and with no limitations. On [github](https://github.com/vdm-io/Joomla-Component-Builder/releases) is the latest release (2.3.6) with **ALL** its features and **ALL** concepts totally open-source and free!
Once installed upgrades are quick and easy via the default Joomla upgrade area.
@ -104,12 +104,12 @@ Component Builder is mapped as a component in itself on my local development env
+ *Author*: [Llewellyn van der Merwe](mailto:joomla@vdm.io)
+ *Name*: [Component Builder](http://vdm.bz/component-builder)
+ *First Build*: 30th April, 2015
+ *Last Build*: 11th February, 2017
+ *Version*: 2.3.2
+ *Last Build*: 1st March, 2017
+ *Version*: 2.3.6
+ *Copyright*: Copyright (C) 2015. All Rights Reserved
+ *License*: GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html
+ *Line count*: **91443**
+ *File count*: **592**
+ *Line count*: **92671**
+ *File count*: **596**
+ *Folder count*: **105**
> This **component** was build with a Joomla [Automated Component Builder](http://vdm.bz/component-builder).

View File

@ -101,6 +101,16 @@
<action name="help_document.export" title="COM_COMPONENTBUILDER_HELP_DOCUMENTS_EXPORT" description="COM_COMPONENTBUILDER_HELP_DOCUMENTS_EXPORT_DESC" />
<action name="help_document.import" title="COM_COMPONENTBUILDER_HELP_DOCUMENTS_IMPORT" description="COM_COMPONENTBUILDER_HELP_DOCUMENTS_IMPORT_DESC" />
<action name="help_document.submenu" title="COM_COMPONENTBUILDER_HELP_DOCUMENTS_SUBMENU" description="COM_COMPONENTBUILDER_HELP_DOCUMENTS_SUBMENU_DESC" />
<action name="joomla_component.access" title="COM_COMPONENTBUILDER_JOOMLA_COMPONENTS_ACCESS" description="COM_COMPONENTBUILDER_JOOMLA_COMPONENTS_ACCESS_DESC" />
<action name="joomla_component.batch" title="COM_COMPONENTBUILDER_JOOMLA_COMPONENTS_BATCH_USE" description="COM_COMPONENTBUILDER_JOOMLA_COMPONENTS_BATCH_USE_DESC" />
<action name="joomla_component.dashboard_add" title="COM_COMPONENTBUILDER_JOOMLA_COMPONENTS_DASHBOARD_ADD" description="COM_COMPONENTBUILDER_JOOMLA_COMPONENTS_DASHBOARD_ADD_DESC" />
<action name="joomla_component.dashboard_list" title="COM_COMPONENTBUILDER_JOOMLA_COMPONENTS_DASHBOARD_LIST" description="COM_COMPONENTBUILDER_JOOMLA_COMPONENTS_DASHBOARD_LIST_DESC" />
<action name="joomla_component.edit.add_license" title="COM_COMPONENTBUILDER_JOOMLA_COMPONENTS_EDIT_ADD_LICENSE" description="COM_COMPONENTBUILDER_JOOMLA_COMPONENTS_EDIT_ADD_LICENSE_DESC" />
<action name="joomla_component.edit.license_type" title="COM_COMPONENTBUILDER_JOOMLA_COMPONENTS_EDIT_LICENSE_TYPE" description="COM_COMPONENTBUILDER_JOOMLA_COMPONENTS_EDIT_LICENSE_TYPE_DESC" />
<action name="joomla_component.version" title="COM_COMPONENTBUILDER_JOOMLA_COMPONENTS_EDIT_VERSION" description="COM_COMPONENTBUILDER_JOOMLA_COMPONENTS_EDIT_VERSION_DESC" />
<action name="joomla_component.export" title="COM_COMPONENTBUILDER_JOOMLA_COMPONENTS_EXPORT" description="COM_COMPONENTBUILDER_JOOMLA_COMPONENTS_EXPORT_DESC" />
<action name="joomla_component.import" title="COM_COMPONENTBUILDER_JOOMLA_COMPONENTS_IMPORT" description="COM_COMPONENTBUILDER_JOOMLA_COMPONENTS_IMPORT_DESC" />
<action name="joomla_component.submenu" title="COM_COMPONENTBUILDER_JOOMLA_COMPONENTS_SUBMENU" description="COM_COMPONENTBUILDER_JOOMLA_COMPONENTS_SUBMENU_DESC" />
<action name="layout.access" title="COM_COMPONENTBUILDER_LAYOUTS_ACCESS" description="COM_COMPONENTBUILDER_LAYOUTS_ACCESS_DESC" />
<action name="layout.batch" title="COM_COMPONENTBUILDER_LAYOUTS_BATCH_USE" description="COM_COMPONENTBUILDER_LAYOUTS_BATCH_USE_DESC" />
<action name="layout.dashboard_add" title="COM_COMPONENTBUILDER_LAYOUTS_DASHBOARD_ADD" description="COM_COMPONENTBUILDER_LAYOUTS_DASHBOARD_ADD_DESC" />
@ -134,6 +144,11 @@
<action name="template.import" title="COM_COMPONENTBUILDER_TEMPLATES_IMPORT" description="COM_COMPONENTBUILDER_TEMPLATES_IMPORT_DESC" />
<action name="template.submenu" title="COM_COMPONENTBUILDER_TEMPLATES_SUBMENU" description="COM_COMPONENTBUILDER_TEMPLATES_SUBMENU_DESC" />
</section>
<section name="joomla_component">
<action name="joomla_component.edit.add_license" title="COM_COMPONENTBUILDER_JOOMLA_COMPONENTS_EDIT_ADD_LICENSE" description="COM_COMPONENTBUILDER_JOOMLA_COMPONENTS_EDIT_ADD_LICENSE_DESC" />
<action name="joomla_component.edit.license_type" title="COM_COMPONENTBUILDER_JOOMLA_COMPONENTS_EDIT_LICENSE_TYPE" description="COM_COMPONENTBUILDER_JOOMLA_COMPONENTS_EDIT_LICENSE_TYPE_DESC" />
<action name="joomla_component.version" title="COM_COMPONENTBUILDER_JOOMLA_COMPONENTS_EDIT_VERSION" description="COM_COMPONENTBUILDER_JOOMLA_COMPONENTS_EDIT_VERSION_DESC" />
</section>
<section name="admin_view">
<action name="core.edit" title="COM_COMPONENTBUILDER_ADMIN_VIEWS_EDIT" description="COM_COMPONENTBUILDER_ADMIN_VIEWS_EDIT_DESC" />
<action name="core.edit.state" title="COM_COMPONENTBUILDER_ADMIN_VIEWS_EDIT_STATE" description="COM_COMPONENTBUILDER_ADMIN_VIEWS_EDIT_STATE_DESC" />

View File

@ -9,8 +9,8 @@
|_|
/-------------------------------------------------------------------------------------------------------------------------------/
@version 2.3.2
@build 11th February, 2017
@version 2.3.6
@build 1st March, 2017
@created 30th April, 2015
@package Component Builder
@subpackage admin.css

View File

@ -9,8 +9,8 @@
|_|
/-------------------------------------------------------------------------------------------------------------------------------/
@version @update number 95 of this MVC
@build 3rd February, 2017
@version @update number 99 of this MVC
@build 1st March, 2017
@created 30th April, 2015
@package Component Builder
@subpackage admin_view.css

View File

@ -9,8 +9,8 @@
|_|
/-------------------------------------------------------------------------------------------------------------------------------/
@version @update number 95 of this MVC
@build 3rd February, 2017
@version @update number 99 of this MVC
@build 1st March, 2017
@created 30th April, 2015
@package Component Builder
@subpackage admin_views.css

View File

@ -9,8 +9,8 @@
|_|
/-------------------------------------------------------------------------------------------------------------------------------/
@version @update number 11 of this MVC
@build 2nd February, 2017
@version @update number 26 of this MVC
@build 28th February, 2017
@created 1st February, 2017
@package Component Builder
@subpackage compiler.css

View File

@ -10,7 +10,7 @@
/-------------------------------------------------------------------------------------------------------------------------------/
@version @update number 22 of this MVC
@build 3rd February, 2017
@build 1st March, 2017
@created 13th August, 2015
@package Component Builder
@subpackage custom_admin_view.css

View File

@ -10,7 +10,7 @@
/-------------------------------------------------------------------------------------------------------------------------------/
@version @update number 22 of this MVC
@build 3rd February, 2017
@build 1st March, 2017
@created 13th August, 2015
@package Component Builder
@subpackage custom_admin_views.css

View File

@ -9,8 +9,8 @@
|_|
/-------------------------------------------------------------------------------------------------------------------------------/
@version @update number 35 of this MVC
@build 10th February, 2017
@version @update number 81 of this MVC
@build 1st March, 2017
@created 11th October, 2016
@package Component Builder
@subpackage custom_code.css

View File

@ -9,8 +9,8 @@
|_|
/-------------------------------------------------------------------------------------------------------------------------------/
@version @update number 35 of this MVC
@build 10th February, 2017
@version @update number 81 of this MVC
@build 1st March, 2017
@created 11th October, 2016
@package Component Builder
@subpackage custom_codes.css

View File

@ -9,8 +9,8 @@
|_|
/-------------------------------------------------------------------------------------------------------------------------------/
@version 2.3.2
@build 11th February, 2017
@version 2.3.6
@build 1st March, 2017
@created 30th April, 2015
@package Component Builder
@subpackage dashboard.css

View File

@ -9,11 +9,11 @@
|_|
/-------------------------------------------------------------------------------------------------------------------------------/
@version @update number 81 of this MVC
@build 3rd February, 2017
@version @update number 96 of this MVC
@build 17th February, 2017
@created 6th May, 2015
@package Component Builder
@subpackage component.css
@subpackage joomla_component.css
@author Llewellyn van der Merwe <http://vdm.bz/component-builder>
@copyright Copyright (C) 2015. All Rights Reserved
@license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html

View File

@ -9,11 +9,11 @@
|_|
/-------------------------------------------------------------------------------------------------------------------------------/
@version @update number 81 of this MVC
@build 3rd February, 2017
@version @update number 96 of this MVC
@build 17th February, 2017
@created 6th May, 2015
@package Component Builder
@subpackage components.css
@subpackage joomla_components.css
@author Llewellyn van der Merwe <http://vdm.bz/component-builder>
@copyright Copyright (C) 2015. All Rights Reserved
@license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html

View File

@ -9,8 +9,8 @@
|_|
/-------------------------------------------------------------------------------------------------------------------------------/
@version @update number 66 of this MVC
@build 3rd February, 2017
@version @update number 67 of this MVC
@build 22nd February, 2017
@created 18th May, 2015
@package Component Builder
@subpackage layout.css

View File

@ -9,8 +9,8 @@
|_|
/-------------------------------------------------------------------------------------------------------------------------------/
@version @update number 66 of this MVC
@build 3rd February, 2017
@version @update number 67 of this MVC
@build 22nd February, 2017
@created 18th May, 2015
@package Component Builder
@subpackage layouts.css

View File

@ -10,7 +10,7 @@
/-------------------------------------------------------------------------------------------------------------------------------/
@version @update number 48 of this MVC
@build 3rd February, 2017
@build 1st March, 2017
@created 29th May, 2015
@package Component Builder
@subpackage site_view.css

View File

@ -10,7 +10,7 @@
/-------------------------------------------------------------------------------------------------------------------------------/
@version @update number 48 of this MVC
@build 3rd February, 2017
@build 1st March, 2017
@created 29th May, 2015
@package Component Builder
@subpackage site_views.css

View File

@ -10,7 +10,7 @@
/-------------------------------------------------------------------------------------------------------------------------------/
@version @update number 40 of this MVC
@build 3rd February, 2017
@build 22nd February, 2017
@created 26th May, 2015
@package Component Builder
@subpackage template.css

View File

@ -10,7 +10,7 @@
/-------------------------------------------------------------------------------------------------------------------------------/
@version @update number 40 of this MVC
@build 3rd February, 2017
@build 22nd February, 2017
@created 26th May, 2015
@package Component Builder
@subpackage templates.css

View File

Before

Width:  |  Height:  |  Size: 13 KiB

After

Width:  |  Height:  |  Size: 13 KiB

View File

Before

Width:  |  Height:  |  Size: 11 KiB

After

Width:  |  Height:  |  Size: 11 KiB

View File

@ -681,57 +681,72 @@ abstract class ###Component###Helper
return $string;
}
public static function safeString($string, $type = 'L', $spacer = '_')
public static function safeString($string, $type = 'L', $spacer = '_', $replaceNumbers = true)
{
// remove all numbers and replace with english text version (works well only up to a thousand)
$string = self::replaceNumbers($string);
if ($replaceNumbers === true)
{
// remove all numbers and replace with english text version (works well only up to millions)
$string = self::replaceNumbers($string);
}
// 0nly continue if we have a string
if (self::checkString($string))
{
// remove all other characters
$string = trim($string);
$string = preg_replace('/'.$spacer.'+/', ' ', $string);
$string = preg_replace('/\s+/', ' ', $string);
$string = preg_replace("/[^A-Za-z ]/", '', $string);
// return a string with all first letter of each word uppercase(no undersocre)
if ($type == 'W')
{
return ucwords(strtolower($string));
}
elseif ($type == 'w')
{
return strtolower($string);
}
elseif ($type == 'Ww')
{
return ucfirst(strtolower($string));
}
elseif ($type == 'WW')
{
return strtoupper($string);
}
elseif ($type == 'U')
{
// replace white space with underscore
$string = preg_replace('/\s+/', $spacer, $string);
// return all upper
return strtoupper($string);
}
elseif ($type == 'F')
{
// replace white space with underscore
$string = preg_replace('/\s+/', $spacer, $string);
// return with first caracter to upper
return ucfirst(strtolower($string));
}
elseif ($type == 'L')
// remove all other characters
$string = trim($string);
$string = preg_replace('/'.$spacer.'+/', ' ', $string);
$string = preg_replace('/\s+/', ' ', $string);
$string = preg_replace("/[^A-Za-z ]/", '', $string);
// select final adaptations
if ($type === 'L' || $type === 'strtolower')
{
// replace white space with underscore
$string = preg_replace('/\s+/', $spacer, $string);
// default is to return lower
return strtolower($string);
}
elseif ($type === 'W')
{
// return a string with all first letter of each word uppercase(no undersocre)
return ucwords(strtolower($string));
}
elseif ($type === 'w' || $type === 'word')
{
// return a string with all lowercase(no undersocre)
return strtolower($string);
}
elseif ($type === 'Ww' || $type === 'Word')
{
// return a string with first letter of the first word uppercase and all the rest lowercase(no undersocre)
return ucfirst(strtolower($string));
}
elseif ($type === 'WW' || $type === 'WORD')
{
// return a string with all the uppercase(no undersocre)
return strtoupper($string);
}
elseif ($type === 'U' || $type === 'strtoupper')
{
// replace white space with underscore
$string = preg_replace('/\s+/', $spacer, $string);
// return all upper
return strtoupper($string);
}
elseif ($type === 'F' || $type === 'ucfirst')
{
// replace white space with underscore
$string = preg_replace('/\s+/', $spacer, $string);
// return with first caracter to upper
return ucfirst(strtolower($string));
}
elseif ($type === 'cA' || $type === 'cAmel' || $type === 'camelcase')
{
// convert all words to first letter uppercase
$string = ucwords(strtolower($string));
// remove white space
$string = preg_replace('/\s+/', '', $string);
// now return first letter lowercase
return lcfirst($string);
}
// return string
return $string;
}

View File

@ -673,62 +673,77 @@ abstract class ###Component###Helper
return $string;
}
public static function safeString($string, $type = 'L', $spacer = '_')
public static function safeString($string, $type = 'L', $spacer = '_', $replaceNumbers = true)
{
// remove all numbers and replace with english text version (works well only up to a thousand)
$string = self::replaceNumbers($string);
if (self::checkString($string))
if ($replaceNumbers === true)
{
// remove all numbers and replace with english text version (works well only up to millions)
$string = self::replaceNumbers($string);
}
// 0nly continue if we have a string
if (self::checkString($string))
{
// remove all other characters
$string = trim($string);
$string = preg_replace('/'.$spacer.'+/', ' ', $string);
$string = preg_replace('/\s+/', ' ', $string);
$string = preg_replace("/[^A-Za-z ]/", '', $string);
// return a string with all first letter of each word uppercase(no undersocre)
if ($type == 'W')
{
return ucwords(strtolower($string));
}
elseif ($type == 'w')
{
return strtolower($string);
}
elseif ($type == 'Ww')
{
return ucfirst(strtolower($string));
}
elseif ($type == 'WW')
{
return strtoupper($string);
}
elseif ($type == 'U')
// select final adaptations
if ($type === 'L' || $type === 'strtolower')
{
// replace white space with underscore
$string = preg_replace('/\s+/', $spacer, $string);
// default is to return lower
return strtolower($string);
}
elseif ($type === 'W')
{
// replace white space with underscore
$string = preg_replace('/\s+/', $spacer, $string);
// return all upper
return strtoupper($string);
// return a string with all first letter of each word uppercase(no undersocre)
return ucwords(strtolower($string));
}
elseif ($type == 'F')
elseif ($type === 'w' || $type === 'word')
{
// replace white space with underscore
$string = preg_replace('/\s+/', $spacer, $string);
// return with first caracter to upper
// return a string with all lowercase(no undersocre)
return strtolower($string);
}
elseif ($type === 'Ww' || $type === 'Word')
{
// return a string with first letter of the first word uppercase and all the rest lowercase(no undersocre)
return ucfirst(strtolower($string));
}
elseif ($type == 'L')
elseif ($type === 'WW' || $type === 'WORD')
{
// replace white space with underscore
$string = preg_replace('/\s+/', $spacer, $string);
// default is to return lower
return strtolower($string);
// return a string with all the uppercase(no undersocre)
return strtoupper($string);
}
// return string
return $string;
}
// not a string
return '';
elseif ($type === 'U' || $type === 'strtoupper')
{
// replace white space with underscore
$string = preg_replace('/\s+/', $spacer, $string);
// return all upper
return strtoupper($string);
}
elseif ($type === 'F' || $type === 'ucfirst')
{
// replace white space with underscore
$string = preg_replace('/\s+/', $spacer, $string);
// return with first caracter to upper
return ucfirst(strtolower($string));
}
elseif ($type === 'cA' || $type === 'cAmel' || $type === 'camelcase')
{
// convert all words to first letter uppercase
$string = ucwords(strtolower($string));
// remove white space
$string = preg_replace('/\s+/', '', $string);
// now return first letter lowercase
return lcfirst($string);
}
// return string
return $string;
}
// not a string
return '';
}
public static function htmlEscape($var, $charset = 'UTF-8', $sorten = false, $length = 40)

View File

@ -47,5 +47,5 @@ class ###Component###Controller###Views### extends JControllerAdmin
$model = parent::getModel($name, $prefix, array('ignore_request' => true));
return $model;
}###CONTROLLEREXIMPORTMETHOD### ###CUSTOM_ADMIN_DYNAMIC_BUTTONS_CONTROLLER###
}###CONTROLLEREXIMPORTMETHOD### ###CUSTOM_ADMIN_DYNAMIC_BUTTONS_CONTROLLER### ###ADMIN_CUSTOM_BUTTONS_CONTROLLER_LIST###
}

View File

@ -47,7 +47,7 @@ class ###Component###Model###Views### extends JModelList
}
parent::__construct($config);
}
}###ADMIN_CUSTOM_BUTTONS_METHOD_LIST###
/**
* Method to auto-populate the model state.

View File

@ -52,7 +52,8 @@ class ###Component###ViewImport extends JViewLegacy
}
// Check for errors.
if (count($errors = $this->get('Errors'))){
if (count($errors = $this->get('Errors')))
{
JError::raiseError(500, implode('<br />', $errors));
return false;
}

View File

@ -132,7 +132,7 @@ class ###Component###View###Views### extends JViewLegacy
// add the button to the page
$dhtml = $layout->render(array('title' => $title));
$bar->appendButton('Custom', $dhtml, 'batch');
}###CUSTOM_ADMIN_DYNAMIC_BUTTONS###
}###CUSTOM_ADMIN_DYNAMIC_BUTTONS### ###ADMIN_CUSTOM_BUTTONS_LIST###
if ($this->state->get('filter.published') == -2 && ($this->canState && $this->canDelete))
{

View File

@ -10,8 +10,8 @@
|_|
/-------------------------------------------------------------------------------------------------------------------------------/
@version 2.3.2
@build 11th February, 2017
@version 2.3.6
@build 1st March, 2017
@created 30th April, 2015
@package Component Builder
@subpackage componentbuilder.php

View File

@ -10,8 +10,8 @@
|_|
/-------------------------------------------------------------------------------------------------------------------------------/
@version 2.3.2
@build 11th February, 2017
@version 2.3.6
@build 1st March, 2017
@created 30th April, 2015
@package Component Builder
@subpackage controller.php
@ -88,7 +88,7 @@ class ComponentbuilderController extends JControllerLegacy
if (ComponentbuilderHelper::checkString($view))
{
$views = array(
'component' => 'components',
'joomla_component' => 'joomla_components',
'admin_view' => 'admin_views',
'custom_admin_view' => 'custom_admin_views',
'site_view' => 'site_views',

View File

@ -10,8 +10,8 @@
|_|
/-------------------------------------------------------------------------------------------------------------------------------/
@version @update number 95 of this MVC
@build 3rd February, 2017
@version @update number 99 of this MVC
@build 1st March, 2017
@created 30th April, 2015
@package Component Builder
@subpackage admin_view.php

View File

@ -10,8 +10,8 @@
|_|
/-------------------------------------------------------------------------------------------------------------------------------/
@version @update number 95 of this MVC
@build 3rd February, 2017
@version @update number 99 of this MVC
@build 1st March, 2017
@created 30th April, 2015
@package Component Builder
@subpackage admin_views.php
@ -107,5 +107,5 @@ class ComponentbuilderControllerAdmin_views extends JControllerAdmin
$message = JText::_('COM_COMPONENTBUILDER_IMPORT_FAILED');
$this->setRedirect(JRoute::_('index.php?option=com_componentbuilder&view=admin_views', false), $message, 'error');
return;
}
}
}

View File

@ -10,8 +10,8 @@
|_|
/-------------------------------------------------------------------------------------------------------------------------------/
@version 2.3.2
@build 11th February, 2017
@version 2.3.6
@build 1st March, 2017
@created 30th April, 2015
@package Component Builder
@subpackage ajax.json.php
@ -44,6 +44,7 @@ class ComponentbuilderControllerAjax extends JControllerLegacy
// load the tasks
$this->registerTask('isNew', 'ajax');
$this->registerTask('isRead', 'ajax');
$this->registerTask('getComponentDetails', 'ajax');
$this->registerTask('tableColumns', 'ajax');
$this->registerTask('fieldSelectOptions', 'ajax');
$this->registerTask('getImportScripts', 'ajax');
@ -54,6 +55,8 @@ class ComponentbuilderControllerAjax extends JControllerLegacy
$this->registerTask('dynamicFormDetails', 'ajax');
$this->registerTask('dbTableColumns', 'ajax');
$this->registerTask('viewTableColumns', 'ajax');
$this->registerTask('checkFunctionName', 'ajax');
$this->registerTask('usedin', 'ajax');
$this->registerTask('fieldOptions', 'ajax');
}
@ -145,6 +148,44 @@ class ComponentbuilderControllerAjax extends JControllerLegacy
}
}
break;
case 'getComponentDetails':
try
{
$returnRaw = $jinput->get('raw', false, 'BOOLEAN');
$idValue = $jinput->get('id', NULL, 'INT');
if($idValue && $user->id != 0)
{
$result = $this->getModel('ajax')->getComponentDetails($idValue);
}
else
{
$result = false;
}
if($callback = $jinput->get('callback', null, 'CMD'))
{
echo $callback . "(".json_encode($result).");";
}
elseif($returnRaw)
{
echo json_encode($result);
}
else
{
echo "(".json_encode($result).");";
}
}
catch(Exception $e)
{
if($callback = $jinput->get('callback', null, 'CMD'))
{
echo $callback."(".json_encode($e).");";
}
else
{
echo "(".json_encode($e).");";
}
}
break;
case 'tableColumns':
try
{
@ -530,6 +571,85 @@ class ComponentbuilderControllerAjax extends JControllerLegacy
}
}
break;
case 'checkFunctionName':
try
{
$returnRaw = $jinput->get('raw', false, 'BOOLEAN');
$functioNameValue = $jinput->get('functioName', NULL, 'STRING');
$idValue = $jinput->get('id', NULL, 'INT');
if($functioNameValue && $idValue && $user->id != 0)
{
$result = $this->getModel('ajax')->checkFunctionName($functioNameValue, $idValue);
}
else
{
$result = false;
}
if($callback = $jinput->get('callback', null, 'CMD'))
{
echo $callback . "(".json_encode($result).");";
}
elseif($returnRaw)
{
echo json_encode($result);
}
else
{
echo "(".json_encode($result).");";
}
}
catch(Exception $e)
{
if($callback = $jinput->get('callback', null, 'CMD'))
{
echo $callback."(".json_encode($e).");";
}
else
{
echo "(".json_encode($e).");";
}
}
break;
case 'usedin':
try
{
$returnRaw = $jinput->get('raw', false, 'BOOLEAN');
$functioNameValue = $jinput->get('functioName', NULL, 'WORD');
$idValue = $jinput->get('id', NULL, 'INT');
$targetValue = $jinput->get('target', NULL, 'WORD');
if($functioNameValue && $idValue && $targetValue && $user->id != 0)
{
$result = $this->getModel('ajax')->usedin($functioNameValue, $idValue, $targetValue);
}
else
{
$result = false;
}
if($callback = $jinput->get('callback', null, 'CMD'))
{
echo $callback . "(".json_encode($result).");";
}
elseif($returnRaw)
{
echo json_encode($result);
}
else
{
echo "(".json_encode($result).");";
}
}
catch(Exception $e)
{
if($callback = $jinput->get('callback', null, 'CMD'))
{
echo $callback."(".json_encode($e).");";
}
else
{
echo "(".json_encode($e).");";
}
}
break;
case 'fieldOptions':
try
{

View File

@ -10,8 +10,8 @@
|_|
/-------------------------------------------------------------------------------------------------------------------------------/
@version @update number 11 of this MVC
@build 2nd February, 2017
@version @update number 26 of this MVC
@build 28th February, 2017
@created 1st February, 2017
@package Component Builder
@subpackage compiler.php
@ -66,15 +66,17 @@ class ComponentbuilderControllerCompiler extends JControllerAdmin
if($user->authorise('core.admin', 'com_componentbuilder'))
{
// get the post values
$jinput = JFactory::getApplication()->input;
$componentId = $jinput->post->get('component', 0, 'INT');
$version = $jinput->post->get('version', 0, 'INT');
$addBackup = $jinput->post->get('backup', 0, 'INT');
$addGit = $jinput->post->get('git', 0, 'INT');
$jinput = JFactory::getApplication()->input;
$componentId = $jinput->post->get('component', 0, 'INT');
$version = $jinput->post->get('version', 0, 'INT');
$addBackup = $jinput->post->get('backup', 0, 'INT');
$addGit = $jinput->post->get('git', 0, 'INT');
$addPlaceholders = $jinput->post->get('placeholders', 2, 'INT');
$debugLinenr = $jinput->post->get('debuglinenr', 2, 'INT');
// include component compiler
require_once JPATH_ADMINISTRATOR.'/components/com_componentbuilder/helpers/compiler.php';
$model = $this->getModel('compiler');
if ($model->builder($version,$componentId,$addBackup,$addGit))
if ($model->builder($version,$componentId,$addBackup,$addGit,$addPlaceholders,$debugLinenr))
{
$cache = JFactory::getCache('mod_menu');
$cache->clean();
@ -143,6 +145,7 @@ class ComponentbuilderControllerCompiler extends JControllerAdmin
$message .= '<b>URL:</b> <code>'.$url.'</code><br /><br />';
$message .= '<small>Hey! you can also download the file right now!</small><br /><a class="btn btn-success" href="'.$url.'" ><span class="icon-download icon-white"></span>Download</a></p>';
$message .= '<p><small><b>Remember!</b> This file is in your tmp folder and therefore publicly accessible untill you click [Clear tmp]!</small> </p>';
$message .= '<p><small>Compilation took <b>'.$counter['time'].'</b> seconds to complete.</small> </p>';
// set redirect
$this->setRedirect($redirect_url,$message,'message');
$app->setUserState('com_componentbuilder.extension_name', $counter['filename']);

View File

@ -10,8 +10,8 @@
|_|
/-------------------------------------------------------------------------------------------------------------------------------/
@version 2.3.2
@build 11th February, 2017
@version 2.3.6
@build 1st March, 2017
@created 30th April, 2015
@package Component Builder
@subpackage componentbuilder.php

View File

@ -11,7 +11,7 @@
/-------------------------------------------------------------------------------------------------------------------------------/
@version @update number 22 of this MVC
@build 3rd February, 2017
@build 1st March, 2017
@created 13th August, 2015
@package Component Builder
@subpackage custom_admin_view.php

View File

@ -11,7 +11,7 @@
/-------------------------------------------------------------------------------------------------------------------------------/
@version @update number 22 of this MVC
@build 3rd February, 2017
@build 1st March, 2017
@created 13th August, 2015
@package Component Builder
@subpackage custom_admin_views.php
@ -107,5 +107,5 @@ class ComponentbuilderControllerCustom_admin_views extends JControllerAdmin
$message = JText::_('COM_COMPONENTBUILDER_IMPORT_FAILED');
$this->setRedirect(JRoute::_('index.php?option=com_componentbuilder&view=custom_admin_views', false), $message, 'error');
return;
}
}
}

View File

@ -10,8 +10,8 @@
|_|
/-------------------------------------------------------------------------------------------------------------------------------/
@version @update number 35 of this MVC
@build 10th February, 2017
@version @update number 81 of this MVC
@build 1st March, 2017
@created 11th October, 2016
@package Component Builder
@subpackage custom_code.php

View File

@ -10,8 +10,8 @@
|_|
/-------------------------------------------------------------------------------------------------------------------------------/
@version @update number 35 of this MVC
@build 10th February, 2017
@version @update number 81 of this MVC
@build 1st March, 2017
@created 11th October, 2016
@package Component Builder
@subpackage custom_codes.php
@ -107,5 +107,5 @@ class ComponentbuilderControllerCustom_codes extends JControllerAdmin
$message = JText::_('COM_COMPONENTBUILDER_IMPORT_FAILED');
$this->setRedirect(JRoute::_('index.php?option=com_componentbuilder&view=custom_codes', false), $message, 'error');
return;
}
}
}

View File

@ -107,5 +107,5 @@ class ComponentbuilderControllerDynamic_gets extends JControllerAdmin
$message = JText::_('COM_COMPONENTBUILDER_IMPORT_FAILED');
$this->setRedirect(JRoute::_('index.php?option=com_componentbuilder&view=dynamic_gets', false), $message, 'error');
return;
}
}
}

View File

@ -107,5 +107,5 @@ class ComponentbuilderControllerFields extends JControllerAdmin
$message = JText::_('COM_COMPONENTBUILDER_IMPORT_FAILED');
$this->setRedirect(JRoute::_('index.php?option=com_componentbuilder&view=fields', false), $message, 'error');
return;
}
}
}

View File

@ -107,5 +107,5 @@ class ComponentbuilderControllerFieldtypes extends JControllerAdmin
$message = JText::_('COM_COMPONENTBUILDER_IMPORT_FAILED');
$this->setRedirect(JRoute::_('index.php?option=com_componentbuilder&view=fieldtypes', false), $message, 'error');
return;
}
}
}

View File

@ -10,8 +10,8 @@
|_|
/-------------------------------------------------------------------------------------------------------------------------------/
@version 2.3.2
@build 11th February, 2017
@version 2.3.6
@build 1st March, 2017
@created 30th April, 2015
@package Component Builder
@subpackage help.php

View File

@ -107,5 +107,5 @@ class ComponentbuilderControllerHelp_documents extends JControllerAdmin
$message = JText::_('COM_COMPONENTBUILDER_IMPORT_FAILED');
$this->setRedirect(JRoute::_('index.php?option=com_componentbuilder&view=help_documents', false), $message, 'error');
return;
}
}
}

View File

@ -10,8 +10,8 @@
|_|
/-------------------------------------------------------------------------------------------------------------------------------/
@version 2.3.2
@build 11th February, 2017
@version 2.3.6
@build 1st March, 2017
@created 30th April, 2015
@package Component Builder
@subpackage import.php

View File

@ -10,11 +10,11 @@
|_|
/-------------------------------------------------------------------------------------------------------------------------------/
@version @update number 81 of this MVC
@build 3rd February, 2017
@version @update number 96 of this MVC
@build 17th February, 2017
@created 6th May, 2015
@package Component Builder
@subpackage component.php
@subpackage joomla_component.php
@author Llewellyn van der Merwe <http://vdm.bz/component-builder>
@copyright Copyright (C) 2015. All Rights Reserved
@license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html
@ -30,9 +30,9 @@ defined('_JEXEC') or die('Restricted access');
jimport('joomla.application.component.controllerform');
/**
* Component Controller
* Joomla_component Controller
*/
class ComponentbuilderControllerComponent extends JControllerForm
class ComponentbuilderControllerJoomla_component extends JControllerForm
{
/**
* Current or most recently performed task.
@ -45,7 +45,7 @@ class ComponentbuilderControllerComponent extends JControllerForm
public function __construct($config = array())
{
$this->view_list = 'Components'; // safeguard for setting the return view listing to the main view.
$this->view_list = 'Joomla_components'; // safeguard for setting the return view listing to the main view.
parent::__construct($config);
}
@ -59,7 +59,14 @@ class ComponentbuilderControllerComponent extends JControllerForm
* @since 1.6
*/
protected function allowAdd($data = array())
{ // In the absense of better information, revert to the component permissions.
{
// Access check.
$access = JFactory::getUser()->authorise('joomla_component.access', 'com_componentbuilder');
if (!$access)
{
return false;
}
// In the absense of better information, revert to the component permissions.
return parent::allowAdd($data);
}
@ -84,10 +91,10 @@ class ComponentbuilderControllerComponent extends JControllerForm
if ($recordId)
{
// The record has been set. Check the record permissions.
$permission = $user->authorise('core.edit', 'com_componentbuilder.component.' . (int) $recordId);
$permission = $user->authorise('core.edit', 'com_componentbuilder.joomla_component.' . (int) $recordId);
if (!$permission)
{
if ($user->authorise('core.edit.own', 'com_componentbuilder.component.' . $recordId))
if ($user->authorise('core.edit.own', 'com_componentbuilder.joomla_component.' . $recordId))
{
// Now test the owner is the user.
$ownerId = (int) isset($data['created_by']) ? $data['created_by'] : 0;
@ -182,10 +189,10 @@ class ComponentbuilderControllerComponent extends JControllerForm
JSession::checkToken() or jexit(JText::_('JINVALID_TOKEN'));
// Set the model
$model = $this->getModel('Component', '', array());
$model = $this->getModel('Joomla_component', '', array());
// Preset the redirect
$this->setRedirect(JRoute::_('index.php?option=com_componentbuilder&view=components' . $this->getRedirectToListAppend(), false));
$this->setRedirect(JRoute::_('index.php?option=com_componentbuilder&view=joomla_components' . $this->getRedirectToListAppend(), false));
return parent::batch($model);
}

View File

@ -10,11 +10,11 @@
|_|
/-------------------------------------------------------------------------------------------------------------------------------/
@version @update number 81 of this MVC
@build 3rd February, 2017
@version @update number 96 of this MVC
@build 17th February, 2017
@created 6th May, 2015
@package Component Builder
@subpackage components.php
@subpackage joomla_components.php
@author Llewellyn van der Merwe <http://vdm.bz/component-builder>
@copyright Copyright (C) 2015. All Rights Reserved
@license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html
@ -30,16 +30,16 @@ defined('_JEXEC') or die('Restricted access');
jimport('joomla.application.component.controlleradmin');
/**
* Components Controller
* Joomla_components Controller
*/
class ComponentbuilderControllerComponents extends JControllerAdmin
class ComponentbuilderControllerJoomla_components extends JControllerAdmin
{
protected $text_prefix = 'COM_COMPONENTBUILDER_COMPONENTS';
protected $text_prefix = 'COM_COMPONENTBUILDER_JOOMLA_COMPONENTS';
/**
* Proxy for getModel.
* @since 2.5
*/
public function getModel($name = 'Component', $prefix = 'ComponentbuilderModel', $config = array())
public function getModel($name = 'Joomla_component', $prefix = 'ComponentbuilderModel', $config = array())
{
$model = parent::getModel($name, $prefix, array('ignore_request' => true));
@ -52,7 +52,7 @@ class ComponentbuilderControllerComponents extends JControllerAdmin
JSession::checkToken() or die(JText::_('JINVALID_TOKEN'));
// check if export is allowed for this user.
$user = JFactory::getUser();
if ($user->authorise('component.export', 'com_componentbuilder') && $user->authorise('core.export', 'com_componentbuilder'))
if ($user->authorise('joomla_component.export', 'com_componentbuilder') && $user->authorise('core.export', 'com_componentbuilder'))
{
// Get the input
$input = JFactory::getApplication()->input;
@ -60,19 +60,19 @@ class ComponentbuilderControllerComponents extends JControllerAdmin
// Sanitize the input
JArrayHelper::toInteger($pks);
// Get the model
$model = $this->getModel('Components');
$model = $this->getModel('Joomla_components');
// get the data to export
$data = $model->getExportData($pks);
if (ComponentbuilderHelper::checkArray($data))
{
// now set the data to the spreadsheet
$date = JFactory::getDate();
ComponentbuilderHelper::xls($data,'Components_'.$date->format('jS_F_Y'),'Components exported ('.$date->format('jS F, Y').')','components');
ComponentbuilderHelper::xls($data,'Joomla_components_'.$date->format('jS_F_Y'),'Joomla components exported ('.$date->format('jS F, Y').')','joomla components');
}
}
// Redirect to the list screen with error.
$message = JText::_('COM_COMPONENTBUILDER_EXPORT_FAILED');
$this->setRedirect(JRoute::_('index.php?option=com_componentbuilder&view=components', false), $message, 'error');
$this->setRedirect(JRoute::_('index.php?option=com_componentbuilder&view=joomla_components', false), $message, 'error');
return;
}
@ -83,10 +83,10 @@ class ComponentbuilderControllerComponents extends JControllerAdmin
JSession::checkToken() or die(JText::_('JINVALID_TOKEN'));
// check if import is allowed for this user.
$user = JFactory::getUser();
if ($user->authorise('component.import', 'com_componentbuilder') && $user->authorise('core.import', 'com_componentbuilder'))
if ($user->authorise('joomla_component.import', 'com_componentbuilder') && $user->authorise('core.import', 'com_componentbuilder'))
{
// Get the import model
$model = $this->getModel('Components');
$model = $this->getModel('Joomla_components');
// get the headers to import
$headers = $model->getExImPortHeaders();
if (ComponentbuilderHelper::checkObject($headers))
@ -94,18 +94,18 @@ class ComponentbuilderControllerComponents extends JControllerAdmin
// Load headers to session.
$session = JFactory::getSession();
$headers = json_encode($headers);
$session->set('component_VDM_IMPORTHEADERS', $headers);
$session->set('backto_VDM_IMPORT', 'components');
$session->set('dataType_VDM_IMPORTINTO', 'component');
$session->set('joomla_component_VDM_IMPORTHEADERS', $headers);
$session->set('backto_VDM_IMPORT', 'joomla_components');
$session->set('dataType_VDM_IMPORTINTO', 'joomla_component');
// Redirect to import view.
$message = JText::_('COM_COMPONENTBUILDER_IMPORT_SELECT_FILE_FOR_COMPONENTS');
$message = JText::_('COM_COMPONENTBUILDER_IMPORT_SELECT_FILE_FOR_JOOMLA_COMPONENTS');
$this->setRedirect(JRoute::_('index.php?option=com_componentbuilder&view=import', false), $message);
return;
}
}
// Redirect to the list screen with error.
$message = JText::_('COM_COMPONENTBUILDER_IMPORT_FAILED');
$this->setRedirect(JRoute::_('index.php?option=com_componentbuilder&view=components', false), $message, 'error');
$this->setRedirect(JRoute::_('index.php?option=com_componentbuilder&view=joomla_components', false), $message, 'error');
return;
}
}
}

View File

@ -10,8 +10,8 @@
|_|
/-------------------------------------------------------------------------------------------------------------------------------/
@version @update number 66 of this MVC
@build 3rd February, 2017
@version @update number 67 of this MVC
@build 22nd February, 2017
@created 18th May, 2015
@package Component Builder
@subpackage layout.php

View File

@ -10,8 +10,8 @@
|_|
/-------------------------------------------------------------------------------------------------------------------------------/
@version @update number 66 of this MVC
@build 3rd February, 2017
@version @update number 67 of this MVC
@build 22nd February, 2017
@created 18th May, 2015
@package Component Builder
@subpackage layouts.php
@ -107,5 +107,5 @@ class ComponentbuilderControllerLayouts extends JControllerAdmin
$message = JText::_('COM_COMPONENTBUILDER_IMPORT_FAILED');
$this->setRedirect(JRoute::_('index.php?option=com_componentbuilder&view=layouts', false), $message, 'error');
return;
}
}
}

View File

@ -11,7 +11,7 @@
/-------------------------------------------------------------------------------------------------------------------------------/
@version @update number 48 of this MVC
@build 3rd February, 2017
@build 1st March, 2017
@created 29th May, 2015
@package Component Builder
@subpackage site_view.php

View File

@ -11,7 +11,7 @@
/-------------------------------------------------------------------------------------------------------------------------------/
@version @update number 48 of this MVC
@build 3rd February, 2017
@build 1st March, 2017
@created 29th May, 2015
@package Component Builder
@subpackage site_views.php
@ -107,5 +107,5 @@ class ComponentbuilderControllerSite_views extends JControllerAdmin
$message = JText::_('COM_COMPONENTBUILDER_IMPORT_FAILED');
$this->setRedirect(JRoute::_('index.php?option=com_componentbuilder&view=site_views', false), $message, 'error');
return;
}
}
}

View File

@ -107,5 +107,5 @@ class ComponentbuilderControllerSnippets extends JControllerAdmin
$message = JText::_('COM_COMPONENTBUILDER_IMPORT_FAILED');
$this->setRedirect(JRoute::_('index.php?option=com_componentbuilder&view=snippets', false), $message, 'error');
return;
}
}
}

View File

@ -11,7 +11,7 @@
/-------------------------------------------------------------------------------------------------------------------------------/
@version @update number 40 of this MVC
@build 3rd February, 2017
@build 22nd February, 2017
@created 26th May, 2015
@package Component Builder
@subpackage template.php

View File

@ -11,7 +11,7 @@
/-------------------------------------------------------------------------------------------------------------------------------/
@version @update number 40 of this MVC
@build 3rd February, 2017
@build 22nd February, 2017
@created 26th May, 2015
@package Component Builder
@subpackage templates.php
@ -107,5 +107,5 @@ class ComponentbuilderControllerTemplates extends JControllerAdmin
$message = JText::_('COM_COMPONENTBUILDER_IMPORT_FAILED');
$this->setRedirect(JRoute::_('index.php?option=com_componentbuilder&view=templates', false), $message, 'error');
return;
}
}
}

View File

@ -41,6 +41,15 @@ class Compiler extends Infusion
*/
private $tempPath;
/*
* The timer
*
* @var string
*/
private $time_start;
private $time_end;
public $secondsCompiled;
public $filepath = '';
// fixed pathes
protected $dynamicIntegration = false;
@ -53,7 +62,8 @@ class Compiler extends Infusion
*/
public function __construct($config = array ())
{
// $time_start = microtime(true);
// to check the compiler speed
$this->time_start = microtime(true);
// first we run the perent constructor
if (parent::__construct($config))
{
@ -88,46 +98,27 @@ class Compiler extends Infusion
{
return false;
}
// we can remove all undeeded data
$this->freeMemory();
// check if this component is install on the current website
if ($paths = $this->getLocalInstallPaths())
{
// start Automatic import of custom code
$userId = JFactory::getUser()->id;
$today = JFactory::getDate()->toSql();
// Get a db connection.
$db = JFactory::getDbo();
// get the custom code from installed files
$this->customCodeFactory($paths, $db, $userId, $today);
}
// now add the other custom code by placeholder
if (ComponentbuilderHelper::checkArray($this->addCustomCodeAt))
{
// load error messages incase code can not be added
$app = JFactory::getApplication();
$this->addCustomCodeViaPlaceholders($app);
}
// check if we have custom code to add
$this->getCustomCode();
// now insert into the new files
if (ComponentbuilderHelper::checkArray($this->customCode))
{
// load error messages incase code can not be added
$app = JFactory::getApplication();
$this->addCustomCode($app);
if ($this->getCustomCode())
{
$this->addCustomCode();
}
// set the lang data now
$this->setLangFileData();
// move the update server into place
$this->setUpdateServer();
// build read me
$this->buildReadMe();
// zip the component
if (!$this->zipComponent())
{
// done
// done with error
return false;
}
// $time_end = microtime(true);
// $time = $time_end - $time_start;
// var_dump("Did Test in ($time seconds)");die;
// end the timer here
$this->time_end = microtime(true);
$this->secondsCompiled = $this->time_end - $this->time_start;
// completed the compilation
return true;
}
return false;
@ -159,7 +150,9 @@ class Compiler extends Infusion
protected function updateFiles()
{
if (isset($this->newFiles['static']) && ComponentbuilderHelper::checkArray($this->newFiles['static']) && isset($this->newFiles['dynamic']) && ComponentbuilderHelper::checkArray($this->newFiles['dynamic']))
{
{
// we don't update lang now since we will still posible add custom code
$langCheck = 'en-GB.com_'.$this->fileContentStatic['###component###'].'.';
// get the bom file
$bom = JFile::read($this->bomPath);
// first we do the static files
@ -167,6 +160,12 @@ class Compiler extends Infusion
{
if (JFile::exists($static['path']))
{
// skip lang files and store for later
if (strpos($static['path'], $langCheck))
{
$this->langFiles[] = $static;
continue;
}
$this->fileContentStatic['###FILENAME###'] = $static['name'];
$php = '';
if (ComponentbuilderHelper::checkFileType($static['name'],'php'))
@ -179,16 +178,12 @@ class Compiler extends Infusion
list($wast,$code) = explode('###BOM###',$string);
$string = $php.$bom.$code;
$answer = $this->setPlaceholders($string, $this->fileContentStatic, 3);
// add custom Code by placeholder if found
$this->getPlaceHolderKeys($static['path'], $answer);
// add to zip array
$this->writeFile($static['path'],$answer);
}
else
{
$answer = $this->setPlaceholders($string, $this->fileContentStatic, 3);
// add custom Code by placeholder if found
$this->getPlaceHolderKeys($static['path'], $answer);
// add to zip array
$this->writeFile($static['path'],$answer);
}
@ -221,8 +216,6 @@ class Compiler extends Infusion
$string = $php.$bom.$code;
$answer = $this->setPlaceholders($string, $this->fileContentStatic, 3);
$answer = $this->setPlaceholders($answer, $this->fileContentDynamic[$view], 3);
// add custom Code by placeholder if found
$this->getPlaceHolderKeys($file['path'], $answer, $view);
// add to zip array
$this->writeFile($file['path'],$answer);
}
@ -230,8 +223,6 @@ class Compiler extends Infusion
{
$answer = $this->setPlaceholders($string, $this->fileContentStatic, 3);
$answer = $this->setPlaceholders($answer, $this->fileContentDynamic[$view], 3);
// add custom Code by placeholder if found
$this->getPlaceHolderKeys($file['path'], $answer, $view);
// add to zip array
$this->writeFile($file['path'],$answer);
}
@ -245,155 +236,10 @@ class Compiler extends Infusion
}
// free up some memory
unset($this->newFiles['dynamic']);
// do a final run to update the readme file
$two = 0;
foreach ($this->newFiles['static'] as $static)
{
if (('README.md' === $static['name'] || 'README.txt' === $static['name']) && $this->componentData->addreadme && JFile::exists($static['path']))
{
$this->buildReadMe($static['path']);
$two++;
}
if ($two == 2)
{
break;
}
}
return true;
}
return false;
}
protected function getPlaceHolderKeys(&$file, &$content, &$view = '')
{
// check if line has custom code place holder
if (strpos($content, '[CUSTO'.'MCODE=') !== false)
{
if (!isset($this->addCustomCodeAt[$file]))
{
$this->addCustomCodeAt[$file] = array();
$this->addCustomCodeAt[$file]['ids'] = array();
$this->addCustomCodeAt[$file]['args'] = array();
$this->addCustomCodeAt[$file]['view'] = $view;
}
$found = ComponentbuilderHelper::getAllBetween($content, '[CUSTO'.'MCODE=', ']');
if (ComponentbuilderHelper::checkArray($found))
{
foreach ($found as $key)
{
// check if we have args
if (is_numeric($key))
{
$id = (int) $key;
}
elseif (strpos($key, '+') !== false)
{
$array = explode('+', $key);
// set ID
$id = (int) $array[0];
// load args for this ID
if (isset($array[1]))
{
if (!isset($this->addCustomCodeAt[$file]['args'][$id]))
{
$this->addCustomCodeAt[$file]['args'][$id] = array();
}
// only load if not already loaded
if (!isset($this->addCustomCodeAt[$file]['args'][$id][$key]))
{
if (strpos($array[1], ',') !== false)
{
$this->addCustomCodeAt[$file]['args'][$id][$key] = array_map('trim', explode(',', $array[1]));
}
elseif (ComponentbuilderHelper::checkString($array[1]))
{
$this->addCustomCodeAt[$file]['args'][$id][$key] = array();
$this->addCustomCodeAt[$file]['args'][$id][$key][] = trim($array[1]);
}
}
}
}
else
{
continue;
}
$this->addCustomCodeAt[$file]['ids'][$id] = $id;
}
}
}
}
protected function freeMemory()
{
// free up some memory
unset($this->newFiles['static']);
unset($this->customScriptBuilder);
unset($this->permissionCore);
unset($this->permissionDashboard);
unset($this->componentData->admin_views);
unset($this->componentData->site_views);
unset($this->componentData->custom_admin_views);
unset($this->componentData->config);
unset($this->joomlaVersionData);
// unset($this->langContent);
unset($this->dbKeys);
unset($this->permissionBuilder);
unset($this->layoutBuilder);
unset($this->historyBuilder);
unset($this->aliasBuilder);
unset($this->titleBuilder);
unset($this->customBuilderList);
unset($this->hiddenFieldsBuilder);
unset($this->intFieldsBuilder);
unset($this->dynamicfieldsBuilder);
unset($this->maintextBuilder);
unset($this->customFieldLinksBuilder);
unset($this->setScriptUserSwitch);
unset($this->categoryBuilder);
unset($this->catCodeBuilder);
unset($this->checkboxBuilder);
unset($this->jsonItemBuilder);
unset($this->base64Builder);
unset($this->basicEncryptionBuilder);
unset($this->advancedEncryptionBuilder);
unset($this->getItemsMethodListStringFixBuilder);
unset($this->getItemsMethodEximportStringFixBuilder);
unset($this->selectionTranslationFixBuilder);
unset($this->listBuilder);
unset($this->customBuilder);
unset($this->editBodyViewScriptBuilder);
unset($this->queryBuilder);
unset($this->sortBuilder);
unset($this->searchBuilder);
unset($this->filterBuilder);
unset($this->fieldsNames);
unset($this->siteFields);
unset($this->siteFieldData);
unset($this->customFieldScript);
unset($this->configFieldSets);
unset($this->jsonStringBuilder);
unset($this->importCustomScripts);
unset($this->eximportView);
unset($this->uninstallBuilder);
unset($this->listColnrBuilder);
unset($this->customFieldBuilder);
unset($this->permissionFields);
unset($this->getAsLookup);
unset($this->secondRunAdmin);
unset($this->uninstallScriptBuilder);
unset($this->buildCategories);
unset($this->iconBuilder);
unset($this->validationFixBuilder);
unset($this->targetRelationControl);
unset($this->targetControlsScriptChecker);
unset($this->accessBuilder);
unset($this->tabCounter);
unset($this->linkedAdminViews);
unset($this->uniquekeys);
unset($this->uniquecodes);
$this->unsetNow('_adminViewData');
$this->unsetNow('_fieldData');
}
/**
* move the local update server xml file to a remote ftp server
@ -457,7 +303,26 @@ class Compiler extends Infusion
$this->fileContentStatic['###VERSION###'] = $this->fileContentStatic['###VERSION###GLOBAL'];
}
private function buildReadMe($path)
private function buildReadMe()
{
// do a final run to update the readme file
$two = 0;
foreach ($this->newFiles['static'] as $static)
{
if (('README.md' === $static['name'] || 'README.txt' === $static['name']) && $this->componentData->addreadme && JFile::exists($static['path']))
{
$this->setReadMe($static['path']);
$two++;
}
if ($two == 2)
{
break;
}
}
unset($this->newFiles['static']);
}
private function setReadMe($path)
{
// set readme data if not set already
if (!isset($this->fileContentStatic['###LINE_COUNT###']) || $this->fileContentStatic['###LINE_COUNT###'] != $this->lineCount)
@ -672,98 +537,10 @@ class Compiler extends Infusion
return false;
}
protected function addCustomCodeViaPlaceholders($app)
{
// reset all these
$this->clearFromPlaceHolders('view');
foreach ($this->addCustomCodeAt as $path => $item)
{
if (ComponentbuilderHelper::checkString($item['view']))
{
$this->placeholders['[[[view]]]'] = $item['view'];
}
elseif (isset($this->placeholders['[[[view]]]']))
{
unset($this->placeholders['[[[view]]]']);
}
if ($this->getCustomCode($item['ids']))
{
$code = array();
foreach($this->customCode as $dbitem)
{
$this->buildCustomCodeForPlaceholders($item, $dbitem, $code);
}
// now update the file
$string = JFile::read($path);
$answer = $this->setPlaceholders($string, $code);
$this->writeFile($path,$answer);
}
else
{
$app->enqueueMessage(JText::sprintf('Custom code could not be added to <b>%s</b> <br />Since there where no publish code returned from the database.', $path), 'warning');
}
}
}
protected function buildCustomCodeForPlaceholders(&$at, &$item, &$code)
{
// check if there is args for this code
if (isset($at['args'][$item['id']]) && ComponentbuilderHelper::checkArray($at['args'][$item['id']]))
{
// since we have args we cant update this code via editor (TODO)
$placeholder = $this->getPlaceHolder(3, null);
// we have args and so need to load each
foreach ($at['args'][$item['id']] as $key => $args)
{
$this->setThesePlaceHolders('arg', $args);
$code['[CUSTOM'.'CODE='.$key.']'] = $placeholder['start'] . PHP_EOL . $this->setPlaceholders($item['code'], $this->placeholders). $placeholder['end'];
}
}
else
{
// check what type of place holders we should load here (if view is being updated then we can't use inserted)
$placeholderType = 2;
if (strpos($item['code'], '[[[view]]]') !== false)
{
// since we have views we can't update this code via editor (TODO)
$placeholderType = 3;
}
// if now ars were found, clear it
$this->clearFromPlaceHolders('arg');
// load args for this code
$placeholder = $this->getPlaceHolder($placeholderType, $item['id']);
$code['[CUSTOM'.'CODE='.$item['id'].']'] = $placeholder['start'] . PHP_EOL . $this->setPlaceholders($item['code'], $this->placeholders). $placeholder['end'];
}
}
protected function setThesePlaceHolders($key, $values)
{
// aways fist reset these
$this->clearFromPlaceHolders($key);
if (ComponentbuilderHelper::checkArray($values))
{
$number = 0;
foreach ($values as $value)
{
$this->placeholders['[[['.$key.$number.']]]'] = $value;
$number++;
}
}
}
protected function clearFromPlaceHolders($like)
{
foreach ($this->placeholders as $something => $value)
{
if (stripos($something, $like) !== false)
{
unset($this->placeholders[$something]);
}
}
}
protected function addCustomCode($app)
protected function addCustomCode()
{
// load error messages incase code can not be added
$app = JFactory::getApplication();
// reset all these
$this->clearFromPlaceHolders('view');
$this->clearFromPlaceHolders('arg');
@ -860,8 +637,8 @@ class Compiler extends Infusion
}
if ($found)
{
$placeholder = $this->getPlaceHolder($target['type'], $target['id']);
$data = $placeholder['start'] . PHP_EOL . $this->setPlaceholders($target['code'], $this->placeholders). $placeholder['end'];
$placeholder = $this->getPlaceHolder((int) $target['comment_type'].$target['type'], $target['id']);
$data = $placeholder['start'] . PHP_EOL . $this->setPlaceholders($target['code'], $this->placeholders). $placeholder['end'] . PHP_EOL;
if ($target['type'] == 2)
{
// found it now add code from the next line
@ -870,7 +647,7 @@ class Compiler extends Infusion
elseif ($target['type'] == 1 && $foundEnd)
{
// found it now add code from the next line
$this->addDataToFile($file, $data . PHP_EOL, $bites, (int) array_sum($replace));
$this->addDataToFile($file, $data, $bites, (int) array_sum($replace));
}
else
{
@ -901,7 +678,7 @@ class Compiler extends Infusion
$code = explode(PHP_EOL, $target['code']);
$code = PHP_EOL."// " .implode(PHP_EOL."// ",$code). PHP_EOL;
// get place holders
$placeholder = $this->getPlaceHolder($target['type'], $target['id']);
$placeholder = $this->getPlaceHolder((int) $target['comment_type'].$target['type'], $target['id']);
// build the data
$data = $placeholder['start'] . $code . $placeholder['end']. PHP_EOL;
// get the bites before insertion

File diff suppressed because it is too large Load Diff

View File

@ -969,38 +969,4 @@ class Structure extends Get
}
return false;
}
/**
* get the local installed path of this component
*
* @return array of paths on success
*
*/
public function getLocalInstallPaths()
{
// set the local paths to search
$localPaths = array();
// the admin path
$localPaths['admin'] = JPATH_ADMINISTRATOR . '/components/com_'. $this->componentCodeName;
// only check for site path if the component has a site area!
if (!$this->removeSiteFolder)
{
$localPaths['site'] = JPATH_ROOT . '/components/com_'. $this->componentCodeName;
}
// TODO later to include the JS and CSS
// $localPaths['media'] = JPATH_ROOT . '/media/com_'. $this->fileContentStatic['###component###'];
// check if the local install is found
foreach ($localPaths as $key => $localPath)
{
if (!JFolder::exists($localPath))
{
unset($localPaths[$key]);
}
}
if (ComponentbuilderHelper::checkArray($localPaths))
{
return $localPaths;
}
return false;
}
}

View File

@ -31,15 +31,7 @@ defined('_JEXEC') or die('Restricted access');
*/
class Interpretation extends Fields
{
/*
* The line numbers Switch
*
* @var boolean
*/
public $loadLineNr = false;
public $theContributors = '';
public $placeholders = array();
public $uninstallBuilder = array();
public $listColnrBuilder = array();
public $permissionBuilder = array();
@ -65,8 +57,6 @@ class Interpretation extends Fields
// first we run the perent constructor
if (parent::__construct($config))
{
// set if line numbers should be added to comments
$this->loadLineNr = ($this->componentData->debug_linenr) ? true:false;
return true;
}
return false;
@ -2738,20 +2728,33 @@ class Interpretation extends Fields
public function setCustomButtons(&$view, $type = 1, $tab = '')
{
if (1 == $type)
{
$viewName = $view['settings']->code;
}
if (2 == $type)
{
$viewName = ComponentbuilderHelper::safeString($view['settings']->name_single);
}
// ensure correct target is set
$TARGET = ComponentbuilderHelper::safeString($this->target,'U');
// set the custom buttons ###CUSTOM_BUTTONS_CONTROLLER###
$this->fileContentDynamic[$viewName]['###'.$TARGET.'_CUSTOM_BUTTONS_CONTROLLER###'] = '';
// set the custom buttons ###CUSTOM_BUTTONS_METHOD###
$this->fileContentDynamic[$viewName]['###'.$TARGET.'_CUSTOM_BUTTONS_METHOD###'] = '';
if (1 == $type || 2 == $type)
{
if (1 == $type)
{
$viewName = $view['settings']->code;
}
if (2 == $type)
{
$viewName = ComponentbuilderHelper::safeString($view['settings']->name_single);
}
// set the custom buttons ###CUSTOM_BUTTONS_CONTROLLER###
$this->fileContentDynamic[$viewName]['###'.$TARGET.'_CUSTOM_BUTTONS_CONTROLLER###'] = '';
// set the custom buttons ###CUSTOM_BUTTONS_METHOD###
$this->fileContentDynamic[$viewName]['###'.$TARGET.'_CUSTOM_BUTTONS_METHOD###'] = '';
}
elseif (3 == $type)
{
// set the names
$viewName = ComponentbuilderHelper::safeString($view['settings']->name_single);
$viewsName = ComponentbuilderHelper::safeString($view['settings']->name_list);
// set the custom buttons ###CUSTOM_BUTTONS_CONTROLLER_LIST###
$this->fileContentDynamic[$viewsName]['###'.$TARGET.'_CUSTOM_BUTTONS_CONTROLLER_LIST###'] = '';
// set the custom buttons ###CUSTOM_BUTTONS_METHOD_LIST###
$this->fileContentDynamic[$viewsName]['###'.$TARGET.'_CUSTOM_BUTTONS_METHOD_LIST###'] = '';
}
// if site add buttons to view
if ($this->target === 'site')
{
@ -2788,30 +2791,10 @@ class Interpretation extends Fields
// check if custom button should be added
if (isset($view['settings']->add_custom_button) && $view['settings']->add_custom_button == 1)
{
// insure the controller and model strings are added
if (ComponentbuilderHelper::checkString($view['settings']->php_controller) && $view['settings']->php_controller != '//')
{
// set the custom buttons ###CUSTOM_BUTTONS_CONTROLLER###
$this->fileContentDynamic[$viewName]['###'.$TARGET.'_CUSTOM_BUTTONS_CONTROLLER###'] =
PHP_EOL.PHP_EOL.$this->setPlaceholders($view['settings']->php_controller, $this->placeholders);
if ('site' === $this->target)
{
// add the controller for this view
// build the file
$target = array($this->target => $viewName);
$this->buildDynamique($target,'custom_form');
###GET_FORM_CUSTOM###
}
}
if (ComponentbuilderHelper::checkString($view['settings']->php_model) && $view['settings']->php_model != '//')
{
// set the custom buttons ###CUSTOM_BUTTONS_METHOD###
$this->fileContentDynamic[$viewName]['###'.$TARGET.'_CUSTOM_BUTTONS_METHOD###'] =
PHP_EOL.PHP_EOL.$this->setPlaceholders($view['settings']->php_model, $this->placeholders);
}
$buttons = array();
$functionNames = array();
if (isset($view['settings']->custom_buttons) && ComponentbuilderHelper::checkArray($view['settings']->custom_buttons))
{
$buttons = array();
foreach ($view['settings']->custom_buttons as $custom_button)
{
if ($custom_button['target'] != 2 || $this->target === 'site')
@ -2827,11 +2810,69 @@ class Interpretation extends Fields
$buttons[] = "\t".$tab."\t\tJToolBarHelper::custom('".$viewName.".".$custom_button['method']."', '".$custom_button['icomoon']."', '', '".$keyLang."', false);";
$buttons[] = "\t".$tab."\t}";
}
// load the list button
elseif (3 == $type && ($custom_button['target'] == 2 || $custom_button['target'] == 3))
{
// Load to lang
$keyLang = $this->langPrefix.'_'.ComponentbuilderHelper::safeString($custom_button['name'],'U');
$keyCode = ComponentbuilderHelper::safeString($custom_button['name']);
$this->langContent[$this->lang][$keyLang] = trim($custom_button['name']);
// add cpanel button TODO does not work well on site with permissions
$buttons[] = "\t".$tab."\tif (\$this->canDo->get('".$viewName.".".$keyCode."'))";
$buttons[] = "\t".$tab."\t{";
$buttons[] = "\t".$tab."\t\t//".$this->setLine(__LINE__)." add ".$custom_button['name']." button.";
$buttons[] = "\t".$tab."\t\tJToolBarHelper::custom('".$viewsName.".".$custom_button['method']."', '".$custom_button['icomoon']."', '', '".$keyLang."', false);";
$buttons[] = "\t".$tab."\t}";
}
}
if (ComponentbuilderHelper::checkArray($buttons))
}
// load the model and controller
if (3 == $type)
{
// insure the controller and model strings are added
if (isset($view['settings']->php_controller_list) && ComponentbuilderHelper::checkString($view['settings']->php_controller_list) && $view['settings']->php_controller_list != '//')
{
return PHP_EOL.implode(PHP_EOL,$buttons);
// set the custom buttons ###CUSTOM_BUTTONS_CONTROLLER###
$this->fileContentDynamic[$viewsName]['###'.$TARGET.'_CUSTOM_BUTTONS_CONTROLLER_LIST###'] =
PHP_EOL.PHP_EOL.$this->setPlaceholders($view['settings']->php_controller_list, $this->placeholders);
}
// load the model
if (isset($view['settings']->php_model_list) && ComponentbuilderHelper::checkString($view['settings']->php_model_list) && $view['settings']->php_model_list != '//')
{
// set the custom buttons ###CUSTOM_BUTTONS_METHOD###
$this->fileContentDynamic[$viewsName]['###'.$TARGET.'_CUSTOM_BUTTONS_METHOD_LIST###'] =
PHP_EOL.PHP_EOL.$this->setPlaceholders($view['settings']->php_model_list, $this->placeholders);
}
}
else
{
// insure the controller and model strings are added
if (ComponentbuilderHelper::checkString($view['settings']->php_controller) && $view['settings']->php_controller != '//')
{
// set the custom buttons ###CUSTOM_BUTTONS_CONTROLLER###
$this->fileContentDynamic[$viewName]['###'.$TARGET.'_CUSTOM_BUTTONS_CONTROLLER'.$list.'###'] =
PHP_EOL.PHP_EOL.$this->setPlaceholders($view['settings']->php_controller, $this->placeholders);
if ('site' === $this->target)
{
// add the controller for this view
// build the file
$target = array($this->target => $viewName);
$this->buildDynamique($target,'custom_form');
###GET_FORM_CUSTOM###
}
}
// load the model
if (ComponentbuilderHelper::checkString($view['settings']->php_model) && $view['settings']->php_model != '//')
{
// set the custom buttons ###CUSTOM_BUTTONS_METHOD###
$this->fileContentDynamic[$viewName]['###'.$TARGET.'_CUSTOM_BUTTONS_METHOD'.$list.'###'] =
PHP_EOL.PHP_EOL.$this->setPlaceholders($view['settings']->php_model, $this->placeholders);
}
}
// return buttons if they were build
if (ComponentbuilderHelper::checkArray($buttons))
{
return PHP_EOL.implode(PHP_EOL,$buttons);
}
}
return '';
@ -4780,7 +4821,7 @@ class Interpretation extends Fields
{
$db .= PHP_EOL."\t`id` INT(11) NOT NULL AUTO_INCREMENT,";
}
$db .= PHP_EOL."\t`asset_id` INT(255) UNSIGNED NOT NULL DEFAULT '0',";
$db .= PHP_EOL."\t`asset_id` INT(10) unsigned NOT NULL DEFAULT 0 COMMENT 'FK to the #__assets table.',";
ksort($fields);
foreach ($fields as $field => $data)
{
@ -4826,22 +4867,22 @@ class Interpretation extends Fields
// check if default field was over written
if (!isset($this->fieldsNames[$view]['params']))
{
$db .= PHP_EOL."\t`params` TEXT NOT NULL,";
$db .= PHP_EOL."\t`params` text NOT NULL DEFAULT '',";
}
// check if default field was over written
if (!isset($this->fieldsNames[$view]['published']))
{
$db .= PHP_EOL."\t`published` TINYINT(1) NOT NULL DEFAULT '1',";
$db .= PHP_EOL."\t`published` TINYINT(3) NOT NULL DEFAULT 1,";
}
// check if default field was over written
if (!isset($this->fieldsNames[$view]['created_by']))
{
$db .= PHP_EOL."\t`created_by` INT(11) NOT NULL DEFAULT '0',";
$db .= PHP_EOL."\t`created_by` INT(10) unsigned NOT NULL DEFAULT 0,";
}
// check if default field was over written
if (!isset($this->fieldsNames[$view]['modified_by']))
{
$db .= PHP_EOL."\t`modified_by` INT(11) NOT NULL DEFAULT '0',";
$db .= PHP_EOL."\t`modified_by` INT(10) unsigned NOT NULL DEFAULT 0,";
}
// check if default field was over written
if (!isset($this->fieldsNames[$view]['created']))
@ -4856,7 +4897,7 @@ class Interpretation extends Fields
// check if default field was over written
if (!isset($this->fieldsNames[$view]['checked_out']))
{
$db .= PHP_EOL."\t`checked_out` INT(11) NOT NULL,";
$db .= PHP_EOL."\t`checked_out` int(11) unsigned NOT NULL DEFAULT 0,";
}
// check if default field was over written
if (!isset($this->fieldsNames[$view]['checked_out_time']))
@ -4866,22 +4907,22 @@ class Interpretation extends Fields
// check if default field was over written
if (!isset($this->fieldsNames[$view]['version']))
{
$db .= PHP_EOL."\t`version` INT(11) NOT NULL DEFAULT '1',";
$db .= PHP_EOL."\t`version` INT(10) unsigned NOT NULL DEFAULT 1,";
}
// check if default field was over written
if (!isset($this->fieldsNames[$view]['hits']))
{
$db .= PHP_EOL."\t`hits` INT(11) NOT NULL DEFAULT '0',";
$db .= PHP_EOL."\t`hits` INT(10) unsigned NOT NULL DEFAULT 0,";
}
// check if view has access
if (isset($this->accessBuilder[$view]) && ComponentbuilderHelper::checkString($this->accessBuilder[$view]))
{
$db .= PHP_EOL."\t`access` INT(11) DEFAULT NULL,";
$db .= PHP_EOL."\t`access` INT(10) unsigned NOT NULL DEFAULT 0,";
}
// check if default field was over written
if (!isset($this->fieldsNames[$view]['ordering']))
{
$db .= PHP_EOL."\t`ordering` INT(11) NOT NULL DEFAULT '0',";
$db .= PHP_EOL."\t`ordering` INT(11) NOT NULL DEFAULT 0,";
}
// check if metadata is added to this view
if (isset($this->metadataBuilder[$view]) && ComponentbuilderHelper::checkString($this->metadataBuilder[$view]))

View File

@ -34,6 +34,7 @@ class Infusion extends Interpretation
public $eximportView = array();
public $importCustomScripts = array();
public $langFiles = array();
public $removeSiteFolder = false;
/**
@ -425,6 +426,8 @@ class Infusion extends Interpretation
// ###CHECKINCALL### <<<DYNAMIC>>>
$this->fileContentDynamic[$viewName_list]['###CHECKINCALL###'] = '';
}
// ###ADMIN_CUSTOM_BUTTONS_LIST###
$this->fileContentDynamic[$viewName_list]['###ADMIN_CUSTOM_BUTTONS_LIST###'] = $this->setCustomButtons($view, 3, "\t");
// ###GET_ITEMS_METHOD_STRING_FIX### <<<DYNAMIC>>>
$this->fileContentDynamic[$viewName_list]['###GET_ITEMS_METHOD_STRING_FIX###'] = $this->setGetItemsMethodStringFix($viewName_single,$this->fileContentStatic['###Component###']);
@ -1019,18 +1022,6 @@ class Infusion extends Interpretation
// clear all site folder since none is needed
$this->removeSiteFolder = true;
}
// ###LANG_ADMIN###
$this->fileContentStatic['###LANG_ADMIN###'] = $this->setLangAdmin();
// ###LANG_ADMIN_SYS###
$this->fileContentStatic['###LANG_ADMIN_SYS###'] = $this->setLangAdminSys();
// ###LANG_SITE###
$this->fileContentStatic['###LANG_SITE###'] = $this->setLangSite();
// ###LANG_SITE_SYS###
$this->fileContentStatic['###LANG_SITE_SYS###'] = $this->setLangSiteSys();
// ###PREINSTALLSCRIPT###
$this->fileContentStatic['###PREINSTALLSCRIPT###'] = $this->getCustomScriptBuilder('php_preflight', 'install', PHP_EOL, null, true);
@ -1072,5 +1063,41 @@ class Infusion extends Interpretation
}
return false;
}
/**
* Build the lang values and insert to fiel
*
*
* @return boolean on success
*
*/
public function setLangFileData()
{
// First we build the strings
$lang = array();
// ###LANG_ADMIN###
$lang['###LANG_ADMIN###'] = $this->setLangAdmin();
// ###LANG_ADMIN_SYS###
$lang['###LANG_ADMIN_SYS###'] = $this->setLangAdminSys();
// ###LANG_SITE###
$lang['###LANG_SITE###'] = $this->setLangSite();
// ###LANG_SITE_SYS###
$lang['###LANG_SITE_SYS###'] = $this->setLangSiteSys();
// now we insert the values into the files
if (ComponentbuilderHelper::checkArray($this->langFiles))
{
foreach ($this->langFiles as $file)
{
$string = JFile::read($file['path']);
// load the data
$answer = $this->setPlaceholders($string, $lang, 3);
// add to zip array
$this->writeFile($file['path'],$answer);
// set the line counter
$this->lineCount = $this->lineCount + substr_count($answer, PHP_EOL);
}
}
}
}

View File

@ -10,8 +10,8 @@
|_|
/-------------------------------------------------------------------------------------------------------------------------------/
@version 2.3.2
@build 11th February, 2017
@version 2.3.6
@build 1st March, 2017
@created 30th April, 2015
@package Component Builder
@subpackage componentbuilder.php
@ -412,7 +412,10 @@ abstract class ComponentbuilderHelper
{
JHtmlSidebar::addEntry(JText::_('COM_COMPONENTBUILDER_SUBMENU_COMPILER'), 'index.php?option=com_componentbuilder&view=compiler', $submenu === 'compiler');
}
JHtmlSidebar::addEntry(JText::_('COM_COMPONENTBUILDER_SUBMENU_COMPONENTS'), 'index.php?option=com_componentbuilder&view=components', $submenu === 'components');
if ($user->authorise('joomla_component.access', 'com_componentbuilder') && $user->authorise('joomla_component.submenu', 'com_componentbuilder'))
{
JHtmlSidebar::addEntry(JText::_('COM_COMPONENTBUILDER_SUBMENU_JOOMLA_COMPONENTS'), 'index.php?option=com_componentbuilder&view=joomla_components', $submenu === 'joomla_components');
}
if ($user->authorise('admin_view.access', 'com_componentbuilder') && $user->authorise('admin_view.submenu', 'com_componentbuilder'))
{
JHtmlSidebar::addEntry(JText::_('COM_COMPONENTBUILDER_SUBMENU_ADMIN_VIEWS'), 'index.php?option=com_componentbuilder&view=admin_views', $submenu === 'admin_views');
@ -1330,57 +1333,72 @@ abstract class ComponentbuilderHelper
return $string;
}
public static function safeString($string, $type = 'L', $spacer = '_')
public static function safeString($string, $type = 'L', $spacer = '_', $replaceNumbers = true)
{
// remove all numbers and replace with english text version (works well only up to a thousand)
$string = self::replaceNumbers($string);
if ($replaceNumbers === true)
{
// remove all numbers and replace with english text version (works well only up to millions)
$string = self::replaceNumbers($string);
}
// 0nly continue if we have a string
if (self::checkString($string))
{
// remove all other characters
$string = trim($string);
$string = preg_replace('/'.$spacer.'+/', ' ', $string);
$string = preg_replace('/\s+/', ' ', $string);
$string = preg_replace("/[^A-Za-z ]/", '', $string);
// return a string with all first letter of each word uppercase(no undersocre)
if ($type == 'W')
{
return ucwords(strtolower($string));
}
elseif ($type == 'w')
{
return strtolower($string);
}
elseif ($type == 'Ww')
{
return ucfirst(strtolower($string));
}
elseif ($type == 'WW')
{
return strtoupper($string);
}
elseif ($type == 'U')
{
// replace white space with underscore
$string = preg_replace('/\s+/', $spacer, $string);
// return all upper
return strtoupper($string);
}
elseif ($type == 'F')
{
// replace white space with underscore
$string = preg_replace('/\s+/', $spacer, $string);
// return with first caracter to upper
return ucfirst(strtolower($string));
}
elseif ($type == 'L')
// remove all other characters
$string = trim($string);
$string = preg_replace('/'.$spacer.'+/', ' ', $string);
$string = preg_replace('/\s+/', ' ', $string);
$string = preg_replace("/[^A-Za-z ]/", '', $string);
// select final adaptations
if ($type === 'L' || $type === 'strtolower')
{
// replace white space with underscore
$string = preg_replace('/\s+/', $spacer, $string);
// default is to return lower
return strtolower($string);
}
elseif ($type === 'W')
{
// return a string with all first letter of each word uppercase(no undersocre)
return ucwords(strtolower($string));
}
elseif ($type === 'w' || $type === 'word')
{
// return a string with all lowercase(no undersocre)
return strtolower($string);
}
elseif ($type === 'Ww' || $type === 'Word')
{
// return a string with first letter of the first word uppercase and all the rest lowercase(no undersocre)
return ucfirst(strtolower($string));
}
elseif ($type === 'WW' || $type === 'WORD')
{
// return a string with all the uppercase(no undersocre)
return strtoupper($string);
}
elseif ($type === 'U' || $type === 'strtoupper')
{
// replace white space with underscore
$string = preg_replace('/\s+/', $spacer, $string);
// return all upper
return strtoupper($string);
}
elseif ($type === 'F' || $type === 'ucfirst')
{
// replace white space with underscore
$string = preg_replace('/\s+/', $spacer, $string);
// return with first caracter to upper
return ucfirst(strtolower($string));
}
elseif ($type === 'cA' || $type === 'cAmel' || $type === 'camelcase')
{
// convert all words to first letter uppercase
$string = ucwords(strtolower($string));
// remove white space
$string = preg_replace('/\s+/', '', $string);
// now return first letter lowercase
return lcfirst($string);
}
// return string
return $string;
}

View File

@ -69,12 +69,12 @@ class Mapping
* The datatypes and it linked field types (basic)
* (TODO) We may need to set this dynamicly
*/
protected $dataTypes = array( 'CHAR' => 'Text', 'VARCHAR' => 'Text',
'TEXT' => 'Textarea', 'MEDIUMTEXT' => 'Textarea',
'LONGTEXT' => 'Textarea', 'DATE' => 'Text', 'TIME' => 'Text',
'DATETIME' => 'Calendar', 'INT' => 'Text', 'TINYINT' => 'Text',
'BIGINT' => 'Text', 'FLOAT' => 'Text', 'DECIMAL' => 'Text',
'DOUBLE' => 'Text');
protected $dataTypes = array( 'VARCHAR' => 'Text', 'CHAR' => 'Text',
'MEDIUMTEXT' => 'Textarea', 'LONGTEXT' => 'Textarea',
'TEXT' => 'Textarea', 'DATETIME' => 'Calendar',
'DATE' => 'Text', 'TIME' => 'Text', 'TINYINT' => 'Text',
'BIGINT' => 'Text', 'INT' => 'Text', 'FLOAT' => 'Text',
'DECIMAL' => 'Text', 'DOUBLE' => 'Text');
/**
* The datasize identifiers

View File

@ -10,8 +10,8 @@
|_|
/-------------------------------------------------------------------------------------------------------------------------------/
@version 2.3.2
@build 11th February, 2017
@version 2.3.6
@build 1st March, 2017
@created 30th April, 2015
@package Component Builder
@subpackage headercheck.php

View File

@ -10,8 +10,8 @@
|_|
/-------------------------------------------------------------------------------------------------------------------------------/
@version 2.3.2
@build 11th February, 2017
@version 2.3.6
@build 1st March, 2017
@created 30th April, 2015
@package Component Builder
@subpackage batch_.php

View File

@ -10,8 +10,8 @@
|_|
/-------------------------------------------------------------------------------------------------------------------------------/
@version 2.3.2
@build 11th February, 2017
@version 2.3.6
@build 1st March, 2017
@created 30th April, 2015
@package Component Builder
@subpackage indenter.php

View File

@ -10,8 +10,8 @@
|_|
/-------------------------------------------------------------------------------------------------------------------------------/
@version 2.3.2
@build 11th February, 2017
@version 2.3.6
@build 1st March, 2017
@created 30th April, 2015
@package Component Builder
@subpackage js.php

View File

@ -10,8 +10,8 @@
|_|
/-------------------------------------------------------------------------------------------------------------------------------/
@version 2.3.2
@build 11th February, 2017
@version 2.3.6
@build 1st March, 2017
@created 30th April, 2015
@package Component Builder
@subpackage minify.php

File diff suppressed because it is too large Load Diff

View File

@ -3,13 +3,13 @@ COM_COMPONENTBUILDER_CONFIGURATION="Component Builder Configuration"
COM_COMPONENTBUILDER_MENU="&#187; Component Builder"
COM_COMPONENTBUILDER_MENU_ADMIN_VIEWS="Admin Views"
COM_COMPONENTBUILDER_MENU_COMPILER="Compiler"
COM_COMPONENTBUILDER_MENU_COMPONENTS="Components"
COM_COMPONENTBUILDER_MENU_CUSTOM_ADMIN_VIEWS="Custom Admin Views"
COM_COMPONENTBUILDER_MENU_CUSTOM_CODES="Custom Codes"
COM_COMPONENTBUILDER_MENU_DYNAMIC_GETS="Dynamic Gets"
COM_COMPONENTBUILDER_MENU_FIELDS="Fields"
COM_COMPONENTBUILDER_MENU_FIELDTYPES="Fieldtypes"
COM_COMPONENTBUILDER_MENU_HELP_DOCUMENTS="Help Documents"
COM_COMPONENTBUILDER_MENU_JOOMLA_COMPONENTS="Joomla Components"
COM_COMPONENTBUILDER_MENU_LAYOUTS="Layouts"
COM_COMPONENTBUILDER_MENU_SITE_VIEWS="Site Views"
COM_COMPONENTBUILDER_MENU_SNIPPETS="Snippets"

View File

@ -10,8 +10,8 @@
|_|
/-------------------------------------------------------------------------------------------------------------------------------/
@version 2.3.2
@build 11th February, 2017
@version 2.3.6
@build 1st March, 2017
@created 30th April, 2015
@package Component Builder
@subpackage css_fullwidth.php

View File

@ -10,8 +10,8 @@
|_|
/-------------------------------------------------------------------------------------------------------------------------------/
@version 2.3.2
@build 11th February, 2017
@version 2.3.6
@build 1st March, 2017
@created 30th April, 2015
@package Component Builder
@subpackage custom_buttons_fullwidth.php
@ -31,7 +31,9 @@ $form = $displayData->getForm();
$fields = $displayData->get('fields') ?: array(
'php_controller',
'php_model'
'php_controller_list',
'php_model',
'php_model_list'
);
?>

View File

@ -10,8 +10,8 @@
|_|
/-------------------------------------------------------------------------------------------------------------------------------/
@version 2.3.2
@build 11th February, 2017
@version 2.3.6
@build 1st March, 2017
@created 30th April, 2015
@package Component Builder
@subpackage custom_buttons_left.php

View File

@ -10,8 +10,8 @@
|_|
/-------------------------------------------------------------------------------------------------------------------------------/
@version 2.3.2
@build 11th February, 2017
@version 2.3.6
@build 1st March, 2017
@created 30th April, 2015
@package Component Builder
@subpackage custom_import_fullwidth.php

View File

@ -10,8 +10,8 @@
|_|
/-------------------------------------------------------------------------------------------------------------------------------/
@version 2.3.2
@build 11th February, 2017
@version 2.3.6
@build 1st March, 2017
@created 30th April, 2015
@package Component Builder
@subpackage fields_fullwidth.php

View File

@ -10,8 +10,8 @@
|_|
/-------------------------------------------------------------------------------------------------------------------------------/
@version 2.3.2
@build 11th February, 2017
@version 2.3.6
@build 1st March, 2017
@created 30th April, 2015
@package Component Builder
@subpackage javascript_fullwidth.php

View File

@ -10,8 +10,8 @@
|_|
/-------------------------------------------------------------------------------------------------------------------------------/
@version 2.3.2
@build 11th February, 2017
@version 2.3.6
@build 1st March, 2017
@created 30th April, 2015
@package Component Builder
@subpackage linked_components_fullwidth.php
@ -31,37 +31,37 @@ defined('_JEXEC') or die('Restricted access');
$items = $displayData->vxulinked_components;
$user = JFactory::getUser();
$id = $displayData->item->id;
$edit = "index.php?option=com_componentbuilder&view=components&task=component.edit";
$edit = "index.php?option=com_componentbuilder&view=joomla_components&task=joomla_component.edit";
?>
<div class="form-vertical">
<?php if (ComponentbuilderHelper::checkArray($items)): ?>
<table class="footable table data components" data-show-toggle="true" data-toggle-column="first" data-sorting="true" data-paging="true" data-paging-size="20" data-filtering="true">
<table class="footable table data joomla_components" data-show-toggle="true" data-toggle-column="first" data-sorting="true" data-paging="true" data-paging-size="20" data-filtering="true">
<thead>
<tr>
<th data-type="html" data-sort-use="text">
<?php echo JText::_('COM_COMPONENTBUILDER_COMPONENT_SYSTEM_NAME_LABEL'); ?>
<?php echo JText::_('COM_COMPONENTBUILDER_JOOMLA_COMPONENT_SYSTEM_NAME_LABEL'); ?>
</th>
<th data-breakpoints="xs sm" data-type="html" data-sort-use="text">
<?php echo JText::_('COM_COMPONENTBUILDER_COMPONENT_NAME_CODE_LABEL'); ?>
<?php echo JText::_('COM_COMPONENTBUILDER_JOOMLA_COMPONENT_NAME_CODE_LABEL'); ?>
</th>
<th data-breakpoints="xs sm" data-type="html" data-sort-use="text">
<?php echo JText::_('COM_COMPONENTBUILDER_COMPONENT_COMPONENT_VERSION_LABEL'); ?>
<?php echo JText::_('COM_COMPONENTBUILDER_JOOMLA_COMPONENT_COMPONENT_VERSION_LABEL'); ?>
</th>
<th data-breakpoints="xs sm md" data-type="html" data-sort-use="text">
<?php echo JText::_('COM_COMPONENTBUILDER_COMPONENT_SHORT_DESCRIPTION_LABEL'); ?>
<?php echo JText::_('COM_COMPONENTBUILDER_JOOMLA_COMPONENT_SHORT_DESCRIPTION_LABEL'); ?>
</th>
<th data-breakpoints="xs sm md" data-type="html" data-sort-use="text">
<?php echo JText::_('COM_COMPONENTBUILDER_COMPONENT_COMPANYNAME_LABEL'); ?>
<?php echo JText::_('COM_COMPONENTBUILDER_JOOMLA_COMPONENT_COMPANYNAME_LABEL'); ?>
</th>
<th data-breakpoints="xs sm md" data-type="html" data-sort-use="text">
<?php echo JText::_('COM_COMPONENTBUILDER_COMPONENT_AUTHOR_LABEL'); ?>
<?php echo JText::_('COM_COMPONENTBUILDER_JOOMLA_COMPONENT_AUTHOR_LABEL'); ?>
</th>
<th width="10" data-breakpoints="xs sm md">
<?php echo JText::_('COM_COMPONENTBUILDER_COMPONENT_STATUS'); ?>
<?php echo JText::_('COM_COMPONENTBUILDER_JOOMLA_COMPONENT_STATUS'); ?>
</th>
<th width="5" data-type="number" data-breakpoints="xs sm md">
<?php echo JText::_('COM_COMPONENTBUILDER_COMPONENT_ID'); ?>
<?php echo JText::_('COM_COMPONENTBUILDER_JOOMLA_COMPONENT_ID'); ?>
</th>
</tr>
</thead>
@ -70,14 +70,14 @@ $edit = "index.php?option=com_componentbuilder&view=components&task=component.ed
<?php
$canCheckin = $user->authorise('core.manage', 'com_checkin') || $item->checked_out == $user->id || $item->checked_out == 0;
$userChkOut = JFactory::getUser($item->checked_out);
$canDo = ComponentbuilderHelper::getActions('component',$item,'components');
$canDo = ComponentbuilderHelper::getActions('joomla_component',$item,'joomla_components');
?>
<tr>
<td class="nowrap">
<?php if ($canDo->get('core.edit')): ?>
<a href="<?php echo $edit; ?>&id=<?php echo $item->id; ?>&ref=admin_view&refid=<?php echo $id; ?>"><?php echo $displayData->escape($item->system_name); ?></a>
<?php if ($item->checked_out): ?>
<?php echo JHtml::_('jgrid.checkedout', $i, $userChkOut->name, $item->checked_out_time, 'components.', $canCheckin); ?>
<?php echo JHtml::_('jgrid.checkedout', $i, $userChkOut->name, $item->checked_out_time, 'joomla_components.', $canCheckin); ?>
<?php endif; ?>
<?php else: ?>
<div class="name"><?php echo $displayData->escape($item->system_name); ?></div>

View File

@ -10,8 +10,8 @@
|_|
/-------------------------------------------------------------------------------------------------------------------------------/
@version 2.3.2
@build 11th February, 2017
@version 2.3.6
@build 1st March, 2017
@created 30th April, 2015
@package Component Builder
@subpackage mysql_fullwidth.php

View File

@ -10,8 +10,8 @@
|_|
/-------------------------------------------------------------------------------------------------------------------------------/
@version 2.3.2
@build 11th February, 2017
@version 2.3.6
@build 1st March, 2017
@created 30th April, 2015
@package Component Builder
@subpackage mysql_left.php

View File

@ -10,8 +10,8 @@
|_|
/-------------------------------------------------------------------------------------------------------------------------------/
@version 2.3.2
@build 11th February, 2017
@version 2.3.6
@build 1st March, 2017
@created 30th April, 2015
@package Component Builder
@subpackage php_fullwidth.php

View File

@ -10,8 +10,8 @@
|_|
/-------------------------------------------------------------------------------------------------------------------------------/
@version 2.3.2
@build 11th February, 2017
@version 2.3.6
@build 1st March, 2017
@created 30th April, 2015
@package Component Builder
@subpackage publishing.php

View File

@ -10,8 +10,8 @@
|_|
/-------------------------------------------------------------------------------------------------------------------------------/
@version 2.3.2
@build 11th February, 2017
@version 2.3.6
@build 1st March, 2017
@created 30th April, 2015
@package Component Builder
@subpackage publlshing.php

View File

@ -10,8 +10,8 @@
|_|
/-------------------------------------------------------------------------------------------------------------------------------/
@version 2.3.2
@build 11th February, 2017
@version 2.3.6
@build 1st March, 2017
@created 30th April, 2015
@package Component Builder
@subpackage settings_above.php

View File

@ -10,8 +10,8 @@
|_|
/-------------------------------------------------------------------------------------------------------------------------------/
@version 2.3.2
@build 11th February, 2017
@version 2.3.6
@build 1st March, 2017
@created 30th April, 2015
@package Component Builder
@subpackage settings_left.php

View File

@ -10,8 +10,8 @@
|_|
/-------------------------------------------------------------------------------------------------------------------------------/
@version 2.3.2
@build 11th February, 2017
@version 2.3.6
@build 1st March, 2017
@created 30th April, 2015
@package Component Builder
@subpackage settings_right.php

View File

@ -10,8 +10,8 @@
|_|
/-------------------------------------------------------------------------------------------------------------------------------/
@version 2.3.2
@build 11th February, 2017
@version 2.3.6
@build 1st March, 2017
@created 30th April, 2015
@package Component Builder
@subpackage settings_under.php

View File

@ -10,8 +10,8 @@
|_|
/-------------------------------------------------------------------------------------------------------------------------------/
@version 2.3.2
@build 11th February, 2017
@version 2.3.6
@build 1st March, 2017
@created 30th April, 2015
@package Component Builder
@subpackage batchselection.php

View File

@ -10,8 +10,8 @@
|_|
/-------------------------------------------------------------------------------------------------------------------------------/
@version 2.3.2
@build 11th February, 2017
@version 2.3.6
@build 1st March, 2017
@created 30th April, 2015
@package Component Builder
@subpackage custom_buttons_fullwidth.php

View File

@ -10,8 +10,8 @@
|_|
/-------------------------------------------------------------------------------------------------------------------------------/
@version 2.3.2
@build 11th February, 2017
@version 2.3.6
@build 1st March, 2017
@created 30th April, 2015
@package Component Builder
@subpackage custom_buttons_left.php

View File

@ -10,8 +10,8 @@
|_|
/-------------------------------------------------------------------------------------------------------------------------------/
@version 2.3.2
@build 11th February, 2017
@version 2.3.6
@build 1st March, 2017
@created 30th April, 2015
@package Component Builder
@subpackage custom_script_fullwidth.php

View File

@ -10,8 +10,8 @@
|_|
/-------------------------------------------------------------------------------------------------------------------------------/
@version 2.3.2
@build 11th February, 2017
@version 2.3.6
@build 1st March, 2017
@created 30th April, 2015
@package Component Builder
@subpackage details_above.php

View File

@ -10,8 +10,8 @@
|_|
/-------------------------------------------------------------------------------------------------------------------------------/
@version 2.3.2
@build 11th February, 2017
@version 2.3.6
@build 1st March, 2017
@created 30th April, 2015
@package Component Builder
@subpackage details_fullwidth.php

View File

@ -10,8 +10,8 @@
|_|
/-------------------------------------------------------------------------------------------------------------------------------/
@version 2.3.2
@build 11th February, 2017
@version 2.3.6
@build 1st March, 2017
@created 30th April, 2015
@package Component Builder
@subpackage details_left.php

View File

@ -10,8 +10,8 @@
|_|
/-------------------------------------------------------------------------------------------------------------------------------/
@version 2.3.2
@build 11th February, 2017
@version 2.3.6
@build 1st March, 2017
@created 30th April, 2015
@package Component Builder
@subpackage details_right.php

View File

@ -10,8 +10,8 @@
|_|
/-------------------------------------------------------------------------------------------------------------------------------/
@version 2.3.2
@build 11th February, 2017
@version 2.3.6
@build 1st March, 2017
@created 30th April, 2015
@package Component Builder
@subpackage details_rightside.php

View File

@ -10,8 +10,8 @@
|_|
/-------------------------------------------------------------------------------------------------------------------------------/
@version 2.3.2
@build 11th February, 2017
@version 2.3.6
@build 1st March, 2017
@created 30th April, 2015
@package Component Builder
@subpackage details_under.php

View File

@ -10,8 +10,8 @@
|_|
/-------------------------------------------------------------------------------------------------------------------------------/
@version 2.3.2
@build 11th February, 2017
@version 2.3.6
@build 1st March, 2017
@created 30th April, 2015
@package Component Builder
@subpackage linked_components_fullwidth.php
@ -31,37 +31,37 @@ defined('_JEXEC') or die('Restricted access');
$items = $displayData->vyelinked_components;
$user = JFactory::getUser();
$id = $displayData->item->id;
$edit = "index.php?option=com_componentbuilder&view=components&task=component.edit";
$edit = "index.php?option=com_componentbuilder&view=joomla_components&task=joomla_component.edit";
?>
<div class="form-vertical">
<?php if (ComponentbuilderHelper::checkArray($items)): ?>
<table class="footable table data components" data-show-toggle="true" data-toggle-column="first" data-sorting="true" data-paging="true" data-paging-size="20" data-filtering="true">
<table class="footable table data joomla_components" data-show-toggle="true" data-toggle-column="first" data-sorting="true" data-paging="true" data-paging-size="20" data-filtering="true">
<thead>
<tr>
<th data-type="html" data-sort-use="text">
<?php echo JText::_('COM_COMPONENTBUILDER_COMPONENT_SYSTEM_NAME_LABEL'); ?>
<?php echo JText::_('COM_COMPONENTBUILDER_JOOMLA_COMPONENT_SYSTEM_NAME_LABEL'); ?>
</th>
<th data-breakpoints="xs sm" data-type="html" data-sort-use="text">
<?php echo JText::_('COM_COMPONENTBUILDER_COMPONENT_NAME_CODE_LABEL'); ?>
<?php echo JText::_('COM_COMPONENTBUILDER_JOOMLA_COMPONENT_NAME_CODE_LABEL'); ?>
</th>
<th data-breakpoints="xs sm" data-type="html" data-sort-use="text">
<?php echo JText::_('COM_COMPONENTBUILDER_COMPONENT_COMPONENT_VERSION_LABEL'); ?>
<?php echo JText::_('COM_COMPONENTBUILDER_JOOMLA_COMPONENT_COMPONENT_VERSION_LABEL'); ?>
</th>
<th data-breakpoints="xs sm md" data-type="html" data-sort-use="text">
<?php echo JText::_('COM_COMPONENTBUILDER_COMPONENT_SHORT_DESCRIPTION_LABEL'); ?>
<?php echo JText::_('COM_COMPONENTBUILDER_JOOMLA_COMPONENT_SHORT_DESCRIPTION_LABEL'); ?>
</th>
<th data-breakpoints="xs sm md" data-type="html" data-sort-use="text">
<?php echo JText::_('COM_COMPONENTBUILDER_COMPONENT_COMPANYNAME_LABEL'); ?>
<?php echo JText::_('COM_COMPONENTBUILDER_JOOMLA_COMPONENT_COMPANYNAME_LABEL'); ?>
</th>
<th data-breakpoints="xs sm md" data-type="html" data-sort-use="text">
<?php echo JText::_('COM_COMPONENTBUILDER_COMPONENT_AUTHOR_LABEL'); ?>
<?php echo JText::_('COM_COMPONENTBUILDER_JOOMLA_COMPONENT_AUTHOR_LABEL'); ?>
</th>
<th width="10" data-breakpoints="xs sm md">
<?php echo JText::_('COM_COMPONENTBUILDER_COMPONENT_STATUS'); ?>
<?php echo JText::_('COM_COMPONENTBUILDER_JOOMLA_COMPONENT_STATUS'); ?>
</th>
<th width="5" data-type="number" data-breakpoints="xs sm md">
<?php echo JText::_('COM_COMPONENTBUILDER_COMPONENT_ID'); ?>
<?php echo JText::_('COM_COMPONENTBUILDER_JOOMLA_COMPONENT_ID'); ?>
</th>
</tr>
</thead>
@ -70,14 +70,14 @@ $edit = "index.php?option=com_componentbuilder&view=components&task=component.ed
<?php
$canCheckin = $user->authorise('core.manage', 'com_checkin') || $item->checked_out == $user->id || $item->checked_out == 0;
$userChkOut = JFactory::getUser($item->checked_out);
$canDo = ComponentbuilderHelper::getActions('component',$item,'components');
$canDo = ComponentbuilderHelper::getActions('joomla_component',$item,'joomla_components');
?>
<tr>
<td class="nowrap">
<?php if ($canDo->get('core.edit')): ?>
<a href="<?php echo $edit; ?>&id=<?php echo $item->id; ?>&ref=custom_admin_view&refid=<?php echo $id; ?>"><?php echo $displayData->escape($item->system_name); ?></a>
<?php if ($item->checked_out): ?>
<?php echo JHtml::_('jgrid.checkedout', $i, $userChkOut->name, $item->checked_out_time, 'components.', $canCheckin); ?>
<?php echo JHtml::_('jgrid.checkedout', $i, $userChkOut->name, $item->checked_out_time, 'joomla_components.', $canCheckin); ?>
<?php endif; ?>
<?php else: ?>
<div class="name"><?php echo $displayData->escape($item->system_name); ?></div>

View File

@ -10,8 +10,8 @@
|_|
/-------------------------------------------------------------------------------------------------------------------------------/
@version 2.3.2
@build 11th February, 2017
@version 2.3.6
@build 1st March, 2017
@created 30th April, 2015
@package Component Builder
@subpackage publishing.php

View File

@ -10,8 +10,8 @@
|_|
/-------------------------------------------------------------------------------------------------------------------------------/
@version 2.3.2
@build 11th February, 2017
@version 2.3.6
@build 1st March, 2017
@created 30th April, 2015
@package Component Builder
@subpackage publlshing.php

View File

@ -10,8 +10,8 @@
|_|
/-------------------------------------------------------------------------------------------------------------------------------/
@version 2.3.2
@build 11th February, 2017
@version 2.3.6
@build 1st March, 2017
@created 30th April, 2015
@package Component Builder
@subpackage details_above.php
@ -31,7 +31,8 @@ $form = $displayData->getForm();
$fields = array(
'target',
'system_name'
'system_name',
'function_name'
);
?>

View File

@ -10,8 +10,8 @@
|_|
/-------------------------------------------------------------------------------------------------------------------------------/
@version 2.3.2
@build 11th February, 2017
@version 2.3.6
@build 1st March, 2017
@created 30th April, 2015
@package Component Builder
@subpackage details_fullwidth.php
@ -32,7 +32,8 @@ $form = $displayData->getForm();
$fields = $displayData->get('fields') ?: array(
'path',
'note_jcb_placeholder',
'code'
'code',
'note_placeholders_explained'
);
?>

View File

@ -10,8 +10,8 @@
|_|
/-------------------------------------------------------------------------------------------------------------------------------/
@version 2.3.2
@build 11th February, 2017
@version 2.3.6
@build 1st March, 2017
@created 30th April, 2015
@package Component Builder
@subpackage details_left.php
@ -30,6 +30,7 @@ defined('_JEXEC') or die('Restricted access');
$form = $displayData->getForm();
$fields = $displayData->get('fields') ?: array(
'comment_type',
'component',
'type',
'hashtarget'

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