Updated with JCB v2.12.4

This commit is contained in:
Llewellyn van der Merwe 2021-01-04 19:48:41 +02:00
parent b520d8860c
commit d89afa702e
Signed by: Llewellyn
GPG Key ID: EFC0C720A240551C
83 changed files with 737 additions and 459 deletions

View File

@ -1,4 +1,4 @@
# Hello World (1.0.0) # Hello World (1.0.1)
@ -8,24 +8,24 @@
+ *Author*: [Llewellyn](mailto:joomla@vdm.io) + *Author*: [Llewellyn](mailto:joomla@vdm.io)
+ *Name*: [Hello World](https://www.vdm.io) + *Name*: [Hello World](https://www.vdm.io)
+ *First Build*: 20th September, 2017 + *First Build*: 20th September, 2017
+ *Last Build*: 30th May, 2020 + *Last Build*: 4th January, 2021
+ *Version*: 1.0.0 + *Version*: 1.0.1
+ *Copyright*: Copyright (C) 2015. All Rights Reserved + *Copyright*: Copyright (C) 2015. All Rights Reserved
+ *License*: GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html + *License*: GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html
## Build Time ## Build Time
**40 Hours** or **5 Eight Hour Days** (actual time the author saved - **41 Hours** or **5 Eight Hour Days** (actual time the author saved -
due to [Automated Component Builder](http://joomlacomponentbuilder.com)) due to [Automated Component Builder](http://joomlacomponentbuilder.com))
> (if creating a folder and file took **5 seconds** and writing one line of code took **10 seconds**, > (if creating a folder and file took **5 seconds** and writing one line of code took **10 seconds**,
> never making one mistake or taking any coffee break.) > never making one mistake or taking any coffee break.)
+ *Line count*: **14355** + *Line count*: **14632**
+ *File count*: **136** + *File count*: **139**
+ *Folder count*: **55** + *Folder count*: **55**
**27 Hours** or **3 Eight Hour Days** (the actual time the author spent) **27 Hours** or **4 Eight Hour Days** (the actual time the author spent)
> (with the following break down: > (with the following break down:
> **debugging @10hours** = codingtime / 4; > **debugging @10hours** = codingtime / 4;
@ -33,20 +33,49 @@ due to [Automated Component Builder](http://joomlacomponentbuilder.com))
> **mapping @4hours** = codingtime / 10; > **mapping @4hours** = codingtime / 10;
> **office @7hours** = codingtime / 6;) > **office @7hours** = codingtime / 6;)
**67 Hours** or **8 Eight Hour Days** **68 Hours** or **9 Eight Hour Days**
(a total of the realistic time frame for this project) (a total of the realistic time frame for this project)
> (if creating a folder and file took **5 seconds** and writing one line of code took **10 seconds**, > (if creating a folder and file took **5 seconds** and writing one line of code took **10 seconds**,
> with the normal everyday realities at the office, that includes the component planning, mapping & debugging.) > with the normal everyday realities at the office, that includes the component planning, mapping & debugging.)
Project duration: **1.6 weeks** or **0.3 months** Project duration: **1.8 weeks** or **0.4 months**
> This **component** was build with a Joomla [Automated Component Builder](http://joomlacomponentbuilder.com). > This **component** was build with a Joomla [Automated Component Builder](http://joomlacomponentbuilder.com).
> Developed by [Llewellyn van der Merwe](mailto:llewellyn@joomlacomponentbuilder.com) > Developed by [Llewellyn van der Merwe](mailto:llewellyn@joomlacomponentbuilder.com)
## Donations
If you want to support this project, please consider donating: ## Contributors
* PayPal: [paypal.me/asseblief](https://www.paypal.me/asseblief) This project exists thanks to all the people who contribute to the [Joomla Component Builder Project](https://github.com/vdm-io/Joomla-Component-Builder).
* Bitcoin: 18vURxYpPFjvNk8BnUy1ovCAyQmY3MzkSf
* Ethereum: 0x9548144662b47327c954f3e214edb96662d51218 [![Contributors](https://opencollective.com/Joomla-Component-Builder/contributors.svg?width=890&button=false)](https://github.com/vdm-io/Joomla-Component-Builder/graphs/contributors)
### Backers
Thank you to all our backers! 🙏 [[Become a backer](https://opencollective.com/Joomla-Component-Builder#backer)]
[![Our Backers on opencollective](https://opencollective.com/Joomla-Component-Builder/backers.svg?width=890)](https://opencollective.com/Joomla-Component-Builder#backers)
### Sponsors
Support this project by becoming a sponsor. Your logo will show up here with a link to your website. [[Become a sponsor](https://opencollective.com/Joomla-Component-Builder#sponsor)]
[![Sponsor](https://opencollective.com/Joomla-Component-Builder/sponsor/0/avatar.svg)](https://opencollective.com/Joomla-Component-Builder/sponsor/0/website)
[![Sponsor](https://opencollective.com/Joomla-Component-Builder/sponsor/1/avatar.svg)](https://opencollective.com/Joomla-Component-Builder/sponsor/1/website)
[![Sponsor](https://opencollective.com/Joomla-Component-Builder/sponsor/2/avatar.svg)](https://opencollective.com/Joomla-Component-Builder/sponsor/2/website)
[![Sponsor](https://opencollective.com/Joomla-Component-Builder/sponsor/3/avatar.svg)](https://opencollective.com/Joomla-Component-Builder/sponsor/3/website)
[![Sponsor](https://opencollective.com/Joomla-Component-Builder/sponsor/4/avatar.svg)](https://opencollective.com/Joomla-Component-Builder/sponsor/4/website)
[![Sponsor](https://opencollective.com/Joomla-Component-Builder/sponsor/5/avatar.svg)](https://opencollective.com/Joomla-Component-Builder/sponsor/5/website)
[![Sponsor](https://opencollective.com/Joomla-Component-Builder/sponsor/6/avatar.svg)](https://opencollective.com/Joomla-Component-Builder/sponsor/6/website)
[![Sponsor](https://opencollective.com/Joomla-Component-Builder/sponsor/7/avatar.svg)](https://opencollective.com/Joomla-Component-Builder/sponsor/7/website)
[![Sponsor](https://opencollective.com/Joomla-Component-Builder/sponsor/8/avatar.svg)](https://opencollective.com/Joomla-Component-Builder/sponsor/8/website)
[![Sponsor](https://opencollective.com/Joomla-Component-Builder/sponsor/9/avatar.svg)](https://opencollective.com/Joomla-Component-Builder/sponsor/9/website)
[![Sponsor](https://opencollective.com/Joomla-Component-Builder/sponsor/10/avatar.svg)](https://opencollective.com/Joomla-Component-Builder/sponsor/10/website)
[![Sponsor](https://opencollective.com/Joomla-Component-Builder/sponsor/11/avatar.svg)](https://opencollective.com/Joomla-Component-Builder/sponsor/11/website)
[![Sponsor](https://opencollective.com/Joomla-Component-Builder/sponsor/12/avatar.svg)](https://opencollective.com/Joomla-Component-Builder/sponsor/12/website)
[![Sponsor](https://opencollective.com/Joomla-Component-Builder/sponsor/13/avatar.svg)](https://opencollective.com/Joomla-Component-Builder/sponsor/13/website)
[![Sponsor](https://opencollective.com/Joomla-Component-Builder/sponsor/14/avatar.svg)](https://opencollective.com/Joomla-Component-Builder/sponsor/14/website)
[![Sponsor](https://opencollective.com/Joomla-Component-Builder/sponsor/15/avatar.svg)](https://opencollective.com/Joomla-Component-Builder/sponsor/15/website)
[![Sponsor](https://opencollective.com/Joomla-Component-Builder/sponsor/16/avatar.svg)](https://opencollective.com/Joomla-Component-Builder/sponsor/16/website)
[![Sponsor](https://opencollective.com/Joomla-Component-Builder/sponsor/17/avatar.svg)](https://opencollective.com/Joomla-Component-Builder/sponsor/17/website)
[![Sponsor](https://opencollective.com/Joomla-Component-Builder/sponsor/18/avatar.svg)](https://opencollective.com/Joomla-Component-Builder/sponsor/18/website)
[![Sponsor](https://opencollective.com/Joomla-Component-Builder/sponsor/19/avatar.svg)](https://opencollective.com/Joomla-Component-Builder/sponsor/19/website)
[![Sponsor](https://opencollective.com/Joomla-Component-Builder/sponsor/20/avatar.svg)](https://opencollective.com/Joomla-Component-Builder/sponsor/20/website)

View File

@ -1,4 +1,4 @@
# Hello World (1.0.0) # Hello World (1.0.1)
@ -8,24 +8,24 @@
+ *Author*: [Llewellyn](mailto:joomla@vdm.io) + *Author*: [Llewellyn](mailto:joomla@vdm.io)
+ *Name*: [Hello World](https://www.vdm.io) + *Name*: [Hello World](https://www.vdm.io)
+ *First Build*: 20th September, 2017 + *First Build*: 20th September, 2017
+ *Last Build*: 30th May, 2020 + *Last Build*: 4th January, 2021
+ *Version*: 1.0.0 + *Version*: 1.0.1
+ *Copyright*: Copyright (C) 2015. All Rights Reserved + *Copyright*: Copyright (C) 2015. All Rights Reserved
+ *License*: GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html + *License*: GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html
## Build Time ## Build Time
**40 Hours** or **5 Eight Hour Days** (actual time the author saved - **41 Hours** or **5 Eight Hour Days** (actual time the author saved -
due to [Automated Component Builder](http://joomlacomponentbuilder.com)) due to [Automated Component Builder](http://joomlacomponentbuilder.com))
> (if creating a folder and file took **5 seconds** and writing one line of code took **10 seconds**, > (if creating a folder and file took **5 seconds** and writing one line of code took **10 seconds**,
> never making one mistake or taking any coffee break.) > never making one mistake or taking any coffee break.)
+ *Line count*: **14355** + *Line count*: **14632**
+ *File count*: **136** + *File count*: **139**
+ *Folder count*: **55** + *Folder count*: **55**
**27 Hours** or **3 Eight Hour Days** (the actual time the author spent) **27 Hours** or **4 Eight Hour Days** (the actual time the author spent)
> (with the following break down: > (with the following break down:
> **debugging @10hours** = codingtime / 4; > **debugging @10hours** = codingtime / 4;
@ -33,20 +33,49 @@ due to [Automated Component Builder](http://joomlacomponentbuilder.com))
> **mapping @4hours** = codingtime / 10; > **mapping @4hours** = codingtime / 10;
> **office @7hours** = codingtime / 6;) > **office @7hours** = codingtime / 6;)
**67 Hours** or **8 Eight Hour Days** **68 Hours** or **9 Eight Hour Days**
(a total of the realistic time frame for this project) (a total of the realistic time frame for this project)
> (if creating a folder and file took **5 seconds** and writing one line of code took **10 seconds**, > (if creating a folder and file took **5 seconds** and writing one line of code took **10 seconds**,
> with the normal everyday realities at the office, that includes the component planning, mapping & debugging.) > with the normal everyday realities at the office, that includes the component planning, mapping & debugging.)
Project duration: **1.6 weeks** or **0.3 months** Project duration: **1.8 weeks** or **0.4 months**
> This **component** was build with a Joomla [Automated Component Builder](http://joomlacomponentbuilder.com). > This **component** was build with a Joomla [Automated Component Builder](http://joomlacomponentbuilder.com).
> Developed by [Llewellyn van der Merwe](mailto:llewellyn@joomlacomponentbuilder.com) > Developed by [Llewellyn van der Merwe](mailto:llewellyn@joomlacomponentbuilder.com)
## Donations
If you want to support this project, please consider donating: ## Contributors
* PayPal: [paypal.me/asseblief](https://www.paypal.me/asseblief) This project exists thanks to all the people who contribute to the [Joomla Component Builder Project](https://github.com/vdm-io/Joomla-Component-Builder).
* Bitcoin: 18vURxYpPFjvNk8BnUy1ovCAyQmY3MzkSf
* Ethereum: 0x9548144662b47327c954f3e214edb96662d51218 [![Contributors](https://opencollective.com/Joomla-Component-Builder/contributors.svg?width=890&button=false)](https://github.com/vdm-io/Joomla-Component-Builder/graphs/contributors)
### Backers
Thank you to all our backers! 🙏 [[Become a backer](https://opencollective.com/Joomla-Component-Builder#backer)]
[![Our Backers on opencollective](https://opencollective.com/Joomla-Component-Builder/backers.svg?width=890)](https://opencollective.com/Joomla-Component-Builder#backers)
### Sponsors
Support this project by becoming a sponsor. Your logo will show up here with a link to your website. [[Become a sponsor](https://opencollective.com/Joomla-Component-Builder#sponsor)]
[![Sponsor](https://opencollective.com/Joomla-Component-Builder/sponsor/0/avatar.svg)](https://opencollective.com/Joomla-Component-Builder/sponsor/0/website)
[![Sponsor](https://opencollective.com/Joomla-Component-Builder/sponsor/1/avatar.svg)](https://opencollective.com/Joomla-Component-Builder/sponsor/1/website)
[![Sponsor](https://opencollective.com/Joomla-Component-Builder/sponsor/2/avatar.svg)](https://opencollective.com/Joomla-Component-Builder/sponsor/2/website)
[![Sponsor](https://opencollective.com/Joomla-Component-Builder/sponsor/3/avatar.svg)](https://opencollective.com/Joomla-Component-Builder/sponsor/3/website)
[![Sponsor](https://opencollective.com/Joomla-Component-Builder/sponsor/4/avatar.svg)](https://opencollective.com/Joomla-Component-Builder/sponsor/4/website)
[![Sponsor](https://opencollective.com/Joomla-Component-Builder/sponsor/5/avatar.svg)](https://opencollective.com/Joomla-Component-Builder/sponsor/5/website)
[![Sponsor](https://opencollective.com/Joomla-Component-Builder/sponsor/6/avatar.svg)](https://opencollective.com/Joomla-Component-Builder/sponsor/6/website)
[![Sponsor](https://opencollective.com/Joomla-Component-Builder/sponsor/7/avatar.svg)](https://opencollective.com/Joomla-Component-Builder/sponsor/7/website)
[![Sponsor](https://opencollective.com/Joomla-Component-Builder/sponsor/8/avatar.svg)](https://opencollective.com/Joomla-Component-Builder/sponsor/8/website)
[![Sponsor](https://opencollective.com/Joomla-Component-Builder/sponsor/9/avatar.svg)](https://opencollective.com/Joomla-Component-Builder/sponsor/9/website)
[![Sponsor](https://opencollective.com/Joomla-Component-Builder/sponsor/10/avatar.svg)](https://opencollective.com/Joomla-Component-Builder/sponsor/10/website)
[![Sponsor](https://opencollective.com/Joomla-Component-Builder/sponsor/11/avatar.svg)](https://opencollective.com/Joomla-Component-Builder/sponsor/11/website)
[![Sponsor](https://opencollective.com/Joomla-Component-Builder/sponsor/12/avatar.svg)](https://opencollective.com/Joomla-Component-Builder/sponsor/12/website)
[![Sponsor](https://opencollective.com/Joomla-Component-Builder/sponsor/13/avatar.svg)](https://opencollective.com/Joomla-Component-Builder/sponsor/13/website)
[![Sponsor](https://opencollective.com/Joomla-Component-Builder/sponsor/14/avatar.svg)](https://opencollective.com/Joomla-Component-Builder/sponsor/14/website)
[![Sponsor](https://opencollective.com/Joomla-Component-Builder/sponsor/15/avatar.svg)](https://opencollective.com/Joomla-Component-Builder/sponsor/15/website)
[![Sponsor](https://opencollective.com/Joomla-Component-Builder/sponsor/16/avatar.svg)](https://opencollective.com/Joomla-Component-Builder/sponsor/16/website)
[![Sponsor](https://opencollective.com/Joomla-Component-Builder/sponsor/17/avatar.svg)](https://opencollective.com/Joomla-Component-Builder/sponsor/17/website)
[![Sponsor](https://opencollective.com/Joomla-Component-Builder/sponsor/18/avatar.svg)](https://opencollective.com/Joomla-Component-Builder/sponsor/18/website)
[![Sponsor](https://opencollective.com/Joomla-Component-Builder/sponsor/19/avatar.svg)](https://opencollective.com/Joomla-Component-Builder/sponsor/19/website)
[![Sponsor](https://opencollective.com/Joomla-Component-Builder/sponsor/20/avatar.svg)](https://opencollective.com/Joomla-Component-Builder/sponsor/20/website)

View File

@ -22,14 +22,12 @@
<action name="greeting.batch" title="COM_HELLO_WORLD_GREETINGS_BATCH_USE" description="COM_HELLO_WORLD_GREETINGS_BATCH_USE_DESC" /> <action name="greeting.batch" title="COM_HELLO_WORLD_GREETINGS_BATCH_USE" description="COM_HELLO_WORLD_GREETINGS_BATCH_USE_DESC" />
<action name="greeting.dashboard_add" title="COM_HELLO_WORLD_GREETINGS_DASHBOARD_ADD" description="COM_HELLO_WORLD_GREETINGS_DASHBOARD_ADD_DESC" /> <action name="greeting.dashboard_add" title="COM_HELLO_WORLD_GREETINGS_DASHBOARD_ADD" description="COM_HELLO_WORLD_GREETINGS_DASHBOARD_ADD_DESC" />
<action name="greeting.dashboard_list" title="COM_HELLO_WORLD_GREETINGS_DASHBOARD_LIST" description="COM_HELLO_WORLD_GREETINGS_DASHBOARD_LIST_DESC" /> <action name="greeting.dashboard_list" title="COM_HELLO_WORLD_GREETINGS_DASHBOARD_LIST" description="COM_HELLO_WORLD_GREETINGS_DASHBOARD_LIST_DESC" />
<action name="greeting.edit.greeting" title="COM_HELLO_WORLD_GREETINGS_EDIT_GREETING" description="COM_HELLO_WORLD_GREETINGS_EDIT_GREETING_DESC" />
<action name="greeting.version" title="COM_HELLO_WORLD_GREETINGS_EDIT_VERSION" description="COM_HELLO_WORLD_GREETINGS_EDIT_VERSION_DESC" /> <action name="greeting.version" title="COM_HELLO_WORLD_GREETINGS_EDIT_VERSION" description="COM_HELLO_WORLD_GREETINGS_EDIT_VERSION_DESC" />
<action name="greeting.export" title="COM_HELLO_WORLD_GREETINGS_EXPORT" description="COM_HELLO_WORLD_GREETINGS_EXPORT_DESC" /> <action name="greeting.export" title="COM_HELLO_WORLD_GREETINGS_EXPORT" description="COM_HELLO_WORLD_GREETINGS_EXPORT_DESC" />
<action name="greeting.import" title="COM_HELLO_WORLD_GREETINGS_IMPORT" description="COM_HELLO_WORLD_GREETINGS_IMPORT_DESC" /> <action name="greeting.import" title="COM_HELLO_WORLD_GREETINGS_IMPORT" description="COM_HELLO_WORLD_GREETINGS_IMPORT_DESC" />
<action name="greeting.submenu" title="COM_HELLO_WORLD_GREETINGS_SUBMENU" description="COM_HELLO_WORLD_GREETINGS_SUBMENU_DESC" /> <action name="greeting.submenu" title="COM_HELLO_WORLD_GREETINGS_SUBMENU" description="COM_HELLO_WORLD_GREETINGS_SUBMENU_DESC" />
</section> </section>
<section name="greeting"> <section name="greeting">
<action name="greeting.edit.greeting" title="COM_HELLO_WORLD_GREETINGS_EDIT_GREETING" description="COM_HELLO_WORLD_GREETINGS_EDIT_GREETING_DESC" />
<action name="greeting.version" title="COM_HELLO_WORLD_GREETINGS_EDIT_VERSION" description="COM_HELLO_WORLD_GREETINGS_EDIT_VERSION_DESC" /> <action name="greeting.version" title="COM_HELLO_WORLD_GREETINGS_EDIT_VERSION" description="COM_HELLO_WORLD_GREETINGS_EDIT_VERSION_DESC" />
</section> </section>
<section name="fieldgroup"> <section name="fieldgroup">

View File

@ -2,8 +2,8 @@
VDM VDM
/-------------------------------------------------------------------------------------------------------/ /-------------------------------------------------------------------------------------------------------/
@version 1.0.0 @version 1.0.1
@build 30th May, 2020 @build 4th January, 2021
@created 20th September, 2017 @created 20th September, 2017
@package Hello World @package Hello World
@subpackage admin.css @subpackage admin.css

View File

@ -2,8 +2,8 @@
VDM VDM
/-------------------------------------------------------------------------------------------------------/ /-------------------------------------------------------------------------------------------------------/
@version 1.0.0 @version 1.0.1
@build 30th May, 2020 @build 4th January, 2021
@created 20th September, 2017 @created 20th September, 2017
@package Hello World @package Hello World
@subpackage dashboard.css @subpackage dashboard.css

View File

@ -2,8 +2,8 @@
VDM VDM
/-------------------------------------------------------------------------------------------------------/ /-------------------------------------------------------------------------------------------------------/
@version 1.0.0 @version 1.0.1
@build 30th May, 2020 @build 4th January, 2021
@created 20th September, 2017 @created 20th September, 2017
@package Hello World @package Hello World
@subpackage greeting.css @subpackage greeting.css

View File

@ -2,8 +2,8 @@
VDM VDM
/-------------------------------------------------------------------------------------------------------/ /-------------------------------------------------------------------------------------------------------/
@version 1.0.0 @version 1.0.1
@build 30th May, 2020 @build 4th January, 2021
@created 20th September, 2017 @created 20th September, 2017
@package Hello World @package Hello World
@subpackage greetings.css @subpackage greetings.css

View File

@ -2,8 +2,8 @@
VDM VDM
/-------------------------------------------------------------------------------------------------------/ /-------------------------------------------------------------------------------------------------------/
@version 1.0.0 @version 1.0.1
@build 30th May, 2020 @build 4th January, 2021
@created 20th September, 2017 @created 20th September, 2017
@package Hello World @package Hello World
@subpackage admin.js @subpackage admin.js

View File

@ -3,8 +3,8 @@
VDM VDM
/-------------------------------------------------------------------------------------------------------/ /-------------------------------------------------------------------------------------------------------/
@version 1.0.0 @version 1.0.1
@build 30th May, 2020 @build 4th January, 2021
@created 20th September, 2017 @created 20th September, 2017
@package Hello World @package Hello World
@subpackage controller.php @subpackage controller.php

View File

@ -3,8 +3,8 @@
VDM VDM
/-------------------------------------------------------------------------------------------------------/ /-------------------------------------------------------------------------------------------------------/
@version 1.0.0 @version 1.0.1
@build 30th May, 2020 @build 4th January, 2021
@created 20th September, 2017 @created 20th September, 2017
@package Hello World @package Hello World
@subpackage greeting.php @subpackage greeting.php

View File

@ -3,8 +3,8 @@
VDM VDM
/-------------------------------------------------------------------------------------------------------/ /-------------------------------------------------------------------------------------------------------/
@version 1.0.0 @version 1.0.1
@build 30th May, 2020 @build 4th January, 2021
@created 20th September, 2017 @created 20th September, 2017
@package Hello World @package Hello World
@subpackage greetings.php @subpackage greetings.php
@ -64,7 +64,7 @@ class Hello_worldControllerGreetings extends JControllerAdmin
$input = JFactory::getApplication()->input; $input = JFactory::getApplication()->input;
$pks = $input->post->get('cid', array(), 'array'); $pks = $input->post->get('cid', array(), 'array');
// Sanitize the input // Sanitize the input
ArrayHelper::toInteger($pks); $pks = ArrayHelper::toInteger($pks);
// Get the model // Get the model
$model = $this->getModel('Greetings'); $model = $this->getModel('Greetings');
// get the data to export // get the data to export

View File

@ -3,8 +3,8 @@
VDM VDM
/-------------------------------------------------------------------------------------------------------/ /-------------------------------------------------------------------------------------------------------/
@version 1.0.0 @version 1.0.1
@build 30th May, 2020 @build 4th January, 2021
@created 20th September, 2017 @created 20th September, 2017
@package Hello World @package Hello World
@subpackage hello_world.php @subpackage hello_world.php

View File

@ -3,8 +3,8 @@
VDM VDM
/-------------------------------------------------------------------------------------------------------/ /-------------------------------------------------------------------------------------------------------/
@version 1.0.0 @version 1.0.1
@build 30th May, 2020 @build 4th January, 2021
@created 20th September, 2017 @created 20th September, 2017
@package Hello World @package Hello World
@subpackage import.php @subpackage import.php

View File

@ -3,8 +3,8 @@
VDM VDM
/-------------------------------------------------------------------------------------------------------/ /-------------------------------------------------------------------------------------------------------/
@version 1.0.0 @version 1.0.1
@build 30th May, 2020 @build 4th January, 2021
@created 20th September, 2017 @created 20th September, 2017
@package Hello World @package Hello World
@subpackage hello_world.php @subpackage hello_world.php
@ -20,6 +20,7 @@
// No direct access to this file // No direct access to this file
defined('_JEXEC') or die('Restricted access'); defined('_JEXEC') or die('Restricted access');
JHtml::_('behavior.tabstate'); JHtml::_('behavior.tabstate');
// Access check. // Access check.

View File

@ -3,8 +3,8 @@
VDM VDM
/-------------------------------------------------------------------------------------------------------/ /-------------------------------------------------------------------------------------------------------/
@version 1.0.0 @version 1.0.1
@build 30th May, 2020 @build 4th January, 2021
@created 20th September, 2017 @created 20th September, 2017
@package Hello World @package Hello World
@subpackage headercheck.php @subpackage headercheck.php

View File

@ -3,8 +3,8 @@
VDM VDM
/-------------------------------------------------------------------------------------------------------/ /-------------------------------------------------------------------------------------------------------/
@version 1.0.0 @version 1.0.1
@build 30th May, 2020 @build 4th January, 2021
@created 20th September, 2017 @created 20th September, 2017
@package Hello World @package Hello World
@subpackage hello_world.php @subpackage hello_world.php
@ -22,6 +22,7 @@
defined('_JEXEC') or die('Restricted access'); defined('_JEXEC') or die('Restricted access');
use Joomla\CMS\Language\Language; use Joomla\CMS\Language\Language;
use Joomla\Registry\Registry;
use Joomla\String\StringHelper; use Joomla\String\StringHelper;
use Joomla\Utilities\ArrayHelper; use Joomla\Utilities\ArrayHelper;
use PhpOffice\PhpSpreadsheet\IOFactory; use PhpOffice\PhpSpreadsheet\IOFactory;
@ -47,7 +48,7 @@ abstract class Hello_worldHelper
*/ */
public static $langTag; public static $langTag;
/***[INSERTED$$$$]***//*69*/
/** /**
* Write a file to the server * Write a file to the server
* *
@ -79,8 +80,8 @@ abstract class Hello_worldHelper
} }
return $klaar; return $klaar;
} }
/***[/INSERTED$$$$]***/
/***[INSERTED$$$$]***//*60*/
/** /**
* get the content of a file * get the content of a file
* *
@ -132,8 +133,8 @@ abstract class Hello_worldHelper
} }
return $none; return $none;
} }
/***[/INSERTED$$$$]***/
/***[INSERTED$$$$]***//*71*/
/** /**
* Remove folders with files * Remove folders with files
* *
@ -206,7 +207,7 @@ abstract class Hello_worldHelper
} }
return false; return false;
} }
/***[/INSERTED$$$$]***/
/** /**
* Load the Composer Vendors * Load the Composer Vendors
@ -464,6 +465,8 @@ abstract class Hello_worldHelper
->setLastModifiedBy($modified) ->setLastModifiedBy($modified)
->setTitle($title) ->setTitle($title)
->setSubject($subjectTab); ->setSubject($subjectTab);
// The file type
$file_type = 'Xls';
// set description // set description
if ($description) if ($description)
{ {
@ -503,21 +506,46 @@ abstract class Hello_worldHelper
)); ));
// Add some data // Add some data
if (self::checkArray($rows)) if (($size = self::checkArray($rows)) !== false)
{ {
$i = 1; $i = 1;
foreach ($rows as $array){
// Based on data size we adapt the behaviour.
$xls_mode = 1;
if ($size > 3000)
{
$xls_mode = 3;
$file_type = 'Csv';
}
elseif ($size > 2000)
{
$xls_mode = 2;
}
// Set active sheet and get it.
$active_sheet = $spreadsheet->setActiveSheetIndex(0);
foreach ($rows as $array)
{
$a = 'A'; $a = 'A';
foreach ($array as $value){ foreach ($array as $value)
$spreadsheet->setActiveSheetIndex(0)->setCellValue($a.$i, $value); {
if ($i == 1){ $active_sheet->setCellValue($a.$i, $value);
$spreadsheet->getActiveSheet()->getColumnDimension($a)->setAutoSize(true); if ($xls_mode != 3)
$spreadsheet->getActiveSheet()->getStyle($a.$i)->applyFromArray($headerStyles); {
$spreadsheet->getActiveSheet()->getStyle($a.$i)->getAlignment()->setHorizontal(PhpOffice\PhpSpreadsheet\Style\Alignment::HORIZONTAL_CENTER); if ($i == 1)
} elseif ($a === 'A'){ {
$spreadsheet->getActiveSheet()->getStyle($a.$i)->applyFromArray($sideStyles); $active_sheet->getColumnDimension($a)->setAutoSize(true);
} else { $active_sheet->getStyle($a.$i)->applyFromArray($headerStyles);
$spreadsheet->getActiveSheet()->getStyle($a.$i)->applyFromArray($normalStyles); $active_sheet->getStyle($a.$i)->getAlignment()->setHorizontal(PhpOffice\PhpSpreadsheet\Style\Alignment::HORIZONTAL_CENTER);
}
elseif ($a === 'A')
{
$active_sheet->getStyle($a.$i)->applyFromArray($sideStyles);
}
elseif ($xls_mode == 1)
{
$active_sheet->getStyle($a.$i)->applyFromArray($normalStyles);
}
} }
$a++; $a++;
} }
@ -537,7 +565,7 @@ abstract class Hello_worldHelper
// Redirect output to a client's web browser (Excel5) // Redirect output to a client's web browser (Excel5)
header('Content-Type: application/vnd.ms-excel'); header('Content-Type: application/vnd.ms-excel');
header('Content-Disposition: attachment;filename="'.$fileName.'.xls"'); header('Content-Disposition: attachment;filename="' . $fileName . '.' . strtolower($file_type) .'"');
header('Cache-Control: max-age=0'); header('Cache-Control: max-age=0');
// If you're serving to IE 9, then the following may be needed // If you're serving to IE 9, then the following may be needed
header('Cache-Control: max-age=1'); header('Cache-Control: max-age=1');
@ -548,7 +576,7 @@ abstract class Hello_worldHelper
header ('Cache-Control: cache, must-revalidate'); // HTTP/1.1 header ('Cache-Control: cache, must-revalidate'); // HTTP/1.1
header ('Pragma: public'); // HTTP/1.0 header ('Pragma: public'); // HTTP/1.0
$writer = IOFactory::createWriter($spreadsheet, 'Xls'); $writer = IOFactory::createWriter($spreadsheet, $file_type);
$writer->save('php://output'); $writer->save('php://output');
jexit(); jexit();
} }

View File

@ -3,8 +3,8 @@
VDM VDM
/-------------------------------------------------------------------------------------------------------/ /-------------------------------------------------------------------------------------------------------/
@version 1.0.0 @version 1.0.1
@build 30th May, 2020 @build 4th January, 2021
@created 20th September, 2017 @created 20th September, 2017
@package Hello World @package Hello World
@subpackage batch_.php @subpackage batch_.php

View File

@ -1,5 +1,6 @@
COM_HELLO_WORLD="Hello World" COM_HELLO_WORLD="Hello World"
COM_HELLO_WORLD_ARCHIVED="Archived" COM_HELLO_WORLD_ARCHIVED="Archived"
COM_HELLO_WORLD_ARE_YOU_SURE_YOU_WANT_TO_DELETE_CONFIRMING_WILL_PERMANENTLY_DELETE_THE_SELECTED_ITEMS="Are you sure you want to delete? Confirming will permanently delete the selected item(s)!"
COM_HELLO_WORLD_AUTHOR="Author" COM_HELLO_WORLD_AUTHOR="Author"
COM_HELLO_WORLD_BACK="Back" COM_HELLO_WORLD_BACK="Back"
COM_HELLO_WORLD_CLOSE_NEW="Close & New" COM_HELLO_WORLD_CLOSE_NEW="Close & New"
@ -51,9 +52,18 @@ COM_HELLO_WORLD_EDIT_CREATED_DATE_DESC="Allows users in this group to edit creat
COM_HELLO_WORLD_EDIT_S="Edit %s" COM_HELLO_WORLD_EDIT_S="Edit %s"
COM_HELLO_WORLD_EDIT_VERSIONS="Edit Version" COM_HELLO_WORLD_EDIT_VERSIONS="Edit Version"
COM_HELLO_WORLD_EDIT_VERSIONS_DESC="Allows users in this group to edit versions." COM_HELLO_WORLD_EDIT_VERSIONS_DESC="Allows users in this group to edit versions."
COM_HELLO_WORLD_EMPTY_TRASH="Empty trash"
COM_HELLO_WORLD_EXIT_TRASH="Exit trash"
COM_HELLO_WORLD_EXPORT_DATA="Export Data" COM_HELLO_WORLD_EXPORT_DATA="Export Data"
COM_HELLO_WORLD_EXPORT_DATA_DESC="Allows users in this group to export data." COM_HELLO_WORLD_EXPORT_DATA_DESC="Allows users in this group to export data."
COM_HELLO_WORLD_EXPORT_FAILED="Export Failed" COM_HELLO_WORLD_EXPORT_FAILED="Export Failed"
COM_HELLO_WORLD_FILTER_GREETING_ASCENDING="Greeting ascending"
COM_HELLO_WORLD_FILTER_GREETING_DESCENDING="Greeting descending"
COM_HELLO_WORLD_FILTER_PUBLISHED="Status"
COM_HELLO_WORLD_FILTER_PUBLISHED_GREETINGS="Status options for greetings"
COM_HELLO_WORLD_FILTER_SEARCH="Searchgreetings"
COM_HELLO_WORLD_FILTER_SEARCH_GREETINGS="Search the greeting items. Prefix with ID: to search for an item by ID."
COM_HELLO_WORLD_FILTER_SELECT_ACCESS="Select Access"
COM_HELLO_WORLD_GREETING="Greeting" COM_HELLO_WORLD_GREETING="Greeting"
COM_HELLO_WORLD_GREETINGS="Greetings" COM_HELLO_WORLD_GREETINGS="Greetings"
COM_HELLO_WORLD_GREETINGS_ACCESS="Greetings Access" COM_HELLO_WORLD_GREETINGS_ACCESS="Greetings Access"
@ -68,8 +78,6 @@ COM_HELLO_WORLD_GREETINGS_DASHBOARD_ADD="Greetings Dashboard Add"
COM_HELLO_WORLD_GREETINGS_DASHBOARD_ADD_DESC="Allows the users in this group to dashboard add of greeting" COM_HELLO_WORLD_GREETINGS_DASHBOARD_ADD_DESC="Allows the users in this group to dashboard add of greeting"
COM_HELLO_WORLD_GREETINGS_DASHBOARD_LIST="Greetings Dashboard List" COM_HELLO_WORLD_GREETINGS_DASHBOARD_LIST="Greetings Dashboard List"
COM_HELLO_WORLD_GREETINGS_DASHBOARD_LIST_DESC="Allows the users in this group to dashboard list of greeting" COM_HELLO_WORLD_GREETINGS_DASHBOARD_LIST_DESC="Allows the users in this group to dashboard list of greeting"
COM_HELLO_WORLD_GREETINGS_EDIT_GREETING="Greetings Edit Greeting"
COM_HELLO_WORLD_GREETINGS_EDIT_GREETING_DESC="Allows the users in this group to edit greeting of greeting"
COM_HELLO_WORLD_GREETINGS_EDIT_VERSION="Greetings Edit Version" COM_HELLO_WORLD_GREETINGS_EDIT_VERSION="Greetings Edit Version"
COM_HELLO_WORLD_GREETINGS_EDIT_VERSION_DESC="Allows users in this group to edit versions of version greetings" COM_HELLO_WORLD_GREETINGS_EDIT_VERSION_DESC="Allows users in this group to edit versions of version greetings"
COM_HELLO_WORLD_GREETINGS_EXPORT="Greetings Export" COM_HELLO_WORLD_GREETINGS_EXPORT="Greetings Export"
@ -83,6 +91,8 @@ COM_HELLO_WORLD_GREETINGS_N_ITEMS_CHECKED_IN_1="%d Greeting successfully checked
COM_HELLO_WORLD_GREETINGS_N_ITEMS_CHECKED_IN_MORE="%d Greetings successfully checked in." COM_HELLO_WORLD_GREETINGS_N_ITEMS_CHECKED_IN_MORE="%d Greetings successfully checked in."
COM_HELLO_WORLD_GREETINGS_N_ITEMS_DELETED="%s Greetings deleted." COM_HELLO_WORLD_GREETINGS_N_ITEMS_DELETED="%s Greetings deleted."
COM_HELLO_WORLD_GREETINGS_N_ITEMS_DELETED_1="%s Greeting deleted." COM_HELLO_WORLD_GREETINGS_N_ITEMS_DELETED_1="%s Greeting deleted."
COM_HELLO_WORLD_GREETINGS_N_ITEMS_FAILED_PUBLISHING="%s Greetings failed publishing."
COM_HELLO_WORLD_GREETINGS_N_ITEMS_FAILED_PUBLISHING_1="%s Greeting failed publishing."
COM_HELLO_WORLD_GREETINGS_N_ITEMS_FEATURED="%s Greetings featured." COM_HELLO_WORLD_GREETINGS_N_ITEMS_FEATURED="%s Greetings featured."
COM_HELLO_WORLD_GREETINGS_N_ITEMS_FEATURED_1="%s Greeting featured." COM_HELLO_WORLD_GREETINGS_N_ITEMS_FEATURED_1="%s Greeting featured."
COM_HELLO_WORLD_GREETINGS_N_ITEMS_PUBLISHED="%s Greetings published." COM_HELLO_WORLD_GREETINGS_N_ITEMS_PUBLISHED="%s Greetings published."
@ -176,8 +186,12 @@ COM_HELLO_WORLD_SUBMENU_GREETINGS="Greetings"
COM_HELLO_WORLD_SUBMENU_GREETINGS_FIELDS="Greetings Fields" COM_HELLO_WORLD_SUBMENU_GREETINGS_FIELDS="Greetings Fields"
COM_HELLO_WORLD_SUBMENU_GREETINGS_FIELDS_GROUPS="Greetings Field Groups" COM_HELLO_WORLD_SUBMENU_GREETINGS_FIELDS_GROUPS="Greetings Field Groups"
COM_HELLO_WORLD_TRASHED="Trashed" COM_HELLO_WORLD_TRASHED="Trashed"
COM_HELLO_WORLD_TRASHED_ITEMS="Trashed items"
COM_HELLO_WORLD_TRASH_AREA="Trash Area"
COM_HELLO_WORLD_TYPE_GREETING="Greeting" COM_HELLO_WORLD_TYPE_GREETING="Greeting"
COM_HELLO_WORLD_USE_BATCH="Use Batch" COM_HELLO_WORLD_USE_BATCH="Use Batch"
COM_HELLO_WORLD_USE_BATCH_DESC="Allows users in this group to use batch copy/update method." COM_HELLO_WORLD_USE_BATCH_DESC="Allows users in this group to use batch copy/update method."
COM_HELLO_WORLD_VERSION="Version" COM_HELLO_WORLD_VERSION="Version"
COM_HELLO_WORLD_WEBSITE="Website" COM_HELLO_WORLD_WEBSITE="Website"
COM_HELLO_WORLD_YOU_ARE_CURRENTLY_VIEWING_THE_TRASHED_ITEMS="You are currently viewing the trashed items."
COM_HELLO_WORLD_YOU_ARE_CURRENTLY_VIEWING_THE_TRASH_AREA_AND_YOU_DONT_HAVE_ANY_ITEMS_IN_TRASH_AT_THE_MOMENT="You are currently viewing the trash area, and you don't have any items in trash at the moment!"

View File

@ -18,8 +18,6 @@ COM_HELLO_WORLD_GREETINGS_DASHBOARD_ADD="Greetings Dashboard Add"
COM_HELLO_WORLD_GREETINGS_DASHBOARD_ADD_DESC="Allows the users in this group to dashboard add of greeting" COM_HELLO_WORLD_GREETINGS_DASHBOARD_ADD_DESC="Allows the users in this group to dashboard add of greeting"
COM_HELLO_WORLD_GREETINGS_DASHBOARD_LIST="Greetings Dashboard List" COM_HELLO_WORLD_GREETINGS_DASHBOARD_LIST="Greetings Dashboard List"
COM_HELLO_WORLD_GREETINGS_DASHBOARD_LIST_DESC="Allows the users in this group to dashboard list of greeting" COM_HELLO_WORLD_GREETINGS_DASHBOARD_LIST_DESC="Allows the users in this group to dashboard list of greeting"
COM_HELLO_WORLD_GREETINGS_EDIT_GREETING="Greetings Edit Greeting"
COM_HELLO_WORLD_GREETINGS_EDIT_GREETING_DESC="Allows the users in this group to edit greeting of greeting"
COM_HELLO_WORLD_GREETINGS_EDIT_VERSION="Greetings Edit Version" COM_HELLO_WORLD_GREETINGS_EDIT_VERSION="Greetings Edit Version"
COM_HELLO_WORLD_GREETINGS_EDIT_VERSION_DESC="Allows users in this group to edit versions of version greetings" COM_HELLO_WORLD_GREETINGS_EDIT_VERSION_DESC="Allows users in this group to edit versions of version greetings"
COM_HELLO_WORLD_GREETINGS_EXPORT="Greetings Export" COM_HELLO_WORLD_GREETINGS_EXPORT="Greetings Export"

View File

@ -3,8 +3,8 @@
VDM VDM
/-------------------------------------------------------------------------------------------------------/ /-------------------------------------------------------------------------------------------------------/
@version 1.0.0 @version 1.0.1
@build 30th May, 2020 @build 4th January, 2021
@created 20th September, 2017 @created 20th September, 2017
@package Hello World @package Hello World
@subpackage batchselection.php @subpackage batchselection.php

View File

@ -3,8 +3,8 @@
VDM VDM
/-------------------------------------------------------------------------------------------------------/ /-------------------------------------------------------------------------------------------------------/
@version 1.0.0 @version 1.0.1
@build 30th May, 2020 @build 4th January, 2021
@created 20th September, 2017 @created 20th September, 2017
@package Hello World @package Hello World
@subpackage details_left.php @subpackage details_left.php

View File

@ -3,8 +3,8 @@
VDM VDM
/-------------------------------------------------------------------------------------------------------/ /-------------------------------------------------------------------------------------------------------/
@version 1.0.0 @version 1.0.1
@build 30th May, 2020 @build 4th January, 2021
@created 20th September, 2017 @created 20th September, 2017
@package Hello World @package Hello World
@subpackage metadata.php @subpackage metadata.php

View File

@ -3,8 +3,8 @@
VDM VDM
/-------------------------------------------------------------------------------------------------------/ /-------------------------------------------------------------------------------------------------------/
@version 1.0.0 @version 1.0.1
@build 30th May, 2020 @build 4th January, 2021
@created 20th September, 2017 @created 20th September, 2017
@package Hello World @package Hello World
@subpackage publishing.php @subpackage publishing.php
@ -35,6 +35,7 @@ $fields_tab_layout = 'fields_' . $layout_path_array[1];
// get the fields // get the fields
$fields = $displayData->get($fields_tab_layout) ?: array( $fields = $displayData->get($fields_tab_layout) ?: array(
'title',
'created', 'created',
'created_by', 'created_by',
'modified', 'modified',

View File

@ -0,0 +1,82 @@
<?php
/*----------------------------------------------------------------------------------| www.vdm.io |----/
VDM
/-------------------------------------------------------------------------------------------------------/
@version 1.0.1
@build 4th January, 2021
@created 20th September, 2017
@package Hello World
@subpackage trashhelper.php
@author Llewellyn <https://www.vdm.io>
@copyright Copyright (C) 2015. All Rights Reserved
@license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html
____ _____ _____ __ __ __ __ ___ _____ __ __ ____ _____ _ _ ____ _ _ ____
(_ _)( _ )( _ )( \/ )( ) /__\ / __)( _ )( \/ )( _ \( _ )( \( )( ___)( \( )(_ _)
.-_)( )(_)( )(_)( ) ( )(__ /(__)\ ( (__ )(_)( ) ( )___/ )(_)( ) ( )__) ) ( )(
\____) (_____)(_____)(_/\/\_)(____)(__)(__) \___)(_____)(_/\/\_)(__) (_____)(_)\_)(____)(_)\_) (__)
/------------------------------------------------------------------------------------------------------*/
// No direct access to this file
defined('JPATH_BASE') or die('Restricted access');
?>
<?php if ($displayData->state->get('filter.published') == -2 && ($displayData->canState && $displayData->canDelete)) : ?>
<script>
// change the class of the delete button
jQuery("#toolbar-delete button").toggleClass("btn-danger");
// function to empty the trash
function emptyTrash() {
if (document.adminForm.boxchecked.value == 0) {
// select all the items visable
document.adminForm.elements['checkall-toggle'].checked=1;
Joomla.checkAll(document.adminForm.elements['checkall-toggle']);
// check to confirm the deletion
if(confirm('<?= JText::_("COM_HELLO_WORLD_ARE_YOU_SURE_YOU_WANT_TO_DELETE_CONFIRMING_WILL_PERMANENTLY_DELETE_THE_SELECTED_ITEMS") ?>')) {
Joomla.submitbutton('<?= $displayData->get("name") ?>.delete');
} else {
document.adminForm.elements['checkall-toggle'].checked=0;
Joomla.checkAll(document.adminForm.elements['checkall-toggle']);
}
} else {
// confirm deletion of those selected
if (confirm('<?= JText::_("COM_HELLO_WORLD_ARE_YOU_SURE_YOU_WANT_TO_DELETE_CONFIRMING_WILL_PERMANENTLY_DELETE_THE_SELECTED_ITEMS") ?>')) {
Joomla.submitbutton('<?= $displayData->get("name") ?>.delete');
};
}
return false;
}
// function to exit the tash state
function exitTrash() {
document.adminForm.filter_published.selectedIndex = 0;
document.adminForm.submit();
return false;
}
</script>
<div class="alert alert-error">
<?php if (empty($displayData->items)): ?>
<h4 class="alert-heading">
<span class="icon-trash"></span>
<?= JText::_("COM_HELLO_WORLD_TRASH_AREA") ?>
</h4>
<p><?= JText::_("COM_HELLO_WORLD_YOU_ARE_CURRENTLY_VIEWING_THE_TRASH_AREA_AND_YOU_DONT_HAVE_ANY_ITEMS_IN_TRASH_AT_THE_MOMENT") ?></p>
<?php else: ?>
<h4 class="alert-heading">
<span class="icon-trash"></span>
<?= JText::_("COM_HELLO_WORLD_TRASHED_ITEMS") ?>
</h4>
<p><?= JText::_("COM_HELLO_WORLD_YOU_ARE_CURRENTLY_VIEWING_THE_TRASHED_ITEMS") ?></p>
<button onclick="emptyTrash();" class="btn btn-small btn-danger">
<span class="icon-delete" aria-hidden="true"></span>
<?= JText::_("COM_HELLO_WORLD_EMPTY_TRASH") ?>
</button>
<?php endif; ?>
<button onclick="exitTrash();" class="btn btn-small">
<span class="icon-back" aria-hidden="true"></span>
<?= JText::_("COM_HELLO_WORLD_EXIT_TRASH") ?>
</button>
</div>
<?php endif; ?>

View File

@ -0,0 +1,67 @@
<?xml version="1.0" encoding="utf-8"?>
<form
addrulepath="/administrator/components/com_hello_world/models/rules"
addfieldpath="/administrator/components/com_hello_world/models/fields"
>
<fields name="filter">
<field
type="text"
name="search"
inputmode="search"
label="COM_HELLO_WORLD_FILTER_SEARCH"
description="COM_HELLO_WORLD_FILTER_SEARCH_GREETINGS"
hint="JSEARCH_FILTER"
/>
<field
type="status"
name="published"
label="COM_HELLO_WORLD_FILTER_PUBLISHED"
description="COM_HELLO_WORLD_FILTER_PUBLISHED_GREETINGS"
onchange="this.form.submit();"
>
<option value="">JOPTION_SELECT_PUBLISHED</option>
</field>
<field
type="accesslevel"
name="access"
label="JFIELD_ACCESS_LABEL"
description="JFIELD_ACCESS_DESC"
multiple="true"
class="multipleAccessLevels"
onchange="this.form.submit();"
/>
<input type="hidden" name="form_submited" value="1"/>
</fields>
<fields name="list">
<field
name="fullordering"
type="list"
label="COM_CONTENT_LIST_FULL_ORDERING"
description="COM_CONTENT_LIST_FULL_ORDERING_DESC"
onchange="this.form.submit();"
default="a.id DESC"
validate="options"
>
<option value="">JGLOBAL_SORT_BY</option>
<option value="a.ordering ASC">JGRID_HEADING_ORDERING_ASC</option>
<option value="a.ordering DESC">JGRID_HEADING_ORDERING_DESC</option>
<option value="a.published ASC">JSTATUS_ASC</option>
<option value="a.published DESC">JSTATUS_DESC</option>
<option value="a.greeting ASC">COM_HELLO_WORLD_FILTER_GREETING_ASCENDING</option>
<option value="a.greeting DESC">COM_HELLO_WORLD_FILTER_GREETING_DESCENDING</option>
<option value="a.id ASC">JGRID_HEADING_ID_ASC</option>
<option value="a.id DESC">JGRID_HEADING_ID_DESC</option>
</field>
<field
name="limit"
type="limitbox"
label="COM_CONTENT_LIST_LIMIT"
description="COM_CONTENT_LIST_LIMIT_DESC"
class="input-mini"
default="25"
onchange="this.form.submit();"
/>
</fields>
</form>

View File

@ -2,8 +2,8 @@
VDM VDM
/-------------------------------------------------------------------------------------------------------/ /-------------------------------------------------------------------------------------------------------/
@version 1.0.0 @version 1.0.1
@build 30th May, 2020 @build 4th January, 2021
@created 20th September, 2017 @created 20th September, 2017
@package Hello World @package Hello World
@subpackage greeting.js @subpackage greeting.js

View File

@ -102,6 +102,14 @@
rows="3" rows="3"
cols="30" cols="30"
/> />
<!-- Was added due to Permissions JS needing a Title field -->
<!-- Let us know at gh-629 should this change -->
<!-- https://github.com/vdm-io/Joomla-Component-Builder/issues/629#issuecomment-750117235 -->
<field
name="title"
type="hidden"
default="hello_world greeting"
/>
<!-- Dynamic Fields. --> <!-- Dynamic Fields. -->
<!-- Greeting Field. Type: Text. (joomla) --> <!-- Greeting Field. Type: Text. (joomla) -->
<field <field

View File

@ -3,8 +3,8 @@
VDM VDM
/-------------------------------------------------------------------------------------------------------/ /-------------------------------------------------------------------------------------------------------/
@version 1.0.0 @version 1.0.1
@build 30th May, 2020 @build 4th January, 2021
@created 20th September, 2017 @created 20th September, 2017
@package Hello World @package Hello World
@subpackage greeting.php @subpackage greeting.php
@ -204,23 +204,6 @@ class Hello_worldModelGreeting extends JModelAdmin
// Disable fields while saving. // Disable fields while saving.
$form->setFieldAttribute('created', 'filter', 'unset'); $form->setFieldAttribute('created', 'filter', 'unset');
} }
// Modify the form based on Edit Greeting access controls.
if ($id != 0 && (!$user->authorise('greeting.edit.greeting', 'com_hello_world.greeting.' . (int) $id))
|| ($id == 0 && !$user->authorise('greeting.edit.greeting', 'com_hello_world')))
{
// Disable fields for display.
$form->setFieldAttribute('greeting', 'disabled', 'true');
// Disable fields for display.
$form->setFieldAttribute('greeting', 'readonly', 'true');
// If there is no value continue.
if (!$form->getValue('greeting'))
{
// Disable fields while saving.
$form->setFieldAttribute('greeting', 'filter', 'unset');
// Disable fields while saving.
$form->setFieldAttribute('greeting', 'required', 'false');
}
}
// Only load these values if no id is found // Only load these values if no id is found
if (0 == $id) if (0 == $id)
{ {

View File

@ -3,8 +3,8 @@
VDM VDM
/-------------------------------------------------------------------------------------------------------/ /-------------------------------------------------------------------------------------------------------/
@version 1.0.0 @version 1.0.1
@build 30th May, 2020 @build 4th January, 2021
@created 20th September, 2017 @created 20th September, 2017
@package Hello World @package Hello World
@subpackage greetings.php @subpackage greetings.php
@ -35,6 +35,7 @@ class Hello_worldModelGreetings extends JModelList
$config['filter_fields'] = array( $config['filter_fields'] = array(
'a.id','id', 'a.id','id',
'a.published','published', 'a.published','published',
'a.access','access',
'a.ordering','ordering', 'a.ordering','ordering',
'a.created_by','created_by', 'a.created_by','created_by',
'a.modified_by','modified_by', 'a.modified_by','modified_by',
@ -48,7 +49,13 @@ class Hello_worldModelGreetings extends JModelList
/** /**
* Method to auto-populate the model state. * Method to auto-populate the model state.
* *
* Note. Calling getState in this method will result in recursion.
*
* @param string $ordering An optional ordering field.
* @param string $direction An optional direction (asc|desc).
*
* @return void * @return void
*
*/ */
protected function populateState($ordering = null, $direction = null) protected function populateState($ordering = null, $direction = null)
{ {
@ -59,17 +66,16 @@ class Hello_worldModelGreetings extends JModelList
{ {
$this->context .= '.' . $layout; $this->context .= '.' . $layout;
} }
$greeting = $this->getUserStateFromRequest($this->context . '.filter.greeting', 'filter_greeting');
$this->setState('filter.greeting', $greeting);
$sorting = $this->getUserStateFromRequest($this->context . '.filter.sorting', 'filter_sorting', 0, 'int'); // Check if the form was submitted
$this->setState('filter.sorting', $sorting); $formSubmited = $app->input->post->get('form_submited');
$access = $this->getUserStateFromRequest($this->context . '.filter.access', 'filter_access', 0, 'int'); $access = $this->getUserStateFromRequest($this->context . '.filter.access', 'filter_access', 0, 'int');
if ($formSubmited)
{
$access = $app->input->post->get('access');
$this->setState('filter.access', $access); $this->setState('filter.access', $access);
}
$search = $this->getUserStateFromRequest($this->context . '.filter.search', 'filter_search');
$this->setState('filter.search', $search);
$published = $this->getUserStateFromRequest($this->context . '.filter.published', 'filter_published', ''); $published = $this->getUserStateFromRequest($this->context . '.filter.published', 'filter_published', '');
$this->setState('filter.published', $published); $this->setState('filter.published', $published);
@ -80,6 +86,19 @@ class Hello_worldModelGreetings extends JModelList
$created = $this->getUserStateFromRequest($this->context . '.filter.created', 'filter_created'); $created = $this->getUserStateFromRequest($this->context . '.filter.created', 'filter_created');
$this->setState('filter.created', $created); $this->setState('filter.created', $created);
$sorting = $this->getUserStateFromRequest($this->context . '.filter.sorting', 'filter_sorting', 0, 'int');
$this->setState('filter.sorting', $sorting);
$search = $this->getUserStateFromRequest($this->context . '.filter.search', 'filter_search');
$this->setState('filter.search', $search);
$greeting = $this->getUserStateFromRequest($this->context . '.filter.greeting', 'filter_greeting');
if ($formSubmited)
{
$greeting = $app->input->post->get('greeting');
$this->setState('filter.greeting', $greeting);
}
// List state information. // List state information.
parent::populateState($ordering, $direction); parent::populateState($ordering, $direction);
} }
@ -135,9 +154,17 @@ class Hello_worldModelGreetings extends JModelList
$query->select('ag.title AS access_level'); $query->select('ag.title AS access_level');
$query->join('LEFT', '#__viewlevels AS ag ON ag.id = a.access'); $query->join('LEFT', '#__viewlevels AS ag ON ag.id = a.access');
// Filter by access level. // Filter by access level.
if ($access = $this->getState('filter.access')) $_access = $this->getState('filter.access');
if ($_access && is_numeric($_access))
{ {
$query->where('a.access = ' . (int) $access); $query->where('a.access = ' . (int) $_access);
}
elseif (Hello_worldHelper::checkArray($_access))
{
// Secure the array for the query
$_access = ArrayHelper::toInteger($_access);
// Filter by the Access Array.
$query->where('a.access IN (' . implode(',', $_access) . ')');
} }
// Implement View Level Access // Implement View Level Access
if (!$user->authorise('core.options', 'com_hello_world')) if (!$user->authorise('core.options', 'com_hello_world'))
@ -163,7 +190,7 @@ class Hello_worldModelGreetings extends JModelList
// Add the list ordering clause. // Add the list ordering clause.
$orderCol = $this->state->get('list.ordering', 'a.id'); $orderCol = $this->state->get('list.ordering', 'a.id');
$orderDirn = $this->state->get('list.direction', 'asc'); $orderDirn = $this->state->get('list.direction', 'desc');
if ($orderCol != '') if ($orderCol != '')
{ {
$query->order($db->escape($orderCol . ' ' . $orderDirn)); $query->order($db->escape($orderCol . ' ' . $orderDirn));
@ -183,7 +210,7 @@ class Hello_worldModelGreetings extends JModelList
public function getExportData($pks, $user = null) public function getExportData($pks, $user = null)
{ {
// setup the query // setup the query
if (Hello_worldHelper::checkArray($pks)) if (($pks_size = Hello_worldHelper::checkArray($pks)) !== false || 'bulk' === $pks)
{ {
// Set a value to know this is export method. (USE IN CUSTOM CODE TO ALTER OUTCOME) // Set a value to know this is export method. (USE IN CUSTOM CODE TO ALTER OUTCOME)
$_export = true; $_export = true;
@ -201,7 +228,24 @@ class Hello_worldModelGreetings extends JModelList
// From the hello_world_greeting table // From the hello_world_greeting table
$query->from($db->quoteName('#__hello_world_greeting', 'a')); $query->from($db->quoteName('#__hello_world_greeting', 'a'));
// The bulk export path
if ('bulk' === $pks)
{
$query->where('a.id > 0');
}
// A large array of ID's will not work out well
elseif ($pks_size > 500)
{
// Use lowest ID
$query->where('a.id >= ' . (int) min($pks));
// Use highest ID
$query->where('a.id <= ' . (int) max($pks));
}
// The normal default path
else
{
$query->where('a.id IN (' . implode(',',$pks) . ')'); $query->where('a.id IN (' . implode(',',$pks) . ')');
}
// Implement View Level Access // Implement View Level Access
if (!$user->authorise('core.options', 'com_hello_world')) if (!$user->authorise('core.options', 'com_hello_world'))
{ {
@ -281,6 +325,18 @@ class Hello_worldModelGreetings extends JModelList
$id .= ':' . $this->getState('filter.id'); $id .= ':' . $this->getState('filter.id');
$id .= ':' . $this->getState('filter.search'); $id .= ':' . $this->getState('filter.search');
$id .= ':' . $this->getState('filter.published'); $id .= ':' . $this->getState('filter.published');
// Check if the value is an array
$_access = $this->getState('filter.access');
if (Hello_worldHelper::checkArray($_access))
{
$id .= ':' . implode(':', $_access);
}
// Check if this is only an number or string
elseif (is_numeric($_access)
|| Hello_worldHelper::checkString($_access))
{
$id .= ':' . $_access;
}
$id .= ':' . $this->getState('filter.ordering'); $id .= ':' . $this->getState('filter.ordering');
$id .= ':' . $this->getState('filter.created_by'); $id .= ':' . $this->getState('filter.created_by');
$id .= ':' . $this->getState('filter.modified_by'); $id .= ':' . $this->getState('filter.modified_by');

View File

@ -3,8 +3,8 @@
VDM VDM
/-------------------------------------------------------------------------------------------------------/ /-------------------------------------------------------------------------------------------------------/
@version 1.0.0 @version 1.0.1
@build 30th May, 2020 @build 4th January, 2021
@created 20th September, 2017 @created 20th September, 2017
@package Hello World @package Hello World
@subpackage hello_world.php @subpackage hello_world.php
@ -92,9 +92,19 @@ class Hello_worldModelHello_world extends JModelList
$add = true; $add = true;
break; break;
default: default:
$url = 'index.php?option=com_categories&view=categories&extension=com_hello_world.'.$name; // check for new convention (more stable)
if (strpos($action, '_qpo0O0oqp_') !== false)
{
list($action, $extension) = (array) explode('_qpo0O0oqp_', $action);
$extension = str_replace('_po0O0oq_', '.', $extension);
}
else
{
$extension = 'com_hello_world.' . $name;
}
$url = 'index.php?option=com_categories&view=categories&extension=' . $extension;
$image = $name . '_' . $action . '.' . $type; $image = $name . '_' . $action . '.' . $type;
$alt = $name.'&nbsp;'.$action; $alt = $viewName . '&nbsp;' . $action;
$name = 'COM_HELLO_WORLD_DASHBOARD_' . Hello_worldHelper::safeString($name,'U') . '_' . Hello_worldHelper::safeString($action,'U'); $name = 'COM_HELLO_WORLD_DASHBOARD_' . Hello_worldHelper::safeString($name,'U') . '_' . Hello_worldHelper::safeString($action,'U');
break; break;
} }
@ -126,7 +136,7 @@ class Hello_worldModelHello_world extends JModelList
$dashboard_list = false; $dashboard_list = false;
$accessTo = ''; $accessTo = '';
$accessAdd = ''; $accessAdd = '';
// acces checking start // access checking start
$accessCreate = (isset($viewAccess[$viewName.'.create'])) ? Hello_worldHelper::checkString($viewAccess[$viewName.'.create']):false; $accessCreate = (isset($viewAccess[$viewName.'.create'])) ? Hello_worldHelper::checkString($viewAccess[$viewName.'.create']):false;
$accessAccess = (isset($viewAccess[$viewName.'.access'])) ? Hello_worldHelper::checkString($viewAccess[$viewName.'.access']):false; $accessAccess = (isset($viewAccess[$viewName.'.access'])) ? Hello_worldHelper::checkString($viewAccess[$viewName.'.access']):false;
// set main controllers // set main controllers
@ -141,7 +151,7 @@ class Hello_worldModelHello_world extends JModelList
{ {
$accessAdd = 'core.create'; $accessAdd = 'core.create';
} }
// check if acces to view is set // check if access to view is set
if ($accessAccess) if ($accessAccess)
{ {
$accessTo = $viewAccess[$viewName.'.access']; $accessTo = $viewAccess[$viewName.'.access'];

View File

@ -3,8 +3,8 @@
VDM VDM
/-------------------------------------------------------------------------------------------------------/ /-------------------------------------------------------------------------------------------------------/
@version 1.0.0 @version 1.0.1
@build 30th May, 2020 @build 4th January, 2021
@created 20th September, 2017 @created 20th September, 2017
@package Hello World @package Hello World
@subpackage import.php @subpackage import.php
@ -435,7 +435,15 @@ class Hello_worldModelImport extends JModelLegacy
$jinput = JFactory::getApplication()->input; $jinput = JFactory::getApplication()->input;
foreach($target_headers as $header) foreach($target_headers as $header)
{ {
$data['target_headers'][$header] = $jinput->getString($header, null); if (($column = $jinput->getString($header, false)) !== false ||
($column = $jinput->getString(strtolower($header), false)) !== false)
{
$data['target_headers'][$header] = $column;
}
else
{
$data['target_headers'][$header] = null;
}
} }
// set the data // set the data
if(isset($package['dir'])) if(isset($package['dir']))

View File

@ -27,13 +27,3 @@ CREATE TABLE IF NOT EXISTS `#__hello_world_greeting` (
) ENGINE=InnoDB AUTO_INCREMENT=0 DEFAULT CHARSET=utf8mb4 DEFAULT COLLATE=utf8mb4_unicode_ci; ) ENGINE=InnoDB AUTO_INCREMENT=0 DEFAULT CHARSET=utf8mb4 DEFAULT COLLATE=utf8mb4_unicode_ci;
--
-- Always insure this column rules is large enough for all the access control values.
--
ALTER TABLE `#__assets` CHANGE `rules` `rules` MEDIUMTEXT NOT NULL COMMENT 'JSON encoded access control.';
--
-- Always insure this column name is large enough for long component and view names.
--
ALTER TABLE `#__assets` CHANGE `name` `name` VARCHAR(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL COMMENT 'The unique name for the asset.';

View File

@ -1 +1,2 @@
DROP TABLE IF EXISTS `#__hello_world_greeting`; DROP TABLE IF EXISTS `#__hello_world_greeting`;

View File

@ -3,8 +3,8 @@
VDM VDM
/-------------------------------------------------------------------------------------------------------/ /-------------------------------------------------------------------------------------------------------/
@version 1.0.0 @version 1.0.1
@build 30th May, 2020 @build 4th January, 2021
@created 20th September, 2017 @created 20th September, 2017
@package Hello World @package Hello World
@subpackage greeting.php @subpackage greeting.php

View File

@ -2,8 +2,8 @@
VDM VDM
/-------------------------------------------------------------------------------------------------------/ /-------------------------------------------------------------------------------------------------------/
@version 1.0.0 @version 1.0.1
@build 30th May, 2020 @build 4th January, 2021
@created 20th September, 2017 @created 20th September, 2017
@package Hello World @package Hello World
@subpackage submitbutton.js @subpackage submitbutton.js

View File

@ -3,8 +3,8 @@
VDM VDM
/-------------------------------------------------------------------------------------------------------/ /-------------------------------------------------------------------------------------------------------/
@version 1.0.0 @version 1.0.1
@build 30th May, 2020 @build 4th January, 2021
@created 20th September, 2017 @created 20th September, 2017
@package Hello World @package Hello World
@subpackage edit.php @subpackage edit.php
@ -69,7 +69,7 @@ $componentParams = $this->params; // will be removed just use $this->params inst
<?php $this->tab_name = 'greetingTab'; ?> <?php $this->tab_name = 'greetingTab'; ?>
<?php echo JLayoutHelper::render('joomla.edit.params', $this); ?> <?php echo JLayoutHelper::render('joomla.edit.params', $this); ?>
<?php if ($this->canDo->get('core.delete') || $this->canDo->get('core.edit.created_by') || $this->canDo->get('core.edit.state') || $this->canDo->get('core.edit.created')) : ?> <?php if ($this->canDo->get('core.edit.created_by') || $this->canDo->get('core.edit.created') || $this->canDo->get('core.edit.state') || ($this->canDo->get('core.delete') && $this->canDo->get('core.edit.state'))) : ?>
<?php echo JHtml::_('bootstrap.addTab', 'greetingTab', 'publishing', JText::_('COM_HELLO_WORLD_GREETING_PUBLISHING', true)); ?> <?php echo JHtml::_('bootstrap.addTab', 'greetingTab', 'publishing', JText::_('COM_HELLO_WORLD_GREETING_PUBLISHING', true)); ?>
<div class="row-fluid form-horizontal-desktop"> <div class="row-fluid form-horizontal-desktop">
<div class="span6"> <div class="span6">

View File

@ -3,8 +3,8 @@
VDM VDM
/-------------------------------------------------------------------------------------------------------/ /-------------------------------------------------------------------------------------------------------/
@version 1.0.0 @version 1.0.1
@build 30th May, 2020 @build 4th January, 2021
@created 20th September, 2017 @created 20th September, 2017
@package Hello World @package Hello World
@subpackage view.html.php @subpackage view.html.php

View File

@ -3,8 +3,8 @@
VDM VDM
/-------------------------------------------------------------------------------------------------------/ /-------------------------------------------------------------------------------------------------------/
@version 1.0.0 @version 1.0.1
@build 30th May, 2020 @build 4th January, 2021
@created 20th September, 2017 @created 20th September, 2017
@package Hello World @package Hello World
@subpackage default.php @subpackage default.php
@ -21,36 +21,17 @@
// No direct access to this file // No direct access to this file
defined('_JEXEC') or die('Restricted access'); defined('_JEXEC') or die('Restricted access');
// load tooltip behavior
JHtml::_('behavior.tooltip'); JHtml::_('behavior.tooltip');
JHtml::_('behavior.multiselect'); JHtml::_('behavior.multiselect');
JHtml::_('dropdown.init'); JHtml::_('dropdown.init');
JHtml::_('formbehavior.chosen', '.multipleAccessLevels', null, array('placeholder_text_multiple' => '- ' . JText::_('COM_HELLO_WORLD_FILTER_SELECT_ACCESS') . ' -'));
JHtml::_('formbehavior.chosen', 'select'); JHtml::_('formbehavior.chosen', 'select');
if ($this->saveOrder) if ($this->saveOrder)
{ {
$saveOrderingUrl = 'index.php?option=com_hello_world&task=greetings.saveOrderAjax&tmpl=component'; $saveOrderingUrl = 'index.php?option=com_hello_world&task=greetings.saveOrderAjax&tmpl=component';
JHtml::_('sortablelist.sortable', 'greetingList', 'adminForm', strtolower($this->listDirn), $saveOrderingUrl); JHtml::_('sortablelist.sortable', 'greetingList', 'adminForm', strtolower($this->listDirn), $saveOrderingUrl);
} }
?> ?>
<script type="text/javascript">
Joomla.orderTable = function()
{
table = document.getElementById("sortTable");
direction = document.getElementById("directionTable");
order = table.options[table.selectedIndex].value;
if (order != '<?php echo $this->listOrder; ?>')
{
dirn = 'asc';
}
else
{
dirn = direction.options[direction.selectedIndex].value;
}
Joomla.tableOrdering(order, dirn, '');
}
</script>
<form action="<?php echo JRoute::_('index.php?option=com_hello_world&view=greetings'); ?>" method="post" name="adminForm" id="adminForm"> <form action="<?php echo JRoute::_('index.php?option=com_hello_world&view=greetings'); ?>" method="post" name="adminForm" id="adminForm">
<?php if(!empty( $this->sidebar)): ?> <?php if(!empty( $this->sidebar)): ?>
<div id="j-sidebar-container" class="span2"> <div id="j-sidebar-container" class="span2">
@ -60,13 +41,17 @@ if ($this->saveOrder)
<?php else : ?> <?php else : ?>
<div id="j-main-container"> <div id="j-main-container">
<?php endif; ?> <?php endif; ?>
<?php
// Add the trash helper layout
echo JLayoutHelper::render('trashhelper', $this);
// Add the searchtools
echo JLayoutHelper::render('joomla.searchtools.default', array('view' => $this));
?>
<?php if (empty($this->items)): ?> <?php if (empty($this->items)): ?>
<?php echo $this->loadTemplate('toolbar');?>
<div class="alert alert-no-items"> <div class="alert alert-no-items">
<?php echo JText::_('JGLOBAL_NO_MATCHING_RESULTS'); ?> <?php echo JText::_('JGLOBAL_NO_MATCHING_RESULTS'); ?>
</div> </div>
<?php else : ?> <?php else : ?>
<?php echo $this->loadTemplate('toolbar');?>
<table class="table table-striped" id="greetingList"> <table class="table table-striped" id="greetingList">
<thead><?php echo $this->loadTemplate('head');?></thead> <thead><?php echo $this->loadTemplate('head');?></thead>
<tfoot><?php echo $this->loadTemplate('foot');?></tfoot> <tfoot><?php echo $this->loadTemplate('foot');?></tfoot>
@ -84,8 +69,6 @@ if ($this->saveOrder)
$this->loadTemplate('batch_body') $this->loadTemplate('batch_body')
); ?> ); ?>
<?php endif; ?> <?php endif; ?>
<input type="hidden" name="filter_order" value="<?php echo $this->listOrder; ?>" />
<input type="hidden" name="filter_order_Dir" value="<?php echo $this->listDirn; ?>" />
<input type="hidden" name="boxchecked" value="0" /> <input type="hidden" name="boxchecked" value="0" />
</div> </div>
<?php endif; ?> <?php endif; ?>

View File

@ -3,8 +3,8 @@
VDM VDM
/-------------------------------------------------------------------------------------------------------/ /-------------------------------------------------------------------------------------------------------/
@version 1.0.0 @version 1.0.1
@build 30th May, 2020 @build 4th January, 2021
@created 20th September, 2017 @created 20th September, 2017
@package Hello World @package Hello World
@subpackage default_batch_body.php @subpackage default_batch_body.php

View File

@ -3,8 +3,8 @@
VDM VDM
/-------------------------------------------------------------------------------------------------------/ /-------------------------------------------------------------------------------------------------------/
@version 1.0.0 @version 1.0.1
@build 30th May, 2020 @build 4th January, 2021
@created 20th September, 2017 @created 20th September, 2017
@package Hello World @package Hello World
@subpackage default_batch_footer.php @subpackage default_batch_footer.php

View File

@ -3,8 +3,8 @@
VDM VDM
/-------------------------------------------------------------------------------------------------------/ /-------------------------------------------------------------------------------------------------------/
@version 1.0.0 @version 1.0.1
@build 30th May, 2020 @build 4th January, 2021
@created 20th September, 2017 @created 20th September, 2017
@package Hello World @package Hello World
@subpackage default_body.php @subpackage default_body.php
@ -34,11 +34,8 @@ $edit = "index.php?option=com_hello_world&view=greetings&task=greeting.edit";
<td class="order nowrap center hidden-phone"> <td class="order nowrap center hidden-phone">
<?php if ($canDo->get('core.edit.state')): ?> <?php if ($canDo->get('core.edit.state')): ?>
<?php <?php
if ($this->saveOrder) $iconClass = '';
{ if (!$this->saveOrder)
$iconClass = ' inactive';
}
else
{ {
$iconClass = ' inactive tip-top" hasTooltip" title="' . JHtml::tooltipText('JORDERINGDISABLED'); $iconClass = ' inactive tip-top" hasTooltip" title="' . JHtml::tooltipText('JORDERINGDISABLED');
} }

View File

@ -3,8 +3,8 @@
VDM VDM
/-------------------------------------------------------------------------------------------------------/ /-------------------------------------------------------------------------------------------------------/
@version 1.0.0 @version 1.0.1
@build 30th May, 2020 @build 4th January, 2021
@created 20th September, 2017 @created 20th September, 2017
@package Hello World @package Hello World
@subpackage default_foot.php @subpackage default_foot.php

View File

@ -3,8 +3,8 @@
VDM VDM
/-------------------------------------------------------------------------------------------------------/ /-------------------------------------------------------------------------------------------------------/
@version 1.0.0 @version 1.0.1
@build 30th May, 2020 @build 4th January, 2021
@created 20th September, 2017 @created 20th September, 2017
@package Hello World @package Hello World
@subpackage default_head.php @subpackage default_head.php
@ -25,7 +25,7 @@ defined('_JEXEC') or die('Restricted access');
<tr> <tr>
<?php if ($this->canEdit&& $this->canState): ?> <?php if ($this->canEdit&& $this->canState): ?>
<th width="1%" class="nowrap center hidden-phone"> <th width="1%" class="nowrap center hidden-phone">
<?php echo JHtml::_('grid.sort', '<i class="icon-menu-2"></i>', 'ordering', $this->listDirn, $this->listOrder, null, 'asc', 'JGRID_HEADING_ORDERING'); ?> <?php echo JHtml::_('searchtools.sort', '', 'a.ordering', $this->listDirn, $this->listOrder, null, 'asc', 'JGRID_HEADING_ORDERING', 'icon-menu-2'); ?>
</th> </th>
<th width="20" class="nowrap center"> <th width="20" class="nowrap center">
<?php echo JHtml::_('grid.checkall'); ?> <?php echo JHtml::_('grid.checkall'); ?>
@ -39,11 +39,11 @@ defined('_JEXEC') or die('Restricted access');
</th> </th>
<?php endif; ?> <?php endif; ?>
<th class="nowrap" > <th class="nowrap" >
<?php echo JHtml::_('grid.sort', 'COM_HELLO_WORLD_GREETING_GREETING_LABEL', 'a.greeting', $this->listDirn, $this->listOrder); ?> <?php echo JHtml::_('searchtools.sort', 'COM_HELLO_WORLD_GREETING_GREETING_LABEL', 'a.greeting', $this->listDirn, $this->listOrder); ?>
</th> </th>
<?php if ($this->canState): ?> <?php if ($this->canState): ?>
<th width="10" class="nowrap center" > <th width="10" class="nowrap center" >
<?php echo JHtml::_('grid.sort', 'COM_HELLO_WORLD_GREETING_STATUS', 'a.published', $this->listDirn, $this->listOrder); ?> <?php echo JHtml::_('searchtools.sort', 'COM_HELLO_WORLD_GREETING_STATUS', 'a.published', $this->listDirn, $this->listOrder); ?>
</th> </th>
<?php else: ?> <?php else: ?>
<th width="10" class="nowrap center" > <th width="10" class="nowrap center" >
@ -51,6 +51,6 @@ defined('_JEXEC') or die('Restricted access');
</th> </th>
<?php endif; ?> <?php endif; ?>
<th width="5" class="nowrap center hidden-phone" > <th width="5" class="nowrap center hidden-phone" >
<?php echo JHtml::_('grid.sort', 'COM_HELLO_WORLD_GREETING_ID', 'a.id', $this->listDirn, $this->listOrder); ?> <?php echo JHtml::_('searchtools.sort', 'COM_HELLO_WORLD_GREETING_ID', 'a.id', $this->listDirn, $this->listOrder); ?>
</th> </th>
</tr> </tr>

View File

@ -3,8 +3,8 @@
VDM VDM
/-------------------------------------------------------------------------------------------------------/ /-------------------------------------------------------------------------------------------------------/
@version 1.0.0 @version 1.0.1
@build 30th May, 2020 @build 4th January, 2021
@created 20th September, 2017 @created 20th September, 2017
@package Hello World @package Hello World
@subpackage default_toolbar.php @subpackage default_toolbar.php

View File

@ -3,8 +3,8 @@
VDM VDM
/-------------------------------------------------------------------------------------------------------/ /-------------------------------------------------------------------------------------------------------/
@version 1.0.0 @version 1.0.1
@build 30th May, 2020 @build 4th January, 2021
@created 20th September, 2017 @created 20th September, 2017
@package Hello World @package Hello World
@subpackage view.html.php @subpackage view.html.php
@ -43,10 +43,14 @@ class Hello_worldViewGreetings extends JViewLegacy
$this->pagination = $this->get('Pagination'); $this->pagination = $this->get('Pagination');
$this->state = $this->get('State'); $this->state = $this->get('State');
$this->user = JFactory::getUser(); $this->user = JFactory::getUser();
// Load the filter form from xml.
$this->filterForm = $this->get('FilterForm');
// Load the active filters.
$this->activeFilters = $this->get('ActiveFilters');
// Add the list ordering clause. // Add the list ordering clause.
$this->listOrder = $this->escape($this->state->get('list.ordering', 'a.id')); $this->listOrder = $this->escape($this->state->get('list.ordering', 'a.id'));
$this->listDirn = $this->escape($this->state->get('list.direction', 'asc')); $this->listDirn = $this->escape($this->state->get('list.direction', 'DESC'));
$this->saveOrder = $this->listOrder == 'ordering'; $this->saveOrder = $this->listOrder == 'a.ordering';
// set the return here value // set the return here value
$this->return_here = urlencode(base64_encode((string) JUri::getInstance())); $this->return_here = urlencode(base64_encode((string) JUri::getInstance()));
// get global action permissions // get global action permissions
@ -163,15 +167,8 @@ class Hello_worldViewGreetings extends JViewLegacy
JToolBarHelper::preferences('com_hello_world'); JToolBarHelper::preferences('com_hello_world');
} }
if ($this->canState) // Only load published batch if state and batch is allowed
{ if ($this->canState && $this->canBatch)
JHtmlSidebar::addFilter(
JText::_('JOPTION_SELECT_PUBLISHED'),
'filter_published',
JHtml::_('select.options', JHtml::_('jgrid.publishedOptions'), 'value', 'text', $this->state->get('filter.published'), true)
);
// only load if batch allowed
if ($this->canBatch)
{ {
JHtmlBatch_::addListSelection( JHtmlBatch_::addListSelection(
JText::_('COM_HELLO_WORLD_KEEP_ORIGINAL_STATE'), JText::_('COM_HELLO_WORLD_KEEP_ORIGINAL_STATE'),
@ -179,14 +176,8 @@ class Hello_worldViewGreetings extends JViewLegacy
JHtml::_('select.options', JHtml::_('jgrid.publishedOptions', array('all' => false)), 'value', 'text', '', true) JHtml::_('select.options', JHtml::_('jgrid.publishedOptions', array('all' => false)), 'value', 'text', '', true)
); );
} }
}
JHtmlSidebar::addFilter(
JText::_('JOPTION_SELECT_ACCESS'),
'filter_access',
JHtml::_('select.options', JHtml::_('access.assetgroups'), 'value', 'text', $this->state->get('filter.access'))
);
// Only load access batch if create, edit and batch is allowed
if ($this->canBatch && $this->canCreate && $this->canEdit) if ($this->canBatch && $this->canCreate && $this->canEdit)
{ {
JHtmlBatch_::addListSelection( JHtmlBatch_::addListSelection(
@ -238,7 +229,7 @@ class Hello_worldViewGreetings extends JViewLegacy
protected function getSortFields() protected function getSortFields()
{ {
return array( return array(
'ordering' => JText::_('JGRID_HEADING_ORDERING'), 'a.ordering' => JText::_('JGRID_HEADING_ORDERING'),
'a.published' => JText::_('JSTATUS'), 'a.published' => JText::_('JSTATUS'),
'a.greeting' => JText::_('COM_HELLO_WORLD_GREETING_GREETING_LABEL'), 'a.greeting' => JText::_('COM_HELLO_WORLD_GREETING_GREETING_LABEL'),
'a.id' => JText::_('JGRID_HEADING_ID') 'a.id' => JText::_('JGRID_HEADING_ID')

View File

@ -3,8 +3,8 @@
VDM VDM
/-------------------------------------------------------------------------------------------------------/ /-------------------------------------------------------------------------------------------------------/
@version 1.0.0 @version 1.0.1
@build 30th May, 2020 @build 4th January, 2021
@created 20th September, 2017 @created 20th September, 2017
@package Hello World @package Hello World
@subpackage default.php @subpackage default.php

View File

@ -3,8 +3,8 @@
VDM VDM
/-------------------------------------------------------------------------------------------------------/ /-------------------------------------------------------------------------------------------------------/
@version 1.0.0 @version 1.0.1
@build 30th May, 2020 @build 4th January, 2021
@created 20th September, 2017 @created 20th September, 2017
@package Hello World @package Hello World
@subpackage default_main.php @subpackage default_main.php

View File

@ -3,8 +3,8 @@
VDM VDM
/-------------------------------------------------------------------------------------------------------/ /-------------------------------------------------------------------------------------------------------/
@version 1.0.0 @version 1.0.1
@build 30th May, 2020 @build 4th January, 2021
@created 20th September, 2017 @created 20th September, 2017
@package Hello World @package Hello World
@subpackage default_vdm.php @subpackage default_vdm.php

View File

@ -3,8 +3,8 @@
VDM VDM
/-------------------------------------------------------------------------------------------------------/ /-------------------------------------------------------------------------------------------------------/
@version 1.0.0 @version 1.0.1
@build 30th May, 2020 @build 4th January, 2021
@created 20th September, 2017 @created 20th September, 2017
@package Hello World @package Hello World
@subpackage view.html.php @subpackage view.html.php

View File

@ -3,8 +3,8 @@
VDM VDM
/-------------------------------------------------------------------------------------------------------/ /-------------------------------------------------------------------------------------------------------/
@version 1.0.0 @version 1.0.1
@build 30th May, 2020 @build 4th January, 2021
@created 20th September, 2017 @created 20th September, 2017
@package Hello World @package Hello World
@subpackage default.php @subpackage default.php

View File

@ -3,8 +3,8 @@
VDM VDM
/-------------------------------------------------------------------------------------------------------/ /-------------------------------------------------------------------------------------------------------/
@version 1.0.0 @version 1.0.1
@build 30th May, 2020 @build 4th January, 2021
@created 20th September, 2017 @created 20th September, 2017
@package Hello World @package Hello World
@subpackage view.html.php @subpackage view.html.php

View File

@ -1,15 +1,15 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<extension type="component" version="3.2" method="upgrade"> <extension type="component" version="3.2" method="upgrade">
<name>COM_HELLO_WORLD</name> <name>COM_HELLO_WORLD</name>
<creationDate>30th May, 2020</creationDate> <creationDate>4th January, 2021</creationDate>
<author>Llewellyn</author> <author>Llewellyn</author>
<authorEmail>joomla@vdm.io</authorEmail> <authorEmail>joomla@vdm.io</authorEmail>
<authorUrl>https://www.vdm.io</authorUrl> <authorUrl>https://www.vdm.io</authorUrl>
<copyright>Copyright (C) 2015. All Rights Reserved</copyright> <copyright>Copyright (C) 2015. All Rights Reserved</copyright>
<license>GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html</license> <license>GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html</license>
<version>1.0.0</version> <version>1.0.1</version>
<description><![CDATA[ <description><![CDATA[
<h1>Hello World (v.1.0.0)</h1> <h1>Hello World (v.1.0.1)</h1>
<div style="clear: both;"></div> <div style="clear: both;"></div>
<p></p> <p></p>
<p>Created by <a href="https://www.vdm.io" target="_blank">Llewellyn</a><br /><small>Development started 20th September, 2017</small></p> <p>Created by <a href="https://www.vdm.io" target="_blank">Llewellyn</a><br /><small>Development started 20th September, 2017</small></p>
@ -97,6 +97,6 @@
</administration> </administration>
<updateservers> <updateservers>
<server type="extension" enabled="1" element="com_hello_world" name="Hello World">https://raw.githubusercontent.com/namibia/JCB-Hello-World/master/helloworld_updateserver.xml</server> <server type="extension" enabled="1" element="com_hello_world" name="Hello World">https://raw.githubusercontent.com/Llewellynvdm/Joomla-Hello-World-Component/master/helloworld_updateserver.xml</server>
</updateservers> </updateservers>
</extension> </extension>

View File

@ -0,0 +1,19 @@
<updates>
<update>
<name>Hello World</name>
<description>Hello World</description>
<element>com_hello_world</element>
<type>component</type>
<version>1.0.1</version>
<infourl title="Hello World!">https://www.vdm.io</infourl>
<downloads>
<downloadurl type="full" format="zip">https://github.com/Llewellynvdm/Joomla-Hello-World-Component/archive/master.zip</downloadurl>
</downloads>
<tags>
<tag>stable</tag>
</tags>
<maintainer>Llewellyn</maintainer>
<maintainerurl>https://www.vdm.io</maintainerurl>
<targetplatform name="joomla" version="3.*"/>
</update>
</updates>

View File

@ -3,8 +3,8 @@
VDM VDM
/-------------------------------------------------------------------------------------------------------/ /-------------------------------------------------------------------------------------------------------/
@version 1.0.0 @version 1.0.1
@build 30th May, 2020 @build 4th January, 2021
@created 20th September, 2017 @created 20th September, 2017
@package Hello World @package Hello World
@subpackage script.php @subpackage script.php
@ -84,7 +84,7 @@ class com_hello_worldInstallerScript
$greeting_done = $db->execute(); $greeting_done = $db->execute();
if ($greeting_done) if ($greeting_done)
{ {
// If succesfully remove greeting add queued success message. // If successfully remove greeting add queued success message.
$app->enqueueMessage(JText::_('The fields with type (com_hello_world.greeting) context was removed from the <b>#__fields</b> table')); $app->enqueueMessage(JText::_('The fields with type (com_hello_world.greeting) context was removed from the <b>#__fields</b> table'));
} }
// Also Remove greeting field values // Also Remove greeting field values
@ -98,7 +98,7 @@ class com_hello_worldInstallerScript
$greeting_done = $db->execute(); $greeting_done = $db->execute();
if ($greeting_done) if ($greeting_done)
{ {
// If succesfully remove greeting add queued success message. // If successfully remove greeting add queued success message.
$app->enqueueMessage(JText::_('The fields values for greeting was removed from the <b>#__fields_values</b> table')); $app->enqueueMessage(JText::_('The fields values for greeting was removed from the <b>#__fields_values</b> table'));
} }
} }
@ -128,7 +128,7 @@ class com_hello_worldInstallerScript
$greeting_done = $db->execute(); $greeting_done = $db->execute();
if ($greeting_done) if ($greeting_done)
{ {
// If succesfully remove greeting add queued success message. // If successfully remove greeting add queued success message.
$app->enqueueMessage(JText::_('The field groups with type (com_hello_world.greeting) context was removed from the <b>#__fields_groups</b> table')); $app->enqueueMessage(JText::_('The field groups with type (com_hello_world.greeting) context was removed from the <b>#__fields_groups</b> table'));
} }
} }
@ -160,7 +160,7 @@ class com_hello_worldInstallerScript
$greeting_done = $db->execute(); $greeting_done = $db->execute();
if ($greeting_done) if ($greeting_done)
{ {
// If succesfully remove greeting add queued success message. // If successfully remove greeting add queued success message.
$app->enqueueMessage(JText::_('The (com_hello_world.greeting) type alias was removed from the <b>#__content_type</b> table')); $app->enqueueMessage(JText::_('The (com_hello_world.greeting) type alias was removed from the <b>#__content_type</b> table'));
} }
@ -175,7 +175,7 @@ class com_hello_worldInstallerScript
$greeting_done = $db->execute(); $greeting_done = $db->execute();
if ($greeting_done) if ($greeting_done)
{ {
// If succesfully remove greeting add queued success message. // If successfully remove greeting add queued success message.
$app->enqueueMessage(JText::_('The (com_hello_world.greeting) type alias was removed from the <b>#__contentitem_tag_map</b> table')); $app->enqueueMessage(JText::_('The (com_hello_world.greeting) type alias was removed from the <b>#__contentitem_tag_map</b> table'));
} }
@ -190,7 +190,7 @@ class com_hello_worldInstallerScript
$greeting_done = $db->execute(); $greeting_done = $db->execute();
if ($greeting_done) if ($greeting_done)
{ {
// If succesfully remove greeting add queued success message. // If successfully removed greeting add queued success message.
$app->enqueueMessage(JText::_('The (com_hello_world.greeting) type alias was removed from the <b>#__ucm_content</b> table')); $app->enqueueMessage(JText::_('The (com_hello_world.greeting) type alias was removed from the <b>#__ucm_content</b> table'));
} }
@ -246,7 +246,7 @@ class com_hello_worldInstallerScript
$greeting_done = $db->execute(); $greeting_done = $db->execute();
if ($greeting_done) if ($greeting_done)
{ {
// If succesfully remove Greeting add queued success message. // If successfully remove Greeting add queued success message.
$app->enqueueMessage(JText::_('The (com_hello_world.greeting) type alias was removed from the <b>#__content_type</b> table')); $app->enqueueMessage(JText::_('The (com_hello_world.greeting) type alias was removed from the <b>#__content_type</b> table'));
} }
@ -261,7 +261,7 @@ class com_hello_worldInstallerScript
$greeting_done = $db->execute(); $greeting_done = $db->execute();
if ($greeting_done) if ($greeting_done)
{ {
// If succesfully remove Greeting add queued success message. // If successfully remove Greeting add queued success message.
$app->enqueueMessage(JText::_('The (com_hello_world.greeting) type alias was removed from the <b>#__contentitem_tag_map</b> table')); $app->enqueueMessage(JText::_('The (com_hello_world.greeting) type alias was removed from the <b>#__contentitem_tag_map</b> table'));
} }
@ -276,7 +276,7 @@ class com_hello_worldInstallerScript
$greeting_done = $db->execute(); $greeting_done = $db->execute();
if ($greeting_done) if ($greeting_done)
{ {
// If succesfully remove Greeting add queued success message. // If successfully removed Greeting add queued success message.
$app->enqueueMessage(JText::_('The (com_hello_world.greeting) type alias was removed from the <b>#__ucm_content</b> table')); $app->enqueueMessage(JText::_('The (com_hello_world.greeting) type alias was removed from the <b>#__ucm_content</b> table'));
} }
@ -320,7 +320,7 @@ class com_hello_worldInstallerScript
$greeting_done = $db->execute(); $greeting_done = $db->execute();
if ($greeting_done) if ($greeting_done)
{ {
// If succesfully remove hello_world add queued success message. // If successfully removed hello_world add queued success message.
$app->enqueueMessage(JText::_('All related items was removed from the <b>#__assets</b> table')); $app->enqueueMessage(JText::_('All related items was removed from the <b>#__assets</b> table'));
} }
@ -569,7 +569,7 @@ class com_hello_worldInstallerScript
echo '<a target="_blank" href="https://www.vdm.io" title="Hello World"> echo '<a target="_blank" href="https://www.vdm.io" title="Hello World">
<img src="components/com_hello_world/assets/images/vdm-component.jpg"/> <img src="components/com_hello_world/assets/images/vdm-component.jpg"/>
</a> </a>
<h3>Upgrade to Version 1.0.0 Was Successful! Let us know if anything is not working as expected.</h3>'; <h3>Upgrade to Version 1.0.1 Was Successful! Let us know if anything is not working as expected.</h3>';
// Set db if not set already. // Set db if not set already.
if (!isset($db)) if (!isset($db))

View File

@ -2,8 +2,8 @@
VDM VDM
/-------------------------------------------------------------------------------------------------------/ /-------------------------------------------------------------------------------------------------------/
@version 1.0.0 @version 1.0.1
@build 30th May, 2020 @build 4th January, 2021
@created 20th September, 2017 @created 20th September, 2017
@package Hello World @package Hello World
@subpackage greet.css @subpackage greet.css

View File

@ -2,8 +2,8 @@
VDM VDM
/-------------------------------------------------------------------------------------------------------/ /-------------------------------------------------------------------------------------------------------/
@version 1.0.0 @version 1.0.1
@build 30th May, 2020 @build 4th January, 2021
@created 20th September, 2017 @created 20th September, 2017
@package Hello World @package Hello World
@subpackage greeting.css @subpackage greeting.css

View File

@ -2,8 +2,8 @@
VDM VDM
/-------------------------------------------------------------------------------------------------------/ /-------------------------------------------------------------------------------------------------------/
@version 1.0.0 @version 1.0.1
@build 30th May, 2020 @build 4th January, 2021
@created 20th September, 2017 @created 20th September, 2017
@package Hello World @package Hello World
@subpackage greetings.css @subpackage greetings.css

View File

@ -2,8 +2,8 @@
VDM VDM
/-------------------------------------------------------------------------------------------------------/ /-------------------------------------------------------------------------------------------------------/
@version 1.0.0 @version 1.0.1
@build 30th May, 2020 @build 4th January, 2021
@created 20th September, 2017 @created 20th September, 2017
@package Hello World @package Hello World
@subpackage site.css @subpackage site.css

View File

@ -2,8 +2,8 @@
VDM VDM
/-------------------------------------------------------------------------------------------------------/ /-------------------------------------------------------------------------------------------------------/
@version 1.0.0 @version 1.0.1
@build 30th May, 2020 @build 4th January, 2021
@created 20th September, 2017 @created 20th September, 2017
@package Hello World @package Hello World
@subpackage site.js @subpackage site.js

View File

@ -3,8 +3,8 @@
VDM VDM
/-------------------------------------------------------------------------------------------------------/ /-------------------------------------------------------------------------------------------------------/
@version 1.0.0 @version 1.0.1
@build 30th May, 2020 @build 4th January, 2021
@created 20th September, 2017 @created 20th September, 2017
@package Hello World @package Hello World
@subpackage controller.php @subpackage controller.php

View File

@ -3,8 +3,8 @@
VDM VDM
/-------------------------------------------------------------------------------------------------------/ /-------------------------------------------------------------------------------------------------------/
@version 1.0.0 @version 1.0.1
@build 30th May, 2020 @build 4th January, 2021
@created 20th September, 2017 @created 20th September, 2017
@package Hello World @package Hello World
@subpackage greeting.php @subpackage greeting.php

View File

@ -3,8 +3,8 @@
VDM VDM
/-------------------------------------------------------------------------------------------------------/ /-------------------------------------------------------------------------------------------------------/
@version 1.0.0 @version 1.0.1
@build 30th May, 2020 @build 4th January, 2021
@created 20th September, 2017 @created 20th September, 2017
@package Hello World @package Hello World
@subpackage hello_world.php @subpackage hello_world.php
@ -20,6 +20,7 @@
// No direct access to this file // No direct access to this file
defined('_JEXEC') or die('Restricted access'); defined('_JEXEC') or die('Restricted access');
JHtml::_('behavior.tabstate'); JHtml::_('behavior.tabstate');
// Set the component css/js // Set the component css/js

View File

@ -3,8 +3,8 @@
VDM VDM
/-------------------------------------------------------------------------------------------------------/ /-------------------------------------------------------------------------------------------------------/
@version 1.0.0 @version 1.0.1
@build 30th May, 2020 @build 4th January, 2021
@created 20th September, 2017 @created 20th September, 2017
@package Hello World @package Hello World
@subpackage category.php @subpackage category.php

View File

@ -3,8 +3,8 @@
VDM VDM
/-------------------------------------------------------------------------------------------------------/ /-------------------------------------------------------------------------------------------------------/
@version 1.0.0 @version 1.0.1
@build 30th May, 2020 @build 4th January, 2021
@created 20th September, 2017 @created 20th September, 2017
@package Hello World @package Hello World
@subpackage headercheck.php @subpackage headercheck.php

View File

@ -3,8 +3,8 @@
VDM VDM
/-------------------------------------------------------------------------------------------------------/ /-------------------------------------------------------------------------------------------------------/
@version 1.0.0 @version 1.0.1
@build 30th May, 2020 @build 4th January, 2021
@created 20th September, 2017 @created 20th September, 2017
@package Hello World @package Hello World
@subpackage hello_world.php @subpackage hello_world.php
@ -22,6 +22,7 @@
defined('_JEXEC') or die('Restricted access'); defined('_JEXEC') or die('Restricted access');
use Joomla\CMS\Language\Language; use Joomla\CMS\Language\Language;
use Joomla\Registry\Registry;
use Joomla\String\StringHelper; use Joomla\String\StringHelper;
use Joomla\Utilities\ArrayHelper; use Joomla\Utilities\ArrayHelper;
@ -44,7 +45,7 @@ abstract class Hello_worldHelper
*/ */
public static $langTag; public static $langTag;
/***[INSERTED$$$$]***//*69*/
/** /**
* Write a file to the server * Write a file to the server
* *
@ -76,8 +77,8 @@ abstract class Hello_worldHelper
} }
return $klaar; return $klaar;
} }
/***[/INSERTED$$$$]***/
/***[INSERTED$$$$]***//*60*/
/** /**
* get the content of a file * get the content of a file
* *
@ -129,8 +130,8 @@ abstract class Hello_worldHelper
} }
return $none; return $none;
} }
/***[/INSERTED$$$$]***/
/***[INSERTED$$$$]***//*71*/
/** /**
* Remove folders with files * Remove folders with files
* *
@ -203,7 +204,7 @@ abstract class Hello_worldHelper
} }
return false; return false;
} }
/***[/INSERTED$$$$]***/
/** /**
* Load the Composer Vendors * Load the Composer Vendors

View File

@ -3,8 +3,8 @@
VDM VDM
/-------------------------------------------------------------------------------------------------------/ /-------------------------------------------------------------------------------------------------------/
@version 1.0.0 @version 1.0.1
@build 30th May, 2020 @build 4th January, 2021
@created 20th September, 2017 @created 20th September, 2017
@package Hello World @package Hello World
@subpackage route.php @subpackage route.php

View File

@ -3,6 +3,8 @@ COM_HELLO_WORLD="Hello World"
COM_HELLO_WORLD_CREATE_NEW_S="Create New %s" COM_HELLO_WORLD_CREATE_NEW_S="Create New %s"
COM_HELLO_WORLD_EDIT="Edit" COM_HELLO_WORLD_EDIT="Edit"
COM_HELLO_WORLD_EDIT_S="Edit %s" COM_HELLO_WORLD_EDIT_S="Edit %s"
COM_HELLO_WORLD_FILTER_GREETING_ASCENDING="Greeting ascending"
COM_HELLO_WORLD_FILTER_GREETING_DESCENDING="Greeting descending"
COM_HELLO_WORLD_GREET="Greeting" COM_HELLO_WORLD_GREET="Greeting"
COM_HELLO_WORLD_GREETING="Greeting" COM_HELLO_WORLD_GREETING="Greeting"
COM_HELLO_WORLD_GREETINGS="Greetings" COM_HELLO_WORLD_GREETINGS="Greetings"
@ -16,6 +18,8 @@ COM_HELLO_WORLD_GREETINGS_N_ITEMS_CHECKED_IN_1="%d Greeting successfully checked
COM_HELLO_WORLD_GREETINGS_N_ITEMS_CHECKED_IN_MORE="%d Greetings successfully checked in." COM_HELLO_WORLD_GREETINGS_N_ITEMS_CHECKED_IN_MORE="%d Greetings successfully checked in."
COM_HELLO_WORLD_GREETINGS_N_ITEMS_DELETED="%s Greetings deleted." COM_HELLO_WORLD_GREETINGS_N_ITEMS_DELETED="%s Greetings deleted."
COM_HELLO_WORLD_GREETINGS_N_ITEMS_DELETED_1="%s Greeting deleted." COM_HELLO_WORLD_GREETINGS_N_ITEMS_DELETED_1="%s Greeting deleted."
COM_HELLO_WORLD_GREETINGS_N_ITEMS_FAILED_PUBLISHING="%s Greetings failed publishing."
COM_HELLO_WORLD_GREETINGS_N_ITEMS_FAILED_PUBLISHING_1="%s Greeting failed publishing."
COM_HELLO_WORLD_GREETINGS_N_ITEMS_FEATURED="%s Greetings featured." COM_HELLO_WORLD_GREETINGS_N_ITEMS_FEATURED="%s Greetings featured."
COM_HELLO_WORLD_GREETINGS_N_ITEMS_FEATURED_1="%s Greeting featured." COM_HELLO_WORLD_GREETINGS_N_ITEMS_FEATURED_1="%s Greeting featured."
COM_HELLO_WORLD_GREETINGS_N_ITEMS_PUBLISHED="%s Greetings published." COM_HELLO_WORLD_GREETINGS_N_ITEMS_PUBLISHED="%s Greetings published."

View File

@ -3,8 +3,8 @@
VDM VDM
/-------------------------------------------------------------------------------------------------------/ /-------------------------------------------------------------------------------------------------------/
@version 1.0.0 @version 1.0.1
@build 30th May, 2020 @build 4th January, 2021
@created 20th September, 2017 @created 20th September, 2017
@package Hello World @package Hello World
@subpackage details_left.php @subpackage details_left.php

View File

@ -3,8 +3,8 @@
VDM VDM
/-------------------------------------------------------------------------------------------------------/ /-------------------------------------------------------------------------------------------------------/
@version 1.0.0 @version 1.0.1
@build 30th May, 2020 @build 4th January, 2021
@created 20th September, 2017 @created 20th September, 2017
@package Hello World @package Hello World
@subpackage metadata.php @subpackage metadata.php

View File

@ -3,8 +3,8 @@
VDM VDM
/-------------------------------------------------------------------------------------------------------/ /-------------------------------------------------------------------------------------------------------/
@version 1.0.0 @version 1.0.1
@build 30th May, 2020 @build 4th January, 2021
@created 20th September, 2017 @created 20th September, 2017
@package Hello World @package Hello World
@subpackage publishing.php @subpackage publishing.php
@ -35,6 +35,7 @@ $fields_tab_layout = 'fields_' . $layout_path_array[1];
// get the fields // get the fields
$fields = $displayData->get($fields_tab_layout) ?: array( $fields = $displayData->get($fields_tab_layout) ?: array(
'title',
'created', 'created',
'created_by', 'created_by',
'modified', 'modified',

View File

@ -2,8 +2,8 @@
VDM VDM
/-------------------------------------------------------------------------------------------------------/ /-------------------------------------------------------------------------------------------------------/
@version 1.0.0 @version 1.0.1
@build 30th May, 2020 @build 4th January, 2021
@created 20th September, 2017 @created 20th September, 2017
@package Hello World @package Hello World
@subpackage greeting.js @subpackage greeting.js

View File

@ -102,6 +102,14 @@
rows="3" rows="3"
cols="30" cols="30"
/> />
<!-- Was added due to Permissions JS needing a Title field -->
<!-- Let us know at gh-629 should this change -->
<!-- https://github.com/vdm-io/Joomla-Component-Builder/issues/629#issuecomment-750117235 -->
<field
name="title"
type="hidden"
default="hello_world greeting"
/>
<!-- Dynamic Fields. --> <!-- Dynamic Fields. -->
<!-- Greeting Field. Type: Text. (joomla) --> <!-- Greeting Field. Type: Text. (joomla) -->
<field <field

View File

@ -3,8 +3,8 @@
VDM VDM
/-------------------------------------------------------------------------------------------------------/ /-------------------------------------------------------------------------------------------------------/
@version 1.0.0 @version 1.0.1
@build 30th May, 2020 @build 4th January, 2021
@created 20th September, 2017 @created 20th September, 2017
@package Hello World @package Hello World
@subpackage greet.php @subpackage greet.php
@ -149,7 +149,7 @@ class Hello_worldModelGreet extends JModelItem
if ($e->getCode() == 404) if ($e->getCode() == 404)
{ {
// Need to go thru the error handler to allow Redirect to work. // Need to go thru the error handler to allow Redirect to work.
JError::raiseWaring(404, $e->getMessage()); JError::raiseWarning(404, $e->getMessage());
} }
else else
{ {

View File

@ -3,8 +3,8 @@
VDM VDM
/-------------------------------------------------------------------------------------------------------/ /-------------------------------------------------------------------------------------------------------/
@version 1.0.0 @version 1.0.1
@build 30th May, 2020 @build 4th January, 2021
@created 20th September, 2017 @created 20th September, 2017
@package Hello World @package Hello World
@subpackage greeting.php @subpackage greeting.php
@ -204,23 +204,6 @@ class Hello_worldModelGreeting extends JModelAdmin
// Disable fields while saving. // Disable fields while saving.
$form->setFieldAttribute('created', 'filter', 'unset'); $form->setFieldAttribute('created', 'filter', 'unset');
} }
// Modify the form based on Edit Greeting access controls.
if ($id != 0 && (!$user->authorise('greeting.edit.greeting', 'com_hello_world.greeting.' . (int) $id))
|| ($id == 0 && !$user->authorise('greeting.edit.greeting', 'com_hello_world')))
{
// Disable fields for display.
$form->setFieldAttribute('greeting', 'disabled', 'true');
// Disable fields for display.
$form->setFieldAttribute('greeting', 'readonly', 'true');
// If there is no value continue.
if (!$form->getValue('greeting'))
{
// Disable fields while saving.
$form->setFieldAttribute('greeting', 'filter', 'unset');
// Disable fields while saving.
$form->setFieldAttribute('greeting', 'required', 'false');
}
}
// Only load these values if no id is found // Only load these values if no id is found
if (0 == $id) if (0 == $id)
{ {

View File

@ -3,8 +3,8 @@
VDM VDM
/-------------------------------------------------------------------------------------------------------/ /-------------------------------------------------------------------------------------------------------/
@version 1.0.0 @version 1.0.1
@build 30th May, 2020 @build 4th January, 2021
@created 20th September, 2017 @created 20th September, 2017
@package Hello World @package Hello World
@subpackage greetings.php @subpackage greetings.php

View File

@ -3,8 +3,8 @@
VDM VDM
/-------------------------------------------------------------------------------------------------------/ /-------------------------------------------------------------------------------------------------------/
@version 1.0.0 @version 1.0.1
@build 30th May, 2020 @build 4th January, 2021
@created 20th September, 2017 @created 20th September, 2017
@package Hello World @package Hello World
@subpackage router.php @subpackage router.php

View File

@ -3,8 +3,8 @@
VDM VDM
/-------------------------------------------------------------------------------------------------------/ /-------------------------------------------------------------------------------------------------------/
@version 1.0.0 @version 1.0.1
@build 30th May, 2020 @build 4th January, 2021
@created 20th September, 2017 @created 20th September, 2017
@package Hello World @package Hello World
@subpackage default.php @subpackage default.php
@ -21,9 +21,7 @@
// No direct access to this file // No direct access to this file
defined('_JEXEC') or die('Restricted access'); defined('_JEXEC') or die('Restricted access');
?> ?>
<?php echo $this->toolbar->render(); ?> <?php echo $this->toolbar->render(); ?>
<h2><?php echo $this->item->greeting; ?></h2>
<!--[JCBGUI.site_view.default.51.$$$$]-->
<h2><?php echo $this->item->greeting; ?></h2><!--[/JCBGUI$$$$]-->

View File

@ -3,8 +3,8 @@
VDM VDM
/-------------------------------------------------------------------------------------------------------/ /-------------------------------------------------------------------------------------------------------/
@version 1.0.0 @version 1.0.1
@build 30th May, 2020 @build 4th January, 2021
@created 20th September, 2017 @created 20th September, 2017
@package Hello World @package Hello World
@subpackage view.html.php @subpackage view.html.php
@ -136,8 +136,6 @@ class Hello_worldViewGreet extends JViewLegacy
*/ */
protected function addToolBar() protected function addToolBar()
{ {
// adding the joomla toolbar to the front
JLoader::register('JToolbarHelper', JPATH_ADMINISTRATOR.'/includes/toolbar.php');
// set help url for this view if found // set help url for this view if found
$help_url = Hello_worldHelper::getHelpUrl('greet'); $help_url = Hello_worldHelper::getHelpUrl('greet');

View File

@ -2,8 +2,8 @@
VDM VDM
/-------------------------------------------------------------------------------------------------------/ /-------------------------------------------------------------------------------------------------------/
@version 1.0.0 @version 1.0.1
@build 30th May, 2020 @build 4th January, 2021
@created 20th September, 2017 @created 20th September, 2017
@package Hello World @package Hello World
@subpackage submitbutton.js @subpackage submitbutton.js

View File

@ -3,8 +3,8 @@
VDM VDM
/-------------------------------------------------------------------------------------------------------/ /-------------------------------------------------------------------------------------------------------/
@version 1.0.0 @version 1.0.1
@build 30th May, 2020 @build 4th January, 2021
@created 20th September, 2017 @created 20th September, 2017
@package Hello World @package Hello World
@subpackage edit.php @subpackage edit.php
@ -28,8 +28,8 @@ JHtml::_('formbehavior.chosen', 'select');
JHtml::_('behavior.keepalive'); JHtml::_('behavior.keepalive');
JHtml::_('behavior.tabstate'); JHtml::_('behavior.tabstate');
JHtml::_('behavior.calendar'); JHtml::_('behavior.calendar');
$componentParams = $this->params; // will be removed just use $this->params instead
?> ?>
<div class="hello_world-greeting">
<?php echo $this->toolbar->render(); ?> <?php echo $this->toolbar->render(); ?>
<form action="<?php echo JRoute::_('index.php?option=com_hello_world&layout=edit&id='. (int) $this->item->id . $this->referral); ?>" method="post" name="adminForm" id="adminForm" class="form-validate" enctype="multipart/form-data"> <form action="<?php echo JRoute::_('index.php?option=com_hello_world&layout=edit&id='. (int) $this->item->id . $this->referral); ?>" method="post" name="adminForm" id="adminForm" class="form-validate" enctype="multipart/form-data">
@ -49,7 +49,7 @@ $componentParams = $this->params; // will be removed just use $this->params inst
<?php $this->tab_name = 'greetingTab'; ?> <?php $this->tab_name = 'greetingTab'; ?>
<?php echo JLayoutHelper::render('joomla.edit.params', $this); ?> <?php echo JLayoutHelper::render('joomla.edit.params', $this); ?>
<?php if ($this->canDo->get('core.delete') || $this->canDo->get('core.edit.created_by') || $this->canDo->get('core.edit.state') || $this->canDo->get('core.edit.created')) : ?> <?php if ($this->canDo->get('core.edit.created_by') || $this->canDo->get('core.edit.created') || $this->canDo->get('core.edit.state') || ($this->canDo->get('core.delete') && $this->canDo->get('core.edit.state'))) : ?>
<?php echo JHtml::_('bootstrap.addTab', 'greetingTab', 'publishing', JText::_('COM_HELLO_WORLD_GREETING_PUBLISHING', true)); ?> <?php echo JHtml::_('bootstrap.addTab', 'greetingTab', 'publishing', JText::_('COM_HELLO_WORLD_GREETING_PUBLISHING', true)); ?>
<div class="row-fluid form-horizontal-desktop"> <div class="row-fluid form-horizontal-desktop">
<div class="span6"> <div class="span6">
@ -89,3 +89,4 @@ $componentParams = $this->params; // will be removed just use $this->params inst
</div> </div>
</div> </div>
</form> </form>
</div>

View File

@ -3,8 +3,8 @@
VDM VDM
/-------------------------------------------------------------------------------------------------------/ /-------------------------------------------------------------------------------------------------------/
@version 1.0.0 @version 1.0.1
@build 30th May, 2020 @build 4th January, 2021
@created 20th September, 2017 @created 20th September, 2017
@package Hello World @package Hello World
@subpackage view.html.php @subpackage view.html.php
@ -86,10 +86,7 @@ class Hello_worldViewGreeting extends JViewLegacy
* Setting the toolbar * Setting the toolbar
*/ */
protected function addToolBar() protected function addToolBar()
{ {JFactory::getApplication()->input->set('hidemainmenu', true);
// adding the joomla edit toolbar to the front
JLoader::register('JToolbarHelper', JPATH_ADMINISTRATOR.'/includes/toolbar.php');
JFactory::getApplication()->input->set('hidemainmenu', true);
$user = JFactory::getUser(); $user = JFactory::getUser();
$userId = $user->id; $userId = $user->id;
$isNew = $this->item->id == 0; $isNew = $this->item->id == 0;

View File

@ -3,8 +3,8 @@
VDM VDM
/-------------------------------------------------------------------------------------------------------/ /-------------------------------------------------------------------------------------------------------/
@version 1.0.0 @version 1.0.1
@build 30th May, 2020 @build 4th January, 2021
@created 20th September, 2017 @created 20th September, 2017
@package Hello World @package Hello World
@subpackage default.php @subpackage default.php
@ -22,17 +22,12 @@
defined('_JEXEC') or die('Restricted access'); defined('_JEXEC') or die('Restricted access');
/***[JCBGUI.site_view.php_view.50.$$$$]***/
$edit = "index.php?option=com_hello_world&view=greetings&task=greeting.edit";/***[/JCBGUI$$$$]***/
$edit = "index.php?option=com_hello_world&view=greetings&task=greeting.edit";
?> ?>
<?php echo $this->toolbar->render(); ?> <?php echo $this->toolbar->render(); ?>
<!--[JCBGUI.site_view.default.50.$$$$]-->
<ul class="uk-list uk-list-striped"> <ul class="uk-list uk-list-striped">
<?php foreach ($this->items as $item): ?> <?php foreach ($this->items as $item): ?>
<li><?php echo JText::_('COM_HELLO_WORLD_GREETING'); ?>: <a href="<?php echo JRoute::_(Hello_worldHelperRoute::getGreetRoute($item->slug)); ?>"><?php echo $item->greeting; ?></a> <a href="<?php echo $edit; ?>&id=<?php echo $item->id; ?>"><?php echo JText::_('COM_HELLO_WORLD_EDIT'); ?></a></li> <li><?php echo JText::_('COM_HELLO_WORLD_GREETING'); ?>: <a href="<?php echo JRoute::_(Hello_worldHelperRoute::getGreetRoute($item->slug)); ?>"><?php echo $item->greeting; ?></a> <a href="<?php echo $edit; ?>&id=<?php echo $item->id; ?>"><?php echo JText::_('COM_HELLO_WORLD_EDIT'); ?></a></li>
<?php endforeach; ?> <?php endforeach; ?>
</ul><!--[/JCBGUI$$$$]--> </ul>

View File

@ -3,8 +3,8 @@
VDM VDM
/-------------------------------------------------------------------------------------------------------/ /-------------------------------------------------------------------------------------------------------/
@version 1.0.0 @version 1.0.1
@build 30th May, 2020 @build 4th January, 2021
@created 20th September, 2017 @created 20th September, 2017
@package Hello World @package Hello World
@subpackage view.html.php @subpackage view.html.php
@ -107,8 +107,6 @@ class Hello_worldViewGreetings extends JViewLegacy
*/ */
protected function addToolBar() protected function addToolBar()
{ {
// adding the joomla toolbar to the front
JLoader::register('JToolbarHelper', JPATH_ADMINISTRATOR.'/includes/toolbar.php');
// set help url for this view if found // set help url for this view if found
$help_url = Hello_worldHelper::getHelpUrl('greetings'); $help_url = Hello_worldHelper::getHelpUrl('greetings');