<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://docs.sandbox.joomla.org/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Stan31337</id>
	<title>Joomla! Documentation - User contributions [en]</title>
	<link rel="self" type="application/atom+xml" href="https://docs.sandbox.joomla.org/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Stan31337"/>
	<link rel="alternate" type="text/html" href="https://docs.sandbox.joomla.org/Special:Contributions/Stan31337"/>
	<updated>2026-10-10T16:00:18Z</updated>
	<subtitle>User contributions</subtitle>
	<generator>MediaWiki 1.43.0</generator>
	<entry>
		<id>https://docs.sandbox.joomla.org/index.php?title=J3.x:Developing_an_MVC_Component/Adding_a_front-end_form&amp;diff=589125</id>
		<title>J3.x:Developing an MVC Component/Adding a front-end form</title>
		<link rel="alternate" type="text/html" href="https://docs.sandbox.joomla.org/index.php?title=J3.x:Developing_an_MVC_Component/Adding_a_front-end_form&amp;diff=589125"/>
		<updated>2019-01-30T08:57:13Z</updated>

		<summary type="html">&lt;p&gt;Stan31337: We&amp;#039;ve added two columns, therefore we should change footer colspan. Besides that new filters take some space, so it&amp;#039;s better to change span6 to span12&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;noinclude&amp;gt;&amp;lt;languages /&amp;gt;&amp;lt;/noinclude&amp;gt;&lt;br /&gt;
{{:J3.1:Developing an MVC Component/&amp;lt;translate&amp;gt;&amp;lt;!--T:1--&amp;gt;&lt;br /&gt;
en&amp;lt;/translate&amp;gt;}}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;translate&amp;gt;&amp;lt;!--T:3--&amp;gt; This tutorial is part of the [[S:MyLanguage/J3.x:Developing_an_MVC_Component/Introduction|Developing a MVC Component for Joomla! 3.x]] tutorial. You are encouraged to read the previous parts of the tutorial before reading this.&amp;lt;/translate&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;translate&amp;gt;&lt;br /&gt;
== Introduction == &amp;lt;!--T:6--&amp;gt;&lt;br /&gt;
&amp;lt;/translate&amp;gt;&lt;br /&gt;
&amp;lt;translate&amp;gt;&amp;lt;!--T:7--&amp;gt; In this step we add a form to the site front end to allow users to add a new Helloworld record. You could adapt the code in this step to provide a range of front-end data entry functionality, from, eg&amp;lt;/translate&amp;gt;&lt;br /&gt;
* &amp;lt;translate&amp;gt;&amp;lt;!--T:8--&amp;gt; a registration form to allow visitors to the site to express interest, to,&amp;lt;/translate&amp;gt; &lt;br /&gt;
* &amp;lt;translate&amp;gt;&amp;lt;!--T:9--&amp;gt; a facility to allow suppliers to maintain the data in certain tables, but without giving them access to the back end administration functionality&amp;lt;/translate&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;translate&amp;gt;&amp;lt;!--T:63--&amp;gt; There are two videos associated with this step, covering the [https://youtu.be/2NStYpB5JQM overall approach] and [https://youtu.be/t3IxuWQfa6E other topics] raised here.&amp;lt;/translate&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*&amp;lt;translate&amp;gt;&amp;lt;!--T:60--&amp;gt; Overall approach&amp;lt;/translate&amp;gt;&lt;br /&gt;
{{#widget:YouTube|id=2NStYpB5JQM}}&lt;br /&gt;
*&amp;lt;translate&amp;gt;&amp;lt;!--T:61--&amp;gt; Other topics&amp;lt;/translate&amp;gt;&lt;br /&gt;
{{#widget:YouTube|id=t3IxuWQfa6E}}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;translate&amp;gt;&lt;br /&gt;
== Functionality == &amp;lt;!--T:10--&amp;gt;&lt;br /&gt;
&amp;lt;/translate&amp;gt;&lt;br /&gt;
&amp;lt;translate&amp;gt;&amp;lt;!--T:11--&amp;gt; In this step we will build the following functionality:&amp;lt;/translate&amp;gt;&lt;br /&gt;
* &amp;lt;translate&amp;gt;&amp;lt;!--T:12--&amp;gt; a front-end form that allows someone to enter a new helloworld record, together with Save and Cancel buttons.&amp;lt;/translate&amp;gt;&lt;br /&gt;
* &amp;lt;translate&amp;gt;&amp;lt;!--T:13--&amp;gt; additional fields in the helloworld database table to capture the user who entered the record, and the creation date/time&amp;lt;/translate&amp;gt;&lt;br /&gt;
* &amp;lt;translate&amp;gt;&amp;lt;!--T:14--&amp;gt; validation of the data entered into the fields, including removing dangerous items such as html tags&amp;lt;/translate&amp;gt;&lt;br /&gt;
* &amp;lt;translate&amp;gt;&amp;lt;!--T:15--&amp;gt; access control on the form, controlling who can add a new record&amp;lt;/translate&amp;gt;&lt;br /&gt;
* &amp;lt;translate&amp;gt;&amp;lt;!--T:16--&amp;gt; an email to an administrator, to indicate that someone has entered a new record (and we&#039;ll include a field on the form where the user can include some text which just goes into the email)&amp;lt;/translate&amp;gt;&lt;br /&gt;
* &amp;lt;translate&amp;gt;&amp;lt;!--T:17--&amp;gt; a captcha on the form&amp;lt;/translate&amp;gt;&lt;br /&gt;
* &amp;lt;translate&amp;gt;&amp;lt;!--T:18--&amp;gt; a front-end menu item which points to the form (ie how users get access to the form)&amp;lt;/translate&amp;gt;&lt;br /&gt;
* &amp;lt;translate&amp;gt;&amp;lt;!--T:19--&amp;gt; update to the admin helloworlds view to include the author and creation date in the display.&amp;lt;/translate&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;translate&amp;gt;&lt;br /&gt;
== Approach == &amp;lt;!--T:20--&amp;gt;&lt;br /&gt;
&amp;lt;/translate&amp;gt;&lt;br /&gt;
&amp;lt;translate&amp;gt;&amp;lt;!--T:21--&amp;gt; Providing a form on the site front end is pretty much the same as on the admin back end, so much of what is developed in this step reflects what was done in the step [[S:MyLanguage/J3.x:Developing an MVC Component/Adding backend actions|Adding backend actions]], and in particular the Edit form for helloworld messages.&amp;lt;/translate&amp;gt; &lt;br /&gt;
&amp;lt;translate&amp;gt;&lt;br /&gt;
&amp;lt;!--T:22--&amp;gt;&lt;br /&gt;
For this form we&#039;ll use (all in the site part)&lt;br /&gt;
* the same main helloworld controller (controller.php)&lt;br /&gt;
* a new view – which we&#039;ll call &amp;quot;form&amp;quot;&lt;br /&gt;
* a new layout, associated with the form view, which we&#039;ll call &amp;quot;edit&amp;quot; (like the admin layout file)&lt;br /&gt;
* a new model – which we&#039;ll call &amp;quot;form&amp;quot; also, to align with the view&lt;br /&gt;
* an xml file for the form, which we&#039;ll put in add-form.xml in the model&amp;lt;/translate&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;translate&amp;gt;&amp;lt;!--T:23--&amp;gt; In addition we&#039;ll need to handle the HTTP POST requests arising from the user pressing the Save and Cancel buttons, and we&#039;ll do this in:&amp;lt;/translate&amp;gt;&lt;br /&gt;
&amp;lt;translate&amp;gt;&amp;lt;!--T:24--&amp;gt;&lt;br /&gt;
* a new helloworld controller in the controllers directory (handling Save and Cancel)&lt;br /&gt;
* the same form.php model as above (handling Save)&amp;lt;/translate&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;translate&amp;gt;&amp;lt;!--T:25--&amp;gt; Upon completion of Save/Cancel we&#039;ll redirect back to the same form.&amp;lt;/translate&amp;gt;&lt;br /&gt;
&amp;lt;translate&amp;gt;&lt;br /&gt;
&amp;lt;!--T:26--&amp;gt;&lt;br /&gt;
As for the admin case, we&#039;ll consider our classes extending some of the controller and model classes which are richer in functionality that the simple legacy ones&amp;lt;/translate&amp;gt;&lt;br /&gt;
&amp;lt;translate&amp;gt;&amp;lt;!--T:27--&amp;gt;&lt;br /&gt;
* the model will extend JModelAdmin (which supports forms, as well as saving records to the database) - even though it&#039;s called JModelAdmin it&#039;s still available within the site part&lt;br /&gt;
* the controller handling the POST will extend JControllerForm (which includes the cancel() and save() methods).&amp;lt;/translate&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;translate&amp;gt;&amp;lt;!--T:28--&amp;gt; Some of the other aspects in this step will involve using the techniques covered in earlier steps, namely [[S:MyLanguage/J3.x:Developing an MVC Component/Adding a menu type to the site part|Adding a menu type to the site part]], [[S:MyLanguage/J3.x:Developing an MVC Component/Adding verifications|Adding verifications]], [[S:MyLanguage/J3.x:Developing an MVC Component/Adding configuration|Adding configuration]] and [[S:MyLanguage/J3.x:Developing an MVC Component/Adding ACL|Adding ACL]].&amp;lt;/translate&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;translate&amp;gt;&lt;br /&gt;
==Updating the Database== &amp;lt;!--T:29--&amp;gt;&lt;br /&gt;
&amp;lt;/translate&amp;gt;&lt;br /&gt;
&amp;lt;translate&amp;gt;&amp;lt;!--T:30--&amp;gt; We need to add the two new fields to our install and update scripts. To record who added the new helloworld greeting we&#039;ll store the user&#039;s userid, and this will be zero if the user is not logged on.&amp;lt;/translate&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;span id=&amp;quot;admin/sql/install.mysql.utf8.sql&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;tt&amp;gt;admin/sql/install.mysql.utf8.sql&amp;lt;/tt&amp;gt;&lt;br /&gt;
&amp;lt;source lang=&amp;quot;sql&amp;quot; highlight=&amp;quot;6,7&amp;quot;&amp;gt;&lt;br /&gt;
DROP TABLE IF EXISTS `#__helloworld`;&lt;br /&gt;
&lt;br /&gt;
CREATE TABLE `#__helloworld` (&lt;br /&gt;
	`id`       INT(11)     NOT NULL AUTO_INCREMENT,&lt;br /&gt;
	`asset_id` INT(10)     NOT NULL DEFAULT &#039;0&#039;,&lt;br /&gt;
	`created`  DATETIME    NOT NULL DEFAULT &#039;0000-00-00 00:00:00&#039;,&lt;br /&gt;
	`created_by`  INT(10) UNSIGNED NOT NULL DEFAULT &#039;0&#039;,&lt;br /&gt;
	`greeting` VARCHAR(25) NOT NULL,&lt;br /&gt;
	`published` tinyint(4) NOT NULL DEFAULT &#039;1&#039;,&lt;br /&gt;
	`catid`	    int(11)    NOT NULL DEFAULT &#039;0&#039;,&lt;br /&gt;
	`params`   VARCHAR(1024) NOT NULL DEFAULT &#039;&#039;,&lt;br /&gt;
	PRIMARY KEY (`id`)&lt;br /&gt;
)&lt;br /&gt;
	ENGINE =MyISAM&lt;br /&gt;
	AUTO_INCREMENT =0&lt;br /&gt;
	DEFAULT CHARSET =utf8;&lt;br /&gt;
&lt;br /&gt;
INSERT INTO `#__helloworld` (`greeting`) VALUES&lt;br /&gt;
(&#039;Hello World!&#039;),&lt;br /&gt;
(&#039;Goodbye World!&#039;);&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span id=&amp;quot;admin/sql/updates/mysql/0.0.16.sql&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;tt&amp;gt;/admin/sql/updates/mysql/0.0.16.sql&amp;lt;/tt&amp;gt;&lt;br /&gt;
&amp;lt;source lang=&amp;quot;sql&amp;quot;&amp;gt;&lt;br /&gt;
ALTER TABLE`#__helloworld` ADD COLUMN `created` DATETIME NOT NULL DEFAULT &#039;0000-00-00 00:00:00&#039; AFTER `asset_id`;&lt;br /&gt;
ALTER TABLE`#__helloworld` ADD COLUMN `created_by` INT(10) UNSIGNED NOT NULL DEFAULT &#039;0&#039; AFTER `created`;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;translate&amp;gt;&lt;br /&gt;
==Adding a menu item== &amp;lt;!--T:31--&amp;gt;&lt;br /&gt;
&amp;lt;/translate&amp;gt;&lt;br /&gt;
&amp;lt;translate&amp;gt;&amp;lt;!--T:32--&amp;gt; To enable a menu item to point to the form, we need to put an xml file into the associated layout directory. Extend your directory structure (remembering to include the index.html file in each new subdirectory which you create) and put the following into&amp;lt;/translate&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span id=&amp;quot;site/views/form/tmpl/edit.xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;tt&amp;gt;site/views/form/tmpl/edit.xml&amp;lt;/tt&amp;gt;&lt;br /&gt;
&amp;lt;source lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;?xml version=&amp;quot;1.0&amp;quot; encoding=&amp;quot;utf-8&amp;quot;?&amp;gt;&lt;br /&gt;
&amp;lt;metadata&amp;gt;&lt;br /&gt;
	&amp;lt;layout title=&amp;quot;COM_HELLOWORLD_ADD_VIEW_TITLE&amp;quot;&amp;gt;&lt;br /&gt;
		&amp;lt;message&amp;gt;COM_HELLOWORLD_ADD_VIEW_DESC&amp;lt;/message&amp;gt;&lt;br /&gt;
	&amp;lt;/layout&amp;gt;&lt;br /&gt;
&amp;lt;/metadata&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&amp;lt;/span&amp;gt;&lt;br /&gt;
&amp;lt;translate&amp;gt;&amp;lt;!--T:33--&amp;gt; Once you have the new code installed you&#039;ll have to go into the admin back-end and create a menu item to point to the new front-end form.&amp;lt;/translate&amp;gt;&lt;br /&gt;
&amp;lt;translate&amp;gt;&lt;br /&gt;
==Displaying the new form view== &amp;lt;!--T:34--&amp;gt;&lt;br /&gt;
&amp;lt;/translate&amp;gt;&lt;br /&gt;
&amp;lt;translate&amp;gt;&amp;lt;!--T:35--&amp;gt; Create a new forms subdirectory under the site models directory, and add the definition of the form into&amp;lt;/translate&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span id=&amp;quot;site/models/forms/add-form.xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;tt&amp;gt;site/models/forms/add-form.xml&amp;lt;/tt&amp;gt;&lt;br /&gt;
&amp;lt;source lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;?xml version=&amp;quot;1.0&amp;quot; encoding=&amp;quot;utf-8&amp;quot;?&amp;gt;&lt;br /&gt;
&amp;lt;form&lt;br /&gt;
    addrulepath=&amp;quot;/administrator/components/com_helloworld/models/rules&amp;quot;&lt;br /&gt;
    &amp;gt;&lt;br /&gt;
    &amp;lt;fieldset&lt;br /&gt;
				name=&amp;quot;details&amp;quot;&lt;br /&gt;
				label=&amp;quot;COM_HELLOWORLD_HELLOWORLD_DETAILS&amp;quot;&lt;br /&gt;
	&amp;gt;&lt;br /&gt;
		&amp;lt;field&lt;br /&gt;
				name=&amp;quot;id&amp;quot;&lt;br /&gt;
				type=&amp;quot;hidden&amp;quot;&lt;br /&gt;
				/&amp;gt;&lt;br /&gt;
		&amp;lt;field&lt;br /&gt;
				name=&amp;quot;greeting&amp;quot;&lt;br /&gt;
				type=&amp;quot;text&amp;quot;&lt;br /&gt;
				label=&amp;quot;COM_HELLOWORLD_HELLOWORLD_GREETING_LABEL&amp;quot;&lt;br /&gt;
				description=&amp;quot;COM_HELLOWORLD_HELLOWORLD_GREETING_DESC&amp;quot;&lt;br /&gt;
				size=&amp;quot;40&amp;quot;&lt;br /&gt;
				class=&amp;quot;inputbox&amp;quot;&lt;br /&gt;
				validate=&amp;quot;greeting&amp;quot;&lt;br /&gt;
				required=&amp;quot;true&amp;quot;&lt;br /&gt;
                hint=&amp;quot;COM_HELLOWORLD_HELLOWORLD_GREETING_HINT&amp;quot;&lt;br /&gt;
				default=&amp;quot;&amp;quot;&lt;br /&gt;
				/&amp;gt;&lt;br /&gt;
        &amp;lt;field&lt;br /&gt;
				name=&amp;quot;catid&amp;quot;&lt;br /&gt;
				type=&amp;quot;category&amp;quot;&lt;br /&gt;
				extension=&amp;quot;com_helloworld&amp;quot;&lt;br /&gt;
				class=&amp;quot;inputbox&amp;quot;&lt;br /&gt;
				default=&amp;quot;&amp;quot;&lt;br /&gt;
				label=&amp;quot;COM_HELLOWORLD_HELLOWORLD_FIELD_CATID_LABEL&amp;quot;&lt;br /&gt;
				description=&amp;quot;COM_HELLOWORLD_HELLOWORLD_FIELD_CATID_DESC&amp;quot;&lt;br /&gt;
				required=&amp;quot;true&amp;quot;&lt;br /&gt;
                &amp;gt;&lt;br /&gt;
			&amp;lt;option value=&amp;quot;0&amp;quot;&amp;gt;JOPTION_SELECT_CATEGORY&amp;lt;/option&amp;gt;&lt;br /&gt;
		&amp;lt;/field&amp;gt;&lt;br /&gt;
        &amp;lt;field&lt;br /&gt;
                name=&amp;quot;message&amp;quot;&lt;br /&gt;
                type=&amp;quot;textarea&amp;quot;&lt;br /&gt;
                rows=&amp;quot;5&amp;quot;&lt;br /&gt;
                cols=&amp;quot;80&amp;quot;&lt;br /&gt;
				label=&amp;quot;COM_HELLOWORLD_HELLOWORLD_MESSAGE_LABEL&amp;quot;&lt;br /&gt;
				description=&amp;quot;COM_HELLOWORLD_HELLOWORLD_MESSAGE_DESC&amp;quot;&lt;br /&gt;
                hint=&amp;quot;COM_HELLOWORLD_HELLOWORLD_MESSAGE_HINT&amp;quot;&lt;br /&gt;
				required=&amp;quot;true&amp;quot;&lt;br /&gt;
                &amp;gt;&lt;br /&gt;
        &amp;lt;/field&amp;gt;&lt;br /&gt;
        &amp;lt;field&lt;br /&gt;
				name=&amp;quot;captcha&amp;quot;&lt;br /&gt;
				type=&amp;quot;captcha&amp;quot;&lt;br /&gt;
				label=&amp;quot;COM_HELLOWORLD_HELLOWORLD_FIELD_CAPTCHA_LABEL&amp;quot;&lt;br /&gt;
				description=&amp;quot;COM_HELLOWORLD_HELLOWORLD_FIELD_CAPTCHA_DESC&amp;quot;&lt;br /&gt;
                validate=&amp;quot;captcha&amp;quot;&lt;br /&gt;
                &amp;gt;&lt;br /&gt;
		&amp;lt;/field&amp;gt;&lt;br /&gt;
        &amp;lt;fields name=&amp;quot;params&amp;quot;&amp;gt;&lt;br /&gt;
            &amp;lt;field&lt;br /&gt;
                    name=&amp;quot;show_category&amp;quot;&lt;br /&gt;
                    type=&amp;quot;list&amp;quot;&lt;br /&gt;
                    label=&amp;quot;COM_HELLOWORLD_HELLOWORLD_FIELD_SHOW_CATEGORY_LABEL&amp;quot;&lt;br /&gt;
                    description=&amp;quot;COM_HELLOWORLD_HELLOWORLD_FIELD_SHOW_CATEGORY_DESC&amp;quot;&lt;br /&gt;
                    default=&amp;quot;&amp;quot;&lt;br /&gt;
                    useglobal=&amp;quot;true&amp;quot;&lt;br /&gt;
            &amp;gt;&lt;br /&gt;
                &amp;lt;option value=&amp;quot;0&amp;quot;&amp;gt;JHIDE&amp;lt;/option&amp;gt;&lt;br /&gt;
                &amp;lt;option value=&amp;quot;1&amp;quot;&amp;gt;JSHOW&amp;lt;/option&amp;gt;&lt;br /&gt;
            &amp;lt;/field&amp;gt;&lt;br /&gt;
        &amp;lt;/fields&amp;gt;&lt;br /&gt;
    &amp;lt;/fieldset&amp;gt;&lt;br /&gt;
&amp;lt;/form&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;translate&amp;gt;&amp;lt;!--T:36--&amp;gt; The above form includes a captcha. To get this working you need to install a captcha plugin from the selection available for Joomla. You can also use the Captcha - ReCaptcha plugin which comes with Joomla, but before using this you have to get recaptcha keys for your domain (eg localhost) from Google, and then configure the plugin with the keys which Google supplies (ie Extensions / Plugins, and then click on the plugin to edit its options - if you edit the plugin it tells you exactly what you have to do). Once the plugins are live, you can select in the Global Configuration the captcha which you want to be the system default, and also in the Helloworld Configuration select which captcha to use for this helloworld form.&amp;lt;/translate&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;translate&amp;gt;&amp;lt;!--T:37--&amp;gt; The existing controller (in controller.php) will not need to be changed, but we&#039;ll need to define a new view, layout and model for the new form.&amp;lt;/translate&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;span id=&amp;quot;site/views/form/view.html.php&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;tt&amp;gt;site/views/form/view.html.php&amp;lt;/tt&amp;gt;&lt;br /&gt;
&amp;lt;source lang=&amp;quot;php&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;?php&lt;br /&gt;
/**&lt;br /&gt;
 * @package     Joomla.Administrator&lt;br /&gt;
 * @subpackage  com_helloworld&lt;br /&gt;
 *&lt;br /&gt;
 * @copyright   Copyright (C) 2005 - 2018 Open Source Matters, Inc. All rights reserved.&lt;br /&gt;
 * @license     GNU General Public License version 2 or later; see LICENSE.txt&lt;br /&gt;
 */&lt;br /&gt;
&lt;br /&gt;
// No direct access to this file&lt;br /&gt;
defined(&#039;_JEXEC&#039;) or die(&#039;Restricted access&#039;);&lt;br /&gt;
&lt;br /&gt;
/**&lt;br /&gt;
 * HelloWorld View&lt;br /&gt;
 * This is the site view presenting the user with the ability to add a new Helloworld record&lt;br /&gt;
 * &lt;br /&gt;
 */&lt;br /&gt;
class HelloWorldViewForm extends JViewLegacy&lt;br /&gt;
{&lt;br /&gt;
&lt;br /&gt;
	protected $form = null;&lt;br /&gt;
	protected $canDo;&lt;br /&gt;
&lt;br /&gt;
	/**&lt;br /&gt;
	 * Display the Hello World view&lt;br /&gt;
	 *&lt;br /&gt;
	 * @param   string  $tpl  The name of the layout file to parse.&lt;br /&gt;
	 *&lt;br /&gt;
	 * @return  void&lt;br /&gt;
	 */&lt;br /&gt;
	public function display($tpl = null)&lt;br /&gt;
	{&lt;br /&gt;
		// Get the form to display&lt;br /&gt;
		$this-&amp;gt;form = $this-&amp;gt;get(&#039;Form&#039;);&lt;br /&gt;
		// Get the javascript script file for client-side validation&lt;br /&gt;
		$this-&amp;gt;script = $this-&amp;gt;get(&#039;Script&#039;); &lt;br /&gt;
&lt;br /&gt;
		// Check that the user has permissions to create a new helloworld record&lt;br /&gt;
		$this-&amp;gt;canDo = JHelperContent::getActions(&#039;com_helloworld&#039;);&lt;br /&gt;
		if (!($this-&amp;gt;canDo-&amp;gt;get(&#039;core.create&#039;))) &lt;br /&gt;
		{&lt;br /&gt;
			$app = JFactory::getApplication(); &lt;br /&gt;
			$app-&amp;gt;enqueueMessage(JText::_(&#039;JERROR_ALERTNOAUTHOR&#039;), &#039;error&#039;);&lt;br /&gt;
			$app-&amp;gt;setHeader(&#039;status&#039;, 403, true);&lt;br /&gt;
			return;&lt;br /&gt;
		}&lt;br /&gt;
        &lt;br /&gt;
		// Check for errors.&lt;br /&gt;
		if (count($errors = $this-&amp;gt;get(&#039;Errors&#039;)))&lt;br /&gt;
		{&lt;br /&gt;
			throw new Exception(implode(&amp;quot;\n&amp;quot;, $errors), 500);&lt;br /&gt;
		}&lt;br /&gt;
&lt;br /&gt;
		// Call the parent display to display the layout file&lt;br /&gt;
		parent::display($tpl);&lt;br /&gt;
&lt;br /&gt;
		// Set properties of the html document&lt;br /&gt;
		$this-&amp;gt;setDocument();&lt;br /&gt;
	}&lt;br /&gt;
&lt;br /&gt;
	/**&lt;br /&gt;
	 * Method to set up the html document properties&lt;br /&gt;
	 *&lt;br /&gt;
	 * @return void&lt;br /&gt;
	 */&lt;br /&gt;
	protected function setDocument() &lt;br /&gt;
	{&lt;br /&gt;
		$document = JFactory::getDocument();&lt;br /&gt;
		$document-&amp;gt;setTitle(JText::_(&#039;COM_HELLOWORLD_HELLOWORLD_CREATING&#039;));&lt;br /&gt;
		$document-&amp;gt;addScript(JURI::root() . $this-&amp;gt;script);&lt;br /&gt;
		$document-&amp;gt;addScript(JURI::root() . &amp;quot;/administrator/components/com_helloworld&amp;quot;&lt;br /&gt;
		                                  . &amp;quot;/views/helloworld/submitbutton.js&amp;quot;);&lt;br /&gt;
		JText::script(&#039;COM_HELLOWORLD_HELLOWORLD_ERROR_UNACCEPTABLE&#039;);&lt;br /&gt;
	}&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&amp;lt;/span&amp;gt;&lt;br /&gt;
&amp;lt;translate&amp;gt;&lt;br /&gt;
&amp;lt;!--T:38--&amp;gt;&lt;br /&gt;
And into the layout file:&amp;lt;/translate&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span id=&amp;quot;site/views/form/tmpl/edit.php&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;tt&amp;gt;site/views/form/tmpl/edit.php&amp;lt;/tt&amp;gt;&lt;br /&gt;
&amp;lt;source lang=&amp;quot;php&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;?php&lt;br /&gt;
/**&lt;br /&gt;
 * @package     Joomla.Administrator&lt;br /&gt;
 * @subpackage  com_helloworld&lt;br /&gt;
 *&lt;br /&gt;
 * @copyright   Copyright (C) 2005 - 2018 Open Source Matters, Inc. All rights reserved.&lt;br /&gt;
 * @license     GNU General Public License version 2 or later; see LICENSE.txt&lt;br /&gt;
 *&lt;br /&gt;
 * This layout file is for displaying the front end form for capturing a new helloworld message&lt;br /&gt;
 *&lt;br /&gt;
 */&lt;br /&gt;
&lt;br /&gt;
// No direct access&lt;br /&gt;
defined(&#039;_JEXEC&#039;) or die(&#039;Restricted access&#039;);&lt;br /&gt;
JHtml::_(&#039;behavior.formvalidator&#039;);&lt;br /&gt;
&lt;br /&gt;
?&amp;gt;&lt;br /&gt;
&amp;lt;form action=&amp;quot;&amp;lt;?php echo JRoute::_(&#039;index.php?option=com_helloworld&amp;amp;view=form&amp;amp;layout=edit&#039;); ?&amp;gt;&amp;quot;&lt;br /&gt;
    method=&amp;quot;post&amp;quot; name=&amp;quot;adminForm&amp;quot; id=&amp;quot;adminForm&amp;quot; class=&amp;quot;form-validate&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
	&amp;lt;div class=&amp;quot;form-horizontal&amp;quot;&amp;gt;&lt;br /&gt;
		&amp;lt;fieldset class=&amp;quot;adminform&amp;quot;&amp;gt;&lt;br /&gt;
			&amp;lt;legend&amp;gt;&amp;lt;?php echo JText::_(&#039;COM_HELLOWORLD_LEGEND_DETAILS&#039;) ?&amp;gt;&amp;lt;/legend&amp;gt;&lt;br /&gt;
			&amp;lt;div class=&amp;quot;row-fluid&amp;quot;&amp;gt;&lt;br /&gt;
				&amp;lt;div class=&amp;quot;span6&amp;quot;&amp;gt;&lt;br /&gt;
					&amp;lt;?php echo $this-&amp;gt;form-&amp;gt;renderFieldset(&#039;details&#039;);  ?&amp;gt;&lt;br /&gt;
				&amp;lt;/div&amp;gt;&lt;br /&gt;
			&amp;lt;/div&amp;gt;&lt;br /&gt;
		&amp;lt;/fieldset&amp;gt;&lt;br /&gt;
	&amp;lt;/div&amp;gt;&lt;br /&gt;
    &lt;br /&gt;
	&amp;lt;div class=&amp;quot;btn-toolbar&amp;quot;&amp;gt;&lt;br /&gt;
		&amp;lt;div class=&amp;quot;btn-group&amp;quot;&amp;gt;&lt;br /&gt;
			&amp;lt;button type=&amp;quot;button&amp;quot; class=&amp;quot;btn btn-primary&amp;quot; onclick=&amp;quot;Joomla.submitbutton(&#039;helloworld.save&#039;)&amp;quot;&amp;gt;&lt;br /&gt;
				&amp;lt;span class=&amp;quot;icon-ok&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;&amp;lt;?php echo JText::_(&#039;JSAVE&#039;) ?&amp;gt;&lt;br /&gt;
			&amp;lt;/button&amp;gt;&lt;br /&gt;
		&amp;lt;/div&amp;gt;&lt;br /&gt;
		&amp;lt;div class=&amp;quot;btn-group&amp;quot;&amp;gt;&lt;br /&gt;
			&amp;lt;button type=&amp;quot;button&amp;quot; class=&amp;quot;btn&amp;quot; onclick=&amp;quot;Joomla.submitbutton(&#039;helloworld.cancel&#039;)&amp;quot;&amp;gt;&lt;br /&gt;
				&amp;lt;span class=&amp;quot;icon-cancel&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;&amp;lt;?php echo JText::_(&#039;JCANCEL&#039;) ?&amp;gt;&lt;br /&gt;
			&amp;lt;/button&amp;gt;&lt;br /&gt;
		&amp;lt;/div&amp;gt;&lt;br /&gt;
	&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
	&amp;lt;input type=&amp;quot;hidden&amp;quot; name=&amp;quot;task&amp;quot; /&amp;gt;&lt;br /&gt;
	&amp;lt;?php echo JHtml::_(&#039;form.token&#039;); ?&amp;gt;&lt;br /&gt;
&amp;lt;/form&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;translate&amp;gt;&amp;lt;!--T:39--&amp;gt; All the above is similar to the admin functionality, except there are certain fields we don&#039;t want to allow the front-end user to see (eg the permissions) and instead of the standard Joomla admin buttons (and toolbar) we use a Save button and a Cancel button styled using the Bootstrap CSS, and which result in the &amp;lt;tt&amp;gt;task&amp;lt;/tt&amp;gt; parameter being set to &amp;lt;tt&amp;gt;helloworld.save&amp;lt;/tt&amp;gt; or &amp;lt;tt&amp;gt;helloworld.cancel&amp;lt;/tt&amp;gt;.&amp;lt;/translate&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;translate&amp;gt;&amp;lt;!--T:40--&amp;gt; Our new model is almost exactly the same as the admin equivalent; we just have to point to our new add-form instead.&amp;lt;/translate&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span id=&amp;quot;site/models/form.php&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;tt&amp;gt;site/models/form.php&amp;lt;/tt&amp;gt;&lt;br /&gt;
&amp;lt;source lang=&amp;quot;php&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;?php&lt;br /&gt;
/**&lt;br /&gt;
 * @package     Joomla.Administrator&lt;br /&gt;
 * @subpackage  com_helloworld&lt;br /&gt;
 *&lt;br /&gt;
 * @copyright   Copyright (C) 2005 - 2018 Open Source Matters, Inc. All rights reserved.&lt;br /&gt;
 * @license     GNU General Public License version 2 or later; see LICENSE.txt&lt;br /&gt;
 */&lt;br /&gt;
&lt;br /&gt;
// No direct access to this file&lt;br /&gt;
defined(&#039;_JEXEC&#039;) or die(&#039;Restricted access&#039;);&lt;br /&gt;
&lt;br /&gt;
/**&lt;br /&gt;
 * HelloWorld Model&lt;br /&gt;
 *&lt;br /&gt;
 * @since  0.0.1&lt;br /&gt;
 */&lt;br /&gt;
class HelloWorldModelForm extends JModelAdmin&lt;br /&gt;
{&lt;br /&gt;
&lt;br /&gt;
	/**&lt;br /&gt;
	 * Method to get a table object, load it if necessary.&lt;br /&gt;
	 *&lt;br /&gt;
	 * @param   string  $type    The table name. Optional.&lt;br /&gt;
	 * @param   string  $prefix  The class prefix. Optional.&lt;br /&gt;
	 * @param   array   $config  Configuration array for model. Optional.&lt;br /&gt;
	 *&lt;br /&gt;
	 * @return  JTable  A JTable object&lt;br /&gt;
	 *&lt;br /&gt;
	 * @since   1.6&lt;br /&gt;
	 */&lt;br /&gt;
	public function getTable($type = &#039;HelloWorld&#039;, $prefix = &#039;HelloWorldTable&#039;, $config = array())&lt;br /&gt;
	{&lt;br /&gt;
		return JTable::getInstance($type, $prefix, $config);&lt;br /&gt;
	}&lt;br /&gt;
&lt;br /&gt;
    /**&lt;br /&gt;
	 * Method to get the record form.&lt;br /&gt;
	 *&lt;br /&gt;
	 * @param   array    $data      Data for the form.&lt;br /&gt;
	 * @param   boolean  $loadData  True if the form is to load its own data (default case), false if not.&lt;br /&gt;
	 *&lt;br /&gt;
	 * @return  mixed    A JForm object on success, false on failure&lt;br /&gt;
	 *&lt;br /&gt;
	 * @since   1.6&lt;br /&gt;
	 */&lt;br /&gt;
	public function getForm($data = array(), $loadData = true)&lt;br /&gt;
	{&lt;br /&gt;
		// Get the form.&lt;br /&gt;
		$form = $this-&amp;gt;loadForm(&lt;br /&gt;
			&#039;com_helloworld.form&#039;,&lt;br /&gt;
			&#039;add-form&#039;,&lt;br /&gt;
			array(&lt;br /&gt;
				&#039;control&#039; =&amp;gt; &#039;jform&#039;,&lt;br /&gt;
				&#039;load_data&#039; =&amp;gt; $loadData&lt;br /&gt;
			)&lt;br /&gt;
		);&lt;br /&gt;
&lt;br /&gt;
		if (empty($form))&lt;br /&gt;
		{&lt;br /&gt;
			$errors = $this-&amp;gt;getErrors();&lt;br /&gt;
			throw new Exception(implode(&amp;quot;\n&amp;quot;, $errors), 500);&lt;br /&gt;
		}&lt;br /&gt;
&lt;br /&gt;
		return $form;&lt;br /&gt;
	}&lt;br /&gt;
&lt;br /&gt;
	/**&lt;br /&gt;
	 * Method to get the data that should be injected in the form.&lt;br /&gt;
	 * As this form is for add, we&#039;re not prefilling the form with an existing record&lt;br /&gt;
	 * But if the user has previously hit submit and the validation has found an error,&lt;br /&gt;
	 *   then we inject what was previously entered.&lt;br /&gt;
	 *&lt;br /&gt;
	 * @return  mixed  The data for the form.&lt;br /&gt;
	 *&lt;br /&gt;
	 * @since   1.6&lt;br /&gt;
	 */&lt;br /&gt;
	protected function loadFormData()&lt;br /&gt;
	{&lt;br /&gt;
		// Check the session for previously entered form data.&lt;br /&gt;
		$data = JFactory::getApplication()-&amp;gt;getUserState(&lt;br /&gt;
			&#039;com_helloworld.edit.helloworld.data&#039;,&lt;br /&gt;
			array()&lt;br /&gt;
		);&lt;br /&gt;
&lt;br /&gt;
		return $data;&lt;br /&gt;
	}&lt;br /&gt;
    &lt;br /&gt;
	/**&lt;br /&gt;
	 * Method to get the script that have to be included on the form&lt;br /&gt;
	 * This returns the script associated with helloworld field greeting validation&lt;br /&gt;
	 *&lt;br /&gt;
	 * @return string	Script files&lt;br /&gt;
	 */&lt;br /&gt;
	public function getScript() &lt;br /&gt;
	{&lt;br /&gt;
		return &#039;administrator/components/com_helloworld/models/forms/helloworld.js&#039;;&lt;br /&gt;
	}&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&amp;lt;/span&amp;gt;&lt;br /&gt;
&amp;lt;translate&amp;gt;&lt;br /&gt;
==Handling the form HTTP POST== &amp;lt;!--T:41--&amp;gt;&lt;br /&gt;
&amp;lt;/translate&amp;gt;&lt;br /&gt;
&amp;lt;translate&amp;gt;&amp;lt;!--T:42--&amp;gt; As in the admin case, we&#039;ll need to create a new controller in the /controllers subdirectory with save() and cancel() methods, and we&#039;ll need a model with a save() method. In fact, because the above model class (in site/models/form.php) extends JModelAdmin, we&#039;ll be able to reuse it without adding any more code. (For just displaying the form our model class could have extended JModelForm, but JModelAdmin extends JModelForm and provides additional functions such as the save() one which we need).&amp;lt;/translate&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;translate&amp;gt;&amp;lt;!--T:43--&amp;gt; Note that we don&#039;t need any new view file or layout file, because we&#039;re just going to redirect the user back to the same form.&amp;lt;/translate&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;translate&amp;gt;&amp;lt;!--T:44--&amp;gt; So the only new file we need is a new controller in a new controllers subdirectory:&amp;lt;/translate&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span id=&amp;quot;site/controllers/helloworld.php&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;tt&amp;gt;site/controllers/helloworld.php&amp;lt;/tt&amp;gt;&lt;br /&gt;
&amp;lt;source lang=&amp;quot;php&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;?php&lt;br /&gt;
/**&lt;br /&gt;
 * @package     Joomla.Site&lt;br /&gt;
 * @subpackage  com_helloworld&lt;br /&gt;
 *&lt;br /&gt;
 * @copyright   Copyright (C) 2005 - 2018 Open Source Matters, Inc. All rights reserved.&lt;br /&gt;
 * @license     GNU General Public License version 2 or later; see LICENSE.txt&lt;br /&gt;
 */&lt;br /&gt;
// No direct access to this file&lt;br /&gt;
defined(&#039;_JEXEC&#039;) or die(&#039;Restricted access&#039;);&lt;br /&gt;
&lt;br /&gt;
/**&lt;br /&gt;
 * HelloWorld Controller&lt;br /&gt;
 *&lt;br /&gt;
 * @package     Joomla.Site&lt;br /&gt;
 * @subpackage  com_helloworld&lt;br /&gt;
 *&lt;br /&gt;
 * Used to handle the http POST from the front-end form which allows &lt;br /&gt;
 * users to enter a new helloworld message&lt;br /&gt;
 *&lt;br /&gt;
 */&lt;br /&gt;
class HelloWorldControllerHelloWorld extends JControllerForm&lt;br /&gt;
{   &lt;br /&gt;
    public function cancel($key = null)&lt;br /&gt;
    {&lt;br /&gt;
        parent::cancel($key);&lt;br /&gt;
        &lt;br /&gt;
        // set up the redirect back to the same form&lt;br /&gt;
        $this-&amp;gt;setRedirect(&lt;br /&gt;
            (string)JUri::getInstance(), &lt;br /&gt;
            JText::_(&#039;COM_HELLOWORLD_ADD_CANCELLED&#039;)&lt;br /&gt;
		);&lt;br /&gt;
    }&lt;br /&gt;
    &lt;br /&gt;
    /*&lt;br /&gt;
     * Function handing the save for adding a new helloworld record&lt;br /&gt;
     * Based on the save() function in the JControllerForm class&lt;br /&gt;
     */&lt;br /&gt;
    public function save($key = null, $urlVar = null)&lt;br /&gt;
    {&lt;br /&gt;
		// Check for request forgeries.&lt;br /&gt;
		JSession::checkToken() or jexit(JText::_(&#039;JINVALID_TOKEN&#039;));&lt;br /&gt;
        &lt;br /&gt;
		$app = JFactory::getApplication(); &lt;br /&gt;
		$input = $app-&amp;gt;input; &lt;br /&gt;
		$model = $this-&amp;gt;getModel(&#039;form&#039;);&lt;br /&gt;
        &lt;br /&gt;
		// Get the current URI to set in redirects. As we&#039;re handling a POST, &lt;br /&gt;
		// this URI comes from the &amp;lt;form action=&amp;quot;...&amp;quot;&amp;gt; attribute in the layout file above&lt;br /&gt;
		$currentUri = (string)JUri::getInstance();&lt;br /&gt;
&lt;br /&gt;
		// Check that this user is allowed to add a new record&lt;br /&gt;
		if (!JFactory::getUser()-&amp;gt;authorise( &amp;quot;core.create&amp;quot;, &amp;quot;com_helloworld&amp;quot;))&lt;br /&gt;
		{&lt;br /&gt;
			$app-&amp;gt;enqueueMessage(JText::_(&#039;JERROR_ALERTNOAUTHOR&#039;), &#039;error&#039;);&lt;br /&gt;
			$app-&amp;gt;setHeader(&#039;status&#039;, 403, true);&lt;br /&gt;
&lt;br /&gt;
			return;&lt;br /&gt;
		}&lt;br /&gt;
        &lt;br /&gt;
		// get the data from the HTTP POST request&lt;br /&gt;
		$data  = $input-&amp;gt;get(&#039;jform&#039;, array(), &#039;array&#039;);&lt;br /&gt;
        &lt;br /&gt;
		// set up context for saving form data&lt;br /&gt;
		$context = &amp;quot;$this-&amp;gt;option.edit.$this-&amp;gt;context&amp;quot;;&lt;br /&gt;
        &lt;br /&gt;
		// Validate the posted data.&lt;br /&gt;
		// First we need to set up an instance of the form ...&lt;br /&gt;
		$form = $model-&amp;gt;getForm($data, false);&lt;br /&gt;
&lt;br /&gt;
		if (!$form)&lt;br /&gt;
		{&lt;br /&gt;
			$app-&amp;gt;enqueueMessage($model-&amp;gt;getError(), &#039;error&#039;);&lt;br /&gt;
			return false;&lt;br /&gt;
		}&lt;br /&gt;
&lt;br /&gt;
		// ... and then we validate the data against it&lt;br /&gt;
		// The validate function called below results in the running of the validate=&amp;quot;...&amp;quot; routines&lt;br /&gt;
		// specified against the fields in the form xml file, and also filters the data &lt;br /&gt;
		// according to the filter=&amp;quot;...&amp;quot; specified in the same place (removing html tags by default in strings)&lt;br /&gt;
		$validData = $model-&amp;gt;validate($form, $data);&lt;br /&gt;
&lt;br /&gt;
		// Handle the case where there are validation errors&lt;br /&gt;
		if ($validData === false)&lt;br /&gt;
		{&lt;br /&gt;
			// Get the validation messages.&lt;br /&gt;
			$errors = $model-&amp;gt;getErrors();&lt;br /&gt;
&lt;br /&gt;
			// Display up to three validation messages to the user.&lt;br /&gt;
			for ($i = 0, $n = count($errors); $i &amp;lt; $n &amp;amp;&amp;amp; $i &amp;lt; 3; $i++)&lt;br /&gt;
			{&lt;br /&gt;
				if ($errors[$i] instanceof Exception)&lt;br /&gt;
				{&lt;br /&gt;
					$app-&amp;gt;enqueueMessage($errors[$i]-&amp;gt;getMessage(), &#039;warning&#039;);&lt;br /&gt;
				}&lt;br /&gt;
				else&lt;br /&gt;
				{&lt;br /&gt;
					$app-&amp;gt;enqueueMessage($errors[$i], &#039;warning&#039;);&lt;br /&gt;
				}&lt;br /&gt;
			}&lt;br /&gt;
&lt;br /&gt;
			// Save the form data in the session.&lt;br /&gt;
			$app-&amp;gt;setUserState($context . &#039;.data&#039;, $data);&lt;br /&gt;
&lt;br /&gt;
			// Redirect back to the same screen.&lt;br /&gt;
			$this-&amp;gt;setRedirect($currentUri);&lt;br /&gt;
&lt;br /&gt;
			return false;&lt;br /&gt;
		}&lt;br /&gt;
        &lt;br /&gt;
		// add the &#039;created by&#039; and &#039;created&#039; date fields&lt;br /&gt;
		$validData[&#039;created_by&#039;] = JFactory::getUser()-&amp;gt;get(&#039;id&#039;, 0);&lt;br /&gt;
		$validData[&#039;created&#039;] = date(&#039;Y-m-d h:i:s&#039;);&lt;br /&gt;
        &lt;br /&gt;
		// Attempt to save the data.&lt;br /&gt;
		if (!$model-&amp;gt;save($validData))&lt;br /&gt;
		{&lt;br /&gt;
		// Handle the case where the save failed&lt;br /&gt;
            &lt;br /&gt;
			// Save the data in the session.&lt;br /&gt;
			$app-&amp;gt;setUserState($context . &#039;.data&#039;, $validData);&lt;br /&gt;
&lt;br /&gt;
			// Redirect back to the edit screen.&lt;br /&gt;
			$this-&amp;gt;setError(JText::sprintf(&#039;JLIB_APPLICATION_ERROR_SAVE_FAILED&#039;, $model-&amp;gt;getError()));&lt;br /&gt;
			$this-&amp;gt;setMessage($this-&amp;gt;getError(), &#039;error&#039;);&lt;br /&gt;
&lt;br /&gt;
			$this-&amp;gt;setRedirect($currentUri);&lt;br /&gt;
&lt;br /&gt;
			return false;&lt;br /&gt;
		}&lt;br /&gt;
        &lt;br /&gt;
		// clear the data in the form&lt;br /&gt;
		$app-&amp;gt;setUserState($context . &#039;.data&#039;, null);&lt;br /&gt;
        &lt;br /&gt;
		// notify the administrator that a new helloworld message has been added on the front end&lt;br /&gt;
        &lt;br /&gt;
		// get the id of the person to notify from global config&lt;br /&gt;
		$params   = $app-&amp;gt;getParams();&lt;br /&gt;
		$userid_to_email = (int) $params-&amp;gt;get(&#039;user_to_email&#039;);&lt;br /&gt;
		$user_to_email = JUser::getInstance($userid_to_email);&lt;br /&gt;
		$to_address = $user_to_email-&amp;gt;get(&amp;quot;email&amp;quot;);&lt;br /&gt;
        &lt;br /&gt;
		// get the current user (if any)&lt;br /&gt;
		$current_user = JFactory::getUser();&lt;br /&gt;
		if ($current_user-&amp;gt;get(&amp;quot;id&amp;quot;) &amp;gt; 0) &lt;br /&gt;
		{&lt;br /&gt;
			$current_username = $current_user-&amp;gt;get(&amp;quot;username&amp;quot;);&lt;br /&gt;
		}&lt;br /&gt;
		else &lt;br /&gt;
		{&lt;br /&gt;
			$current_username = &amp;quot;a visitor to the site&amp;quot;;&lt;br /&gt;
		}&lt;br /&gt;
        &lt;br /&gt;
		// get the Mailer object, set up the email to be sent, and send it&lt;br /&gt;
		$mailer = JFactory::getMailer();&lt;br /&gt;
		$mailer-&amp;gt;addRecipient($to_address);&lt;br /&gt;
		$mailer-&amp;gt;setSubject(&amp;quot;New helloworld message added by &amp;quot; . $current_username);&lt;br /&gt;
		$mailer-&amp;gt;setBody(&amp;quot;New greeting is &amp;quot; . $validData[&#039;greeting&#039;]);&lt;br /&gt;
		try &lt;br /&gt;
		{&lt;br /&gt;
			$mailer-&amp;gt;send(); &lt;br /&gt;
		}&lt;br /&gt;
		catch (Exception $e)&lt;br /&gt;
		{&lt;br /&gt;
			JLog::add(&#039;Caught exception: &#039; . $e-&amp;gt;getMessage(), JLog::Error, &#039;jerror&#039;);&lt;br /&gt;
		}&lt;br /&gt;
        &lt;br /&gt;
		$this-&amp;gt;setRedirect(&lt;br /&gt;
				$currentUri,&lt;br /&gt;
				JText::_(&#039;COM_HELLOWORLD_ADD_SUCCESSFUL&#039;)&lt;br /&gt;
				);&lt;br /&gt;
            &lt;br /&gt;
		return true;&lt;br /&gt;
        &lt;br /&gt;
    }&lt;br /&gt;
&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;translate&amp;gt;&amp;lt;!--T:45--&amp;gt; In the above file we&#039;ve been able to reuse the cancel() method from the parent JControllerForm class, with the exception that we want to redirect back to the same form. (The parent cancel() method redirects back to the view showing the list of records - as in the admin case).&amp;lt;/translate&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;translate&amp;gt;&amp;lt;!--T:46--&amp;gt; However, our save() method functionality is significantly different from that of the parent class, so it&#039;s easier just to write our own. Note that we&#039;re recording the user and created date/time for records added via the front-end only. If we wanted to record this information for all records, then we&#039;d need to override a save() function for the backend as well to include setting those fields.&amp;lt;/translate&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;translate&amp;gt;&amp;lt;!--T:47--&amp;gt; The mailing functionality relies on you having set up mail in your Joomla instance. If you&#039;re using localhost then one possibility is to configure this using a gmail account, and you can easily find the smtp settings for this on the Internet. Note that you&#039;ll need to allow &amp;quot;less secure apps&amp;quot; on the gmail account.&amp;lt;/translate&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;translate&amp;gt;&lt;br /&gt;
==Configuration Parameters== &amp;lt;!--T:48--&amp;gt;&lt;br /&gt;
&amp;lt;/translate&amp;gt;&lt;br /&gt;
&amp;lt;translate&amp;gt;&amp;lt;!--T:49--&amp;gt; We&#039;ve introduced two new configuration parameters - the captcha to display on the form, and the user to email with notification of a new helloworld message being added. So update the configuration settings as follows:&amp;lt;/translate&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span id=&amp;quot;admin/config.xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;tt&amp;gt;admin/config.xml&amp;lt;/tt&amp;gt;&lt;br /&gt;
&amp;lt;source lang=&amp;quot;xml&amp;quot; highlight=&amp;quot;18-37&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;?xml version=&amp;quot;1.0&amp;quot; encoding=&amp;quot;utf-8&amp;quot;?&amp;gt;&lt;br /&gt;
&amp;lt;config&amp;gt;&lt;br /&gt;
	&amp;lt;fieldset&lt;br /&gt;
		name=&amp;quot;greetings&amp;quot;&lt;br /&gt;
		label=&amp;quot;COM_HELLOWORLD_CONFIG_GREETING_SETTINGS_LABEL&amp;quot;&lt;br /&gt;
		description=&amp;quot;COM_HELLOWORLD_CONFIG_GREETING_SETTINGS_DESC&amp;quot;&lt;br /&gt;
	&amp;gt;&lt;br /&gt;
		&amp;lt;field&lt;br /&gt;
			name=&amp;quot;show_category&amp;quot;&lt;br /&gt;
			type=&amp;quot;radio&amp;quot;&lt;br /&gt;
			label=&amp;quot;COM_HELLOWORLD_HELLOWORLD_FIELD_SHOW_CATEGORY_LABEL&amp;quot;&lt;br /&gt;
			description=&amp;quot;COM_HELLOWORLD_HELLOWORLD_FIELD_SHOW_CATEGORY_DESC&amp;quot;&lt;br /&gt;
			default=&amp;quot;0&amp;quot;&lt;br /&gt;
		&amp;gt;&lt;br /&gt;
			&amp;lt;option value=&amp;quot;0&amp;quot;&amp;gt;JHIDE&amp;lt;/option&amp;gt;&lt;br /&gt;
			&amp;lt;option value=&amp;quot;1&amp;quot;&amp;gt;JSHOW&amp;lt;/option&amp;gt;&lt;br /&gt;
		&amp;lt;/field&amp;gt;&lt;br /&gt;
        &amp;lt;field&lt;br /&gt;
			name=&amp;quot;captcha&amp;quot;&lt;br /&gt;
			type=&amp;quot;plugins&amp;quot;&lt;br /&gt;
            folder=&amp;quot;captcha&amp;quot;&lt;br /&gt;
			label=&amp;quot;COM_HELLOWORLD_HELLOWORLD_FIELD_CAPTCHA_LABEL&amp;quot;&lt;br /&gt;
			description=&amp;quot;COM_HELLOWORLD_HELLOWORLD_FIELD_CAPTCHA_DESC&amp;quot;&lt;br /&gt;
			default=&amp;quot;0&amp;quot;&lt;br /&gt;
			filter=&amp;quot;cmd&amp;quot;&lt;br /&gt;
		&amp;gt;&lt;br /&gt;
            &amp;lt;option value=&amp;quot;&amp;quot;&amp;gt;JOPTION_USE_DEFAULT&amp;lt;/option&amp;gt;&lt;br /&gt;
			&amp;lt;option value=&amp;quot;0&amp;quot;&amp;gt;JOPTION_DO_NOT_USE&amp;lt;/option&amp;gt;&lt;br /&gt;
		&amp;lt;/field&amp;gt;&lt;br /&gt;
        &amp;lt;field&lt;br /&gt;
			name=&amp;quot;user_to_email&amp;quot;&lt;br /&gt;
			type=&amp;quot;user&amp;quot;&lt;br /&gt;
			label=&amp;quot;COM_HELLOWORLD_HELLOWORLD_FIELD_USER_TO_EMAIL_LABEL&amp;quot;&lt;br /&gt;
			description=&amp;quot;COM_HELLOWORLD_HELLOWORLD_FIELD_USER_TO_EMAIL_DESC&amp;quot;&lt;br /&gt;
			default=&amp;quot;0&amp;quot;&lt;br /&gt;
		&amp;gt;&lt;br /&gt;
		&amp;lt;/field&amp;gt;&lt;br /&gt;
	&amp;lt;/fieldset&amp;gt;&lt;br /&gt;
    &amp;lt;fieldset&lt;br /&gt;
		name=&amp;quot;permissions&amp;quot;&lt;br /&gt;
		label=&amp;quot;JCONFIG_PERMISSIONS_LABEL&amp;quot;&lt;br /&gt;
		description=&amp;quot;JCONFIG_PERMISSIONS_DESC&amp;quot;&lt;br /&gt;
	&amp;gt;&lt;br /&gt;
		&amp;lt;field&lt;br /&gt;
			name=&amp;quot;rules&amp;quot;&lt;br /&gt;
			type=&amp;quot;rules&amp;quot;&lt;br /&gt;
			label=&amp;quot;JCONFIG_PERMISSIONS_LABEL&amp;quot;&lt;br /&gt;
			class=&amp;quot;inputbox&amp;quot;&lt;br /&gt;
			validate=&amp;quot;rules&amp;quot;&lt;br /&gt;
			filter=&amp;quot;rules&amp;quot;&lt;br /&gt;
			component=&amp;quot;com_helloworld&amp;quot;&lt;br /&gt;
			section=&amp;quot;component&amp;quot;&lt;br /&gt;
		/&amp;gt;&lt;br /&gt;
	&amp;lt;/fieldset&amp;gt;&lt;br /&gt;
&amp;lt;/config&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;translate&amp;gt;&lt;br /&gt;
==Display the new fields on the Admin list form== &amp;lt;!--T:50--&amp;gt;&lt;br /&gt;
&amp;lt;/translate&amp;gt;&lt;br /&gt;
&amp;lt;translate&amp;gt;&amp;lt;!--T:51--&amp;gt; We want to update the admin helloworld list layout file to include the new Author and Created Date fields. This means that we also need to update our model to include these fields in the SQL query.&amp;lt;/translate&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;translate&amp;gt;&amp;lt;!--T:52--&amp;gt; In addition, we&#039;ve changed column ordering mechanism from what it was in [[S:MyLanguage/J3.x:Developing an MVC Component/Adding decorations to the backend|Adding decorations to the backend]] to the more modern way that this is handled.&amp;lt;/translate&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;span id=&amp;quot;admin/views/helloworlds/view.html.php&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;tt&amp;gt;admin/views/helloworlds/view.html.php&amp;lt;/tt&amp;gt;&lt;br /&gt;
&amp;lt;source lang=&amp;quot;php&amp;quot; highlight=&amp;quot;37-39&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;?php&lt;br /&gt;
/**&lt;br /&gt;
 * @package     Joomla.Administrator&lt;br /&gt;
 * @subpackage  com_helloworld&lt;br /&gt;
 *&lt;br /&gt;
 * @copyright   Copyright (C) 2005 - 2018 Open Source Matters, Inc. All rights reserved.&lt;br /&gt;
 * @license     GNU General Public License version 2 or later; see LICENSE.txt&lt;br /&gt;
 */&lt;br /&gt;
&lt;br /&gt;
// No direct access to this file&lt;br /&gt;
defined(&#039;_JEXEC&#039;) or die(&#039;Restricted access&#039;);&lt;br /&gt;
&lt;br /&gt;
/**&lt;br /&gt;
 * HelloWorlds View&lt;br /&gt;
 *&lt;br /&gt;
 * @since  0.0.1&lt;br /&gt;
 */&lt;br /&gt;
class HelloWorldViewHelloWorlds extends JViewLegacy&lt;br /&gt;
{&lt;br /&gt;
	/**&lt;br /&gt;
	 * Display the Hello World view&lt;br /&gt;
	 *&lt;br /&gt;
	 * @param   string  $tpl  The name of the template file to parse; automatically searches through the template paths.&lt;br /&gt;
	 *&lt;br /&gt;
	 * @return  void&lt;br /&gt;
	 */&lt;br /&gt;
	function display($tpl = null)&lt;br /&gt;
	{&lt;br /&gt;
		&lt;br /&gt;
		// Get application&lt;br /&gt;
		$app = JFactory::getApplication();&lt;br /&gt;
		$context = &amp;quot;helloworld.list.admin.helloworld&amp;quot;;&lt;br /&gt;
		// Get data from the model&lt;br /&gt;
		$this-&amp;gt;items			= $this-&amp;gt;get(&#039;Items&#039;);&lt;br /&gt;
		$this-&amp;gt;pagination		= $this-&amp;gt;get(&#039;Pagination&#039;);&lt;br /&gt;
		$this-&amp;gt;state			= $this-&amp;gt;get(&#039;State&#039;);&lt;br /&gt;
		// Remove the old ordering mechanism&lt;br /&gt;
		//$this-&amp;gt;filter_order 	= $app-&amp;gt;getUserStateFromRequest($context.&#039;filter_order&#039;, &#039;filter_order&#039;, &#039;greeting&#039;, &#039;cmd&#039;);&lt;br /&gt;
		//$this-&amp;gt;filter_order_Dir = $app-&amp;gt;getUserStateFromRequest($context.&#039;filter_order_Dir&#039;, &#039;filter_order_Dir&#039;, &#039;asc&#039;, &#039;cmd&#039;);&lt;br /&gt;
		$this-&amp;gt;filterForm    	= $this-&amp;gt;get(&#039;FilterForm&#039;);&lt;br /&gt;
		$this-&amp;gt;activeFilters 	= $this-&amp;gt;get(&#039;ActiveFilters&#039;);&lt;br /&gt;
        &lt;br /&gt;
		// What Access Permissions does this user have? What can (s)he do?&lt;br /&gt;
		$this-&amp;gt;canDo = JHelperContent::getActions(&#039;com_helloworld&#039;);&lt;br /&gt;
&lt;br /&gt;
		// Check for errors.&lt;br /&gt;
		if (count($errors = $this-&amp;gt;get(&#039;Errors&#039;)))&lt;br /&gt;
		{&lt;br /&gt;
			JError::raiseError(500, implode(&#039;&amp;lt;br /&amp;gt;&#039;, $errors));&lt;br /&gt;
&lt;br /&gt;
			return false;&lt;br /&gt;
		}&lt;br /&gt;
        &lt;br /&gt;
		// Set the submenu&lt;br /&gt;
		HelloWorldHelper::addSubmenu(&#039;helloworlds&#039;);&lt;br /&gt;
&lt;br /&gt;
		// Set the toolbar and number of found items&lt;br /&gt;
		$this-&amp;gt;addToolBar();&lt;br /&gt;
&lt;br /&gt;
		// Display the template&lt;br /&gt;
		parent::display($tpl);&lt;br /&gt;
&lt;br /&gt;
		// Set the document&lt;br /&gt;
		$this-&amp;gt;setDocument();&lt;br /&gt;
	}&lt;br /&gt;
&lt;br /&gt;
	/**&lt;br /&gt;
	 * Add the page title and toolbar.&lt;br /&gt;
	 *&lt;br /&gt;
	 * @return  void&lt;br /&gt;
	 *&lt;br /&gt;
	 * @since   1.6&lt;br /&gt;
	 */&lt;br /&gt;
	protected function addToolBar()&lt;br /&gt;
	{&lt;br /&gt;
		$title = JText::_(&#039;COM_HELLOWORLD_MANAGER_HELLOWORLDS&#039;);&lt;br /&gt;
&lt;br /&gt;
		if ($this-&amp;gt;pagination-&amp;gt;total)&lt;br /&gt;
		{&lt;br /&gt;
			$title .= &amp;quot;&amp;lt;span style=&#039;font-size: 0.5em; vertical-align: middle;&#039;&amp;gt;(&amp;quot; . $this-&amp;gt;pagination-&amp;gt;total . &amp;quot;)&amp;lt;/span&amp;gt;&amp;quot;;&lt;br /&gt;
		}&lt;br /&gt;
&lt;br /&gt;
		JToolBarHelper::title($title, &#039;helloworld&#039;);&lt;br /&gt;
		if ($this-&amp;gt;canDo-&amp;gt;get(&#039;core.create&#039;)) &lt;br /&gt;
		{&lt;br /&gt;
			JToolBarHelper::addNew(&#039;helloworld.add&#039;, &#039;JTOOLBAR_NEW&#039;);&lt;br /&gt;
		}&lt;br /&gt;
		if ($this-&amp;gt;canDo-&amp;gt;get(&#039;core.edit&#039;)) &lt;br /&gt;
		{&lt;br /&gt;
			JToolBarHelper::editList(&#039;helloworld.edit&#039;, &#039;JTOOLBAR_EDIT&#039;);&lt;br /&gt;
		}&lt;br /&gt;
		if ($this-&amp;gt;canDo-&amp;gt;get(&#039;core.delete&#039;)) &lt;br /&gt;
		{&lt;br /&gt;
			JToolBarHelper::deleteList(&#039;&#039;, &#039;helloworlds.delete&#039;, &#039;JTOOLBAR_DELETE&#039;);&lt;br /&gt;
		}&lt;br /&gt;
		if ($this-&amp;gt;canDo-&amp;gt;get(&#039;core.admin&#039;)) &lt;br /&gt;
		{&lt;br /&gt;
			JToolBarHelper::divider();&lt;br /&gt;
			JToolBarHelper::preferences(&#039;com_helloworld&#039;);&lt;br /&gt;
		}&lt;br /&gt;
	}&lt;br /&gt;
	/**&lt;br /&gt;
	 * Method to set up the document properties&lt;br /&gt;
	 *&lt;br /&gt;
	 * @return void&lt;br /&gt;
	 */&lt;br /&gt;
	protected function setDocument() &lt;br /&gt;
	{&lt;br /&gt;
		$document = JFactory::getDocument();&lt;br /&gt;
		$document-&amp;gt;setTitle(JText::_(&#039;COM_HELLOWORLD_ADMINISTRATION&#039;));&lt;br /&gt;
	}&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;translate&amp;gt;&amp;lt;!--T:53--&amp;gt; Note that in the layout file below the hidden input fields filter_order and filter_order_Dir have been removed.&amp;lt;/translate&amp;gt;  &lt;br /&gt;
&lt;br /&gt;
&amp;lt;span id=&amp;quot;admin/views/helloworlds/tmpl/default.php&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;tt&amp;gt;admin/views/helloworlds/tmpl/default.php&amp;lt;/tt&amp;gt;&lt;br /&gt;
&amp;lt;source lang=&amp;quot;php&amp;quot; highlight=&amp;quot;15-16,24,41-42,44-51,54,60,83-88,101-102&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;?php&lt;br /&gt;
/**&lt;br /&gt;
 * @package     Joomla.Administrator&lt;br /&gt;
 * @subpackage  com_helloworld&lt;br /&gt;
 *&lt;br /&gt;
 * @copyright   Copyright (C) 2005 - 2018 Open Source Matters, Inc. All rights reserved.&lt;br /&gt;
 * @license     GNU General Public License version 2 or later; see LICENSE.txt&lt;br /&gt;
 */&lt;br /&gt;
&lt;br /&gt;
// No direct access to this file&lt;br /&gt;
defined(&#039;_JEXEC&#039;) or die(&#039;Restricted Access&#039;);&lt;br /&gt;
&lt;br /&gt;
JHtml::_(&#039;formbehavior.chosen&#039;, &#039;select&#039;);&lt;br /&gt;
&lt;br /&gt;
$listOrder     = $this-&amp;gt;escape($this-&amp;gt;state-&amp;gt;get(&#039;list.ordering&#039;));&lt;br /&gt;
$listDirn      = $this-&amp;gt;escape($this-&amp;gt;state-&amp;gt;get(&#039;list.direction&#039;));&lt;br /&gt;
?&amp;gt;&lt;br /&gt;
&amp;lt;form action=&amp;quot;index.php?option=com_helloworld&amp;amp;view=helloworlds&amp;quot; method=&amp;quot;post&amp;quot; id=&amp;quot;adminForm&amp;quot; name=&amp;quot;adminForm&amp;quot;&amp;gt;&lt;br /&gt;
	&amp;lt;div id=&amp;quot;j-sidebar-container&amp;quot; class=&amp;quot;span2&amp;quot;&amp;gt;&lt;br /&gt;
		&amp;lt;?php echo JHtmlSidebar::render(); ?&amp;gt;&lt;br /&gt;
	&amp;lt;/div&amp;gt;&lt;br /&gt;
	&amp;lt;div id=&amp;quot;j-main-container&amp;quot; class=&amp;quot;span10&amp;quot;&amp;gt;&lt;br /&gt;
        &amp;lt;div class=&amp;quot;row-fluid&amp;quot;&amp;gt;&lt;br /&gt;
            &amp;lt;div class=&amp;quot;span12&amp;quot;&amp;gt;&lt;br /&gt;
                &amp;lt;?php echo JText::_(&#039;COM_HELLOWORLD_HELLOWORLDS_FILTER&#039;); ?&amp;gt;&lt;br /&gt;
                &amp;lt;?php&lt;br /&gt;
                    echo JLayoutHelper::render(&lt;br /&gt;
                        &#039;joomla.searchtools.default&#039;,&lt;br /&gt;
                        array(&#039;view&#039; =&amp;gt; $this)&lt;br /&gt;
                    );&lt;br /&gt;
                ?&amp;gt;&lt;br /&gt;
            &amp;lt;/div&amp;gt;&lt;br /&gt;
        &amp;lt;/div&amp;gt;&lt;br /&gt;
        &amp;lt;table class=&amp;quot;table table-striped table-hover&amp;quot;&amp;gt;&lt;br /&gt;
            &amp;lt;thead&amp;gt;&lt;br /&gt;
            &amp;lt;tr&amp;gt;&lt;br /&gt;
                &amp;lt;th width=&amp;quot;1%&amp;quot;&amp;gt;&amp;lt;?php echo JText::_(&#039;COM_HELLOWORLD_NUM&#039;); ?&amp;gt;&amp;lt;/th&amp;gt;&lt;br /&gt;
                &amp;lt;th width=&amp;quot;2%&amp;quot;&amp;gt;&lt;br /&gt;
                    &amp;lt;?php echo JHtml::_(&#039;grid.checkall&#039;); ?&amp;gt;&lt;br /&gt;
                &amp;lt;/th&amp;gt;&lt;br /&gt;
                &amp;lt;th width=&amp;quot;30%&amp;quot;&amp;gt;&lt;br /&gt;
                    &amp;lt;?php echo JHtml::_(&#039;searchtools.sort&#039;, &#039;COM_HELLOWORLD_HELLOWORLDS_NAME&#039;, &#039;greeting&#039;, $listDirn, $listOrder); ?&amp;gt;&lt;br /&gt;
                &amp;lt;/th&amp;gt;&lt;br /&gt;
                &amp;lt;th width=&amp;quot;30%&amp;quot;&amp;gt;&lt;br /&gt;
                    &amp;lt;?php echo JHtml::_(&#039;searchtools.sort&#039;, &#039;COM_HELLOWORLD_AUTHOR&#039;, &#039;author&#039;, $listDirn, $listOrder); ?&amp;gt;&lt;br /&gt;
                &amp;lt;/th&amp;gt;&lt;br /&gt;
                &amp;lt;th width=&amp;quot;30%&amp;quot;&amp;gt;&lt;br /&gt;
                    &amp;lt;?php echo JHtml::_(&#039;searchtools.sort&#039;, &#039;COM_HELLOWORLD_CREATED_DATE&#039;, &#039;created&#039;, $listDirn, $listOrder); ?&amp;gt;&lt;br /&gt;
                &amp;lt;/th&amp;gt;&lt;br /&gt;
                &amp;lt;th width=&amp;quot;5%&amp;quot;&amp;gt;&lt;br /&gt;
                    &amp;lt;?php echo JHtml::_(&#039;searchtools.sort&#039;, &#039;COM_HELLOWORLD_PUBLISHED&#039;, &#039;published&#039;, $listDirn, $listOrder); ?&amp;gt;&lt;br /&gt;
                &amp;lt;/th&amp;gt;&lt;br /&gt;
                &amp;lt;th width=&amp;quot;2%&amp;quot;&amp;gt;&lt;br /&gt;
                    &amp;lt;?php echo JHtml::_(&#039;searchtools.sort&#039;, &#039;COM_HELLOWORLD_ID&#039;, &#039;id&#039;, $listDirn, $listOrder); ?&amp;gt;&lt;br /&gt;
                &amp;lt;/th&amp;gt;&lt;br /&gt;
            &amp;lt;/tr&amp;gt;&lt;br /&gt;
            &amp;lt;/thead&amp;gt;&lt;br /&gt;
            &amp;lt;tfoot&amp;gt;&lt;br /&gt;
                &amp;lt;tr&amp;gt;&lt;br /&gt;
                    &amp;lt;td colspan=&amp;quot;5&amp;quot;&amp;gt;&lt;br /&gt;
                        &amp;lt;?php echo $this-&amp;gt;pagination-&amp;gt;getListFooter(); ?&amp;gt;&lt;br /&gt;
                    &amp;lt;/td&amp;gt;&lt;br /&gt;
                &amp;lt;/tr&amp;gt;&lt;br /&gt;
            &amp;lt;/tfoot&amp;gt;&lt;br /&gt;
            &amp;lt;tbody&amp;gt;&lt;br /&gt;
                &amp;lt;?php if (!empty($this-&amp;gt;items)) : ?&amp;gt;&lt;br /&gt;
                    &amp;lt;?php foreach ($this-&amp;gt;items as $i =&amp;gt; $row) :&lt;br /&gt;
                        $link = JRoute::_(&#039;index.php?option=com_helloworld&amp;amp;task=helloworld.edit&amp;amp;id=&#039; . $row-&amp;gt;id);&lt;br /&gt;
                    ?&amp;gt;&lt;br /&gt;
                        &amp;lt;tr&amp;gt;&lt;br /&gt;
                            &amp;lt;td&amp;gt;&amp;lt;?php echo $this-&amp;gt;pagination-&amp;gt;getRowOffset($i); ?&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
                            &amp;lt;td&amp;gt;&lt;br /&gt;
                                &amp;lt;?php echo JHtml::_(&#039;grid.id&#039;, $i, $row-&amp;gt;id); ?&amp;gt;&lt;br /&gt;
                            &amp;lt;/td&amp;gt;&lt;br /&gt;
                            &amp;lt;td&amp;gt;&lt;br /&gt;
                                &amp;lt;a href=&amp;quot;&amp;lt;?php echo $link; ?&amp;gt;&amp;quot; title=&amp;quot;&amp;lt;?php echo JText::_(&#039;COM_HELLOWORLD_EDIT_HELLOWORLD&#039;); ?&amp;gt;&amp;quot;&amp;gt;&lt;br /&gt;
                                    &amp;lt;?php echo $row-&amp;gt;greeting; ?&amp;gt;&lt;br /&gt;
                                &amp;lt;/a&amp;gt;&lt;br /&gt;
                                &amp;lt;div class=&amp;quot;small&amp;quot;&amp;gt;&lt;br /&gt;
									&amp;lt;?php echo JText::_(&#039;JCATEGORY&#039;) . &#039;: &#039; . $this-&amp;gt;escape($row-&amp;gt;category_title); ?&amp;gt;&lt;br /&gt;
								&amp;lt;/div&amp;gt;&lt;br /&gt;
                            &amp;lt;/td&amp;gt;&lt;br /&gt;
                            &amp;lt;td align=&amp;quot;center&amp;quot;&amp;gt;&lt;br /&gt;
                                &amp;lt;?php echo $row-&amp;gt;author; ?&amp;gt;&lt;br /&gt;
                            &amp;lt;/td&amp;gt;&lt;br /&gt;
                            &amp;lt;td align=&amp;quot;center&amp;quot;&amp;gt;&lt;br /&gt;
                                &amp;lt;?php echo substr($row-&amp;gt;created, 0, 10); ?&amp;gt;&lt;br /&gt;
                            &amp;lt;/td&amp;gt;&lt;br /&gt;
                            &amp;lt;td align=&amp;quot;center&amp;quot;&amp;gt;&lt;br /&gt;
                                &amp;lt;?php echo JHtml::_(&#039;jgrid.published&#039;, $row-&amp;gt;published, $i, &#039;helloworlds.&#039;, true, &#039;cb&#039;); ?&amp;gt;&lt;br /&gt;
                            &amp;lt;/td&amp;gt;&lt;br /&gt;
                            &amp;lt;td align=&amp;quot;center&amp;quot;&amp;gt;&lt;br /&gt;
                                &amp;lt;?php echo $row-&amp;gt;id; ?&amp;gt;&lt;br /&gt;
                            &amp;lt;/td&amp;gt;&lt;br /&gt;
                        &amp;lt;/tr&amp;gt;&lt;br /&gt;
                    &amp;lt;?php endforeach; ?&amp;gt;&lt;br /&gt;
                &amp;lt;?php endif; ?&amp;gt;&lt;br /&gt;
            &amp;lt;/tbody&amp;gt;&lt;br /&gt;
        &amp;lt;/table&amp;gt;&lt;br /&gt;
        &amp;lt;input type=&amp;quot;hidden&amp;quot; name=&amp;quot;task&amp;quot; value=&amp;quot;&amp;quot;/&amp;gt;&lt;br /&gt;
        &amp;lt;input type=&amp;quot;hidden&amp;quot; name=&amp;quot;boxchecked&amp;quot; value=&amp;quot;0&amp;quot;/&amp;gt;&lt;br /&gt;
        &amp;lt;?php echo JHtml::_(&#039;form.token&#039;); ?&amp;gt;&lt;br /&gt;
    &amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;/form&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;translate&amp;gt;&amp;lt;!--T:54--&amp;gt; Instead of the using the hidden fields &amp;quot;filter_order&amp;quot; and &amp;quot;filter_order_Dir&amp;quot; to keep track of the current column for ordering and direction, we will use the &amp;quot;list&amp;quot;[&amp;quot;fullordering&amp;quot;] field, and this will now be displayed on the form as well (as is done within com_content for the Articles view). We&#039;ll also need to include the new language strings in this field in our admin language file.&amp;lt;/translate&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;span id=&amp;quot;admin/models/forms/filter_helloworlds.xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;tt&amp;gt;admin/models/forms/filter_helloworlds.xml&amp;lt;/tt&amp;gt;&lt;br /&gt;
&amp;lt;source lang=&amp;quot;xml&amp;quot; highlight=&amp;quot;22-41&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;?xml version=&amp;quot;1.0&amp;quot; encoding=&amp;quot;utf-8&amp;quot;?&amp;gt;&lt;br /&gt;
&amp;lt;form&amp;gt;&lt;br /&gt;
	&amp;lt;fields name=&amp;quot;filter&amp;quot;&amp;gt;&lt;br /&gt;
		&amp;lt;field&lt;br /&gt;
			name=&amp;quot;search&amp;quot;&lt;br /&gt;
			type=&amp;quot;text&amp;quot;&lt;br /&gt;
			label=&amp;quot;COM_BANNERS_SEARCH_IN_TITLE&amp;quot;&lt;br /&gt;
			hint=&amp;quot;JSEARCH_FILTER&amp;quot;&lt;br /&gt;
			class=&amp;quot;js-stools-search-string&amp;quot;&lt;br /&gt;
		/&amp;gt;&lt;br /&gt;
		&amp;lt;field&lt;br /&gt;
			name=&amp;quot;published&amp;quot;&lt;br /&gt;
			type=&amp;quot;status&amp;quot;&lt;br /&gt;
			label=&amp;quot;JOPTION_SELECT_PUBLISHED&amp;quot;&lt;br /&gt;
			description=&amp;quot;JOPTION_SELECT_PUBLISHED_DESC&amp;quot;&lt;br /&gt;
			onchange=&amp;quot;this.form.submit();&amp;quot;&lt;br /&gt;
			&amp;gt;&lt;br /&gt;
			&amp;lt;option value=&amp;quot;&amp;quot;&amp;gt;JOPTION_SELECT_PUBLISHED&amp;lt;/option&amp;gt;&lt;br /&gt;
		&amp;lt;/field&amp;gt;&lt;br /&gt;
	&amp;lt;/fields&amp;gt;&lt;br /&gt;
	&amp;lt;fields name=&amp;quot;list&amp;quot;&amp;gt;&lt;br /&gt;
		&amp;lt;field&lt;br /&gt;
			name=&amp;quot;fullordering&amp;quot;&lt;br /&gt;
			type=&amp;quot;list&amp;quot;&lt;br /&gt;
			label=&amp;quot;COM_HELLOWORLD_LIST_FULL_ORDERING&amp;quot;&lt;br /&gt;
			description=&amp;quot;COM_HELLOWORLD_LIST_FULL_ORDERING_DESC&amp;quot;&lt;br /&gt;
			onchange=&amp;quot;this.form.submit();&amp;quot;&lt;br /&gt;
			default=&amp;quot;greeting ASC&amp;quot;&lt;br /&gt;
			&amp;gt;&lt;br /&gt;
			&amp;lt;option value=&amp;quot;&amp;quot;&amp;gt;JGLOBAL_SORT_BY&amp;lt;/option&amp;gt;&lt;br /&gt;
			&amp;lt;option value=&amp;quot;greeting ASC&amp;quot;&amp;gt;COM_HELLOWORLD_ORDERING_ASC&amp;lt;/option&amp;gt;&lt;br /&gt;
			&amp;lt;option value=&amp;quot;greeting DESC&amp;quot;&amp;gt;COM_HELLOWORLD_ORDERING_DESC&amp;lt;/option&amp;gt;&lt;br /&gt;
			&amp;lt;option value=&amp;quot;id ASC&amp;quot;&amp;gt;JGRID_HEADING_ID_ASC&amp;lt;/option&amp;gt;&lt;br /&gt;
			&amp;lt;option value=&amp;quot;id DESC&amp;quot;&amp;gt;JGRID_HEADING_ID_DESC&amp;lt;/option&amp;gt;&lt;br /&gt;
			&amp;lt;option value=&amp;quot;published ASC&amp;quot;&amp;gt;COM_HELLOWORLD_PUBLISHED_ASC&amp;lt;/option&amp;gt;&lt;br /&gt;
			&amp;lt;option value=&amp;quot;published DESC&amp;quot;&amp;gt;COM_HELLOWORLD_PUBLISHED_DESC&amp;lt;/option&amp;gt;&lt;br /&gt;
			&amp;lt;option value=&amp;quot;author ASC&amp;quot;&amp;gt;COM_HELLOWORLD_AUTHOR_ASC&amp;lt;/option&amp;gt;&lt;br /&gt;
			&amp;lt;option value=&amp;quot;author DESC&amp;quot;&amp;gt;COM_HELLOWORLD_AUTHOR_DESC&amp;lt;/option&amp;gt;&lt;br /&gt;
			&amp;lt;option value=&amp;quot;created ASC&amp;quot;&amp;gt;COM_HELLOWORLD_CREATED_ASC&amp;lt;/option&amp;gt;&lt;br /&gt;
			&amp;lt;option value=&amp;quot;created DESC&amp;quot;&amp;gt;COM_HELLOWORLD_CREATED_DESC&amp;lt;/option&amp;gt;&lt;br /&gt;
		&amp;lt;/field&amp;gt;&lt;br /&gt;
		&amp;lt;field&lt;br /&gt;
			name=&amp;quot;limit&amp;quot;&lt;br /&gt;
			type=&amp;quot;limitbox&amp;quot;&lt;br /&gt;
			class=&amp;quot;input-mini&amp;quot;&lt;br /&gt;
			default=&amp;quot;25&amp;quot;&lt;br /&gt;
			label=&amp;quot;COM_CONTENT_LIST_LIMIT&amp;quot;&lt;br /&gt;
			description=&amp;quot;COM_HELLOWORLD_LIST_LIMIT_DESC&amp;quot;&lt;br /&gt;
			onchange=&amp;quot;this.form.submit();&amp;quot;&lt;br /&gt;
		/&amp;gt;&lt;br /&gt;
	&amp;lt;/fields&amp;gt;&lt;br /&gt;
&amp;lt;/form&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;translate&amp;gt;&amp;lt;!--T:62--&amp;gt; The above status type field (second field element, with name=&amp;quot;published&amp;quot;) displays the status values &amp;quot;Trashed&amp;quot; and &amp;quot;Archived&amp;quot; which the Helloworld component doesn&#039;t support. We could define our own custom helloworldStatus type field which displayed only the publishing options, but as defining such custom fields has already been covered in the step [[S:MyLanguage/J3.x:Developing an MVC Component/Using the database|Using the database]] with our &amp;quot;helloworld&amp;quot; custom field, we won&#039;t bother with that here.&amp;lt;/translate&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;translate&amp;gt;&lt;br /&gt;
&amp;lt;!--T:59--&amp;gt;&lt;br /&gt;
Within the model we need to get the author and created date fields from the database, and we also need to add these to the &amp;lt;tt&amp;gt;filter_fields&amp;lt;/tt&amp;gt; array of fields which relate to sortable columns. &lt;br /&gt;
&amp;lt;/translate&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span id=&amp;quot;admin/models/helloworlds.php&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;tt&amp;gt;admin/models/helloworlds.php&amp;lt;/tt&amp;gt;&lt;br /&gt;
&amp;lt;source lang=&amp;quot;php&amp;quot; highlight=&amp;quot;34-35,55,62-64&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;?php&lt;br /&gt;
/**&lt;br /&gt;
 * @package     Joomla.Administrator&lt;br /&gt;
 * @subpackage  com_helloworld&lt;br /&gt;
 *&lt;br /&gt;
 * @copyright   Copyright (C) 2005 - 2018 Open Source Matters, Inc. All rights reserved.&lt;br /&gt;
 * @license     GNU General Public License version 2 or later; see LICENSE.txt&lt;br /&gt;
 */&lt;br /&gt;
// No direct access to this file&lt;br /&gt;
defined(&#039;_JEXEC&#039;) or die(&#039;Restricted access&#039;);&lt;br /&gt;
&lt;br /&gt;
/**&lt;br /&gt;
 * HelloWorldList Model&lt;br /&gt;
 *&lt;br /&gt;
 * @since  0.0.1&lt;br /&gt;
 */&lt;br /&gt;
class HelloWorldModelHelloWorlds extends JModelList&lt;br /&gt;
{&lt;br /&gt;
	/**&lt;br /&gt;
	 * Constructor.&lt;br /&gt;
	 *&lt;br /&gt;
	 * @param   array  $config  An optional associative array of configuration settings.&lt;br /&gt;
	 *&lt;br /&gt;
	 * @see     JController&lt;br /&gt;
	 * @since   1.6&lt;br /&gt;
	 */&lt;br /&gt;
	public function __construct($config = array())&lt;br /&gt;
	{&lt;br /&gt;
		if (empty($config[&#039;filter_fields&#039;]))&lt;br /&gt;
		{&lt;br /&gt;
			$config[&#039;filter_fields&#039;] = array(&lt;br /&gt;
				&#039;id&#039;,&lt;br /&gt;
				&#039;greeting&#039;,&lt;br /&gt;
				&#039;author&#039;,&lt;br /&gt;
				&#039;created&#039;,&lt;br /&gt;
				&#039;published&#039;&lt;br /&gt;
			);&lt;br /&gt;
		}&lt;br /&gt;
&lt;br /&gt;
		parent::__construct($config);&lt;br /&gt;
	}&lt;br /&gt;
&lt;br /&gt;
	/**&lt;br /&gt;
	 * Method to build an SQL query to load the list data.&lt;br /&gt;
	 *&lt;br /&gt;
	 * @return      string  An SQL query&lt;br /&gt;
	 */&lt;br /&gt;
	protected function getListQuery()&lt;br /&gt;
	{&lt;br /&gt;
		// Initialize variables.&lt;br /&gt;
		$db    = JFactory::getDbo();&lt;br /&gt;
		$query = $db-&amp;gt;getQuery(true);&lt;br /&gt;
&lt;br /&gt;
		// Create the base select statement.&lt;br /&gt;
		$query-&amp;gt;select(&#039;a.id as id, a.greeting as greeting, a.published as published, a.created as created&#039;)&lt;br /&gt;
			  -&amp;gt;from($db-&amp;gt;quoteName(&#039;#__helloworld&#039;, &#039;a&#039;));&lt;br /&gt;
&lt;br /&gt;
		// Join over the categories.&lt;br /&gt;
		$query-&amp;gt;select($db-&amp;gt;quoteName(&#039;c.title&#039;, &#039;category_title&#039;))&lt;br /&gt;
			-&amp;gt;join(&#039;LEFT&#039;, $db-&amp;gt;quoteName(&#039;#__categories&#039;, &#039;c&#039;) . &#039; ON c.id = a.catid&#039;);&lt;br /&gt;
        &lt;br /&gt;
		// Join with users table to get the username of the author&lt;br /&gt;
		$query-&amp;gt;select($db-&amp;gt;quoteName(&#039;u.username&#039;, &#039;author&#039;))&lt;br /&gt;
			-&amp;gt;join(&#039;LEFT&#039;, $db-&amp;gt;quoteName(&#039;#__users&#039;, &#039;u&#039;) . &#039; ON u.id = a.created_by&#039;);&lt;br /&gt;
            &lt;br /&gt;
		// Filter: like / search&lt;br /&gt;
		$search = $this-&amp;gt;getState(&#039;filter.search&#039;);&lt;br /&gt;
&lt;br /&gt;
		if (!empty($search))&lt;br /&gt;
		{&lt;br /&gt;
			$like = $db-&amp;gt;quote(&#039;%&#039; . $search . &#039;%&#039;);&lt;br /&gt;
			$query-&amp;gt;where(&#039;greeting LIKE &#039; . $like);&lt;br /&gt;
		}&lt;br /&gt;
&lt;br /&gt;
		// Filter by published state&lt;br /&gt;
		$published = $this-&amp;gt;getState(&#039;filter.published&#039;);&lt;br /&gt;
&lt;br /&gt;
		if (is_numeric($published))&lt;br /&gt;
		{&lt;br /&gt;
			$query-&amp;gt;where(&#039;a.published = &#039; . (int) $published);&lt;br /&gt;
		}&lt;br /&gt;
		elseif ($published === &#039;&#039;)&lt;br /&gt;
		{&lt;br /&gt;
			$query-&amp;gt;where(&#039;(a.published IN (0, 1))&#039;);&lt;br /&gt;
		}&lt;br /&gt;
&lt;br /&gt;
		// Add the list ordering clause.&lt;br /&gt;
		$orderCol	= $this-&amp;gt;state-&amp;gt;get(&#039;list.ordering&#039;, &#039;greeting&#039;);&lt;br /&gt;
		$orderDirn 	= $this-&amp;gt;state-&amp;gt;get(&#039;list.direction&#039;, &#039;asc&#039;);&lt;br /&gt;
&lt;br /&gt;
		$query-&amp;gt;order($db-&amp;gt;escape($orderCol) . &#039; &#039; . $db-&amp;gt;escape($orderDirn));&lt;br /&gt;
&lt;br /&gt;
		return $query;&lt;br /&gt;
	}&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&amp;lt;/span&amp;gt;&lt;br /&gt;
&amp;lt;translate&amp;gt;&lt;br /&gt;
==Updated Language Strings== &amp;lt;!--T:55--&amp;gt;&lt;br /&gt;
&amp;lt;/translate&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span id=&amp;quot;site/language/en-GB/en-GB.com_helloworld.ini&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;tt&amp;gt;site/language/en-GB/en-GB.com_helloworld.ini&amp;lt;/tt&amp;gt;&lt;br /&gt;
&amp;lt;source lang=&amp;quot;text&amp;quot; highlight=&amp;quot;1-20&amp;quot;&amp;gt;&lt;br /&gt;
; add new message form&lt;br /&gt;
COM_HELLOWORLD_LEGEND_DETAILS=&amp;quot;New Helloworld Message Details&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_HELLOWORLD_CREATING=&amp;quot;Add message&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_HELLOWORLD_ERROR_UNACCEPTABLE=&amp;quot;Sorry, you have an error&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_HELLOWORLD_DETAILS=&amp;quot;Message details&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_HELLOWORLD_GREETING_LABEL=&amp;quot;Greeting&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_HELLOWORLD_GREETING_DESC=&amp;quot;Please specify the greeting to add&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_HELLOWORLD_GREETING_HINT=&amp;quot;Letters only!&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_HELLOWORLD_FIELD_CATID_LABEL=&amp;quot;Category&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_HELLOWORLD_FIELD_CATID_DESC=&amp;quot;Please select the associated category&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_HELLOWORLD_MESSAGE_LABEL=&amp;quot;Reason&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_HELLOWORLD_MESSAGE_DESC=&amp;quot;Please say why you&#039;re adding this greeting&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_HELLOWORLD_MESSAGE_HINT=&amp;quot;No HTML tags!&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_HELLOWORLD_FIELD_CAPTCHA_LABEL=&amp;quot;Spam protection&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_HELLOWORLD_FIELD_CAPTCHA_DESC=&amp;quot;Prove you&#039;re a real person!&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_HELLOWORLD_FIELD_SHOW_CATEGORY_LABEL=&amp;quot;Display category or not?&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_HELLOWORLD_FIELD_SHOW_CATEGORY_DESC=&amp;quot;Select if you want the category displayed too&amp;quot;&lt;br /&gt;
; save and cancel confirmation messages&lt;br /&gt;
COM_HELLOWORLD_ADD_SUCCESSFUL=&amp;quot;New greeting successfully saved&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_ADD_CANCELLED=&amp;quot;New greeting cancelled ok&amp;quot;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span id=&amp;quot;admin/language/en-GB/en-GB.com_helloworld.sys.ini&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;tt&amp;gt;admin/language/en-GB/en-GB.com_helloworld.sys.ini&amp;lt;/tt&amp;gt;&lt;br /&gt;
&amp;lt;source lang=&amp;quot;text&amp;quot; highlight=&amp;quot;10-11&amp;quot;&amp;gt;&lt;br /&gt;
; Joomla! Project&lt;br /&gt;
; Copyright (C) 2005 - 2018 Open Source Matters. All rights reserved.&lt;br /&gt;
; License GNU General Public License version 2 or later; see LICENSE.txt, see LICENSE.php&lt;br /&gt;
; Note : All ini files need to be saved as UTF-8&lt;br /&gt;
&lt;br /&gt;
COM_HELLOWORLD=&amp;quot;Hello World!&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_DESCRIPTION=&amp;quot;This is the Hello World description&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_HELLOWORLD_VIEW_DEFAULT_TITLE=&amp;quot;Hello World&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_HELLOWORLD_VIEW_DEFAULT_DESC=&amp;quot;This view displays a selected message&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_ADD_VIEW_TITLE=&amp;quot;Hello World form&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_ADD_VIEW_DESC=&amp;quot;This displays a form to allow the user to enter a new message&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_INSTALL_TEXT=&amp;quot;HelloWorld Install script&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_MENU=&amp;quot;Hello World!&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_POSTFLIGHT_DISCOVER_INSTALL_TEXT=&amp;quot;HelloWorld postflight discover install script&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_POSTFLIGHT_INSTALL_TEXT=&amp;quot;HelloWorld postflight install script&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_POSTFLIGHT_UNINSTALL_TEXT=&amp;quot;HelloWorld postflight uninstall script&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_POSTFLIGHT_UPDATE_TEXT=&amp;quot;HelloWorld postflight update script&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_PREFLIGHT_DISCOVER_INSTALL_TEXT=&amp;quot;HelloWorld preflight discover install script&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_PREFLIGHT_INSTALL_TEXT=&amp;quot;HelloWorld preflight install script&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_PREFLIGHT_UNINSTALL_TEXT=&amp;quot;HelloWorld preflight uninstall script&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_PREFLIGHT_UPDATE_TEXT=&amp;quot;HelloWorld preflight update script&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_UNINSTALL_TEXT=&amp;quot;HelloWorld Uninstall script&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_UPDATE_TEXT=&amp;quot;HelloWorld Update script. HelloWorld now updated to version %s.&amp;quot;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span id=&amp;quot;admin/language/en-GB/en-GB.com_helloworld.ini&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;tt&amp;gt;admin/language/en-GB/en-GB.com_helloworld.ini&amp;lt;/tt&amp;gt;&lt;br /&gt;
&amp;lt;source lang=&amp;quot;text&amp;quot; highlight=&amp;quot;10-11,43-46,58-66&amp;quot;&amp;gt;&lt;br /&gt;
; Joomla! Project&lt;br /&gt;
; Copyright (C) 2005 - 2018 Open Source Matters. All rights reserved.&lt;br /&gt;
; License GNU General Public License version 2 or later; see LICENSE.txt, see LICENSE.php&lt;br /&gt;
; Note : All ini files need to be saved as UTF-8&lt;br /&gt;
&lt;br /&gt;
COM_HELLOWORLD_ADMINISTRATION=&amp;quot;HelloWorld - Administration&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_ADMINISTRATION_CATEGORIES=&amp;quot;HelloWorld - Categories&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_NUM=&amp;quot;#&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_HELLOWORLDS_FILTER=&amp;quot;Filters&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_AUTHOR=&amp;quot;Author&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_CREATED_DATE=&amp;quot;Created&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_PUBLISHED=&amp;quot;Published&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_HELLOWORLDS_NAME=&amp;quot;Name&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_ID=&amp;quot;Id&amp;quot;&lt;br /&gt;
&lt;br /&gt;
COM_HELLOWORLD_HELLOWORLD_CREATING=&amp;quot;HelloWorld - Creating&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_HELLOWORLD_DETAILS=&amp;quot;Details&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_HELLOWORLD_EDITING=&amp;quot;HelloWorld - Editing&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_HELLOWORLD_ERROR_UNACCEPTABLE=&amp;quot;Some values are unacceptable&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_HELLOWORLD_FIELD_CATID_DESC=&amp;quot;The category the messages belongs to&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_HELLOWORLD_FIELD_CATID_LABEL=&amp;quot;Category&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_HELLOWORLD_FIELD_GREETING_DESC=&amp;quot;This message will be displayed&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_HELLOWORLD_FIELD_GREETING_LABEL=&amp;quot;Message&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_HELLOWORLD_FIELD_SHOW_CATEGORY_LABEL=&amp;quot;Show category&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_HELLOWORLD_FIELD_SHOW_CATEGORY_DESC=&amp;quot;If set to Show, the title of the message&amp;amp;rsquo;s category will show.&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_HELLOWORLD_HEADING_GREETING=&amp;quot;Greeting&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_HELLOWORLD_HEADING_ID=&amp;quot;Id&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_MANAGER_HELLOWORLD_EDIT=&amp;quot;HelloWorld manager: Edit Message&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_MANAGER_HELLOWORLD_NEW=&amp;quot;HelloWorld manager: New Message&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_MANAGER_HELLOWORLDS=&amp;quot;HelloWorld manager&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_EDIT_HELLOWORLD=&amp;quot;Edit message&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_N_ITEMS_DELETED_1=&amp;quot;One message deleted&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_N_ITEMS_DELETED_MORE=&amp;quot;%d messages deleted&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_N_ITEMS_PUBLISHED=&amp;quot;%d message(s) published&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_N_ITEMS_UNPUBLISHED=&amp;quot;%d message(s) unpublished&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_HELLOWORLD_GREETING_LABEL=&amp;quot;Greeting&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_HELLOWORLD_GREETING_DESC=&amp;quot;Add Hello World Greeting&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_SUBMENU_MESSAGES=&amp;quot;Messages&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_SUBMENU_CATEGORIES=&amp;quot;Categories&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_CONFIGURATION=&amp;quot;HelloWorld Configuration&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_CONFIG_GREETING_SETTINGS_LABEL=&amp;quot;Messages settings&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_CONFIG_GREETING_SETTINGS_DESC=&amp;quot;Settings that will be applied to all messages by default&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_HELLOWORLD_FIELD_CAPTCHA_LABEL=&amp;quot;Captcha&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_HELLOWORLD_FIELD_CAPTCHA_DESC=&amp;quot;Select Captcha to use on front end form&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_HELLOWORLD_FIELD_USER_TO_EMAIL_LABEL=&amp;quot;User to email&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_HELLOWORLD_FIELD_USER_TO_EMAIL_DESC=&amp;quot;Select user to email when a new message is entered on front end&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_FIELDSET_RULES=&amp;quot;Message Permissions&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_FIELD_RULES_LABEL=&amp;quot;Permissions&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_ACCESS_DELETE_DESC=&amp;quot;Is this group allowed to edit this message?&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_ACCESS_DELETE_DESC=&amp;quot;Is this group allowed to delete this message?&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_TAB_NEW_MESSAGE=&amp;quot;New Message&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_TAB_EDIT_MESSAGE=&amp;quot;Message Details&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_TAB_PARAMS=&amp;quot;Parameters&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_TAB_PERMISSIONS=&amp;quot;Permissions&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_LEGEND_DETAILS=&amp;quot;Message Details&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_LEGEND_PARAMS=&amp;quot;Message Parameters&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_LEGEND_PERMISSIONS=&amp;quot;Message Permissions&amp;quot;&lt;br /&gt;
; Column ordering in the Helloworlds view&lt;br /&gt;
COM_HELLOWORLD_ORDERING_ASC=&amp;quot;Greeting ascending&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_ORDERING_DESC=&amp;quot;Greeting descending&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_AUTHOR_ASC=&amp;quot;Author ascending&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_AUTHOR_DESC=&amp;quot;Author descending&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_CREATED_ASC=&amp;quot;Creation date ascending&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_CREATED_DESC=&amp;quot;Creation date descending&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_PUBLISHED_ASC=&amp;quot;Unpublished first&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_PUBLISHED_DESC=&amp;quot;Published first&amp;quot;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;translate&amp;gt;&lt;br /&gt;
==Packaging the Component== &amp;lt;!--T:56--&amp;gt;&lt;br /&gt;
&amp;lt;/translate&amp;gt;&lt;br /&gt;
&amp;lt;translate&amp;gt;&amp;lt;!--T:57--&amp;gt; Contents of your code directory. Each file link below takes you to the step in the tutorial which has the latest version of that source code file.&amp;lt;/translate&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Adding_a_front-end_form#helloworld.xml|helloworld.xml]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Adding an install-uninstall-update script file#script.php|script.php]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Adding_a_view_to_the_site_part#site/helloworld.php|site/helloworld.php]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Developing_a_Basic_Component#index.html|site/index.html]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Adding_a_view_to_the_site_part#site/controller.php|site/controller.php]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Adding_a_front-end_form#site/controllers/helloworld.php|site/controllers/helloworld.php]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Developing_a_Basic_Component#index.html|site/views/index.html]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Developing_a_Basic_Component#index.html|site/views/helloworld/index.html]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Adding_configuration#site/views/helloworld/view.html.php|site/views/helloworld/view.html.php]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Developing_a_Basic_Component#index.html|site/views/helloworld/tmpl/index.html]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Using_the_database#site/views/helloworld/tmpl/default.xml|site/views/helloworld/tmpl/default.xml]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Adding_configuration#site/views/helloworld/tmpl/default.php|site/views/helloworld/tmpl/default.php]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Developing_a_Basic_Component#index.html|site/views/form/index.html]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Adding_a_front-end_form#site/views/form/view.html.php|site/views/form/view.html.php]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Developing_a_Basic_Component#index.html|site/views/form/tmpl/index.html]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Adding_a_front-end_form#site/views/form/tmpl/edit.php|site/views/form/tmpl/edit.php]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Adding_a_front-end_form#site/views/form/tmpl/edit.xml|site/views/form/tmpl/edit.xml]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Developing_a_Basic_Component#index.html|site/models/index.html]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Adding_configuration#site/models/helloworld.php|site/models/helloworld.php]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Adding_a_front-end_form#site/models/form.php|site/models/form.php]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Developing_a_Basic_Component#index.html|site/models/forms/index.html]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Adding_a_front-end_form#site/models/forms/add-form.xml|site/models/forms/add-form.xml]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Developing_a_Basic_Component#index.html|site/language/index.html]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Developing_a_Basic_Component#index.html|site/language/en-GB/index.html]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.x:Developing an MVC Component/Adding_a_front-end_form#site/language/en-GB/en-GB.com_helloworld.ini|site/language/en-GB/en-GB.com_helloworld.ini]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Developing_a_Basic_Component#index.html|admin/index.html]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Adding_ACL#admin/helloworld.php|admin/helloworld.php]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Adding_ACL#admin/config.xml|admin/config.xml]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Basic_backend#admin/controller.php|admin/controller.php]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Adding_ACL#admin/access.xml|admin/access.xml]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Adding_categories#admin/helpers/helloworld.php|admin/helpers/helloworld.php]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Developing_a_Basic_Component#index.html|admin/helpers/index.html]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Developing_a_Basic_Component#index.html|admin/sql/index.html]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Adding_a_front-end_form#admin/sql/install.mysql.utf8.sql|admin/sql/install.mysql.utf8.sql]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Using_the_database#admin/sql/uninstall.mysql.utf8.sql|admin/sql/uninstall.mysql.utf8.sql]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Developing_a_Basic_Component#index.html|admin/sql/updates/index.html]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Developing_a_Basic_Component#index.html|admin/sql/updates/mysql/index.html]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Developing_a_Basic_Component#admin/sql/updates/mysql/0.0.1.sql|admin/sql/updates/mysql/0.0.1.sql]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Using_the_database#admin/sql/install.mysql.utf8.sql|admin/sql/updates/mysql/0.0.6.sql]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Adding_categories#admin/sql/updates/mysql/0.0.12.sql|admin/sql/updates/mysql/0.0.12.sql]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Adding_configuration#admin/sql/updates/mysql/0.0.13.sql|admin/sql/updates/mysql/0.0.13.sql]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Adding_ACL#admin/sql/updates/mysql/0.0.14.sql|admin/sql/updates/mysql/0.0.14.sql]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Adding_a_front-end_form#admin/sql/updates/mysql/0.0.16.sql|admin/sql/updates/mysql/0.0.16.sql]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Developing_a_Basic_Component#index.html|admin/models/index.html]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Developing_a_Basic_Component#index.html|admin/models/fields/index.html]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Adding_categories#admin/models/fields/helloworld.php|admin/models/fields/helloworld.php]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Adding_a_front-end_form#admin/models/helloworlds.php|admin/models/helloworlds.php]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Adding_ACL#admin/models/helloworld.php|admin/models/helloworld.php]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Adding_a_front-end_form#admin/models/forms/filter_helloworlds.xml|admin/models/forms/filter_helloworlds.xml]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Developing_a_Basic_Component#index.html|admin/models/forms/index.html]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Adding_verifications#admin/models/forms/helloworld.js|admin/models/forms/helloworld.js]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Adding_ACL#admin/models/forms/helloworld.xml|admin/models/forms/helloworld.xml]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Adding_verifications#admin/models/rules/greeting.php|admin/models/rules/greeting.php]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Developing_a_Basic_Component#index.html|admin/models/rules/index.html]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Adding_ACL#admin/controllers/helloworld.php|admin/controllers/helloworld.php]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Adding_backend_actions#admin/controllers/helloworlds.php|admin/controllers/helloworlds.php]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Developing_a_Basic_Component#index.html|admin/controllers/index.html]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Developing_a_Basic_Component#index.html|admin/views/index.html]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Developing_a_Basic_Component#index.html|admin/views/helloworld/index.html]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Adding_ACL#admin/views/helloworld/view.html.php|admin/views/helloworld/view.html.php]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Developing_a_Basic_Component#index.html|admin/views/helloworld/tmpl/index.html]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Adding_ACL#admin/views/helloworld/tmpl/edit.php|admin/views/helloworld/tmpl/edit.php]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Adding_verifications#admin/views/helloworld/submitbutton.js|admin/views/helloworld/submitbutton.js]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Developing_a_Basic_Component#index.html|admin/views/helloworlds/index.html]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Adding_a_front-end_form#admin/views/helloworlds/view.html.php|admin/views/helloworlds/view.html.php]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Developing_a_Basic_Component#index.html|admin/views/helloworlds/tmpl/index.html]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Adding_a_front-end_form#admin/views/helloworlds/tmpl/default.php|admin/views/helloworlds/tmpl/default.php]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Developing_a_Basic_Component#index.html|admin/tables/index.html]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Adding_ACL#admin/tables/helloworld.php|admin/tables/helloworld.php]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Developing_a_Basic_Component#index.html|admin/language/index.html]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Developing_a_Basic_Component#index.html|admin/language/en-GB/index.html]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.x:Developing an MVC Component/Adding_a_front-end_form#admin.2Flanguage.2Fen-GB.2Fen-GB.com_helloworld.ini|admin/language/en-GB/en-GB.com_helloworld.ini]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.x:Developing an MVC Component/Adding_a_front-end_form#admin.2Flanguage.2Fen-GB.2Fen-GB.com_helloworld.sys.ini|admin/language/en-GB/en-GB.com_helloworld.sys.ini]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Developing_a_Basic_Component#index.html|media/index.html]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Developing_a_Basic_Component#index.html|media/images/index.html]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.x:Developing_an_MVC_Component/Adding_decorations_to_the_backend#Adding_some_icons|media/images/tux-16x16.png]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.x:Developing_an_MVC_Component/Adding_decorations_to_the_backend#Adding_some_icons|media/images/tux-48x48.png]]&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span id=&amp;quot;helloworld.xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;tt&amp;gt;helloworld.xml&amp;lt;/tt&amp;gt;&lt;br /&gt;
&amp;lt;source lang=&amp;quot;xml&amp;quot; highlight=&amp;quot;13,44&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;?xml version=&amp;quot;1.0&amp;quot; encoding=&amp;quot;utf-8&amp;quot;?&amp;gt;&lt;br /&gt;
&amp;lt;extension type=&amp;quot;component&amp;quot; version=&amp;quot;3.0&amp;quot; method=&amp;quot;upgrade&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
	&amp;lt;name&amp;gt;COM_HELLOWORLD&amp;lt;/name&amp;gt;&lt;br /&gt;
	&amp;lt;!-- The following elements are optional and free of formatting constraints --&amp;gt;&lt;br /&gt;
	&amp;lt;creationDate&amp;gt;January 2018&amp;lt;/creationDate&amp;gt;&lt;br /&gt;
	&amp;lt;author&amp;gt;John Doe&amp;lt;/author&amp;gt;&lt;br /&gt;
	&amp;lt;authorEmail&amp;gt;john.doe@example.org&amp;lt;/authorEmail&amp;gt;&lt;br /&gt;
	&amp;lt;authorUrl&amp;gt;http://www.example.org&amp;lt;/authorUrl&amp;gt;&lt;br /&gt;
	&amp;lt;copyright&amp;gt;Copyright Info&amp;lt;/copyright&amp;gt;&lt;br /&gt;
	&amp;lt;license&amp;gt;License Info&amp;lt;/license&amp;gt;&lt;br /&gt;
	&amp;lt;!--  The version string is recorded in the components table --&amp;gt;&lt;br /&gt;
	&amp;lt;version&amp;gt;0.0.16&amp;lt;/version&amp;gt;&lt;br /&gt;
	&amp;lt;!-- The description is optional and defaults to the name --&amp;gt;&lt;br /&gt;
	&amp;lt;description&amp;gt;COM_HELLOWORLD_DESCRIPTION&amp;lt;/description&amp;gt;&lt;br /&gt;
&lt;br /&gt;
	&amp;lt;!-- Runs on install/uninstall/update; New in 2.5 --&amp;gt;&lt;br /&gt;
	&amp;lt;scriptfile&amp;gt;script.php&amp;lt;/scriptfile&amp;gt;&lt;br /&gt;
&lt;br /&gt;
	&amp;lt;install&amp;gt; &amp;lt;!-- Runs on install --&amp;gt;&lt;br /&gt;
		&amp;lt;sql&amp;gt;&lt;br /&gt;
			&amp;lt;file driver=&amp;quot;mysql&amp;quot; charset=&amp;quot;utf8&amp;quot;&amp;gt;sql/install.mysql.utf8.sql&amp;lt;/file&amp;gt;&lt;br /&gt;
		&amp;lt;/sql&amp;gt;&lt;br /&gt;
	&amp;lt;/install&amp;gt;&lt;br /&gt;
	&amp;lt;uninstall&amp;gt; &amp;lt;!-- Runs on uninstall --&amp;gt;&lt;br /&gt;
		&amp;lt;sql&amp;gt;&lt;br /&gt;
			&amp;lt;file driver=&amp;quot;mysql&amp;quot; charset=&amp;quot;utf8&amp;quot;&amp;gt;sql/uninstall.mysql.utf8.sql&amp;lt;/file&amp;gt;&lt;br /&gt;
		&amp;lt;/sql&amp;gt;&lt;br /&gt;
	&amp;lt;/uninstall&amp;gt;&lt;br /&gt;
	&amp;lt;update&amp;gt; &amp;lt;!-- Runs on update; New since J2.5 --&amp;gt;&lt;br /&gt;
		&amp;lt;schemas&amp;gt;&lt;br /&gt;
			&amp;lt;schemapath type=&amp;quot;mysql&amp;quot;&amp;gt;sql/updates/mysql&amp;lt;/schemapath&amp;gt;&lt;br /&gt;
		&amp;lt;/schemas&amp;gt;&lt;br /&gt;
	&amp;lt;/update&amp;gt;&lt;br /&gt;
&lt;br /&gt;
	&amp;lt;!-- Site Main File Copy Section --&amp;gt;&lt;br /&gt;
	&amp;lt;!-- Note the folder attribute: This attribute describes the folder&lt;br /&gt;
		to copy FROM in the package to install therefore files copied&lt;br /&gt;
		in this section are copied from /site/ in the package --&amp;gt;&lt;br /&gt;
	&amp;lt;files folder=&amp;quot;site&amp;quot;&amp;gt;&lt;br /&gt;
		&amp;lt;filename&amp;gt;index.html&amp;lt;/filename&amp;gt;&lt;br /&gt;
		&amp;lt;filename&amp;gt;helloworld.php&amp;lt;/filename&amp;gt;&lt;br /&gt;
		&amp;lt;filename&amp;gt;controller.php&amp;lt;/filename&amp;gt;&lt;br /&gt;
		&amp;lt;folder&amp;gt;controllers&amp;lt;/folder&amp;gt;&lt;br /&gt;
		&amp;lt;folder&amp;gt;views&amp;lt;/folder&amp;gt;&lt;br /&gt;
		&amp;lt;folder&amp;gt;models&amp;lt;/folder&amp;gt;&lt;br /&gt;
	&amp;lt;/files&amp;gt;&lt;br /&gt;
&lt;br /&gt;
        &amp;lt;languages folder=&amp;quot;site/language&amp;quot;&amp;gt;&lt;br /&gt;
		&amp;lt;language tag=&amp;quot;en-GB&amp;quot;&amp;gt;en-GB/en-GB.com_helloworld.ini&amp;lt;/language&amp;gt;&lt;br /&gt;
        &amp;lt;/languages&amp;gt;&lt;br /&gt;
&lt;br /&gt;
	&amp;lt;media destination=&amp;quot;com_helloworld&amp;quot; folder=&amp;quot;media&amp;quot;&amp;gt;&lt;br /&gt;
		&amp;lt;filename&amp;gt;index.html&amp;lt;/filename&amp;gt;&lt;br /&gt;
		&amp;lt;folder&amp;gt;images&amp;lt;/folder&amp;gt;&lt;br /&gt;
	&amp;lt;/media&amp;gt;&lt;br /&gt;
&lt;br /&gt;
	&amp;lt;administration&amp;gt;&lt;br /&gt;
		&amp;lt;!-- Administration Menu Section --&amp;gt;&lt;br /&gt;
		&amp;lt;menu link=&#039;index.php?option=com_helloworld&#039; img=&amp;quot;../media/com_helloworld/images/tux-16x16.png&amp;quot;&amp;gt;COM_HELLOWORLD_MENU&amp;lt;/menu&amp;gt;&lt;br /&gt;
		&amp;lt;!-- Administration Main File Copy Section --&amp;gt;&lt;br /&gt;
		&amp;lt;!-- Note the folder attribute: This attribute describes the folder&lt;br /&gt;
			to copy FROM in the package to install therefore files copied&lt;br /&gt;
			in this section are copied from /admin/ in the package --&amp;gt;&lt;br /&gt;
		&amp;lt;files folder=&amp;quot;admin&amp;quot;&amp;gt;&lt;br /&gt;
			&amp;lt;!-- Admin Main File Copy Section --&amp;gt;&lt;br /&gt;
			&amp;lt;filename&amp;gt;index.html&amp;lt;/filename&amp;gt;&lt;br /&gt;
			&amp;lt;filename&amp;gt;config.xml&amp;lt;/filename&amp;gt;&lt;br /&gt;
			&amp;lt;filename&amp;gt;helloworld.php&amp;lt;/filename&amp;gt;&lt;br /&gt;
			&amp;lt;filename&amp;gt;controller.php&amp;lt;/filename&amp;gt;&lt;br /&gt;
			&amp;lt;filename&amp;gt;access.xml&amp;lt;/filename&amp;gt;&lt;br /&gt;
			&amp;lt;!-- SQL files section --&amp;gt;&lt;br /&gt;
			&amp;lt;folder&amp;gt;sql&amp;lt;/folder&amp;gt;&lt;br /&gt;
			&amp;lt;!-- tables files section --&amp;gt;&lt;br /&gt;
			&amp;lt;folder&amp;gt;tables&amp;lt;/folder&amp;gt;&lt;br /&gt;
			&amp;lt;!-- models files section --&amp;gt;&lt;br /&gt;
			&amp;lt;folder&amp;gt;models&amp;lt;/folder&amp;gt;&lt;br /&gt;
			&amp;lt;!-- views files section --&amp;gt;&lt;br /&gt;
			&amp;lt;folder&amp;gt;views&amp;lt;/folder&amp;gt;&lt;br /&gt;
			&amp;lt;!-- controllers files section --&amp;gt;&lt;br /&gt;
			&amp;lt;folder&amp;gt;controllers&amp;lt;/folder&amp;gt;&lt;br /&gt;
			&amp;lt;!-- helpers files section --&amp;gt;&lt;br /&gt;
			&amp;lt;folder&amp;gt;helpers&amp;lt;/folder&amp;gt;&lt;br /&gt;
		&amp;lt;/files&amp;gt;&lt;br /&gt;
		&amp;lt;languages folder=&amp;quot;admin/language&amp;quot;&amp;gt;&lt;br /&gt;
        		&amp;lt;language tag=&amp;quot;en-GB&amp;quot;&amp;gt;en-GB/en-GB.com_helloworld.ini&amp;lt;/language&amp;gt;&lt;br /&gt;
                        &amp;lt;language tag=&amp;quot;en-GB&amp;quot;&amp;gt;en-GB/en-GB.com_helloworld.sys.ini&amp;lt;/language&amp;gt;&lt;br /&gt;
		&amp;lt;/languages&amp;gt;&lt;br /&gt;
	&amp;lt;/administration&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/extension&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;translate&amp;gt;&lt;br /&gt;
== Contributors == &amp;lt;!--T:58--&amp;gt;&lt;br /&gt;
&amp;lt;/translate&amp;gt;&lt;br /&gt;
*[[User:Robbiej|Robbie Jackson]]&lt;br /&gt;
&lt;br /&gt;
{{-}}&lt;br /&gt;
&amp;lt;div class=&amp;quot;row&amp;quot;&amp;gt; &lt;br /&gt;
&amp;lt;div class=&amp;quot;large-6 columns&amp;quot;&amp;gt;{{Basic button|&amp;lt;translate&amp;gt;&amp;lt;!--T:4--&amp;gt; S:MyLanguage/J3.x:Developing_an_MVC_Component/Adding_an_install-uninstall-update_script_file|Prev: Adding an install-uninstall-update script file&amp;lt;/translate&amp;gt;|class=expand success}}&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;div class=&amp;quot;large-6 columns&amp;quot;&amp;gt;{{Basic button|&amp;lt;translate&amp;gt;&amp;lt;!--T:5--&amp;gt; S:MyLanguage/J3.x:Developing_an_MVC_Component/Adding an Image|Next: Adding an image&amp;lt;/translate&amp;gt;|class=expand}}&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;noinclude&amp;gt;&lt;br /&gt;
[[Category:Joomla! 3.x{{#translation:}}]]&lt;br /&gt;
[[Category:Joomla! 3.0{{#translation:}}]]&lt;br /&gt;
[[Category:Joomla! 3.1{{#translation:}}]]&lt;br /&gt;
[[Category:Joomla! 3.2{{#translation:}}]]&lt;br /&gt;
[[Category:Joomla! 3.3{{#translation:}}]]&lt;br /&gt;
[[Category:Joomla! 3.4{{#translation:}}]]&lt;br /&gt;
[[Category:Beginner Development{{#translation:}}]]&lt;br /&gt;
[[Category:Component Development{{#translation:}}]]&lt;br /&gt;
[[Category:Tutorials{{#translation:}}]]&lt;br /&gt;
[[Category:Tutorials in a Series{{#translation:}}]]&lt;br /&gt;
&amp;lt;/noinclude&amp;gt;&lt;/div&gt;</summary>
		<author><name>Stan31337</name></author>
	</entry>
	<entry>
		<id>https://docs.sandbox.joomla.org/index.php?title=J3.x:Developing_an_MVC_Component/Adding_a_front-end_form&amp;diff=589124</id>
		<title>J3.x:Developing an MVC Component/Adding a front-end form</title>
		<link rel="alternate" type="text/html" href="https://docs.sandbox.joomla.org/index.php?title=J3.x:Developing_an_MVC_Component/Adding_a_front-end_form&amp;diff=589124"/>
		<updated>2019-01-30T08:50:45Z</updated>

		<summary type="html">&lt;p&gt;Stan31337: Base select statement also changed, now it has &amp;#039;created&amp;#039; field&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;noinclude&amp;gt;&amp;lt;languages /&amp;gt;&amp;lt;/noinclude&amp;gt;&lt;br /&gt;
{{:J3.1:Developing an MVC Component/&amp;lt;translate&amp;gt;&amp;lt;!--T:1--&amp;gt;&lt;br /&gt;
en&amp;lt;/translate&amp;gt;}}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;translate&amp;gt;&amp;lt;!--T:3--&amp;gt; This tutorial is part of the [[S:MyLanguage/J3.x:Developing_an_MVC_Component/Introduction|Developing a MVC Component for Joomla! 3.x]] tutorial. You are encouraged to read the previous parts of the tutorial before reading this.&amp;lt;/translate&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;translate&amp;gt;&lt;br /&gt;
== Introduction == &amp;lt;!--T:6--&amp;gt;&lt;br /&gt;
&amp;lt;/translate&amp;gt;&lt;br /&gt;
&amp;lt;translate&amp;gt;&amp;lt;!--T:7--&amp;gt; In this step we add a form to the site front end to allow users to add a new Helloworld record. You could adapt the code in this step to provide a range of front-end data entry functionality, from, eg&amp;lt;/translate&amp;gt;&lt;br /&gt;
* &amp;lt;translate&amp;gt;&amp;lt;!--T:8--&amp;gt; a registration form to allow visitors to the site to express interest, to,&amp;lt;/translate&amp;gt; &lt;br /&gt;
* &amp;lt;translate&amp;gt;&amp;lt;!--T:9--&amp;gt; a facility to allow suppliers to maintain the data in certain tables, but without giving them access to the back end administration functionality&amp;lt;/translate&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;translate&amp;gt;&amp;lt;!--T:63--&amp;gt; There are two videos associated with this step, covering the [https://youtu.be/2NStYpB5JQM overall approach] and [https://youtu.be/t3IxuWQfa6E other topics] raised here.&amp;lt;/translate&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*&amp;lt;translate&amp;gt;&amp;lt;!--T:60--&amp;gt; Overall approach&amp;lt;/translate&amp;gt;&lt;br /&gt;
{{#widget:YouTube|id=2NStYpB5JQM}}&lt;br /&gt;
*&amp;lt;translate&amp;gt;&amp;lt;!--T:61--&amp;gt; Other topics&amp;lt;/translate&amp;gt;&lt;br /&gt;
{{#widget:YouTube|id=t3IxuWQfa6E}}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;translate&amp;gt;&lt;br /&gt;
== Functionality == &amp;lt;!--T:10--&amp;gt;&lt;br /&gt;
&amp;lt;/translate&amp;gt;&lt;br /&gt;
&amp;lt;translate&amp;gt;&amp;lt;!--T:11--&amp;gt; In this step we will build the following functionality:&amp;lt;/translate&amp;gt;&lt;br /&gt;
* &amp;lt;translate&amp;gt;&amp;lt;!--T:12--&amp;gt; a front-end form that allows someone to enter a new helloworld record, together with Save and Cancel buttons.&amp;lt;/translate&amp;gt;&lt;br /&gt;
* &amp;lt;translate&amp;gt;&amp;lt;!--T:13--&amp;gt; additional fields in the helloworld database table to capture the user who entered the record, and the creation date/time&amp;lt;/translate&amp;gt;&lt;br /&gt;
* &amp;lt;translate&amp;gt;&amp;lt;!--T:14--&amp;gt; validation of the data entered into the fields, including removing dangerous items such as html tags&amp;lt;/translate&amp;gt;&lt;br /&gt;
* &amp;lt;translate&amp;gt;&amp;lt;!--T:15--&amp;gt; access control on the form, controlling who can add a new record&amp;lt;/translate&amp;gt;&lt;br /&gt;
* &amp;lt;translate&amp;gt;&amp;lt;!--T:16--&amp;gt; an email to an administrator, to indicate that someone has entered a new record (and we&#039;ll include a field on the form where the user can include some text which just goes into the email)&amp;lt;/translate&amp;gt;&lt;br /&gt;
* &amp;lt;translate&amp;gt;&amp;lt;!--T:17--&amp;gt; a captcha on the form&amp;lt;/translate&amp;gt;&lt;br /&gt;
* &amp;lt;translate&amp;gt;&amp;lt;!--T:18--&amp;gt; a front-end menu item which points to the form (ie how users get access to the form)&amp;lt;/translate&amp;gt;&lt;br /&gt;
* &amp;lt;translate&amp;gt;&amp;lt;!--T:19--&amp;gt; update to the admin helloworlds view to include the author and creation date in the display.&amp;lt;/translate&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;translate&amp;gt;&lt;br /&gt;
== Approach == &amp;lt;!--T:20--&amp;gt;&lt;br /&gt;
&amp;lt;/translate&amp;gt;&lt;br /&gt;
&amp;lt;translate&amp;gt;&amp;lt;!--T:21--&amp;gt; Providing a form on the site front end is pretty much the same as on the admin back end, so much of what is developed in this step reflects what was done in the step [[S:MyLanguage/J3.x:Developing an MVC Component/Adding backend actions|Adding backend actions]], and in particular the Edit form for helloworld messages.&amp;lt;/translate&amp;gt; &lt;br /&gt;
&amp;lt;translate&amp;gt;&lt;br /&gt;
&amp;lt;!--T:22--&amp;gt;&lt;br /&gt;
For this form we&#039;ll use (all in the site part)&lt;br /&gt;
* the same main helloworld controller (controller.php)&lt;br /&gt;
* a new view – which we&#039;ll call &amp;quot;form&amp;quot;&lt;br /&gt;
* a new layout, associated with the form view, which we&#039;ll call &amp;quot;edit&amp;quot; (like the admin layout file)&lt;br /&gt;
* a new model – which we&#039;ll call &amp;quot;form&amp;quot; also, to align with the view&lt;br /&gt;
* an xml file for the form, which we&#039;ll put in add-form.xml in the model&amp;lt;/translate&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;translate&amp;gt;&amp;lt;!--T:23--&amp;gt; In addition we&#039;ll need to handle the HTTP POST requests arising from the user pressing the Save and Cancel buttons, and we&#039;ll do this in:&amp;lt;/translate&amp;gt;&lt;br /&gt;
&amp;lt;translate&amp;gt;&amp;lt;!--T:24--&amp;gt;&lt;br /&gt;
* a new helloworld controller in the controllers directory (handling Save and Cancel)&lt;br /&gt;
* the same form.php model as above (handling Save)&amp;lt;/translate&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;translate&amp;gt;&amp;lt;!--T:25--&amp;gt; Upon completion of Save/Cancel we&#039;ll redirect back to the same form.&amp;lt;/translate&amp;gt;&lt;br /&gt;
&amp;lt;translate&amp;gt;&lt;br /&gt;
&amp;lt;!--T:26--&amp;gt;&lt;br /&gt;
As for the admin case, we&#039;ll consider our classes extending some of the controller and model classes which are richer in functionality that the simple legacy ones&amp;lt;/translate&amp;gt;&lt;br /&gt;
&amp;lt;translate&amp;gt;&amp;lt;!--T:27--&amp;gt;&lt;br /&gt;
* the model will extend JModelAdmin (which supports forms, as well as saving records to the database) - even though it&#039;s called JModelAdmin it&#039;s still available within the site part&lt;br /&gt;
* the controller handling the POST will extend JControllerForm (which includes the cancel() and save() methods).&amp;lt;/translate&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;translate&amp;gt;&amp;lt;!--T:28--&amp;gt; Some of the other aspects in this step will involve using the techniques covered in earlier steps, namely [[S:MyLanguage/J3.x:Developing an MVC Component/Adding a menu type to the site part|Adding a menu type to the site part]], [[S:MyLanguage/J3.x:Developing an MVC Component/Adding verifications|Adding verifications]], [[S:MyLanguage/J3.x:Developing an MVC Component/Adding configuration|Adding configuration]] and [[S:MyLanguage/J3.x:Developing an MVC Component/Adding ACL|Adding ACL]].&amp;lt;/translate&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;translate&amp;gt;&lt;br /&gt;
==Updating the Database== &amp;lt;!--T:29--&amp;gt;&lt;br /&gt;
&amp;lt;/translate&amp;gt;&lt;br /&gt;
&amp;lt;translate&amp;gt;&amp;lt;!--T:30--&amp;gt; We need to add the two new fields to our install and update scripts. To record who added the new helloworld greeting we&#039;ll store the user&#039;s userid, and this will be zero if the user is not logged on.&amp;lt;/translate&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;span id=&amp;quot;admin/sql/install.mysql.utf8.sql&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;tt&amp;gt;admin/sql/install.mysql.utf8.sql&amp;lt;/tt&amp;gt;&lt;br /&gt;
&amp;lt;source lang=&amp;quot;sql&amp;quot; highlight=&amp;quot;6,7&amp;quot;&amp;gt;&lt;br /&gt;
DROP TABLE IF EXISTS `#__helloworld`;&lt;br /&gt;
&lt;br /&gt;
CREATE TABLE `#__helloworld` (&lt;br /&gt;
	`id`       INT(11)     NOT NULL AUTO_INCREMENT,&lt;br /&gt;
	`asset_id` INT(10)     NOT NULL DEFAULT &#039;0&#039;,&lt;br /&gt;
	`created`  DATETIME    NOT NULL DEFAULT &#039;0000-00-00 00:00:00&#039;,&lt;br /&gt;
	`created_by`  INT(10) UNSIGNED NOT NULL DEFAULT &#039;0&#039;,&lt;br /&gt;
	`greeting` VARCHAR(25) NOT NULL,&lt;br /&gt;
	`published` tinyint(4) NOT NULL DEFAULT &#039;1&#039;,&lt;br /&gt;
	`catid`	    int(11)    NOT NULL DEFAULT &#039;0&#039;,&lt;br /&gt;
	`params`   VARCHAR(1024) NOT NULL DEFAULT &#039;&#039;,&lt;br /&gt;
	PRIMARY KEY (`id`)&lt;br /&gt;
)&lt;br /&gt;
	ENGINE =MyISAM&lt;br /&gt;
	AUTO_INCREMENT =0&lt;br /&gt;
	DEFAULT CHARSET =utf8;&lt;br /&gt;
&lt;br /&gt;
INSERT INTO `#__helloworld` (`greeting`) VALUES&lt;br /&gt;
(&#039;Hello World!&#039;),&lt;br /&gt;
(&#039;Goodbye World!&#039;);&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span id=&amp;quot;admin/sql/updates/mysql/0.0.16.sql&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;tt&amp;gt;/admin/sql/updates/mysql/0.0.16.sql&amp;lt;/tt&amp;gt;&lt;br /&gt;
&amp;lt;source lang=&amp;quot;sql&amp;quot;&amp;gt;&lt;br /&gt;
ALTER TABLE`#__helloworld` ADD COLUMN `created` DATETIME NOT NULL DEFAULT &#039;0000-00-00 00:00:00&#039; AFTER `asset_id`;&lt;br /&gt;
ALTER TABLE`#__helloworld` ADD COLUMN `created_by` INT(10) UNSIGNED NOT NULL DEFAULT &#039;0&#039; AFTER `created`;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;translate&amp;gt;&lt;br /&gt;
==Adding a menu item== &amp;lt;!--T:31--&amp;gt;&lt;br /&gt;
&amp;lt;/translate&amp;gt;&lt;br /&gt;
&amp;lt;translate&amp;gt;&amp;lt;!--T:32--&amp;gt; To enable a menu item to point to the form, we need to put an xml file into the associated layout directory. Extend your directory structure (remembering to include the index.html file in each new subdirectory which you create) and put the following into&amp;lt;/translate&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span id=&amp;quot;site/views/form/tmpl/edit.xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;tt&amp;gt;site/views/form/tmpl/edit.xml&amp;lt;/tt&amp;gt;&lt;br /&gt;
&amp;lt;source lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;?xml version=&amp;quot;1.0&amp;quot; encoding=&amp;quot;utf-8&amp;quot;?&amp;gt;&lt;br /&gt;
&amp;lt;metadata&amp;gt;&lt;br /&gt;
	&amp;lt;layout title=&amp;quot;COM_HELLOWORLD_ADD_VIEW_TITLE&amp;quot;&amp;gt;&lt;br /&gt;
		&amp;lt;message&amp;gt;COM_HELLOWORLD_ADD_VIEW_DESC&amp;lt;/message&amp;gt;&lt;br /&gt;
	&amp;lt;/layout&amp;gt;&lt;br /&gt;
&amp;lt;/metadata&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&amp;lt;/span&amp;gt;&lt;br /&gt;
&amp;lt;translate&amp;gt;&amp;lt;!--T:33--&amp;gt; Once you have the new code installed you&#039;ll have to go into the admin back-end and create a menu item to point to the new front-end form.&amp;lt;/translate&amp;gt;&lt;br /&gt;
&amp;lt;translate&amp;gt;&lt;br /&gt;
==Displaying the new form view== &amp;lt;!--T:34--&amp;gt;&lt;br /&gt;
&amp;lt;/translate&amp;gt;&lt;br /&gt;
&amp;lt;translate&amp;gt;&amp;lt;!--T:35--&amp;gt; Create a new forms subdirectory under the site models directory, and add the definition of the form into&amp;lt;/translate&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span id=&amp;quot;site/models/forms/add-form.xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;tt&amp;gt;site/models/forms/add-form.xml&amp;lt;/tt&amp;gt;&lt;br /&gt;
&amp;lt;source lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;?xml version=&amp;quot;1.0&amp;quot; encoding=&amp;quot;utf-8&amp;quot;?&amp;gt;&lt;br /&gt;
&amp;lt;form&lt;br /&gt;
    addrulepath=&amp;quot;/administrator/components/com_helloworld/models/rules&amp;quot;&lt;br /&gt;
    &amp;gt;&lt;br /&gt;
    &amp;lt;fieldset&lt;br /&gt;
				name=&amp;quot;details&amp;quot;&lt;br /&gt;
				label=&amp;quot;COM_HELLOWORLD_HELLOWORLD_DETAILS&amp;quot;&lt;br /&gt;
	&amp;gt;&lt;br /&gt;
		&amp;lt;field&lt;br /&gt;
				name=&amp;quot;id&amp;quot;&lt;br /&gt;
				type=&amp;quot;hidden&amp;quot;&lt;br /&gt;
				/&amp;gt;&lt;br /&gt;
		&amp;lt;field&lt;br /&gt;
				name=&amp;quot;greeting&amp;quot;&lt;br /&gt;
				type=&amp;quot;text&amp;quot;&lt;br /&gt;
				label=&amp;quot;COM_HELLOWORLD_HELLOWORLD_GREETING_LABEL&amp;quot;&lt;br /&gt;
				description=&amp;quot;COM_HELLOWORLD_HELLOWORLD_GREETING_DESC&amp;quot;&lt;br /&gt;
				size=&amp;quot;40&amp;quot;&lt;br /&gt;
				class=&amp;quot;inputbox&amp;quot;&lt;br /&gt;
				validate=&amp;quot;greeting&amp;quot;&lt;br /&gt;
				required=&amp;quot;true&amp;quot;&lt;br /&gt;
                hint=&amp;quot;COM_HELLOWORLD_HELLOWORLD_GREETING_HINT&amp;quot;&lt;br /&gt;
				default=&amp;quot;&amp;quot;&lt;br /&gt;
				/&amp;gt;&lt;br /&gt;
        &amp;lt;field&lt;br /&gt;
				name=&amp;quot;catid&amp;quot;&lt;br /&gt;
				type=&amp;quot;category&amp;quot;&lt;br /&gt;
				extension=&amp;quot;com_helloworld&amp;quot;&lt;br /&gt;
				class=&amp;quot;inputbox&amp;quot;&lt;br /&gt;
				default=&amp;quot;&amp;quot;&lt;br /&gt;
				label=&amp;quot;COM_HELLOWORLD_HELLOWORLD_FIELD_CATID_LABEL&amp;quot;&lt;br /&gt;
				description=&amp;quot;COM_HELLOWORLD_HELLOWORLD_FIELD_CATID_DESC&amp;quot;&lt;br /&gt;
				required=&amp;quot;true&amp;quot;&lt;br /&gt;
                &amp;gt;&lt;br /&gt;
			&amp;lt;option value=&amp;quot;0&amp;quot;&amp;gt;JOPTION_SELECT_CATEGORY&amp;lt;/option&amp;gt;&lt;br /&gt;
		&amp;lt;/field&amp;gt;&lt;br /&gt;
        &amp;lt;field&lt;br /&gt;
                name=&amp;quot;message&amp;quot;&lt;br /&gt;
                type=&amp;quot;textarea&amp;quot;&lt;br /&gt;
                rows=&amp;quot;5&amp;quot;&lt;br /&gt;
                cols=&amp;quot;80&amp;quot;&lt;br /&gt;
				label=&amp;quot;COM_HELLOWORLD_HELLOWORLD_MESSAGE_LABEL&amp;quot;&lt;br /&gt;
				description=&amp;quot;COM_HELLOWORLD_HELLOWORLD_MESSAGE_DESC&amp;quot;&lt;br /&gt;
                hint=&amp;quot;COM_HELLOWORLD_HELLOWORLD_MESSAGE_HINT&amp;quot;&lt;br /&gt;
				required=&amp;quot;true&amp;quot;&lt;br /&gt;
                &amp;gt;&lt;br /&gt;
        &amp;lt;/field&amp;gt;&lt;br /&gt;
        &amp;lt;field&lt;br /&gt;
				name=&amp;quot;captcha&amp;quot;&lt;br /&gt;
				type=&amp;quot;captcha&amp;quot;&lt;br /&gt;
				label=&amp;quot;COM_HELLOWORLD_HELLOWORLD_FIELD_CAPTCHA_LABEL&amp;quot;&lt;br /&gt;
				description=&amp;quot;COM_HELLOWORLD_HELLOWORLD_FIELD_CAPTCHA_DESC&amp;quot;&lt;br /&gt;
                validate=&amp;quot;captcha&amp;quot;&lt;br /&gt;
                &amp;gt;&lt;br /&gt;
		&amp;lt;/field&amp;gt;&lt;br /&gt;
        &amp;lt;fields name=&amp;quot;params&amp;quot;&amp;gt;&lt;br /&gt;
            &amp;lt;field&lt;br /&gt;
                    name=&amp;quot;show_category&amp;quot;&lt;br /&gt;
                    type=&amp;quot;list&amp;quot;&lt;br /&gt;
                    label=&amp;quot;COM_HELLOWORLD_HELLOWORLD_FIELD_SHOW_CATEGORY_LABEL&amp;quot;&lt;br /&gt;
                    description=&amp;quot;COM_HELLOWORLD_HELLOWORLD_FIELD_SHOW_CATEGORY_DESC&amp;quot;&lt;br /&gt;
                    default=&amp;quot;&amp;quot;&lt;br /&gt;
                    useglobal=&amp;quot;true&amp;quot;&lt;br /&gt;
            &amp;gt;&lt;br /&gt;
                &amp;lt;option value=&amp;quot;0&amp;quot;&amp;gt;JHIDE&amp;lt;/option&amp;gt;&lt;br /&gt;
                &amp;lt;option value=&amp;quot;1&amp;quot;&amp;gt;JSHOW&amp;lt;/option&amp;gt;&lt;br /&gt;
            &amp;lt;/field&amp;gt;&lt;br /&gt;
        &amp;lt;/fields&amp;gt;&lt;br /&gt;
    &amp;lt;/fieldset&amp;gt;&lt;br /&gt;
&amp;lt;/form&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;translate&amp;gt;&amp;lt;!--T:36--&amp;gt; The above form includes a captcha. To get this working you need to install a captcha plugin from the selection available for Joomla. You can also use the Captcha - ReCaptcha plugin which comes with Joomla, but before using this you have to get recaptcha keys for your domain (eg localhost) from Google, and then configure the plugin with the keys which Google supplies (ie Extensions / Plugins, and then click on the plugin to edit its options - if you edit the plugin it tells you exactly what you have to do). Once the plugins are live, you can select in the Global Configuration the captcha which you want to be the system default, and also in the Helloworld Configuration select which captcha to use for this helloworld form.&amp;lt;/translate&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;translate&amp;gt;&amp;lt;!--T:37--&amp;gt; The existing controller (in controller.php) will not need to be changed, but we&#039;ll need to define a new view, layout and model for the new form.&amp;lt;/translate&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;span id=&amp;quot;site/views/form/view.html.php&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;tt&amp;gt;site/views/form/view.html.php&amp;lt;/tt&amp;gt;&lt;br /&gt;
&amp;lt;source lang=&amp;quot;php&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;?php&lt;br /&gt;
/**&lt;br /&gt;
 * @package     Joomla.Administrator&lt;br /&gt;
 * @subpackage  com_helloworld&lt;br /&gt;
 *&lt;br /&gt;
 * @copyright   Copyright (C) 2005 - 2018 Open Source Matters, Inc. All rights reserved.&lt;br /&gt;
 * @license     GNU General Public License version 2 or later; see LICENSE.txt&lt;br /&gt;
 */&lt;br /&gt;
&lt;br /&gt;
// No direct access to this file&lt;br /&gt;
defined(&#039;_JEXEC&#039;) or die(&#039;Restricted access&#039;);&lt;br /&gt;
&lt;br /&gt;
/**&lt;br /&gt;
 * HelloWorld View&lt;br /&gt;
 * This is the site view presenting the user with the ability to add a new Helloworld record&lt;br /&gt;
 * &lt;br /&gt;
 */&lt;br /&gt;
class HelloWorldViewForm extends JViewLegacy&lt;br /&gt;
{&lt;br /&gt;
&lt;br /&gt;
	protected $form = null;&lt;br /&gt;
	protected $canDo;&lt;br /&gt;
&lt;br /&gt;
	/**&lt;br /&gt;
	 * Display the Hello World view&lt;br /&gt;
	 *&lt;br /&gt;
	 * @param   string  $tpl  The name of the layout file to parse.&lt;br /&gt;
	 *&lt;br /&gt;
	 * @return  void&lt;br /&gt;
	 */&lt;br /&gt;
	public function display($tpl = null)&lt;br /&gt;
	{&lt;br /&gt;
		// Get the form to display&lt;br /&gt;
		$this-&amp;gt;form = $this-&amp;gt;get(&#039;Form&#039;);&lt;br /&gt;
		// Get the javascript script file for client-side validation&lt;br /&gt;
		$this-&amp;gt;script = $this-&amp;gt;get(&#039;Script&#039;); &lt;br /&gt;
&lt;br /&gt;
		// Check that the user has permissions to create a new helloworld record&lt;br /&gt;
		$this-&amp;gt;canDo = JHelperContent::getActions(&#039;com_helloworld&#039;);&lt;br /&gt;
		if (!($this-&amp;gt;canDo-&amp;gt;get(&#039;core.create&#039;))) &lt;br /&gt;
		{&lt;br /&gt;
			$app = JFactory::getApplication(); &lt;br /&gt;
			$app-&amp;gt;enqueueMessage(JText::_(&#039;JERROR_ALERTNOAUTHOR&#039;), &#039;error&#039;);&lt;br /&gt;
			$app-&amp;gt;setHeader(&#039;status&#039;, 403, true);&lt;br /&gt;
			return;&lt;br /&gt;
		}&lt;br /&gt;
        &lt;br /&gt;
		// Check for errors.&lt;br /&gt;
		if (count($errors = $this-&amp;gt;get(&#039;Errors&#039;)))&lt;br /&gt;
		{&lt;br /&gt;
			throw new Exception(implode(&amp;quot;\n&amp;quot;, $errors), 500);&lt;br /&gt;
		}&lt;br /&gt;
&lt;br /&gt;
		// Call the parent display to display the layout file&lt;br /&gt;
		parent::display($tpl);&lt;br /&gt;
&lt;br /&gt;
		// Set properties of the html document&lt;br /&gt;
		$this-&amp;gt;setDocument();&lt;br /&gt;
	}&lt;br /&gt;
&lt;br /&gt;
	/**&lt;br /&gt;
	 * Method to set up the html document properties&lt;br /&gt;
	 *&lt;br /&gt;
	 * @return void&lt;br /&gt;
	 */&lt;br /&gt;
	protected function setDocument() &lt;br /&gt;
	{&lt;br /&gt;
		$document = JFactory::getDocument();&lt;br /&gt;
		$document-&amp;gt;setTitle(JText::_(&#039;COM_HELLOWORLD_HELLOWORLD_CREATING&#039;));&lt;br /&gt;
		$document-&amp;gt;addScript(JURI::root() . $this-&amp;gt;script);&lt;br /&gt;
		$document-&amp;gt;addScript(JURI::root() . &amp;quot;/administrator/components/com_helloworld&amp;quot;&lt;br /&gt;
		                                  . &amp;quot;/views/helloworld/submitbutton.js&amp;quot;);&lt;br /&gt;
		JText::script(&#039;COM_HELLOWORLD_HELLOWORLD_ERROR_UNACCEPTABLE&#039;);&lt;br /&gt;
	}&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&amp;lt;/span&amp;gt;&lt;br /&gt;
&amp;lt;translate&amp;gt;&lt;br /&gt;
&amp;lt;!--T:38--&amp;gt;&lt;br /&gt;
And into the layout file:&amp;lt;/translate&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span id=&amp;quot;site/views/form/tmpl/edit.php&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;tt&amp;gt;site/views/form/tmpl/edit.php&amp;lt;/tt&amp;gt;&lt;br /&gt;
&amp;lt;source lang=&amp;quot;php&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;?php&lt;br /&gt;
/**&lt;br /&gt;
 * @package     Joomla.Administrator&lt;br /&gt;
 * @subpackage  com_helloworld&lt;br /&gt;
 *&lt;br /&gt;
 * @copyright   Copyright (C) 2005 - 2018 Open Source Matters, Inc. All rights reserved.&lt;br /&gt;
 * @license     GNU General Public License version 2 or later; see LICENSE.txt&lt;br /&gt;
 *&lt;br /&gt;
 * This layout file is for displaying the front end form for capturing a new helloworld message&lt;br /&gt;
 *&lt;br /&gt;
 */&lt;br /&gt;
&lt;br /&gt;
// No direct access&lt;br /&gt;
defined(&#039;_JEXEC&#039;) or die(&#039;Restricted access&#039;);&lt;br /&gt;
JHtml::_(&#039;behavior.formvalidator&#039;);&lt;br /&gt;
&lt;br /&gt;
?&amp;gt;&lt;br /&gt;
&amp;lt;form action=&amp;quot;&amp;lt;?php echo JRoute::_(&#039;index.php?option=com_helloworld&amp;amp;view=form&amp;amp;layout=edit&#039;); ?&amp;gt;&amp;quot;&lt;br /&gt;
    method=&amp;quot;post&amp;quot; name=&amp;quot;adminForm&amp;quot; id=&amp;quot;adminForm&amp;quot; class=&amp;quot;form-validate&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
	&amp;lt;div class=&amp;quot;form-horizontal&amp;quot;&amp;gt;&lt;br /&gt;
		&amp;lt;fieldset class=&amp;quot;adminform&amp;quot;&amp;gt;&lt;br /&gt;
			&amp;lt;legend&amp;gt;&amp;lt;?php echo JText::_(&#039;COM_HELLOWORLD_LEGEND_DETAILS&#039;) ?&amp;gt;&amp;lt;/legend&amp;gt;&lt;br /&gt;
			&amp;lt;div class=&amp;quot;row-fluid&amp;quot;&amp;gt;&lt;br /&gt;
				&amp;lt;div class=&amp;quot;span6&amp;quot;&amp;gt;&lt;br /&gt;
					&amp;lt;?php echo $this-&amp;gt;form-&amp;gt;renderFieldset(&#039;details&#039;);  ?&amp;gt;&lt;br /&gt;
				&amp;lt;/div&amp;gt;&lt;br /&gt;
			&amp;lt;/div&amp;gt;&lt;br /&gt;
		&amp;lt;/fieldset&amp;gt;&lt;br /&gt;
	&amp;lt;/div&amp;gt;&lt;br /&gt;
    &lt;br /&gt;
	&amp;lt;div class=&amp;quot;btn-toolbar&amp;quot;&amp;gt;&lt;br /&gt;
		&amp;lt;div class=&amp;quot;btn-group&amp;quot;&amp;gt;&lt;br /&gt;
			&amp;lt;button type=&amp;quot;button&amp;quot; class=&amp;quot;btn btn-primary&amp;quot; onclick=&amp;quot;Joomla.submitbutton(&#039;helloworld.save&#039;)&amp;quot;&amp;gt;&lt;br /&gt;
				&amp;lt;span class=&amp;quot;icon-ok&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;&amp;lt;?php echo JText::_(&#039;JSAVE&#039;) ?&amp;gt;&lt;br /&gt;
			&amp;lt;/button&amp;gt;&lt;br /&gt;
		&amp;lt;/div&amp;gt;&lt;br /&gt;
		&amp;lt;div class=&amp;quot;btn-group&amp;quot;&amp;gt;&lt;br /&gt;
			&amp;lt;button type=&amp;quot;button&amp;quot; class=&amp;quot;btn&amp;quot; onclick=&amp;quot;Joomla.submitbutton(&#039;helloworld.cancel&#039;)&amp;quot;&amp;gt;&lt;br /&gt;
				&amp;lt;span class=&amp;quot;icon-cancel&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;&amp;lt;?php echo JText::_(&#039;JCANCEL&#039;) ?&amp;gt;&lt;br /&gt;
			&amp;lt;/button&amp;gt;&lt;br /&gt;
		&amp;lt;/div&amp;gt;&lt;br /&gt;
	&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
	&amp;lt;input type=&amp;quot;hidden&amp;quot; name=&amp;quot;task&amp;quot; /&amp;gt;&lt;br /&gt;
	&amp;lt;?php echo JHtml::_(&#039;form.token&#039;); ?&amp;gt;&lt;br /&gt;
&amp;lt;/form&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;translate&amp;gt;&amp;lt;!--T:39--&amp;gt; All the above is similar to the admin functionality, except there are certain fields we don&#039;t want to allow the front-end user to see (eg the permissions) and instead of the standard Joomla admin buttons (and toolbar) we use a Save button and a Cancel button styled using the Bootstrap CSS, and which result in the &amp;lt;tt&amp;gt;task&amp;lt;/tt&amp;gt; parameter being set to &amp;lt;tt&amp;gt;helloworld.save&amp;lt;/tt&amp;gt; or &amp;lt;tt&amp;gt;helloworld.cancel&amp;lt;/tt&amp;gt;.&amp;lt;/translate&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;translate&amp;gt;&amp;lt;!--T:40--&amp;gt; Our new model is almost exactly the same as the admin equivalent; we just have to point to our new add-form instead.&amp;lt;/translate&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span id=&amp;quot;site/models/form.php&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;tt&amp;gt;site/models/form.php&amp;lt;/tt&amp;gt;&lt;br /&gt;
&amp;lt;source lang=&amp;quot;php&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;?php&lt;br /&gt;
/**&lt;br /&gt;
 * @package     Joomla.Administrator&lt;br /&gt;
 * @subpackage  com_helloworld&lt;br /&gt;
 *&lt;br /&gt;
 * @copyright   Copyright (C) 2005 - 2018 Open Source Matters, Inc. All rights reserved.&lt;br /&gt;
 * @license     GNU General Public License version 2 or later; see LICENSE.txt&lt;br /&gt;
 */&lt;br /&gt;
&lt;br /&gt;
// No direct access to this file&lt;br /&gt;
defined(&#039;_JEXEC&#039;) or die(&#039;Restricted access&#039;);&lt;br /&gt;
&lt;br /&gt;
/**&lt;br /&gt;
 * HelloWorld Model&lt;br /&gt;
 *&lt;br /&gt;
 * @since  0.0.1&lt;br /&gt;
 */&lt;br /&gt;
class HelloWorldModelForm extends JModelAdmin&lt;br /&gt;
{&lt;br /&gt;
&lt;br /&gt;
	/**&lt;br /&gt;
	 * Method to get a table object, load it if necessary.&lt;br /&gt;
	 *&lt;br /&gt;
	 * @param   string  $type    The table name. Optional.&lt;br /&gt;
	 * @param   string  $prefix  The class prefix. Optional.&lt;br /&gt;
	 * @param   array   $config  Configuration array for model. Optional.&lt;br /&gt;
	 *&lt;br /&gt;
	 * @return  JTable  A JTable object&lt;br /&gt;
	 *&lt;br /&gt;
	 * @since   1.6&lt;br /&gt;
	 */&lt;br /&gt;
	public function getTable($type = &#039;HelloWorld&#039;, $prefix = &#039;HelloWorldTable&#039;, $config = array())&lt;br /&gt;
	{&lt;br /&gt;
		return JTable::getInstance($type, $prefix, $config);&lt;br /&gt;
	}&lt;br /&gt;
&lt;br /&gt;
    /**&lt;br /&gt;
	 * Method to get the record form.&lt;br /&gt;
	 *&lt;br /&gt;
	 * @param   array    $data      Data for the form.&lt;br /&gt;
	 * @param   boolean  $loadData  True if the form is to load its own data (default case), false if not.&lt;br /&gt;
	 *&lt;br /&gt;
	 * @return  mixed    A JForm object on success, false on failure&lt;br /&gt;
	 *&lt;br /&gt;
	 * @since   1.6&lt;br /&gt;
	 */&lt;br /&gt;
	public function getForm($data = array(), $loadData = true)&lt;br /&gt;
	{&lt;br /&gt;
		// Get the form.&lt;br /&gt;
		$form = $this-&amp;gt;loadForm(&lt;br /&gt;
			&#039;com_helloworld.form&#039;,&lt;br /&gt;
			&#039;add-form&#039;,&lt;br /&gt;
			array(&lt;br /&gt;
				&#039;control&#039; =&amp;gt; &#039;jform&#039;,&lt;br /&gt;
				&#039;load_data&#039; =&amp;gt; $loadData&lt;br /&gt;
			)&lt;br /&gt;
		);&lt;br /&gt;
&lt;br /&gt;
		if (empty($form))&lt;br /&gt;
		{&lt;br /&gt;
			$errors = $this-&amp;gt;getErrors();&lt;br /&gt;
			throw new Exception(implode(&amp;quot;\n&amp;quot;, $errors), 500);&lt;br /&gt;
		}&lt;br /&gt;
&lt;br /&gt;
		return $form;&lt;br /&gt;
	}&lt;br /&gt;
&lt;br /&gt;
	/**&lt;br /&gt;
	 * Method to get the data that should be injected in the form.&lt;br /&gt;
	 * As this form is for add, we&#039;re not prefilling the form with an existing record&lt;br /&gt;
	 * But if the user has previously hit submit and the validation has found an error,&lt;br /&gt;
	 *   then we inject what was previously entered.&lt;br /&gt;
	 *&lt;br /&gt;
	 * @return  mixed  The data for the form.&lt;br /&gt;
	 *&lt;br /&gt;
	 * @since   1.6&lt;br /&gt;
	 */&lt;br /&gt;
	protected function loadFormData()&lt;br /&gt;
	{&lt;br /&gt;
		// Check the session for previously entered form data.&lt;br /&gt;
		$data = JFactory::getApplication()-&amp;gt;getUserState(&lt;br /&gt;
			&#039;com_helloworld.edit.helloworld.data&#039;,&lt;br /&gt;
			array()&lt;br /&gt;
		);&lt;br /&gt;
&lt;br /&gt;
		return $data;&lt;br /&gt;
	}&lt;br /&gt;
    &lt;br /&gt;
	/**&lt;br /&gt;
	 * Method to get the script that have to be included on the form&lt;br /&gt;
	 * This returns the script associated with helloworld field greeting validation&lt;br /&gt;
	 *&lt;br /&gt;
	 * @return string	Script files&lt;br /&gt;
	 */&lt;br /&gt;
	public function getScript() &lt;br /&gt;
	{&lt;br /&gt;
		return &#039;administrator/components/com_helloworld/models/forms/helloworld.js&#039;;&lt;br /&gt;
	}&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&amp;lt;/span&amp;gt;&lt;br /&gt;
&amp;lt;translate&amp;gt;&lt;br /&gt;
==Handling the form HTTP POST== &amp;lt;!--T:41--&amp;gt;&lt;br /&gt;
&amp;lt;/translate&amp;gt;&lt;br /&gt;
&amp;lt;translate&amp;gt;&amp;lt;!--T:42--&amp;gt; As in the admin case, we&#039;ll need to create a new controller in the /controllers subdirectory with save() and cancel() methods, and we&#039;ll need a model with a save() method. In fact, because the above model class (in site/models/form.php) extends JModelAdmin, we&#039;ll be able to reuse it without adding any more code. (For just displaying the form our model class could have extended JModelForm, but JModelAdmin extends JModelForm and provides additional functions such as the save() one which we need).&amp;lt;/translate&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;translate&amp;gt;&amp;lt;!--T:43--&amp;gt; Note that we don&#039;t need any new view file or layout file, because we&#039;re just going to redirect the user back to the same form.&amp;lt;/translate&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;translate&amp;gt;&amp;lt;!--T:44--&amp;gt; So the only new file we need is a new controller in a new controllers subdirectory:&amp;lt;/translate&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span id=&amp;quot;site/controllers/helloworld.php&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;tt&amp;gt;site/controllers/helloworld.php&amp;lt;/tt&amp;gt;&lt;br /&gt;
&amp;lt;source lang=&amp;quot;php&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;?php&lt;br /&gt;
/**&lt;br /&gt;
 * @package     Joomla.Site&lt;br /&gt;
 * @subpackage  com_helloworld&lt;br /&gt;
 *&lt;br /&gt;
 * @copyright   Copyright (C) 2005 - 2018 Open Source Matters, Inc. All rights reserved.&lt;br /&gt;
 * @license     GNU General Public License version 2 or later; see LICENSE.txt&lt;br /&gt;
 */&lt;br /&gt;
// No direct access to this file&lt;br /&gt;
defined(&#039;_JEXEC&#039;) or die(&#039;Restricted access&#039;);&lt;br /&gt;
&lt;br /&gt;
/**&lt;br /&gt;
 * HelloWorld Controller&lt;br /&gt;
 *&lt;br /&gt;
 * @package     Joomla.Site&lt;br /&gt;
 * @subpackage  com_helloworld&lt;br /&gt;
 *&lt;br /&gt;
 * Used to handle the http POST from the front-end form which allows &lt;br /&gt;
 * users to enter a new helloworld message&lt;br /&gt;
 *&lt;br /&gt;
 */&lt;br /&gt;
class HelloWorldControllerHelloWorld extends JControllerForm&lt;br /&gt;
{   &lt;br /&gt;
    public function cancel($key = null)&lt;br /&gt;
    {&lt;br /&gt;
        parent::cancel($key);&lt;br /&gt;
        &lt;br /&gt;
        // set up the redirect back to the same form&lt;br /&gt;
        $this-&amp;gt;setRedirect(&lt;br /&gt;
            (string)JUri::getInstance(), &lt;br /&gt;
            JText::_(&#039;COM_HELLOWORLD_ADD_CANCELLED&#039;)&lt;br /&gt;
		);&lt;br /&gt;
    }&lt;br /&gt;
    &lt;br /&gt;
    /*&lt;br /&gt;
     * Function handing the save for adding a new helloworld record&lt;br /&gt;
     * Based on the save() function in the JControllerForm class&lt;br /&gt;
     */&lt;br /&gt;
    public function save($key = null, $urlVar = null)&lt;br /&gt;
    {&lt;br /&gt;
		// Check for request forgeries.&lt;br /&gt;
		JSession::checkToken() or jexit(JText::_(&#039;JINVALID_TOKEN&#039;));&lt;br /&gt;
        &lt;br /&gt;
		$app = JFactory::getApplication(); &lt;br /&gt;
		$input = $app-&amp;gt;input; &lt;br /&gt;
		$model = $this-&amp;gt;getModel(&#039;form&#039;);&lt;br /&gt;
        &lt;br /&gt;
		// Get the current URI to set in redirects. As we&#039;re handling a POST, &lt;br /&gt;
		// this URI comes from the &amp;lt;form action=&amp;quot;...&amp;quot;&amp;gt; attribute in the layout file above&lt;br /&gt;
		$currentUri = (string)JUri::getInstance();&lt;br /&gt;
&lt;br /&gt;
		// Check that this user is allowed to add a new record&lt;br /&gt;
		if (!JFactory::getUser()-&amp;gt;authorise( &amp;quot;core.create&amp;quot;, &amp;quot;com_helloworld&amp;quot;))&lt;br /&gt;
		{&lt;br /&gt;
			$app-&amp;gt;enqueueMessage(JText::_(&#039;JERROR_ALERTNOAUTHOR&#039;), &#039;error&#039;);&lt;br /&gt;
			$app-&amp;gt;setHeader(&#039;status&#039;, 403, true);&lt;br /&gt;
&lt;br /&gt;
			return;&lt;br /&gt;
		}&lt;br /&gt;
        &lt;br /&gt;
		// get the data from the HTTP POST request&lt;br /&gt;
		$data  = $input-&amp;gt;get(&#039;jform&#039;, array(), &#039;array&#039;);&lt;br /&gt;
        &lt;br /&gt;
		// set up context for saving form data&lt;br /&gt;
		$context = &amp;quot;$this-&amp;gt;option.edit.$this-&amp;gt;context&amp;quot;;&lt;br /&gt;
        &lt;br /&gt;
		// Validate the posted data.&lt;br /&gt;
		// First we need to set up an instance of the form ...&lt;br /&gt;
		$form = $model-&amp;gt;getForm($data, false);&lt;br /&gt;
&lt;br /&gt;
		if (!$form)&lt;br /&gt;
		{&lt;br /&gt;
			$app-&amp;gt;enqueueMessage($model-&amp;gt;getError(), &#039;error&#039;);&lt;br /&gt;
			return false;&lt;br /&gt;
		}&lt;br /&gt;
&lt;br /&gt;
		// ... and then we validate the data against it&lt;br /&gt;
		// The validate function called below results in the running of the validate=&amp;quot;...&amp;quot; routines&lt;br /&gt;
		// specified against the fields in the form xml file, and also filters the data &lt;br /&gt;
		// according to the filter=&amp;quot;...&amp;quot; specified in the same place (removing html tags by default in strings)&lt;br /&gt;
		$validData = $model-&amp;gt;validate($form, $data);&lt;br /&gt;
&lt;br /&gt;
		// Handle the case where there are validation errors&lt;br /&gt;
		if ($validData === false)&lt;br /&gt;
		{&lt;br /&gt;
			// Get the validation messages.&lt;br /&gt;
			$errors = $model-&amp;gt;getErrors();&lt;br /&gt;
&lt;br /&gt;
			// Display up to three validation messages to the user.&lt;br /&gt;
			for ($i = 0, $n = count($errors); $i &amp;lt; $n &amp;amp;&amp;amp; $i &amp;lt; 3; $i++)&lt;br /&gt;
			{&lt;br /&gt;
				if ($errors[$i] instanceof Exception)&lt;br /&gt;
				{&lt;br /&gt;
					$app-&amp;gt;enqueueMessage($errors[$i]-&amp;gt;getMessage(), &#039;warning&#039;);&lt;br /&gt;
				}&lt;br /&gt;
				else&lt;br /&gt;
				{&lt;br /&gt;
					$app-&amp;gt;enqueueMessage($errors[$i], &#039;warning&#039;);&lt;br /&gt;
				}&lt;br /&gt;
			}&lt;br /&gt;
&lt;br /&gt;
			// Save the form data in the session.&lt;br /&gt;
			$app-&amp;gt;setUserState($context . &#039;.data&#039;, $data);&lt;br /&gt;
&lt;br /&gt;
			// Redirect back to the same screen.&lt;br /&gt;
			$this-&amp;gt;setRedirect($currentUri);&lt;br /&gt;
&lt;br /&gt;
			return false;&lt;br /&gt;
		}&lt;br /&gt;
        &lt;br /&gt;
		// add the &#039;created by&#039; and &#039;created&#039; date fields&lt;br /&gt;
		$validData[&#039;created_by&#039;] = JFactory::getUser()-&amp;gt;get(&#039;id&#039;, 0);&lt;br /&gt;
		$validData[&#039;created&#039;] = date(&#039;Y-m-d h:i:s&#039;);&lt;br /&gt;
        &lt;br /&gt;
		// Attempt to save the data.&lt;br /&gt;
		if (!$model-&amp;gt;save($validData))&lt;br /&gt;
		{&lt;br /&gt;
		// Handle the case where the save failed&lt;br /&gt;
            &lt;br /&gt;
			// Save the data in the session.&lt;br /&gt;
			$app-&amp;gt;setUserState($context . &#039;.data&#039;, $validData);&lt;br /&gt;
&lt;br /&gt;
			// Redirect back to the edit screen.&lt;br /&gt;
			$this-&amp;gt;setError(JText::sprintf(&#039;JLIB_APPLICATION_ERROR_SAVE_FAILED&#039;, $model-&amp;gt;getError()));&lt;br /&gt;
			$this-&amp;gt;setMessage($this-&amp;gt;getError(), &#039;error&#039;);&lt;br /&gt;
&lt;br /&gt;
			$this-&amp;gt;setRedirect($currentUri);&lt;br /&gt;
&lt;br /&gt;
			return false;&lt;br /&gt;
		}&lt;br /&gt;
        &lt;br /&gt;
		// clear the data in the form&lt;br /&gt;
		$app-&amp;gt;setUserState($context . &#039;.data&#039;, null);&lt;br /&gt;
        &lt;br /&gt;
		// notify the administrator that a new helloworld message has been added on the front end&lt;br /&gt;
        &lt;br /&gt;
		// get the id of the person to notify from global config&lt;br /&gt;
		$params   = $app-&amp;gt;getParams();&lt;br /&gt;
		$userid_to_email = (int) $params-&amp;gt;get(&#039;user_to_email&#039;);&lt;br /&gt;
		$user_to_email = JUser::getInstance($userid_to_email);&lt;br /&gt;
		$to_address = $user_to_email-&amp;gt;get(&amp;quot;email&amp;quot;);&lt;br /&gt;
        &lt;br /&gt;
		// get the current user (if any)&lt;br /&gt;
		$current_user = JFactory::getUser();&lt;br /&gt;
		if ($current_user-&amp;gt;get(&amp;quot;id&amp;quot;) &amp;gt; 0) &lt;br /&gt;
		{&lt;br /&gt;
			$current_username = $current_user-&amp;gt;get(&amp;quot;username&amp;quot;);&lt;br /&gt;
		}&lt;br /&gt;
		else &lt;br /&gt;
		{&lt;br /&gt;
			$current_username = &amp;quot;a visitor to the site&amp;quot;;&lt;br /&gt;
		}&lt;br /&gt;
        &lt;br /&gt;
		// get the Mailer object, set up the email to be sent, and send it&lt;br /&gt;
		$mailer = JFactory::getMailer();&lt;br /&gt;
		$mailer-&amp;gt;addRecipient($to_address);&lt;br /&gt;
		$mailer-&amp;gt;setSubject(&amp;quot;New helloworld message added by &amp;quot; . $current_username);&lt;br /&gt;
		$mailer-&amp;gt;setBody(&amp;quot;New greeting is &amp;quot; . $validData[&#039;greeting&#039;]);&lt;br /&gt;
		try &lt;br /&gt;
		{&lt;br /&gt;
			$mailer-&amp;gt;send(); &lt;br /&gt;
		}&lt;br /&gt;
		catch (Exception $e)&lt;br /&gt;
		{&lt;br /&gt;
			JLog::add(&#039;Caught exception: &#039; . $e-&amp;gt;getMessage(), JLog::Error, &#039;jerror&#039;);&lt;br /&gt;
		}&lt;br /&gt;
        &lt;br /&gt;
		$this-&amp;gt;setRedirect(&lt;br /&gt;
				$currentUri,&lt;br /&gt;
				JText::_(&#039;COM_HELLOWORLD_ADD_SUCCESSFUL&#039;)&lt;br /&gt;
				);&lt;br /&gt;
            &lt;br /&gt;
		return true;&lt;br /&gt;
        &lt;br /&gt;
    }&lt;br /&gt;
&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;translate&amp;gt;&amp;lt;!--T:45--&amp;gt; In the above file we&#039;ve been able to reuse the cancel() method from the parent JControllerForm class, with the exception that we want to redirect back to the same form. (The parent cancel() method redirects back to the view showing the list of records - as in the admin case).&amp;lt;/translate&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;translate&amp;gt;&amp;lt;!--T:46--&amp;gt; However, our save() method functionality is significantly different from that of the parent class, so it&#039;s easier just to write our own. Note that we&#039;re recording the user and created date/time for records added via the front-end only. If we wanted to record this information for all records, then we&#039;d need to override a save() function for the backend as well to include setting those fields.&amp;lt;/translate&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;translate&amp;gt;&amp;lt;!--T:47--&amp;gt; The mailing functionality relies on you having set up mail in your Joomla instance. If you&#039;re using localhost then one possibility is to configure this using a gmail account, and you can easily find the smtp settings for this on the Internet. Note that you&#039;ll need to allow &amp;quot;less secure apps&amp;quot; on the gmail account.&amp;lt;/translate&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;translate&amp;gt;&lt;br /&gt;
==Configuration Parameters== &amp;lt;!--T:48--&amp;gt;&lt;br /&gt;
&amp;lt;/translate&amp;gt;&lt;br /&gt;
&amp;lt;translate&amp;gt;&amp;lt;!--T:49--&amp;gt; We&#039;ve introduced two new configuration parameters - the captcha to display on the form, and the user to email with notification of a new helloworld message being added. So update the configuration settings as follows:&amp;lt;/translate&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span id=&amp;quot;admin/config.xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;tt&amp;gt;admin/config.xml&amp;lt;/tt&amp;gt;&lt;br /&gt;
&amp;lt;source lang=&amp;quot;xml&amp;quot; highlight=&amp;quot;18-37&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;?xml version=&amp;quot;1.0&amp;quot; encoding=&amp;quot;utf-8&amp;quot;?&amp;gt;&lt;br /&gt;
&amp;lt;config&amp;gt;&lt;br /&gt;
	&amp;lt;fieldset&lt;br /&gt;
		name=&amp;quot;greetings&amp;quot;&lt;br /&gt;
		label=&amp;quot;COM_HELLOWORLD_CONFIG_GREETING_SETTINGS_LABEL&amp;quot;&lt;br /&gt;
		description=&amp;quot;COM_HELLOWORLD_CONFIG_GREETING_SETTINGS_DESC&amp;quot;&lt;br /&gt;
	&amp;gt;&lt;br /&gt;
		&amp;lt;field&lt;br /&gt;
			name=&amp;quot;show_category&amp;quot;&lt;br /&gt;
			type=&amp;quot;radio&amp;quot;&lt;br /&gt;
			label=&amp;quot;COM_HELLOWORLD_HELLOWORLD_FIELD_SHOW_CATEGORY_LABEL&amp;quot;&lt;br /&gt;
			description=&amp;quot;COM_HELLOWORLD_HELLOWORLD_FIELD_SHOW_CATEGORY_DESC&amp;quot;&lt;br /&gt;
			default=&amp;quot;0&amp;quot;&lt;br /&gt;
		&amp;gt;&lt;br /&gt;
			&amp;lt;option value=&amp;quot;0&amp;quot;&amp;gt;JHIDE&amp;lt;/option&amp;gt;&lt;br /&gt;
			&amp;lt;option value=&amp;quot;1&amp;quot;&amp;gt;JSHOW&amp;lt;/option&amp;gt;&lt;br /&gt;
		&amp;lt;/field&amp;gt;&lt;br /&gt;
        &amp;lt;field&lt;br /&gt;
			name=&amp;quot;captcha&amp;quot;&lt;br /&gt;
			type=&amp;quot;plugins&amp;quot;&lt;br /&gt;
            folder=&amp;quot;captcha&amp;quot;&lt;br /&gt;
			label=&amp;quot;COM_HELLOWORLD_HELLOWORLD_FIELD_CAPTCHA_LABEL&amp;quot;&lt;br /&gt;
			description=&amp;quot;COM_HELLOWORLD_HELLOWORLD_FIELD_CAPTCHA_DESC&amp;quot;&lt;br /&gt;
			default=&amp;quot;0&amp;quot;&lt;br /&gt;
			filter=&amp;quot;cmd&amp;quot;&lt;br /&gt;
		&amp;gt;&lt;br /&gt;
            &amp;lt;option value=&amp;quot;&amp;quot;&amp;gt;JOPTION_USE_DEFAULT&amp;lt;/option&amp;gt;&lt;br /&gt;
			&amp;lt;option value=&amp;quot;0&amp;quot;&amp;gt;JOPTION_DO_NOT_USE&amp;lt;/option&amp;gt;&lt;br /&gt;
		&amp;lt;/field&amp;gt;&lt;br /&gt;
        &amp;lt;field&lt;br /&gt;
			name=&amp;quot;user_to_email&amp;quot;&lt;br /&gt;
			type=&amp;quot;user&amp;quot;&lt;br /&gt;
			label=&amp;quot;COM_HELLOWORLD_HELLOWORLD_FIELD_USER_TO_EMAIL_LABEL&amp;quot;&lt;br /&gt;
			description=&amp;quot;COM_HELLOWORLD_HELLOWORLD_FIELD_USER_TO_EMAIL_DESC&amp;quot;&lt;br /&gt;
			default=&amp;quot;0&amp;quot;&lt;br /&gt;
		&amp;gt;&lt;br /&gt;
		&amp;lt;/field&amp;gt;&lt;br /&gt;
	&amp;lt;/fieldset&amp;gt;&lt;br /&gt;
    &amp;lt;fieldset&lt;br /&gt;
		name=&amp;quot;permissions&amp;quot;&lt;br /&gt;
		label=&amp;quot;JCONFIG_PERMISSIONS_LABEL&amp;quot;&lt;br /&gt;
		description=&amp;quot;JCONFIG_PERMISSIONS_DESC&amp;quot;&lt;br /&gt;
	&amp;gt;&lt;br /&gt;
		&amp;lt;field&lt;br /&gt;
			name=&amp;quot;rules&amp;quot;&lt;br /&gt;
			type=&amp;quot;rules&amp;quot;&lt;br /&gt;
			label=&amp;quot;JCONFIG_PERMISSIONS_LABEL&amp;quot;&lt;br /&gt;
			class=&amp;quot;inputbox&amp;quot;&lt;br /&gt;
			validate=&amp;quot;rules&amp;quot;&lt;br /&gt;
			filter=&amp;quot;rules&amp;quot;&lt;br /&gt;
			component=&amp;quot;com_helloworld&amp;quot;&lt;br /&gt;
			section=&amp;quot;component&amp;quot;&lt;br /&gt;
		/&amp;gt;&lt;br /&gt;
	&amp;lt;/fieldset&amp;gt;&lt;br /&gt;
&amp;lt;/config&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;translate&amp;gt;&lt;br /&gt;
==Display the new fields on the Admin list form== &amp;lt;!--T:50--&amp;gt;&lt;br /&gt;
&amp;lt;/translate&amp;gt;&lt;br /&gt;
&amp;lt;translate&amp;gt;&amp;lt;!--T:51--&amp;gt; We want to update the admin helloworld list layout file to include the new Author and Created Date fields. This means that we also need to update our model to include these fields in the SQL query.&amp;lt;/translate&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;translate&amp;gt;&amp;lt;!--T:52--&amp;gt; In addition, we&#039;ve changed column ordering mechanism from what it was in [[S:MyLanguage/J3.x:Developing an MVC Component/Adding decorations to the backend|Adding decorations to the backend]] to the more modern way that this is handled.&amp;lt;/translate&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;span id=&amp;quot;admin/views/helloworlds/view.html.php&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;tt&amp;gt;admin/views/helloworlds/view.html.php&amp;lt;/tt&amp;gt;&lt;br /&gt;
&amp;lt;source lang=&amp;quot;php&amp;quot; highlight=&amp;quot;37-39&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;?php&lt;br /&gt;
/**&lt;br /&gt;
 * @package     Joomla.Administrator&lt;br /&gt;
 * @subpackage  com_helloworld&lt;br /&gt;
 *&lt;br /&gt;
 * @copyright   Copyright (C) 2005 - 2018 Open Source Matters, Inc. All rights reserved.&lt;br /&gt;
 * @license     GNU General Public License version 2 or later; see LICENSE.txt&lt;br /&gt;
 */&lt;br /&gt;
&lt;br /&gt;
// No direct access to this file&lt;br /&gt;
defined(&#039;_JEXEC&#039;) or die(&#039;Restricted access&#039;);&lt;br /&gt;
&lt;br /&gt;
/**&lt;br /&gt;
 * HelloWorlds View&lt;br /&gt;
 *&lt;br /&gt;
 * @since  0.0.1&lt;br /&gt;
 */&lt;br /&gt;
class HelloWorldViewHelloWorlds extends JViewLegacy&lt;br /&gt;
{&lt;br /&gt;
	/**&lt;br /&gt;
	 * Display the Hello World view&lt;br /&gt;
	 *&lt;br /&gt;
	 * @param   string  $tpl  The name of the template file to parse; automatically searches through the template paths.&lt;br /&gt;
	 *&lt;br /&gt;
	 * @return  void&lt;br /&gt;
	 */&lt;br /&gt;
	function display($tpl = null)&lt;br /&gt;
	{&lt;br /&gt;
		&lt;br /&gt;
		// Get application&lt;br /&gt;
		$app = JFactory::getApplication();&lt;br /&gt;
		$context = &amp;quot;helloworld.list.admin.helloworld&amp;quot;;&lt;br /&gt;
		// Get data from the model&lt;br /&gt;
		$this-&amp;gt;items			= $this-&amp;gt;get(&#039;Items&#039;);&lt;br /&gt;
		$this-&amp;gt;pagination		= $this-&amp;gt;get(&#039;Pagination&#039;);&lt;br /&gt;
		$this-&amp;gt;state			= $this-&amp;gt;get(&#039;State&#039;);&lt;br /&gt;
		// Remove the old ordering mechanism&lt;br /&gt;
		//$this-&amp;gt;filter_order 	= $app-&amp;gt;getUserStateFromRequest($context.&#039;filter_order&#039;, &#039;filter_order&#039;, &#039;greeting&#039;, &#039;cmd&#039;);&lt;br /&gt;
		//$this-&amp;gt;filter_order_Dir = $app-&amp;gt;getUserStateFromRequest($context.&#039;filter_order_Dir&#039;, &#039;filter_order_Dir&#039;, &#039;asc&#039;, &#039;cmd&#039;);&lt;br /&gt;
		$this-&amp;gt;filterForm    	= $this-&amp;gt;get(&#039;FilterForm&#039;);&lt;br /&gt;
		$this-&amp;gt;activeFilters 	= $this-&amp;gt;get(&#039;ActiveFilters&#039;);&lt;br /&gt;
        &lt;br /&gt;
		// What Access Permissions does this user have? What can (s)he do?&lt;br /&gt;
		$this-&amp;gt;canDo = JHelperContent::getActions(&#039;com_helloworld&#039;);&lt;br /&gt;
&lt;br /&gt;
		// Check for errors.&lt;br /&gt;
		if (count($errors = $this-&amp;gt;get(&#039;Errors&#039;)))&lt;br /&gt;
		{&lt;br /&gt;
			JError::raiseError(500, implode(&#039;&amp;lt;br /&amp;gt;&#039;, $errors));&lt;br /&gt;
&lt;br /&gt;
			return false;&lt;br /&gt;
		}&lt;br /&gt;
        &lt;br /&gt;
		// Set the submenu&lt;br /&gt;
		HelloWorldHelper::addSubmenu(&#039;helloworlds&#039;);&lt;br /&gt;
&lt;br /&gt;
		// Set the toolbar and number of found items&lt;br /&gt;
		$this-&amp;gt;addToolBar();&lt;br /&gt;
&lt;br /&gt;
		// Display the template&lt;br /&gt;
		parent::display($tpl);&lt;br /&gt;
&lt;br /&gt;
		// Set the document&lt;br /&gt;
		$this-&amp;gt;setDocument();&lt;br /&gt;
	}&lt;br /&gt;
&lt;br /&gt;
	/**&lt;br /&gt;
	 * Add the page title and toolbar.&lt;br /&gt;
	 *&lt;br /&gt;
	 * @return  void&lt;br /&gt;
	 *&lt;br /&gt;
	 * @since   1.6&lt;br /&gt;
	 */&lt;br /&gt;
	protected function addToolBar()&lt;br /&gt;
	{&lt;br /&gt;
		$title = JText::_(&#039;COM_HELLOWORLD_MANAGER_HELLOWORLDS&#039;);&lt;br /&gt;
&lt;br /&gt;
		if ($this-&amp;gt;pagination-&amp;gt;total)&lt;br /&gt;
		{&lt;br /&gt;
			$title .= &amp;quot;&amp;lt;span style=&#039;font-size: 0.5em; vertical-align: middle;&#039;&amp;gt;(&amp;quot; . $this-&amp;gt;pagination-&amp;gt;total . &amp;quot;)&amp;lt;/span&amp;gt;&amp;quot;;&lt;br /&gt;
		}&lt;br /&gt;
&lt;br /&gt;
		JToolBarHelper::title($title, &#039;helloworld&#039;);&lt;br /&gt;
		if ($this-&amp;gt;canDo-&amp;gt;get(&#039;core.create&#039;)) &lt;br /&gt;
		{&lt;br /&gt;
			JToolBarHelper::addNew(&#039;helloworld.add&#039;, &#039;JTOOLBAR_NEW&#039;);&lt;br /&gt;
		}&lt;br /&gt;
		if ($this-&amp;gt;canDo-&amp;gt;get(&#039;core.edit&#039;)) &lt;br /&gt;
		{&lt;br /&gt;
			JToolBarHelper::editList(&#039;helloworld.edit&#039;, &#039;JTOOLBAR_EDIT&#039;);&lt;br /&gt;
		}&lt;br /&gt;
		if ($this-&amp;gt;canDo-&amp;gt;get(&#039;core.delete&#039;)) &lt;br /&gt;
		{&lt;br /&gt;
			JToolBarHelper::deleteList(&#039;&#039;, &#039;helloworlds.delete&#039;, &#039;JTOOLBAR_DELETE&#039;);&lt;br /&gt;
		}&lt;br /&gt;
		if ($this-&amp;gt;canDo-&amp;gt;get(&#039;core.admin&#039;)) &lt;br /&gt;
		{&lt;br /&gt;
			JToolBarHelper::divider();&lt;br /&gt;
			JToolBarHelper::preferences(&#039;com_helloworld&#039;);&lt;br /&gt;
		}&lt;br /&gt;
	}&lt;br /&gt;
	/**&lt;br /&gt;
	 * Method to set up the document properties&lt;br /&gt;
	 *&lt;br /&gt;
	 * @return void&lt;br /&gt;
	 */&lt;br /&gt;
	protected function setDocument() &lt;br /&gt;
	{&lt;br /&gt;
		$document = JFactory::getDocument();&lt;br /&gt;
		$document-&amp;gt;setTitle(JText::_(&#039;COM_HELLOWORLD_ADMINISTRATION&#039;));&lt;br /&gt;
	}&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;translate&amp;gt;&amp;lt;!--T:53--&amp;gt; Note that in the layout file below the hidden input fields filter_order and filter_order_Dir have been removed.&amp;lt;/translate&amp;gt;  &lt;br /&gt;
&lt;br /&gt;
&amp;lt;span id=&amp;quot;admin/views/helloworlds/tmpl/default.php&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;tt&amp;gt;admin/views/helloworlds/tmpl/default.php&amp;lt;/tt&amp;gt;&lt;br /&gt;
&amp;lt;source lang=&amp;quot;php&amp;quot; highlight=&amp;quot;15-16,41-42,44-51,54,83-88,101-102&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;?php&lt;br /&gt;
/**&lt;br /&gt;
 * @package     Joomla.Administrator&lt;br /&gt;
 * @subpackage  com_helloworld&lt;br /&gt;
 *&lt;br /&gt;
 * @copyright   Copyright (C) 2005 - 2018 Open Source Matters, Inc. All rights reserved.&lt;br /&gt;
 * @license     GNU General Public License version 2 or later; see LICENSE.txt&lt;br /&gt;
 */&lt;br /&gt;
&lt;br /&gt;
// No direct access to this file&lt;br /&gt;
defined(&#039;_JEXEC&#039;) or die(&#039;Restricted Access&#039;);&lt;br /&gt;
&lt;br /&gt;
JHtml::_(&#039;formbehavior.chosen&#039;, &#039;select&#039;);&lt;br /&gt;
&lt;br /&gt;
$listOrder     = $this-&amp;gt;escape($this-&amp;gt;state-&amp;gt;get(&#039;list.ordering&#039;));&lt;br /&gt;
$listDirn      = $this-&amp;gt;escape($this-&amp;gt;state-&amp;gt;get(&#039;list.direction&#039;));&lt;br /&gt;
?&amp;gt;&lt;br /&gt;
&amp;lt;form action=&amp;quot;index.php?option=com_helloworld&amp;amp;view=helloworlds&amp;quot; method=&amp;quot;post&amp;quot; id=&amp;quot;adminForm&amp;quot; name=&amp;quot;adminForm&amp;quot;&amp;gt;&lt;br /&gt;
	&amp;lt;div id=&amp;quot;j-sidebar-container&amp;quot; class=&amp;quot;span2&amp;quot;&amp;gt;&lt;br /&gt;
		&amp;lt;?php echo JHtmlSidebar::render(); ?&amp;gt;&lt;br /&gt;
	&amp;lt;/div&amp;gt;&lt;br /&gt;
	&amp;lt;div id=&amp;quot;j-main-container&amp;quot; class=&amp;quot;span10&amp;quot;&amp;gt;&lt;br /&gt;
        &amp;lt;div class=&amp;quot;row-fluid&amp;quot;&amp;gt;&lt;br /&gt;
            &amp;lt;div class=&amp;quot;span6&amp;quot;&amp;gt;&lt;br /&gt;
                &amp;lt;?php echo JText::_(&#039;COM_HELLOWORLD_HELLOWORLDS_FILTER&#039;); ?&amp;gt;&lt;br /&gt;
                &amp;lt;?php&lt;br /&gt;
                    echo JLayoutHelper::render(&lt;br /&gt;
                        &#039;joomla.searchtools.default&#039;,&lt;br /&gt;
                        array(&#039;view&#039; =&amp;gt; $this)&lt;br /&gt;
                    );&lt;br /&gt;
                ?&amp;gt;&lt;br /&gt;
            &amp;lt;/div&amp;gt;&lt;br /&gt;
        &amp;lt;/div&amp;gt;&lt;br /&gt;
        &amp;lt;table class=&amp;quot;table table-striped table-hover&amp;quot;&amp;gt;&lt;br /&gt;
            &amp;lt;thead&amp;gt;&lt;br /&gt;
            &amp;lt;tr&amp;gt;&lt;br /&gt;
                &amp;lt;th width=&amp;quot;1%&amp;quot;&amp;gt;&amp;lt;?php echo JText::_(&#039;COM_HELLOWORLD_NUM&#039;); ?&amp;gt;&amp;lt;/th&amp;gt;&lt;br /&gt;
                &amp;lt;th width=&amp;quot;2%&amp;quot;&amp;gt;&lt;br /&gt;
                    &amp;lt;?php echo JHtml::_(&#039;grid.checkall&#039;); ?&amp;gt;&lt;br /&gt;
                &amp;lt;/th&amp;gt;&lt;br /&gt;
                &amp;lt;th width=&amp;quot;30%&amp;quot;&amp;gt;&lt;br /&gt;
                    &amp;lt;?php echo JHtml::_(&#039;searchtools.sort&#039;, &#039;COM_HELLOWORLD_HELLOWORLDS_NAME&#039;, &#039;greeting&#039;, $listDirn, $listOrder); ?&amp;gt;&lt;br /&gt;
                &amp;lt;/th&amp;gt;&lt;br /&gt;
                &amp;lt;th width=&amp;quot;30%&amp;quot;&amp;gt;&lt;br /&gt;
                    &amp;lt;?php echo JHtml::_(&#039;searchtools.sort&#039;, &#039;COM_HELLOWORLD_AUTHOR&#039;, &#039;author&#039;, $listDirn, $listOrder); ?&amp;gt;&lt;br /&gt;
                &amp;lt;/th&amp;gt;&lt;br /&gt;
                &amp;lt;th width=&amp;quot;30%&amp;quot;&amp;gt;&lt;br /&gt;
                    &amp;lt;?php echo JHtml::_(&#039;searchtools.sort&#039;, &#039;COM_HELLOWORLD_CREATED_DATE&#039;, &#039;created&#039;, $listDirn, $listOrder); ?&amp;gt;&lt;br /&gt;
                &amp;lt;/th&amp;gt;&lt;br /&gt;
                &amp;lt;th width=&amp;quot;5%&amp;quot;&amp;gt;&lt;br /&gt;
                    &amp;lt;?php echo JHtml::_(&#039;searchtools.sort&#039;, &#039;COM_HELLOWORLD_PUBLISHED&#039;, &#039;published&#039;, $listDirn, $listOrder); ?&amp;gt;&lt;br /&gt;
                &amp;lt;/th&amp;gt;&lt;br /&gt;
                &amp;lt;th width=&amp;quot;2%&amp;quot;&amp;gt;&lt;br /&gt;
                    &amp;lt;?php echo JHtml::_(&#039;searchtools.sort&#039;, &#039;COM_HELLOWORLD_ID&#039;, &#039;id&#039;, $listDirn, $listOrder); ?&amp;gt;&lt;br /&gt;
                &amp;lt;/th&amp;gt;&lt;br /&gt;
            &amp;lt;/tr&amp;gt;&lt;br /&gt;
            &amp;lt;/thead&amp;gt;&lt;br /&gt;
            &amp;lt;tfoot&amp;gt;&lt;br /&gt;
                &amp;lt;tr&amp;gt;&lt;br /&gt;
                    &amp;lt;td colspan=&amp;quot;5&amp;quot;&amp;gt;&lt;br /&gt;
                        &amp;lt;?php echo $this-&amp;gt;pagination-&amp;gt;getListFooter(); ?&amp;gt;&lt;br /&gt;
                    &amp;lt;/td&amp;gt;&lt;br /&gt;
                &amp;lt;/tr&amp;gt;&lt;br /&gt;
            &amp;lt;/tfoot&amp;gt;&lt;br /&gt;
            &amp;lt;tbody&amp;gt;&lt;br /&gt;
                &amp;lt;?php if (!empty($this-&amp;gt;items)) : ?&amp;gt;&lt;br /&gt;
                    &amp;lt;?php foreach ($this-&amp;gt;items as $i =&amp;gt; $row) :&lt;br /&gt;
                        $link = JRoute::_(&#039;index.php?option=com_helloworld&amp;amp;task=helloworld.edit&amp;amp;id=&#039; . $row-&amp;gt;id);&lt;br /&gt;
                    ?&amp;gt;&lt;br /&gt;
                        &amp;lt;tr&amp;gt;&lt;br /&gt;
                            &amp;lt;td&amp;gt;&amp;lt;?php echo $this-&amp;gt;pagination-&amp;gt;getRowOffset($i); ?&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
                            &amp;lt;td&amp;gt;&lt;br /&gt;
                                &amp;lt;?php echo JHtml::_(&#039;grid.id&#039;, $i, $row-&amp;gt;id); ?&amp;gt;&lt;br /&gt;
                            &amp;lt;/td&amp;gt;&lt;br /&gt;
                            &amp;lt;td&amp;gt;&lt;br /&gt;
                                &amp;lt;a href=&amp;quot;&amp;lt;?php echo $link; ?&amp;gt;&amp;quot; title=&amp;quot;&amp;lt;?php echo JText::_(&#039;COM_HELLOWORLD_EDIT_HELLOWORLD&#039;); ?&amp;gt;&amp;quot;&amp;gt;&lt;br /&gt;
                                    &amp;lt;?php echo $row-&amp;gt;greeting; ?&amp;gt;&lt;br /&gt;
                                &amp;lt;/a&amp;gt;&lt;br /&gt;
                                &amp;lt;div class=&amp;quot;small&amp;quot;&amp;gt;&lt;br /&gt;
									&amp;lt;?php echo JText::_(&#039;JCATEGORY&#039;) . &#039;: &#039; . $this-&amp;gt;escape($row-&amp;gt;category_title); ?&amp;gt;&lt;br /&gt;
								&amp;lt;/div&amp;gt;&lt;br /&gt;
                            &amp;lt;/td&amp;gt;&lt;br /&gt;
                            &amp;lt;td align=&amp;quot;center&amp;quot;&amp;gt;&lt;br /&gt;
                                &amp;lt;?php echo $row-&amp;gt;author; ?&amp;gt;&lt;br /&gt;
                            &amp;lt;/td&amp;gt;&lt;br /&gt;
                            &amp;lt;td align=&amp;quot;center&amp;quot;&amp;gt;&lt;br /&gt;
                                &amp;lt;?php echo substr($row-&amp;gt;created, 0, 10); ?&amp;gt;&lt;br /&gt;
                            &amp;lt;/td&amp;gt;&lt;br /&gt;
                            &amp;lt;td align=&amp;quot;center&amp;quot;&amp;gt;&lt;br /&gt;
                                &amp;lt;?php echo JHtml::_(&#039;jgrid.published&#039;, $row-&amp;gt;published, $i, &#039;helloworlds.&#039;, true, &#039;cb&#039;); ?&amp;gt;&lt;br /&gt;
                            &amp;lt;/td&amp;gt;&lt;br /&gt;
                            &amp;lt;td align=&amp;quot;center&amp;quot;&amp;gt;&lt;br /&gt;
                                &amp;lt;?php echo $row-&amp;gt;id; ?&amp;gt;&lt;br /&gt;
                            &amp;lt;/td&amp;gt;&lt;br /&gt;
                        &amp;lt;/tr&amp;gt;&lt;br /&gt;
                    &amp;lt;?php endforeach; ?&amp;gt;&lt;br /&gt;
                &amp;lt;?php endif; ?&amp;gt;&lt;br /&gt;
            &amp;lt;/tbody&amp;gt;&lt;br /&gt;
        &amp;lt;/table&amp;gt;&lt;br /&gt;
        &amp;lt;input type=&amp;quot;hidden&amp;quot; name=&amp;quot;task&amp;quot; value=&amp;quot;&amp;quot;/&amp;gt;&lt;br /&gt;
        &amp;lt;input type=&amp;quot;hidden&amp;quot; name=&amp;quot;boxchecked&amp;quot; value=&amp;quot;0&amp;quot;/&amp;gt;&lt;br /&gt;
        &amp;lt;?php echo JHtml::_(&#039;form.token&#039;); ?&amp;gt;&lt;br /&gt;
    &amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;/form&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;translate&amp;gt;&amp;lt;!--T:54--&amp;gt; Instead of the using the hidden fields &amp;quot;filter_order&amp;quot; and &amp;quot;filter_order_Dir&amp;quot; to keep track of the current column for ordering and direction, we will use the &amp;quot;list&amp;quot;[&amp;quot;fullordering&amp;quot;] field, and this will now be displayed on the form as well (as is done within com_content for the Articles view). We&#039;ll also need to include the new language strings in this field in our admin language file.&amp;lt;/translate&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;span id=&amp;quot;admin/models/forms/filter_helloworlds.xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;tt&amp;gt;admin/models/forms/filter_helloworlds.xml&amp;lt;/tt&amp;gt;&lt;br /&gt;
&amp;lt;source lang=&amp;quot;xml&amp;quot; highlight=&amp;quot;22-41&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;?xml version=&amp;quot;1.0&amp;quot; encoding=&amp;quot;utf-8&amp;quot;?&amp;gt;&lt;br /&gt;
&amp;lt;form&amp;gt;&lt;br /&gt;
	&amp;lt;fields name=&amp;quot;filter&amp;quot;&amp;gt;&lt;br /&gt;
		&amp;lt;field&lt;br /&gt;
			name=&amp;quot;search&amp;quot;&lt;br /&gt;
			type=&amp;quot;text&amp;quot;&lt;br /&gt;
			label=&amp;quot;COM_BANNERS_SEARCH_IN_TITLE&amp;quot;&lt;br /&gt;
			hint=&amp;quot;JSEARCH_FILTER&amp;quot;&lt;br /&gt;
			class=&amp;quot;js-stools-search-string&amp;quot;&lt;br /&gt;
		/&amp;gt;&lt;br /&gt;
		&amp;lt;field&lt;br /&gt;
			name=&amp;quot;published&amp;quot;&lt;br /&gt;
			type=&amp;quot;status&amp;quot;&lt;br /&gt;
			label=&amp;quot;JOPTION_SELECT_PUBLISHED&amp;quot;&lt;br /&gt;
			description=&amp;quot;JOPTION_SELECT_PUBLISHED_DESC&amp;quot;&lt;br /&gt;
			onchange=&amp;quot;this.form.submit();&amp;quot;&lt;br /&gt;
			&amp;gt;&lt;br /&gt;
			&amp;lt;option value=&amp;quot;&amp;quot;&amp;gt;JOPTION_SELECT_PUBLISHED&amp;lt;/option&amp;gt;&lt;br /&gt;
		&amp;lt;/field&amp;gt;&lt;br /&gt;
	&amp;lt;/fields&amp;gt;&lt;br /&gt;
	&amp;lt;fields name=&amp;quot;list&amp;quot;&amp;gt;&lt;br /&gt;
		&amp;lt;field&lt;br /&gt;
			name=&amp;quot;fullordering&amp;quot;&lt;br /&gt;
			type=&amp;quot;list&amp;quot;&lt;br /&gt;
			label=&amp;quot;COM_HELLOWORLD_LIST_FULL_ORDERING&amp;quot;&lt;br /&gt;
			description=&amp;quot;COM_HELLOWORLD_LIST_FULL_ORDERING_DESC&amp;quot;&lt;br /&gt;
			onchange=&amp;quot;this.form.submit();&amp;quot;&lt;br /&gt;
			default=&amp;quot;greeting ASC&amp;quot;&lt;br /&gt;
			&amp;gt;&lt;br /&gt;
			&amp;lt;option value=&amp;quot;&amp;quot;&amp;gt;JGLOBAL_SORT_BY&amp;lt;/option&amp;gt;&lt;br /&gt;
			&amp;lt;option value=&amp;quot;greeting ASC&amp;quot;&amp;gt;COM_HELLOWORLD_ORDERING_ASC&amp;lt;/option&amp;gt;&lt;br /&gt;
			&amp;lt;option value=&amp;quot;greeting DESC&amp;quot;&amp;gt;COM_HELLOWORLD_ORDERING_DESC&amp;lt;/option&amp;gt;&lt;br /&gt;
			&amp;lt;option value=&amp;quot;id ASC&amp;quot;&amp;gt;JGRID_HEADING_ID_ASC&amp;lt;/option&amp;gt;&lt;br /&gt;
			&amp;lt;option value=&amp;quot;id DESC&amp;quot;&amp;gt;JGRID_HEADING_ID_DESC&amp;lt;/option&amp;gt;&lt;br /&gt;
			&amp;lt;option value=&amp;quot;published ASC&amp;quot;&amp;gt;COM_HELLOWORLD_PUBLISHED_ASC&amp;lt;/option&amp;gt;&lt;br /&gt;
			&amp;lt;option value=&amp;quot;published DESC&amp;quot;&amp;gt;COM_HELLOWORLD_PUBLISHED_DESC&amp;lt;/option&amp;gt;&lt;br /&gt;
			&amp;lt;option value=&amp;quot;author ASC&amp;quot;&amp;gt;COM_HELLOWORLD_AUTHOR_ASC&amp;lt;/option&amp;gt;&lt;br /&gt;
			&amp;lt;option value=&amp;quot;author DESC&amp;quot;&amp;gt;COM_HELLOWORLD_AUTHOR_DESC&amp;lt;/option&amp;gt;&lt;br /&gt;
			&amp;lt;option value=&amp;quot;created ASC&amp;quot;&amp;gt;COM_HELLOWORLD_CREATED_ASC&amp;lt;/option&amp;gt;&lt;br /&gt;
			&amp;lt;option value=&amp;quot;created DESC&amp;quot;&amp;gt;COM_HELLOWORLD_CREATED_DESC&amp;lt;/option&amp;gt;&lt;br /&gt;
		&amp;lt;/field&amp;gt;&lt;br /&gt;
		&amp;lt;field&lt;br /&gt;
			name=&amp;quot;limit&amp;quot;&lt;br /&gt;
			type=&amp;quot;limitbox&amp;quot;&lt;br /&gt;
			class=&amp;quot;input-mini&amp;quot;&lt;br /&gt;
			default=&amp;quot;25&amp;quot;&lt;br /&gt;
			label=&amp;quot;COM_CONTENT_LIST_LIMIT&amp;quot;&lt;br /&gt;
			description=&amp;quot;COM_HELLOWORLD_LIST_LIMIT_DESC&amp;quot;&lt;br /&gt;
			onchange=&amp;quot;this.form.submit();&amp;quot;&lt;br /&gt;
		/&amp;gt;&lt;br /&gt;
	&amp;lt;/fields&amp;gt;&lt;br /&gt;
&amp;lt;/form&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;translate&amp;gt;&amp;lt;!--T:62--&amp;gt; The above status type field (second field element, with name=&amp;quot;published&amp;quot;) displays the status values &amp;quot;Trashed&amp;quot; and &amp;quot;Archived&amp;quot; which the Helloworld component doesn&#039;t support. We could define our own custom helloworldStatus type field which displayed only the publishing options, but as defining such custom fields has already been covered in the step [[S:MyLanguage/J3.x:Developing an MVC Component/Using the database|Using the database]] with our &amp;quot;helloworld&amp;quot; custom field, we won&#039;t bother with that here.&amp;lt;/translate&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;translate&amp;gt;&lt;br /&gt;
&amp;lt;!--T:59--&amp;gt;&lt;br /&gt;
Within the model we need to get the author and created date fields from the database, and we also need to add these to the &amp;lt;tt&amp;gt;filter_fields&amp;lt;/tt&amp;gt; array of fields which relate to sortable columns. &lt;br /&gt;
&amp;lt;/translate&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span id=&amp;quot;admin/models/helloworlds.php&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;tt&amp;gt;admin/models/helloworlds.php&amp;lt;/tt&amp;gt;&lt;br /&gt;
&amp;lt;source lang=&amp;quot;php&amp;quot; highlight=&amp;quot;34-35,55,62-64&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;?php&lt;br /&gt;
/**&lt;br /&gt;
 * @package     Joomla.Administrator&lt;br /&gt;
 * @subpackage  com_helloworld&lt;br /&gt;
 *&lt;br /&gt;
 * @copyright   Copyright (C) 2005 - 2018 Open Source Matters, Inc. All rights reserved.&lt;br /&gt;
 * @license     GNU General Public License version 2 or later; see LICENSE.txt&lt;br /&gt;
 */&lt;br /&gt;
// No direct access to this file&lt;br /&gt;
defined(&#039;_JEXEC&#039;) or die(&#039;Restricted access&#039;);&lt;br /&gt;
&lt;br /&gt;
/**&lt;br /&gt;
 * HelloWorldList Model&lt;br /&gt;
 *&lt;br /&gt;
 * @since  0.0.1&lt;br /&gt;
 */&lt;br /&gt;
class HelloWorldModelHelloWorlds extends JModelList&lt;br /&gt;
{&lt;br /&gt;
	/**&lt;br /&gt;
	 * Constructor.&lt;br /&gt;
	 *&lt;br /&gt;
	 * @param   array  $config  An optional associative array of configuration settings.&lt;br /&gt;
	 *&lt;br /&gt;
	 * @see     JController&lt;br /&gt;
	 * @since   1.6&lt;br /&gt;
	 */&lt;br /&gt;
	public function __construct($config = array())&lt;br /&gt;
	{&lt;br /&gt;
		if (empty($config[&#039;filter_fields&#039;]))&lt;br /&gt;
		{&lt;br /&gt;
			$config[&#039;filter_fields&#039;] = array(&lt;br /&gt;
				&#039;id&#039;,&lt;br /&gt;
				&#039;greeting&#039;,&lt;br /&gt;
				&#039;author&#039;,&lt;br /&gt;
				&#039;created&#039;,&lt;br /&gt;
				&#039;published&#039;&lt;br /&gt;
			);&lt;br /&gt;
		}&lt;br /&gt;
&lt;br /&gt;
		parent::__construct($config);&lt;br /&gt;
	}&lt;br /&gt;
&lt;br /&gt;
	/**&lt;br /&gt;
	 * Method to build an SQL query to load the list data.&lt;br /&gt;
	 *&lt;br /&gt;
	 * @return      string  An SQL query&lt;br /&gt;
	 */&lt;br /&gt;
	protected function getListQuery()&lt;br /&gt;
	{&lt;br /&gt;
		// Initialize variables.&lt;br /&gt;
		$db    = JFactory::getDbo();&lt;br /&gt;
		$query = $db-&amp;gt;getQuery(true);&lt;br /&gt;
&lt;br /&gt;
		// Create the base select statement.&lt;br /&gt;
		$query-&amp;gt;select(&#039;a.id as id, a.greeting as greeting, a.published as published, a.created as created&#039;)&lt;br /&gt;
			  -&amp;gt;from($db-&amp;gt;quoteName(&#039;#__helloworld&#039;, &#039;a&#039;));&lt;br /&gt;
&lt;br /&gt;
		// Join over the categories.&lt;br /&gt;
		$query-&amp;gt;select($db-&amp;gt;quoteName(&#039;c.title&#039;, &#039;category_title&#039;))&lt;br /&gt;
			-&amp;gt;join(&#039;LEFT&#039;, $db-&amp;gt;quoteName(&#039;#__categories&#039;, &#039;c&#039;) . &#039; ON c.id = a.catid&#039;);&lt;br /&gt;
        &lt;br /&gt;
		// Join with users table to get the username of the author&lt;br /&gt;
		$query-&amp;gt;select($db-&amp;gt;quoteName(&#039;u.username&#039;, &#039;author&#039;))&lt;br /&gt;
			-&amp;gt;join(&#039;LEFT&#039;, $db-&amp;gt;quoteName(&#039;#__users&#039;, &#039;u&#039;) . &#039; ON u.id = a.created_by&#039;);&lt;br /&gt;
            &lt;br /&gt;
		// Filter: like / search&lt;br /&gt;
		$search = $this-&amp;gt;getState(&#039;filter.search&#039;);&lt;br /&gt;
&lt;br /&gt;
		if (!empty($search))&lt;br /&gt;
		{&lt;br /&gt;
			$like = $db-&amp;gt;quote(&#039;%&#039; . $search . &#039;%&#039;);&lt;br /&gt;
			$query-&amp;gt;where(&#039;greeting LIKE &#039; . $like);&lt;br /&gt;
		}&lt;br /&gt;
&lt;br /&gt;
		// Filter by published state&lt;br /&gt;
		$published = $this-&amp;gt;getState(&#039;filter.published&#039;);&lt;br /&gt;
&lt;br /&gt;
		if (is_numeric($published))&lt;br /&gt;
		{&lt;br /&gt;
			$query-&amp;gt;where(&#039;a.published = &#039; . (int) $published);&lt;br /&gt;
		}&lt;br /&gt;
		elseif ($published === &#039;&#039;)&lt;br /&gt;
		{&lt;br /&gt;
			$query-&amp;gt;where(&#039;(a.published IN (0, 1))&#039;);&lt;br /&gt;
		}&lt;br /&gt;
&lt;br /&gt;
		// Add the list ordering clause.&lt;br /&gt;
		$orderCol	= $this-&amp;gt;state-&amp;gt;get(&#039;list.ordering&#039;, &#039;greeting&#039;);&lt;br /&gt;
		$orderDirn 	= $this-&amp;gt;state-&amp;gt;get(&#039;list.direction&#039;, &#039;asc&#039;);&lt;br /&gt;
&lt;br /&gt;
		$query-&amp;gt;order($db-&amp;gt;escape($orderCol) . &#039; &#039; . $db-&amp;gt;escape($orderDirn));&lt;br /&gt;
&lt;br /&gt;
		return $query;&lt;br /&gt;
	}&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&amp;lt;/span&amp;gt;&lt;br /&gt;
&amp;lt;translate&amp;gt;&lt;br /&gt;
==Updated Language Strings== &amp;lt;!--T:55--&amp;gt;&lt;br /&gt;
&amp;lt;/translate&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span id=&amp;quot;site/language/en-GB/en-GB.com_helloworld.ini&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;tt&amp;gt;site/language/en-GB/en-GB.com_helloworld.ini&amp;lt;/tt&amp;gt;&lt;br /&gt;
&amp;lt;source lang=&amp;quot;text&amp;quot; highlight=&amp;quot;1-20&amp;quot;&amp;gt;&lt;br /&gt;
; add new message form&lt;br /&gt;
COM_HELLOWORLD_LEGEND_DETAILS=&amp;quot;New Helloworld Message Details&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_HELLOWORLD_CREATING=&amp;quot;Add message&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_HELLOWORLD_ERROR_UNACCEPTABLE=&amp;quot;Sorry, you have an error&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_HELLOWORLD_DETAILS=&amp;quot;Message details&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_HELLOWORLD_GREETING_LABEL=&amp;quot;Greeting&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_HELLOWORLD_GREETING_DESC=&amp;quot;Please specify the greeting to add&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_HELLOWORLD_GREETING_HINT=&amp;quot;Letters only!&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_HELLOWORLD_FIELD_CATID_LABEL=&amp;quot;Category&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_HELLOWORLD_FIELD_CATID_DESC=&amp;quot;Please select the associated category&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_HELLOWORLD_MESSAGE_LABEL=&amp;quot;Reason&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_HELLOWORLD_MESSAGE_DESC=&amp;quot;Please say why you&#039;re adding this greeting&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_HELLOWORLD_MESSAGE_HINT=&amp;quot;No HTML tags!&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_HELLOWORLD_FIELD_CAPTCHA_LABEL=&amp;quot;Spam protection&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_HELLOWORLD_FIELD_CAPTCHA_DESC=&amp;quot;Prove you&#039;re a real person!&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_HELLOWORLD_FIELD_SHOW_CATEGORY_LABEL=&amp;quot;Display category or not?&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_HELLOWORLD_FIELD_SHOW_CATEGORY_DESC=&amp;quot;Select if you want the category displayed too&amp;quot;&lt;br /&gt;
; save and cancel confirmation messages&lt;br /&gt;
COM_HELLOWORLD_ADD_SUCCESSFUL=&amp;quot;New greeting successfully saved&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_ADD_CANCELLED=&amp;quot;New greeting cancelled ok&amp;quot;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span id=&amp;quot;admin/language/en-GB/en-GB.com_helloworld.sys.ini&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;tt&amp;gt;admin/language/en-GB/en-GB.com_helloworld.sys.ini&amp;lt;/tt&amp;gt;&lt;br /&gt;
&amp;lt;source lang=&amp;quot;text&amp;quot; highlight=&amp;quot;10-11&amp;quot;&amp;gt;&lt;br /&gt;
; Joomla! Project&lt;br /&gt;
; Copyright (C) 2005 - 2018 Open Source Matters. All rights reserved.&lt;br /&gt;
; License GNU General Public License version 2 or later; see LICENSE.txt, see LICENSE.php&lt;br /&gt;
; Note : All ini files need to be saved as UTF-8&lt;br /&gt;
&lt;br /&gt;
COM_HELLOWORLD=&amp;quot;Hello World!&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_DESCRIPTION=&amp;quot;This is the Hello World description&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_HELLOWORLD_VIEW_DEFAULT_TITLE=&amp;quot;Hello World&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_HELLOWORLD_VIEW_DEFAULT_DESC=&amp;quot;This view displays a selected message&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_ADD_VIEW_TITLE=&amp;quot;Hello World form&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_ADD_VIEW_DESC=&amp;quot;This displays a form to allow the user to enter a new message&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_INSTALL_TEXT=&amp;quot;HelloWorld Install script&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_MENU=&amp;quot;Hello World!&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_POSTFLIGHT_DISCOVER_INSTALL_TEXT=&amp;quot;HelloWorld postflight discover install script&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_POSTFLIGHT_INSTALL_TEXT=&amp;quot;HelloWorld postflight install script&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_POSTFLIGHT_UNINSTALL_TEXT=&amp;quot;HelloWorld postflight uninstall script&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_POSTFLIGHT_UPDATE_TEXT=&amp;quot;HelloWorld postflight update script&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_PREFLIGHT_DISCOVER_INSTALL_TEXT=&amp;quot;HelloWorld preflight discover install script&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_PREFLIGHT_INSTALL_TEXT=&amp;quot;HelloWorld preflight install script&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_PREFLIGHT_UNINSTALL_TEXT=&amp;quot;HelloWorld preflight uninstall script&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_PREFLIGHT_UPDATE_TEXT=&amp;quot;HelloWorld preflight update script&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_UNINSTALL_TEXT=&amp;quot;HelloWorld Uninstall script&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_UPDATE_TEXT=&amp;quot;HelloWorld Update script. HelloWorld now updated to version %s.&amp;quot;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span id=&amp;quot;admin/language/en-GB/en-GB.com_helloworld.ini&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;tt&amp;gt;admin/language/en-GB/en-GB.com_helloworld.ini&amp;lt;/tt&amp;gt;&lt;br /&gt;
&amp;lt;source lang=&amp;quot;text&amp;quot; highlight=&amp;quot;10-11,43-46,58-66&amp;quot;&amp;gt;&lt;br /&gt;
; Joomla! Project&lt;br /&gt;
; Copyright (C) 2005 - 2018 Open Source Matters. All rights reserved.&lt;br /&gt;
; License GNU General Public License version 2 or later; see LICENSE.txt, see LICENSE.php&lt;br /&gt;
; Note : All ini files need to be saved as UTF-8&lt;br /&gt;
&lt;br /&gt;
COM_HELLOWORLD_ADMINISTRATION=&amp;quot;HelloWorld - Administration&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_ADMINISTRATION_CATEGORIES=&amp;quot;HelloWorld - Categories&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_NUM=&amp;quot;#&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_HELLOWORLDS_FILTER=&amp;quot;Filters&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_AUTHOR=&amp;quot;Author&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_CREATED_DATE=&amp;quot;Created&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_PUBLISHED=&amp;quot;Published&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_HELLOWORLDS_NAME=&amp;quot;Name&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_ID=&amp;quot;Id&amp;quot;&lt;br /&gt;
&lt;br /&gt;
COM_HELLOWORLD_HELLOWORLD_CREATING=&amp;quot;HelloWorld - Creating&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_HELLOWORLD_DETAILS=&amp;quot;Details&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_HELLOWORLD_EDITING=&amp;quot;HelloWorld - Editing&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_HELLOWORLD_ERROR_UNACCEPTABLE=&amp;quot;Some values are unacceptable&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_HELLOWORLD_FIELD_CATID_DESC=&amp;quot;The category the messages belongs to&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_HELLOWORLD_FIELD_CATID_LABEL=&amp;quot;Category&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_HELLOWORLD_FIELD_GREETING_DESC=&amp;quot;This message will be displayed&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_HELLOWORLD_FIELD_GREETING_LABEL=&amp;quot;Message&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_HELLOWORLD_FIELD_SHOW_CATEGORY_LABEL=&amp;quot;Show category&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_HELLOWORLD_FIELD_SHOW_CATEGORY_DESC=&amp;quot;If set to Show, the title of the message&amp;amp;rsquo;s category will show.&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_HELLOWORLD_HEADING_GREETING=&amp;quot;Greeting&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_HELLOWORLD_HEADING_ID=&amp;quot;Id&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_MANAGER_HELLOWORLD_EDIT=&amp;quot;HelloWorld manager: Edit Message&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_MANAGER_HELLOWORLD_NEW=&amp;quot;HelloWorld manager: New Message&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_MANAGER_HELLOWORLDS=&amp;quot;HelloWorld manager&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_EDIT_HELLOWORLD=&amp;quot;Edit message&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_N_ITEMS_DELETED_1=&amp;quot;One message deleted&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_N_ITEMS_DELETED_MORE=&amp;quot;%d messages deleted&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_N_ITEMS_PUBLISHED=&amp;quot;%d message(s) published&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_N_ITEMS_UNPUBLISHED=&amp;quot;%d message(s) unpublished&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_HELLOWORLD_GREETING_LABEL=&amp;quot;Greeting&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_HELLOWORLD_GREETING_DESC=&amp;quot;Add Hello World Greeting&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_SUBMENU_MESSAGES=&amp;quot;Messages&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_SUBMENU_CATEGORIES=&amp;quot;Categories&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_CONFIGURATION=&amp;quot;HelloWorld Configuration&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_CONFIG_GREETING_SETTINGS_LABEL=&amp;quot;Messages settings&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_CONFIG_GREETING_SETTINGS_DESC=&amp;quot;Settings that will be applied to all messages by default&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_HELLOWORLD_FIELD_CAPTCHA_LABEL=&amp;quot;Captcha&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_HELLOWORLD_FIELD_CAPTCHA_DESC=&amp;quot;Select Captcha to use on front end form&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_HELLOWORLD_FIELD_USER_TO_EMAIL_LABEL=&amp;quot;User to email&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_HELLOWORLD_FIELD_USER_TO_EMAIL_DESC=&amp;quot;Select user to email when a new message is entered on front end&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_FIELDSET_RULES=&amp;quot;Message Permissions&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_FIELD_RULES_LABEL=&amp;quot;Permissions&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_ACCESS_DELETE_DESC=&amp;quot;Is this group allowed to edit this message?&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_ACCESS_DELETE_DESC=&amp;quot;Is this group allowed to delete this message?&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_TAB_NEW_MESSAGE=&amp;quot;New Message&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_TAB_EDIT_MESSAGE=&amp;quot;Message Details&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_TAB_PARAMS=&amp;quot;Parameters&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_TAB_PERMISSIONS=&amp;quot;Permissions&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_LEGEND_DETAILS=&amp;quot;Message Details&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_LEGEND_PARAMS=&amp;quot;Message Parameters&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_LEGEND_PERMISSIONS=&amp;quot;Message Permissions&amp;quot;&lt;br /&gt;
; Column ordering in the Helloworlds view&lt;br /&gt;
COM_HELLOWORLD_ORDERING_ASC=&amp;quot;Greeting ascending&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_ORDERING_DESC=&amp;quot;Greeting descending&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_AUTHOR_ASC=&amp;quot;Author ascending&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_AUTHOR_DESC=&amp;quot;Author descending&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_CREATED_ASC=&amp;quot;Creation date ascending&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_CREATED_DESC=&amp;quot;Creation date descending&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_PUBLISHED_ASC=&amp;quot;Unpublished first&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_PUBLISHED_DESC=&amp;quot;Published first&amp;quot;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;translate&amp;gt;&lt;br /&gt;
==Packaging the Component== &amp;lt;!--T:56--&amp;gt;&lt;br /&gt;
&amp;lt;/translate&amp;gt;&lt;br /&gt;
&amp;lt;translate&amp;gt;&amp;lt;!--T:57--&amp;gt; Contents of your code directory. Each file link below takes you to the step in the tutorial which has the latest version of that source code file.&amp;lt;/translate&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Adding_a_front-end_form#helloworld.xml|helloworld.xml]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Adding an install-uninstall-update script file#script.php|script.php]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Adding_a_view_to_the_site_part#site/helloworld.php|site/helloworld.php]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Developing_a_Basic_Component#index.html|site/index.html]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Adding_a_view_to_the_site_part#site/controller.php|site/controller.php]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Adding_a_front-end_form#site/controllers/helloworld.php|site/controllers/helloworld.php]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Developing_a_Basic_Component#index.html|site/views/index.html]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Developing_a_Basic_Component#index.html|site/views/helloworld/index.html]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Adding_configuration#site/views/helloworld/view.html.php|site/views/helloworld/view.html.php]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Developing_a_Basic_Component#index.html|site/views/helloworld/tmpl/index.html]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Using_the_database#site/views/helloworld/tmpl/default.xml|site/views/helloworld/tmpl/default.xml]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Adding_configuration#site/views/helloworld/tmpl/default.php|site/views/helloworld/tmpl/default.php]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Developing_a_Basic_Component#index.html|site/views/form/index.html]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Adding_a_front-end_form#site/views/form/view.html.php|site/views/form/view.html.php]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Developing_a_Basic_Component#index.html|site/views/form/tmpl/index.html]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Adding_a_front-end_form#site/views/form/tmpl/edit.php|site/views/form/tmpl/edit.php]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Adding_a_front-end_form#site/views/form/tmpl/edit.xml|site/views/form/tmpl/edit.xml]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Developing_a_Basic_Component#index.html|site/models/index.html]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Adding_configuration#site/models/helloworld.php|site/models/helloworld.php]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Adding_a_front-end_form#site/models/form.php|site/models/form.php]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Developing_a_Basic_Component#index.html|site/models/forms/index.html]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Adding_a_front-end_form#site/models/forms/add-form.xml|site/models/forms/add-form.xml]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Developing_a_Basic_Component#index.html|site/language/index.html]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Developing_a_Basic_Component#index.html|site/language/en-GB/index.html]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.x:Developing an MVC Component/Adding_a_front-end_form#site/language/en-GB/en-GB.com_helloworld.ini|site/language/en-GB/en-GB.com_helloworld.ini]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Developing_a_Basic_Component#index.html|admin/index.html]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Adding_ACL#admin/helloworld.php|admin/helloworld.php]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Adding_ACL#admin/config.xml|admin/config.xml]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Basic_backend#admin/controller.php|admin/controller.php]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Adding_ACL#admin/access.xml|admin/access.xml]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Adding_categories#admin/helpers/helloworld.php|admin/helpers/helloworld.php]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Developing_a_Basic_Component#index.html|admin/helpers/index.html]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Developing_a_Basic_Component#index.html|admin/sql/index.html]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Adding_a_front-end_form#admin/sql/install.mysql.utf8.sql|admin/sql/install.mysql.utf8.sql]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Using_the_database#admin/sql/uninstall.mysql.utf8.sql|admin/sql/uninstall.mysql.utf8.sql]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Developing_a_Basic_Component#index.html|admin/sql/updates/index.html]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Developing_a_Basic_Component#index.html|admin/sql/updates/mysql/index.html]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Developing_a_Basic_Component#admin/sql/updates/mysql/0.0.1.sql|admin/sql/updates/mysql/0.0.1.sql]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Using_the_database#admin/sql/install.mysql.utf8.sql|admin/sql/updates/mysql/0.0.6.sql]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Adding_categories#admin/sql/updates/mysql/0.0.12.sql|admin/sql/updates/mysql/0.0.12.sql]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Adding_configuration#admin/sql/updates/mysql/0.0.13.sql|admin/sql/updates/mysql/0.0.13.sql]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Adding_ACL#admin/sql/updates/mysql/0.0.14.sql|admin/sql/updates/mysql/0.0.14.sql]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Adding_a_front-end_form#admin/sql/updates/mysql/0.0.16.sql|admin/sql/updates/mysql/0.0.16.sql]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Developing_a_Basic_Component#index.html|admin/models/index.html]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Developing_a_Basic_Component#index.html|admin/models/fields/index.html]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Adding_categories#admin/models/fields/helloworld.php|admin/models/fields/helloworld.php]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Adding_a_front-end_form#admin/models/helloworlds.php|admin/models/helloworlds.php]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Adding_ACL#admin/models/helloworld.php|admin/models/helloworld.php]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Adding_a_front-end_form#admin/models/forms/filter_helloworlds.xml|admin/models/forms/filter_helloworlds.xml]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Developing_a_Basic_Component#index.html|admin/models/forms/index.html]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Adding_verifications#admin/models/forms/helloworld.js|admin/models/forms/helloworld.js]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Adding_ACL#admin/models/forms/helloworld.xml|admin/models/forms/helloworld.xml]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Adding_verifications#admin/models/rules/greeting.php|admin/models/rules/greeting.php]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Developing_a_Basic_Component#index.html|admin/models/rules/index.html]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Adding_ACL#admin/controllers/helloworld.php|admin/controllers/helloworld.php]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Adding_backend_actions#admin/controllers/helloworlds.php|admin/controllers/helloworlds.php]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Developing_a_Basic_Component#index.html|admin/controllers/index.html]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Developing_a_Basic_Component#index.html|admin/views/index.html]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Developing_a_Basic_Component#index.html|admin/views/helloworld/index.html]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Adding_ACL#admin/views/helloworld/view.html.php|admin/views/helloworld/view.html.php]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Developing_a_Basic_Component#index.html|admin/views/helloworld/tmpl/index.html]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Adding_ACL#admin/views/helloworld/tmpl/edit.php|admin/views/helloworld/tmpl/edit.php]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Adding_verifications#admin/views/helloworld/submitbutton.js|admin/views/helloworld/submitbutton.js]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Developing_a_Basic_Component#index.html|admin/views/helloworlds/index.html]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Adding_a_front-end_form#admin/views/helloworlds/view.html.php|admin/views/helloworlds/view.html.php]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Developing_a_Basic_Component#index.html|admin/views/helloworlds/tmpl/index.html]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Adding_a_front-end_form#admin/views/helloworlds/tmpl/default.php|admin/views/helloworlds/tmpl/default.php]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Developing_a_Basic_Component#index.html|admin/tables/index.html]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Adding_ACL#admin/tables/helloworld.php|admin/tables/helloworld.php]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Developing_a_Basic_Component#index.html|admin/language/index.html]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Developing_a_Basic_Component#index.html|admin/language/en-GB/index.html]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.x:Developing an MVC Component/Adding_a_front-end_form#admin.2Flanguage.2Fen-GB.2Fen-GB.com_helloworld.ini|admin/language/en-GB/en-GB.com_helloworld.ini]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.x:Developing an MVC Component/Adding_a_front-end_form#admin.2Flanguage.2Fen-GB.2Fen-GB.com_helloworld.sys.ini|admin/language/en-GB/en-GB.com_helloworld.sys.ini]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Developing_a_Basic_Component#index.html|media/index.html]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Developing_a_Basic_Component#index.html|media/images/index.html]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.x:Developing_an_MVC_Component/Adding_decorations_to_the_backend#Adding_some_icons|media/images/tux-16x16.png]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.x:Developing_an_MVC_Component/Adding_decorations_to_the_backend#Adding_some_icons|media/images/tux-48x48.png]]&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span id=&amp;quot;helloworld.xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;tt&amp;gt;helloworld.xml&amp;lt;/tt&amp;gt;&lt;br /&gt;
&amp;lt;source lang=&amp;quot;xml&amp;quot; highlight=&amp;quot;13,44&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;?xml version=&amp;quot;1.0&amp;quot; encoding=&amp;quot;utf-8&amp;quot;?&amp;gt;&lt;br /&gt;
&amp;lt;extension type=&amp;quot;component&amp;quot; version=&amp;quot;3.0&amp;quot; method=&amp;quot;upgrade&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
	&amp;lt;name&amp;gt;COM_HELLOWORLD&amp;lt;/name&amp;gt;&lt;br /&gt;
	&amp;lt;!-- The following elements are optional and free of formatting constraints --&amp;gt;&lt;br /&gt;
	&amp;lt;creationDate&amp;gt;January 2018&amp;lt;/creationDate&amp;gt;&lt;br /&gt;
	&amp;lt;author&amp;gt;John Doe&amp;lt;/author&amp;gt;&lt;br /&gt;
	&amp;lt;authorEmail&amp;gt;john.doe@example.org&amp;lt;/authorEmail&amp;gt;&lt;br /&gt;
	&amp;lt;authorUrl&amp;gt;http://www.example.org&amp;lt;/authorUrl&amp;gt;&lt;br /&gt;
	&amp;lt;copyright&amp;gt;Copyright Info&amp;lt;/copyright&amp;gt;&lt;br /&gt;
	&amp;lt;license&amp;gt;License Info&amp;lt;/license&amp;gt;&lt;br /&gt;
	&amp;lt;!--  The version string is recorded in the components table --&amp;gt;&lt;br /&gt;
	&amp;lt;version&amp;gt;0.0.16&amp;lt;/version&amp;gt;&lt;br /&gt;
	&amp;lt;!-- The description is optional and defaults to the name --&amp;gt;&lt;br /&gt;
	&amp;lt;description&amp;gt;COM_HELLOWORLD_DESCRIPTION&amp;lt;/description&amp;gt;&lt;br /&gt;
&lt;br /&gt;
	&amp;lt;!-- Runs on install/uninstall/update; New in 2.5 --&amp;gt;&lt;br /&gt;
	&amp;lt;scriptfile&amp;gt;script.php&amp;lt;/scriptfile&amp;gt;&lt;br /&gt;
&lt;br /&gt;
	&amp;lt;install&amp;gt; &amp;lt;!-- Runs on install --&amp;gt;&lt;br /&gt;
		&amp;lt;sql&amp;gt;&lt;br /&gt;
			&amp;lt;file driver=&amp;quot;mysql&amp;quot; charset=&amp;quot;utf8&amp;quot;&amp;gt;sql/install.mysql.utf8.sql&amp;lt;/file&amp;gt;&lt;br /&gt;
		&amp;lt;/sql&amp;gt;&lt;br /&gt;
	&amp;lt;/install&amp;gt;&lt;br /&gt;
	&amp;lt;uninstall&amp;gt; &amp;lt;!-- Runs on uninstall --&amp;gt;&lt;br /&gt;
		&amp;lt;sql&amp;gt;&lt;br /&gt;
			&amp;lt;file driver=&amp;quot;mysql&amp;quot; charset=&amp;quot;utf8&amp;quot;&amp;gt;sql/uninstall.mysql.utf8.sql&amp;lt;/file&amp;gt;&lt;br /&gt;
		&amp;lt;/sql&amp;gt;&lt;br /&gt;
	&amp;lt;/uninstall&amp;gt;&lt;br /&gt;
	&amp;lt;update&amp;gt; &amp;lt;!-- Runs on update; New since J2.5 --&amp;gt;&lt;br /&gt;
		&amp;lt;schemas&amp;gt;&lt;br /&gt;
			&amp;lt;schemapath type=&amp;quot;mysql&amp;quot;&amp;gt;sql/updates/mysql&amp;lt;/schemapath&amp;gt;&lt;br /&gt;
		&amp;lt;/schemas&amp;gt;&lt;br /&gt;
	&amp;lt;/update&amp;gt;&lt;br /&gt;
&lt;br /&gt;
	&amp;lt;!-- Site Main File Copy Section --&amp;gt;&lt;br /&gt;
	&amp;lt;!-- Note the folder attribute: This attribute describes the folder&lt;br /&gt;
		to copy FROM in the package to install therefore files copied&lt;br /&gt;
		in this section are copied from /site/ in the package --&amp;gt;&lt;br /&gt;
	&amp;lt;files folder=&amp;quot;site&amp;quot;&amp;gt;&lt;br /&gt;
		&amp;lt;filename&amp;gt;index.html&amp;lt;/filename&amp;gt;&lt;br /&gt;
		&amp;lt;filename&amp;gt;helloworld.php&amp;lt;/filename&amp;gt;&lt;br /&gt;
		&amp;lt;filename&amp;gt;controller.php&amp;lt;/filename&amp;gt;&lt;br /&gt;
		&amp;lt;folder&amp;gt;controllers&amp;lt;/folder&amp;gt;&lt;br /&gt;
		&amp;lt;folder&amp;gt;views&amp;lt;/folder&amp;gt;&lt;br /&gt;
		&amp;lt;folder&amp;gt;models&amp;lt;/folder&amp;gt;&lt;br /&gt;
	&amp;lt;/files&amp;gt;&lt;br /&gt;
&lt;br /&gt;
        &amp;lt;languages folder=&amp;quot;site/language&amp;quot;&amp;gt;&lt;br /&gt;
		&amp;lt;language tag=&amp;quot;en-GB&amp;quot;&amp;gt;en-GB/en-GB.com_helloworld.ini&amp;lt;/language&amp;gt;&lt;br /&gt;
        &amp;lt;/languages&amp;gt;&lt;br /&gt;
&lt;br /&gt;
	&amp;lt;media destination=&amp;quot;com_helloworld&amp;quot; folder=&amp;quot;media&amp;quot;&amp;gt;&lt;br /&gt;
		&amp;lt;filename&amp;gt;index.html&amp;lt;/filename&amp;gt;&lt;br /&gt;
		&amp;lt;folder&amp;gt;images&amp;lt;/folder&amp;gt;&lt;br /&gt;
	&amp;lt;/media&amp;gt;&lt;br /&gt;
&lt;br /&gt;
	&amp;lt;administration&amp;gt;&lt;br /&gt;
		&amp;lt;!-- Administration Menu Section --&amp;gt;&lt;br /&gt;
		&amp;lt;menu link=&#039;index.php?option=com_helloworld&#039; img=&amp;quot;../media/com_helloworld/images/tux-16x16.png&amp;quot;&amp;gt;COM_HELLOWORLD_MENU&amp;lt;/menu&amp;gt;&lt;br /&gt;
		&amp;lt;!-- Administration Main File Copy Section --&amp;gt;&lt;br /&gt;
		&amp;lt;!-- Note the folder attribute: This attribute describes the folder&lt;br /&gt;
			to copy FROM in the package to install therefore files copied&lt;br /&gt;
			in this section are copied from /admin/ in the package --&amp;gt;&lt;br /&gt;
		&amp;lt;files folder=&amp;quot;admin&amp;quot;&amp;gt;&lt;br /&gt;
			&amp;lt;!-- Admin Main File Copy Section --&amp;gt;&lt;br /&gt;
			&amp;lt;filename&amp;gt;index.html&amp;lt;/filename&amp;gt;&lt;br /&gt;
			&amp;lt;filename&amp;gt;config.xml&amp;lt;/filename&amp;gt;&lt;br /&gt;
			&amp;lt;filename&amp;gt;helloworld.php&amp;lt;/filename&amp;gt;&lt;br /&gt;
			&amp;lt;filename&amp;gt;controller.php&amp;lt;/filename&amp;gt;&lt;br /&gt;
			&amp;lt;filename&amp;gt;access.xml&amp;lt;/filename&amp;gt;&lt;br /&gt;
			&amp;lt;!-- SQL files section --&amp;gt;&lt;br /&gt;
			&amp;lt;folder&amp;gt;sql&amp;lt;/folder&amp;gt;&lt;br /&gt;
			&amp;lt;!-- tables files section --&amp;gt;&lt;br /&gt;
			&amp;lt;folder&amp;gt;tables&amp;lt;/folder&amp;gt;&lt;br /&gt;
			&amp;lt;!-- models files section --&amp;gt;&lt;br /&gt;
			&amp;lt;folder&amp;gt;models&amp;lt;/folder&amp;gt;&lt;br /&gt;
			&amp;lt;!-- views files section --&amp;gt;&lt;br /&gt;
			&amp;lt;folder&amp;gt;views&amp;lt;/folder&amp;gt;&lt;br /&gt;
			&amp;lt;!-- controllers files section --&amp;gt;&lt;br /&gt;
			&amp;lt;folder&amp;gt;controllers&amp;lt;/folder&amp;gt;&lt;br /&gt;
			&amp;lt;!-- helpers files section --&amp;gt;&lt;br /&gt;
			&amp;lt;folder&amp;gt;helpers&amp;lt;/folder&amp;gt;&lt;br /&gt;
		&amp;lt;/files&amp;gt;&lt;br /&gt;
		&amp;lt;languages folder=&amp;quot;admin/language&amp;quot;&amp;gt;&lt;br /&gt;
        		&amp;lt;language tag=&amp;quot;en-GB&amp;quot;&amp;gt;en-GB/en-GB.com_helloworld.ini&amp;lt;/language&amp;gt;&lt;br /&gt;
                        &amp;lt;language tag=&amp;quot;en-GB&amp;quot;&amp;gt;en-GB/en-GB.com_helloworld.sys.ini&amp;lt;/language&amp;gt;&lt;br /&gt;
		&amp;lt;/languages&amp;gt;&lt;br /&gt;
	&amp;lt;/administration&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/extension&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;translate&amp;gt;&lt;br /&gt;
== Contributors == &amp;lt;!--T:58--&amp;gt;&lt;br /&gt;
&amp;lt;/translate&amp;gt;&lt;br /&gt;
*[[User:Robbiej|Robbie Jackson]]&lt;br /&gt;
&lt;br /&gt;
{{-}}&lt;br /&gt;
&amp;lt;div class=&amp;quot;row&amp;quot;&amp;gt; &lt;br /&gt;
&amp;lt;div class=&amp;quot;large-6 columns&amp;quot;&amp;gt;{{Basic button|&amp;lt;translate&amp;gt;&amp;lt;!--T:4--&amp;gt; S:MyLanguage/J3.x:Developing_an_MVC_Component/Adding_an_install-uninstall-update_script_file|Prev: Adding an install-uninstall-update script file&amp;lt;/translate&amp;gt;|class=expand success}}&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;div class=&amp;quot;large-6 columns&amp;quot;&amp;gt;{{Basic button|&amp;lt;translate&amp;gt;&amp;lt;!--T:5--&amp;gt; S:MyLanguage/J3.x:Developing_an_MVC_Component/Adding an Image|Next: Adding an image&amp;lt;/translate&amp;gt;|class=expand}}&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;noinclude&amp;gt;&lt;br /&gt;
[[Category:Joomla! 3.x{{#translation:}}]]&lt;br /&gt;
[[Category:Joomla! 3.0{{#translation:}}]]&lt;br /&gt;
[[Category:Joomla! 3.1{{#translation:}}]]&lt;br /&gt;
[[Category:Joomla! 3.2{{#translation:}}]]&lt;br /&gt;
[[Category:Joomla! 3.3{{#translation:}}]]&lt;br /&gt;
[[Category:Joomla! 3.4{{#translation:}}]]&lt;br /&gt;
[[Category:Beginner Development{{#translation:}}]]&lt;br /&gt;
[[Category:Component Development{{#translation:}}]]&lt;br /&gt;
[[Category:Tutorials{{#translation:}}]]&lt;br /&gt;
[[Category:Tutorials in a Series{{#translation:}}]]&lt;br /&gt;
&amp;lt;/noinclude&amp;gt;&lt;/div&gt;</summary>
		<author><name>Stan31337</name></author>
	</entry>
	<entry>
		<id>https://docs.sandbox.joomla.org/index.php?title=J3.x:Developing_an_MVC_Component/Adding_a_front-end_form&amp;diff=589123</id>
		<title>J3.x:Developing an MVC Component/Adding a front-end form</title>
		<link rel="alternate" type="text/html" href="https://docs.sandbox.joomla.org/index.php?title=J3.x:Developing_an_MVC_Component/Adding_a_front-end_form&amp;diff=589123"/>
		<updated>2019-01-30T08:20:58Z</updated>

		<summary type="html">&lt;p&gt;Stan31337: 15 and 16 lines also changed&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;noinclude&amp;gt;&amp;lt;languages /&amp;gt;&amp;lt;/noinclude&amp;gt;&lt;br /&gt;
{{:J3.1:Developing an MVC Component/&amp;lt;translate&amp;gt;&amp;lt;!--T:1--&amp;gt;&lt;br /&gt;
en&amp;lt;/translate&amp;gt;}}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;translate&amp;gt;&amp;lt;!--T:3--&amp;gt; This tutorial is part of the [[S:MyLanguage/J3.x:Developing_an_MVC_Component/Introduction|Developing a MVC Component for Joomla! 3.x]] tutorial. You are encouraged to read the previous parts of the tutorial before reading this.&amp;lt;/translate&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;translate&amp;gt;&lt;br /&gt;
== Introduction == &amp;lt;!--T:6--&amp;gt;&lt;br /&gt;
&amp;lt;/translate&amp;gt;&lt;br /&gt;
&amp;lt;translate&amp;gt;&amp;lt;!--T:7--&amp;gt; In this step we add a form to the site front end to allow users to add a new Helloworld record. You could adapt the code in this step to provide a range of front-end data entry functionality, from, eg&amp;lt;/translate&amp;gt;&lt;br /&gt;
* &amp;lt;translate&amp;gt;&amp;lt;!--T:8--&amp;gt; a registration form to allow visitors to the site to express interest, to,&amp;lt;/translate&amp;gt; &lt;br /&gt;
* &amp;lt;translate&amp;gt;&amp;lt;!--T:9--&amp;gt; a facility to allow suppliers to maintain the data in certain tables, but without giving them access to the back end administration functionality&amp;lt;/translate&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;translate&amp;gt;&amp;lt;!--T:63--&amp;gt; There are two videos associated with this step, covering the [https://youtu.be/2NStYpB5JQM overall approach] and [https://youtu.be/t3IxuWQfa6E other topics] raised here.&amp;lt;/translate&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*&amp;lt;translate&amp;gt;&amp;lt;!--T:60--&amp;gt; Overall approach&amp;lt;/translate&amp;gt;&lt;br /&gt;
{{#widget:YouTube|id=2NStYpB5JQM}}&lt;br /&gt;
*&amp;lt;translate&amp;gt;&amp;lt;!--T:61--&amp;gt; Other topics&amp;lt;/translate&amp;gt;&lt;br /&gt;
{{#widget:YouTube|id=t3IxuWQfa6E}}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;translate&amp;gt;&lt;br /&gt;
== Functionality == &amp;lt;!--T:10--&amp;gt;&lt;br /&gt;
&amp;lt;/translate&amp;gt;&lt;br /&gt;
&amp;lt;translate&amp;gt;&amp;lt;!--T:11--&amp;gt; In this step we will build the following functionality:&amp;lt;/translate&amp;gt;&lt;br /&gt;
* &amp;lt;translate&amp;gt;&amp;lt;!--T:12--&amp;gt; a front-end form that allows someone to enter a new helloworld record, together with Save and Cancel buttons.&amp;lt;/translate&amp;gt;&lt;br /&gt;
* &amp;lt;translate&amp;gt;&amp;lt;!--T:13--&amp;gt; additional fields in the helloworld database table to capture the user who entered the record, and the creation date/time&amp;lt;/translate&amp;gt;&lt;br /&gt;
* &amp;lt;translate&amp;gt;&amp;lt;!--T:14--&amp;gt; validation of the data entered into the fields, including removing dangerous items such as html tags&amp;lt;/translate&amp;gt;&lt;br /&gt;
* &amp;lt;translate&amp;gt;&amp;lt;!--T:15--&amp;gt; access control on the form, controlling who can add a new record&amp;lt;/translate&amp;gt;&lt;br /&gt;
* &amp;lt;translate&amp;gt;&amp;lt;!--T:16--&amp;gt; an email to an administrator, to indicate that someone has entered a new record (and we&#039;ll include a field on the form where the user can include some text which just goes into the email)&amp;lt;/translate&amp;gt;&lt;br /&gt;
* &amp;lt;translate&amp;gt;&amp;lt;!--T:17--&amp;gt; a captcha on the form&amp;lt;/translate&amp;gt;&lt;br /&gt;
* &amp;lt;translate&amp;gt;&amp;lt;!--T:18--&amp;gt; a front-end menu item which points to the form (ie how users get access to the form)&amp;lt;/translate&amp;gt;&lt;br /&gt;
* &amp;lt;translate&amp;gt;&amp;lt;!--T:19--&amp;gt; update to the admin helloworlds view to include the author and creation date in the display.&amp;lt;/translate&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;translate&amp;gt;&lt;br /&gt;
== Approach == &amp;lt;!--T:20--&amp;gt;&lt;br /&gt;
&amp;lt;/translate&amp;gt;&lt;br /&gt;
&amp;lt;translate&amp;gt;&amp;lt;!--T:21--&amp;gt; Providing a form on the site front end is pretty much the same as on the admin back end, so much of what is developed in this step reflects what was done in the step [[S:MyLanguage/J3.x:Developing an MVC Component/Adding backend actions|Adding backend actions]], and in particular the Edit form for helloworld messages.&amp;lt;/translate&amp;gt; &lt;br /&gt;
&amp;lt;translate&amp;gt;&lt;br /&gt;
&amp;lt;!--T:22--&amp;gt;&lt;br /&gt;
For this form we&#039;ll use (all in the site part)&lt;br /&gt;
* the same main helloworld controller (controller.php)&lt;br /&gt;
* a new view – which we&#039;ll call &amp;quot;form&amp;quot;&lt;br /&gt;
* a new layout, associated with the form view, which we&#039;ll call &amp;quot;edit&amp;quot; (like the admin layout file)&lt;br /&gt;
* a new model – which we&#039;ll call &amp;quot;form&amp;quot; also, to align with the view&lt;br /&gt;
* an xml file for the form, which we&#039;ll put in add-form.xml in the model&amp;lt;/translate&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;translate&amp;gt;&amp;lt;!--T:23--&amp;gt; In addition we&#039;ll need to handle the HTTP POST requests arising from the user pressing the Save and Cancel buttons, and we&#039;ll do this in:&amp;lt;/translate&amp;gt;&lt;br /&gt;
&amp;lt;translate&amp;gt;&amp;lt;!--T:24--&amp;gt;&lt;br /&gt;
* a new helloworld controller in the controllers directory (handling Save and Cancel)&lt;br /&gt;
* the same form.php model as above (handling Save)&amp;lt;/translate&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;translate&amp;gt;&amp;lt;!--T:25--&amp;gt; Upon completion of Save/Cancel we&#039;ll redirect back to the same form.&amp;lt;/translate&amp;gt;&lt;br /&gt;
&amp;lt;translate&amp;gt;&lt;br /&gt;
&amp;lt;!--T:26--&amp;gt;&lt;br /&gt;
As for the admin case, we&#039;ll consider our classes extending some of the controller and model classes which are richer in functionality that the simple legacy ones&amp;lt;/translate&amp;gt;&lt;br /&gt;
&amp;lt;translate&amp;gt;&amp;lt;!--T:27--&amp;gt;&lt;br /&gt;
* the model will extend JModelAdmin (which supports forms, as well as saving records to the database) - even though it&#039;s called JModelAdmin it&#039;s still available within the site part&lt;br /&gt;
* the controller handling the POST will extend JControllerForm (which includes the cancel() and save() methods).&amp;lt;/translate&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;translate&amp;gt;&amp;lt;!--T:28--&amp;gt; Some of the other aspects in this step will involve using the techniques covered in earlier steps, namely [[S:MyLanguage/J3.x:Developing an MVC Component/Adding a menu type to the site part|Adding a menu type to the site part]], [[S:MyLanguage/J3.x:Developing an MVC Component/Adding verifications|Adding verifications]], [[S:MyLanguage/J3.x:Developing an MVC Component/Adding configuration|Adding configuration]] and [[S:MyLanguage/J3.x:Developing an MVC Component/Adding ACL|Adding ACL]].&amp;lt;/translate&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;translate&amp;gt;&lt;br /&gt;
==Updating the Database== &amp;lt;!--T:29--&amp;gt;&lt;br /&gt;
&amp;lt;/translate&amp;gt;&lt;br /&gt;
&amp;lt;translate&amp;gt;&amp;lt;!--T:30--&amp;gt; We need to add the two new fields to our install and update scripts. To record who added the new helloworld greeting we&#039;ll store the user&#039;s userid, and this will be zero if the user is not logged on.&amp;lt;/translate&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;span id=&amp;quot;admin/sql/install.mysql.utf8.sql&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;tt&amp;gt;admin/sql/install.mysql.utf8.sql&amp;lt;/tt&amp;gt;&lt;br /&gt;
&amp;lt;source lang=&amp;quot;sql&amp;quot; highlight=&amp;quot;6,7&amp;quot;&amp;gt;&lt;br /&gt;
DROP TABLE IF EXISTS `#__helloworld`;&lt;br /&gt;
&lt;br /&gt;
CREATE TABLE `#__helloworld` (&lt;br /&gt;
	`id`       INT(11)     NOT NULL AUTO_INCREMENT,&lt;br /&gt;
	`asset_id` INT(10)     NOT NULL DEFAULT &#039;0&#039;,&lt;br /&gt;
	`created`  DATETIME    NOT NULL DEFAULT &#039;0000-00-00 00:00:00&#039;,&lt;br /&gt;
	`created_by`  INT(10) UNSIGNED NOT NULL DEFAULT &#039;0&#039;,&lt;br /&gt;
	`greeting` VARCHAR(25) NOT NULL,&lt;br /&gt;
	`published` tinyint(4) NOT NULL DEFAULT &#039;1&#039;,&lt;br /&gt;
	`catid`	    int(11)    NOT NULL DEFAULT &#039;0&#039;,&lt;br /&gt;
	`params`   VARCHAR(1024) NOT NULL DEFAULT &#039;&#039;,&lt;br /&gt;
	PRIMARY KEY (`id`)&lt;br /&gt;
)&lt;br /&gt;
	ENGINE =MyISAM&lt;br /&gt;
	AUTO_INCREMENT =0&lt;br /&gt;
	DEFAULT CHARSET =utf8;&lt;br /&gt;
&lt;br /&gt;
INSERT INTO `#__helloworld` (`greeting`) VALUES&lt;br /&gt;
(&#039;Hello World!&#039;),&lt;br /&gt;
(&#039;Goodbye World!&#039;);&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span id=&amp;quot;admin/sql/updates/mysql/0.0.16.sql&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;tt&amp;gt;/admin/sql/updates/mysql/0.0.16.sql&amp;lt;/tt&amp;gt;&lt;br /&gt;
&amp;lt;source lang=&amp;quot;sql&amp;quot;&amp;gt;&lt;br /&gt;
ALTER TABLE`#__helloworld` ADD COLUMN `created` DATETIME NOT NULL DEFAULT &#039;0000-00-00 00:00:00&#039; AFTER `asset_id`;&lt;br /&gt;
ALTER TABLE`#__helloworld` ADD COLUMN `created_by` INT(10) UNSIGNED NOT NULL DEFAULT &#039;0&#039; AFTER `created`;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;translate&amp;gt;&lt;br /&gt;
==Adding a menu item== &amp;lt;!--T:31--&amp;gt;&lt;br /&gt;
&amp;lt;/translate&amp;gt;&lt;br /&gt;
&amp;lt;translate&amp;gt;&amp;lt;!--T:32--&amp;gt; To enable a menu item to point to the form, we need to put an xml file into the associated layout directory. Extend your directory structure (remembering to include the index.html file in each new subdirectory which you create) and put the following into&amp;lt;/translate&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span id=&amp;quot;site/views/form/tmpl/edit.xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;tt&amp;gt;site/views/form/tmpl/edit.xml&amp;lt;/tt&amp;gt;&lt;br /&gt;
&amp;lt;source lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;?xml version=&amp;quot;1.0&amp;quot; encoding=&amp;quot;utf-8&amp;quot;?&amp;gt;&lt;br /&gt;
&amp;lt;metadata&amp;gt;&lt;br /&gt;
	&amp;lt;layout title=&amp;quot;COM_HELLOWORLD_ADD_VIEW_TITLE&amp;quot;&amp;gt;&lt;br /&gt;
		&amp;lt;message&amp;gt;COM_HELLOWORLD_ADD_VIEW_DESC&amp;lt;/message&amp;gt;&lt;br /&gt;
	&amp;lt;/layout&amp;gt;&lt;br /&gt;
&amp;lt;/metadata&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&amp;lt;/span&amp;gt;&lt;br /&gt;
&amp;lt;translate&amp;gt;&amp;lt;!--T:33--&amp;gt; Once you have the new code installed you&#039;ll have to go into the admin back-end and create a menu item to point to the new front-end form.&amp;lt;/translate&amp;gt;&lt;br /&gt;
&amp;lt;translate&amp;gt;&lt;br /&gt;
==Displaying the new form view== &amp;lt;!--T:34--&amp;gt;&lt;br /&gt;
&amp;lt;/translate&amp;gt;&lt;br /&gt;
&amp;lt;translate&amp;gt;&amp;lt;!--T:35--&amp;gt; Create a new forms subdirectory under the site models directory, and add the definition of the form into&amp;lt;/translate&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span id=&amp;quot;site/models/forms/add-form.xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;tt&amp;gt;site/models/forms/add-form.xml&amp;lt;/tt&amp;gt;&lt;br /&gt;
&amp;lt;source lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;?xml version=&amp;quot;1.0&amp;quot; encoding=&amp;quot;utf-8&amp;quot;?&amp;gt;&lt;br /&gt;
&amp;lt;form&lt;br /&gt;
    addrulepath=&amp;quot;/administrator/components/com_helloworld/models/rules&amp;quot;&lt;br /&gt;
    &amp;gt;&lt;br /&gt;
    &amp;lt;fieldset&lt;br /&gt;
				name=&amp;quot;details&amp;quot;&lt;br /&gt;
				label=&amp;quot;COM_HELLOWORLD_HELLOWORLD_DETAILS&amp;quot;&lt;br /&gt;
	&amp;gt;&lt;br /&gt;
		&amp;lt;field&lt;br /&gt;
				name=&amp;quot;id&amp;quot;&lt;br /&gt;
				type=&amp;quot;hidden&amp;quot;&lt;br /&gt;
				/&amp;gt;&lt;br /&gt;
		&amp;lt;field&lt;br /&gt;
				name=&amp;quot;greeting&amp;quot;&lt;br /&gt;
				type=&amp;quot;text&amp;quot;&lt;br /&gt;
				label=&amp;quot;COM_HELLOWORLD_HELLOWORLD_GREETING_LABEL&amp;quot;&lt;br /&gt;
				description=&amp;quot;COM_HELLOWORLD_HELLOWORLD_GREETING_DESC&amp;quot;&lt;br /&gt;
				size=&amp;quot;40&amp;quot;&lt;br /&gt;
				class=&amp;quot;inputbox&amp;quot;&lt;br /&gt;
				validate=&amp;quot;greeting&amp;quot;&lt;br /&gt;
				required=&amp;quot;true&amp;quot;&lt;br /&gt;
                hint=&amp;quot;COM_HELLOWORLD_HELLOWORLD_GREETING_HINT&amp;quot;&lt;br /&gt;
				default=&amp;quot;&amp;quot;&lt;br /&gt;
				/&amp;gt;&lt;br /&gt;
        &amp;lt;field&lt;br /&gt;
				name=&amp;quot;catid&amp;quot;&lt;br /&gt;
				type=&amp;quot;category&amp;quot;&lt;br /&gt;
				extension=&amp;quot;com_helloworld&amp;quot;&lt;br /&gt;
				class=&amp;quot;inputbox&amp;quot;&lt;br /&gt;
				default=&amp;quot;&amp;quot;&lt;br /&gt;
				label=&amp;quot;COM_HELLOWORLD_HELLOWORLD_FIELD_CATID_LABEL&amp;quot;&lt;br /&gt;
				description=&amp;quot;COM_HELLOWORLD_HELLOWORLD_FIELD_CATID_DESC&amp;quot;&lt;br /&gt;
				required=&amp;quot;true&amp;quot;&lt;br /&gt;
                &amp;gt;&lt;br /&gt;
			&amp;lt;option value=&amp;quot;0&amp;quot;&amp;gt;JOPTION_SELECT_CATEGORY&amp;lt;/option&amp;gt;&lt;br /&gt;
		&amp;lt;/field&amp;gt;&lt;br /&gt;
        &amp;lt;field&lt;br /&gt;
                name=&amp;quot;message&amp;quot;&lt;br /&gt;
                type=&amp;quot;textarea&amp;quot;&lt;br /&gt;
                rows=&amp;quot;5&amp;quot;&lt;br /&gt;
                cols=&amp;quot;80&amp;quot;&lt;br /&gt;
				label=&amp;quot;COM_HELLOWORLD_HELLOWORLD_MESSAGE_LABEL&amp;quot;&lt;br /&gt;
				description=&amp;quot;COM_HELLOWORLD_HELLOWORLD_MESSAGE_DESC&amp;quot;&lt;br /&gt;
                hint=&amp;quot;COM_HELLOWORLD_HELLOWORLD_MESSAGE_HINT&amp;quot;&lt;br /&gt;
				required=&amp;quot;true&amp;quot;&lt;br /&gt;
                &amp;gt;&lt;br /&gt;
        &amp;lt;/field&amp;gt;&lt;br /&gt;
        &amp;lt;field&lt;br /&gt;
				name=&amp;quot;captcha&amp;quot;&lt;br /&gt;
				type=&amp;quot;captcha&amp;quot;&lt;br /&gt;
				label=&amp;quot;COM_HELLOWORLD_HELLOWORLD_FIELD_CAPTCHA_LABEL&amp;quot;&lt;br /&gt;
				description=&amp;quot;COM_HELLOWORLD_HELLOWORLD_FIELD_CAPTCHA_DESC&amp;quot;&lt;br /&gt;
                validate=&amp;quot;captcha&amp;quot;&lt;br /&gt;
                &amp;gt;&lt;br /&gt;
		&amp;lt;/field&amp;gt;&lt;br /&gt;
        &amp;lt;fields name=&amp;quot;params&amp;quot;&amp;gt;&lt;br /&gt;
            &amp;lt;field&lt;br /&gt;
                    name=&amp;quot;show_category&amp;quot;&lt;br /&gt;
                    type=&amp;quot;list&amp;quot;&lt;br /&gt;
                    label=&amp;quot;COM_HELLOWORLD_HELLOWORLD_FIELD_SHOW_CATEGORY_LABEL&amp;quot;&lt;br /&gt;
                    description=&amp;quot;COM_HELLOWORLD_HELLOWORLD_FIELD_SHOW_CATEGORY_DESC&amp;quot;&lt;br /&gt;
                    default=&amp;quot;&amp;quot;&lt;br /&gt;
                    useglobal=&amp;quot;true&amp;quot;&lt;br /&gt;
            &amp;gt;&lt;br /&gt;
                &amp;lt;option value=&amp;quot;0&amp;quot;&amp;gt;JHIDE&amp;lt;/option&amp;gt;&lt;br /&gt;
                &amp;lt;option value=&amp;quot;1&amp;quot;&amp;gt;JSHOW&amp;lt;/option&amp;gt;&lt;br /&gt;
            &amp;lt;/field&amp;gt;&lt;br /&gt;
        &amp;lt;/fields&amp;gt;&lt;br /&gt;
    &amp;lt;/fieldset&amp;gt;&lt;br /&gt;
&amp;lt;/form&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;translate&amp;gt;&amp;lt;!--T:36--&amp;gt; The above form includes a captcha. To get this working you need to install a captcha plugin from the selection available for Joomla. You can also use the Captcha - ReCaptcha plugin which comes with Joomla, but before using this you have to get recaptcha keys for your domain (eg localhost) from Google, and then configure the plugin with the keys which Google supplies (ie Extensions / Plugins, and then click on the plugin to edit its options - if you edit the plugin it tells you exactly what you have to do). Once the plugins are live, you can select in the Global Configuration the captcha which you want to be the system default, and also in the Helloworld Configuration select which captcha to use for this helloworld form.&amp;lt;/translate&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;translate&amp;gt;&amp;lt;!--T:37--&amp;gt; The existing controller (in controller.php) will not need to be changed, but we&#039;ll need to define a new view, layout and model for the new form.&amp;lt;/translate&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;span id=&amp;quot;site/views/form/view.html.php&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;tt&amp;gt;site/views/form/view.html.php&amp;lt;/tt&amp;gt;&lt;br /&gt;
&amp;lt;source lang=&amp;quot;php&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;?php&lt;br /&gt;
/**&lt;br /&gt;
 * @package     Joomla.Administrator&lt;br /&gt;
 * @subpackage  com_helloworld&lt;br /&gt;
 *&lt;br /&gt;
 * @copyright   Copyright (C) 2005 - 2018 Open Source Matters, Inc. All rights reserved.&lt;br /&gt;
 * @license     GNU General Public License version 2 or later; see LICENSE.txt&lt;br /&gt;
 */&lt;br /&gt;
&lt;br /&gt;
// No direct access to this file&lt;br /&gt;
defined(&#039;_JEXEC&#039;) or die(&#039;Restricted access&#039;);&lt;br /&gt;
&lt;br /&gt;
/**&lt;br /&gt;
 * HelloWorld View&lt;br /&gt;
 * This is the site view presenting the user with the ability to add a new Helloworld record&lt;br /&gt;
 * &lt;br /&gt;
 */&lt;br /&gt;
class HelloWorldViewForm extends JViewLegacy&lt;br /&gt;
{&lt;br /&gt;
&lt;br /&gt;
	protected $form = null;&lt;br /&gt;
	protected $canDo;&lt;br /&gt;
&lt;br /&gt;
	/**&lt;br /&gt;
	 * Display the Hello World view&lt;br /&gt;
	 *&lt;br /&gt;
	 * @param   string  $tpl  The name of the layout file to parse.&lt;br /&gt;
	 *&lt;br /&gt;
	 * @return  void&lt;br /&gt;
	 */&lt;br /&gt;
	public function display($tpl = null)&lt;br /&gt;
	{&lt;br /&gt;
		// Get the form to display&lt;br /&gt;
		$this-&amp;gt;form = $this-&amp;gt;get(&#039;Form&#039;);&lt;br /&gt;
		// Get the javascript script file for client-side validation&lt;br /&gt;
		$this-&amp;gt;script = $this-&amp;gt;get(&#039;Script&#039;); &lt;br /&gt;
&lt;br /&gt;
		// Check that the user has permissions to create a new helloworld record&lt;br /&gt;
		$this-&amp;gt;canDo = JHelperContent::getActions(&#039;com_helloworld&#039;);&lt;br /&gt;
		if (!($this-&amp;gt;canDo-&amp;gt;get(&#039;core.create&#039;))) &lt;br /&gt;
		{&lt;br /&gt;
			$app = JFactory::getApplication(); &lt;br /&gt;
			$app-&amp;gt;enqueueMessage(JText::_(&#039;JERROR_ALERTNOAUTHOR&#039;), &#039;error&#039;);&lt;br /&gt;
			$app-&amp;gt;setHeader(&#039;status&#039;, 403, true);&lt;br /&gt;
			return;&lt;br /&gt;
		}&lt;br /&gt;
        &lt;br /&gt;
		// Check for errors.&lt;br /&gt;
		if (count($errors = $this-&amp;gt;get(&#039;Errors&#039;)))&lt;br /&gt;
		{&lt;br /&gt;
			throw new Exception(implode(&amp;quot;\n&amp;quot;, $errors), 500);&lt;br /&gt;
		}&lt;br /&gt;
&lt;br /&gt;
		// Call the parent display to display the layout file&lt;br /&gt;
		parent::display($tpl);&lt;br /&gt;
&lt;br /&gt;
		// Set properties of the html document&lt;br /&gt;
		$this-&amp;gt;setDocument();&lt;br /&gt;
	}&lt;br /&gt;
&lt;br /&gt;
	/**&lt;br /&gt;
	 * Method to set up the html document properties&lt;br /&gt;
	 *&lt;br /&gt;
	 * @return void&lt;br /&gt;
	 */&lt;br /&gt;
	protected function setDocument() &lt;br /&gt;
	{&lt;br /&gt;
		$document = JFactory::getDocument();&lt;br /&gt;
		$document-&amp;gt;setTitle(JText::_(&#039;COM_HELLOWORLD_HELLOWORLD_CREATING&#039;));&lt;br /&gt;
		$document-&amp;gt;addScript(JURI::root() . $this-&amp;gt;script);&lt;br /&gt;
		$document-&amp;gt;addScript(JURI::root() . &amp;quot;/administrator/components/com_helloworld&amp;quot;&lt;br /&gt;
		                                  . &amp;quot;/views/helloworld/submitbutton.js&amp;quot;);&lt;br /&gt;
		JText::script(&#039;COM_HELLOWORLD_HELLOWORLD_ERROR_UNACCEPTABLE&#039;);&lt;br /&gt;
	}&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&amp;lt;/span&amp;gt;&lt;br /&gt;
&amp;lt;translate&amp;gt;&lt;br /&gt;
&amp;lt;!--T:38--&amp;gt;&lt;br /&gt;
And into the layout file:&amp;lt;/translate&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span id=&amp;quot;site/views/form/tmpl/edit.php&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;tt&amp;gt;site/views/form/tmpl/edit.php&amp;lt;/tt&amp;gt;&lt;br /&gt;
&amp;lt;source lang=&amp;quot;php&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;?php&lt;br /&gt;
/**&lt;br /&gt;
 * @package     Joomla.Administrator&lt;br /&gt;
 * @subpackage  com_helloworld&lt;br /&gt;
 *&lt;br /&gt;
 * @copyright   Copyright (C) 2005 - 2018 Open Source Matters, Inc. All rights reserved.&lt;br /&gt;
 * @license     GNU General Public License version 2 or later; see LICENSE.txt&lt;br /&gt;
 *&lt;br /&gt;
 * This layout file is for displaying the front end form for capturing a new helloworld message&lt;br /&gt;
 *&lt;br /&gt;
 */&lt;br /&gt;
&lt;br /&gt;
// No direct access&lt;br /&gt;
defined(&#039;_JEXEC&#039;) or die(&#039;Restricted access&#039;);&lt;br /&gt;
JHtml::_(&#039;behavior.formvalidator&#039;);&lt;br /&gt;
&lt;br /&gt;
?&amp;gt;&lt;br /&gt;
&amp;lt;form action=&amp;quot;&amp;lt;?php echo JRoute::_(&#039;index.php?option=com_helloworld&amp;amp;view=form&amp;amp;layout=edit&#039;); ?&amp;gt;&amp;quot;&lt;br /&gt;
    method=&amp;quot;post&amp;quot; name=&amp;quot;adminForm&amp;quot; id=&amp;quot;adminForm&amp;quot; class=&amp;quot;form-validate&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
	&amp;lt;div class=&amp;quot;form-horizontal&amp;quot;&amp;gt;&lt;br /&gt;
		&amp;lt;fieldset class=&amp;quot;adminform&amp;quot;&amp;gt;&lt;br /&gt;
			&amp;lt;legend&amp;gt;&amp;lt;?php echo JText::_(&#039;COM_HELLOWORLD_LEGEND_DETAILS&#039;) ?&amp;gt;&amp;lt;/legend&amp;gt;&lt;br /&gt;
			&amp;lt;div class=&amp;quot;row-fluid&amp;quot;&amp;gt;&lt;br /&gt;
				&amp;lt;div class=&amp;quot;span6&amp;quot;&amp;gt;&lt;br /&gt;
					&amp;lt;?php echo $this-&amp;gt;form-&amp;gt;renderFieldset(&#039;details&#039;);  ?&amp;gt;&lt;br /&gt;
				&amp;lt;/div&amp;gt;&lt;br /&gt;
			&amp;lt;/div&amp;gt;&lt;br /&gt;
		&amp;lt;/fieldset&amp;gt;&lt;br /&gt;
	&amp;lt;/div&amp;gt;&lt;br /&gt;
    &lt;br /&gt;
	&amp;lt;div class=&amp;quot;btn-toolbar&amp;quot;&amp;gt;&lt;br /&gt;
		&amp;lt;div class=&amp;quot;btn-group&amp;quot;&amp;gt;&lt;br /&gt;
			&amp;lt;button type=&amp;quot;button&amp;quot; class=&amp;quot;btn btn-primary&amp;quot; onclick=&amp;quot;Joomla.submitbutton(&#039;helloworld.save&#039;)&amp;quot;&amp;gt;&lt;br /&gt;
				&amp;lt;span class=&amp;quot;icon-ok&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;&amp;lt;?php echo JText::_(&#039;JSAVE&#039;) ?&amp;gt;&lt;br /&gt;
			&amp;lt;/button&amp;gt;&lt;br /&gt;
		&amp;lt;/div&amp;gt;&lt;br /&gt;
		&amp;lt;div class=&amp;quot;btn-group&amp;quot;&amp;gt;&lt;br /&gt;
			&amp;lt;button type=&amp;quot;button&amp;quot; class=&amp;quot;btn&amp;quot; onclick=&amp;quot;Joomla.submitbutton(&#039;helloworld.cancel&#039;)&amp;quot;&amp;gt;&lt;br /&gt;
				&amp;lt;span class=&amp;quot;icon-cancel&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;&amp;lt;?php echo JText::_(&#039;JCANCEL&#039;) ?&amp;gt;&lt;br /&gt;
			&amp;lt;/button&amp;gt;&lt;br /&gt;
		&amp;lt;/div&amp;gt;&lt;br /&gt;
	&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
	&amp;lt;input type=&amp;quot;hidden&amp;quot; name=&amp;quot;task&amp;quot; /&amp;gt;&lt;br /&gt;
	&amp;lt;?php echo JHtml::_(&#039;form.token&#039;); ?&amp;gt;&lt;br /&gt;
&amp;lt;/form&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;translate&amp;gt;&amp;lt;!--T:39--&amp;gt; All the above is similar to the admin functionality, except there are certain fields we don&#039;t want to allow the front-end user to see (eg the permissions) and instead of the standard Joomla admin buttons (and toolbar) we use a Save button and a Cancel button styled using the Bootstrap CSS, and which result in the &amp;lt;tt&amp;gt;task&amp;lt;/tt&amp;gt; parameter being set to &amp;lt;tt&amp;gt;helloworld.save&amp;lt;/tt&amp;gt; or &amp;lt;tt&amp;gt;helloworld.cancel&amp;lt;/tt&amp;gt;.&amp;lt;/translate&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;translate&amp;gt;&amp;lt;!--T:40--&amp;gt; Our new model is almost exactly the same as the admin equivalent; we just have to point to our new add-form instead.&amp;lt;/translate&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span id=&amp;quot;site/models/form.php&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;tt&amp;gt;site/models/form.php&amp;lt;/tt&amp;gt;&lt;br /&gt;
&amp;lt;source lang=&amp;quot;php&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;?php&lt;br /&gt;
/**&lt;br /&gt;
 * @package     Joomla.Administrator&lt;br /&gt;
 * @subpackage  com_helloworld&lt;br /&gt;
 *&lt;br /&gt;
 * @copyright   Copyright (C) 2005 - 2018 Open Source Matters, Inc. All rights reserved.&lt;br /&gt;
 * @license     GNU General Public License version 2 or later; see LICENSE.txt&lt;br /&gt;
 */&lt;br /&gt;
&lt;br /&gt;
// No direct access to this file&lt;br /&gt;
defined(&#039;_JEXEC&#039;) or die(&#039;Restricted access&#039;);&lt;br /&gt;
&lt;br /&gt;
/**&lt;br /&gt;
 * HelloWorld Model&lt;br /&gt;
 *&lt;br /&gt;
 * @since  0.0.1&lt;br /&gt;
 */&lt;br /&gt;
class HelloWorldModelForm extends JModelAdmin&lt;br /&gt;
{&lt;br /&gt;
&lt;br /&gt;
	/**&lt;br /&gt;
	 * Method to get a table object, load it if necessary.&lt;br /&gt;
	 *&lt;br /&gt;
	 * @param   string  $type    The table name. Optional.&lt;br /&gt;
	 * @param   string  $prefix  The class prefix. Optional.&lt;br /&gt;
	 * @param   array   $config  Configuration array for model. Optional.&lt;br /&gt;
	 *&lt;br /&gt;
	 * @return  JTable  A JTable object&lt;br /&gt;
	 *&lt;br /&gt;
	 * @since   1.6&lt;br /&gt;
	 */&lt;br /&gt;
	public function getTable($type = &#039;HelloWorld&#039;, $prefix = &#039;HelloWorldTable&#039;, $config = array())&lt;br /&gt;
	{&lt;br /&gt;
		return JTable::getInstance($type, $prefix, $config);&lt;br /&gt;
	}&lt;br /&gt;
&lt;br /&gt;
    /**&lt;br /&gt;
	 * Method to get the record form.&lt;br /&gt;
	 *&lt;br /&gt;
	 * @param   array    $data      Data for the form.&lt;br /&gt;
	 * @param   boolean  $loadData  True if the form is to load its own data (default case), false if not.&lt;br /&gt;
	 *&lt;br /&gt;
	 * @return  mixed    A JForm object on success, false on failure&lt;br /&gt;
	 *&lt;br /&gt;
	 * @since   1.6&lt;br /&gt;
	 */&lt;br /&gt;
	public function getForm($data = array(), $loadData = true)&lt;br /&gt;
	{&lt;br /&gt;
		// Get the form.&lt;br /&gt;
		$form = $this-&amp;gt;loadForm(&lt;br /&gt;
			&#039;com_helloworld.form&#039;,&lt;br /&gt;
			&#039;add-form&#039;,&lt;br /&gt;
			array(&lt;br /&gt;
				&#039;control&#039; =&amp;gt; &#039;jform&#039;,&lt;br /&gt;
				&#039;load_data&#039; =&amp;gt; $loadData&lt;br /&gt;
			)&lt;br /&gt;
		);&lt;br /&gt;
&lt;br /&gt;
		if (empty($form))&lt;br /&gt;
		{&lt;br /&gt;
			$errors = $this-&amp;gt;getErrors();&lt;br /&gt;
			throw new Exception(implode(&amp;quot;\n&amp;quot;, $errors), 500);&lt;br /&gt;
		}&lt;br /&gt;
&lt;br /&gt;
		return $form;&lt;br /&gt;
	}&lt;br /&gt;
&lt;br /&gt;
	/**&lt;br /&gt;
	 * Method to get the data that should be injected in the form.&lt;br /&gt;
	 * As this form is for add, we&#039;re not prefilling the form with an existing record&lt;br /&gt;
	 * But if the user has previously hit submit and the validation has found an error,&lt;br /&gt;
	 *   then we inject what was previously entered.&lt;br /&gt;
	 *&lt;br /&gt;
	 * @return  mixed  The data for the form.&lt;br /&gt;
	 *&lt;br /&gt;
	 * @since   1.6&lt;br /&gt;
	 */&lt;br /&gt;
	protected function loadFormData()&lt;br /&gt;
	{&lt;br /&gt;
		// Check the session for previously entered form data.&lt;br /&gt;
		$data = JFactory::getApplication()-&amp;gt;getUserState(&lt;br /&gt;
			&#039;com_helloworld.edit.helloworld.data&#039;,&lt;br /&gt;
			array()&lt;br /&gt;
		);&lt;br /&gt;
&lt;br /&gt;
		return $data;&lt;br /&gt;
	}&lt;br /&gt;
    &lt;br /&gt;
	/**&lt;br /&gt;
	 * Method to get the script that have to be included on the form&lt;br /&gt;
	 * This returns the script associated with helloworld field greeting validation&lt;br /&gt;
	 *&lt;br /&gt;
	 * @return string	Script files&lt;br /&gt;
	 */&lt;br /&gt;
	public function getScript() &lt;br /&gt;
	{&lt;br /&gt;
		return &#039;administrator/components/com_helloworld/models/forms/helloworld.js&#039;;&lt;br /&gt;
	}&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&amp;lt;/span&amp;gt;&lt;br /&gt;
&amp;lt;translate&amp;gt;&lt;br /&gt;
==Handling the form HTTP POST== &amp;lt;!--T:41--&amp;gt;&lt;br /&gt;
&amp;lt;/translate&amp;gt;&lt;br /&gt;
&amp;lt;translate&amp;gt;&amp;lt;!--T:42--&amp;gt; As in the admin case, we&#039;ll need to create a new controller in the /controllers subdirectory with save() and cancel() methods, and we&#039;ll need a model with a save() method. In fact, because the above model class (in site/models/form.php) extends JModelAdmin, we&#039;ll be able to reuse it without adding any more code. (For just displaying the form our model class could have extended JModelForm, but JModelAdmin extends JModelForm and provides additional functions such as the save() one which we need).&amp;lt;/translate&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;translate&amp;gt;&amp;lt;!--T:43--&amp;gt; Note that we don&#039;t need any new view file or layout file, because we&#039;re just going to redirect the user back to the same form.&amp;lt;/translate&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;translate&amp;gt;&amp;lt;!--T:44--&amp;gt; So the only new file we need is a new controller in a new controllers subdirectory:&amp;lt;/translate&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span id=&amp;quot;site/controllers/helloworld.php&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;tt&amp;gt;site/controllers/helloworld.php&amp;lt;/tt&amp;gt;&lt;br /&gt;
&amp;lt;source lang=&amp;quot;php&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;?php&lt;br /&gt;
/**&lt;br /&gt;
 * @package     Joomla.Site&lt;br /&gt;
 * @subpackage  com_helloworld&lt;br /&gt;
 *&lt;br /&gt;
 * @copyright   Copyright (C) 2005 - 2018 Open Source Matters, Inc. All rights reserved.&lt;br /&gt;
 * @license     GNU General Public License version 2 or later; see LICENSE.txt&lt;br /&gt;
 */&lt;br /&gt;
// No direct access to this file&lt;br /&gt;
defined(&#039;_JEXEC&#039;) or die(&#039;Restricted access&#039;);&lt;br /&gt;
&lt;br /&gt;
/**&lt;br /&gt;
 * HelloWorld Controller&lt;br /&gt;
 *&lt;br /&gt;
 * @package     Joomla.Site&lt;br /&gt;
 * @subpackage  com_helloworld&lt;br /&gt;
 *&lt;br /&gt;
 * Used to handle the http POST from the front-end form which allows &lt;br /&gt;
 * users to enter a new helloworld message&lt;br /&gt;
 *&lt;br /&gt;
 */&lt;br /&gt;
class HelloWorldControllerHelloWorld extends JControllerForm&lt;br /&gt;
{   &lt;br /&gt;
    public function cancel($key = null)&lt;br /&gt;
    {&lt;br /&gt;
        parent::cancel($key);&lt;br /&gt;
        &lt;br /&gt;
        // set up the redirect back to the same form&lt;br /&gt;
        $this-&amp;gt;setRedirect(&lt;br /&gt;
            (string)JUri::getInstance(), &lt;br /&gt;
            JText::_(&#039;COM_HELLOWORLD_ADD_CANCELLED&#039;)&lt;br /&gt;
		);&lt;br /&gt;
    }&lt;br /&gt;
    &lt;br /&gt;
    /*&lt;br /&gt;
     * Function handing the save for adding a new helloworld record&lt;br /&gt;
     * Based on the save() function in the JControllerForm class&lt;br /&gt;
     */&lt;br /&gt;
    public function save($key = null, $urlVar = null)&lt;br /&gt;
    {&lt;br /&gt;
		// Check for request forgeries.&lt;br /&gt;
		JSession::checkToken() or jexit(JText::_(&#039;JINVALID_TOKEN&#039;));&lt;br /&gt;
        &lt;br /&gt;
		$app = JFactory::getApplication(); &lt;br /&gt;
		$input = $app-&amp;gt;input; &lt;br /&gt;
		$model = $this-&amp;gt;getModel(&#039;form&#039;);&lt;br /&gt;
        &lt;br /&gt;
		// Get the current URI to set in redirects. As we&#039;re handling a POST, &lt;br /&gt;
		// this URI comes from the &amp;lt;form action=&amp;quot;...&amp;quot;&amp;gt; attribute in the layout file above&lt;br /&gt;
		$currentUri = (string)JUri::getInstance();&lt;br /&gt;
&lt;br /&gt;
		// Check that this user is allowed to add a new record&lt;br /&gt;
		if (!JFactory::getUser()-&amp;gt;authorise( &amp;quot;core.create&amp;quot;, &amp;quot;com_helloworld&amp;quot;))&lt;br /&gt;
		{&lt;br /&gt;
			$app-&amp;gt;enqueueMessage(JText::_(&#039;JERROR_ALERTNOAUTHOR&#039;), &#039;error&#039;);&lt;br /&gt;
			$app-&amp;gt;setHeader(&#039;status&#039;, 403, true);&lt;br /&gt;
&lt;br /&gt;
			return;&lt;br /&gt;
		}&lt;br /&gt;
        &lt;br /&gt;
		// get the data from the HTTP POST request&lt;br /&gt;
		$data  = $input-&amp;gt;get(&#039;jform&#039;, array(), &#039;array&#039;);&lt;br /&gt;
        &lt;br /&gt;
		// set up context for saving form data&lt;br /&gt;
		$context = &amp;quot;$this-&amp;gt;option.edit.$this-&amp;gt;context&amp;quot;;&lt;br /&gt;
        &lt;br /&gt;
		// Validate the posted data.&lt;br /&gt;
		// First we need to set up an instance of the form ...&lt;br /&gt;
		$form = $model-&amp;gt;getForm($data, false);&lt;br /&gt;
&lt;br /&gt;
		if (!$form)&lt;br /&gt;
		{&lt;br /&gt;
			$app-&amp;gt;enqueueMessage($model-&amp;gt;getError(), &#039;error&#039;);&lt;br /&gt;
			return false;&lt;br /&gt;
		}&lt;br /&gt;
&lt;br /&gt;
		// ... and then we validate the data against it&lt;br /&gt;
		// The validate function called below results in the running of the validate=&amp;quot;...&amp;quot; routines&lt;br /&gt;
		// specified against the fields in the form xml file, and also filters the data &lt;br /&gt;
		// according to the filter=&amp;quot;...&amp;quot; specified in the same place (removing html tags by default in strings)&lt;br /&gt;
		$validData = $model-&amp;gt;validate($form, $data);&lt;br /&gt;
&lt;br /&gt;
		// Handle the case where there are validation errors&lt;br /&gt;
		if ($validData === false)&lt;br /&gt;
		{&lt;br /&gt;
			// Get the validation messages.&lt;br /&gt;
			$errors = $model-&amp;gt;getErrors();&lt;br /&gt;
&lt;br /&gt;
			// Display up to three validation messages to the user.&lt;br /&gt;
			for ($i = 0, $n = count($errors); $i &amp;lt; $n &amp;amp;&amp;amp; $i &amp;lt; 3; $i++)&lt;br /&gt;
			{&lt;br /&gt;
				if ($errors[$i] instanceof Exception)&lt;br /&gt;
				{&lt;br /&gt;
					$app-&amp;gt;enqueueMessage($errors[$i]-&amp;gt;getMessage(), &#039;warning&#039;);&lt;br /&gt;
				}&lt;br /&gt;
				else&lt;br /&gt;
				{&lt;br /&gt;
					$app-&amp;gt;enqueueMessage($errors[$i], &#039;warning&#039;);&lt;br /&gt;
				}&lt;br /&gt;
			}&lt;br /&gt;
&lt;br /&gt;
			// Save the form data in the session.&lt;br /&gt;
			$app-&amp;gt;setUserState($context . &#039;.data&#039;, $data);&lt;br /&gt;
&lt;br /&gt;
			// Redirect back to the same screen.&lt;br /&gt;
			$this-&amp;gt;setRedirect($currentUri);&lt;br /&gt;
&lt;br /&gt;
			return false;&lt;br /&gt;
		}&lt;br /&gt;
        &lt;br /&gt;
		// add the &#039;created by&#039; and &#039;created&#039; date fields&lt;br /&gt;
		$validData[&#039;created_by&#039;] = JFactory::getUser()-&amp;gt;get(&#039;id&#039;, 0);&lt;br /&gt;
		$validData[&#039;created&#039;] = date(&#039;Y-m-d h:i:s&#039;);&lt;br /&gt;
        &lt;br /&gt;
		// Attempt to save the data.&lt;br /&gt;
		if (!$model-&amp;gt;save($validData))&lt;br /&gt;
		{&lt;br /&gt;
		// Handle the case where the save failed&lt;br /&gt;
            &lt;br /&gt;
			// Save the data in the session.&lt;br /&gt;
			$app-&amp;gt;setUserState($context . &#039;.data&#039;, $validData);&lt;br /&gt;
&lt;br /&gt;
			// Redirect back to the edit screen.&lt;br /&gt;
			$this-&amp;gt;setError(JText::sprintf(&#039;JLIB_APPLICATION_ERROR_SAVE_FAILED&#039;, $model-&amp;gt;getError()));&lt;br /&gt;
			$this-&amp;gt;setMessage($this-&amp;gt;getError(), &#039;error&#039;);&lt;br /&gt;
&lt;br /&gt;
			$this-&amp;gt;setRedirect($currentUri);&lt;br /&gt;
&lt;br /&gt;
			return false;&lt;br /&gt;
		}&lt;br /&gt;
        &lt;br /&gt;
		// clear the data in the form&lt;br /&gt;
		$app-&amp;gt;setUserState($context . &#039;.data&#039;, null);&lt;br /&gt;
        &lt;br /&gt;
		// notify the administrator that a new helloworld message has been added on the front end&lt;br /&gt;
        &lt;br /&gt;
		// get the id of the person to notify from global config&lt;br /&gt;
		$params   = $app-&amp;gt;getParams();&lt;br /&gt;
		$userid_to_email = (int) $params-&amp;gt;get(&#039;user_to_email&#039;);&lt;br /&gt;
		$user_to_email = JUser::getInstance($userid_to_email);&lt;br /&gt;
		$to_address = $user_to_email-&amp;gt;get(&amp;quot;email&amp;quot;);&lt;br /&gt;
        &lt;br /&gt;
		// get the current user (if any)&lt;br /&gt;
		$current_user = JFactory::getUser();&lt;br /&gt;
		if ($current_user-&amp;gt;get(&amp;quot;id&amp;quot;) &amp;gt; 0) &lt;br /&gt;
		{&lt;br /&gt;
			$current_username = $current_user-&amp;gt;get(&amp;quot;username&amp;quot;);&lt;br /&gt;
		}&lt;br /&gt;
		else &lt;br /&gt;
		{&lt;br /&gt;
			$current_username = &amp;quot;a visitor to the site&amp;quot;;&lt;br /&gt;
		}&lt;br /&gt;
        &lt;br /&gt;
		// get the Mailer object, set up the email to be sent, and send it&lt;br /&gt;
		$mailer = JFactory::getMailer();&lt;br /&gt;
		$mailer-&amp;gt;addRecipient($to_address);&lt;br /&gt;
		$mailer-&amp;gt;setSubject(&amp;quot;New helloworld message added by &amp;quot; . $current_username);&lt;br /&gt;
		$mailer-&amp;gt;setBody(&amp;quot;New greeting is &amp;quot; . $validData[&#039;greeting&#039;]);&lt;br /&gt;
		try &lt;br /&gt;
		{&lt;br /&gt;
			$mailer-&amp;gt;send(); &lt;br /&gt;
		}&lt;br /&gt;
		catch (Exception $e)&lt;br /&gt;
		{&lt;br /&gt;
			JLog::add(&#039;Caught exception: &#039; . $e-&amp;gt;getMessage(), JLog::Error, &#039;jerror&#039;);&lt;br /&gt;
		}&lt;br /&gt;
        &lt;br /&gt;
		$this-&amp;gt;setRedirect(&lt;br /&gt;
				$currentUri,&lt;br /&gt;
				JText::_(&#039;COM_HELLOWORLD_ADD_SUCCESSFUL&#039;)&lt;br /&gt;
				);&lt;br /&gt;
            &lt;br /&gt;
		return true;&lt;br /&gt;
        &lt;br /&gt;
    }&lt;br /&gt;
&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;translate&amp;gt;&amp;lt;!--T:45--&amp;gt; In the above file we&#039;ve been able to reuse the cancel() method from the parent JControllerForm class, with the exception that we want to redirect back to the same form. (The parent cancel() method redirects back to the view showing the list of records - as in the admin case).&amp;lt;/translate&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;translate&amp;gt;&amp;lt;!--T:46--&amp;gt; However, our save() method functionality is significantly different from that of the parent class, so it&#039;s easier just to write our own. Note that we&#039;re recording the user and created date/time for records added via the front-end only. If we wanted to record this information for all records, then we&#039;d need to override a save() function for the backend as well to include setting those fields.&amp;lt;/translate&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;translate&amp;gt;&amp;lt;!--T:47--&amp;gt; The mailing functionality relies on you having set up mail in your Joomla instance. If you&#039;re using localhost then one possibility is to configure this using a gmail account, and you can easily find the smtp settings for this on the Internet. Note that you&#039;ll need to allow &amp;quot;less secure apps&amp;quot; on the gmail account.&amp;lt;/translate&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;translate&amp;gt;&lt;br /&gt;
==Configuration Parameters== &amp;lt;!--T:48--&amp;gt;&lt;br /&gt;
&amp;lt;/translate&amp;gt;&lt;br /&gt;
&amp;lt;translate&amp;gt;&amp;lt;!--T:49--&amp;gt; We&#039;ve introduced two new configuration parameters - the captcha to display on the form, and the user to email with notification of a new helloworld message being added. So update the configuration settings as follows:&amp;lt;/translate&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span id=&amp;quot;admin/config.xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;tt&amp;gt;admin/config.xml&amp;lt;/tt&amp;gt;&lt;br /&gt;
&amp;lt;source lang=&amp;quot;xml&amp;quot; highlight=&amp;quot;18-37&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;?xml version=&amp;quot;1.0&amp;quot; encoding=&amp;quot;utf-8&amp;quot;?&amp;gt;&lt;br /&gt;
&amp;lt;config&amp;gt;&lt;br /&gt;
	&amp;lt;fieldset&lt;br /&gt;
		name=&amp;quot;greetings&amp;quot;&lt;br /&gt;
		label=&amp;quot;COM_HELLOWORLD_CONFIG_GREETING_SETTINGS_LABEL&amp;quot;&lt;br /&gt;
		description=&amp;quot;COM_HELLOWORLD_CONFIG_GREETING_SETTINGS_DESC&amp;quot;&lt;br /&gt;
	&amp;gt;&lt;br /&gt;
		&amp;lt;field&lt;br /&gt;
			name=&amp;quot;show_category&amp;quot;&lt;br /&gt;
			type=&amp;quot;radio&amp;quot;&lt;br /&gt;
			label=&amp;quot;COM_HELLOWORLD_HELLOWORLD_FIELD_SHOW_CATEGORY_LABEL&amp;quot;&lt;br /&gt;
			description=&amp;quot;COM_HELLOWORLD_HELLOWORLD_FIELD_SHOW_CATEGORY_DESC&amp;quot;&lt;br /&gt;
			default=&amp;quot;0&amp;quot;&lt;br /&gt;
		&amp;gt;&lt;br /&gt;
			&amp;lt;option value=&amp;quot;0&amp;quot;&amp;gt;JHIDE&amp;lt;/option&amp;gt;&lt;br /&gt;
			&amp;lt;option value=&amp;quot;1&amp;quot;&amp;gt;JSHOW&amp;lt;/option&amp;gt;&lt;br /&gt;
		&amp;lt;/field&amp;gt;&lt;br /&gt;
        &amp;lt;field&lt;br /&gt;
			name=&amp;quot;captcha&amp;quot;&lt;br /&gt;
			type=&amp;quot;plugins&amp;quot;&lt;br /&gt;
            folder=&amp;quot;captcha&amp;quot;&lt;br /&gt;
			label=&amp;quot;COM_HELLOWORLD_HELLOWORLD_FIELD_CAPTCHA_LABEL&amp;quot;&lt;br /&gt;
			description=&amp;quot;COM_HELLOWORLD_HELLOWORLD_FIELD_CAPTCHA_DESC&amp;quot;&lt;br /&gt;
			default=&amp;quot;0&amp;quot;&lt;br /&gt;
			filter=&amp;quot;cmd&amp;quot;&lt;br /&gt;
		&amp;gt;&lt;br /&gt;
            &amp;lt;option value=&amp;quot;&amp;quot;&amp;gt;JOPTION_USE_DEFAULT&amp;lt;/option&amp;gt;&lt;br /&gt;
			&amp;lt;option value=&amp;quot;0&amp;quot;&amp;gt;JOPTION_DO_NOT_USE&amp;lt;/option&amp;gt;&lt;br /&gt;
		&amp;lt;/field&amp;gt;&lt;br /&gt;
        &amp;lt;field&lt;br /&gt;
			name=&amp;quot;user_to_email&amp;quot;&lt;br /&gt;
			type=&amp;quot;user&amp;quot;&lt;br /&gt;
			label=&amp;quot;COM_HELLOWORLD_HELLOWORLD_FIELD_USER_TO_EMAIL_LABEL&amp;quot;&lt;br /&gt;
			description=&amp;quot;COM_HELLOWORLD_HELLOWORLD_FIELD_USER_TO_EMAIL_DESC&amp;quot;&lt;br /&gt;
			default=&amp;quot;0&amp;quot;&lt;br /&gt;
		&amp;gt;&lt;br /&gt;
		&amp;lt;/field&amp;gt;&lt;br /&gt;
	&amp;lt;/fieldset&amp;gt;&lt;br /&gt;
    &amp;lt;fieldset&lt;br /&gt;
		name=&amp;quot;permissions&amp;quot;&lt;br /&gt;
		label=&amp;quot;JCONFIG_PERMISSIONS_LABEL&amp;quot;&lt;br /&gt;
		description=&amp;quot;JCONFIG_PERMISSIONS_DESC&amp;quot;&lt;br /&gt;
	&amp;gt;&lt;br /&gt;
		&amp;lt;field&lt;br /&gt;
			name=&amp;quot;rules&amp;quot;&lt;br /&gt;
			type=&amp;quot;rules&amp;quot;&lt;br /&gt;
			label=&amp;quot;JCONFIG_PERMISSIONS_LABEL&amp;quot;&lt;br /&gt;
			class=&amp;quot;inputbox&amp;quot;&lt;br /&gt;
			validate=&amp;quot;rules&amp;quot;&lt;br /&gt;
			filter=&amp;quot;rules&amp;quot;&lt;br /&gt;
			component=&amp;quot;com_helloworld&amp;quot;&lt;br /&gt;
			section=&amp;quot;component&amp;quot;&lt;br /&gt;
		/&amp;gt;&lt;br /&gt;
	&amp;lt;/fieldset&amp;gt;&lt;br /&gt;
&amp;lt;/config&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;translate&amp;gt;&lt;br /&gt;
==Display the new fields on the Admin list form== &amp;lt;!--T:50--&amp;gt;&lt;br /&gt;
&amp;lt;/translate&amp;gt;&lt;br /&gt;
&amp;lt;translate&amp;gt;&amp;lt;!--T:51--&amp;gt; We want to update the admin helloworld list layout file to include the new Author and Created Date fields. This means that we also need to update our model to include these fields in the SQL query.&amp;lt;/translate&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;translate&amp;gt;&amp;lt;!--T:52--&amp;gt; In addition, we&#039;ve changed column ordering mechanism from what it was in [[S:MyLanguage/J3.x:Developing an MVC Component/Adding decorations to the backend|Adding decorations to the backend]] to the more modern way that this is handled.&amp;lt;/translate&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;span id=&amp;quot;admin/views/helloworlds/view.html.php&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;tt&amp;gt;admin/views/helloworlds/view.html.php&amp;lt;/tt&amp;gt;&lt;br /&gt;
&amp;lt;source lang=&amp;quot;php&amp;quot; highlight=&amp;quot;37-39&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;?php&lt;br /&gt;
/**&lt;br /&gt;
 * @package     Joomla.Administrator&lt;br /&gt;
 * @subpackage  com_helloworld&lt;br /&gt;
 *&lt;br /&gt;
 * @copyright   Copyright (C) 2005 - 2018 Open Source Matters, Inc. All rights reserved.&lt;br /&gt;
 * @license     GNU General Public License version 2 or later; see LICENSE.txt&lt;br /&gt;
 */&lt;br /&gt;
&lt;br /&gt;
// No direct access to this file&lt;br /&gt;
defined(&#039;_JEXEC&#039;) or die(&#039;Restricted access&#039;);&lt;br /&gt;
&lt;br /&gt;
/**&lt;br /&gt;
 * HelloWorlds View&lt;br /&gt;
 *&lt;br /&gt;
 * @since  0.0.1&lt;br /&gt;
 */&lt;br /&gt;
class HelloWorldViewHelloWorlds extends JViewLegacy&lt;br /&gt;
{&lt;br /&gt;
	/**&lt;br /&gt;
	 * Display the Hello World view&lt;br /&gt;
	 *&lt;br /&gt;
	 * @param   string  $tpl  The name of the template file to parse; automatically searches through the template paths.&lt;br /&gt;
	 *&lt;br /&gt;
	 * @return  void&lt;br /&gt;
	 */&lt;br /&gt;
	function display($tpl = null)&lt;br /&gt;
	{&lt;br /&gt;
		&lt;br /&gt;
		// Get application&lt;br /&gt;
		$app = JFactory::getApplication();&lt;br /&gt;
		$context = &amp;quot;helloworld.list.admin.helloworld&amp;quot;;&lt;br /&gt;
		// Get data from the model&lt;br /&gt;
		$this-&amp;gt;items			= $this-&amp;gt;get(&#039;Items&#039;);&lt;br /&gt;
		$this-&amp;gt;pagination		= $this-&amp;gt;get(&#039;Pagination&#039;);&lt;br /&gt;
		$this-&amp;gt;state			= $this-&amp;gt;get(&#039;State&#039;);&lt;br /&gt;
		// Remove the old ordering mechanism&lt;br /&gt;
		//$this-&amp;gt;filter_order 	= $app-&amp;gt;getUserStateFromRequest($context.&#039;filter_order&#039;, &#039;filter_order&#039;, &#039;greeting&#039;, &#039;cmd&#039;);&lt;br /&gt;
		//$this-&amp;gt;filter_order_Dir = $app-&amp;gt;getUserStateFromRequest($context.&#039;filter_order_Dir&#039;, &#039;filter_order_Dir&#039;, &#039;asc&#039;, &#039;cmd&#039;);&lt;br /&gt;
		$this-&amp;gt;filterForm    	= $this-&amp;gt;get(&#039;FilterForm&#039;);&lt;br /&gt;
		$this-&amp;gt;activeFilters 	= $this-&amp;gt;get(&#039;ActiveFilters&#039;);&lt;br /&gt;
        &lt;br /&gt;
		// What Access Permissions does this user have? What can (s)he do?&lt;br /&gt;
		$this-&amp;gt;canDo = JHelperContent::getActions(&#039;com_helloworld&#039;);&lt;br /&gt;
&lt;br /&gt;
		// Check for errors.&lt;br /&gt;
		if (count($errors = $this-&amp;gt;get(&#039;Errors&#039;)))&lt;br /&gt;
		{&lt;br /&gt;
			JError::raiseError(500, implode(&#039;&amp;lt;br /&amp;gt;&#039;, $errors));&lt;br /&gt;
&lt;br /&gt;
			return false;&lt;br /&gt;
		}&lt;br /&gt;
        &lt;br /&gt;
		// Set the submenu&lt;br /&gt;
		HelloWorldHelper::addSubmenu(&#039;helloworlds&#039;);&lt;br /&gt;
&lt;br /&gt;
		// Set the toolbar and number of found items&lt;br /&gt;
		$this-&amp;gt;addToolBar();&lt;br /&gt;
&lt;br /&gt;
		// Display the template&lt;br /&gt;
		parent::display($tpl);&lt;br /&gt;
&lt;br /&gt;
		// Set the document&lt;br /&gt;
		$this-&amp;gt;setDocument();&lt;br /&gt;
	}&lt;br /&gt;
&lt;br /&gt;
	/**&lt;br /&gt;
	 * Add the page title and toolbar.&lt;br /&gt;
	 *&lt;br /&gt;
	 * @return  void&lt;br /&gt;
	 *&lt;br /&gt;
	 * @since   1.6&lt;br /&gt;
	 */&lt;br /&gt;
	protected function addToolBar()&lt;br /&gt;
	{&lt;br /&gt;
		$title = JText::_(&#039;COM_HELLOWORLD_MANAGER_HELLOWORLDS&#039;);&lt;br /&gt;
&lt;br /&gt;
		if ($this-&amp;gt;pagination-&amp;gt;total)&lt;br /&gt;
		{&lt;br /&gt;
			$title .= &amp;quot;&amp;lt;span style=&#039;font-size: 0.5em; vertical-align: middle;&#039;&amp;gt;(&amp;quot; . $this-&amp;gt;pagination-&amp;gt;total . &amp;quot;)&amp;lt;/span&amp;gt;&amp;quot;;&lt;br /&gt;
		}&lt;br /&gt;
&lt;br /&gt;
		JToolBarHelper::title($title, &#039;helloworld&#039;);&lt;br /&gt;
		if ($this-&amp;gt;canDo-&amp;gt;get(&#039;core.create&#039;)) &lt;br /&gt;
		{&lt;br /&gt;
			JToolBarHelper::addNew(&#039;helloworld.add&#039;, &#039;JTOOLBAR_NEW&#039;);&lt;br /&gt;
		}&lt;br /&gt;
		if ($this-&amp;gt;canDo-&amp;gt;get(&#039;core.edit&#039;)) &lt;br /&gt;
		{&lt;br /&gt;
			JToolBarHelper::editList(&#039;helloworld.edit&#039;, &#039;JTOOLBAR_EDIT&#039;);&lt;br /&gt;
		}&lt;br /&gt;
		if ($this-&amp;gt;canDo-&amp;gt;get(&#039;core.delete&#039;)) &lt;br /&gt;
		{&lt;br /&gt;
			JToolBarHelper::deleteList(&#039;&#039;, &#039;helloworlds.delete&#039;, &#039;JTOOLBAR_DELETE&#039;);&lt;br /&gt;
		}&lt;br /&gt;
		if ($this-&amp;gt;canDo-&amp;gt;get(&#039;core.admin&#039;)) &lt;br /&gt;
		{&lt;br /&gt;
			JToolBarHelper::divider();&lt;br /&gt;
			JToolBarHelper::preferences(&#039;com_helloworld&#039;);&lt;br /&gt;
		}&lt;br /&gt;
	}&lt;br /&gt;
	/**&lt;br /&gt;
	 * Method to set up the document properties&lt;br /&gt;
	 *&lt;br /&gt;
	 * @return void&lt;br /&gt;
	 */&lt;br /&gt;
	protected function setDocument() &lt;br /&gt;
	{&lt;br /&gt;
		$document = JFactory::getDocument();&lt;br /&gt;
		$document-&amp;gt;setTitle(JText::_(&#039;COM_HELLOWORLD_ADMINISTRATION&#039;));&lt;br /&gt;
	}&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;translate&amp;gt;&amp;lt;!--T:53--&amp;gt; Note that in the layout file below the hidden input fields filter_order and filter_order_Dir have been removed.&amp;lt;/translate&amp;gt;  &lt;br /&gt;
&lt;br /&gt;
&amp;lt;span id=&amp;quot;admin/views/helloworlds/tmpl/default.php&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;tt&amp;gt;admin/views/helloworlds/tmpl/default.php&amp;lt;/tt&amp;gt;&lt;br /&gt;
&amp;lt;source lang=&amp;quot;php&amp;quot; highlight=&amp;quot;15-16,41-42,44-51,54,83-88,101-102&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;?php&lt;br /&gt;
/**&lt;br /&gt;
 * @package     Joomla.Administrator&lt;br /&gt;
 * @subpackage  com_helloworld&lt;br /&gt;
 *&lt;br /&gt;
 * @copyright   Copyright (C) 2005 - 2018 Open Source Matters, Inc. All rights reserved.&lt;br /&gt;
 * @license     GNU General Public License version 2 or later; see LICENSE.txt&lt;br /&gt;
 */&lt;br /&gt;
&lt;br /&gt;
// No direct access to this file&lt;br /&gt;
defined(&#039;_JEXEC&#039;) or die(&#039;Restricted Access&#039;);&lt;br /&gt;
&lt;br /&gt;
JHtml::_(&#039;formbehavior.chosen&#039;, &#039;select&#039;);&lt;br /&gt;
&lt;br /&gt;
$listOrder     = $this-&amp;gt;escape($this-&amp;gt;state-&amp;gt;get(&#039;list.ordering&#039;));&lt;br /&gt;
$listDirn      = $this-&amp;gt;escape($this-&amp;gt;state-&amp;gt;get(&#039;list.direction&#039;));&lt;br /&gt;
?&amp;gt;&lt;br /&gt;
&amp;lt;form action=&amp;quot;index.php?option=com_helloworld&amp;amp;view=helloworlds&amp;quot; method=&amp;quot;post&amp;quot; id=&amp;quot;adminForm&amp;quot; name=&amp;quot;adminForm&amp;quot;&amp;gt;&lt;br /&gt;
	&amp;lt;div id=&amp;quot;j-sidebar-container&amp;quot; class=&amp;quot;span2&amp;quot;&amp;gt;&lt;br /&gt;
		&amp;lt;?php echo JHtmlSidebar::render(); ?&amp;gt;&lt;br /&gt;
	&amp;lt;/div&amp;gt;&lt;br /&gt;
	&amp;lt;div id=&amp;quot;j-main-container&amp;quot; class=&amp;quot;span10&amp;quot;&amp;gt;&lt;br /&gt;
        &amp;lt;div class=&amp;quot;row-fluid&amp;quot;&amp;gt;&lt;br /&gt;
            &amp;lt;div class=&amp;quot;span6&amp;quot;&amp;gt;&lt;br /&gt;
                &amp;lt;?php echo JText::_(&#039;COM_HELLOWORLD_HELLOWORLDS_FILTER&#039;); ?&amp;gt;&lt;br /&gt;
                &amp;lt;?php&lt;br /&gt;
                    echo JLayoutHelper::render(&lt;br /&gt;
                        &#039;joomla.searchtools.default&#039;,&lt;br /&gt;
                        array(&#039;view&#039; =&amp;gt; $this)&lt;br /&gt;
                    );&lt;br /&gt;
                ?&amp;gt;&lt;br /&gt;
            &amp;lt;/div&amp;gt;&lt;br /&gt;
        &amp;lt;/div&amp;gt;&lt;br /&gt;
        &amp;lt;table class=&amp;quot;table table-striped table-hover&amp;quot;&amp;gt;&lt;br /&gt;
            &amp;lt;thead&amp;gt;&lt;br /&gt;
            &amp;lt;tr&amp;gt;&lt;br /&gt;
                &amp;lt;th width=&amp;quot;1%&amp;quot;&amp;gt;&amp;lt;?php echo JText::_(&#039;COM_HELLOWORLD_NUM&#039;); ?&amp;gt;&amp;lt;/th&amp;gt;&lt;br /&gt;
                &amp;lt;th width=&amp;quot;2%&amp;quot;&amp;gt;&lt;br /&gt;
                    &amp;lt;?php echo JHtml::_(&#039;grid.checkall&#039;); ?&amp;gt;&lt;br /&gt;
                &amp;lt;/th&amp;gt;&lt;br /&gt;
                &amp;lt;th width=&amp;quot;30%&amp;quot;&amp;gt;&lt;br /&gt;
                    &amp;lt;?php echo JHtml::_(&#039;searchtools.sort&#039;, &#039;COM_HELLOWORLD_HELLOWORLDS_NAME&#039;, &#039;greeting&#039;, $listDirn, $listOrder); ?&amp;gt;&lt;br /&gt;
                &amp;lt;/th&amp;gt;&lt;br /&gt;
                &amp;lt;th width=&amp;quot;30%&amp;quot;&amp;gt;&lt;br /&gt;
                    &amp;lt;?php echo JHtml::_(&#039;searchtools.sort&#039;, &#039;COM_HELLOWORLD_AUTHOR&#039;, &#039;author&#039;, $listDirn, $listOrder); ?&amp;gt;&lt;br /&gt;
                &amp;lt;/th&amp;gt;&lt;br /&gt;
                &amp;lt;th width=&amp;quot;30%&amp;quot;&amp;gt;&lt;br /&gt;
                    &amp;lt;?php echo JHtml::_(&#039;searchtools.sort&#039;, &#039;COM_HELLOWORLD_CREATED_DATE&#039;, &#039;created&#039;, $listDirn, $listOrder); ?&amp;gt;&lt;br /&gt;
                &amp;lt;/th&amp;gt;&lt;br /&gt;
                &amp;lt;th width=&amp;quot;5%&amp;quot;&amp;gt;&lt;br /&gt;
                    &amp;lt;?php echo JHtml::_(&#039;searchtools.sort&#039;, &#039;COM_HELLOWORLD_PUBLISHED&#039;, &#039;published&#039;, $listDirn, $listOrder); ?&amp;gt;&lt;br /&gt;
                &amp;lt;/th&amp;gt;&lt;br /&gt;
                &amp;lt;th width=&amp;quot;2%&amp;quot;&amp;gt;&lt;br /&gt;
                    &amp;lt;?php echo JHtml::_(&#039;searchtools.sort&#039;, &#039;COM_HELLOWORLD_ID&#039;, &#039;id&#039;, $listDirn, $listOrder); ?&amp;gt;&lt;br /&gt;
                &amp;lt;/th&amp;gt;&lt;br /&gt;
            &amp;lt;/tr&amp;gt;&lt;br /&gt;
            &amp;lt;/thead&amp;gt;&lt;br /&gt;
            &amp;lt;tfoot&amp;gt;&lt;br /&gt;
                &amp;lt;tr&amp;gt;&lt;br /&gt;
                    &amp;lt;td colspan=&amp;quot;5&amp;quot;&amp;gt;&lt;br /&gt;
                        &amp;lt;?php echo $this-&amp;gt;pagination-&amp;gt;getListFooter(); ?&amp;gt;&lt;br /&gt;
                    &amp;lt;/td&amp;gt;&lt;br /&gt;
                &amp;lt;/tr&amp;gt;&lt;br /&gt;
            &amp;lt;/tfoot&amp;gt;&lt;br /&gt;
            &amp;lt;tbody&amp;gt;&lt;br /&gt;
                &amp;lt;?php if (!empty($this-&amp;gt;items)) : ?&amp;gt;&lt;br /&gt;
                    &amp;lt;?php foreach ($this-&amp;gt;items as $i =&amp;gt; $row) :&lt;br /&gt;
                        $link = JRoute::_(&#039;index.php?option=com_helloworld&amp;amp;task=helloworld.edit&amp;amp;id=&#039; . $row-&amp;gt;id);&lt;br /&gt;
                    ?&amp;gt;&lt;br /&gt;
                        &amp;lt;tr&amp;gt;&lt;br /&gt;
                            &amp;lt;td&amp;gt;&amp;lt;?php echo $this-&amp;gt;pagination-&amp;gt;getRowOffset($i); ?&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
                            &amp;lt;td&amp;gt;&lt;br /&gt;
                                &amp;lt;?php echo JHtml::_(&#039;grid.id&#039;, $i, $row-&amp;gt;id); ?&amp;gt;&lt;br /&gt;
                            &amp;lt;/td&amp;gt;&lt;br /&gt;
                            &amp;lt;td&amp;gt;&lt;br /&gt;
                                &amp;lt;a href=&amp;quot;&amp;lt;?php echo $link; ?&amp;gt;&amp;quot; title=&amp;quot;&amp;lt;?php echo JText::_(&#039;COM_HELLOWORLD_EDIT_HELLOWORLD&#039;); ?&amp;gt;&amp;quot;&amp;gt;&lt;br /&gt;
                                    &amp;lt;?php echo $row-&amp;gt;greeting; ?&amp;gt;&lt;br /&gt;
                                &amp;lt;/a&amp;gt;&lt;br /&gt;
                                &amp;lt;div class=&amp;quot;small&amp;quot;&amp;gt;&lt;br /&gt;
									&amp;lt;?php echo JText::_(&#039;JCATEGORY&#039;) . &#039;: &#039; . $this-&amp;gt;escape($row-&amp;gt;category_title); ?&amp;gt;&lt;br /&gt;
								&amp;lt;/div&amp;gt;&lt;br /&gt;
                            &amp;lt;/td&amp;gt;&lt;br /&gt;
                            &amp;lt;td align=&amp;quot;center&amp;quot;&amp;gt;&lt;br /&gt;
                                &amp;lt;?php echo $row-&amp;gt;author; ?&amp;gt;&lt;br /&gt;
                            &amp;lt;/td&amp;gt;&lt;br /&gt;
                            &amp;lt;td align=&amp;quot;center&amp;quot;&amp;gt;&lt;br /&gt;
                                &amp;lt;?php echo substr($row-&amp;gt;created, 0, 10); ?&amp;gt;&lt;br /&gt;
                            &amp;lt;/td&amp;gt;&lt;br /&gt;
                            &amp;lt;td align=&amp;quot;center&amp;quot;&amp;gt;&lt;br /&gt;
                                &amp;lt;?php echo JHtml::_(&#039;jgrid.published&#039;, $row-&amp;gt;published, $i, &#039;helloworlds.&#039;, true, &#039;cb&#039;); ?&amp;gt;&lt;br /&gt;
                            &amp;lt;/td&amp;gt;&lt;br /&gt;
                            &amp;lt;td align=&amp;quot;center&amp;quot;&amp;gt;&lt;br /&gt;
                                &amp;lt;?php echo $row-&amp;gt;id; ?&amp;gt;&lt;br /&gt;
                            &amp;lt;/td&amp;gt;&lt;br /&gt;
                        &amp;lt;/tr&amp;gt;&lt;br /&gt;
                    &amp;lt;?php endforeach; ?&amp;gt;&lt;br /&gt;
                &amp;lt;?php endif; ?&amp;gt;&lt;br /&gt;
            &amp;lt;/tbody&amp;gt;&lt;br /&gt;
        &amp;lt;/table&amp;gt;&lt;br /&gt;
        &amp;lt;input type=&amp;quot;hidden&amp;quot; name=&amp;quot;task&amp;quot; value=&amp;quot;&amp;quot;/&amp;gt;&lt;br /&gt;
        &amp;lt;input type=&amp;quot;hidden&amp;quot; name=&amp;quot;boxchecked&amp;quot; value=&amp;quot;0&amp;quot;/&amp;gt;&lt;br /&gt;
        &amp;lt;?php echo JHtml::_(&#039;form.token&#039;); ?&amp;gt;&lt;br /&gt;
    &amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;/form&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;translate&amp;gt;&amp;lt;!--T:54--&amp;gt; Instead of the using the hidden fields &amp;quot;filter_order&amp;quot; and &amp;quot;filter_order_Dir&amp;quot; to keep track of the current column for ordering and direction, we will use the &amp;quot;list&amp;quot;[&amp;quot;fullordering&amp;quot;] field, and this will now be displayed on the form as well (as is done within com_content for the Articles view). We&#039;ll also need to include the new language strings in this field in our admin language file.&amp;lt;/translate&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;span id=&amp;quot;admin/models/forms/filter_helloworlds.xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;tt&amp;gt;admin/models/forms/filter_helloworlds.xml&amp;lt;/tt&amp;gt;&lt;br /&gt;
&amp;lt;source lang=&amp;quot;xml&amp;quot; highlight=&amp;quot;22-41&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;?xml version=&amp;quot;1.0&amp;quot; encoding=&amp;quot;utf-8&amp;quot;?&amp;gt;&lt;br /&gt;
&amp;lt;form&amp;gt;&lt;br /&gt;
	&amp;lt;fields name=&amp;quot;filter&amp;quot;&amp;gt;&lt;br /&gt;
		&amp;lt;field&lt;br /&gt;
			name=&amp;quot;search&amp;quot;&lt;br /&gt;
			type=&amp;quot;text&amp;quot;&lt;br /&gt;
			label=&amp;quot;COM_BANNERS_SEARCH_IN_TITLE&amp;quot;&lt;br /&gt;
			hint=&amp;quot;JSEARCH_FILTER&amp;quot;&lt;br /&gt;
			class=&amp;quot;js-stools-search-string&amp;quot;&lt;br /&gt;
		/&amp;gt;&lt;br /&gt;
		&amp;lt;field&lt;br /&gt;
			name=&amp;quot;published&amp;quot;&lt;br /&gt;
			type=&amp;quot;status&amp;quot;&lt;br /&gt;
			label=&amp;quot;JOPTION_SELECT_PUBLISHED&amp;quot;&lt;br /&gt;
			description=&amp;quot;JOPTION_SELECT_PUBLISHED_DESC&amp;quot;&lt;br /&gt;
			onchange=&amp;quot;this.form.submit();&amp;quot;&lt;br /&gt;
			&amp;gt;&lt;br /&gt;
			&amp;lt;option value=&amp;quot;&amp;quot;&amp;gt;JOPTION_SELECT_PUBLISHED&amp;lt;/option&amp;gt;&lt;br /&gt;
		&amp;lt;/field&amp;gt;&lt;br /&gt;
	&amp;lt;/fields&amp;gt;&lt;br /&gt;
	&amp;lt;fields name=&amp;quot;list&amp;quot;&amp;gt;&lt;br /&gt;
		&amp;lt;field&lt;br /&gt;
			name=&amp;quot;fullordering&amp;quot;&lt;br /&gt;
			type=&amp;quot;list&amp;quot;&lt;br /&gt;
			label=&amp;quot;COM_HELLOWORLD_LIST_FULL_ORDERING&amp;quot;&lt;br /&gt;
			description=&amp;quot;COM_HELLOWORLD_LIST_FULL_ORDERING_DESC&amp;quot;&lt;br /&gt;
			onchange=&amp;quot;this.form.submit();&amp;quot;&lt;br /&gt;
			default=&amp;quot;greeting ASC&amp;quot;&lt;br /&gt;
			&amp;gt;&lt;br /&gt;
			&amp;lt;option value=&amp;quot;&amp;quot;&amp;gt;JGLOBAL_SORT_BY&amp;lt;/option&amp;gt;&lt;br /&gt;
			&amp;lt;option value=&amp;quot;greeting ASC&amp;quot;&amp;gt;COM_HELLOWORLD_ORDERING_ASC&amp;lt;/option&amp;gt;&lt;br /&gt;
			&amp;lt;option value=&amp;quot;greeting DESC&amp;quot;&amp;gt;COM_HELLOWORLD_ORDERING_DESC&amp;lt;/option&amp;gt;&lt;br /&gt;
			&amp;lt;option value=&amp;quot;id ASC&amp;quot;&amp;gt;JGRID_HEADING_ID_ASC&amp;lt;/option&amp;gt;&lt;br /&gt;
			&amp;lt;option value=&amp;quot;id DESC&amp;quot;&amp;gt;JGRID_HEADING_ID_DESC&amp;lt;/option&amp;gt;&lt;br /&gt;
			&amp;lt;option value=&amp;quot;published ASC&amp;quot;&amp;gt;COM_HELLOWORLD_PUBLISHED_ASC&amp;lt;/option&amp;gt;&lt;br /&gt;
			&amp;lt;option value=&amp;quot;published DESC&amp;quot;&amp;gt;COM_HELLOWORLD_PUBLISHED_DESC&amp;lt;/option&amp;gt;&lt;br /&gt;
			&amp;lt;option value=&amp;quot;author ASC&amp;quot;&amp;gt;COM_HELLOWORLD_AUTHOR_ASC&amp;lt;/option&amp;gt;&lt;br /&gt;
			&amp;lt;option value=&amp;quot;author DESC&amp;quot;&amp;gt;COM_HELLOWORLD_AUTHOR_DESC&amp;lt;/option&amp;gt;&lt;br /&gt;
			&amp;lt;option value=&amp;quot;created ASC&amp;quot;&amp;gt;COM_HELLOWORLD_CREATED_ASC&amp;lt;/option&amp;gt;&lt;br /&gt;
			&amp;lt;option value=&amp;quot;created DESC&amp;quot;&amp;gt;COM_HELLOWORLD_CREATED_DESC&amp;lt;/option&amp;gt;&lt;br /&gt;
		&amp;lt;/field&amp;gt;&lt;br /&gt;
		&amp;lt;field&lt;br /&gt;
			name=&amp;quot;limit&amp;quot;&lt;br /&gt;
			type=&amp;quot;limitbox&amp;quot;&lt;br /&gt;
			class=&amp;quot;input-mini&amp;quot;&lt;br /&gt;
			default=&amp;quot;25&amp;quot;&lt;br /&gt;
			label=&amp;quot;COM_CONTENT_LIST_LIMIT&amp;quot;&lt;br /&gt;
			description=&amp;quot;COM_HELLOWORLD_LIST_LIMIT_DESC&amp;quot;&lt;br /&gt;
			onchange=&amp;quot;this.form.submit();&amp;quot;&lt;br /&gt;
		/&amp;gt;&lt;br /&gt;
	&amp;lt;/fields&amp;gt;&lt;br /&gt;
&amp;lt;/form&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;translate&amp;gt;&amp;lt;!--T:62--&amp;gt; The above status type field (second field element, with name=&amp;quot;published&amp;quot;) displays the status values &amp;quot;Trashed&amp;quot; and &amp;quot;Archived&amp;quot; which the Helloworld component doesn&#039;t support. We could define our own custom helloworldStatus type field which displayed only the publishing options, but as defining such custom fields has already been covered in the step [[S:MyLanguage/J3.x:Developing an MVC Component/Using the database|Using the database]] with our &amp;quot;helloworld&amp;quot; custom field, we won&#039;t bother with that here.&amp;lt;/translate&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;translate&amp;gt;&lt;br /&gt;
&amp;lt;!--T:59--&amp;gt;&lt;br /&gt;
Within the model we need to get the author and created date fields from the database, and we also need to add these to the &amp;lt;tt&amp;gt;filter_fields&amp;lt;/tt&amp;gt; array of fields which relate to sortable columns. &lt;br /&gt;
&amp;lt;/translate&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span id=&amp;quot;admin/models/helloworlds.php&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;tt&amp;gt;admin/models/helloworlds.php&amp;lt;/tt&amp;gt;&lt;br /&gt;
&amp;lt;source lang=&amp;quot;php&amp;quot; highlight=&amp;quot;34-35,62-64&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;?php&lt;br /&gt;
/**&lt;br /&gt;
 * @package     Joomla.Administrator&lt;br /&gt;
 * @subpackage  com_helloworld&lt;br /&gt;
 *&lt;br /&gt;
 * @copyright   Copyright (C) 2005 - 2018 Open Source Matters, Inc. All rights reserved.&lt;br /&gt;
 * @license     GNU General Public License version 2 or later; see LICENSE.txt&lt;br /&gt;
 */&lt;br /&gt;
// No direct access to this file&lt;br /&gt;
defined(&#039;_JEXEC&#039;) or die(&#039;Restricted access&#039;);&lt;br /&gt;
&lt;br /&gt;
/**&lt;br /&gt;
 * HelloWorldList Model&lt;br /&gt;
 *&lt;br /&gt;
 * @since  0.0.1&lt;br /&gt;
 */&lt;br /&gt;
class HelloWorldModelHelloWorlds extends JModelList&lt;br /&gt;
{&lt;br /&gt;
	/**&lt;br /&gt;
	 * Constructor.&lt;br /&gt;
	 *&lt;br /&gt;
	 * @param   array  $config  An optional associative array of configuration settings.&lt;br /&gt;
	 *&lt;br /&gt;
	 * @see     JController&lt;br /&gt;
	 * @since   1.6&lt;br /&gt;
	 */&lt;br /&gt;
	public function __construct($config = array())&lt;br /&gt;
	{&lt;br /&gt;
		if (empty($config[&#039;filter_fields&#039;]))&lt;br /&gt;
		{&lt;br /&gt;
			$config[&#039;filter_fields&#039;] = array(&lt;br /&gt;
				&#039;id&#039;,&lt;br /&gt;
				&#039;greeting&#039;,&lt;br /&gt;
				&#039;author&#039;,&lt;br /&gt;
				&#039;created&#039;,&lt;br /&gt;
				&#039;published&#039;&lt;br /&gt;
			);&lt;br /&gt;
		}&lt;br /&gt;
&lt;br /&gt;
		parent::__construct($config);&lt;br /&gt;
	}&lt;br /&gt;
&lt;br /&gt;
	/**&lt;br /&gt;
	 * Method to build an SQL query to load the list data.&lt;br /&gt;
	 *&lt;br /&gt;
	 * @return      string  An SQL query&lt;br /&gt;
	 */&lt;br /&gt;
	protected function getListQuery()&lt;br /&gt;
	{&lt;br /&gt;
		// Initialize variables.&lt;br /&gt;
		$db    = JFactory::getDbo();&lt;br /&gt;
		$query = $db-&amp;gt;getQuery(true);&lt;br /&gt;
&lt;br /&gt;
		// Create the base select statement.&lt;br /&gt;
		$query-&amp;gt;select(&#039;a.id as id, a.greeting as greeting, a.published as published, a.created as created&#039;)&lt;br /&gt;
			  -&amp;gt;from($db-&amp;gt;quoteName(&#039;#__helloworld&#039;, &#039;a&#039;));&lt;br /&gt;
&lt;br /&gt;
		// Join over the categories.&lt;br /&gt;
		$query-&amp;gt;select($db-&amp;gt;quoteName(&#039;c.title&#039;, &#039;category_title&#039;))&lt;br /&gt;
			-&amp;gt;join(&#039;LEFT&#039;, $db-&amp;gt;quoteName(&#039;#__categories&#039;, &#039;c&#039;) . &#039; ON c.id = a.catid&#039;);&lt;br /&gt;
        &lt;br /&gt;
		// Join with users table to get the username of the author&lt;br /&gt;
		$query-&amp;gt;select($db-&amp;gt;quoteName(&#039;u.username&#039;, &#039;author&#039;))&lt;br /&gt;
			-&amp;gt;join(&#039;LEFT&#039;, $db-&amp;gt;quoteName(&#039;#__users&#039;, &#039;u&#039;) . &#039; ON u.id = a.created_by&#039;);&lt;br /&gt;
            &lt;br /&gt;
		// Filter: like / search&lt;br /&gt;
		$search = $this-&amp;gt;getState(&#039;filter.search&#039;);&lt;br /&gt;
&lt;br /&gt;
		if (!empty($search))&lt;br /&gt;
		{&lt;br /&gt;
			$like = $db-&amp;gt;quote(&#039;%&#039; . $search . &#039;%&#039;);&lt;br /&gt;
			$query-&amp;gt;where(&#039;greeting LIKE &#039; . $like);&lt;br /&gt;
		}&lt;br /&gt;
&lt;br /&gt;
		// Filter by published state&lt;br /&gt;
		$published = $this-&amp;gt;getState(&#039;filter.published&#039;);&lt;br /&gt;
&lt;br /&gt;
		if (is_numeric($published))&lt;br /&gt;
		{&lt;br /&gt;
			$query-&amp;gt;where(&#039;a.published = &#039; . (int) $published);&lt;br /&gt;
		}&lt;br /&gt;
		elseif ($published === &#039;&#039;)&lt;br /&gt;
		{&lt;br /&gt;
			$query-&amp;gt;where(&#039;(a.published IN (0, 1))&#039;);&lt;br /&gt;
		}&lt;br /&gt;
&lt;br /&gt;
		// Add the list ordering clause.&lt;br /&gt;
		$orderCol	= $this-&amp;gt;state-&amp;gt;get(&#039;list.ordering&#039;, &#039;greeting&#039;);&lt;br /&gt;
		$orderDirn 	= $this-&amp;gt;state-&amp;gt;get(&#039;list.direction&#039;, &#039;asc&#039;);&lt;br /&gt;
&lt;br /&gt;
		$query-&amp;gt;order($db-&amp;gt;escape($orderCol) . &#039; &#039; . $db-&amp;gt;escape($orderDirn));&lt;br /&gt;
&lt;br /&gt;
		return $query;&lt;br /&gt;
	}&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&amp;lt;/span&amp;gt;&lt;br /&gt;
&amp;lt;translate&amp;gt;&lt;br /&gt;
==Updated Language Strings== &amp;lt;!--T:55--&amp;gt;&lt;br /&gt;
&amp;lt;/translate&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span id=&amp;quot;site/language/en-GB/en-GB.com_helloworld.ini&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;tt&amp;gt;site/language/en-GB/en-GB.com_helloworld.ini&amp;lt;/tt&amp;gt;&lt;br /&gt;
&amp;lt;source lang=&amp;quot;text&amp;quot; highlight=&amp;quot;1-20&amp;quot;&amp;gt;&lt;br /&gt;
; add new message form&lt;br /&gt;
COM_HELLOWORLD_LEGEND_DETAILS=&amp;quot;New Helloworld Message Details&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_HELLOWORLD_CREATING=&amp;quot;Add message&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_HELLOWORLD_ERROR_UNACCEPTABLE=&amp;quot;Sorry, you have an error&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_HELLOWORLD_DETAILS=&amp;quot;Message details&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_HELLOWORLD_GREETING_LABEL=&amp;quot;Greeting&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_HELLOWORLD_GREETING_DESC=&amp;quot;Please specify the greeting to add&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_HELLOWORLD_GREETING_HINT=&amp;quot;Letters only!&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_HELLOWORLD_FIELD_CATID_LABEL=&amp;quot;Category&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_HELLOWORLD_FIELD_CATID_DESC=&amp;quot;Please select the associated category&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_HELLOWORLD_MESSAGE_LABEL=&amp;quot;Reason&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_HELLOWORLD_MESSAGE_DESC=&amp;quot;Please say why you&#039;re adding this greeting&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_HELLOWORLD_MESSAGE_HINT=&amp;quot;No HTML tags!&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_HELLOWORLD_FIELD_CAPTCHA_LABEL=&amp;quot;Spam protection&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_HELLOWORLD_FIELD_CAPTCHA_DESC=&amp;quot;Prove you&#039;re a real person!&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_HELLOWORLD_FIELD_SHOW_CATEGORY_LABEL=&amp;quot;Display category or not?&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_HELLOWORLD_FIELD_SHOW_CATEGORY_DESC=&amp;quot;Select if you want the category displayed too&amp;quot;&lt;br /&gt;
; save and cancel confirmation messages&lt;br /&gt;
COM_HELLOWORLD_ADD_SUCCESSFUL=&amp;quot;New greeting successfully saved&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_ADD_CANCELLED=&amp;quot;New greeting cancelled ok&amp;quot;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span id=&amp;quot;admin/language/en-GB/en-GB.com_helloworld.sys.ini&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;tt&amp;gt;admin/language/en-GB/en-GB.com_helloworld.sys.ini&amp;lt;/tt&amp;gt;&lt;br /&gt;
&amp;lt;source lang=&amp;quot;text&amp;quot; highlight=&amp;quot;10-11&amp;quot;&amp;gt;&lt;br /&gt;
; Joomla! Project&lt;br /&gt;
; Copyright (C) 2005 - 2018 Open Source Matters. All rights reserved.&lt;br /&gt;
; License GNU General Public License version 2 or later; see LICENSE.txt, see LICENSE.php&lt;br /&gt;
; Note : All ini files need to be saved as UTF-8&lt;br /&gt;
&lt;br /&gt;
COM_HELLOWORLD=&amp;quot;Hello World!&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_DESCRIPTION=&amp;quot;This is the Hello World description&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_HELLOWORLD_VIEW_DEFAULT_TITLE=&amp;quot;Hello World&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_HELLOWORLD_VIEW_DEFAULT_DESC=&amp;quot;This view displays a selected message&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_ADD_VIEW_TITLE=&amp;quot;Hello World form&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_ADD_VIEW_DESC=&amp;quot;This displays a form to allow the user to enter a new message&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_INSTALL_TEXT=&amp;quot;HelloWorld Install script&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_MENU=&amp;quot;Hello World!&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_POSTFLIGHT_DISCOVER_INSTALL_TEXT=&amp;quot;HelloWorld postflight discover install script&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_POSTFLIGHT_INSTALL_TEXT=&amp;quot;HelloWorld postflight install script&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_POSTFLIGHT_UNINSTALL_TEXT=&amp;quot;HelloWorld postflight uninstall script&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_POSTFLIGHT_UPDATE_TEXT=&amp;quot;HelloWorld postflight update script&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_PREFLIGHT_DISCOVER_INSTALL_TEXT=&amp;quot;HelloWorld preflight discover install script&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_PREFLIGHT_INSTALL_TEXT=&amp;quot;HelloWorld preflight install script&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_PREFLIGHT_UNINSTALL_TEXT=&amp;quot;HelloWorld preflight uninstall script&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_PREFLIGHT_UPDATE_TEXT=&amp;quot;HelloWorld preflight update script&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_UNINSTALL_TEXT=&amp;quot;HelloWorld Uninstall script&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_UPDATE_TEXT=&amp;quot;HelloWorld Update script. HelloWorld now updated to version %s.&amp;quot;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span id=&amp;quot;admin/language/en-GB/en-GB.com_helloworld.ini&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;tt&amp;gt;admin/language/en-GB/en-GB.com_helloworld.ini&amp;lt;/tt&amp;gt;&lt;br /&gt;
&amp;lt;source lang=&amp;quot;text&amp;quot; highlight=&amp;quot;10-11,43-46,58-66&amp;quot;&amp;gt;&lt;br /&gt;
; Joomla! Project&lt;br /&gt;
; Copyright (C) 2005 - 2018 Open Source Matters. All rights reserved.&lt;br /&gt;
; License GNU General Public License version 2 or later; see LICENSE.txt, see LICENSE.php&lt;br /&gt;
; Note : All ini files need to be saved as UTF-8&lt;br /&gt;
&lt;br /&gt;
COM_HELLOWORLD_ADMINISTRATION=&amp;quot;HelloWorld - Administration&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_ADMINISTRATION_CATEGORIES=&amp;quot;HelloWorld - Categories&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_NUM=&amp;quot;#&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_HELLOWORLDS_FILTER=&amp;quot;Filters&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_AUTHOR=&amp;quot;Author&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_CREATED_DATE=&amp;quot;Created&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_PUBLISHED=&amp;quot;Published&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_HELLOWORLDS_NAME=&amp;quot;Name&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_ID=&amp;quot;Id&amp;quot;&lt;br /&gt;
&lt;br /&gt;
COM_HELLOWORLD_HELLOWORLD_CREATING=&amp;quot;HelloWorld - Creating&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_HELLOWORLD_DETAILS=&amp;quot;Details&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_HELLOWORLD_EDITING=&amp;quot;HelloWorld - Editing&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_HELLOWORLD_ERROR_UNACCEPTABLE=&amp;quot;Some values are unacceptable&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_HELLOWORLD_FIELD_CATID_DESC=&amp;quot;The category the messages belongs to&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_HELLOWORLD_FIELD_CATID_LABEL=&amp;quot;Category&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_HELLOWORLD_FIELD_GREETING_DESC=&amp;quot;This message will be displayed&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_HELLOWORLD_FIELD_GREETING_LABEL=&amp;quot;Message&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_HELLOWORLD_FIELD_SHOW_CATEGORY_LABEL=&amp;quot;Show category&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_HELLOWORLD_FIELD_SHOW_CATEGORY_DESC=&amp;quot;If set to Show, the title of the message&amp;amp;rsquo;s category will show.&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_HELLOWORLD_HEADING_GREETING=&amp;quot;Greeting&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_HELLOWORLD_HEADING_ID=&amp;quot;Id&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_MANAGER_HELLOWORLD_EDIT=&amp;quot;HelloWorld manager: Edit Message&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_MANAGER_HELLOWORLD_NEW=&amp;quot;HelloWorld manager: New Message&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_MANAGER_HELLOWORLDS=&amp;quot;HelloWorld manager&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_EDIT_HELLOWORLD=&amp;quot;Edit message&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_N_ITEMS_DELETED_1=&amp;quot;One message deleted&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_N_ITEMS_DELETED_MORE=&amp;quot;%d messages deleted&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_N_ITEMS_PUBLISHED=&amp;quot;%d message(s) published&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_N_ITEMS_UNPUBLISHED=&amp;quot;%d message(s) unpublished&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_HELLOWORLD_GREETING_LABEL=&amp;quot;Greeting&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_HELLOWORLD_GREETING_DESC=&amp;quot;Add Hello World Greeting&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_SUBMENU_MESSAGES=&amp;quot;Messages&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_SUBMENU_CATEGORIES=&amp;quot;Categories&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_CONFIGURATION=&amp;quot;HelloWorld Configuration&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_CONFIG_GREETING_SETTINGS_LABEL=&amp;quot;Messages settings&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_CONFIG_GREETING_SETTINGS_DESC=&amp;quot;Settings that will be applied to all messages by default&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_HELLOWORLD_FIELD_CAPTCHA_LABEL=&amp;quot;Captcha&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_HELLOWORLD_FIELD_CAPTCHA_DESC=&amp;quot;Select Captcha to use on front end form&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_HELLOWORLD_FIELD_USER_TO_EMAIL_LABEL=&amp;quot;User to email&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_HELLOWORLD_FIELD_USER_TO_EMAIL_DESC=&amp;quot;Select user to email when a new message is entered on front end&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_FIELDSET_RULES=&amp;quot;Message Permissions&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_FIELD_RULES_LABEL=&amp;quot;Permissions&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_ACCESS_DELETE_DESC=&amp;quot;Is this group allowed to edit this message?&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_ACCESS_DELETE_DESC=&amp;quot;Is this group allowed to delete this message?&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_TAB_NEW_MESSAGE=&amp;quot;New Message&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_TAB_EDIT_MESSAGE=&amp;quot;Message Details&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_TAB_PARAMS=&amp;quot;Parameters&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_TAB_PERMISSIONS=&amp;quot;Permissions&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_LEGEND_DETAILS=&amp;quot;Message Details&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_LEGEND_PARAMS=&amp;quot;Message Parameters&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_LEGEND_PERMISSIONS=&amp;quot;Message Permissions&amp;quot;&lt;br /&gt;
; Column ordering in the Helloworlds view&lt;br /&gt;
COM_HELLOWORLD_ORDERING_ASC=&amp;quot;Greeting ascending&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_ORDERING_DESC=&amp;quot;Greeting descending&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_AUTHOR_ASC=&amp;quot;Author ascending&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_AUTHOR_DESC=&amp;quot;Author descending&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_CREATED_ASC=&amp;quot;Creation date ascending&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_CREATED_DESC=&amp;quot;Creation date descending&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_PUBLISHED_ASC=&amp;quot;Unpublished first&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_PUBLISHED_DESC=&amp;quot;Published first&amp;quot;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;translate&amp;gt;&lt;br /&gt;
==Packaging the Component== &amp;lt;!--T:56--&amp;gt;&lt;br /&gt;
&amp;lt;/translate&amp;gt;&lt;br /&gt;
&amp;lt;translate&amp;gt;&amp;lt;!--T:57--&amp;gt; Contents of your code directory. Each file link below takes you to the step in the tutorial which has the latest version of that source code file.&amp;lt;/translate&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Adding_a_front-end_form#helloworld.xml|helloworld.xml]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Adding an install-uninstall-update script file#script.php|script.php]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Adding_a_view_to_the_site_part#site/helloworld.php|site/helloworld.php]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Developing_a_Basic_Component#index.html|site/index.html]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Adding_a_view_to_the_site_part#site/controller.php|site/controller.php]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Adding_a_front-end_form#site/controllers/helloworld.php|site/controllers/helloworld.php]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Developing_a_Basic_Component#index.html|site/views/index.html]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Developing_a_Basic_Component#index.html|site/views/helloworld/index.html]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Adding_configuration#site/views/helloworld/view.html.php|site/views/helloworld/view.html.php]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Developing_a_Basic_Component#index.html|site/views/helloworld/tmpl/index.html]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Using_the_database#site/views/helloworld/tmpl/default.xml|site/views/helloworld/tmpl/default.xml]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Adding_configuration#site/views/helloworld/tmpl/default.php|site/views/helloworld/tmpl/default.php]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Developing_a_Basic_Component#index.html|site/views/form/index.html]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Adding_a_front-end_form#site/views/form/view.html.php|site/views/form/view.html.php]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Developing_a_Basic_Component#index.html|site/views/form/tmpl/index.html]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Adding_a_front-end_form#site/views/form/tmpl/edit.php|site/views/form/tmpl/edit.php]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Adding_a_front-end_form#site/views/form/tmpl/edit.xml|site/views/form/tmpl/edit.xml]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Developing_a_Basic_Component#index.html|site/models/index.html]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Adding_configuration#site/models/helloworld.php|site/models/helloworld.php]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Adding_a_front-end_form#site/models/form.php|site/models/form.php]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Developing_a_Basic_Component#index.html|site/models/forms/index.html]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Adding_a_front-end_form#site/models/forms/add-form.xml|site/models/forms/add-form.xml]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Developing_a_Basic_Component#index.html|site/language/index.html]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Developing_a_Basic_Component#index.html|site/language/en-GB/index.html]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.x:Developing an MVC Component/Adding_a_front-end_form#site/language/en-GB/en-GB.com_helloworld.ini|site/language/en-GB/en-GB.com_helloworld.ini]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Developing_a_Basic_Component#index.html|admin/index.html]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Adding_ACL#admin/helloworld.php|admin/helloworld.php]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Adding_ACL#admin/config.xml|admin/config.xml]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Basic_backend#admin/controller.php|admin/controller.php]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Adding_ACL#admin/access.xml|admin/access.xml]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Adding_categories#admin/helpers/helloworld.php|admin/helpers/helloworld.php]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Developing_a_Basic_Component#index.html|admin/helpers/index.html]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Developing_a_Basic_Component#index.html|admin/sql/index.html]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Adding_a_front-end_form#admin/sql/install.mysql.utf8.sql|admin/sql/install.mysql.utf8.sql]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Using_the_database#admin/sql/uninstall.mysql.utf8.sql|admin/sql/uninstall.mysql.utf8.sql]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Developing_a_Basic_Component#index.html|admin/sql/updates/index.html]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Developing_a_Basic_Component#index.html|admin/sql/updates/mysql/index.html]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Developing_a_Basic_Component#admin/sql/updates/mysql/0.0.1.sql|admin/sql/updates/mysql/0.0.1.sql]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Using_the_database#admin/sql/install.mysql.utf8.sql|admin/sql/updates/mysql/0.0.6.sql]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Adding_categories#admin/sql/updates/mysql/0.0.12.sql|admin/sql/updates/mysql/0.0.12.sql]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Adding_configuration#admin/sql/updates/mysql/0.0.13.sql|admin/sql/updates/mysql/0.0.13.sql]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Adding_ACL#admin/sql/updates/mysql/0.0.14.sql|admin/sql/updates/mysql/0.0.14.sql]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Adding_a_front-end_form#admin/sql/updates/mysql/0.0.16.sql|admin/sql/updates/mysql/0.0.16.sql]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Developing_a_Basic_Component#index.html|admin/models/index.html]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Developing_a_Basic_Component#index.html|admin/models/fields/index.html]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Adding_categories#admin/models/fields/helloworld.php|admin/models/fields/helloworld.php]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Adding_a_front-end_form#admin/models/helloworlds.php|admin/models/helloworlds.php]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Adding_ACL#admin/models/helloworld.php|admin/models/helloworld.php]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Adding_a_front-end_form#admin/models/forms/filter_helloworlds.xml|admin/models/forms/filter_helloworlds.xml]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Developing_a_Basic_Component#index.html|admin/models/forms/index.html]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Adding_verifications#admin/models/forms/helloworld.js|admin/models/forms/helloworld.js]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Adding_ACL#admin/models/forms/helloworld.xml|admin/models/forms/helloworld.xml]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Adding_verifications#admin/models/rules/greeting.php|admin/models/rules/greeting.php]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Developing_a_Basic_Component#index.html|admin/models/rules/index.html]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Adding_ACL#admin/controllers/helloworld.php|admin/controllers/helloworld.php]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Adding_backend_actions#admin/controllers/helloworlds.php|admin/controllers/helloworlds.php]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Developing_a_Basic_Component#index.html|admin/controllers/index.html]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Developing_a_Basic_Component#index.html|admin/views/index.html]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Developing_a_Basic_Component#index.html|admin/views/helloworld/index.html]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Adding_ACL#admin/views/helloworld/view.html.php|admin/views/helloworld/view.html.php]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Developing_a_Basic_Component#index.html|admin/views/helloworld/tmpl/index.html]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Adding_ACL#admin/views/helloworld/tmpl/edit.php|admin/views/helloworld/tmpl/edit.php]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Adding_verifications#admin/views/helloworld/submitbutton.js|admin/views/helloworld/submitbutton.js]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Developing_a_Basic_Component#index.html|admin/views/helloworlds/index.html]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Adding_a_front-end_form#admin/views/helloworlds/view.html.php|admin/views/helloworlds/view.html.php]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Developing_a_Basic_Component#index.html|admin/views/helloworlds/tmpl/index.html]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Adding_a_front-end_form#admin/views/helloworlds/tmpl/default.php|admin/views/helloworlds/tmpl/default.php]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Developing_a_Basic_Component#index.html|admin/tables/index.html]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Adding_ACL#admin/tables/helloworld.php|admin/tables/helloworld.php]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Developing_a_Basic_Component#index.html|admin/language/index.html]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Developing_a_Basic_Component#index.html|admin/language/en-GB/index.html]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.x:Developing an MVC Component/Adding_a_front-end_form#admin.2Flanguage.2Fen-GB.2Fen-GB.com_helloworld.ini|admin/language/en-GB/en-GB.com_helloworld.ini]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.x:Developing an MVC Component/Adding_a_front-end_form#admin.2Flanguage.2Fen-GB.2Fen-GB.com_helloworld.sys.ini|admin/language/en-GB/en-GB.com_helloworld.sys.ini]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Developing_a_Basic_Component#index.html|media/index.html]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Developing_a_Basic_Component#index.html|media/images/index.html]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.x:Developing_an_MVC_Component/Adding_decorations_to_the_backend#Adding_some_icons|media/images/tux-16x16.png]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.x:Developing_an_MVC_Component/Adding_decorations_to_the_backend#Adding_some_icons|media/images/tux-48x48.png]]&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span id=&amp;quot;helloworld.xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;tt&amp;gt;helloworld.xml&amp;lt;/tt&amp;gt;&lt;br /&gt;
&amp;lt;source lang=&amp;quot;xml&amp;quot; highlight=&amp;quot;13,44&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;?xml version=&amp;quot;1.0&amp;quot; encoding=&amp;quot;utf-8&amp;quot;?&amp;gt;&lt;br /&gt;
&amp;lt;extension type=&amp;quot;component&amp;quot; version=&amp;quot;3.0&amp;quot; method=&amp;quot;upgrade&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
	&amp;lt;name&amp;gt;COM_HELLOWORLD&amp;lt;/name&amp;gt;&lt;br /&gt;
	&amp;lt;!-- The following elements are optional and free of formatting constraints --&amp;gt;&lt;br /&gt;
	&amp;lt;creationDate&amp;gt;January 2018&amp;lt;/creationDate&amp;gt;&lt;br /&gt;
	&amp;lt;author&amp;gt;John Doe&amp;lt;/author&amp;gt;&lt;br /&gt;
	&amp;lt;authorEmail&amp;gt;john.doe@example.org&amp;lt;/authorEmail&amp;gt;&lt;br /&gt;
	&amp;lt;authorUrl&amp;gt;http://www.example.org&amp;lt;/authorUrl&amp;gt;&lt;br /&gt;
	&amp;lt;copyright&amp;gt;Copyright Info&amp;lt;/copyright&amp;gt;&lt;br /&gt;
	&amp;lt;license&amp;gt;License Info&amp;lt;/license&amp;gt;&lt;br /&gt;
	&amp;lt;!--  The version string is recorded in the components table --&amp;gt;&lt;br /&gt;
	&amp;lt;version&amp;gt;0.0.16&amp;lt;/version&amp;gt;&lt;br /&gt;
	&amp;lt;!-- The description is optional and defaults to the name --&amp;gt;&lt;br /&gt;
	&amp;lt;description&amp;gt;COM_HELLOWORLD_DESCRIPTION&amp;lt;/description&amp;gt;&lt;br /&gt;
&lt;br /&gt;
	&amp;lt;!-- Runs on install/uninstall/update; New in 2.5 --&amp;gt;&lt;br /&gt;
	&amp;lt;scriptfile&amp;gt;script.php&amp;lt;/scriptfile&amp;gt;&lt;br /&gt;
&lt;br /&gt;
	&amp;lt;install&amp;gt; &amp;lt;!-- Runs on install --&amp;gt;&lt;br /&gt;
		&amp;lt;sql&amp;gt;&lt;br /&gt;
			&amp;lt;file driver=&amp;quot;mysql&amp;quot; charset=&amp;quot;utf8&amp;quot;&amp;gt;sql/install.mysql.utf8.sql&amp;lt;/file&amp;gt;&lt;br /&gt;
		&amp;lt;/sql&amp;gt;&lt;br /&gt;
	&amp;lt;/install&amp;gt;&lt;br /&gt;
	&amp;lt;uninstall&amp;gt; &amp;lt;!-- Runs on uninstall --&amp;gt;&lt;br /&gt;
		&amp;lt;sql&amp;gt;&lt;br /&gt;
			&amp;lt;file driver=&amp;quot;mysql&amp;quot; charset=&amp;quot;utf8&amp;quot;&amp;gt;sql/uninstall.mysql.utf8.sql&amp;lt;/file&amp;gt;&lt;br /&gt;
		&amp;lt;/sql&amp;gt;&lt;br /&gt;
	&amp;lt;/uninstall&amp;gt;&lt;br /&gt;
	&amp;lt;update&amp;gt; &amp;lt;!-- Runs on update; New since J2.5 --&amp;gt;&lt;br /&gt;
		&amp;lt;schemas&amp;gt;&lt;br /&gt;
			&amp;lt;schemapath type=&amp;quot;mysql&amp;quot;&amp;gt;sql/updates/mysql&amp;lt;/schemapath&amp;gt;&lt;br /&gt;
		&amp;lt;/schemas&amp;gt;&lt;br /&gt;
	&amp;lt;/update&amp;gt;&lt;br /&gt;
&lt;br /&gt;
	&amp;lt;!-- Site Main File Copy Section --&amp;gt;&lt;br /&gt;
	&amp;lt;!-- Note the folder attribute: This attribute describes the folder&lt;br /&gt;
		to copy FROM in the package to install therefore files copied&lt;br /&gt;
		in this section are copied from /site/ in the package --&amp;gt;&lt;br /&gt;
	&amp;lt;files folder=&amp;quot;site&amp;quot;&amp;gt;&lt;br /&gt;
		&amp;lt;filename&amp;gt;index.html&amp;lt;/filename&amp;gt;&lt;br /&gt;
		&amp;lt;filename&amp;gt;helloworld.php&amp;lt;/filename&amp;gt;&lt;br /&gt;
		&amp;lt;filename&amp;gt;controller.php&amp;lt;/filename&amp;gt;&lt;br /&gt;
		&amp;lt;folder&amp;gt;controllers&amp;lt;/folder&amp;gt;&lt;br /&gt;
		&amp;lt;folder&amp;gt;views&amp;lt;/folder&amp;gt;&lt;br /&gt;
		&amp;lt;folder&amp;gt;models&amp;lt;/folder&amp;gt;&lt;br /&gt;
	&amp;lt;/files&amp;gt;&lt;br /&gt;
&lt;br /&gt;
        &amp;lt;languages folder=&amp;quot;site/language&amp;quot;&amp;gt;&lt;br /&gt;
		&amp;lt;language tag=&amp;quot;en-GB&amp;quot;&amp;gt;en-GB/en-GB.com_helloworld.ini&amp;lt;/language&amp;gt;&lt;br /&gt;
        &amp;lt;/languages&amp;gt;&lt;br /&gt;
&lt;br /&gt;
	&amp;lt;media destination=&amp;quot;com_helloworld&amp;quot; folder=&amp;quot;media&amp;quot;&amp;gt;&lt;br /&gt;
		&amp;lt;filename&amp;gt;index.html&amp;lt;/filename&amp;gt;&lt;br /&gt;
		&amp;lt;folder&amp;gt;images&amp;lt;/folder&amp;gt;&lt;br /&gt;
	&amp;lt;/media&amp;gt;&lt;br /&gt;
&lt;br /&gt;
	&amp;lt;administration&amp;gt;&lt;br /&gt;
		&amp;lt;!-- Administration Menu Section --&amp;gt;&lt;br /&gt;
		&amp;lt;menu link=&#039;index.php?option=com_helloworld&#039; img=&amp;quot;../media/com_helloworld/images/tux-16x16.png&amp;quot;&amp;gt;COM_HELLOWORLD_MENU&amp;lt;/menu&amp;gt;&lt;br /&gt;
		&amp;lt;!-- Administration Main File Copy Section --&amp;gt;&lt;br /&gt;
		&amp;lt;!-- Note the folder attribute: This attribute describes the folder&lt;br /&gt;
			to copy FROM in the package to install therefore files copied&lt;br /&gt;
			in this section are copied from /admin/ in the package --&amp;gt;&lt;br /&gt;
		&amp;lt;files folder=&amp;quot;admin&amp;quot;&amp;gt;&lt;br /&gt;
			&amp;lt;!-- Admin Main File Copy Section --&amp;gt;&lt;br /&gt;
			&amp;lt;filename&amp;gt;index.html&amp;lt;/filename&amp;gt;&lt;br /&gt;
			&amp;lt;filename&amp;gt;config.xml&amp;lt;/filename&amp;gt;&lt;br /&gt;
			&amp;lt;filename&amp;gt;helloworld.php&amp;lt;/filename&amp;gt;&lt;br /&gt;
			&amp;lt;filename&amp;gt;controller.php&amp;lt;/filename&amp;gt;&lt;br /&gt;
			&amp;lt;filename&amp;gt;access.xml&amp;lt;/filename&amp;gt;&lt;br /&gt;
			&amp;lt;!-- SQL files section --&amp;gt;&lt;br /&gt;
			&amp;lt;folder&amp;gt;sql&amp;lt;/folder&amp;gt;&lt;br /&gt;
			&amp;lt;!-- tables files section --&amp;gt;&lt;br /&gt;
			&amp;lt;folder&amp;gt;tables&amp;lt;/folder&amp;gt;&lt;br /&gt;
			&amp;lt;!-- models files section --&amp;gt;&lt;br /&gt;
			&amp;lt;folder&amp;gt;models&amp;lt;/folder&amp;gt;&lt;br /&gt;
			&amp;lt;!-- views files section --&amp;gt;&lt;br /&gt;
			&amp;lt;folder&amp;gt;views&amp;lt;/folder&amp;gt;&lt;br /&gt;
			&amp;lt;!-- controllers files section --&amp;gt;&lt;br /&gt;
			&amp;lt;folder&amp;gt;controllers&amp;lt;/folder&amp;gt;&lt;br /&gt;
			&amp;lt;!-- helpers files section --&amp;gt;&lt;br /&gt;
			&amp;lt;folder&amp;gt;helpers&amp;lt;/folder&amp;gt;&lt;br /&gt;
		&amp;lt;/files&amp;gt;&lt;br /&gt;
		&amp;lt;languages folder=&amp;quot;admin/language&amp;quot;&amp;gt;&lt;br /&gt;
        		&amp;lt;language tag=&amp;quot;en-GB&amp;quot;&amp;gt;en-GB/en-GB.com_helloworld.ini&amp;lt;/language&amp;gt;&lt;br /&gt;
                        &amp;lt;language tag=&amp;quot;en-GB&amp;quot;&amp;gt;en-GB/en-GB.com_helloworld.sys.ini&amp;lt;/language&amp;gt;&lt;br /&gt;
		&amp;lt;/languages&amp;gt;&lt;br /&gt;
	&amp;lt;/administration&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/extension&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;translate&amp;gt;&lt;br /&gt;
== Contributors == &amp;lt;!--T:58--&amp;gt;&lt;br /&gt;
&amp;lt;/translate&amp;gt;&lt;br /&gt;
*[[User:Robbiej|Robbie Jackson]]&lt;br /&gt;
&lt;br /&gt;
{{-}}&lt;br /&gt;
&amp;lt;div class=&amp;quot;row&amp;quot;&amp;gt; &lt;br /&gt;
&amp;lt;div class=&amp;quot;large-6 columns&amp;quot;&amp;gt;{{Basic button|&amp;lt;translate&amp;gt;&amp;lt;!--T:4--&amp;gt; S:MyLanguage/J3.x:Developing_an_MVC_Component/Adding_an_install-uninstall-update_script_file|Prev: Adding an install-uninstall-update script file&amp;lt;/translate&amp;gt;|class=expand success}}&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;div class=&amp;quot;large-6 columns&amp;quot;&amp;gt;{{Basic button|&amp;lt;translate&amp;gt;&amp;lt;!--T:5--&amp;gt; S:MyLanguage/J3.x:Developing_an_MVC_Component/Adding an Image|Next: Adding an image&amp;lt;/translate&amp;gt;|class=expand}}&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;noinclude&amp;gt;&lt;br /&gt;
[[Category:Joomla! 3.x{{#translation:}}]]&lt;br /&gt;
[[Category:Joomla! 3.0{{#translation:}}]]&lt;br /&gt;
[[Category:Joomla! 3.1{{#translation:}}]]&lt;br /&gt;
[[Category:Joomla! 3.2{{#translation:}}]]&lt;br /&gt;
[[Category:Joomla! 3.3{{#translation:}}]]&lt;br /&gt;
[[Category:Joomla! 3.4{{#translation:}}]]&lt;br /&gt;
[[Category:Beginner Development{{#translation:}}]]&lt;br /&gt;
[[Category:Component Development{{#translation:}}]]&lt;br /&gt;
[[Category:Tutorials{{#translation:}}]]&lt;br /&gt;
[[Category:Tutorials in a Series{{#translation:}}]]&lt;br /&gt;
&amp;lt;/noinclude&amp;gt;&lt;/div&gt;</summary>
		<author><name>Stan31337</name></author>
	</entry>
	<entry>
		<id>https://docs.sandbox.joomla.org/index.php?title=J3.x:Developing_an_MVC_Component/Adding_a_front-end_form&amp;diff=589122</id>
		<title>J3.x:Developing an MVC Component/Adding a front-end form</title>
		<link rel="alternate" type="text/html" href="https://docs.sandbox.joomla.org/index.php?title=J3.x:Developing_an_MVC_Component/Adding_a_front-end_form&amp;diff=589122"/>
		<updated>2019-01-30T08:19:59Z</updated>

		<summary type="html">&lt;p&gt;Stan31337: 14 and 15 lines also changed&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;noinclude&amp;gt;&amp;lt;languages /&amp;gt;&amp;lt;/noinclude&amp;gt;&lt;br /&gt;
{{:J3.1:Developing an MVC Component/&amp;lt;translate&amp;gt;&amp;lt;!--T:1--&amp;gt;&lt;br /&gt;
en&amp;lt;/translate&amp;gt;}}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;translate&amp;gt;&amp;lt;!--T:3--&amp;gt; This tutorial is part of the [[S:MyLanguage/J3.x:Developing_an_MVC_Component/Introduction|Developing a MVC Component for Joomla! 3.x]] tutorial. You are encouraged to read the previous parts of the tutorial before reading this.&amp;lt;/translate&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;translate&amp;gt;&lt;br /&gt;
== Introduction == &amp;lt;!--T:6--&amp;gt;&lt;br /&gt;
&amp;lt;/translate&amp;gt;&lt;br /&gt;
&amp;lt;translate&amp;gt;&amp;lt;!--T:7--&amp;gt; In this step we add a form to the site front end to allow users to add a new Helloworld record. You could adapt the code in this step to provide a range of front-end data entry functionality, from, eg&amp;lt;/translate&amp;gt;&lt;br /&gt;
* &amp;lt;translate&amp;gt;&amp;lt;!--T:8--&amp;gt; a registration form to allow visitors to the site to express interest, to,&amp;lt;/translate&amp;gt; &lt;br /&gt;
* &amp;lt;translate&amp;gt;&amp;lt;!--T:9--&amp;gt; a facility to allow suppliers to maintain the data in certain tables, but without giving them access to the back end administration functionality&amp;lt;/translate&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;translate&amp;gt;&amp;lt;!--T:63--&amp;gt; There are two videos associated with this step, covering the [https://youtu.be/2NStYpB5JQM overall approach] and [https://youtu.be/t3IxuWQfa6E other topics] raised here.&amp;lt;/translate&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*&amp;lt;translate&amp;gt;&amp;lt;!--T:60--&amp;gt; Overall approach&amp;lt;/translate&amp;gt;&lt;br /&gt;
{{#widget:YouTube|id=2NStYpB5JQM}}&lt;br /&gt;
*&amp;lt;translate&amp;gt;&amp;lt;!--T:61--&amp;gt; Other topics&amp;lt;/translate&amp;gt;&lt;br /&gt;
{{#widget:YouTube|id=t3IxuWQfa6E}}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;translate&amp;gt;&lt;br /&gt;
== Functionality == &amp;lt;!--T:10--&amp;gt;&lt;br /&gt;
&amp;lt;/translate&amp;gt;&lt;br /&gt;
&amp;lt;translate&amp;gt;&amp;lt;!--T:11--&amp;gt; In this step we will build the following functionality:&amp;lt;/translate&amp;gt;&lt;br /&gt;
* &amp;lt;translate&amp;gt;&amp;lt;!--T:12--&amp;gt; a front-end form that allows someone to enter a new helloworld record, together with Save and Cancel buttons.&amp;lt;/translate&amp;gt;&lt;br /&gt;
* &amp;lt;translate&amp;gt;&amp;lt;!--T:13--&amp;gt; additional fields in the helloworld database table to capture the user who entered the record, and the creation date/time&amp;lt;/translate&amp;gt;&lt;br /&gt;
* &amp;lt;translate&amp;gt;&amp;lt;!--T:14--&amp;gt; validation of the data entered into the fields, including removing dangerous items such as html tags&amp;lt;/translate&amp;gt;&lt;br /&gt;
* &amp;lt;translate&amp;gt;&amp;lt;!--T:15--&amp;gt; access control on the form, controlling who can add a new record&amp;lt;/translate&amp;gt;&lt;br /&gt;
* &amp;lt;translate&amp;gt;&amp;lt;!--T:16--&amp;gt; an email to an administrator, to indicate that someone has entered a new record (and we&#039;ll include a field on the form where the user can include some text which just goes into the email)&amp;lt;/translate&amp;gt;&lt;br /&gt;
* &amp;lt;translate&amp;gt;&amp;lt;!--T:17--&amp;gt; a captcha on the form&amp;lt;/translate&amp;gt;&lt;br /&gt;
* &amp;lt;translate&amp;gt;&amp;lt;!--T:18--&amp;gt; a front-end menu item which points to the form (ie how users get access to the form)&amp;lt;/translate&amp;gt;&lt;br /&gt;
* &amp;lt;translate&amp;gt;&amp;lt;!--T:19--&amp;gt; update to the admin helloworlds view to include the author and creation date in the display.&amp;lt;/translate&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;translate&amp;gt;&lt;br /&gt;
== Approach == &amp;lt;!--T:20--&amp;gt;&lt;br /&gt;
&amp;lt;/translate&amp;gt;&lt;br /&gt;
&amp;lt;translate&amp;gt;&amp;lt;!--T:21--&amp;gt; Providing a form on the site front end is pretty much the same as on the admin back end, so much of what is developed in this step reflects what was done in the step [[S:MyLanguage/J3.x:Developing an MVC Component/Adding backend actions|Adding backend actions]], and in particular the Edit form for helloworld messages.&amp;lt;/translate&amp;gt; &lt;br /&gt;
&amp;lt;translate&amp;gt;&lt;br /&gt;
&amp;lt;!--T:22--&amp;gt;&lt;br /&gt;
For this form we&#039;ll use (all in the site part)&lt;br /&gt;
* the same main helloworld controller (controller.php)&lt;br /&gt;
* a new view – which we&#039;ll call &amp;quot;form&amp;quot;&lt;br /&gt;
* a new layout, associated with the form view, which we&#039;ll call &amp;quot;edit&amp;quot; (like the admin layout file)&lt;br /&gt;
* a new model – which we&#039;ll call &amp;quot;form&amp;quot; also, to align with the view&lt;br /&gt;
* an xml file for the form, which we&#039;ll put in add-form.xml in the model&amp;lt;/translate&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;translate&amp;gt;&amp;lt;!--T:23--&amp;gt; In addition we&#039;ll need to handle the HTTP POST requests arising from the user pressing the Save and Cancel buttons, and we&#039;ll do this in:&amp;lt;/translate&amp;gt;&lt;br /&gt;
&amp;lt;translate&amp;gt;&amp;lt;!--T:24--&amp;gt;&lt;br /&gt;
* a new helloworld controller in the controllers directory (handling Save and Cancel)&lt;br /&gt;
* the same form.php model as above (handling Save)&amp;lt;/translate&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;translate&amp;gt;&amp;lt;!--T:25--&amp;gt; Upon completion of Save/Cancel we&#039;ll redirect back to the same form.&amp;lt;/translate&amp;gt;&lt;br /&gt;
&amp;lt;translate&amp;gt;&lt;br /&gt;
&amp;lt;!--T:26--&amp;gt;&lt;br /&gt;
As for the admin case, we&#039;ll consider our classes extending some of the controller and model classes which are richer in functionality that the simple legacy ones&amp;lt;/translate&amp;gt;&lt;br /&gt;
&amp;lt;translate&amp;gt;&amp;lt;!--T:27--&amp;gt;&lt;br /&gt;
* the model will extend JModelAdmin (which supports forms, as well as saving records to the database) - even though it&#039;s called JModelAdmin it&#039;s still available within the site part&lt;br /&gt;
* the controller handling the POST will extend JControllerForm (which includes the cancel() and save() methods).&amp;lt;/translate&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;translate&amp;gt;&amp;lt;!--T:28--&amp;gt; Some of the other aspects in this step will involve using the techniques covered in earlier steps, namely [[S:MyLanguage/J3.x:Developing an MVC Component/Adding a menu type to the site part|Adding a menu type to the site part]], [[S:MyLanguage/J3.x:Developing an MVC Component/Adding verifications|Adding verifications]], [[S:MyLanguage/J3.x:Developing an MVC Component/Adding configuration|Adding configuration]] and [[S:MyLanguage/J3.x:Developing an MVC Component/Adding ACL|Adding ACL]].&amp;lt;/translate&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;translate&amp;gt;&lt;br /&gt;
==Updating the Database== &amp;lt;!--T:29--&amp;gt;&lt;br /&gt;
&amp;lt;/translate&amp;gt;&lt;br /&gt;
&amp;lt;translate&amp;gt;&amp;lt;!--T:30--&amp;gt; We need to add the two new fields to our install and update scripts. To record who added the new helloworld greeting we&#039;ll store the user&#039;s userid, and this will be zero if the user is not logged on.&amp;lt;/translate&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;span id=&amp;quot;admin/sql/install.mysql.utf8.sql&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;tt&amp;gt;admin/sql/install.mysql.utf8.sql&amp;lt;/tt&amp;gt;&lt;br /&gt;
&amp;lt;source lang=&amp;quot;sql&amp;quot; highlight=&amp;quot;6,7&amp;quot;&amp;gt;&lt;br /&gt;
DROP TABLE IF EXISTS `#__helloworld`;&lt;br /&gt;
&lt;br /&gt;
CREATE TABLE `#__helloworld` (&lt;br /&gt;
	`id`       INT(11)     NOT NULL AUTO_INCREMENT,&lt;br /&gt;
	`asset_id` INT(10)     NOT NULL DEFAULT &#039;0&#039;,&lt;br /&gt;
	`created`  DATETIME    NOT NULL DEFAULT &#039;0000-00-00 00:00:00&#039;,&lt;br /&gt;
	`created_by`  INT(10) UNSIGNED NOT NULL DEFAULT &#039;0&#039;,&lt;br /&gt;
	`greeting` VARCHAR(25) NOT NULL,&lt;br /&gt;
	`published` tinyint(4) NOT NULL DEFAULT &#039;1&#039;,&lt;br /&gt;
	`catid`	    int(11)    NOT NULL DEFAULT &#039;0&#039;,&lt;br /&gt;
	`params`   VARCHAR(1024) NOT NULL DEFAULT &#039;&#039;,&lt;br /&gt;
	PRIMARY KEY (`id`)&lt;br /&gt;
)&lt;br /&gt;
	ENGINE =MyISAM&lt;br /&gt;
	AUTO_INCREMENT =0&lt;br /&gt;
	DEFAULT CHARSET =utf8;&lt;br /&gt;
&lt;br /&gt;
INSERT INTO `#__helloworld` (`greeting`) VALUES&lt;br /&gt;
(&#039;Hello World!&#039;),&lt;br /&gt;
(&#039;Goodbye World!&#039;);&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span id=&amp;quot;admin/sql/updates/mysql/0.0.16.sql&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;tt&amp;gt;/admin/sql/updates/mysql/0.0.16.sql&amp;lt;/tt&amp;gt;&lt;br /&gt;
&amp;lt;source lang=&amp;quot;sql&amp;quot;&amp;gt;&lt;br /&gt;
ALTER TABLE`#__helloworld` ADD COLUMN `created` DATETIME NOT NULL DEFAULT &#039;0000-00-00 00:00:00&#039; AFTER `asset_id`;&lt;br /&gt;
ALTER TABLE`#__helloworld` ADD COLUMN `created_by` INT(10) UNSIGNED NOT NULL DEFAULT &#039;0&#039; AFTER `created`;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;translate&amp;gt;&lt;br /&gt;
==Adding a menu item== &amp;lt;!--T:31--&amp;gt;&lt;br /&gt;
&amp;lt;/translate&amp;gt;&lt;br /&gt;
&amp;lt;translate&amp;gt;&amp;lt;!--T:32--&amp;gt; To enable a menu item to point to the form, we need to put an xml file into the associated layout directory. Extend your directory structure (remembering to include the index.html file in each new subdirectory which you create) and put the following into&amp;lt;/translate&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span id=&amp;quot;site/views/form/tmpl/edit.xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;tt&amp;gt;site/views/form/tmpl/edit.xml&amp;lt;/tt&amp;gt;&lt;br /&gt;
&amp;lt;source lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;?xml version=&amp;quot;1.0&amp;quot; encoding=&amp;quot;utf-8&amp;quot;?&amp;gt;&lt;br /&gt;
&amp;lt;metadata&amp;gt;&lt;br /&gt;
	&amp;lt;layout title=&amp;quot;COM_HELLOWORLD_ADD_VIEW_TITLE&amp;quot;&amp;gt;&lt;br /&gt;
		&amp;lt;message&amp;gt;COM_HELLOWORLD_ADD_VIEW_DESC&amp;lt;/message&amp;gt;&lt;br /&gt;
	&amp;lt;/layout&amp;gt;&lt;br /&gt;
&amp;lt;/metadata&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&amp;lt;/span&amp;gt;&lt;br /&gt;
&amp;lt;translate&amp;gt;&amp;lt;!--T:33--&amp;gt; Once you have the new code installed you&#039;ll have to go into the admin back-end and create a menu item to point to the new front-end form.&amp;lt;/translate&amp;gt;&lt;br /&gt;
&amp;lt;translate&amp;gt;&lt;br /&gt;
==Displaying the new form view== &amp;lt;!--T:34--&amp;gt;&lt;br /&gt;
&amp;lt;/translate&amp;gt;&lt;br /&gt;
&amp;lt;translate&amp;gt;&amp;lt;!--T:35--&amp;gt; Create a new forms subdirectory under the site models directory, and add the definition of the form into&amp;lt;/translate&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span id=&amp;quot;site/models/forms/add-form.xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;tt&amp;gt;site/models/forms/add-form.xml&amp;lt;/tt&amp;gt;&lt;br /&gt;
&amp;lt;source lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;?xml version=&amp;quot;1.0&amp;quot; encoding=&amp;quot;utf-8&amp;quot;?&amp;gt;&lt;br /&gt;
&amp;lt;form&lt;br /&gt;
    addrulepath=&amp;quot;/administrator/components/com_helloworld/models/rules&amp;quot;&lt;br /&gt;
    &amp;gt;&lt;br /&gt;
    &amp;lt;fieldset&lt;br /&gt;
				name=&amp;quot;details&amp;quot;&lt;br /&gt;
				label=&amp;quot;COM_HELLOWORLD_HELLOWORLD_DETAILS&amp;quot;&lt;br /&gt;
	&amp;gt;&lt;br /&gt;
		&amp;lt;field&lt;br /&gt;
				name=&amp;quot;id&amp;quot;&lt;br /&gt;
				type=&amp;quot;hidden&amp;quot;&lt;br /&gt;
				/&amp;gt;&lt;br /&gt;
		&amp;lt;field&lt;br /&gt;
				name=&amp;quot;greeting&amp;quot;&lt;br /&gt;
				type=&amp;quot;text&amp;quot;&lt;br /&gt;
				label=&amp;quot;COM_HELLOWORLD_HELLOWORLD_GREETING_LABEL&amp;quot;&lt;br /&gt;
				description=&amp;quot;COM_HELLOWORLD_HELLOWORLD_GREETING_DESC&amp;quot;&lt;br /&gt;
				size=&amp;quot;40&amp;quot;&lt;br /&gt;
				class=&amp;quot;inputbox&amp;quot;&lt;br /&gt;
				validate=&amp;quot;greeting&amp;quot;&lt;br /&gt;
				required=&amp;quot;true&amp;quot;&lt;br /&gt;
                hint=&amp;quot;COM_HELLOWORLD_HELLOWORLD_GREETING_HINT&amp;quot;&lt;br /&gt;
				default=&amp;quot;&amp;quot;&lt;br /&gt;
				/&amp;gt;&lt;br /&gt;
        &amp;lt;field&lt;br /&gt;
				name=&amp;quot;catid&amp;quot;&lt;br /&gt;
				type=&amp;quot;category&amp;quot;&lt;br /&gt;
				extension=&amp;quot;com_helloworld&amp;quot;&lt;br /&gt;
				class=&amp;quot;inputbox&amp;quot;&lt;br /&gt;
				default=&amp;quot;&amp;quot;&lt;br /&gt;
				label=&amp;quot;COM_HELLOWORLD_HELLOWORLD_FIELD_CATID_LABEL&amp;quot;&lt;br /&gt;
				description=&amp;quot;COM_HELLOWORLD_HELLOWORLD_FIELD_CATID_DESC&amp;quot;&lt;br /&gt;
				required=&amp;quot;true&amp;quot;&lt;br /&gt;
                &amp;gt;&lt;br /&gt;
			&amp;lt;option value=&amp;quot;0&amp;quot;&amp;gt;JOPTION_SELECT_CATEGORY&amp;lt;/option&amp;gt;&lt;br /&gt;
		&amp;lt;/field&amp;gt;&lt;br /&gt;
        &amp;lt;field&lt;br /&gt;
                name=&amp;quot;message&amp;quot;&lt;br /&gt;
                type=&amp;quot;textarea&amp;quot;&lt;br /&gt;
                rows=&amp;quot;5&amp;quot;&lt;br /&gt;
                cols=&amp;quot;80&amp;quot;&lt;br /&gt;
				label=&amp;quot;COM_HELLOWORLD_HELLOWORLD_MESSAGE_LABEL&amp;quot;&lt;br /&gt;
				description=&amp;quot;COM_HELLOWORLD_HELLOWORLD_MESSAGE_DESC&amp;quot;&lt;br /&gt;
                hint=&amp;quot;COM_HELLOWORLD_HELLOWORLD_MESSAGE_HINT&amp;quot;&lt;br /&gt;
				required=&amp;quot;true&amp;quot;&lt;br /&gt;
                &amp;gt;&lt;br /&gt;
        &amp;lt;/field&amp;gt;&lt;br /&gt;
        &amp;lt;field&lt;br /&gt;
				name=&amp;quot;captcha&amp;quot;&lt;br /&gt;
				type=&amp;quot;captcha&amp;quot;&lt;br /&gt;
				label=&amp;quot;COM_HELLOWORLD_HELLOWORLD_FIELD_CAPTCHA_LABEL&amp;quot;&lt;br /&gt;
				description=&amp;quot;COM_HELLOWORLD_HELLOWORLD_FIELD_CAPTCHA_DESC&amp;quot;&lt;br /&gt;
                validate=&amp;quot;captcha&amp;quot;&lt;br /&gt;
                &amp;gt;&lt;br /&gt;
		&amp;lt;/field&amp;gt;&lt;br /&gt;
        &amp;lt;fields name=&amp;quot;params&amp;quot;&amp;gt;&lt;br /&gt;
            &amp;lt;field&lt;br /&gt;
                    name=&amp;quot;show_category&amp;quot;&lt;br /&gt;
                    type=&amp;quot;list&amp;quot;&lt;br /&gt;
                    label=&amp;quot;COM_HELLOWORLD_HELLOWORLD_FIELD_SHOW_CATEGORY_LABEL&amp;quot;&lt;br /&gt;
                    description=&amp;quot;COM_HELLOWORLD_HELLOWORLD_FIELD_SHOW_CATEGORY_DESC&amp;quot;&lt;br /&gt;
                    default=&amp;quot;&amp;quot;&lt;br /&gt;
                    useglobal=&amp;quot;true&amp;quot;&lt;br /&gt;
            &amp;gt;&lt;br /&gt;
                &amp;lt;option value=&amp;quot;0&amp;quot;&amp;gt;JHIDE&amp;lt;/option&amp;gt;&lt;br /&gt;
                &amp;lt;option value=&amp;quot;1&amp;quot;&amp;gt;JSHOW&amp;lt;/option&amp;gt;&lt;br /&gt;
            &amp;lt;/field&amp;gt;&lt;br /&gt;
        &amp;lt;/fields&amp;gt;&lt;br /&gt;
    &amp;lt;/fieldset&amp;gt;&lt;br /&gt;
&amp;lt;/form&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;translate&amp;gt;&amp;lt;!--T:36--&amp;gt; The above form includes a captcha. To get this working you need to install a captcha plugin from the selection available for Joomla. You can also use the Captcha - ReCaptcha plugin which comes with Joomla, but before using this you have to get recaptcha keys for your domain (eg localhost) from Google, and then configure the plugin with the keys which Google supplies (ie Extensions / Plugins, and then click on the plugin to edit its options - if you edit the plugin it tells you exactly what you have to do). Once the plugins are live, you can select in the Global Configuration the captcha which you want to be the system default, and also in the Helloworld Configuration select which captcha to use for this helloworld form.&amp;lt;/translate&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;translate&amp;gt;&amp;lt;!--T:37--&amp;gt; The existing controller (in controller.php) will not need to be changed, but we&#039;ll need to define a new view, layout and model for the new form.&amp;lt;/translate&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;span id=&amp;quot;site/views/form/view.html.php&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;tt&amp;gt;site/views/form/view.html.php&amp;lt;/tt&amp;gt;&lt;br /&gt;
&amp;lt;source lang=&amp;quot;php&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;?php&lt;br /&gt;
/**&lt;br /&gt;
 * @package     Joomla.Administrator&lt;br /&gt;
 * @subpackage  com_helloworld&lt;br /&gt;
 *&lt;br /&gt;
 * @copyright   Copyright (C) 2005 - 2018 Open Source Matters, Inc. All rights reserved.&lt;br /&gt;
 * @license     GNU General Public License version 2 or later; see LICENSE.txt&lt;br /&gt;
 */&lt;br /&gt;
&lt;br /&gt;
// No direct access to this file&lt;br /&gt;
defined(&#039;_JEXEC&#039;) or die(&#039;Restricted access&#039;);&lt;br /&gt;
&lt;br /&gt;
/**&lt;br /&gt;
 * HelloWorld View&lt;br /&gt;
 * This is the site view presenting the user with the ability to add a new Helloworld record&lt;br /&gt;
 * &lt;br /&gt;
 */&lt;br /&gt;
class HelloWorldViewForm extends JViewLegacy&lt;br /&gt;
{&lt;br /&gt;
&lt;br /&gt;
	protected $form = null;&lt;br /&gt;
	protected $canDo;&lt;br /&gt;
&lt;br /&gt;
	/**&lt;br /&gt;
	 * Display the Hello World view&lt;br /&gt;
	 *&lt;br /&gt;
	 * @param   string  $tpl  The name of the layout file to parse.&lt;br /&gt;
	 *&lt;br /&gt;
	 * @return  void&lt;br /&gt;
	 */&lt;br /&gt;
	public function display($tpl = null)&lt;br /&gt;
	{&lt;br /&gt;
		// Get the form to display&lt;br /&gt;
		$this-&amp;gt;form = $this-&amp;gt;get(&#039;Form&#039;);&lt;br /&gt;
		// Get the javascript script file for client-side validation&lt;br /&gt;
		$this-&amp;gt;script = $this-&amp;gt;get(&#039;Script&#039;); &lt;br /&gt;
&lt;br /&gt;
		// Check that the user has permissions to create a new helloworld record&lt;br /&gt;
		$this-&amp;gt;canDo = JHelperContent::getActions(&#039;com_helloworld&#039;);&lt;br /&gt;
		if (!($this-&amp;gt;canDo-&amp;gt;get(&#039;core.create&#039;))) &lt;br /&gt;
		{&lt;br /&gt;
			$app = JFactory::getApplication(); &lt;br /&gt;
			$app-&amp;gt;enqueueMessage(JText::_(&#039;JERROR_ALERTNOAUTHOR&#039;), &#039;error&#039;);&lt;br /&gt;
			$app-&amp;gt;setHeader(&#039;status&#039;, 403, true);&lt;br /&gt;
			return;&lt;br /&gt;
		}&lt;br /&gt;
        &lt;br /&gt;
		// Check for errors.&lt;br /&gt;
		if (count($errors = $this-&amp;gt;get(&#039;Errors&#039;)))&lt;br /&gt;
		{&lt;br /&gt;
			throw new Exception(implode(&amp;quot;\n&amp;quot;, $errors), 500);&lt;br /&gt;
		}&lt;br /&gt;
&lt;br /&gt;
		// Call the parent display to display the layout file&lt;br /&gt;
		parent::display($tpl);&lt;br /&gt;
&lt;br /&gt;
		// Set properties of the html document&lt;br /&gt;
		$this-&amp;gt;setDocument();&lt;br /&gt;
	}&lt;br /&gt;
&lt;br /&gt;
	/**&lt;br /&gt;
	 * Method to set up the html document properties&lt;br /&gt;
	 *&lt;br /&gt;
	 * @return void&lt;br /&gt;
	 */&lt;br /&gt;
	protected function setDocument() &lt;br /&gt;
	{&lt;br /&gt;
		$document = JFactory::getDocument();&lt;br /&gt;
		$document-&amp;gt;setTitle(JText::_(&#039;COM_HELLOWORLD_HELLOWORLD_CREATING&#039;));&lt;br /&gt;
		$document-&amp;gt;addScript(JURI::root() . $this-&amp;gt;script);&lt;br /&gt;
		$document-&amp;gt;addScript(JURI::root() . &amp;quot;/administrator/components/com_helloworld&amp;quot;&lt;br /&gt;
		                                  . &amp;quot;/views/helloworld/submitbutton.js&amp;quot;);&lt;br /&gt;
		JText::script(&#039;COM_HELLOWORLD_HELLOWORLD_ERROR_UNACCEPTABLE&#039;);&lt;br /&gt;
	}&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&amp;lt;/span&amp;gt;&lt;br /&gt;
&amp;lt;translate&amp;gt;&lt;br /&gt;
&amp;lt;!--T:38--&amp;gt;&lt;br /&gt;
And into the layout file:&amp;lt;/translate&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span id=&amp;quot;site/views/form/tmpl/edit.php&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;tt&amp;gt;site/views/form/tmpl/edit.php&amp;lt;/tt&amp;gt;&lt;br /&gt;
&amp;lt;source lang=&amp;quot;php&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;?php&lt;br /&gt;
/**&lt;br /&gt;
 * @package     Joomla.Administrator&lt;br /&gt;
 * @subpackage  com_helloworld&lt;br /&gt;
 *&lt;br /&gt;
 * @copyright   Copyright (C) 2005 - 2018 Open Source Matters, Inc. All rights reserved.&lt;br /&gt;
 * @license     GNU General Public License version 2 or later; see LICENSE.txt&lt;br /&gt;
 *&lt;br /&gt;
 * This layout file is for displaying the front end form for capturing a new helloworld message&lt;br /&gt;
 *&lt;br /&gt;
 */&lt;br /&gt;
&lt;br /&gt;
// No direct access&lt;br /&gt;
defined(&#039;_JEXEC&#039;) or die(&#039;Restricted access&#039;);&lt;br /&gt;
JHtml::_(&#039;behavior.formvalidator&#039;);&lt;br /&gt;
&lt;br /&gt;
?&amp;gt;&lt;br /&gt;
&amp;lt;form action=&amp;quot;&amp;lt;?php echo JRoute::_(&#039;index.php?option=com_helloworld&amp;amp;view=form&amp;amp;layout=edit&#039;); ?&amp;gt;&amp;quot;&lt;br /&gt;
    method=&amp;quot;post&amp;quot; name=&amp;quot;adminForm&amp;quot; id=&amp;quot;adminForm&amp;quot; class=&amp;quot;form-validate&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
	&amp;lt;div class=&amp;quot;form-horizontal&amp;quot;&amp;gt;&lt;br /&gt;
		&amp;lt;fieldset class=&amp;quot;adminform&amp;quot;&amp;gt;&lt;br /&gt;
			&amp;lt;legend&amp;gt;&amp;lt;?php echo JText::_(&#039;COM_HELLOWORLD_LEGEND_DETAILS&#039;) ?&amp;gt;&amp;lt;/legend&amp;gt;&lt;br /&gt;
			&amp;lt;div class=&amp;quot;row-fluid&amp;quot;&amp;gt;&lt;br /&gt;
				&amp;lt;div class=&amp;quot;span6&amp;quot;&amp;gt;&lt;br /&gt;
					&amp;lt;?php echo $this-&amp;gt;form-&amp;gt;renderFieldset(&#039;details&#039;);  ?&amp;gt;&lt;br /&gt;
				&amp;lt;/div&amp;gt;&lt;br /&gt;
			&amp;lt;/div&amp;gt;&lt;br /&gt;
		&amp;lt;/fieldset&amp;gt;&lt;br /&gt;
	&amp;lt;/div&amp;gt;&lt;br /&gt;
    &lt;br /&gt;
	&amp;lt;div class=&amp;quot;btn-toolbar&amp;quot;&amp;gt;&lt;br /&gt;
		&amp;lt;div class=&amp;quot;btn-group&amp;quot;&amp;gt;&lt;br /&gt;
			&amp;lt;button type=&amp;quot;button&amp;quot; class=&amp;quot;btn btn-primary&amp;quot; onclick=&amp;quot;Joomla.submitbutton(&#039;helloworld.save&#039;)&amp;quot;&amp;gt;&lt;br /&gt;
				&amp;lt;span class=&amp;quot;icon-ok&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;&amp;lt;?php echo JText::_(&#039;JSAVE&#039;) ?&amp;gt;&lt;br /&gt;
			&amp;lt;/button&amp;gt;&lt;br /&gt;
		&amp;lt;/div&amp;gt;&lt;br /&gt;
		&amp;lt;div class=&amp;quot;btn-group&amp;quot;&amp;gt;&lt;br /&gt;
			&amp;lt;button type=&amp;quot;button&amp;quot; class=&amp;quot;btn&amp;quot; onclick=&amp;quot;Joomla.submitbutton(&#039;helloworld.cancel&#039;)&amp;quot;&amp;gt;&lt;br /&gt;
				&amp;lt;span class=&amp;quot;icon-cancel&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;&amp;lt;?php echo JText::_(&#039;JCANCEL&#039;) ?&amp;gt;&lt;br /&gt;
			&amp;lt;/button&amp;gt;&lt;br /&gt;
		&amp;lt;/div&amp;gt;&lt;br /&gt;
	&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
	&amp;lt;input type=&amp;quot;hidden&amp;quot; name=&amp;quot;task&amp;quot; /&amp;gt;&lt;br /&gt;
	&amp;lt;?php echo JHtml::_(&#039;form.token&#039;); ?&amp;gt;&lt;br /&gt;
&amp;lt;/form&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;translate&amp;gt;&amp;lt;!--T:39--&amp;gt; All the above is similar to the admin functionality, except there are certain fields we don&#039;t want to allow the front-end user to see (eg the permissions) and instead of the standard Joomla admin buttons (and toolbar) we use a Save button and a Cancel button styled using the Bootstrap CSS, and which result in the &amp;lt;tt&amp;gt;task&amp;lt;/tt&amp;gt; parameter being set to &amp;lt;tt&amp;gt;helloworld.save&amp;lt;/tt&amp;gt; or &amp;lt;tt&amp;gt;helloworld.cancel&amp;lt;/tt&amp;gt;.&amp;lt;/translate&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;translate&amp;gt;&amp;lt;!--T:40--&amp;gt; Our new model is almost exactly the same as the admin equivalent; we just have to point to our new add-form instead.&amp;lt;/translate&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span id=&amp;quot;site/models/form.php&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;tt&amp;gt;site/models/form.php&amp;lt;/tt&amp;gt;&lt;br /&gt;
&amp;lt;source lang=&amp;quot;php&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;?php&lt;br /&gt;
/**&lt;br /&gt;
 * @package     Joomla.Administrator&lt;br /&gt;
 * @subpackage  com_helloworld&lt;br /&gt;
 *&lt;br /&gt;
 * @copyright   Copyright (C) 2005 - 2018 Open Source Matters, Inc. All rights reserved.&lt;br /&gt;
 * @license     GNU General Public License version 2 or later; see LICENSE.txt&lt;br /&gt;
 */&lt;br /&gt;
&lt;br /&gt;
// No direct access to this file&lt;br /&gt;
defined(&#039;_JEXEC&#039;) or die(&#039;Restricted access&#039;);&lt;br /&gt;
&lt;br /&gt;
/**&lt;br /&gt;
 * HelloWorld Model&lt;br /&gt;
 *&lt;br /&gt;
 * @since  0.0.1&lt;br /&gt;
 */&lt;br /&gt;
class HelloWorldModelForm extends JModelAdmin&lt;br /&gt;
{&lt;br /&gt;
&lt;br /&gt;
	/**&lt;br /&gt;
	 * Method to get a table object, load it if necessary.&lt;br /&gt;
	 *&lt;br /&gt;
	 * @param   string  $type    The table name. Optional.&lt;br /&gt;
	 * @param   string  $prefix  The class prefix. Optional.&lt;br /&gt;
	 * @param   array   $config  Configuration array for model. Optional.&lt;br /&gt;
	 *&lt;br /&gt;
	 * @return  JTable  A JTable object&lt;br /&gt;
	 *&lt;br /&gt;
	 * @since   1.6&lt;br /&gt;
	 */&lt;br /&gt;
	public function getTable($type = &#039;HelloWorld&#039;, $prefix = &#039;HelloWorldTable&#039;, $config = array())&lt;br /&gt;
	{&lt;br /&gt;
		return JTable::getInstance($type, $prefix, $config);&lt;br /&gt;
	}&lt;br /&gt;
&lt;br /&gt;
    /**&lt;br /&gt;
	 * Method to get the record form.&lt;br /&gt;
	 *&lt;br /&gt;
	 * @param   array    $data      Data for the form.&lt;br /&gt;
	 * @param   boolean  $loadData  True if the form is to load its own data (default case), false if not.&lt;br /&gt;
	 *&lt;br /&gt;
	 * @return  mixed    A JForm object on success, false on failure&lt;br /&gt;
	 *&lt;br /&gt;
	 * @since   1.6&lt;br /&gt;
	 */&lt;br /&gt;
	public function getForm($data = array(), $loadData = true)&lt;br /&gt;
	{&lt;br /&gt;
		// Get the form.&lt;br /&gt;
		$form = $this-&amp;gt;loadForm(&lt;br /&gt;
			&#039;com_helloworld.form&#039;,&lt;br /&gt;
			&#039;add-form&#039;,&lt;br /&gt;
			array(&lt;br /&gt;
				&#039;control&#039; =&amp;gt; &#039;jform&#039;,&lt;br /&gt;
				&#039;load_data&#039; =&amp;gt; $loadData&lt;br /&gt;
			)&lt;br /&gt;
		);&lt;br /&gt;
&lt;br /&gt;
		if (empty($form))&lt;br /&gt;
		{&lt;br /&gt;
			$errors = $this-&amp;gt;getErrors();&lt;br /&gt;
			throw new Exception(implode(&amp;quot;\n&amp;quot;, $errors), 500);&lt;br /&gt;
		}&lt;br /&gt;
&lt;br /&gt;
		return $form;&lt;br /&gt;
	}&lt;br /&gt;
&lt;br /&gt;
	/**&lt;br /&gt;
	 * Method to get the data that should be injected in the form.&lt;br /&gt;
	 * As this form is for add, we&#039;re not prefilling the form with an existing record&lt;br /&gt;
	 * But if the user has previously hit submit and the validation has found an error,&lt;br /&gt;
	 *   then we inject what was previously entered.&lt;br /&gt;
	 *&lt;br /&gt;
	 * @return  mixed  The data for the form.&lt;br /&gt;
	 *&lt;br /&gt;
	 * @since   1.6&lt;br /&gt;
	 */&lt;br /&gt;
	protected function loadFormData()&lt;br /&gt;
	{&lt;br /&gt;
		// Check the session for previously entered form data.&lt;br /&gt;
		$data = JFactory::getApplication()-&amp;gt;getUserState(&lt;br /&gt;
			&#039;com_helloworld.edit.helloworld.data&#039;,&lt;br /&gt;
			array()&lt;br /&gt;
		);&lt;br /&gt;
&lt;br /&gt;
		return $data;&lt;br /&gt;
	}&lt;br /&gt;
    &lt;br /&gt;
	/**&lt;br /&gt;
	 * Method to get the script that have to be included on the form&lt;br /&gt;
	 * This returns the script associated with helloworld field greeting validation&lt;br /&gt;
	 *&lt;br /&gt;
	 * @return string	Script files&lt;br /&gt;
	 */&lt;br /&gt;
	public function getScript() &lt;br /&gt;
	{&lt;br /&gt;
		return &#039;administrator/components/com_helloworld/models/forms/helloworld.js&#039;;&lt;br /&gt;
	}&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&amp;lt;/span&amp;gt;&lt;br /&gt;
&amp;lt;translate&amp;gt;&lt;br /&gt;
==Handling the form HTTP POST== &amp;lt;!--T:41--&amp;gt;&lt;br /&gt;
&amp;lt;/translate&amp;gt;&lt;br /&gt;
&amp;lt;translate&amp;gt;&amp;lt;!--T:42--&amp;gt; As in the admin case, we&#039;ll need to create a new controller in the /controllers subdirectory with save() and cancel() methods, and we&#039;ll need a model with a save() method. In fact, because the above model class (in site/models/form.php) extends JModelAdmin, we&#039;ll be able to reuse it without adding any more code. (For just displaying the form our model class could have extended JModelForm, but JModelAdmin extends JModelForm and provides additional functions such as the save() one which we need).&amp;lt;/translate&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;translate&amp;gt;&amp;lt;!--T:43--&amp;gt; Note that we don&#039;t need any new view file or layout file, because we&#039;re just going to redirect the user back to the same form.&amp;lt;/translate&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;translate&amp;gt;&amp;lt;!--T:44--&amp;gt; So the only new file we need is a new controller in a new controllers subdirectory:&amp;lt;/translate&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span id=&amp;quot;site/controllers/helloworld.php&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;tt&amp;gt;site/controllers/helloworld.php&amp;lt;/tt&amp;gt;&lt;br /&gt;
&amp;lt;source lang=&amp;quot;php&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;?php&lt;br /&gt;
/**&lt;br /&gt;
 * @package     Joomla.Site&lt;br /&gt;
 * @subpackage  com_helloworld&lt;br /&gt;
 *&lt;br /&gt;
 * @copyright   Copyright (C) 2005 - 2018 Open Source Matters, Inc. All rights reserved.&lt;br /&gt;
 * @license     GNU General Public License version 2 or later; see LICENSE.txt&lt;br /&gt;
 */&lt;br /&gt;
// No direct access to this file&lt;br /&gt;
defined(&#039;_JEXEC&#039;) or die(&#039;Restricted access&#039;);&lt;br /&gt;
&lt;br /&gt;
/**&lt;br /&gt;
 * HelloWorld Controller&lt;br /&gt;
 *&lt;br /&gt;
 * @package     Joomla.Site&lt;br /&gt;
 * @subpackage  com_helloworld&lt;br /&gt;
 *&lt;br /&gt;
 * Used to handle the http POST from the front-end form which allows &lt;br /&gt;
 * users to enter a new helloworld message&lt;br /&gt;
 *&lt;br /&gt;
 */&lt;br /&gt;
class HelloWorldControllerHelloWorld extends JControllerForm&lt;br /&gt;
{   &lt;br /&gt;
    public function cancel($key = null)&lt;br /&gt;
    {&lt;br /&gt;
        parent::cancel($key);&lt;br /&gt;
        &lt;br /&gt;
        // set up the redirect back to the same form&lt;br /&gt;
        $this-&amp;gt;setRedirect(&lt;br /&gt;
            (string)JUri::getInstance(), &lt;br /&gt;
            JText::_(&#039;COM_HELLOWORLD_ADD_CANCELLED&#039;)&lt;br /&gt;
		);&lt;br /&gt;
    }&lt;br /&gt;
    &lt;br /&gt;
    /*&lt;br /&gt;
     * Function handing the save for adding a new helloworld record&lt;br /&gt;
     * Based on the save() function in the JControllerForm class&lt;br /&gt;
     */&lt;br /&gt;
    public function save($key = null, $urlVar = null)&lt;br /&gt;
    {&lt;br /&gt;
		// Check for request forgeries.&lt;br /&gt;
		JSession::checkToken() or jexit(JText::_(&#039;JINVALID_TOKEN&#039;));&lt;br /&gt;
        &lt;br /&gt;
		$app = JFactory::getApplication(); &lt;br /&gt;
		$input = $app-&amp;gt;input; &lt;br /&gt;
		$model = $this-&amp;gt;getModel(&#039;form&#039;);&lt;br /&gt;
        &lt;br /&gt;
		// Get the current URI to set in redirects. As we&#039;re handling a POST, &lt;br /&gt;
		// this URI comes from the &amp;lt;form action=&amp;quot;...&amp;quot;&amp;gt; attribute in the layout file above&lt;br /&gt;
		$currentUri = (string)JUri::getInstance();&lt;br /&gt;
&lt;br /&gt;
		// Check that this user is allowed to add a new record&lt;br /&gt;
		if (!JFactory::getUser()-&amp;gt;authorise( &amp;quot;core.create&amp;quot;, &amp;quot;com_helloworld&amp;quot;))&lt;br /&gt;
		{&lt;br /&gt;
			$app-&amp;gt;enqueueMessage(JText::_(&#039;JERROR_ALERTNOAUTHOR&#039;), &#039;error&#039;);&lt;br /&gt;
			$app-&amp;gt;setHeader(&#039;status&#039;, 403, true);&lt;br /&gt;
&lt;br /&gt;
			return;&lt;br /&gt;
		}&lt;br /&gt;
        &lt;br /&gt;
		// get the data from the HTTP POST request&lt;br /&gt;
		$data  = $input-&amp;gt;get(&#039;jform&#039;, array(), &#039;array&#039;);&lt;br /&gt;
        &lt;br /&gt;
		// set up context for saving form data&lt;br /&gt;
		$context = &amp;quot;$this-&amp;gt;option.edit.$this-&amp;gt;context&amp;quot;;&lt;br /&gt;
        &lt;br /&gt;
		// Validate the posted data.&lt;br /&gt;
		// First we need to set up an instance of the form ...&lt;br /&gt;
		$form = $model-&amp;gt;getForm($data, false);&lt;br /&gt;
&lt;br /&gt;
		if (!$form)&lt;br /&gt;
		{&lt;br /&gt;
			$app-&amp;gt;enqueueMessage($model-&amp;gt;getError(), &#039;error&#039;);&lt;br /&gt;
			return false;&lt;br /&gt;
		}&lt;br /&gt;
&lt;br /&gt;
		// ... and then we validate the data against it&lt;br /&gt;
		// The validate function called below results in the running of the validate=&amp;quot;...&amp;quot; routines&lt;br /&gt;
		// specified against the fields in the form xml file, and also filters the data &lt;br /&gt;
		// according to the filter=&amp;quot;...&amp;quot; specified in the same place (removing html tags by default in strings)&lt;br /&gt;
		$validData = $model-&amp;gt;validate($form, $data);&lt;br /&gt;
&lt;br /&gt;
		// Handle the case where there are validation errors&lt;br /&gt;
		if ($validData === false)&lt;br /&gt;
		{&lt;br /&gt;
			// Get the validation messages.&lt;br /&gt;
			$errors = $model-&amp;gt;getErrors();&lt;br /&gt;
&lt;br /&gt;
			// Display up to three validation messages to the user.&lt;br /&gt;
			for ($i = 0, $n = count($errors); $i &amp;lt; $n &amp;amp;&amp;amp; $i &amp;lt; 3; $i++)&lt;br /&gt;
			{&lt;br /&gt;
				if ($errors[$i] instanceof Exception)&lt;br /&gt;
				{&lt;br /&gt;
					$app-&amp;gt;enqueueMessage($errors[$i]-&amp;gt;getMessage(), &#039;warning&#039;);&lt;br /&gt;
				}&lt;br /&gt;
				else&lt;br /&gt;
				{&lt;br /&gt;
					$app-&amp;gt;enqueueMessage($errors[$i], &#039;warning&#039;);&lt;br /&gt;
				}&lt;br /&gt;
			}&lt;br /&gt;
&lt;br /&gt;
			// Save the form data in the session.&lt;br /&gt;
			$app-&amp;gt;setUserState($context . &#039;.data&#039;, $data);&lt;br /&gt;
&lt;br /&gt;
			// Redirect back to the same screen.&lt;br /&gt;
			$this-&amp;gt;setRedirect($currentUri);&lt;br /&gt;
&lt;br /&gt;
			return false;&lt;br /&gt;
		}&lt;br /&gt;
        &lt;br /&gt;
		// add the &#039;created by&#039; and &#039;created&#039; date fields&lt;br /&gt;
		$validData[&#039;created_by&#039;] = JFactory::getUser()-&amp;gt;get(&#039;id&#039;, 0);&lt;br /&gt;
		$validData[&#039;created&#039;] = date(&#039;Y-m-d h:i:s&#039;);&lt;br /&gt;
        &lt;br /&gt;
		// Attempt to save the data.&lt;br /&gt;
		if (!$model-&amp;gt;save($validData))&lt;br /&gt;
		{&lt;br /&gt;
		// Handle the case where the save failed&lt;br /&gt;
            &lt;br /&gt;
			// Save the data in the session.&lt;br /&gt;
			$app-&amp;gt;setUserState($context . &#039;.data&#039;, $validData);&lt;br /&gt;
&lt;br /&gt;
			// Redirect back to the edit screen.&lt;br /&gt;
			$this-&amp;gt;setError(JText::sprintf(&#039;JLIB_APPLICATION_ERROR_SAVE_FAILED&#039;, $model-&amp;gt;getError()));&lt;br /&gt;
			$this-&amp;gt;setMessage($this-&amp;gt;getError(), &#039;error&#039;);&lt;br /&gt;
&lt;br /&gt;
			$this-&amp;gt;setRedirect($currentUri);&lt;br /&gt;
&lt;br /&gt;
			return false;&lt;br /&gt;
		}&lt;br /&gt;
        &lt;br /&gt;
		// clear the data in the form&lt;br /&gt;
		$app-&amp;gt;setUserState($context . &#039;.data&#039;, null);&lt;br /&gt;
        &lt;br /&gt;
		// notify the administrator that a new helloworld message has been added on the front end&lt;br /&gt;
        &lt;br /&gt;
		// get the id of the person to notify from global config&lt;br /&gt;
		$params   = $app-&amp;gt;getParams();&lt;br /&gt;
		$userid_to_email = (int) $params-&amp;gt;get(&#039;user_to_email&#039;);&lt;br /&gt;
		$user_to_email = JUser::getInstance($userid_to_email);&lt;br /&gt;
		$to_address = $user_to_email-&amp;gt;get(&amp;quot;email&amp;quot;);&lt;br /&gt;
        &lt;br /&gt;
		// get the current user (if any)&lt;br /&gt;
		$current_user = JFactory::getUser();&lt;br /&gt;
		if ($current_user-&amp;gt;get(&amp;quot;id&amp;quot;) &amp;gt; 0) &lt;br /&gt;
		{&lt;br /&gt;
			$current_username = $current_user-&amp;gt;get(&amp;quot;username&amp;quot;);&lt;br /&gt;
		}&lt;br /&gt;
		else &lt;br /&gt;
		{&lt;br /&gt;
			$current_username = &amp;quot;a visitor to the site&amp;quot;;&lt;br /&gt;
		}&lt;br /&gt;
        &lt;br /&gt;
		// get the Mailer object, set up the email to be sent, and send it&lt;br /&gt;
		$mailer = JFactory::getMailer();&lt;br /&gt;
		$mailer-&amp;gt;addRecipient($to_address);&lt;br /&gt;
		$mailer-&amp;gt;setSubject(&amp;quot;New helloworld message added by &amp;quot; . $current_username);&lt;br /&gt;
		$mailer-&amp;gt;setBody(&amp;quot;New greeting is &amp;quot; . $validData[&#039;greeting&#039;]);&lt;br /&gt;
		try &lt;br /&gt;
		{&lt;br /&gt;
			$mailer-&amp;gt;send(); &lt;br /&gt;
		}&lt;br /&gt;
		catch (Exception $e)&lt;br /&gt;
		{&lt;br /&gt;
			JLog::add(&#039;Caught exception: &#039; . $e-&amp;gt;getMessage(), JLog::Error, &#039;jerror&#039;);&lt;br /&gt;
		}&lt;br /&gt;
        &lt;br /&gt;
		$this-&amp;gt;setRedirect(&lt;br /&gt;
				$currentUri,&lt;br /&gt;
				JText::_(&#039;COM_HELLOWORLD_ADD_SUCCESSFUL&#039;)&lt;br /&gt;
				);&lt;br /&gt;
            &lt;br /&gt;
		return true;&lt;br /&gt;
        &lt;br /&gt;
    }&lt;br /&gt;
&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;translate&amp;gt;&amp;lt;!--T:45--&amp;gt; In the above file we&#039;ve been able to reuse the cancel() method from the parent JControllerForm class, with the exception that we want to redirect back to the same form. (The parent cancel() method redirects back to the view showing the list of records - as in the admin case).&amp;lt;/translate&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;translate&amp;gt;&amp;lt;!--T:46--&amp;gt; However, our save() method functionality is significantly different from that of the parent class, so it&#039;s easier just to write our own. Note that we&#039;re recording the user and created date/time for records added via the front-end only. If we wanted to record this information for all records, then we&#039;d need to override a save() function for the backend as well to include setting those fields.&amp;lt;/translate&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;translate&amp;gt;&amp;lt;!--T:47--&amp;gt; The mailing functionality relies on you having set up mail in your Joomla instance. If you&#039;re using localhost then one possibility is to configure this using a gmail account, and you can easily find the smtp settings for this on the Internet. Note that you&#039;ll need to allow &amp;quot;less secure apps&amp;quot; on the gmail account.&amp;lt;/translate&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;translate&amp;gt;&lt;br /&gt;
==Configuration Parameters== &amp;lt;!--T:48--&amp;gt;&lt;br /&gt;
&amp;lt;/translate&amp;gt;&lt;br /&gt;
&amp;lt;translate&amp;gt;&amp;lt;!--T:49--&amp;gt; We&#039;ve introduced two new configuration parameters - the captcha to display on the form, and the user to email with notification of a new helloworld message being added. So update the configuration settings as follows:&amp;lt;/translate&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span id=&amp;quot;admin/config.xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;tt&amp;gt;admin/config.xml&amp;lt;/tt&amp;gt;&lt;br /&gt;
&amp;lt;source lang=&amp;quot;xml&amp;quot; highlight=&amp;quot;18-37&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;?xml version=&amp;quot;1.0&amp;quot; encoding=&amp;quot;utf-8&amp;quot;?&amp;gt;&lt;br /&gt;
&amp;lt;config&amp;gt;&lt;br /&gt;
	&amp;lt;fieldset&lt;br /&gt;
		name=&amp;quot;greetings&amp;quot;&lt;br /&gt;
		label=&amp;quot;COM_HELLOWORLD_CONFIG_GREETING_SETTINGS_LABEL&amp;quot;&lt;br /&gt;
		description=&amp;quot;COM_HELLOWORLD_CONFIG_GREETING_SETTINGS_DESC&amp;quot;&lt;br /&gt;
	&amp;gt;&lt;br /&gt;
		&amp;lt;field&lt;br /&gt;
			name=&amp;quot;show_category&amp;quot;&lt;br /&gt;
			type=&amp;quot;radio&amp;quot;&lt;br /&gt;
			label=&amp;quot;COM_HELLOWORLD_HELLOWORLD_FIELD_SHOW_CATEGORY_LABEL&amp;quot;&lt;br /&gt;
			description=&amp;quot;COM_HELLOWORLD_HELLOWORLD_FIELD_SHOW_CATEGORY_DESC&amp;quot;&lt;br /&gt;
			default=&amp;quot;0&amp;quot;&lt;br /&gt;
		&amp;gt;&lt;br /&gt;
			&amp;lt;option value=&amp;quot;0&amp;quot;&amp;gt;JHIDE&amp;lt;/option&amp;gt;&lt;br /&gt;
			&amp;lt;option value=&amp;quot;1&amp;quot;&amp;gt;JSHOW&amp;lt;/option&amp;gt;&lt;br /&gt;
		&amp;lt;/field&amp;gt;&lt;br /&gt;
        &amp;lt;field&lt;br /&gt;
			name=&amp;quot;captcha&amp;quot;&lt;br /&gt;
			type=&amp;quot;plugins&amp;quot;&lt;br /&gt;
            folder=&amp;quot;captcha&amp;quot;&lt;br /&gt;
			label=&amp;quot;COM_HELLOWORLD_HELLOWORLD_FIELD_CAPTCHA_LABEL&amp;quot;&lt;br /&gt;
			description=&amp;quot;COM_HELLOWORLD_HELLOWORLD_FIELD_CAPTCHA_DESC&amp;quot;&lt;br /&gt;
			default=&amp;quot;0&amp;quot;&lt;br /&gt;
			filter=&amp;quot;cmd&amp;quot;&lt;br /&gt;
		&amp;gt;&lt;br /&gt;
            &amp;lt;option value=&amp;quot;&amp;quot;&amp;gt;JOPTION_USE_DEFAULT&amp;lt;/option&amp;gt;&lt;br /&gt;
			&amp;lt;option value=&amp;quot;0&amp;quot;&amp;gt;JOPTION_DO_NOT_USE&amp;lt;/option&amp;gt;&lt;br /&gt;
		&amp;lt;/field&amp;gt;&lt;br /&gt;
        &amp;lt;field&lt;br /&gt;
			name=&amp;quot;user_to_email&amp;quot;&lt;br /&gt;
			type=&amp;quot;user&amp;quot;&lt;br /&gt;
			label=&amp;quot;COM_HELLOWORLD_HELLOWORLD_FIELD_USER_TO_EMAIL_LABEL&amp;quot;&lt;br /&gt;
			description=&amp;quot;COM_HELLOWORLD_HELLOWORLD_FIELD_USER_TO_EMAIL_DESC&amp;quot;&lt;br /&gt;
			default=&amp;quot;0&amp;quot;&lt;br /&gt;
		&amp;gt;&lt;br /&gt;
		&amp;lt;/field&amp;gt;&lt;br /&gt;
	&amp;lt;/fieldset&amp;gt;&lt;br /&gt;
    &amp;lt;fieldset&lt;br /&gt;
		name=&amp;quot;permissions&amp;quot;&lt;br /&gt;
		label=&amp;quot;JCONFIG_PERMISSIONS_LABEL&amp;quot;&lt;br /&gt;
		description=&amp;quot;JCONFIG_PERMISSIONS_DESC&amp;quot;&lt;br /&gt;
	&amp;gt;&lt;br /&gt;
		&amp;lt;field&lt;br /&gt;
			name=&amp;quot;rules&amp;quot;&lt;br /&gt;
			type=&amp;quot;rules&amp;quot;&lt;br /&gt;
			label=&amp;quot;JCONFIG_PERMISSIONS_LABEL&amp;quot;&lt;br /&gt;
			class=&amp;quot;inputbox&amp;quot;&lt;br /&gt;
			validate=&amp;quot;rules&amp;quot;&lt;br /&gt;
			filter=&amp;quot;rules&amp;quot;&lt;br /&gt;
			component=&amp;quot;com_helloworld&amp;quot;&lt;br /&gt;
			section=&amp;quot;component&amp;quot;&lt;br /&gt;
		/&amp;gt;&lt;br /&gt;
	&amp;lt;/fieldset&amp;gt;&lt;br /&gt;
&amp;lt;/config&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;translate&amp;gt;&lt;br /&gt;
==Display the new fields on the Admin list form== &amp;lt;!--T:50--&amp;gt;&lt;br /&gt;
&amp;lt;/translate&amp;gt;&lt;br /&gt;
&amp;lt;translate&amp;gt;&amp;lt;!--T:51--&amp;gt; We want to update the admin helloworld list layout file to include the new Author and Created Date fields. This means that we also need to update our model to include these fields in the SQL query.&amp;lt;/translate&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;translate&amp;gt;&amp;lt;!--T:52--&amp;gt; In addition, we&#039;ve changed column ordering mechanism from what it was in [[S:MyLanguage/J3.x:Developing an MVC Component/Adding decorations to the backend|Adding decorations to the backend]] to the more modern way that this is handled.&amp;lt;/translate&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;span id=&amp;quot;admin/views/helloworlds/view.html.php&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;tt&amp;gt;admin/views/helloworlds/view.html.php&amp;lt;/tt&amp;gt;&lt;br /&gt;
&amp;lt;source lang=&amp;quot;php&amp;quot; highlight=&amp;quot;37-39&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;?php&lt;br /&gt;
/**&lt;br /&gt;
 * @package     Joomla.Administrator&lt;br /&gt;
 * @subpackage  com_helloworld&lt;br /&gt;
 *&lt;br /&gt;
 * @copyright   Copyright (C) 2005 - 2018 Open Source Matters, Inc. All rights reserved.&lt;br /&gt;
 * @license     GNU General Public License version 2 or later; see LICENSE.txt&lt;br /&gt;
 */&lt;br /&gt;
&lt;br /&gt;
// No direct access to this file&lt;br /&gt;
defined(&#039;_JEXEC&#039;) or die(&#039;Restricted access&#039;);&lt;br /&gt;
&lt;br /&gt;
/**&lt;br /&gt;
 * HelloWorlds View&lt;br /&gt;
 *&lt;br /&gt;
 * @since  0.0.1&lt;br /&gt;
 */&lt;br /&gt;
class HelloWorldViewHelloWorlds extends JViewLegacy&lt;br /&gt;
{&lt;br /&gt;
	/**&lt;br /&gt;
	 * Display the Hello World view&lt;br /&gt;
	 *&lt;br /&gt;
	 * @param   string  $tpl  The name of the template file to parse; automatically searches through the template paths.&lt;br /&gt;
	 *&lt;br /&gt;
	 * @return  void&lt;br /&gt;
	 */&lt;br /&gt;
	function display($tpl = null)&lt;br /&gt;
	{&lt;br /&gt;
		&lt;br /&gt;
		// Get application&lt;br /&gt;
		$app = JFactory::getApplication();&lt;br /&gt;
		$context = &amp;quot;helloworld.list.admin.helloworld&amp;quot;;&lt;br /&gt;
		// Get data from the model&lt;br /&gt;
		$this-&amp;gt;items			= $this-&amp;gt;get(&#039;Items&#039;);&lt;br /&gt;
		$this-&amp;gt;pagination		= $this-&amp;gt;get(&#039;Pagination&#039;);&lt;br /&gt;
		$this-&amp;gt;state			= $this-&amp;gt;get(&#039;State&#039;);&lt;br /&gt;
		// Remove the old ordering mechanism&lt;br /&gt;
		//$this-&amp;gt;filter_order 	= $app-&amp;gt;getUserStateFromRequest($context.&#039;filter_order&#039;, &#039;filter_order&#039;, &#039;greeting&#039;, &#039;cmd&#039;);&lt;br /&gt;
		//$this-&amp;gt;filter_order_Dir = $app-&amp;gt;getUserStateFromRequest($context.&#039;filter_order_Dir&#039;, &#039;filter_order_Dir&#039;, &#039;asc&#039;, &#039;cmd&#039;);&lt;br /&gt;
		$this-&amp;gt;filterForm    	= $this-&amp;gt;get(&#039;FilterForm&#039;);&lt;br /&gt;
		$this-&amp;gt;activeFilters 	= $this-&amp;gt;get(&#039;ActiveFilters&#039;);&lt;br /&gt;
        &lt;br /&gt;
		// What Access Permissions does this user have? What can (s)he do?&lt;br /&gt;
		$this-&amp;gt;canDo = JHelperContent::getActions(&#039;com_helloworld&#039;);&lt;br /&gt;
&lt;br /&gt;
		// Check for errors.&lt;br /&gt;
		if (count($errors = $this-&amp;gt;get(&#039;Errors&#039;)))&lt;br /&gt;
		{&lt;br /&gt;
			JError::raiseError(500, implode(&#039;&amp;lt;br /&amp;gt;&#039;, $errors));&lt;br /&gt;
&lt;br /&gt;
			return false;&lt;br /&gt;
		}&lt;br /&gt;
        &lt;br /&gt;
		// Set the submenu&lt;br /&gt;
		HelloWorldHelper::addSubmenu(&#039;helloworlds&#039;);&lt;br /&gt;
&lt;br /&gt;
		// Set the toolbar and number of found items&lt;br /&gt;
		$this-&amp;gt;addToolBar();&lt;br /&gt;
&lt;br /&gt;
		// Display the template&lt;br /&gt;
		parent::display($tpl);&lt;br /&gt;
&lt;br /&gt;
		// Set the document&lt;br /&gt;
		$this-&amp;gt;setDocument();&lt;br /&gt;
	}&lt;br /&gt;
&lt;br /&gt;
	/**&lt;br /&gt;
	 * Add the page title and toolbar.&lt;br /&gt;
	 *&lt;br /&gt;
	 * @return  void&lt;br /&gt;
	 *&lt;br /&gt;
	 * @since   1.6&lt;br /&gt;
	 */&lt;br /&gt;
	protected function addToolBar()&lt;br /&gt;
	{&lt;br /&gt;
		$title = JText::_(&#039;COM_HELLOWORLD_MANAGER_HELLOWORLDS&#039;);&lt;br /&gt;
&lt;br /&gt;
		if ($this-&amp;gt;pagination-&amp;gt;total)&lt;br /&gt;
		{&lt;br /&gt;
			$title .= &amp;quot;&amp;lt;span style=&#039;font-size: 0.5em; vertical-align: middle;&#039;&amp;gt;(&amp;quot; . $this-&amp;gt;pagination-&amp;gt;total . &amp;quot;)&amp;lt;/span&amp;gt;&amp;quot;;&lt;br /&gt;
		}&lt;br /&gt;
&lt;br /&gt;
		JToolBarHelper::title($title, &#039;helloworld&#039;);&lt;br /&gt;
		if ($this-&amp;gt;canDo-&amp;gt;get(&#039;core.create&#039;)) &lt;br /&gt;
		{&lt;br /&gt;
			JToolBarHelper::addNew(&#039;helloworld.add&#039;, &#039;JTOOLBAR_NEW&#039;);&lt;br /&gt;
		}&lt;br /&gt;
		if ($this-&amp;gt;canDo-&amp;gt;get(&#039;core.edit&#039;)) &lt;br /&gt;
		{&lt;br /&gt;
			JToolBarHelper::editList(&#039;helloworld.edit&#039;, &#039;JTOOLBAR_EDIT&#039;);&lt;br /&gt;
		}&lt;br /&gt;
		if ($this-&amp;gt;canDo-&amp;gt;get(&#039;core.delete&#039;)) &lt;br /&gt;
		{&lt;br /&gt;
			JToolBarHelper::deleteList(&#039;&#039;, &#039;helloworlds.delete&#039;, &#039;JTOOLBAR_DELETE&#039;);&lt;br /&gt;
		}&lt;br /&gt;
		if ($this-&amp;gt;canDo-&amp;gt;get(&#039;core.admin&#039;)) &lt;br /&gt;
		{&lt;br /&gt;
			JToolBarHelper::divider();&lt;br /&gt;
			JToolBarHelper::preferences(&#039;com_helloworld&#039;);&lt;br /&gt;
		}&lt;br /&gt;
	}&lt;br /&gt;
	/**&lt;br /&gt;
	 * Method to set up the document properties&lt;br /&gt;
	 *&lt;br /&gt;
	 * @return void&lt;br /&gt;
	 */&lt;br /&gt;
	protected function setDocument() &lt;br /&gt;
	{&lt;br /&gt;
		$document = JFactory::getDocument();&lt;br /&gt;
		$document-&amp;gt;setTitle(JText::_(&#039;COM_HELLOWORLD_ADMINISTRATION&#039;));&lt;br /&gt;
	}&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;translate&amp;gt;&amp;lt;!--T:53--&amp;gt; Note that in the layout file below the hidden input fields filter_order and filter_order_Dir have been removed.&amp;lt;/translate&amp;gt;  &lt;br /&gt;
&lt;br /&gt;
&amp;lt;span id=&amp;quot;admin/views/helloworlds/tmpl/default.php&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;tt&amp;gt;admin/views/helloworlds/tmpl/default.php&amp;lt;/tt&amp;gt;&lt;br /&gt;
&amp;lt;source lang=&amp;quot;php&amp;quot; highlight=&amp;quot;14-15,41-42,44-51,54,83-88,101-102&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;?php&lt;br /&gt;
/**&lt;br /&gt;
 * @package     Joomla.Administrator&lt;br /&gt;
 * @subpackage  com_helloworld&lt;br /&gt;
 *&lt;br /&gt;
 * @copyright   Copyright (C) 2005 - 2018 Open Source Matters, Inc. All rights reserved.&lt;br /&gt;
 * @license     GNU General Public License version 2 or later; see LICENSE.txt&lt;br /&gt;
 */&lt;br /&gt;
&lt;br /&gt;
// No direct access to this file&lt;br /&gt;
defined(&#039;_JEXEC&#039;) or die(&#039;Restricted Access&#039;);&lt;br /&gt;
&lt;br /&gt;
JHtml::_(&#039;formbehavior.chosen&#039;, &#039;select&#039;);&lt;br /&gt;
&lt;br /&gt;
$listOrder     = $this-&amp;gt;escape($this-&amp;gt;state-&amp;gt;get(&#039;list.ordering&#039;));&lt;br /&gt;
$listDirn      = $this-&amp;gt;escape($this-&amp;gt;state-&amp;gt;get(&#039;list.direction&#039;));&lt;br /&gt;
?&amp;gt;&lt;br /&gt;
&amp;lt;form action=&amp;quot;index.php?option=com_helloworld&amp;amp;view=helloworlds&amp;quot; method=&amp;quot;post&amp;quot; id=&amp;quot;adminForm&amp;quot; name=&amp;quot;adminForm&amp;quot;&amp;gt;&lt;br /&gt;
	&amp;lt;div id=&amp;quot;j-sidebar-container&amp;quot; class=&amp;quot;span2&amp;quot;&amp;gt;&lt;br /&gt;
		&amp;lt;?php echo JHtmlSidebar::render(); ?&amp;gt;&lt;br /&gt;
	&amp;lt;/div&amp;gt;&lt;br /&gt;
	&amp;lt;div id=&amp;quot;j-main-container&amp;quot; class=&amp;quot;span10&amp;quot;&amp;gt;&lt;br /&gt;
        &amp;lt;div class=&amp;quot;row-fluid&amp;quot;&amp;gt;&lt;br /&gt;
            &amp;lt;div class=&amp;quot;span6&amp;quot;&amp;gt;&lt;br /&gt;
                &amp;lt;?php echo JText::_(&#039;COM_HELLOWORLD_HELLOWORLDS_FILTER&#039;); ?&amp;gt;&lt;br /&gt;
                &amp;lt;?php&lt;br /&gt;
                    echo JLayoutHelper::render(&lt;br /&gt;
                        &#039;joomla.searchtools.default&#039;,&lt;br /&gt;
                        array(&#039;view&#039; =&amp;gt; $this)&lt;br /&gt;
                    );&lt;br /&gt;
                ?&amp;gt;&lt;br /&gt;
            &amp;lt;/div&amp;gt;&lt;br /&gt;
        &amp;lt;/div&amp;gt;&lt;br /&gt;
        &amp;lt;table class=&amp;quot;table table-striped table-hover&amp;quot;&amp;gt;&lt;br /&gt;
            &amp;lt;thead&amp;gt;&lt;br /&gt;
            &amp;lt;tr&amp;gt;&lt;br /&gt;
                &amp;lt;th width=&amp;quot;1%&amp;quot;&amp;gt;&amp;lt;?php echo JText::_(&#039;COM_HELLOWORLD_NUM&#039;); ?&amp;gt;&amp;lt;/th&amp;gt;&lt;br /&gt;
                &amp;lt;th width=&amp;quot;2%&amp;quot;&amp;gt;&lt;br /&gt;
                    &amp;lt;?php echo JHtml::_(&#039;grid.checkall&#039;); ?&amp;gt;&lt;br /&gt;
                &amp;lt;/th&amp;gt;&lt;br /&gt;
                &amp;lt;th width=&amp;quot;30%&amp;quot;&amp;gt;&lt;br /&gt;
                    &amp;lt;?php echo JHtml::_(&#039;searchtools.sort&#039;, &#039;COM_HELLOWORLD_HELLOWORLDS_NAME&#039;, &#039;greeting&#039;, $listDirn, $listOrder); ?&amp;gt;&lt;br /&gt;
                &amp;lt;/th&amp;gt;&lt;br /&gt;
                &amp;lt;th width=&amp;quot;30%&amp;quot;&amp;gt;&lt;br /&gt;
                    &amp;lt;?php echo JHtml::_(&#039;searchtools.sort&#039;, &#039;COM_HELLOWORLD_AUTHOR&#039;, &#039;author&#039;, $listDirn, $listOrder); ?&amp;gt;&lt;br /&gt;
                &amp;lt;/th&amp;gt;&lt;br /&gt;
                &amp;lt;th width=&amp;quot;30%&amp;quot;&amp;gt;&lt;br /&gt;
                    &amp;lt;?php echo JHtml::_(&#039;searchtools.sort&#039;, &#039;COM_HELLOWORLD_CREATED_DATE&#039;, &#039;created&#039;, $listDirn, $listOrder); ?&amp;gt;&lt;br /&gt;
                &amp;lt;/th&amp;gt;&lt;br /&gt;
                &amp;lt;th width=&amp;quot;5%&amp;quot;&amp;gt;&lt;br /&gt;
                    &amp;lt;?php echo JHtml::_(&#039;searchtools.sort&#039;, &#039;COM_HELLOWORLD_PUBLISHED&#039;, &#039;published&#039;, $listDirn, $listOrder); ?&amp;gt;&lt;br /&gt;
                &amp;lt;/th&amp;gt;&lt;br /&gt;
                &amp;lt;th width=&amp;quot;2%&amp;quot;&amp;gt;&lt;br /&gt;
                    &amp;lt;?php echo JHtml::_(&#039;searchtools.sort&#039;, &#039;COM_HELLOWORLD_ID&#039;, &#039;id&#039;, $listDirn, $listOrder); ?&amp;gt;&lt;br /&gt;
                &amp;lt;/th&amp;gt;&lt;br /&gt;
            &amp;lt;/tr&amp;gt;&lt;br /&gt;
            &amp;lt;/thead&amp;gt;&lt;br /&gt;
            &amp;lt;tfoot&amp;gt;&lt;br /&gt;
                &amp;lt;tr&amp;gt;&lt;br /&gt;
                    &amp;lt;td colspan=&amp;quot;5&amp;quot;&amp;gt;&lt;br /&gt;
                        &amp;lt;?php echo $this-&amp;gt;pagination-&amp;gt;getListFooter(); ?&amp;gt;&lt;br /&gt;
                    &amp;lt;/td&amp;gt;&lt;br /&gt;
                &amp;lt;/tr&amp;gt;&lt;br /&gt;
            &amp;lt;/tfoot&amp;gt;&lt;br /&gt;
            &amp;lt;tbody&amp;gt;&lt;br /&gt;
                &amp;lt;?php if (!empty($this-&amp;gt;items)) : ?&amp;gt;&lt;br /&gt;
                    &amp;lt;?php foreach ($this-&amp;gt;items as $i =&amp;gt; $row) :&lt;br /&gt;
                        $link = JRoute::_(&#039;index.php?option=com_helloworld&amp;amp;task=helloworld.edit&amp;amp;id=&#039; . $row-&amp;gt;id);&lt;br /&gt;
                    ?&amp;gt;&lt;br /&gt;
                        &amp;lt;tr&amp;gt;&lt;br /&gt;
                            &amp;lt;td&amp;gt;&amp;lt;?php echo $this-&amp;gt;pagination-&amp;gt;getRowOffset($i); ?&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
                            &amp;lt;td&amp;gt;&lt;br /&gt;
                                &amp;lt;?php echo JHtml::_(&#039;grid.id&#039;, $i, $row-&amp;gt;id); ?&amp;gt;&lt;br /&gt;
                            &amp;lt;/td&amp;gt;&lt;br /&gt;
                            &amp;lt;td&amp;gt;&lt;br /&gt;
                                &amp;lt;a href=&amp;quot;&amp;lt;?php echo $link; ?&amp;gt;&amp;quot; title=&amp;quot;&amp;lt;?php echo JText::_(&#039;COM_HELLOWORLD_EDIT_HELLOWORLD&#039;); ?&amp;gt;&amp;quot;&amp;gt;&lt;br /&gt;
                                    &amp;lt;?php echo $row-&amp;gt;greeting; ?&amp;gt;&lt;br /&gt;
                                &amp;lt;/a&amp;gt;&lt;br /&gt;
                                &amp;lt;div class=&amp;quot;small&amp;quot;&amp;gt;&lt;br /&gt;
									&amp;lt;?php echo JText::_(&#039;JCATEGORY&#039;) . &#039;: &#039; . $this-&amp;gt;escape($row-&amp;gt;category_title); ?&amp;gt;&lt;br /&gt;
								&amp;lt;/div&amp;gt;&lt;br /&gt;
                            &amp;lt;/td&amp;gt;&lt;br /&gt;
                            &amp;lt;td align=&amp;quot;center&amp;quot;&amp;gt;&lt;br /&gt;
                                &amp;lt;?php echo $row-&amp;gt;author; ?&amp;gt;&lt;br /&gt;
                            &amp;lt;/td&amp;gt;&lt;br /&gt;
                            &amp;lt;td align=&amp;quot;center&amp;quot;&amp;gt;&lt;br /&gt;
                                &amp;lt;?php echo substr($row-&amp;gt;created, 0, 10); ?&amp;gt;&lt;br /&gt;
                            &amp;lt;/td&amp;gt;&lt;br /&gt;
                            &amp;lt;td align=&amp;quot;center&amp;quot;&amp;gt;&lt;br /&gt;
                                &amp;lt;?php echo JHtml::_(&#039;jgrid.published&#039;, $row-&amp;gt;published, $i, &#039;helloworlds.&#039;, true, &#039;cb&#039;); ?&amp;gt;&lt;br /&gt;
                            &amp;lt;/td&amp;gt;&lt;br /&gt;
                            &amp;lt;td align=&amp;quot;center&amp;quot;&amp;gt;&lt;br /&gt;
                                &amp;lt;?php echo $row-&amp;gt;id; ?&amp;gt;&lt;br /&gt;
                            &amp;lt;/td&amp;gt;&lt;br /&gt;
                        &amp;lt;/tr&amp;gt;&lt;br /&gt;
                    &amp;lt;?php endforeach; ?&amp;gt;&lt;br /&gt;
                &amp;lt;?php endif; ?&amp;gt;&lt;br /&gt;
            &amp;lt;/tbody&amp;gt;&lt;br /&gt;
        &amp;lt;/table&amp;gt;&lt;br /&gt;
        &amp;lt;input type=&amp;quot;hidden&amp;quot; name=&amp;quot;task&amp;quot; value=&amp;quot;&amp;quot;/&amp;gt;&lt;br /&gt;
        &amp;lt;input type=&amp;quot;hidden&amp;quot; name=&amp;quot;boxchecked&amp;quot; value=&amp;quot;0&amp;quot;/&amp;gt;&lt;br /&gt;
        &amp;lt;?php echo JHtml::_(&#039;form.token&#039;); ?&amp;gt;&lt;br /&gt;
    &amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;/form&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;translate&amp;gt;&amp;lt;!--T:54--&amp;gt; Instead of the using the hidden fields &amp;quot;filter_order&amp;quot; and &amp;quot;filter_order_Dir&amp;quot; to keep track of the current column for ordering and direction, we will use the &amp;quot;list&amp;quot;[&amp;quot;fullordering&amp;quot;] field, and this will now be displayed on the form as well (as is done within com_content for the Articles view). We&#039;ll also need to include the new language strings in this field in our admin language file.&amp;lt;/translate&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;span id=&amp;quot;admin/models/forms/filter_helloworlds.xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;tt&amp;gt;admin/models/forms/filter_helloworlds.xml&amp;lt;/tt&amp;gt;&lt;br /&gt;
&amp;lt;source lang=&amp;quot;xml&amp;quot; highlight=&amp;quot;22-41&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;?xml version=&amp;quot;1.0&amp;quot; encoding=&amp;quot;utf-8&amp;quot;?&amp;gt;&lt;br /&gt;
&amp;lt;form&amp;gt;&lt;br /&gt;
	&amp;lt;fields name=&amp;quot;filter&amp;quot;&amp;gt;&lt;br /&gt;
		&amp;lt;field&lt;br /&gt;
			name=&amp;quot;search&amp;quot;&lt;br /&gt;
			type=&amp;quot;text&amp;quot;&lt;br /&gt;
			label=&amp;quot;COM_BANNERS_SEARCH_IN_TITLE&amp;quot;&lt;br /&gt;
			hint=&amp;quot;JSEARCH_FILTER&amp;quot;&lt;br /&gt;
			class=&amp;quot;js-stools-search-string&amp;quot;&lt;br /&gt;
		/&amp;gt;&lt;br /&gt;
		&amp;lt;field&lt;br /&gt;
			name=&amp;quot;published&amp;quot;&lt;br /&gt;
			type=&amp;quot;status&amp;quot;&lt;br /&gt;
			label=&amp;quot;JOPTION_SELECT_PUBLISHED&amp;quot;&lt;br /&gt;
			description=&amp;quot;JOPTION_SELECT_PUBLISHED_DESC&amp;quot;&lt;br /&gt;
			onchange=&amp;quot;this.form.submit();&amp;quot;&lt;br /&gt;
			&amp;gt;&lt;br /&gt;
			&amp;lt;option value=&amp;quot;&amp;quot;&amp;gt;JOPTION_SELECT_PUBLISHED&amp;lt;/option&amp;gt;&lt;br /&gt;
		&amp;lt;/field&amp;gt;&lt;br /&gt;
	&amp;lt;/fields&amp;gt;&lt;br /&gt;
	&amp;lt;fields name=&amp;quot;list&amp;quot;&amp;gt;&lt;br /&gt;
		&amp;lt;field&lt;br /&gt;
			name=&amp;quot;fullordering&amp;quot;&lt;br /&gt;
			type=&amp;quot;list&amp;quot;&lt;br /&gt;
			label=&amp;quot;COM_HELLOWORLD_LIST_FULL_ORDERING&amp;quot;&lt;br /&gt;
			description=&amp;quot;COM_HELLOWORLD_LIST_FULL_ORDERING_DESC&amp;quot;&lt;br /&gt;
			onchange=&amp;quot;this.form.submit();&amp;quot;&lt;br /&gt;
			default=&amp;quot;greeting ASC&amp;quot;&lt;br /&gt;
			&amp;gt;&lt;br /&gt;
			&amp;lt;option value=&amp;quot;&amp;quot;&amp;gt;JGLOBAL_SORT_BY&amp;lt;/option&amp;gt;&lt;br /&gt;
			&amp;lt;option value=&amp;quot;greeting ASC&amp;quot;&amp;gt;COM_HELLOWORLD_ORDERING_ASC&amp;lt;/option&amp;gt;&lt;br /&gt;
			&amp;lt;option value=&amp;quot;greeting DESC&amp;quot;&amp;gt;COM_HELLOWORLD_ORDERING_DESC&amp;lt;/option&amp;gt;&lt;br /&gt;
			&amp;lt;option value=&amp;quot;id ASC&amp;quot;&amp;gt;JGRID_HEADING_ID_ASC&amp;lt;/option&amp;gt;&lt;br /&gt;
			&amp;lt;option value=&amp;quot;id DESC&amp;quot;&amp;gt;JGRID_HEADING_ID_DESC&amp;lt;/option&amp;gt;&lt;br /&gt;
			&amp;lt;option value=&amp;quot;published ASC&amp;quot;&amp;gt;COM_HELLOWORLD_PUBLISHED_ASC&amp;lt;/option&amp;gt;&lt;br /&gt;
			&amp;lt;option value=&amp;quot;published DESC&amp;quot;&amp;gt;COM_HELLOWORLD_PUBLISHED_DESC&amp;lt;/option&amp;gt;&lt;br /&gt;
			&amp;lt;option value=&amp;quot;author ASC&amp;quot;&amp;gt;COM_HELLOWORLD_AUTHOR_ASC&amp;lt;/option&amp;gt;&lt;br /&gt;
			&amp;lt;option value=&amp;quot;author DESC&amp;quot;&amp;gt;COM_HELLOWORLD_AUTHOR_DESC&amp;lt;/option&amp;gt;&lt;br /&gt;
			&amp;lt;option value=&amp;quot;created ASC&amp;quot;&amp;gt;COM_HELLOWORLD_CREATED_ASC&amp;lt;/option&amp;gt;&lt;br /&gt;
			&amp;lt;option value=&amp;quot;created DESC&amp;quot;&amp;gt;COM_HELLOWORLD_CREATED_DESC&amp;lt;/option&amp;gt;&lt;br /&gt;
		&amp;lt;/field&amp;gt;&lt;br /&gt;
		&amp;lt;field&lt;br /&gt;
			name=&amp;quot;limit&amp;quot;&lt;br /&gt;
			type=&amp;quot;limitbox&amp;quot;&lt;br /&gt;
			class=&amp;quot;input-mini&amp;quot;&lt;br /&gt;
			default=&amp;quot;25&amp;quot;&lt;br /&gt;
			label=&amp;quot;COM_CONTENT_LIST_LIMIT&amp;quot;&lt;br /&gt;
			description=&amp;quot;COM_HELLOWORLD_LIST_LIMIT_DESC&amp;quot;&lt;br /&gt;
			onchange=&amp;quot;this.form.submit();&amp;quot;&lt;br /&gt;
		/&amp;gt;&lt;br /&gt;
	&amp;lt;/fields&amp;gt;&lt;br /&gt;
&amp;lt;/form&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;translate&amp;gt;&amp;lt;!--T:62--&amp;gt; The above status type field (second field element, with name=&amp;quot;published&amp;quot;) displays the status values &amp;quot;Trashed&amp;quot; and &amp;quot;Archived&amp;quot; which the Helloworld component doesn&#039;t support. We could define our own custom helloworldStatus type field which displayed only the publishing options, but as defining such custom fields has already been covered in the step [[S:MyLanguage/J3.x:Developing an MVC Component/Using the database|Using the database]] with our &amp;quot;helloworld&amp;quot; custom field, we won&#039;t bother with that here.&amp;lt;/translate&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;translate&amp;gt;&lt;br /&gt;
&amp;lt;!--T:59--&amp;gt;&lt;br /&gt;
Within the model we need to get the author and created date fields from the database, and we also need to add these to the &amp;lt;tt&amp;gt;filter_fields&amp;lt;/tt&amp;gt; array of fields which relate to sortable columns. &lt;br /&gt;
&amp;lt;/translate&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span id=&amp;quot;admin/models/helloworlds.php&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;tt&amp;gt;admin/models/helloworlds.php&amp;lt;/tt&amp;gt;&lt;br /&gt;
&amp;lt;source lang=&amp;quot;php&amp;quot; highlight=&amp;quot;34-35,62-64&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;?php&lt;br /&gt;
/**&lt;br /&gt;
 * @package     Joomla.Administrator&lt;br /&gt;
 * @subpackage  com_helloworld&lt;br /&gt;
 *&lt;br /&gt;
 * @copyright   Copyright (C) 2005 - 2018 Open Source Matters, Inc. All rights reserved.&lt;br /&gt;
 * @license     GNU General Public License version 2 or later; see LICENSE.txt&lt;br /&gt;
 */&lt;br /&gt;
// No direct access to this file&lt;br /&gt;
defined(&#039;_JEXEC&#039;) or die(&#039;Restricted access&#039;);&lt;br /&gt;
&lt;br /&gt;
/**&lt;br /&gt;
 * HelloWorldList Model&lt;br /&gt;
 *&lt;br /&gt;
 * @since  0.0.1&lt;br /&gt;
 */&lt;br /&gt;
class HelloWorldModelHelloWorlds extends JModelList&lt;br /&gt;
{&lt;br /&gt;
	/**&lt;br /&gt;
	 * Constructor.&lt;br /&gt;
	 *&lt;br /&gt;
	 * @param   array  $config  An optional associative array of configuration settings.&lt;br /&gt;
	 *&lt;br /&gt;
	 * @see     JController&lt;br /&gt;
	 * @since   1.6&lt;br /&gt;
	 */&lt;br /&gt;
	public function __construct($config = array())&lt;br /&gt;
	{&lt;br /&gt;
		if (empty($config[&#039;filter_fields&#039;]))&lt;br /&gt;
		{&lt;br /&gt;
			$config[&#039;filter_fields&#039;] = array(&lt;br /&gt;
				&#039;id&#039;,&lt;br /&gt;
				&#039;greeting&#039;,&lt;br /&gt;
				&#039;author&#039;,&lt;br /&gt;
				&#039;created&#039;,&lt;br /&gt;
				&#039;published&#039;&lt;br /&gt;
			);&lt;br /&gt;
		}&lt;br /&gt;
&lt;br /&gt;
		parent::__construct($config);&lt;br /&gt;
	}&lt;br /&gt;
&lt;br /&gt;
	/**&lt;br /&gt;
	 * Method to build an SQL query to load the list data.&lt;br /&gt;
	 *&lt;br /&gt;
	 * @return      string  An SQL query&lt;br /&gt;
	 */&lt;br /&gt;
	protected function getListQuery()&lt;br /&gt;
	{&lt;br /&gt;
		// Initialize variables.&lt;br /&gt;
		$db    = JFactory::getDbo();&lt;br /&gt;
		$query = $db-&amp;gt;getQuery(true);&lt;br /&gt;
&lt;br /&gt;
		// Create the base select statement.&lt;br /&gt;
		$query-&amp;gt;select(&#039;a.id as id, a.greeting as greeting, a.published as published, a.created as created&#039;)&lt;br /&gt;
			  -&amp;gt;from($db-&amp;gt;quoteName(&#039;#__helloworld&#039;, &#039;a&#039;));&lt;br /&gt;
&lt;br /&gt;
		// Join over the categories.&lt;br /&gt;
		$query-&amp;gt;select($db-&amp;gt;quoteName(&#039;c.title&#039;, &#039;category_title&#039;))&lt;br /&gt;
			-&amp;gt;join(&#039;LEFT&#039;, $db-&amp;gt;quoteName(&#039;#__categories&#039;, &#039;c&#039;) . &#039; ON c.id = a.catid&#039;);&lt;br /&gt;
        &lt;br /&gt;
		// Join with users table to get the username of the author&lt;br /&gt;
		$query-&amp;gt;select($db-&amp;gt;quoteName(&#039;u.username&#039;, &#039;author&#039;))&lt;br /&gt;
			-&amp;gt;join(&#039;LEFT&#039;, $db-&amp;gt;quoteName(&#039;#__users&#039;, &#039;u&#039;) . &#039; ON u.id = a.created_by&#039;);&lt;br /&gt;
            &lt;br /&gt;
		// Filter: like / search&lt;br /&gt;
		$search = $this-&amp;gt;getState(&#039;filter.search&#039;);&lt;br /&gt;
&lt;br /&gt;
		if (!empty($search))&lt;br /&gt;
		{&lt;br /&gt;
			$like = $db-&amp;gt;quote(&#039;%&#039; . $search . &#039;%&#039;);&lt;br /&gt;
			$query-&amp;gt;where(&#039;greeting LIKE &#039; . $like);&lt;br /&gt;
		}&lt;br /&gt;
&lt;br /&gt;
		// Filter by published state&lt;br /&gt;
		$published = $this-&amp;gt;getState(&#039;filter.published&#039;);&lt;br /&gt;
&lt;br /&gt;
		if (is_numeric($published))&lt;br /&gt;
		{&lt;br /&gt;
			$query-&amp;gt;where(&#039;a.published = &#039; . (int) $published);&lt;br /&gt;
		}&lt;br /&gt;
		elseif ($published === &#039;&#039;)&lt;br /&gt;
		{&lt;br /&gt;
			$query-&amp;gt;where(&#039;(a.published IN (0, 1))&#039;);&lt;br /&gt;
		}&lt;br /&gt;
&lt;br /&gt;
		// Add the list ordering clause.&lt;br /&gt;
		$orderCol	= $this-&amp;gt;state-&amp;gt;get(&#039;list.ordering&#039;, &#039;greeting&#039;);&lt;br /&gt;
		$orderDirn 	= $this-&amp;gt;state-&amp;gt;get(&#039;list.direction&#039;, &#039;asc&#039;);&lt;br /&gt;
&lt;br /&gt;
		$query-&amp;gt;order($db-&amp;gt;escape($orderCol) . &#039; &#039; . $db-&amp;gt;escape($orderDirn));&lt;br /&gt;
&lt;br /&gt;
		return $query;&lt;br /&gt;
	}&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&amp;lt;/span&amp;gt;&lt;br /&gt;
&amp;lt;translate&amp;gt;&lt;br /&gt;
==Updated Language Strings== &amp;lt;!--T:55--&amp;gt;&lt;br /&gt;
&amp;lt;/translate&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span id=&amp;quot;site/language/en-GB/en-GB.com_helloworld.ini&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;tt&amp;gt;site/language/en-GB/en-GB.com_helloworld.ini&amp;lt;/tt&amp;gt;&lt;br /&gt;
&amp;lt;source lang=&amp;quot;text&amp;quot; highlight=&amp;quot;1-20&amp;quot;&amp;gt;&lt;br /&gt;
; add new message form&lt;br /&gt;
COM_HELLOWORLD_LEGEND_DETAILS=&amp;quot;New Helloworld Message Details&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_HELLOWORLD_CREATING=&amp;quot;Add message&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_HELLOWORLD_ERROR_UNACCEPTABLE=&amp;quot;Sorry, you have an error&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_HELLOWORLD_DETAILS=&amp;quot;Message details&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_HELLOWORLD_GREETING_LABEL=&amp;quot;Greeting&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_HELLOWORLD_GREETING_DESC=&amp;quot;Please specify the greeting to add&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_HELLOWORLD_GREETING_HINT=&amp;quot;Letters only!&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_HELLOWORLD_FIELD_CATID_LABEL=&amp;quot;Category&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_HELLOWORLD_FIELD_CATID_DESC=&amp;quot;Please select the associated category&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_HELLOWORLD_MESSAGE_LABEL=&amp;quot;Reason&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_HELLOWORLD_MESSAGE_DESC=&amp;quot;Please say why you&#039;re adding this greeting&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_HELLOWORLD_MESSAGE_HINT=&amp;quot;No HTML tags!&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_HELLOWORLD_FIELD_CAPTCHA_LABEL=&amp;quot;Spam protection&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_HELLOWORLD_FIELD_CAPTCHA_DESC=&amp;quot;Prove you&#039;re a real person!&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_HELLOWORLD_FIELD_SHOW_CATEGORY_LABEL=&amp;quot;Display category or not?&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_HELLOWORLD_FIELD_SHOW_CATEGORY_DESC=&amp;quot;Select if you want the category displayed too&amp;quot;&lt;br /&gt;
; save and cancel confirmation messages&lt;br /&gt;
COM_HELLOWORLD_ADD_SUCCESSFUL=&amp;quot;New greeting successfully saved&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_ADD_CANCELLED=&amp;quot;New greeting cancelled ok&amp;quot;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span id=&amp;quot;admin/language/en-GB/en-GB.com_helloworld.sys.ini&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;tt&amp;gt;admin/language/en-GB/en-GB.com_helloworld.sys.ini&amp;lt;/tt&amp;gt;&lt;br /&gt;
&amp;lt;source lang=&amp;quot;text&amp;quot; highlight=&amp;quot;10-11&amp;quot;&amp;gt;&lt;br /&gt;
; Joomla! Project&lt;br /&gt;
; Copyright (C) 2005 - 2018 Open Source Matters. All rights reserved.&lt;br /&gt;
; License GNU General Public License version 2 or later; see LICENSE.txt, see LICENSE.php&lt;br /&gt;
; Note : All ini files need to be saved as UTF-8&lt;br /&gt;
&lt;br /&gt;
COM_HELLOWORLD=&amp;quot;Hello World!&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_DESCRIPTION=&amp;quot;This is the Hello World description&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_HELLOWORLD_VIEW_DEFAULT_TITLE=&amp;quot;Hello World&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_HELLOWORLD_VIEW_DEFAULT_DESC=&amp;quot;This view displays a selected message&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_ADD_VIEW_TITLE=&amp;quot;Hello World form&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_ADD_VIEW_DESC=&amp;quot;This displays a form to allow the user to enter a new message&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_INSTALL_TEXT=&amp;quot;HelloWorld Install script&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_MENU=&amp;quot;Hello World!&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_POSTFLIGHT_DISCOVER_INSTALL_TEXT=&amp;quot;HelloWorld postflight discover install script&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_POSTFLIGHT_INSTALL_TEXT=&amp;quot;HelloWorld postflight install script&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_POSTFLIGHT_UNINSTALL_TEXT=&amp;quot;HelloWorld postflight uninstall script&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_POSTFLIGHT_UPDATE_TEXT=&amp;quot;HelloWorld postflight update script&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_PREFLIGHT_DISCOVER_INSTALL_TEXT=&amp;quot;HelloWorld preflight discover install script&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_PREFLIGHT_INSTALL_TEXT=&amp;quot;HelloWorld preflight install script&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_PREFLIGHT_UNINSTALL_TEXT=&amp;quot;HelloWorld preflight uninstall script&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_PREFLIGHT_UPDATE_TEXT=&amp;quot;HelloWorld preflight update script&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_UNINSTALL_TEXT=&amp;quot;HelloWorld Uninstall script&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_UPDATE_TEXT=&amp;quot;HelloWorld Update script. HelloWorld now updated to version %s.&amp;quot;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span id=&amp;quot;admin/language/en-GB/en-GB.com_helloworld.ini&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;tt&amp;gt;admin/language/en-GB/en-GB.com_helloworld.ini&amp;lt;/tt&amp;gt;&lt;br /&gt;
&amp;lt;source lang=&amp;quot;text&amp;quot; highlight=&amp;quot;10-11,43-46,58-66&amp;quot;&amp;gt;&lt;br /&gt;
; Joomla! Project&lt;br /&gt;
; Copyright (C) 2005 - 2018 Open Source Matters. All rights reserved.&lt;br /&gt;
; License GNU General Public License version 2 or later; see LICENSE.txt, see LICENSE.php&lt;br /&gt;
; Note : All ini files need to be saved as UTF-8&lt;br /&gt;
&lt;br /&gt;
COM_HELLOWORLD_ADMINISTRATION=&amp;quot;HelloWorld - Administration&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_ADMINISTRATION_CATEGORIES=&amp;quot;HelloWorld - Categories&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_NUM=&amp;quot;#&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_HELLOWORLDS_FILTER=&amp;quot;Filters&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_AUTHOR=&amp;quot;Author&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_CREATED_DATE=&amp;quot;Created&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_PUBLISHED=&amp;quot;Published&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_HELLOWORLDS_NAME=&amp;quot;Name&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_ID=&amp;quot;Id&amp;quot;&lt;br /&gt;
&lt;br /&gt;
COM_HELLOWORLD_HELLOWORLD_CREATING=&amp;quot;HelloWorld - Creating&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_HELLOWORLD_DETAILS=&amp;quot;Details&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_HELLOWORLD_EDITING=&amp;quot;HelloWorld - Editing&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_HELLOWORLD_ERROR_UNACCEPTABLE=&amp;quot;Some values are unacceptable&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_HELLOWORLD_FIELD_CATID_DESC=&amp;quot;The category the messages belongs to&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_HELLOWORLD_FIELD_CATID_LABEL=&amp;quot;Category&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_HELLOWORLD_FIELD_GREETING_DESC=&amp;quot;This message will be displayed&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_HELLOWORLD_FIELD_GREETING_LABEL=&amp;quot;Message&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_HELLOWORLD_FIELD_SHOW_CATEGORY_LABEL=&amp;quot;Show category&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_HELLOWORLD_FIELD_SHOW_CATEGORY_DESC=&amp;quot;If set to Show, the title of the message&amp;amp;rsquo;s category will show.&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_HELLOWORLD_HEADING_GREETING=&amp;quot;Greeting&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_HELLOWORLD_HEADING_ID=&amp;quot;Id&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_MANAGER_HELLOWORLD_EDIT=&amp;quot;HelloWorld manager: Edit Message&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_MANAGER_HELLOWORLD_NEW=&amp;quot;HelloWorld manager: New Message&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_MANAGER_HELLOWORLDS=&amp;quot;HelloWorld manager&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_EDIT_HELLOWORLD=&amp;quot;Edit message&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_N_ITEMS_DELETED_1=&amp;quot;One message deleted&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_N_ITEMS_DELETED_MORE=&amp;quot;%d messages deleted&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_N_ITEMS_PUBLISHED=&amp;quot;%d message(s) published&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_N_ITEMS_UNPUBLISHED=&amp;quot;%d message(s) unpublished&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_HELLOWORLD_GREETING_LABEL=&amp;quot;Greeting&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_HELLOWORLD_GREETING_DESC=&amp;quot;Add Hello World Greeting&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_SUBMENU_MESSAGES=&amp;quot;Messages&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_SUBMENU_CATEGORIES=&amp;quot;Categories&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_CONFIGURATION=&amp;quot;HelloWorld Configuration&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_CONFIG_GREETING_SETTINGS_LABEL=&amp;quot;Messages settings&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_CONFIG_GREETING_SETTINGS_DESC=&amp;quot;Settings that will be applied to all messages by default&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_HELLOWORLD_FIELD_CAPTCHA_LABEL=&amp;quot;Captcha&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_HELLOWORLD_FIELD_CAPTCHA_DESC=&amp;quot;Select Captcha to use on front end form&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_HELLOWORLD_FIELD_USER_TO_EMAIL_LABEL=&amp;quot;User to email&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_HELLOWORLD_FIELD_USER_TO_EMAIL_DESC=&amp;quot;Select user to email when a new message is entered on front end&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_FIELDSET_RULES=&amp;quot;Message Permissions&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_FIELD_RULES_LABEL=&amp;quot;Permissions&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_ACCESS_DELETE_DESC=&amp;quot;Is this group allowed to edit this message?&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_ACCESS_DELETE_DESC=&amp;quot;Is this group allowed to delete this message?&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_TAB_NEW_MESSAGE=&amp;quot;New Message&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_TAB_EDIT_MESSAGE=&amp;quot;Message Details&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_TAB_PARAMS=&amp;quot;Parameters&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_TAB_PERMISSIONS=&amp;quot;Permissions&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_LEGEND_DETAILS=&amp;quot;Message Details&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_LEGEND_PARAMS=&amp;quot;Message Parameters&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_LEGEND_PERMISSIONS=&amp;quot;Message Permissions&amp;quot;&lt;br /&gt;
; Column ordering in the Helloworlds view&lt;br /&gt;
COM_HELLOWORLD_ORDERING_ASC=&amp;quot;Greeting ascending&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_ORDERING_DESC=&amp;quot;Greeting descending&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_AUTHOR_ASC=&amp;quot;Author ascending&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_AUTHOR_DESC=&amp;quot;Author descending&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_CREATED_ASC=&amp;quot;Creation date ascending&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_CREATED_DESC=&amp;quot;Creation date descending&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_PUBLISHED_ASC=&amp;quot;Unpublished first&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_PUBLISHED_DESC=&amp;quot;Published first&amp;quot;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;translate&amp;gt;&lt;br /&gt;
==Packaging the Component== &amp;lt;!--T:56--&amp;gt;&lt;br /&gt;
&amp;lt;/translate&amp;gt;&lt;br /&gt;
&amp;lt;translate&amp;gt;&amp;lt;!--T:57--&amp;gt; Contents of your code directory. Each file link below takes you to the step in the tutorial which has the latest version of that source code file.&amp;lt;/translate&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Adding_a_front-end_form#helloworld.xml|helloworld.xml]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Adding an install-uninstall-update script file#script.php|script.php]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Adding_a_view_to_the_site_part#site/helloworld.php|site/helloworld.php]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Developing_a_Basic_Component#index.html|site/index.html]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Adding_a_view_to_the_site_part#site/controller.php|site/controller.php]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Adding_a_front-end_form#site/controllers/helloworld.php|site/controllers/helloworld.php]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Developing_a_Basic_Component#index.html|site/views/index.html]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Developing_a_Basic_Component#index.html|site/views/helloworld/index.html]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Adding_configuration#site/views/helloworld/view.html.php|site/views/helloworld/view.html.php]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Developing_a_Basic_Component#index.html|site/views/helloworld/tmpl/index.html]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Using_the_database#site/views/helloworld/tmpl/default.xml|site/views/helloworld/tmpl/default.xml]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Adding_configuration#site/views/helloworld/tmpl/default.php|site/views/helloworld/tmpl/default.php]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Developing_a_Basic_Component#index.html|site/views/form/index.html]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Adding_a_front-end_form#site/views/form/view.html.php|site/views/form/view.html.php]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Developing_a_Basic_Component#index.html|site/views/form/tmpl/index.html]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Adding_a_front-end_form#site/views/form/tmpl/edit.php|site/views/form/tmpl/edit.php]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Adding_a_front-end_form#site/views/form/tmpl/edit.xml|site/views/form/tmpl/edit.xml]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Developing_a_Basic_Component#index.html|site/models/index.html]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Adding_configuration#site/models/helloworld.php|site/models/helloworld.php]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Adding_a_front-end_form#site/models/form.php|site/models/form.php]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Developing_a_Basic_Component#index.html|site/models/forms/index.html]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Adding_a_front-end_form#site/models/forms/add-form.xml|site/models/forms/add-form.xml]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Developing_a_Basic_Component#index.html|site/language/index.html]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Developing_a_Basic_Component#index.html|site/language/en-GB/index.html]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.x:Developing an MVC Component/Adding_a_front-end_form#site/language/en-GB/en-GB.com_helloworld.ini|site/language/en-GB/en-GB.com_helloworld.ini]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Developing_a_Basic_Component#index.html|admin/index.html]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Adding_ACL#admin/helloworld.php|admin/helloworld.php]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Adding_ACL#admin/config.xml|admin/config.xml]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Basic_backend#admin/controller.php|admin/controller.php]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Adding_ACL#admin/access.xml|admin/access.xml]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Adding_categories#admin/helpers/helloworld.php|admin/helpers/helloworld.php]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Developing_a_Basic_Component#index.html|admin/helpers/index.html]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Developing_a_Basic_Component#index.html|admin/sql/index.html]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Adding_a_front-end_form#admin/sql/install.mysql.utf8.sql|admin/sql/install.mysql.utf8.sql]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Using_the_database#admin/sql/uninstall.mysql.utf8.sql|admin/sql/uninstall.mysql.utf8.sql]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Developing_a_Basic_Component#index.html|admin/sql/updates/index.html]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Developing_a_Basic_Component#index.html|admin/sql/updates/mysql/index.html]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Developing_a_Basic_Component#admin/sql/updates/mysql/0.0.1.sql|admin/sql/updates/mysql/0.0.1.sql]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Using_the_database#admin/sql/install.mysql.utf8.sql|admin/sql/updates/mysql/0.0.6.sql]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Adding_categories#admin/sql/updates/mysql/0.0.12.sql|admin/sql/updates/mysql/0.0.12.sql]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Adding_configuration#admin/sql/updates/mysql/0.0.13.sql|admin/sql/updates/mysql/0.0.13.sql]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Adding_ACL#admin/sql/updates/mysql/0.0.14.sql|admin/sql/updates/mysql/0.0.14.sql]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Adding_a_front-end_form#admin/sql/updates/mysql/0.0.16.sql|admin/sql/updates/mysql/0.0.16.sql]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Developing_a_Basic_Component#index.html|admin/models/index.html]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Developing_a_Basic_Component#index.html|admin/models/fields/index.html]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Adding_categories#admin/models/fields/helloworld.php|admin/models/fields/helloworld.php]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Adding_a_front-end_form#admin/models/helloworlds.php|admin/models/helloworlds.php]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Adding_ACL#admin/models/helloworld.php|admin/models/helloworld.php]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Adding_a_front-end_form#admin/models/forms/filter_helloworlds.xml|admin/models/forms/filter_helloworlds.xml]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Developing_a_Basic_Component#index.html|admin/models/forms/index.html]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Adding_verifications#admin/models/forms/helloworld.js|admin/models/forms/helloworld.js]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Adding_ACL#admin/models/forms/helloworld.xml|admin/models/forms/helloworld.xml]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Adding_verifications#admin/models/rules/greeting.php|admin/models/rules/greeting.php]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Developing_a_Basic_Component#index.html|admin/models/rules/index.html]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Adding_ACL#admin/controllers/helloworld.php|admin/controllers/helloworld.php]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Adding_backend_actions#admin/controllers/helloworlds.php|admin/controllers/helloworlds.php]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Developing_a_Basic_Component#index.html|admin/controllers/index.html]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Developing_a_Basic_Component#index.html|admin/views/index.html]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Developing_a_Basic_Component#index.html|admin/views/helloworld/index.html]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Adding_ACL#admin/views/helloworld/view.html.php|admin/views/helloworld/view.html.php]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Developing_a_Basic_Component#index.html|admin/views/helloworld/tmpl/index.html]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Adding_ACL#admin/views/helloworld/tmpl/edit.php|admin/views/helloworld/tmpl/edit.php]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Adding_verifications#admin/views/helloworld/submitbutton.js|admin/views/helloworld/submitbutton.js]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Developing_a_Basic_Component#index.html|admin/views/helloworlds/index.html]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Adding_a_front-end_form#admin/views/helloworlds/view.html.php|admin/views/helloworlds/view.html.php]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Developing_a_Basic_Component#index.html|admin/views/helloworlds/tmpl/index.html]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Adding_a_front-end_form#admin/views/helloworlds/tmpl/default.php|admin/views/helloworlds/tmpl/default.php]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Developing_a_Basic_Component#index.html|admin/tables/index.html]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Adding_ACL#admin/tables/helloworld.php|admin/tables/helloworld.php]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Developing_a_Basic_Component#index.html|admin/language/index.html]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Developing_a_Basic_Component#index.html|admin/language/en-GB/index.html]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.x:Developing an MVC Component/Adding_a_front-end_form#admin.2Flanguage.2Fen-GB.2Fen-GB.com_helloworld.ini|admin/language/en-GB/en-GB.com_helloworld.ini]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.x:Developing an MVC Component/Adding_a_front-end_form#admin.2Flanguage.2Fen-GB.2Fen-GB.com_helloworld.sys.ini|admin/language/en-GB/en-GB.com_helloworld.sys.ini]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Developing_a_Basic_Component#index.html|media/index.html]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Developing_a_Basic_Component#index.html|media/images/index.html]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.x:Developing_an_MVC_Component/Adding_decorations_to_the_backend#Adding_some_icons|media/images/tux-16x16.png]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.x:Developing_an_MVC_Component/Adding_decorations_to_the_backend#Adding_some_icons|media/images/tux-48x48.png]]&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span id=&amp;quot;helloworld.xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;tt&amp;gt;helloworld.xml&amp;lt;/tt&amp;gt;&lt;br /&gt;
&amp;lt;source lang=&amp;quot;xml&amp;quot; highlight=&amp;quot;13,44&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;?xml version=&amp;quot;1.0&amp;quot; encoding=&amp;quot;utf-8&amp;quot;?&amp;gt;&lt;br /&gt;
&amp;lt;extension type=&amp;quot;component&amp;quot; version=&amp;quot;3.0&amp;quot; method=&amp;quot;upgrade&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
	&amp;lt;name&amp;gt;COM_HELLOWORLD&amp;lt;/name&amp;gt;&lt;br /&gt;
	&amp;lt;!-- The following elements are optional and free of formatting constraints --&amp;gt;&lt;br /&gt;
	&amp;lt;creationDate&amp;gt;January 2018&amp;lt;/creationDate&amp;gt;&lt;br /&gt;
	&amp;lt;author&amp;gt;John Doe&amp;lt;/author&amp;gt;&lt;br /&gt;
	&amp;lt;authorEmail&amp;gt;john.doe@example.org&amp;lt;/authorEmail&amp;gt;&lt;br /&gt;
	&amp;lt;authorUrl&amp;gt;http://www.example.org&amp;lt;/authorUrl&amp;gt;&lt;br /&gt;
	&amp;lt;copyright&amp;gt;Copyright Info&amp;lt;/copyright&amp;gt;&lt;br /&gt;
	&amp;lt;license&amp;gt;License Info&amp;lt;/license&amp;gt;&lt;br /&gt;
	&amp;lt;!--  The version string is recorded in the components table --&amp;gt;&lt;br /&gt;
	&amp;lt;version&amp;gt;0.0.16&amp;lt;/version&amp;gt;&lt;br /&gt;
	&amp;lt;!-- The description is optional and defaults to the name --&amp;gt;&lt;br /&gt;
	&amp;lt;description&amp;gt;COM_HELLOWORLD_DESCRIPTION&amp;lt;/description&amp;gt;&lt;br /&gt;
&lt;br /&gt;
	&amp;lt;!-- Runs on install/uninstall/update; New in 2.5 --&amp;gt;&lt;br /&gt;
	&amp;lt;scriptfile&amp;gt;script.php&amp;lt;/scriptfile&amp;gt;&lt;br /&gt;
&lt;br /&gt;
	&amp;lt;install&amp;gt; &amp;lt;!-- Runs on install --&amp;gt;&lt;br /&gt;
		&amp;lt;sql&amp;gt;&lt;br /&gt;
			&amp;lt;file driver=&amp;quot;mysql&amp;quot; charset=&amp;quot;utf8&amp;quot;&amp;gt;sql/install.mysql.utf8.sql&amp;lt;/file&amp;gt;&lt;br /&gt;
		&amp;lt;/sql&amp;gt;&lt;br /&gt;
	&amp;lt;/install&amp;gt;&lt;br /&gt;
	&amp;lt;uninstall&amp;gt; &amp;lt;!-- Runs on uninstall --&amp;gt;&lt;br /&gt;
		&amp;lt;sql&amp;gt;&lt;br /&gt;
			&amp;lt;file driver=&amp;quot;mysql&amp;quot; charset=&amp;quot;utf8&amp;quot;&amp;gt;sql/uninstall.mysql.utf8.sql&amp;lt;/file&amp;gt;&lt;br /&gt;
		&amp;lt;/sql&amp;gt;&lt;br /&gt;
	&amp;lt;/uninstall&amp;gt;&lt;br /&gt;
	&amp;lt;update&amp;gt; &amp;lt;!-- Runs on update; New since J2.5 --&amp;gt;&lt;br /&gt;
		&amp;lt;schemas&amp;gt;&lt;br /&gt;
			&amp;lt;schemapath type=&amp;quot;mysql&amp;quot;&amp;gt;sql/updates/mysql&amp;lt;/schemapath&amp;gt;&lt;br /&gt;
		&amp;lt;/schemas&amp;gt;&lt;br /&gt;
	&amp;lt;/update&amp;gt;&lt;br /&gt;
&lt;br /&gt;
	&amp;lt;!-- Site Main File Copy Section --&amp;gt;&lt;br /&gt;
	&amp;lt;!-- Note the folder attribute: This attribute describes the folder&lt;br /&gt;
		to copy FROM in the package to install therefore files copied&lt;br /&gt;
		in this section are copied from /site/ in the package --&amp;gt;&lt;br /&gt;
	&amp;lt;files folder=&amp;quot;site&amp;quot;&amp;gt;&lt;br /&gt;
		&amp;lt;filename&amp;gt;index.html&amp;lt;/filename&amp;gt;&lt;br /&gt;
		&amp;lt;filename&amp;gt;helloworld.php&amp;lt;/filename&amp;gt;&lt;br /&gt;
		&amp;lt;filename&amp;gt;controller.php&amp;lt;/filename&amp;gt;&lt;br /&gt;
		&amp;lt;folder&amp;gt;controllers&amp;lt;/folder&amp;gt;&lt;br /&gt;
		&amp;lt;folder&amp;gt;views&amp;lt;/folder&amp;gt;&lt;br /&gt;
		&amp;lt;folder&amp;gt;models&amp;lt;/folder&amp;gt;&lt;br /&gt;
	&amp;lt;/files&amp;gt;&lt;br /&gt;
&lt;br /&gt;
        &amp;lt;languages folder=&amp;quot;site/language&amp;quot;&amp;gt;&lt;br /&gt;
		&amp;lt;language tag=&amp;quot;en-GB&amp;quot;&amp;gt;en-GB/en-GB.com_helloworld.ini&amp;lt;/language&amp;gt;&lt;br /&gt;
        &amp;lt;/languages&amp;gt;&lt;br /&gt;
&lt;br /&gt;
	&amp;lt;media destination=&amp;quot;com_helloworld&amp;quot; folder=&amp;quot;media&amp;quot;&amp;gt;&lt;br /&gt;
		&amp;lt;filename&amp;gt;index.html&amp;lt;/filename&amp;gt;&lt;br /&gt;
		&amp;lt;folder&amp;gt;images&amp;lt;/folder&amp;gt;&lt;br /&gt;
	&amp;lt;/media&amp;gt;&lt;br /&gt;
&lt;br /&gt;
	&amp;lt;administration&amp;gt;&lt;br /&gt;
		&amp;lt;!-- Administration Menu Section --&amp;gt;&lt;br /&gt;
		&amp;lt;menu link=&#039;index.php?option=com_helloworld&#039; img=&amp;quot;../media/com_helloworld/images/tux-16x16.png&amp;quot;&amp;gt;COM_HELLOWORLD_MENU&amp;lt;/menu&amp;gt;&lt;br /&gt;
		&amp;lt;!-- Administration Main File Copy Section --&amp;gt;&lt;br /&gt;
		&amp;lt;!-- Note the folder attribute: This attribute describes the folder&lt;br /&gt;
			to copy FROM in the package to install therefore files copied&lt;br /&gt;
			in this section are copied from /admin/ in the package --&amp;gt;&lt;br /&gt;
		&amp;lt;files folder=&amp;quot;admin&amp;quot;&amp;gt;&lt;br /&gt;
			&amp;lt;!-- Admin Main File Copy Section --&amp;gt;&lt;br /&gt;
			&amp;lt;filename&amp;gt;index.html&amp;lt;/filename&amp;gt;&lt;br /&gt;
			&amp;lt;filename&amp;gt;config.xml&amp;lt;/filename&amp;gt;&lt;br /&gt;
			&amp;lt;filename&amp;gt;helloworld.php&amp;lt;/filename&amp;gt;&lt;br /&gt;
			&amp;lt;filename&amp;gt;controller.php&amp;lt;/filename&amp;gt;&lt;br /&gt;
			&amp;lt;filename&amp;gt;access.xml&amp;lt;/filename&amp;gt;&lt;br /&gt;
			&amp;lt;!-- SQL files section --&amp;gt;&lt;br /&gt;
			&amp;lt;folder&amp;gt;sql&amp;lt;/folder&amp;gt;&lt;br /&gt;
			&amp;lt;!-- tables files section --&amp;gt;&lt;br /&gt;
			&amp;lt;folder&amp;gt;tables&amp;lt;/folder&amp;gt;&lt;br /&gt;
			&amp;lt;!-- models files section --&amp;gt;&lt;br /&gt;
			&amp;lt;folder&amp;gt;models&amp;lt;/folder&amp;gt;&lt;br /&gt;
			&amp;lt;!-- views files section --&amp;gt;&lt;br /&gt;
			&amp;lt;folder&amp;gt;views&amp;lt;/folder&amp;gt;&lt;br /&gt;
			&amp;lt;!-- controllers files section --&amp;gt;&lt;br /&gt;
			&amp;lt;folder&amp;gt;controllers&amp;lt;/folder&amp;gt;&lt;br /&gt;
			&amp;lt;!-- helpers files section --&amp;gt;&lt;br /&gt;
			&amp;lt;folder&amp;gt;helpers&amp;lt;/folder&amp;gt;&lt;br /&gt;
		&amp;lt;/files&amp;gt;&lt;br /&gt;
		&amp;lt;languages folder=&amp;quot;admin/language&amp;quot;&amp;gt;&lt;br /&gt;
        		&amp;lt;language tag=&amp;quot;en-GB&amp;quot;&amp;gt;en-GB/en-GB.com_helloworld.ini&amp;lt;/language&amp;gt;&lt;br /&gt;
                        &amp;lt;language tag=&amp;quot;en-GB&amp;quot;&amp;gt;en-GB/en-GB.com_helloworld.sys.ini&amp;lt;/language&amp;gt;&lt;br /&gt;
		&amp;lt;/languages&amp;gt;&lt;br /&gt;
	&amp;lt;/administration&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/extension&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;translate&amp;gt;&lt;br /&gt;
== Contributors == &amp;lt;!--T:58--&amp;gt;&lt;br /&gt;
&amp;lt;/translate&amp;gt;&lt;br /&gt;
*[[User:Robbiej|Robbie Jackson]]&lt;br /&gt;
&lt;br /&gt;
{{-}}&lt;br /&gt;
&amp;lt;div class=&amp;quot;row&amp;quot;&amp;gt; &lt;br /&gt;
&amp;lt;div class=&amp;quot;large-6 columns&amp;quot;&amp;gt;{{Basic button|&amp;lt;translate&amp;gt;&amp;lt;!--T:4--&amp;gt; S:MyLanguage/J3.x:Developing_an_MVC_Component/Adding_an_install-uninstall-update_script_file|Prev: Adding an install-uninstall-update script file&amp;lt;/translate&amp;gt;|class=expand success}}&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;div class=&amp;quot;large-6 columns&amp;quot;&amp;gt;{{Basic button|&amp;lt;translate&amp;gt;&amp;lt;!--T:5--&amp;gt; S:MyLanguage/J3.x:Developing_an_MVC_Component/Adding an Image|Next: Adding an image&amp;lt;/translate&amp;gt;|class=expand}}&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;noinclude&amp;gt;&lt;br /&gt;
[[Category:Joomla! 3.x{{#translation:}}]]&lt;br /&gt;
[[Category:Joomla! 3.0{{#translation:}}]]&lt;br /&gt;
[[Category:Joomla! 3.1{{#translation:}}]]&lt;br /&gt;
[[Category:Joomla! 3.2{{#translation:}}]]&lt;br /&gt;
[[Category:Joomla! 3.3{{#translation:}}]]&lt;br /&gt;
[[Category:Joomla! 3.4{{#translation:}}]]&lt;br /&gt;
[[Category:Beginner Development{{#translation:}}]]&lt;br /&gt;
[[Category:Component Development{{#translation:}}]]&lt;br /&gt;
[[Category:Tutorials{{#translation:}}]]&lt;br /&gt;
[[Category:Tutorials in a Series{{#translation:}}]]&lt;br /&gt;
&amp;lt;/noinclude&amp;gt;&lt;/div&gt;</summary>
		<author><name>Stan31337</name></author>
	</entry>
	<entry>
		<id>https://docs.sandbox.joomla.org/index.php?title=J3.x:Developing_an_MVC_Component/Adding_a_front-end_form&amp;diff=589118</id>
		<title>J3.x:Developing an MVC Component/Adding a front-end form</title>
		<link rel="alternate" type="text/html" href="https://docs.sandbox.joomla.org/index.php?title=J3.x:Developing_an_MVC_Component/Adding_a_front-end_form&amp;diff=589118"/>
		<updated>2019-01-30T07:20:06Z</updated>

		<summary type="html">&lt;p&gt;Stan31337: JText in site/controllers/helloworld.php didn&amp;#039;t have quotes&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;noinclude&amp;gt;&amp;lt;languages /&amp;gt;&amp;lt;/noinclude&amp;gt;&lt;br /&gt;
{{:J3.1:Developing an MVC Component/&amp;lt;translate&amp;gt;&amp;lt;!--T:1--&amp;gt;&lt;br /&gt;
en&amp;lt;/translate&amp;gt;}}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;translate&amp;gt;&amp;lt;!--T:3--&amp;gt; This tutorial is part of the [[S:MyLanguage/J3.x:Developing_an_MVC_Component/Introduction|Developing a MVC Component for Joomla! 3.x]] tutorial. You are encouraged to read the previous parts of the tutorial before reading this.&amp;lt;/translate&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;translate&amp;gt;&lt;br /&gt;
== Introduction == &amp;lt;!--T:6--&amp;gt;&lt;br /&gt;
&amp;lt;/translate&amp;gt;&lt;br /&gt;
&amp;lt;translate&amp;gt;&amp;lt;!--T:7--&amp;gt; In this step we add a form to the site front end to allow users to add a new Helloworld record. You could adapt the code in this step to provide a range of front-end data entry functionality, from, eg&amp;lt;/translate&amp;gt;&lt;br /&gt;
* &amp;lt;translate&amp;gt;&amp;lt;!--T:8--&amp;gt; a registration form to allow visitors to the site to express interest, to,&amp;lt;/translate&amp;gt; &lt;br /&gt;
* &amp;lt;translate&amp;gt;&amp;lt;!--T:9--&amp;gt; a facility to allow suppliers to maintain the data in certain tables, but without giving them access to the back end administration functionality&amp;lt;/translate&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;translate&amp;gt;&amp;lt;!--T:63--&amp;gt; There are two videos associated with this step, covering the [https://youtu.be/2NStYpB5JQM overall approach] and [https://youtu.be/t3IxuWQfa6E other topics] raised here.&amp;lt;/translate&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*&amp;lt;translate&amp;gt;&amp;lt;!--T:60--&amp;gt; Overall approach&amp;lt;/translate&amp;gt;&lt;br /&gt;
{{#widget:YouTube|id=2NStYpB5JQM}}&lt;br /&gt;
*&amp;lt;translate&amp;gt;&amp;lt;!--T:61--&amp;gt; Other topics&amp;lt;/translate&amp;gt;&lt;br /&gt;
{{#widget:YouTube|id=t3IxuWQfa6E}}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;translate&amp;gt;&lt;br /&gt;
== Functionality == &amp;lt;!--T:10--&amp;gt;&lt;br /&gt;
&amp;lt;/translate&amp;gt;&lt;br /&gt;
&amp;lt;translate&amp;gt;&amp;lt;!--T:11--&amp;gt; In this step we will build the following functionality:&amp;lt;/translate&amp;gt;&lt;br /&gt;
* &amp;lt;translate&amp;gt;&amp;lt;!--T:12--&amp;gt; a front-end form that allows someone to enter a new helloworld record, together with Save and Cancel buttons.&amp;lt;/translate&amp;gt;&lt;br /&gt;
* &amp;lt;translate&amp;gt;&amp;lt;!--T:13--&amp;gt; additional fields in the helloworld database table to capture the user who entered the record, and the creation date/time&amp;lt;/translate&amp;gt;&lt;br /&gt;
* &amp;lt;translate&amp;gt;&amp;lt;!--T:14--&amp;gt; validation of the data entered into the fields, including removing dangerous items such as html tags&amp;lt;/translate&amp;gt;&lt;br /&gt;
* &amp;lt;translate&amp;gt;&amp;lt;!--T:15--&amp;gt; access control on the form, controlling who can add a new record&amp;lt;/translate&amp;gt;&lt;br /&gt;
* &amp;lt;translate&amp;gt;&amp;lt;!--T:16--&amp;gt; an email to an administrator, to indicate that someone has entered a new record (and we&#039;ll include a field on the form where the user can include some text which just goes into the email)&amp;lt;/translate&amp;gt;&lt;br /&gt;
* &amp;lt;translate&amp;gt;&amp;lt;!--T:17--&amp;gt; a captcha on the form&amp;lt;/translate&amp;gt;&lt;br /&gt;
* &amp;lt;translate&amp;gt;&amp;lt;!--T:18--&amp;gt; a front-end menu item which points to the form (ie how users get access to the form)&amp;lt;/translate&amp;gt;&lt;br /&gt;
* &amp;lt;translate&amp;gt;&amp;lt;!--T:19--&amp;gt; update to the admin helloworlds view to include the author and creation date in the display.&amp;lt;/translate&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;translate&amp;gt;&lt;br /&gt;
== Approach == &amp;lt;!--T:20--&amp;gt;&lt;br /&gt;
&amp;lt;/translate&amp;gt;&lt;br /&gt;
&amp;lt;translate&amp;gt;&amp;lt;!--T:21--&amp;gt; Providing a form on the site front end is pretty much the same as on the admin back end, so much of what is developed in this step reflects what was done in the step [[S:MyLanguage/J3.x:Developing an MVC Component/Adding backend actions|Adding backend actions]], and in particular the Edit form for helloworld messages.&amp;lt;/translate&amp;gt; &lt;br /&gt;
&amp;lt;translate&amp;gt;&lt;br /&gt;
&amp;lt;!--T:22--&amp;gt;&lt;br /&gt;
For this form we&#039;ll use (all in the site part)&lt;br /&gt;
* the same main helloworld controller (controller.php)&lt;br /&gt;
* a new view – which we&#039;ll call &amp;quot;form&amp;quot;&lt;br /&gt;
* a new layout, associated with the form view, which we&#039;ll call &amp;quot;edit&amp;quot; (like the admin layout file)&lt;br /&gt;
* a new model – which we&#039;ll call &amp;quot;form&amp;quot; also, to align with the view&lt;br /&gt;
* an xml file for the form, which we&#039;ll put in add-form.xml in the model&amp;lt;/translate&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;translate&amp;gt;&amp;lt;!--T:23--&amp;gt; In addition we&#039;ll need to handle the HTTP POST requests arising from the user pressing the Save and Cancel buttons, and we&#039;ll do this in:&amp;lt;/translate&amp;gt;&lt;br /&gt;
&amp;lt;translate&amp;gt;&amp;lt;!--T:24--&amp;gt;&lt;br /&gt;
* a new helloworld controller in the controllers directory (handling Save and Cancel)&lt;br /&gt;
* the same form.php model as above (handling Save)&amp;lt;/translate&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;translate&amp;gt;&amp;lt;!--T:25--&amp;gt; Upon completion of Save/Cancel we&#039;ll redirect back to the same form.&amp;lt;/translate&amp;gt;&lt;br /&gt;
&amp;lt;translate&amp;gt;&lt;br /&gt;
&amp;lt;!--T:26--&amp;gt;&lt;br /&gt;
As for the admin case, we&#039;ll consider our classes extending some of the controller and model classes which are richer in functionality that the simple legacy ones&amp;lt;/translate&amp;gt;&lt;br /&gt;
&amp;lt;translate&amp;gt;&amp;lt;!--T:27--&amp;gt;&lt;br /&gt;
* the model will extend JModelAdmin (which supports forms, as well as saving records to the database) - even though it&#039;s called JModelAdmin it&#039;s still available within the site part&lt;br /&gt;
* the controller handling the POST will extend JControllerForm (which includes the cancel() and save() methods).&amp;lt;/translate&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;translate&amp;gt;&amp;lt;!--T:28--&amp;gt; Some of the other aspects in this step will involve using the techniques covered in earlier steps, namely [[S:MyLanguage/J3.x:Developing an MVC Component/Adding a menu type to the site part|Adding a menu type to the site part]], [[S:MyLanguage/J3.x:Developing an MVC Component/Adding verifications|Adding verifications]], [[S:MyLanguage/J3.x:Developing an MVC Component/Adding configuration|Adding configuration]] and [[S:MyLanguage/J3.x:Developing an MVC Component/Adding ACL|Adding ACL]].&amp;lt;/translate&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;translate&amp;gt;&lt;br /&gt;
==Updating the Database== &amp;lt;!--T:29--&amp;gt;&lt;br /&gt;
&amp;lt;/translate&amp;gt;&lt;br /&gt;
&amp;lt;translate&amp;gt;&amp;lt;!--T:30--&amp;gt; We need to add the two new fields to our install and update scripts. To record who added the new helloworld greeting we&#039;ll store the user&#039;s userid, and this will be zero if the user is not logged on.&amp;lt;/translate&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;span id=&amp;quot;admin/sql/install.mysql.utf8.sql&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;tt&amp;gt;admin/sql/install.mysql.utf8.sql&amp;lt;/tt&amp;gt;&lt;br /&gt;
&amp;lt;source lang=&amp;quot;sql&amp;quot; highlight=&amp;quot;6,7&amp;quot;&amp;gt;&lt;br /&gt;
DROP TABLE IF EXISTS `#__helloworld`;&lt;br /&gt;
&lt;br /&gt;
CREATE TABLE `#__helloworld` (&lt;br /&gt;
	`id`       INT(11)     NOT NULL AUTO_INCREMENT,&lt;br /&gt;
	`asset_id` INT(10)     NOT NULL DEFAULT &#039;0&#039;,&lt;br /&gt;
	`created`  DATETIME    NOT NULL DEFAULT &#039;0000-00-00 00:00:00&#039;,&lt;br /&gt;
	`created_by`  INT(10) UNSIGNED NOT NULL DEFAULT &#039;0&#039;,&lt;br /&gt;
	`greeting` VARCHAR(25) NOT NULL,&lt;br /&gt;
	`published` tinyint(4) NOT NULL DEFAULT &#039;1&#039;,&lt;br /&gt;
	`catid`	    int(11)    NOT NULL DEFAULT &#039;0&#039;,&lt;br /&gt;
	`params`   VARCHAR(1024) NOT NULL DEFAULT &#039;&#039;,&lt;br /&gt;
	PRIMARY KEY (`id`)&lt;br /&gt;
)&lt;br /&gt;
	ENGINE =MyISAM&lt;br /&gt;
	AUTO_INCREMENT =0&lt;br /&gt;
	DEFAULT CHARSET =utf8;&lt;br /&gt;
&lt;br /&gt;
INSERT INTO `#__helloworld` (`greeting`) VALUES&lt;br /&gt;
(&#039;Hello World!&#039;),&lt;br /&gt;
(&#039;Goodbye World!&#039;);&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span id=&amp;quot;admin/sql/updates/mysql/0.0.16.sql&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;tt&amp;gt;/admin/sql/updates/mysql/0.0.16.sql&amp;lt;/tt&amp;gt;&lt;br /&gt;
&amp;lt;source lang=&amp;quot;sql&amp;quot;&amp;gt;&lt;br /&gt;
ALTER TABLE`#__helloworld` ADD COLUMN `created` DATETIME NOT NULL DEFAULT &#039;0000-00-00 00:00:00&#039; AFTER `asset_id`;&lt;br /&gt;
ALTER TABLE`#__helloworld` ADD COLUMN `created_by` INT(10) UNSIGNED NOT NULL DEFAULT &#039;0&#039; AFTER `created`;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;translate&amp;gt;&lt;br /&gt;
==Adding a menu item== &amp;lt;!--T:31--&amp;gt;&lt;br /&gt;
&amp;lt;/translate&amp;gt;&lt;br /&gt;
&amp;lt;translate&amp;gt;&amp;lt;!--T:32--&amp;gt; To enable a menu item to point to the form, we need to put an xml file into the associated layout directory. Extend your directory structure (remembering to include the index.html file in each new subdirectory which you create) and put the following into&amp;lt;/translate&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span id=&amp;quot;site/views/form/tmpl/edit.xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;tt&amp;gt;site/views/form/tmpl/edit.xml&amp;lt;/tt&amp;gt;&lt;br /&gt;
&amp;lt;source lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;?xml version=&amp;quot;1.0&amp;quot; encoding=&amp;quot;utf-8&amp;quot;?&amp;gt;&lt;br /&gt;
&amp;lt;metadata&amp;gt;&lt;br /&gt;
	&amp;lt;layout title=&amp;quot;COM_HELLOWORLD_ADD_VIEW_TITLE&amp;quot;&amp;gt;&lt;br /&gt;
		&amp;lt;message&amp;gt;COM_HELLOWORLD_ADD_VIEW_DESC&amp;lt;/message&amp;gt;&lt;br /&gt;
	&amp;lt;/layout&amp;gt;&lt;br /&gt;
&amp;lt;/metadata&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&amp;lt;/span&amp;gt;&lt;br /&gt;
&amp;lt;translate&amp;gt;&amp;lt;!--T:33--&amp;gt; Once you have the new code installed you&#039;ll have to go into the admin back-end and create a menu item to point to the new front-end form.&amp;lt;/translate&amp;gt;&lt;br /&gt;
&amp;lt;translate&amp;gt;&lt;br /&gt;
==Displaying the new form view== &amp;lt;!--T:34--&amp;gt;&lt;br /&gt;
&amp;lt;/translate&amp;gt;&lt;br /&gt;
&amp;lt;translate&amp;gt;&amp;lt;!--T:35--&amp;gt; Create a new forms subdirectory under the site models directory, and add the definition of the form into&amp;lt;/translate&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span id=&amp;quot;site/models/forms/add-form.xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;tt&amp;gt;site/models/forms/add-form.xml&amp;lt;/tt&amp;gt;&lt;br /&gt;
&amp;lt;source lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;?xml version=&amp;quot;1.0&amp;quot; encoding=&amp;quot;utf-8&amp;quot;?&amp;gt;&lt;br /&gt;
&amp;lt;form&lt;br /&gt;
    addrulepath=&amp;quot;/administrator/components/com_helloworld/models/rules&amp;quot;&lt;br /&gt;
    &amp;gt;&lt;br /&gt;
    &amp;lt;fieldset&lt;br /&gt;
				name=&amp;quot;details&amp;quot;&lt;br /&gt;
				label=&amp;quot;COM_HELLOWORLD_HELLOWORLD_DETAILS&amp;quot;&lt;br /&gt;
	&amp;gt;&lt;br /&gt;
		&amp;lt;field&lt;br /&gt;
				name=&amp;quot;id&amp;quot;&lt;br /&gt;
				type=&amp;quot;hidden&amp;quot;&lt;br /&gt;
				/&amp;gt;&lt;br /&gt;
		&amp;lt;field&lt;br /&gt;
				name=&amp;quot;greeting&amp;quot;&lt;br /&gt;
				type=&amp;quot;text&amp;quot;&lt;br /&gt;
				label=&amp;quot;COM_HELLOWORLD_HELLOWORLD_GREETING_LABEL&amp;quot;&lt;br /&gt;
				description=&amp;quot;COM_HELLOWORLD_HELLOWORLD_GREETING_DESC&amp;quot;&lt;br /&gt;
				size=&amp;quot;40&amp;quot;&lt;br /&gt;
				class=&amp;quot;inputbox&amp;quot;&lt;br /&gt;
				validate=&amp;quot;greeting&amp;quot;&lt;br /&gt;
				required=&amp;quot;true&amp;quot;&lt;br /&gt;
                hint=&amp;quot;COM_HELLOWORLD_HELLOWORLD_GREETING_HINT&amp;quot;&lt;br /&gt;
				default=&amp;quot;&amp;quot;&lt;br /&gt;
				/&amp;gt;&lt;br /&gt;
        &amp;lt;field&lt;br /&gt;
				name=&amp;quot;catid&amp;quot;&lt;br /&gt;
				type=&amp;quot;category&amp;quot;&lt;br /&gt;
				extension=&amp;quot;com_helloworld&amp;quot;&lt;br /&gt;
				class=&amp;quot;inputbox&amp;quot;&lt;br /&gt;
				default=&amp;quot;&amp;quot;&lt;br /&gt;
				label=&amp;quot;COM_HELLOWORLD_HELLOWORLD_FIELD_CATID_LABEL&amp;quot;&lt;br /&gt;
				description=&amp;quot;COM_HELLOWORLD_HELLOWORLD_FIELD_CATID_DESC&amp;quot;&lt;br /&gt;
				required=&amp;quot;true&amp;quot;&lt;br /&gt;
                &amp;gt;&lt;br /&gt;
			&amp;lt;option value=&amp;quot;0&amp;quot;&amp;gt;JOPTION_SELECT_CATEGORY&amp;lt;/option&amp;gt;&lt;br /&gt;
		&amp;lt;/field&amp;gt;&lt;br /&gt;
        &amp;lt;field&lt;br /&gt;
                name=&amp;quot;message&amp;quot;&lt;br /&gt;
                type=&amp;quot;textarea&amp;quot;&lt;br /&gt;
                rows=&amp;quot;5&amp;quot;&lt;br /&gt;
                cols=&amp;quot;80&amp;quot;&lt;br /&gt;
				label=&amp;quot;COM_HELLOWORLD_HELLOWORLD_MESSAGE_LABEL&amp;quot;&lt;br /&gt;
				description=&amp;quot;COM_HELLOWORLD_HELLOWORLD_MESSAGE_DESC&amp;quot;&lt;br /&gt;
                hint=&amp;quot;COM_HELLOWORLD_HELLOWORLD_MESSAGE_HINT&amp;quot;&lt;br /&gt;
				required=&amp;quot;true&amp;quot;&lt;br /&gt;
                &amp;gt;&lt;br /&gt;
        &amp;lt;/field&amp;gt;&lt;br /&gt;
        &amp;lt;field&lt;br /&gt;
				name=&amp;quot;captcha&amp;quot;&lt;br /&gt;
				type=&amp;quot;captcha&amp;quot;&lt;br /&gt;
				label=&amp;quot;COM_HELLOWORLD_HELLOWORLD_FIELD_CAPTCHA_LABEL&amp;quot;&lt;br /&gt;
				description=&amp;quot;COM_HELLOWORLD_HELLOWORLD_FIELD_CAPTCHA_DESC&amp;quot;&lt;br /&gt;
                validate=&amp;quot;captcha&amp;quot;&lt;br /&gt;
                &amp;gt;&lt;br /&gt;
		&amp;lt;/field&amp;gt;&lt;br /&gt;
        &amp;lt;fields name=&amp;quot;params&amp;quot;&amp;gt;&lt;br /&gt;
            &amp;lt;field&lt;br /&gt;
                    name=&amp;quot;show_category&amp;quot;&lt;br /&gt;
                    type=&amp;quot;list&amp;quot;&lt;br /&gt;
                    label=&amp;quot;COM_HELLOWORLD_HELLOWORLD_FIELD_SHOW_CATEGORY_LABEL&amp;quot;&lt;br /&gt;
                    description=&amp;quot;COM_HELLOWORLD_HELLOWORLD_FIELD_SHOW_CATEGORY_DESC&amp;quot;&lt;br /&gt;
                    default=&amp;quot;&amp;quot;&lt;br /&gt;
                    useglobal=&amp;quot;true&amp;quot;&lt;br /&gt;
            &amp;gt;&lt;br /&gt;
                &amp;lt;option value=&amp;quot;0&amp;quot;&amp;gt;JHIDE&amp;lt;/option&amp;gt;&lt;br /&gt;
                &amp;lt;option value=&amp;quot;1&amp;quot;&amp;gt;JSHOW&amp;lt;/option&amp;gt;&lt;br /&gt;
            &amp;lt;/field&amp;gt;&lt;br /&gt;
        &amp;lt;/fields&amp;gt;&lt;br /&gt;
    &amp;lt;/fieldset&amp;gt;&lt;br /&gt;
&amp;lt;/form&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;translate&amp;gt;&amp;lt;!--T:36--&amp;gt; The above form includes a captcha. To get this working you need to install a captcha plugin from the selection available for Joomla. You can also use the Captcha - ReCaptcha plugin which comes with Joomla, but before using this you have to get recaptcha keys for your domain (eg localhost) from Google, and then configure the plugin with the keys which Google supplies (ie Extensions / Plugins, and then click on the plugin to edit its options - if you edit the plugin it tells you exactly what you have to do). Once the plugins are live, you can select in the Global Configuration the captcha which you want to be the system default, and also in the Helloworld Configuration select which captcha to use for this helloworld form.&amp;lt;/translate&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;translate&amp;gt;&amp;lt;!--T:37--&amp;gt; The existing controller (in controller.php) will not need to be changed, but we&#039;ll need to define a new view, layout and model for the new form.&amp;lt;/translate&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;span id=&amp;quot;site/views/form/view.html.php&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;tt&amp;gt;site/views/form/view.html.php&amp;lt;/tt&amp;gt;&lt;br /&gt;
&amp;lt;source lang=&amp;quot;php&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;?php&lt;br /&gt;
/**&lt;br /&gt;
 * @package     Joomla.Administrator&lt;br /&gt;
 * @subpackage  com_helloworld&lt;br /&gt;
 *&lt;br /&gt;
 * @copyright   Copyright (C) 2005 - 2018 Open Source Matters, Inc. All rights reserved.&lt;br /&gt;
 * @license     GNU General Public License version 2 or later; see LICENSE.txt&lt;br /&gt;
 */&lt;br /&gt;
&lt;br /&gt;
// No direct access to this file&lt;br /&gt;
defined(&#039;_JEXEC&#039;) or die(&#039;Restricted access&#039;);&lt;br /&gt;
&lt;br /&gt;
/**&lt;br /&gt;
 * HelloWorld View&lt;br /&gt;
 * This is the site view presenting the user with the ability to add a new Helloworld record&lt;br /&gt;
 * &lt;br /&gt;
 */&lt;br /&gt;
class HelloWorldViewForm extends JViewLegacy&lt;br /&gt;
{&lt;br /&gt;
&lt;br /&gt;
	protected $form = null;&lt;br /&gt;
	protected $canDo;&lt;br /&gt;
&lt;br /&gt;
	/**&lt;br /&gt;
	 * Display the Hello World view&lt;br /&gt;
	 *&lt;br /&gt;
	 * @param   string  $tpl  The name of the layout file to parse.&lt;br /&gt;
	 *&lt;br /&gt;
	 * @return  void&lt;br /&gt;
	 */&lt;br /&gt;
	public function display($tpl = null)&lt;br /&gt;
	{&lt;br /&gt;
		// Get the form to display&lt;br /&gt;
		$this-&amp;gt;form = $this-&amp;gt;get(&#039;Form&#039;);&lt;br /&gt;
		// Get the javascript script file for client-side validation&lt;br /&gt;
		$this-&amp;gt;script = $this-&amp;gt;get(&#039;Script&#039;); &lt;br /&gt;
&lt;br /&gt;
		// Check that the user has permissions to create a new helloworld record&lt;br /&gt;
		$this-&amp;gt;canDo = JHelperContent::getActions(&#039;com_helloworld&#039;);&lt;br /&gt;
		if (!($this-&amp;gt;canDo-&amp;gt;get(&#039;core.create&#039;))) &lt;br /&gt;
		{&lt;br /&gt;
			$app = JFactory::getApplication(); &lt;br /&gt;
			$app-&amp;gt;enqueueMessage(JText::_(&#039;JERROR_ALERTNOAUTHOR&#039;), &#039;error&#039;);&lt;br /&gt;
			$app-&amp;gt;setHeader(&#039;status&#039;, 403, true);&lt;br /&gt;
			return;&lt;br /&gt;
		}&lt;br /&gt;
        &lt;br /&gt;
		// Check for errors.&lt;br /&gt;
		if (count($errors = $this-&amp;gt;get(&#039;Errors&#039;)))&lt;br /&gt;
		{&lt;br /&gt;
			throw new Exception(implode(&amp;quot;\n&amp;quot;, $errors), 500);&lt;br /&gt;
		}&lt;br /&gt;
&lt;br /&gt;
		// Call the parent display to display the layout file&lt;br /&gt;
		parent::display($tpl);&lt;br /&gt;
&lt;br /&gt;
		// Set properties of the html document&lt;br /&gt;
		$this-&amp;gt;setDocument();&lt;br /&gt;
	}&lt;br /&gt;
&lt;br /&gt;
	/**&lt;br /&gt;
	 * Method to set up the html document properties&lt;br /&gt;
	 *&lt;br /&gt;
	 * @return void&lt;br /&gt;
	 */&lt;br /&gt;
	protected function setDocument() &lt;br /&gt;
	{&lt;br /&gt;
		$document = JFactory::getDocument();&lt;br /&gt;
		$document-&amp;gt;setTitle(JText::_(&#039;COM_HELLOWORLD_HELLOWORLD_CREATING&#039;));&lt;br /&gt;
		$document-&amp;gt;addScript(JURI::root() . $this-&amp;gt;script);&lt;br /&gt;
		$document-&amp;gt;addScript(JURI::root() . &amp;quot;/administrator/components/com_helloworld&amp;quot;&lt;br /&gt;
		                                  . &amp;quot;/views/helloworld/submitbutton.js&amp;quot;);&lt;br /&gt;
		JText::script(&#039;COM_HELLOWORLD_HELLOWORLD_ERROR_UNACCEPTABLE&#039;);&lt;br /&gt;
	}&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&amp;lt;/span&amp;gt;&lt;br /&gt;
&amp;lt;translate&amp;gt;&lt;br /&gt;
&amp;lt;!--T:38--&amp;gt;&lt;br /&gt;
And into the layout file:&amp;lt;/translate&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span id=&amp;quot;site/views/form/tmpl/edit.php&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;tt&amp;gt;site/views/form/tmpl/edit.php&amp;lt;/tt&amp;gt;&lt;br /&gt;
&amp;lt;source lang=&amp;quot;php&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;?php&lt;br /&gt;
/**&lt;br /&gt;
 * @package     Joomla.Administrator&lt;br /&gt;
 * @subpackage  com_helloworld&lt;br /&gt;
 *&lt;br /&gt;
 * @copyright   Copyright (C) 2005 - 2018 Open Source Matters, Inc. All rights reserved.&lt;br /&gt;
 * @license     GNU General Public License version 2 or later; see LICENSE.txt&lt;br /&gt;
 *&lt;br /&gt;
 * This layout file is for displaying the front end form for capturing a new helloworld message&lt;br /&gt;
 *&lt;br /&gt;
 */&lt;br /&gt;
&lt;br /&gt;
// No direct access&lt;br /&gt;
defined(&#039;_JEXEC&#039;) or die(&#039;Restricted access&#039;);&lt;br /&gt;
JHtml::_(&#039;behavior.formvalidator&#039;);&lt;br /&gt;
&lt;br /&gt;
?&amp;gt;&lt;br /&gt;
&amp;lt;form action=&amp;quot;&amp;lt;?php echo JRoute::_(&#039;index.php?option=com_helloworld&amp;amp;view=form&amp;amp;layout=edit&#039;); ?&amp;gt;&amp;quot;&lt;br /&gt;
    method=&amp;quot;post&amp;quot; name=&amp;quot;adminForm&amp;quot; id=&amp;quot;adminForm&amp;quot; class=&amp;quot;form-validate&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
	&amp;lt;div class=&amp;quot;form-horizontal&amp;quot;&amp;gt;&lt;br /&gt;
		&amp;lt;fieldset class=&amp;quot;adminform&amp;quot;&amp;gt;&lt;br /&gt;
			&amp;lt;legend&amp;gt;&amp;lt;?php echo JText::_(&#039;COM_HELLOWORLD_LEGEND_DETAILS&#039;) ?&amp;gt;&amp;lt;/legend&amp;gt;&lt;br /&gt;
			&amp;lt;div class=&amp;quot;row-fluid&amp;quot;&amp;gt;&lt;br /&gt;
				&amp;lt;div class=&amp;quot;span6&amp;quot;&amp;gt;&lt;br /&gt;
					&amp;lt;?php echo $this-&amp;gt;form-&amp;gt;renderFieldset(&#039;details&#039;);  ?&amp;gt;&lt;br /&gt;
				&amp;lt;/div&amp;gt;&lt;br /&gt;
			&amp;lt;/div&amp;gt;&lt;br /&gt;
		&amp;lt;/fieldset&amp;gt;&lt;br /&gt;
	&amp;lt;/div&amp;gt;&lt;br /&gt;
    &lt;br /&gt;
	&amp;lt;div class=&amp;quot;btn-toolbar&amp;quot;&amp;gt;&lt;br /&gt;
		&amp;lt;div class=&amp;quot;btn-group&amp;quot;&amp;gt;&lt;br /&gt;
			&amp;lt;button type=&amp;quot;button&amp;quot; class=&amp;quot;btn btn-primary&amp;quot; onclick=&amp;quot;Joomla.submitbutton(&#039;helloworld.save&#039;)&amp;quot;&amp;gt;&lt;br /&gt;
				&amp;lt;span class=&amp;quot;icon-ok&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;&amp;lt;?php echo JText::_(&#039;JSAVE&#039;) ?&amp;gt;&lt;br /&gt;
			&amp;lt;/button&amp;gt;&lt;br /&gt;
		&amp;lt;/div&amp;gt;&lt;br /&gt;
		&amp;lt;div class=&amp;quot;btn-group&amp;quot;&amp;gt;&lt;br /&gt;
			&amp;lt;button type=&amp;quot;button&amp;quot; class=&amp;quot;btn&amp;quot; onclick=&amp;quot;Joomla.submitbutton(&#039;helloworld.cancel&#039;)&amp;quot;&amp;gt;&lt;br /&gt;
				&amp;lt;span class=&amp;quot;icon-cancel&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;&amp;lt;?php echo JText::_(&#039;JCANCEL&#039;) ?&amp;gt;&lt;br /&gt;
			&amp;lt;/button&amp;gt;&lt;br /&gt;
		&amp;lt;/div&amp;gt;&lt;br /&gt;
	&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
	&amp;lt;input type=&amp;quot;hidden&amp;quot; name=&amp;quot;task&amp;quot; /&amp;gt;&lt;br /&gt;
	&amp;lt;?php echo JHtml::_(&#039;form.token&#039;); ?&amp;gt;&lt;br /&gt;
&amp;lt;/form&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;translate&amp;gt;&amp;lt;!--T:39--&amp;gt; All the above is similar to the admin functionality, except there are certain fields we don&#039;t want to allow the front-end user to see (eg the permissions) and instead of the standard Joomla admin buttons (and toolbar) we use a Save button and a Cancel button styled using the Bootstrap CSS, and which result in the &amp;lt;tt&amp;gt;task&amp;lt;/tt&amp;gt; parameter being set to &amp;lt;tt&amp;gt;helloworld.save&amp;lt;/tt&amp;gt; or &amp;lt;tt&amp;gt;helloworld.cancel&amp;lt;/tt&amp;gt;.&amp;lt;/translate&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;translate&amp;gt;&amp;lt;!--T:40--&amp;gt; Our new model is almost exactly the same as the admin equivalent; we just have to point to our new add-form instead.&amp;lt;/translate&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span id=&amp;quot;site/models/form.php&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;tt&amp;gt;site/models/form.php&amp;lt;/tt&amp;gt;&lt;br /&gt;
&amp;lt;source lang=&amp;quot;php&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;?php&lt;br /&gt;
/**&lt;br /&gt;
 * @package     Joomla.Administrator&lt;br /&gt;
 * @subpackage  com_helloworld&lt;br /&gt;
 *&lt;br /&gt;
 * @copyright   Copyright (C) 2005 - 2018 Open Source Matters, Inc. All rights reserved.&lt;br /&gt;
 * @license     GNU General Public License version 2 or later; see LICENSE.txt&lt;br /&gt;
 */&lt;br /&gt;
&lt;br /&gt;
// No direct access to this file&lt;br /&gt;
defined(&#039;_JEXEC&#039;) or die(&#039;Restricted access&#039;);&lt;br /&gt;
&lt;br /&gt;
/**&lt;br /&gt;
 * HelloWorld Model&lt;br /&gt;
 *&lt;br /&gt;
 * @since  0.0.1&lt;br /&gt;
 */&lt;br /&gt;
class HelloWorldModelForm extends JModelAdmin&lt;br /&gt;
{&lt;br /&gt;
&lt;br /&gt;
	/**&lt;br /&gt;
	 * Method to get a table object, load it if necessary.&lt;br /&gt;
	 *&lt;br /&gt;
	 * @param   string  $type    The table name. Optional.&lt;br /&gt;
	 * @param   string  $prefix  The class prefix. Optional.&lt;br /&gt;
	 * @param   array   $config  Configuration array for model. Optional.&lt;br /&gt;
	 *&lt;br /&gt;
	 * @return  JTable  A JTable object&lt;br /&gt;
	 *&lt;br /&gt;
	 * @since   1.6&lt;br /&gt;
	 */&lt;br /&gt;
	public function getTable($type = &#039;HelloWorld&#039;, $prefix = &#039;HelloWorldTable&#039;, $config = array())&lt;br /&gt;
	{&lt;br /&gt;
		return JTable::getInstance($type, $prefix, $config);&lt;br /&gt;
	}&lt;br /&gt;
&lt;br /&gt;
    /**&lt;br /&gt;
	 * Method to get the record form.&lt;br /&gt;
	 *&lt;br /&gt;
	 * @param   array    $data      Data for the form.&lt;br /&gt;
	 * @param   boolean  $loadData  True if the form is to load its own data (default case), false if not.&lt;br /&gt;
	 *&lt;br /&gt;
	 * @return  mixed    A JForm object on success, false on failure&lt;br /&gt;
	 *&lt;br /&gt;
	 * @since   1.6&lt;br /&gt;
	 */&lt;br /&gt;
	public function getForm($data = array(), $loadData = true)&lt;br /&gt;
	{&lt;br /&gt;
		// Get the form.&lt;br /&gt;
		$form = $this-&amp;gt;loadForm(&lt;br /&gt;
			&#039;com_helloworld.form&#039;,&lt;br /&gt;
			&#039;add-form&#039;,&lt;br /&gt;
			array(&lt;br /&gt;
				&#039;control&#039; =&amp;gt; &#039;jform&#039;,&lt;br /&gt;
				&#039;load_data&#039; =&amp;gt; $loadData&lt;br /&gt;
			)&lt;br /&gt;
		);&lt;br /&gt;
&lt;br /&gt;
		if (empty($form))&lt;br /&gt;
		{&lt;br /&gt;
			$errors = $this-&amp;gt;getErrors();&lt;br /&gt;
			throw new Exception(implode(&amp;quot;\n&amp;quot;, $errors), 500);&lt;br /&gt;
		}&lt;br /&gt;
&lt;br /&gt;
		return $form;&lt;br /&gt;
	}&lt;br /&gt;
&lt;br /&gt;
	/**&lt;br /&gt;
	 * Method to get the data that should be injected in the form.&lt;br /&gt;
	 * As this form is for add, we&#039;re not prefilling the form with an existing record&lt;br /&gt;
	 * But if the user has previously hit submit and the validation has found an error,&lt;br /&gt;
	 *   then we inject what was previously entered.&lt;br /&gt;
	 *&lt;br /&gt;
	 * @return  mixed  The data for the form.&lt;br /&gt;
	 *&lt;br /&gt;
	 * @since   1.6&lt;br /&gt;
	 */&lt;br /&gt;
	protected function loadFormData()&lt;br /&gt;
	{&lt;br /&gt;
		// Check the session for previously entered form data.&lt;br /&gt;
		$data = JFactory::getApplication()-&amp;gt;getUserState(&lt;br /&gt;
			&#039;com_helloworld.edit.helloworld.data&#039;,&lt;br /&gt;
			array()&lt;br /&gt;
		);&lt;br /&gt;
&lt;br /&gt;
		return $data;&lt;br /&gt;
	}&lt;br /&gt;
    &lt;br /&gt;
	/**&lt;br /&gt;
	 * Method to get the script that have to be included on the form&lt;br /&gt;
	 * This returns the script associated with helloworld field greeting validation&lt;br /&gt;
	 *&lt;br /&gt;
	 * @return string	Script files&lt;br /&gt;
	 */&lt;br /&gt;
	public function getScript() &lt;br /&gt;
	{&lt;br /&gt;
		return &#039;administrator/components/com_helloworld/models/forms/helloworld.js&#039;;&lt;br /&gt;
	}&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&amp;lt;/span&amp;gt;&lt;br /&gt;
&amp;lt;translate&amp;gt;&lt;br /&gt;
==Handling the form HTTP POST== &amp;lt;!--T:41--&amp;gt;&lt;br /&gt;
&amp;lt;/translate&amp;gt;&lt;br /&gt;
&amp;lt;translate&amp;gt;&amp;lt;!--T:42--&amp;gt; As in the admin case, we&#039;ll need to create a new controller in the /controllers subdirectory with save() and cancel() methods, and we&#039;ll need a model with a save() method. In fact, because the above model class (in site/models/form.php) extends JModelAdmin, we&#039;ll be able to reuse it without adding any more code. (For just displaying the form our model class could have extended JModelForm, but JModelAdmin extends JModelForm and provides additional functions such as the save() one which we need).&amp;lt;/translate&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;translate&amp;gt;&amp;lt;!--T:43--&amp;gt; Note that we don&#039;t need any new view file or layout file, because we&#039;re just going to redirect the user back to the same form.&amp;lt;/translate&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;translate&amp;gt;&amp;lt;!--T:44--&amp;gt; So the only new file we need is a new controller in a new controllers subdirectory:&amp;lt;/translate&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span id=&amp;quot;site/controllers/helloworld.php&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;tt&amp;gt;site/controllers/helloworld.php&amp;lt;/tt&amp;gt;&lt;br /&gt;
&amp;lt;source lang=&amp;quot;php&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;?php&lt;br /&gt;
/**&lt;br /&gt;
 * @package     Joomla.Site&lt;br /&gt;
 * @subpackage  com_helloworld&lt;br /&gt;
 *&lt;br /&gt;
 * @copyright   Copyright (C) 2005 - 2018 Open Source Matters, Inc. All rights reserved.&lt;br /&gt;
 * @license     GNU General Public License version 2 or later; see LICENSE.txt&lt;br /&gt;
 */&lt;br /&gt;
// No direct access to this file&lt;br /&gt;
defined(&#039;_JEXEC&#039;) or die(&#039;Restricted access&#039;);&lt;br /&gt;
&lt;br /&gt;
/**&lt;br /&gt;
 * HelloWorld Controller&lt;br /&gt;
 *&lt;br /&gt;
 * @package     Joomla.Site&lt;br /&gt;
 * @subpackage  com_helloworld&lt;br /&gt;
 *&lt;br /&gt;
 * Used to handle the http POST from the front-end form which allows &lt;br /&gt;
 * users to enter a new helloworld message&lt;br /&gt;
 *&lt;br /&gt;
 */&lt;br /&gt;
class HelloWorldControllerHelloWorld extends JControllerForm&lt;br /&gt;
{   &lt;br /&gt;
    public function cancel($key = null)&lt;br /&gt;
    {&lt;br /&gt;
        parent::cancel($key);&lt;br /&gt;
        &lt;br /&gt;
        // set up the redirect back to the same form&lt;br /&gt;
        $this-&amp;gt;setRedirect(&lt;br /&gt;
            (string)JUri::getInstance(), &lt;br /&gt;
            JText::_(&#039;COM_HELLOWORLD_ADD_CANCELLED&#039;)&lt;br /&gt;
		);&lt;br /&gt;
    }&lt;br /&gt;
    &lt;br /&gt;
    /*&lt;br /&gt;
     * Function handing the save for adding a new helloworld record&lt;br /&gt;
     * Based on the save() function in the JControllerForm class&lt;br /&gt;
     */&lt;br /&gt;
    public function save($key = null, $urlVar = null)&lt;br /&gt;
    {&lt;br /&gt;
		// Check for request forgeries.&lt;br /&gt;
		JSession::checkToken() or jexit(JText::_(&#039;JINVALID_TOKEN&#039;));&lt;br /&gt;
        &lt;br /&gt;
		$app = JFactory::getApplication(); &lt;br /&gt;
		$input = $app-&amp;gt;input; &lt;br /&gt;
		$model = $this-&amp;gt;getModel(&#039;form&#039;);&lt;br /&gt;
        &lt;br /&gt;
		// Get the current URI to set in redirects. As we&#039;re handling a POST, &lt;br /&gt;
		// this URI comes from the &amp;lt;form action=&amp;quot;...&amp;quot;&amp;gt; attribute in the layout file above&lt;br /&gt;
		$currentUri = (string)JUri::getInstance();&lt;br /&gt;
&lt;br /&gt;
		// Check that this user is allowed to add a new record&lt;br /&gt;
		if (!JFactory::getUser()-&amp;gt;authorise( &amp;quot;core.create&amp;quot;, &amp;quot;com_helloworld&amp;quot;))&lt;br /&gt;
		{&lt;br /&gt;
			$app-&amp;gt;enqueueMessage(JText::_(&#039;JERROR_ALERTNOAUTHOR&#039;), &#039;error&#039;);&lt;br /&gt;
			$app-&amp;gt;setHeader(&#039;status&#039;, 403, true);&lt;br /&gt;
&lt;br /&gt;
			return;&lt;br /&gt;
		}&lt;br /&gt;
        &lt;br /&gt;
		// get the data from the HTTP POST request&lt;br /&gt;
		$data  = $input-&amp;gt;get(&#039;jform&#039;, array(), &#039;array&#039;);&lt;br /&gt;
        &lt;br /&gt;
		// set up context for saving form data&lt;br /&gt;
		$context = &amp;quot;$this-&amp;gt;option.edit.$this-&amp;gt;context&amp;quot;;&lt;br /&gt;
        &lt;br /&gt;
		// Validate the posted data.&lt;br /&gt;
		// First we need to set up an instance of the form ...&lt;br /&gt;
		$form = $model-&amp;gt;getForm($data, false);&lt;br /&gt;
&lt;br /&gt;
		if (!$form)&lt;br /&gt;
		{&lt;br /&gt;
			$app-&amp;gt;enqueueMessage($model-&amp;gt;getError(), &#039;error&#039;);&lt;br /&gt;
			return false;&lt;br /&gt;
		}&lt;br /&gt;
&lt;br /&gt;
		// ... and then we validate the data against it&lt;br /&gt;
		// The validate function called below results in the running of the validate=&amp;quot;...&amp;quot; routines&lt;br /&gt;
		// specified against the fields in the form xml file, and also filters the data &lt;br /&gt;
		// according to the filter=&amp;quot;...&amp;quot; specified in the same place (removing html tags by default in strings)&lt;br /&gt;
		$validData = $model-&amp;gt;validate($form, $data);&lt;br /&gt;
&lt;br /&gt;
		// Handle the case where there are validation errors&lt;br /&gt;
		if ($validData === false)&lt;br /&gt;
		{&lt;br /&gt;
			// Get the validation messages.&lt;br /&gt;
			$errors = $model-&amp;gt;getErrors();&lt;br /&gt;
&lt;br /&gt;
			// Display up to three validation messages to the user.&lt;br /&gt;
			for ($i = 0, $n = count($errors); $i &amp;lt; $n &amp;amp;&amp;amp; $i &amp;lt; 3; $i++)&lt;br /&gt;
			{&lt;br /&gt;
				if ($errors[$i] instanceof Exception)&lt;br /&gt;
				{&lt;br /&gt;
					$app-&amp;gt;enqueueMessage($errors[$i]-&amp;gt;getMessage(), &#039;warning&#039;);&lt;br /&gt;
				}&lt;br /&gt;
				else&lt;br /&gt;
				{&lt;br /&gt;
					$app-&amp;gt;enqueueMessage($errors[$i], &#039;warning&#039;);&lt;br /&gt;
				}&lt;br /&gt;
			}&lt;br /&gt;
&lt;br /&gt;
			// Save the form data in the session.&lt;br /&gt;
			$app-&amp;gt;setUserState($context . &#039;.data&#039;, $data);&lt;br /&gt;
&lt;br /&gt;
			// Redirect back to the same screen.&lt;br /&gt;
			$this-&amp;gt;setRedirect($currentUri);&lt;br /&gt;
&lt;br /&gt;
			return false;&lt;br /&gt;
		}&lt;br /&gt;
        &lt;br /&gt;
		// add the &#039;created by&#039; and &#039;created&#039; date fields&lt;br /&gt;
		$validData[&#039;created_by&#039;] = JFactory::getUser()-&amp;gt;get(&#039;id&#039;, 0);&lt;br /&gt;
		$validData[&#039;created&#039;] = date(&#039;Y-m-d h:i:s&#039;);&lt;br /&gt;
        &lt;br /&gt;
		// Attempt to save the data.&lt;br /&gt;
		if (!$model-&amp;gt;save($validData))&lt;br /&gt;
		{&lt;br /&gt;
		// Handle the case where the save failed&lt;br /&gt;
            &lt;br /&gt;
			// Save the data in the session.&lt;br /&gt;
			$app-&amp;gt;setUserState($context . &#039;.data&#039;, $validData);&lt;br /&gt;
&lt;br /&gt;
			// Redirect back to the edit screen.&lt;br /&gt;
			$this-&amp;gt;setError(JText::sprintf(&#039;JLIB_APPLICATION_ERROR_SAVE_FAILED&#039;, $model-&amp;gt;getError()));&lt;br /&gt;
			$this-&amp;gt;setMessage($this-&amp;gt;getError(), &#039;error&#039;);&lt;br /&gt;
&lt;br /&gt;
			$this-&amp;gt;setRedirect($currentUri);&lt;br /&gt;
&lt;br /&gt;
			return false;&lt;br /&gt;
		}&lt;br /&gt;
        &lt;br /&gt;
		// clear the data in the form&lt;br /&gt;
		$app-&amp;gt;setUserState($context . &#039;.data&#039;, null);&lt;br /&gt;
        &lt;br /&gt;
		// notify the administrator that a new helloworld message has been added on the front end&lt;br /&gt;
        &lt;br /&gt;
		// get the id of the person to notify from global config&lt;br /&gt;
		$params   = $app-&amp;gt;getParams();&lt;br /&gt;
		$userid_to_email = (int) $params-&amp;gt;get(&#039;user_to_email&#039;);&lt;br /&gt;
		$user_to_email = JUser::getInstance($userid_to_email);&lt;br /&gt;
		$to_address = $user_to_email-&amp;gt;get(&amp;quot;email&amp;quot;);&lt;br /&gt;
        &lt;br /&gt;
		// get the current user (if any)&lt;br /&gt;
		$current_user = JFactory::getUser();&lt;br /&gt;
		if ($current_user-&amp;gt;get(&amp;quot;id&amp;quot;) &amp;gt; 0) &lt;br /&gt;
		{&lt;br /&gt;
			$current_username = $current_user-&amp;gt;get(&amp;quot;username&amp;quot;);&lt;br /&gt;
		}&lt;br /&gt;
		else &lt;br /&gt;
		{&lt;br /&gt;
			$current_username = &amp;quot;a visitor to the site&amp;quot;;&lt;br /&gt;
		}&lt;br /&gt;
        &lt;br /&gt;
		// get the Mailer object, set up the email to be sent, and send it&lt;br /&gt;
		$mailer = JFactory::getMailer();&lt;br /&gt;
		$mailer-&amp;gt;addRecipient($to_address);&lt;br /&gt;
		$mailer-&amp;gt;setSubject(&amp;quot;New helloworld message added by &amp;quot; . $current_username);&lt;br /&gt;
		$mailer-&amp;gt;setBody(&amp;quot;New greeting is &amp;quot; . $validData[&#039;greeting&#039;]);&lt;br /&gt;
		try &lt;br /&gt;
		{&lt;br /&gt;
			$mailer-&amp;gt;send(); &lt;br /&gt;
		}&lt;br /&gt;
		catch (Exception $e)&lt;br /&gt;
		{&lt;br /&gt;
			JLog::add(&#039;Caught exception: &#039; . $e-&amp;gt;getMessage(), JLog::Error, &#039;jerror&#039;);&lt;br /&gt;
		}&lt;br /&gt;
        &lt;br /&gt;
		$this-&amp;gt;setRedirect(&lt;br /&gt;
				$currentUri,&lt;br /&gt;
				JText::_(&#039;COM_HELLOWORLD_ADD_SUCCESSFUL&#039;)&lt;br /&gt;
				);&lt;br /&gt;
            &lt;br /&gt;
		return true;&lt;br /&gt;
        &lt;br /&gt;
    }&lt;br /&gt;
&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;translate&amp;gt;&amp;lt;!--T:45--&amp;gt; In the above file we&#039;ve been able to reuse the cancel() method from the parent JControllerForm class, with the exception that we want to redirect back to the same form. (The parent cancel() method redirects back to the view showing the list of records - as in the admin case).&amp;lt;/translate&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;translate&amp;gt;&amp;lt;!--T:46--&amp;gt; However, our save() method functionality is significantly different from that of the parent class, so it&#039;s easier just to write our own. Note that we&#039;re recording the user and created date/time for records added via the front-end only. If we wanted to record this information for all records, then we&#039;d need to override a save() function for the backend as well to include setting those fields.&amp;lt;/translate&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;translate&amp;gt;&amp;lt;!--T:47--&amp;gt; The mailing functionality relies on you having set up mail in your Joomla instance. If you&#039;re using localhost then one possibility is to configure this using a gmail account, and you can easily find the smtp settings for this on the Internet. Note that you&#039;ll need to allow &amp;quot;less secure apps&amp;quot; on the gmail account.&amp;lt;/translate&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;translate&amp;gt;&lt;br /&gt;
==Configuration Parameters== &amp;lt;!--T:48--&amp;gt;&lt;br /&gt;
&amp;lt;/translate&amp;gt;&lt;br /&gt;
&amp;lt;translate&amp;gt;&amp;lt;!--T:49--&amp;gt; We&#039;ve introduced two new configuration parameters - the captcha to display on the form, and the user to email with notification of a new helloworld message being added. So update the configuration settings as follows:&amp;lt;/translate&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span id=&amp;quot;admin/config.xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;tt&amp;gt;admin/config.xml&amp;lt;/tt&amp;gt;&lt;br /&gt;
&amp;lt;source lang=&amp;quot;xml&amp;quot; highlight=&amp;quot;18-37&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;?xml version=&amp;quot;1.0&amp;quot; encoding=&amp;quot;utf-8&amp;quot;?&amp;gt;&lt;br /&gt;
&amp;lt;config&amp;gt;&lt;br /&gt;
	&amp;lt;fieldset&lt;br /&gt;
		name=&amp;quot;greetings&amp;quot;&lt;br /&gt;
		label=&amp;quot;COM_HELLOWORLD_CONFIG_GREETING_SETTINGS_LABEL&amp;quot;&lt;br /&gt;
		description=&amp;quot;COM_HELLOWORLD_CONFIG_GREETING_SETTINGS_DESC&amp;quot;&lt;br /&gt;
	&amp;gt;&lt;br /&gt;
		&amp;lt;field&lt;br /&gt;
			name=&amp;quot;show_category&amp;quot;&lt;br /&gt;
			type=&amp;quot;radio&amp;quot;&lt;br /&gt;
			label=&amp;quot;COM_HELLOWORLD_HELLOWORLD_FIELD_SHOW_CATEGORY_LABEL&amp;quot;&lt;br /&gt;
			description=&amp;quot;COM_HELLOWORLD_HELLOWORLD_FIELD_SHOW_CATEGORY_DESC&amp;quot;&lt;br /&gt;
			default=&amp;quot;0&amp;quot;&lt;br /&gt;
		&amp;gt;&lt;br /&gt;
			&amp;lt;option value=&amp;quot;0&amp;quot;&amp;gt;JHIDE&amp;lt;/option&amp;gt;&lt;br /&gt;
			&amp;lt;option value=&amp;quot;1&amp;quot;&amp;gt;JSHOW&amp;lt;/option&amp;gt;&lt;br /&gt;
		&amp;lt;/field&amp;gt;&lt;br /&gt;
        &amp;lt;field&lt;br /&gt;
			name=&amp;quot;captcha&amp;quot;&lt;br /&gt;
			type=&amp;quot;plugins&amp;quot;&lt;br /&gt;
            folder=&amp;quot;captcha&amp;quot;&lt;br /&gt;
			label=&amp;quot;COM_HELLOWORLD_HELLOWORLD_FIELD_CAPTCHA_LABEL&amp;quot;&lt;br /&gt;
			description=&amp;quot;COM_HELLOWORLD_HELLOWORLD_FIELD_CAPTCHA_DESC&amp;quot;&lt;br /&gt;
			default=&amp;quot;0&amp;quot;&lt;br /&gt;
			filter=&amp;quot;cmd&amp;quot;&lt;br /&gt;
		&amp;gt;&lt;br /&gt;
            &amp;lt;option value=&amp;quot;&amp;quot;&amp;gt;JOPTION_USE_DEFAULT&amp;lt;/option&amp;gt;&lt;br /&gt;
			&amp;lt;option value=&amp;quot;0&amp;quot;&amp;gt;JOPTION_DO_NOT_USE&amp;lt;/option&amp;gt;&lt;br /&gt;
		&amp;lt;/field&amp;gt;&lt;br /&gt;
        &amp;lt;field&lt;br /&gt;
			name=&amp;quot;user_to_email&amp;quot;&lt;br /&gt;
			type=&amp;quot;user&amp;quot;&lt;br /&gt;
			label=&amp;quot;COM_HELLOWORLD_HELLOWORLD_FIELD_USER_TO_EMAIL_LABEL&amp;quot;&lt;br /&gt;
			description=&amp;quot;COM_HELLOWORLD_HELLOWORLD_FIELD_USER_TO_EMAIL_DESC&amp;quot;&lt;br /&gt;
			default=&amp;quot;0&amp;quot;&lt;br /&gt;
		&amp;gt;&lt;br /&gt;
		&amp;lt;/field&amp;gt;&lt;br /&gt;
	&amp;lt;/fieldset&amp;gt;&lt;br /&gt;
    &amp;lt;fieldset&lt;br /&gt;
		name=&amp;quot;permissions&amp;quot;&lt;br /&gt;
		label=&amp;quot;JCONFIG_PERMISSIONS_LABEL&amp;quot;&lt;br /&gt;
		description=&amp;quot;JCONFIG_PERMISSIONS_DESC&amp;quot;&lt;br /&gt;
	&amp;gt;&lt;br /&gt;
		&amp;lt;field&lt;br /&gt;
			name=&amp;quot;rules&amp;quot;&lt;br /&gt;
			type=&amp;quot;rules&amp;quot;&lt;br /&gt;
			label=&amp;quot;JCONFIG_PERMISSIONS_LABEL&amp;quot;&lt;br /&gt;
			class=&amp;quot;inputbox&amp;quot;&lt;br /&gt;
			validate=&amp;quot;rules&amp;quot;&lt;br /&gt;
			filter=&amp;quot;rules&amp;quot;&lt;br /&gt;
			component=&amp;quot;com_helloworld&amp;quot;&lt;br /&gt;
			section=&amp;quot;component&amp;quot;&lt;br /&gt;
		/&amp;gt;&lt;br /&gt;
	&amp;lt;/fieldset&amp;gt;&lt;br /&gt;
&amp;lt;/config&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;translate&amp;gt;&lt;br /&gt;
==Display the new fields on the Admin list form== &amp;lt;!--T:50--&amp;gt;&lt;br /&gt;
&amp;lt;/translate&amp;gt;&lt;br /&gt;
&amp;lt;translate&amp;gt;&amp;lt;!--T:51--&amp;gt; We want to update the admin helloworld list layout file to include the new Author and Created Date fields. This means that we also need to update our model to include these fields in the SQL query.&amp;lt;/translate&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;translate&amp;gt;&amp;lt;!--T:52--&amp;gt; In addition, we&#039;ve changed column ordering mechanism from what it was in [[S:MyLanguage/J3.x:Developing an MVC Component/Adding decorations to the backend|Adding decorations to the backend]] to the more modern way that this is handled.&amp;lt;/translate&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;span id=&amp;quot;admin/views/helloworlds/view.html.php&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;tt&amp;gt;admin/views/helloworlds/view.html.php&amp;lt;/tt&amp;gt;&lt;br /&gt;
&amp;lt;source lang=&amp;quot;php&amp;quot; highlight=&amp;quot;37-39&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;?php&lt;br /&gt;
/**&lt;br /&gt;
 * @package     Joomla.Administrator&lt;br /&gt;
 * @subpackage  com_helloworld&lt;br /&gt;
 *&lt;br /&gt;
 * @copyright   Copyright (C) 2005 - 2018 Open Source Matters, Inc. All rights reserved.&lt;br /&gt;
 * @license     GNU General Public License version 2 or later; see LICENSE.txt&lt;br /&gt;
 */&lt;br /&gt;
&lt;br /&gt;
// No direct access to this file&lt;br /&gt;
defined(&#039;_JEXEC&#039;) or die(&#039;Restricted access&#039;);&lt;br /&gt;
&lt;br /&gt;
/**&lt;br /&gt;
 * HelloWorlds View&lt;br /&gt;
 *&lt;br /&gt;
 * @since  0.0.1&lt;br /&gt;
 */&lt;br /&gt;
class HelloWorldViewHelloWorlds extends JViewLegacy&lt;br /&gt;
{&lt;br /&gt;
	/**&lt;br /&gt;
	 * Display the Hello World view&lt;br /&gt;
	 *&lt;br /&gt;
	 * @param   string  $tpl  The name of the template file to parse; automatically searches through the template paths.&lt;br /&gt;
	 *&lt;br /&gt;
	 * @return  void&lt;br /&gt;
	 */&lt;br /&gt;
	function display($tpl = null)&lt;br /&gt;
	{&lt;br /&gt;
		&lt;br /&gt;
		// Get application&lt;br /&gt;
		$app = JFactory::getApplication();&lt;br /&gt;
		$context = &amp;quot;helloworld.list.admin.helloworld&amp;quot;;&lt;br /&gt;
		// Get data from the model&lt;br /&gt;
		$this-&amp;gt;items			= $this-&amp;gt;get(&#039;Items&#039;);&lt;br /&gt;
		$this-&amp;gt;pagination		= $this-&amp;gt;get(&#039;Pagination&#039;);&lt;br /&gt;
		$this-&amp;gt;state			= $this-&amp;gt;get(&#039;State&#039;);&lt;br /&gt;
		// Remove the old ordering mechanism&lt;br /&gt;
		//$this-&amp;gt;filter_order 	= $app-&amp;gt;getUserStateFromRequest($context.&#039;filter_order&#039;, &#039;filter_order&#039;, &#039;greeting&#039;, &#039;cmd&#039;);&lt;br /&gt;
		//$this-&amp;gt;filter_order_Dir = $app-&amp;gt;getUserStateFromRequest($context.&#039;filter_order_Dir&#039;, &#039;filter_order_Dir&#039;, &#039;asc&#039;, &#039;cmd&#039;);&lt;br /&gt;
		$this-&amp;gt;filterForm    	= $this-&amp;gt;get(&#039;FilterForm&#039;);&lt;br /&gt;
		$this-&amp;gt;activeFilters 	= $this-&amp;gt;get(&#039;ActiveFilters&#039;);&lt;br /&gt;
        &lt;br /&gt;
		// What Access Permissions does this user have? What can (s)he do?&lt;br /&gt;
		$this-&amp;gt;canDo = JHelperContent::getActions(&#039;com_helloworld&#039;);&lt;br /&gt;
&lt;br /&gt;
		// Check for errors.&lt;br /&gt;
		if (count($errors = $this-&amp;gt;get(&#039;Errors&#039;)))&lt;br /&gt;
		{&lt;br /&gt;
			JError::raiseError(500, implode(&#039;&amp;lt;br /&amp;gt;&#039;, $errors));&lt;br /&gt;
&lt;br /&gt;
			return false;&lt;br /&gt;
		}&lt;br /&gt;
        &lt;br /&gt;
		// Set the submenu&lt;br /&gt;
		HelloWorldHelper::addSubmenu(&#039;helloworlds&#039;);&lt;br /&gt;
&lt;br /&gt;
		// Set the toolbar and number of found items&lt;br /&gt;
		$this-&amp;gt;addToolBar();&lt;br /&gt;
&lt;br /&gt;
		// Display the template&lt;br /&gt;
		parent::display($tpl);&lt;br /&gt;
&lt;br /&gt;
		// Set the document&lt;br /&gt;
		$this-&amp;gt;setDocument();&lt;br /&gt;
	}&lt;br /&gt;
&lt;br /&gt;
	/**&lt;br /&gt;
	 * Add the page title and toolbar.&lt;br /&gt;
	 *&lt;br /&gt;
	 * @return  void&lt;br /&gt;
	 *&lt;br /&gt;
	 * @since   1.6&lt;br /&gt;
	 */&lt;br /&gt;
	protected function addToolBar()&lt;br /&gt;
	{&lt;br /&gt;
		$title = JText::_(&#039;COM_HELLOWORLD_MANAGER_HELLOWORLDS&#039;);&lt;br /&gt;
&lt;br /&gt;
		if ($this-&amp;gt;pagination-&amp;gt;total)&lt;br /&gt;
		{&lt;br /&gt;
			$title .= &amp;quot;&amp;lt;span style=&#039;font-size: 0.5em; vertical-align: middle;&#039;&amp;gt;(&amp;quot; . $this-&amp;gt;pagination-&amp;gt;total . &amp;quot;)&amp;lt;/span&amp;gt;&amp;quot;;&lt;br /&gt;
		}&lt;br /&gt;
&lt;br /&gt;
		JToolBarHelper::title($title, &#039;helloworld&#039;);&lt;br /&gt;
		if ($this-&amp;gt;canDo-&amp;gt;get(&#039;core.create&#039;)) &lt;br /&gt;
		{&lt;br /&gt;
			JToolBarHelper::addNew(&#039;helloworld.add&#039;, &#039;JTOOLBAR_NEW&#039;);&lt;br /&gt;
		}&lt;br /&gt;
		if ($this-&amp;gt;canDo-&amp;gt;get(&#039;core.edit&#039;)) &lt;br /&gt;
		{&lt;br /&gt;
			JToolBarHelper::editList(&#039;helloworld.edit&#039;, &#039;JTOOLBAR_EDIT&#039;);&lt;br /&gt;
		}&lt;br /&gt;
		if ($this-&amp;gt;canDo-&amp;gt;get(&#039;core.delete&#039;)) &lt;br /&gt;
		{&lt;br /&gt;
			JToolBarHelper::deleteList(&#039;&#039;, &#039;helloworlds.delete&#039;, &#039;JTOOLBAR_DELETE&#039;);&lt;br /&gt;
		}&lt;br /&gt;
		if ($this-&amp;gt;canDo-&amp;gt;get(&#039;core.admin&#039;)) &lt;br /&gt;
		{&lt;br /&gt;
			JToolBarHelper::divider();&lt;br /&gt;
			JToolBarHelper::preferences(&#039;com_helloworld&#039;);&lt;br /&gt;
		}&lt;br /&gt;
	}&lt;br /&gt;
	/**&lt;br /&gt;
	 * Method to set up the document properties&lt;br /&gt;
	 *&lt;br /&gt;
	 * @return void&lt;br /&gt;
	 */&lt;br /&gt;
	protected function setDocument() &lt;br /&gt;
	{&lt;br /&gt;
		$document = JFactory::getDocument();&lt;br /&gt;
		$document-&amp;gt;setTitle(JText::_(&#039;COM_HELLOWORLD_ADMINISTRATION&#039;));&lt;br /&gt;
	}&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;translate&amp;gt;&amp;lt;!--T:53--&amp;gt; Note that in the layout file below the hidden input fields filter_order and filter_order_Dir have been removed.&amp;lt;/translate&amp;gt;  &lt;br /&gt;
&lt;br /&gt;
&amp;lt;span id=&amp;quot;admin/views/helloworlds/tmpl/default.php&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;tt&amp;gt;admin/views/helloworlds/tmpl/default.php&amp;lt;/tt&amp;gt;&lt;br /&gt;
&amp;lt;source lang=&amp;quot;php&amp;quot; highlight=&amp;quot;41-42,44-51,54,83-88,101-102&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;?php&lt;br /&gt;
/**&lt;br /&gt;
 * @package     Joomla.Administrator&lt;br /&gt;
 * @subpackage  com_helloworld&lt;br /&gt;
 *&lt;br /&gt;
 * @copyright   Copyright (C) 2005 - 2018 Open Source Matters, Inc. All rights reserved.&lt;br /&gt;
 * @license     GNU General Public License version 2 or later; see LICENSE.txt&lt;br /&gt;
 */&lt;br /&gt;
&lt;br /&gt;
// No direct access to this file&lt;br /&gt;
defined(&#039;_JEXEC&#039;) or die(&#039;Restricted Access&#039;);&lt;br /&gt;
&lt;br /&gt;
JHtml::_(&#039;formbehavior.chosen&#039;, &#039;select&#039;);&lt;br /&gt;
&lt;br /&gt;
$listOrder     = $this-&amp;gt;escape($this-&amp;gt;state-&amp;gt;get(&#039;list.ordering&#039;));&lt;br /&gt;
$listDirn      = $this-&amp;gt;escape($this-&amp;gt;state-&amp;gt;get(&#039;list.direction&#039;));&lt;br /&gt;
?&amp;gt;&lt;br /&gt;
&amp;lt;form action=&amp;quot;index.php?option=com_helloworld&amp;amp;view=helloworlds&amp;quot; method=&amp;quot;post&amp;quot; id=&amp;quot;adminForm&amp;quot; name=&amp;quot;adminForm&amp;quot;&amp;gt;&lt;br /&gt;
	&amp;lt;div id=&amp;quot;j-sidebar-container&amp;quot; class=&amp;quot;span2&amp;quot;&amp;gt;&lt;br /&gt;
		&amp;lt;?php echo JHtmlSidebar::render(); ?&amp;gt;&lt;br /&gt;
	&amp;lt;/div&amp;gt;&lt;br /&gt;
	&amp;lt;div id=&amp;quot;j-main-container&amp;quot; class=&amp;quot;span10&amp;quot;&amp;gt;&lt;br /&gt;
        &amp;lt;div class=&amp;quot;row-fluid&amp;quot;&amp;gt;&lt;br /&gt;
            &amp;lt;div class=&amp;quot;span6&amp;quot;&amp;gt;&lt;br /&gt;
                &amp;lt;?php echo JText::_(&#039;COM_HELLOWORLD_HELLOWORLDS_FILTER&#039;); ?&amp;gt;&lt;br /&gt;
                &amp;lt;?php&lt;br /&gt;
                    echo JLayoutHelper::render(&lt;br /&gt;
                        &#039;joomla.searchtools.default&#039;,&lt;br /&gt;
                        array(&#039;view&#039; =&amp;gt; $this)&lt;br /&gt;
                    );&lt;br /&gt;
                ?&amp;gt;&lt;br /&gt;
            &amp;lt;/div&amp;gt;&lt;br /&gt;
        &amp;lt;/div&amp;gt;&lt;br /&gt;
        &amp;lt;table class=&amp;quot;table table-striped table-hover&amp;quot;&amp;gt;&lt;br /&gt;
            &amp;lt;thead&amp;gt;&lt;br /&gt;
            &amp;lt;tr&amp;gt;&lt;br /&gt;
                &amp;lt;th width=&amp;quot;1%&amp;quot;&amp;gt;&amp;lt;?php echo JText::_(&#039;COM_HELLOWORLD_NUM&#039;); ?&amp;gt;&amp;lt;/th&amp;gt;&lt;br /&gt;
                &amp;lt;th width=&amp;quot;2%&amp;quot;&amp;gt;&lt;br /&gt;
                    &amp;lt;?php echo JHtml::_(&#039;grid.checkall&#039;); ?&amp;gt;&lt;br /&gt;
                &amp;lt;/th&amp;gt;&lt;br /&gt;
                &amp;lt;th width=&amp;quot;30%&amp;quot;&amp;gt;&lt;br /&gt;
                    &amp;lt;?php echo JHtml::_(&#039;searchtools.sort&#039;, &#039;COM_HELLOWORLD_HELLOWORLDS_NAME&#039;, &#039;greeting&#039;, $listDirn, $listOrder); ?&amp;gt;&lt;br /&gt;
                &amp;lt;/th&amp;gt;&lt;br /&gt;
                &amp;lt;th width=&amp;quot;30%&amp;quot;&amp;gt;&lt;br /&gt;
                    &amp;lt;?php echo JHtml::_(&#039;searchtools.sort&#039;, &#039;COM_HELLOWORLD_AUTHOR&#039;, &#039;author&#039;, $listDirn, $listOrder); ?&amp;gt;&lt;br /&gt;
                &amp;lt;/th&amp;gt;&lt;br /&gt;
                &amp;lt;th width=&amp;quot;30%&amp;quot;&amp;gt;&lt;br /&gt;
                    &amp;lt;?php echo JHtml::_(&#039;searchtools.sort&#039;, &#039;COM_HELLOWORLD_CREATED_DATE&#039;, &#039;created&#039;, $listDirn, $listOrder); ?&amp;gt;&lt;br /&gt;
                &amp;lt;/th&amp;gt;&lt;br /&gt;
                &amp;lt;th width=&amp;quot;5%&amp;quot;&amp;gt;&lt;br /&gt;
                    &amp;lt;?php echo JHtml::_(&#039;searchtools.sort&#039;, &#039;COM_HELLOWORLD_PUBLISHED&#039;, &#039;published&#039;, $listDirn, $listOrder); ?&amp;gt;&lt;br /&gt;
                &amp;lt;/th&amp;gt;&lt;br /&gt;
                &amp;lt;th width=&amp;quot;2%&amp;quot;&amp;gt;&lt;br /&gt;
                    &amp;lt;?php echo JHtml::_(&#039;searchtools.sort&#039;, &#039;COM_HELLOWORLD_ID&#039;, &#039;id&#039;, $listDirn, $listOrder); ?&amp;gt;&lt;br /&gt;
                &amp;lt;/th&amp;gt;&lt;br /&gt;
            &amp;lt;/tr&amp;gt;&lt;br /&gt;
            &amp;lt;/thead&amp;gt;&lt;br /&gt;
            &amp;lt;tfoot&amp;gt;&lt;br /&gt;
                &amp;lt;tr&amp;gt;&lt;br /&gt;
                    &amp;lt;td colspan=&amp;quot;5&amp;quot;&amp;gt;&lt;br /&gt;
                        &amp;lt;?php echo $this-&amp;gt;pagination-&amp;gt;getListFooter(); ?&amp;gt;&lt;br /&gt;
                    &amp;lt;/td&amp;gt;&lt;br /&gt;
                &amp;lt;/tr&amp;gt;&lt;br /&gt;
            &amp;lt;/tfoot&amp;gt;&lt;br /&gt;
            &amp;lt;tbody&amp;gt;&lt;br /&gt;
                &amp;lt;?php if (!empty($this-&amp;gt;items)) : ?&amp;gt;&lt;br /&gt;
                    &amp;lt;?php foreach ($this-&amp;gt;items as $i =&amp;gt; $row) :&lt;br /&gt;
                        $link = JRoute::_(&#039;index.php?option=com_helloworld&amp;amp;task=helloworld.edit&amp;amp;id=&#039; . $row-&amp;gt;id);&lt;br /&gt;
                    ?&amp;gt;&lt;br /&gt;
                        &amp;lt;tr&amp;gt;&lt;br /&gt;
                            &amp;lt;td&amp;gt;&amp;lt;?php echo $this-&amp;gt;pagination-&amp;gt;getRowOffset($i); ?&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
                            &amp;lt;td&amp;gt;&lt;br /&gt;
                                &amp;lt;?php echo JHtml::_(&#039;grid.id&#039;, $i, $row-&amp;gt;id); ?&amp;gt;&lt;br /&gt;
                            &amp;lt;/td&amp;gt;&lt;br /&gt;
                            &amp;lt;td&amp;gt;&lt;br /&gt;
                                &amp;lt;a href=&amp;quot;&amp;lt;?php echo $link; ?&amp;gt;&amp;quot; title=&amp;quot;&amp;lt;?php echo JText::_(&#039;COM_HELLOWORLD_EDIT_HELLOWORLD&#039;); ?&amp;gt;&amp;quot;&amp;gt;&lt;br /&gt;
                                    &amp;lt;?php echo $row-&amp;gt;greeting; ?&amp;gt;&lt;br /&gt;
                                &amp;lt;/a&amp;gt;&lt;br /&gt;
                                &amp;lt;div class=&amp;quot;small&amp;quot;&amp;gt;&lt;br /&gt;
									&amp;lt;?php echo JText::_(&#039;JCATEGORY&#039;) . &#039;: &#039; . $this-&amp;gt;escape($row-&amp;gt;category_title); ?&amp;gt;&lt;br /&gt;
								&amp;lt;/div&amp;gt;&lt;br /&gt;
                            &amp;lt;/td&amp;gt;&lt;br /&gt;
                            &amp;lt;td align=&amp;quot;center&amp;quot;&amp;gt;&lt;br /&gt;
                                &amp;lt;?php echo $row-&amp;gt;author; ?&amp;gt;&lt;br /&gt;
                            &amp;lt;/td&amp;gt;&lt;br /&gt;
                            &amp;lt;td align=&amp;quot;center&amp;quot;&amp;gt;&lt;br /&gt;
                                &amp;lt;?php echo substr($row-&amp;gt;created, 0, 10); ?&amp;gt;&lt;br /&gt;
                            &amp;lt;/td&amp;gt;&lt;br /&gt;
                            &amp;lt;td align=&amp;quot;center&amp;quot;&amp;gt;&lt;br /&gt;
                                &amp;lt;?php echo JHtml::_(&#039;jgrid.published&#039;, $row-&amp;gt;published, $i, &#039;helloworlds.&#039;, true, &#039;cb&#039;); ?&amp;gt;&lt;br /&gt;
                            &amp;lt;/td&amp;gt;&lt;br /&gt;
                            &amp;lt;td align=&amp;quot;center&amp;quot;&amp;gt;&lt;br /&gt;
                                &amp;lt;?php echo $row-&amp;gt;id; ?&amp;gt;&lt;br /&gt;
                            &amp;lt;/td&amp;gt;&lt;br /&gt;
                        &amp;lt;/tr&amp;gt;&lt;br /&gt;
                    &amp;lt;?php endforeach; ?&amp;gt;&lt;br /&gt;
                &amp;lt;?php endif; ?&amp;gt;&lt;br /&gt;
            &amp;lt;/tbody&amp;gt;&lt;br /&gt;
        &amp;lt;/table&amp;gt;&lt;br /&gt;
        &amp;lt;input type=&amp;quot;hidden&amp;quot; name=&amp;quot;task&amp;quot; value=&amp;quot;&amp;quot;/&amp;gt;&lt;br /&gt;
        &amp;lt;input type=&amp;quot;hidden&amp;quot; name=&amp;quot;boxchecked&amp;quot; value=&amp;quot;0&amp;quot;/&amp;gt;&lt;br /&gt;
        &amp;lt;?php echo JHtml::_(&#039;form.token&#039;); ?&amp;gt;&lt;br /&gt;
    &amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;/form&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;translate&amp;gt;&amp;lt;!--T:54--&amp;gt; Instead of the using the hidden fields &amp;quot;filter_order&amp;quot; and &amp;quot;filter_order_Dir&amp;quot; to keep track of the current column for ordering and direction, we will use the &amp;quot;list&amp;quot;[&amp;quot;fullordering&amp;quot;] field, and this will now be displayed on the form as well (as is done within com_content for the Articles view). We&#039;ll also need to include the new language strings in this field in our admin language file.&amp;lt;/translate&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;span id=&amp;quot;admin/models/forms/filter_helloworlds.xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;tt&amp;gt;admin/models/forms/filter_helloworlds.xml&amp;lt;/tt&amp;gt;&lt;br /&gt;
&amp;lt;source lang=&amp;quot;xml&amp;quot; highlight=&amp;quot;22-41&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;?xml version=&amp;quot;1.0&amp;quot; encoding=&amp;quot;utf-8&amp;quot;?&amp;gt;&lt;br /&gt;
&amp;lt;form&amp;gt;&lt;br /&gt;
	&amp;lt;fields name=&amp;quot;filter&amp;quot;&amp;gt;&lt;br /&gt;
		&amp;lt;field&lt;br /&gt;
			name=&amp;quot;search&amp;quot;&lt;br /&gt;
			type=&amp;quot;text&amp;quot;&lt;br /&gt;
			label=&amp;quot;COM_BANNERS_SEARCH_IN_TITLE&amp;quot;&lt;br /&gt;
			hint=&amp;quot;JSEARCH_FILTER&amp;quot;&lt;br /&gt;
			class=&amp;quot;js-stools-search-string&amp;quot;&lt;br /&gt;
		/&amp;gt;&lt;br /&gt;
		&amp;lt;field&lt;br /&gt;
			name=&amp;quot;published&amp;quot;&lt;br /&gt;
			type=&amp;quot;status&amp;quot;&lt;br /&gt;
			label=&amp;quot;JOPTION_SELECT_PUBLISHED&amp;quot;&lt;br /&gt;
			description=&amp;quot;JOPTION_SELECT_PUBLISHED_DESC&amp;quot;&lt;br /&gt;
			onchange=&amp;quot;this.form.submit();&amp;quot;&lt;br /&gt;
			&amp;gt;&lt;br /&gt;
			&amp;lt;option value=&amp;quot;&amp;quot;&amp;gt;JOPTION_SELECT_PUBLISHED&amp;lt;/option&amp;gt;&lt;br /&gt;
		&amp;lt;/field&amp;gt;&lt;br /&gt;
	&amp;lt;/fields&amp;gt;&lt;br /&gt;
	&amp;lt;fields name=&amp;quot;list&amp;quot;&amp;gt;&lt;br /&gt;
		&amp;lt;field&lt;br /&gt;
			name=&amp;quot;fullordering&amp;quot;&lt;br /&gt;
			type=&amp;quot;list&amp;quot;&lt;br /&gt;
			label=&amp;quot;COM_HELLOWORLD_LIST_FULL_ORDERING&amp;quot;&lt;br /&gt;
			description=&amp;quot;COM_HELLOWORLD_LIST_FULL_ORDERING_DESC&amp;quot;&lt;br /&gt;
			onchange=&amp;quot;this.form.submit();&amp;quot;&lt;br /&gt;
			default=&amp;quot;greeting ASC&amp;quot;&lt;br /&gt;
			&amp;gt;&lt;br /&gt;
			&amp;lt;option value=&amp;quot;&amp;quot;&amp;gt;JGLOBAL_SORT_BY&amp;lt;/option&amp;gt;&lt;br /&gt;
			&amp;lt;option value=&amp;quot;greeting ASC&amp;quot;&amp;gt;COM_HELLOWORLD_ORDERING_ASC&amp;lt;/option&amp;gt;&lt;br /&gt;
			&amp;lt;option value=&amp;quot;greeting DESC&amp;quot;&amp;gt;COM_HELLOWORLD_ORDERING_DESC&amp;lt;/option&amp;gt;&lt;br /&gt;
			&amp;lt;option value=&amp;quot;id ASC&amp;quot;&amp;gt;JGRID_HEADING_ID_ASC&amp;lt;/option&amp;gt;&lt;br /&gt;
			&amp;lt;option value=&amp;quot;id DESC&amp;quot;&amp;gt;JGRID_HEADING_ID_DESC&amp;lt;/option&amp;gt;&lt;br /&gt;
			&amp;lt;option value=&amp;quot;published ASC&amp;quot;&amp;gt;COM_HELLOWORLD_PUBLISHED_ASC&amp;lt;/option&amp;gt;&lt;br /&gt;
			&amp;lt;option value=&amp;quot;published DESC&amp;quot;&amp;gt;COM_HELLOWORLD_PUBLISHED_DESC&amp;lt;/option&amp;gt;&lt;br /&gt;
			&amp;lt;option value=&amp;quot;author ASC&amp;quot;&amp;gt;COM_HELLOWORLD_AUTHOR_ASC&amp;lt;/option&amp;gt;&lt;br /&gt;
			&amp;lt;option value=&amp;quot;author DESC&amp;quot;&amp;gt;COM_HELLOWORLD_AUTHOR_DESC&amp;lt;/option&amp;gt;&lt;br /&gt;
			&amp;lt;option value=&amp;quot;created ASC&amp;quot;&amp;gt;COM_HELLOWORLD_CREATED_ASC&amp;lt;/option&amp;gt;&lt;br /&gt;
			&amp;lt;option value=&amp;quot;created DESC&amp;quot;&amp;gt;COM_HELLOWORLD_CREATED_DESC&amp;lt;/option&amp;gt;&lt;br /&gt;
		&amp;lt;/field&amp;gt;&lt;br /&gt;
		&amp;lt;field&lt;br /&gt;
			name=&amp;quot;limit&amp;quot;&lt;br /&gt;
			type=&amp;quot;limitbox&amp;quot;&lt;br /&gt;
			class=&amp;quot;input-mini&amp;quot;&lt;br /&gt;
			default=&amp;quot;25&amp;quot;&lt;br /&gt;
			label=&amp;quot;COM_CONTENT_LIST_LIMIT&amp;quot;&lt;br /&gt;
			description=&amp;quot;COM_HELLOWORLD_LIST_LIMIT_DESC&amp;quot;&lt;br /&gt;
			onchange=&amp;quot;this.form.submit();&amp;quot;&lt;br /&gt;
		/&amp;gt;&lt;br /&gt;
	&amp;lt;/fields&amp;gt;&lt;br /&gt;
&amp;lt;/form&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;translate&amp;gt;&amp;lt;!--T:62--&amp;gt; The above status type field (second field element, with name=&amp;quot;published&amp;quot;) displays the status values &amp;quot;Trashed&amp;quot; and &amp;quot;Archived&amp;quot; which the Helloworld component doesn&#039;t support. We could define our own custom helloworldStatus type field which displayed only the publishing options, but as defining such custom fields has already been covered in the step [[S:MyLanguage/J3.x:Developing an MVC Component/Using the database|Using the database]] with our &amp;quot;helloworld&amp;quot; custom field, we won&#039;t bother with that here.&amp;lt;/translate&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;translate&amp;gt;&lt;br /&gt;
&amp;lt;!--T:59--&amp;gt;&lt;br /&gt;
Within the model we need to get the author and created date fields from the database, and we also need to add these to the &amp;lt;tt&amp;gt;filter_fields&amp;lt;/tt&amp;gt; array of fields which relate to sortable columns. &lt;br /&gt;
&amp;lt;/translate&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span id=&amp;quot;admin/models/helloworlds.php&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;tt&amp;gt;admin/models/helloworlds.php&amp;lt;/tt&amp;gt;&lt;br /&gt;
&amp;lt;source lang=&amp;quot;php&amp;quot; highlight=&amp;quot;34-35,62-64&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;?php&lt;br /&gt;
/**&lt;br /&gt;
 * @package     Joomla.Administrator&lt;br /&gt;
 * @subpackage  com_helloworld&lt;br /&gt;
 *&lt;br /&gt;
 * @copyright   Copyright (C) 2005 - 2018 Open Source Matters, Inc. All rights reserved.&lt;br /&gt;
 * @license     GNU General Public License version 2 or later; see LICENSE.txt&lt;br /&gt;
 */&lt;br /&gt;
// No direct access to this file&lt;br /&gt;
defined(&#039;_JEXEC&#039;) or die(&#039;Restricted access&#039;);&lt;br /&gt;
&lt;br /&gt;
/**&lt;br /&gt;
 * HelloWorldList Model&lt;br /&gt;
 *&lt;br /&gt;
 * @since  0.0.1&lt;br /&gt;
 */&lt;br /&gt;
class HelloWorldModelHelloWorlds extends JModelList&lt;br /&gt;
{&lt;br /&gt;
	/**&lt;br /&gt;
	 * Constructor.&lt;br /&gt;
	 *&lt;br /&gt;
	 * @param   array  $config  An optional associative array of configuration settings.&lt;br /&gt;
	 *&lt;br /&gt;
	 * @see     JController&lt;br /&gt;
	 * @since   1.6&lt;br /&gt;
	 */&lt;br /&gt;
	public function __construct($config = array())&lt;br /&gt;
	{&lt;br /&gt;
		if (empty($config[&#039;filter_fields&#039;]))&lt;br /&gt;
		{&lt;br /&gt;
			$config[&#039;filter_fields&#039;] = array(&lt;br /&gt;
				&#039;id&#039;,&lt;br /&gt;
				&#039;greeting&#039;,&lt;br /&gt;
				&#039;author&#039;,&lt;br /&gt;
				&#039;created&#039;,&lt;br /&gt;
				&#039;published&#039;&lt;br /&gt;
			);&lt;br /&gt;
		}&lt;br /&gt;
&lt;br /&gt;
		parent::__construct($config);&lt;br /&gt;
	}&lt;br /&gt;
&lt;br /&gt;
	/**&lt;br /&gt;
	 * Method to build an SQL query to load the list data.&lt;br /&gt;
	 *&lt;br /&gt;
	 * @return      string  An SQL query&lt;br /&gt;
	 */&lt;br /&gt;
	protected function getListQuery()&lt;br /&gt;
	{&lt;br /&gt;
		// Initialize variables.&lt;br /&gt;
		$db    = JFactory::getDbo();&lt;br /&gt;
		$query = $db-&amp;gt;getQuery(true);&lt;br /&gt;
&lt;br /&gt;
		// Create the base select statement.&lt;br /&gt;
		$query-&amp;gt;select(&#039;a.id as id, a.greeting as greeting, a.published as published, a.created as created&#039;)&lt;br /&gt;
			  -&amp;gt;from($db-&amp;gt;quoteName(&#039;#__helloworld&#039;, &#039;a&#039;));&lt;br /&gt;
&lt;br /&gt;
		// Join over the categories.&lt;br /&gt;
		$query-&amp;gt;select($db-&amp;gt;quoteName(&#039;c.title&#039;, &#039;category_title&#039;))&lt;br /&gt;
			-&amp;gt;join(&#039;LEFT&#039;, $db-&amp;gt;quoteName(&#039;#__categories&#039;, &#039;c&#039;) . &#039; ON c.id = a.catid&#039;);&lt;br /&gt;
        &lt;br /&gt;
		// Join with users table to get the username of the author&lt;br /&gt;
		$query-&amp;gt;select($db-&amp;gt;quoteName(&#039;u.username&#039;, &#039;author&#039;))&lt;br /&gt;
			-&amp;gt;join(&#039;LEFT&#039;, $db-&amp;gt;quoteName(&#039;#__users&#039;, &#039;u&#039;) . &#039; ON u.id = a.created_by&#039;);&lt;br /&gt;
            &lt;br /&gt;
		// Filter: like / search&lt;br /&gt;
		$search = $this-&amp;gt;getState(&#039;filter.search&#039;);&lt;br /&gt;
&lt;br /&gt;
		if (!empty($search))&lt;br /&gt;
		{&lt;br /&gt;
			$like = $db-&amp;gt;quote(&#039;%&#039; . $search . &#039;%&#039;);&lt;br /&gt;
			$query-&amp;gt;where(&#039;greeting LIKE &#039; . $like);&lt;br /&gt;
		}&lt;br /&gt;
&lt;br /&gt;
		// Filter by published state&lt;br /&gt;
		$published = $this-&amp;gt;getState(&#039;filter.published&#039;);&lt;br /&gt;
&lt;br /&gt;
		if (is_numeric($published))&lt;br /&gt;
		{&lt;br /&gt;
			$query-&amp;gt;where(&#039;a.published = &#039; . (int) $published);&lt;br /&gt;
		}&lt;br /&gt;
		elseif ($published === &#039;&#039;)&lt;br /&gt;
		{&lt;br /&gt;
			$query-&amp;gt;where(&#039;(a.published IN (0, 1))&#039;);&lt;br /&gt;
		}&lt;br /&gt;
&lt;br /&gt;
		// Add the list ordering clause.&lt;br /&gt;
		$orderCol	= $this-&amp;gt;state-&amp;gt;get(&#039;list.ordering&#039;, &#039;greeting&#039;);&lt;br /&gt;
		$orderDirn 	= $this-&amp;gt;state-&amp;gt;get(&#039;list.direction&#039;, &#039;asc&#039;);&lt;br /&gt;
&lt;br /&gt;
		$query-&amp;gt;order($db-&amp;gt;escape($orderCol) . &#039; &#039; . $db-&amp;gt;escape($orderDirn));&lt;br /&gt;
&lt;br /&gt;
		return $query;&lt;br /&gt;
	}&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&amp;lt;/span&amp;gt;&lt;br /&gt;
&amp;lt;translate&amp;gt;&lt;br /&gt;
==Updated Language Strings== &amp;lt;!--T:55--&amp;gt;&lt;br /&gt;
&amp;lt;/translate&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span id=&amp;quot;site/language/en-GB/en-GB.com_helloworld.ini&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;tt&amp;gt;site/language/en-GB/en-GB.com_helloworld.ini&amp;lt;/tt&amp;gt;&lt;br /&gt;
&amp;lt;source lang=&amp;quot;text&amp;quot; highlight=&amp;quot;1-20&amp;quot;&amp;gt;&lt;br /&gt;
; add new message form&lt;br /&gt;
COM_HELLOWORLD_LEGEND_DETAILS=&amp;quot;New Helloworld Message Details&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_HELLOWORLD_CREATING=&amp;quot;Add message&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_HELLOWORLD_ERROR_UNACCEPTABLE=&amp;quot;Sorry, you have an error&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_HELLOWORLD_DETAILS=&amp;quot;Message details&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_HELLOWORLD_GREETING_LABEL=&amp;quot;Greeting&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_HELLOWORLD_GREETING_DESC=&amp;quot;Please specify the greeting to add&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_HELLOWORLD_GREETING_HINT=&amp;quot;Letters only!&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_HELLOWORLD_FIELD_CATID_LABEL=&amp;quot;Category&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_HELLOWORLD_FIELD_CATID_DESC=&amp;quot;Please select the associated category&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_HELLOWORLD_MESSAGE_LABEL=&amp;quot;Reason&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_HELLOWORLD_MESSAGE_DESC=&amp;quot;Please say why you&#039;re adding this greeting&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_HELLOWORLD_MESSAGE_HINT=&amp;quot;No HTML tags!&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_HELLOWORLD_FIELD_CAPTCHA_LABEL=&amp;quot;Spam protection&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_HELLOWORLD_FIELD_CAPTCHA_DESC=&amp;quot;Prove you&#039;re a real person!&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_HELLOWORLD_FIELD_SHOW_CATEGORY_LABEL=&amp;quot;Display category or not?&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_HELLOWORLD_FIELD_SHOW_CATEGORY_DESC=&amp;quot;Select if you want the category displayed too&amp;quot;&lt;br /&gt;
; save and cancel confirmation messages&lt;br /&gt;
COM_HELLOWORLD_ADD_SUCCESSFUL=&amp;quot;New greeting successfully saved&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_ADD_CANCELLED=&amp;quot;New greeting cancelled ok&amp;quot;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span id=&amp;quot;admin/language/en-GB/en-GB.com_helloworld.sys.ini&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;tt&amp;gt;admin/language/en-GB/en-GB.com_helloworld.sys.ini&amp;lt;/tt&amp;gt;&lt;br /&gt;
&amp;lt;source lang=&amp;quot;text&amp;quot; highlight=&amp;quot;10-11&amp;quot;&amp;gt;&lt;br /&gt;
; Joomla! Project&lt;br /&gt;
; Copyright (C) 2005 - 2018 Open Source Matters. All rights reserved.&lt;br /&gt;
; License GNU General Public License version 2 or later; see LICENSE.txt, see LICENSE.php&lt;br /&gt;
; Note : All ini files need to be saved as UTF-8&lt;br /&gt;
&lt;br /&gt;
COM_HELLOWORLD=&amp;quot;Hello World!&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_DESCRIPTION=&amp;quot;This is the Hello World description&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_HELLOWORLD_VIEW_DEFAULT_TITLE=&amp;quot;Hello World&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_HELLOWORLD_VIEW_DEFAULT_DESC=&amp;quot;This view displays a selected message&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_ADD_VIEW_TITLE=&amp;quot;Hello World form&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_ADD_VIEW_DESC=&amp;quot;This displays a form to allow the user to enter a new message&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_INSTALL_TEXT=&amp;quot;HelloWorld Install script&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_MENU=&amp;quot;Hello World!&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_POSTFLIGHT_DISCOVER_INSTALL_TEXT=&amp;quot;HelloWorld postflight discover install script&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_POSTFLIGHT_INSTALL_TEXT=&amp;quot;HelloWorld postflight install script&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_POSTFLIGHT_UNINSTALL_TEXT=&amp;quot;HelloWorld postflight uninstall script&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_POSTFLIGHT_UPDATE_TEXT=&amp;quot;HelloWorld postflight update script&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_PREFLIGHT_DISCOVER_INSTALL_TEXT=&amp;quot;HelloWorld preflight discover install script&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_PREFLIGHT_INSTALL_TEXT=&amp;quot;HelloWorld preflight install script&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_PREFLIGHT_UNINSTALL_TEXT=&amp;quot;HelloWorld preflight uninstall script&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_PREFLIGHT_UPDATE_TEXT=&amp;quot;HelloWorld preflight update script&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_UNINSTALL_TEXT=&amp;quot;HelloWorld Uninstall script&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_UPDATE_TEXT=&amp;quot;HelloWorld Update script. HelloWorld now updated to version %s.&amp;quot;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span id=&amp;quot;admin/language/en-GB/en-GB.com_helloworld.ini&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;tt&amp;gt;admin/language/en-GB/en-GB.com_helloworld.ini&amp;lt;/tt&amp;gt;&lt;br /&gt;
&amp;lt;source lang=&amp;quot;text&amp;quot; highlight=&amp;quot;10-11,43-46,58-66&amp;quot;&amp;gt;&lt;br /&gt;
; Joomla! Project&lt;br /&gt;
; Copyright (C) 2005 - 2018 Open Source Matters. All rights reserved.&lt;br /&gt;
; License GNU General Public License version 2 or later; see LICENSE.txt, see LICENSE.php&lt;br /&gt;
; Note : All ini files need to be saved as UTF-8&lt;br /&gt;
&lt;br /&gt;
COM_HELLOWORLD_ADMINISTRATION=&amp;quot;HelloWorld - Administration&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_ADMINISTRATION_CATEGORIES=&amp;quot;HelloWorld - Categories&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_NUM=&amp;quot;#&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_HELLOWORLDS_FILTER=&amp;quot;Filters&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_AUTHOR=&amp;quot;Author&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_CREATED_DATE=&amp;quot;Created&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_PUBLISHED=&amp;quot;Published&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_HELLOWORLDS_NAME=&amp;quot;Name&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_ID=&amp;quot;Id&amp;quot;&lt;br /&gt;
&lt;br /&gt;
COM_HELLOWORLD_HELLOWORLD_CREATING=&amp;quot;HelloWorld - Creating&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_HELLOWORLD_DETAILS=&amp;quot;Details&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_HELLOWORLD_EDITING=&amp;quot;HelloWorld - Editing&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_HELLOWORLD_ERROR_UNACCEPTABLE=&amp;quot;Some values are unacceptable&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_HELLOWORLD_FIELD_CATID_DESC=&amp;quot;The category the messages belongs to&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_HELLOWORLD_FIELD_CATID_LABEL=&amp;quot;Category&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_HELLOWORLD_FIELD_GREETING_DESC=&amp;quot;This message will be displayed&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_HELLOWORLD_FIELD_GREETING_LABEL=&amp;quot;Message&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_HELLOWORLD_FIELD_SHOW_CATEGORY_LABEL=&amp;quot;Show category&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_HELLOWORLD_FIELD_SHOW_CATEGORY_DESC=&amp;quot;If set to Show, the title of the message&amp;amp;rsquo;s category will show.&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_HELLOWORLD_HEADING_GREETING=&amp;quot;Greeting&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_HELLOWORLD_HEADING_ID=&amp;quot;Id&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_MANAGER_HELLOWORLD_EDIT=&amp;quot;HelloWorld manager: Edit Message&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_MANAGER_HELLOWORLD_NEW=&amp;quot;HelloWorld manager: New Message&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_MANAGER_HELLOWORLDS=&amp;quot;HelloWorld manager&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_EDIT_HELLOWORLD=&amp;quot;Edit message&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_N_ITEMS_DELETED_1=&amp;quot;One message deleted&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_N_ITEMS_DELETED_MORE=&amp;quot;%d messages deleted&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_N_ITEMS_PUBLISHED=&amp;quot;%d message(s) published&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_N_ITEMS_UNPUBLISHED=&amp;quot;%d message(s) unpublished&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_HELLOWORLD_GREETING_LABEL=&amp;quot;Greeting&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_HELLOWORLD_GREETING_DESC=&amp;quot;Add Hello World Greeting&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_SUBMENU_MESSAGES=&amp;quot;Messages&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_SUBMENU_CATEGORIES=&amp;quot;Categories&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_CONFIGURATION=&amp;quot;HelloWorld Configuration&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_CONFIG_GREETING_SETTINGS_LABEL=&amp;quot;Messages settings&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_CONFIG_GREETING_SETTINGS_DESC=&amp;quot;Settings that will be applied to all messages by default&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_HELLOWORLD_FIELD_CAPTCHA_LABEL=&amp;quot;Captcha&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_HELLOWORLD_FIELD_CAPTCHA_DESC=&amp;quot;Select Captcha to use on front end form&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_HELLOWORLD_FIELD_USER_TO_EMAIL_LABEL=&amp;quot;User to email&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_HELLOWORLD_FIELD_USER_TO_EMAIL_DESC=&amp;quot;Select user to email when a new message is entered on front end&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_FIELDSET_RULES=&amp;quot;Message Permissions&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_FIELD_RULES_LABEL=&amp;quot;Permissions&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_ACCESS_DELETE_DESC=&amp;quot;Is this group allowed to edit this message?&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_ACCESS_DELETE_DESC=&amp;quot;Is this group allowed to delete this message?&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_TAB_NEW_MESSAGE=&amp;quot;New Message&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_TAB_EDIT_MESSAGE=&amp;quot;Message Details&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_TAB_PARAMS=&amp;quot;Parameters&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_TAB_PERMISSIONS=&amp;quot;Permissions&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_LEGEND_DETAILS=&amp;quot;Message Details&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_LEGEND_PARAMS=&amp;quot;Message Parameters&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_LEGEND_PERMISSIONS=&amp;quot;Message Permissions&amp;quot;&lt;br /&gt;
; Column ordering in the Helloworlds view&lt;br /&gt;
COM_HELLOWORLD_ORDERING_ASC=&amp;quot;Greeting ascending&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_ORDERING_DESC=&amp;quot;Greeting descending&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_AUTHOR_ASC=&amp;quot;Author ascending&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_AUTHOR_DESC=&amp;quot;Author descending&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_CREATED_ASC=&amp;quot;Creation date ascending&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_CREATED_DESC=&amp;quot;Creation date descending&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_PUBLISHED_ASC=&amp;quot;Unpublished first&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_PUBLISHED_DESC=&amp;quot;Published first&amp;quot;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;translate&amp;gt;&lt;br /&gt;
==Packaging the Component== &amp;lt;!--T:56--&amp;gt;&lt;br /&gt;
&amp;lt;/translate&amp;gt;&lt;br /&gt;
&amp;lt;translate&amp;gt;&amp;lt;!--T:57--&amp;gt; Contents of your code directory. Each file link below takes you to the step in the tutorial which has the latest version of that source code file.&amp;lt;/translate&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Adding_a_front-end_form#helloworld.xml|helloworld.xml]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Adding an install-uninstall-update script file#script.php|script.php]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Adding_a_view_to_the_site_part#site/helloworld.php|site/helloworld.php]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Developing_a_Basic_Component#index.html|site/index.html]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Adding_a_view_to_the_site_part#site/controller.php|site/controller.php]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Adding_a_front-end_form#site/controllers/helloworld.php|site/controllers/helloworld.php]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Developing_a_Basic_Component#index.html|site/views/index.html]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Developing_a_Basic_Component#index.html|site/views/helloworld/index.html]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Adding_configuration#site/views/helloworld/view.html.php|site/views/helloworld/view.html.php]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Developing_a_Basic_Component#index.html|site/views/helloworld/tmpl/index.html]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Using_the_database#site/views/helloworld/tmpl/default.xml|site/views/helloworld/tmpl/default.xml]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Adding_configuration#site/views/helloworld/tmpl/default.php|site/views/helloworld/tmpl/default.php]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Developing_a_Basic_Component#index.html|site/views/form/index.html]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Adding_a_front-end_form#site/views/form/view.html.php|site/views/form/view.html.php]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Developing_a_Basic_Component#index.html|site/views/form/tmpl/index.html]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Adding_a_front-end_form#site/views/form/tmpl/edit.php|site/views/form/tmpl/edit.php]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Adding_a_front-end_form#site/views/form/tmpl/edit.xml|site/views/form/tmpl/edit.xml]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Developing_a_Basic_Component#index.html|site/models/index.html]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Adding_configuration#site/models/helloworld.php|site/models/helloworld.php]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Adding_a_front-end_form#site/models/form.php|site/models/form.php]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Developing_a_Basic_Component#index.html|site/models/forms/index.html]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Adding_a_front-end_form#site/models/forms/add-form.xml|site/models/forms/add-form.xml]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Developing_a_Basic_Component#index.html|site/language/index.html]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Developing_a_Basic_Component#index.html|site/language/en-GB/index.html]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.x:Developing an MVC Component/Adding_a_front-end_form#site/language/en-GB/en-GB.com_helloworld.ini|site/language/en-GB/en-GB.com_helloworld.ini]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Developing_a_Basic_Component#index.html|admin/index.html]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Adding_ACL#admin/helloworld.php|admin/helloworld.php]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Adding_ACL#admin/config.xml|admin/config.xml]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Basic_backend#admin/controller.php|admin/controller.php]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Adding_ACL#admin/access.xml|admin/access.xml]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Adding_categories#admin/helpers/helloworld.php|admin/helpers/helloworld.php]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Developing_a_Basic_Component#index.html|admin/helpers/index.html]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Developing_a_Basic_Component#index.html|admin/sql/index.html]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Adding_a_front-end_form#admin/sql/install.mysql.utf8.sql|admin/sql/install.mysql.utf8.sql]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Using_the_database#admin/sql/uninstall.mysql.utf8.sql|admin/sql/uninstall.mysql.utf8.sql]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Developing_a_Basic_Component#index.html|admin/sql/updates/index.html]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Developing_a_Basic_Component#index.html|admin/sql/updates/mysql/index.html]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Developing_a_Basic_Component#admin/sql/updates/mysql/0.0.1.sql|admin/sql/updates/mysql/0.0.1.sql]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Using_the_database#admin/sql/install.mysql.utf8.sql|admin/sql/updates/mysql/0.0.6.sql]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Adding_categories#admin/sql/updates/mysql/0.0.12.sql|admin/sql/updates/mysql/0.0.12.sql]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Adding_configuration#admin/sql/updates/mysql/0.0.13.sql|admin/sql/updates/mysql/0.0.13.sql]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Adding_ACL#admin/sql/updates/mysql/0.0.14.sql|admin/sql/updates/mysql/0.0.14.sql]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Adding_a_front-end_form#admin/sql/updates/mysql/0.0.16.sql|admin/sql/updates/mysql/0.0.16.sql]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Developing_a_Basic_Component#index.html|admin/models/index.html]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Developing_a_Basic_Component#index.html|admin/models/fields/index.html]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Adding_categories#admin/models/fields/helloworld.php|admin/models/fields/helloworld.php]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Adding_a_front-end_form#admin/models/helloworlds.php|admin/models/helloworlds.php]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Adding_ACL#admin/models/helloworld.php|admin/models/helloworld.php]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Adding_a_front-end_form#admin/models/forms/filter_helloworlds.xml|admin/models/forms/filter_helloworlds.xml]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Developing_a_Basic_Component#index.html|admin/models/forms/index.html]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Adding_verifications#admin/models/forms/helloworld.js|admin/models/forms/helloworld.js]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Adding_ACL#admin/models/forms/helloworld.xml|admin/models/forms/helloworld.xml]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Adding_verifications#admin/models/rules/greeting.php|admin/models/rules/greeting.php]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Developing_a_Basic_Component#index.html|admin/models/rules/index.html]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Adding_ACL#admin/controllers/helloworld.php|admin/controllers/helloworld.php]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Adding_backend_actions#admin/controllers/helloworlds.php|admin/controllers/helloworlds.php]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Developing_a_Basic_Component#index.html|admin/controllers/index.html]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Developing_a_Basic_Component#index.html|admin/views/index.html]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Developing_a_Basic_Component#index.html|admin/views/helloworld/index.html]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Adding_ACL#admin/views/helloworld/view.html.php|admin/views/helloworld/view.html.php]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Developing_a_Basic_Component#index.html|admin/views/helloworld/tmpl/index.html]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Adding_ACL#admin/views/helloworld/tmpl/edit.php|admin/views/helloworld/tmpl/edit.php]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Adding_verifications#admin/views/helloworld/submitbutton.js|admin/views/helloworld/submitbutton.js]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Developing_a_Basic_Component#index.html|admin/views/helloworlds/index.html]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Adding_a_front-end_form#admin/views/helloworlds/view.html.php|admin/views/helloworlds/view.html.php]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Developing_a_Basic_Component#index.html|admin/views/helloworlds/tmpl/index.html]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Adding_a_front-end_form#admin/views/helloworlds/tmpl/default.php|admin/views/helloworlds/tmpl/default.php]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Developing_a_Basic_Component#index.html|admin/tables/index.html]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Adding_ACL#admin/tables/helloworld.php|admin/tables/helloworld.php]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Developing_a_Basic_Component#index.html|admin/language/index.html]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Developing_a_Basic_Component#index.html|admin/language/en-GB/index.html]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.x:Developing an MVC Component/Adding_a_front-end_form#admin.2Flanguage.2Fen-GB.2Fen-GB.com_helloworld.ini|admin/language/en-GB/en-GB.com_helloworld.ini]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.x:Developing an MVC Component/Adding_a_front-end_form#admin.2Flanguage.2Fen-GB.2Fen-GB.com_helloworld.sys.ini|admin/language/en-GB/en-GB.com_helloworld.sys.ini]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Developing_a_Basic_Component#index.html|media/index.html]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Developing_a_Basic_Component#index.html|media/images/index.html]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.x:Developing_an_MVC_Component/Adding_decorations_to_the_backend#Adding_some_icons|media/images/tux-16x16.png]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.x:Developing_an_MVC_Component/Adding_decorations_to_the_backend#Adding_some_icons|media/images/tux-48x48.png]]&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span id=&amp;quot;helloworld.xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;tt&amp;gt;helloworld.xml&amp;lt;/tt&amp;gt;&lt;br /&gt;
&amp;lt;source lang=&amp;quot;xml&amp;quot; highlight=&amp;quot;13,44&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;?xml version=&amp;quot;1.0&amp;quot; encoding=&amp;quot;utf-8&amp;quot;?&amp;gt;&lt;br /&gt;
&amp;lt;extension type=&amp;quot;component&amp;quot; version=&amp;quot;3.0&amp;quot; method=&amp;quot;upgrade&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
	&amp;lt;name&amp;gt;COM_HELLOWORLD&amp;lt;/name&amp;gt;&lt;br /&gt;
	&amp;lt;!-- The following elements are optional and free of formatting constraints --&amp;gt;&lt;br /&gt;
	&amp;lt;creationDate&amp;gt;January 2018&amp;lt;/creationDate&amp;gt;&lt;br /&gt;
	&amp;lt;author&amp;gt;John Doe&amp;lt;/author&amp;gt;&lt;br /&gt;
	&amp;lt;authorEmail&amp;gt;john.doe@example.org&amp;lt;/authorEmail&amp;gt;&lt;br /&gt;
	&amp;lt;authorUrl&amp;gt;http://www.example.org&amp;lt;/authorUrl&amp;gt;&lt;br /&gt;
	&amp;lt;copyright&amp;gt;Copyright Info&amp;lt;/copyright&amp;gt;&lt;br /&gt;
	&amp;lt;license&amp;gt;License Info&amp;lt;/license&amp;gt;&lt;br /&gt;
	&amp;lt;!--  The version string is recorded in the components table --&amp;gt;&lt;br /&gt;
	&amp;lt;version&amp;gt;0.0.16&amp;lt;/version&amp;gt;&lt;br /&gt;
	&amp;lt;!-- The description is optional and defaults to the name --&amp;gt;&lt;br /&gt;
	&amp;lt;description&amp;gt;COM_HELLOWORLD_DESCRIPTION&amp;lt;/description&amp;gt;&lt;br /&gt;
&lt;br /&gt;
	&amp;lt;!-- Runs on install/uninstall/update; New in 2.5 --&amp;gt;&lt;br /&gt;
	&amp;lt;scriptfile&amp;gt;script.php&amp;lt;/scriptfile&amp;gt;&lt;br /&gt;
&lt;br /&gt;
	&amp;lt;install&amp;gt; &amp;lt;!-- Runs on install --&amp;gt;&lt;br /&gt;
		&amp;lt;sql&amp;gt;&lt;br /&gt;
			&amp;lt;file driver=&amp;quot;mysql&amp;quot; charset=&amp;quot;utf8&amp;quot;&amp;gt;sql/install.mysql.utf8.sql&amp;lt;/file&amp;gt;&lt;br /&gt;
		&amp;lt;/sql&amp;gt;&lt;br /&gt;
	&amp;lt;/install&amp;gt;&lt;br /&gt;
	&amp;lt;uninstall&amp;gt; &amp;lt;!-- Runs on uninstall --&amp;gt;&lt;br /&gt;
		&amp;lt;sql&amp;gt;&lt;br /&gt;
			&amp;lt;file driver=&amp;quot;mysql&amp;quot; charset=&amp;quot;utf8&amp;quot;&amp;gt;sql/uninstall.mysql.utf8.sql&amp;lt;/file&amp;gt;&lt;br /&gt;
		&amp;lt;/sql&amp;gt;&lt;br /&gt;
	&amp;lt;/uninstall&amp;gt;&lt;br /&gt;
	&amp;lt;update&amp;gt; &amp;lt;!-- Runs on update; New since J2.5 --&amp;gt;&lt;br /&gt;
		&amp;lt;schemas&amp;gt;&lt;br /&gt;
			&amp;lt;schemapath type=&amp;quot;mysql&amp;quot;&amp;gt;sql/updates/mysql&amp;lt;/schemapath&amp;gt;&lt;br /&gt;
		&amp;lt;/schemas&amp;gt;&lt;br /&gt;
	&amp;lt;/update&amp;gt;&lt;br /&gt;
&lt;br /&gt;
	&amp;lt;!-- Site Main File Copy Section --&amp;gt;&lt;br /&gt;
	&amp;lt;!-- Note the folder attribute: This attribute describes the folder&lt;br /&gt;
		to copy FROM in the package to install therefore files copied&lt;br /&gt;
		in this section are copied from /site/ in the package --&amp;gt;&lt;br /&gt;
	&amp;lt;files folder=&amp;quot;site&amp;quot;&amp;gt;&lt;br /&gt;
		&amp;lt;filename&amp;gt;index.html&amp;lt;/filename&amp;gt;&lt;br /&gt;
		&amp;lt;filename&amp;gt;helloworld.php&amp;lt;/filename&amp;gt;&lt;br /&gt;
		&amp;lt;filename&amp;gt;controller.php&amp;lt;/filename&amp;gt;&lt;br /&gt;
		&amp;lt;folder&amp;gt;controllers&amp;lt;/folder&amp;gt;&lt;br /&gt;
		&amp;lt;folder&amp;gt;views&amp;lt;/folder&amp;gt;&lt;br /&gt;
		&amp;lt;folder&amp;gt;models&amp;lt;/folder&amp;gt;&lt;br /&gt;
	&amp;lt;/files&amp;gt;&lt;br /&gt;
&lt;br /&gt;
        &amp;lt;languages folder=&amp;quot;site/language&amp;quot;&amp;gt;&lt;br /&gt;
		&amp;lt;language tag=&amp;quot;en-GB&amp;quot;&amp;gt;en-GB/en-GB.com_helloworld.ini&amp;lt;/language&amp;gt;&lt;br /&gt;
        &amp;lt;/languages&amp;gt;&lt;br /&gt;
&lt;br /&gt;
	&amp;lt;media destination=&amp;quot;com_helloworld&amp;quot; folder=&amp;quot;media&amp;quot;&amp;gt;&lt;br /&gt;
		&amp;lt;filename&amp;gt;index.html&amp;lt;/filename&amp;gt;&lt;br /&gt;
		&amp;lt;folder&amp;gt;images&amp;lt;/folder&amp;gt;&lt;br /&gt;
	&amp;lt;/media&amp;gt;&lt;br /&gt;
&lt;br /&gt;
	&amp;lt;administration&amp;gt;&lt;br /&gt;
		&amp;lt;!-- Administration Menu Section --&amp;gt;&lt;br /&gt;
		&amp;lt;menu link=&#039;index.php?option=com_helloworld&#039; img=&amp;quot;../media/com_helloworld/images/tux-16x16.png&amp;quot;&amp;gt;COM_HELLOWORLD_MENU&amp;lt;/menu&amp;gt;&lt;br /&gt;
		&amp;lt;!-- Administration Main File Copy Section --&amp;gt;&lt;br /&gt;
		&amp;lt;!-- Note the folder attribute: This attribute describes the folder&lt;br /&gt;
			to copy FROM in the package to install therefore files copied&lt;br /&gt;
			in this section are copied from /admin/ in the package --&amp;gt;&lt;br /&gt;
		&amp;lt;files folder=&amp;quot;admin&amp;quot;&amp;gt;&lt;br /&gt;
			&amp;lt;!-- Admin Main File Copy Section --&amp;gt;&lt;br /&gt;
			&amp;lt;filename&amp;gt;index.html&amp;lt;/filename&amp;gt;&lt;br /&gt;
			&amp;lt;filename&amp;gt;config.xml&amp;lt;/filename&amp;gt;&lt;br /&gt;
			&amp;lt;filename&amp;gt;helloworld.php&amp;lt;/filename&amp;gt;&lt;br /&gt;
			&amp;lt;filename&amp;gt;controller.php&amp;lt;/filename&amp;gt;&lt;br /&gt;
			&amp;lt;filename&amp;gt;access.xml&amp;lt;/filename&amp;gt;&lt;br /&gt;
			&amp;lt;!-- SQL files section --&amp;gt;&lt;br /&gt;
			&amp;lt;folder&amp;gt;sql&amp;lt;/folder&amp;gt;&lt;br /&gt;
			&amp;lt;!-- tables files section --&amp;gt;&lt;br /&gt;
			&amp;lt;folder&amp;gt;tables&amp;lt;/folder&amp;gt;&lt;br /&gt;
			&amp;lt;!-- models files section --&amp;gt;&lt;br /&gt;
			&amp;lt;folder&amp;gt;models&amp;lt;/folder&amp;gt;&lt;br /&gt;
			&amp;lt;!-- views files section --&amp;gt;&lt;br /&gt;
			&amp;lt;folder&amp;gt;views&amp;lt;/folder&amp;gt;&lt;br /&gt;
			&amp;lt;!-- controllers files section --&amp;gt;&lt;br /&gt;
			&amp;lt;folder&amp;gt;controllers&amp;lt;/folder&amp;gt;&lt;br /&gt;
			&amp;lt;!-- helpers files section --&amp;gt;&lt;br /&gt;
			&amp;lt;folder&amp;gt;helpers&amp;lt;/folder&amp;gt;&lt;br /&gt;
		&amp;lt;/files&amp;gt;&lt;br /&gt;
		&amp;lt;languages folder=&amp;quot;admin/language&amp;quot;&amp;gt;&lt;br /&gt;
        		&amp;lt;language tag=&amp;quot;en-GB&amp;quot;&amp;gt;en-GB/en-GB.com_helloworld.ini&amp;lt;/language&amp;gt;&lt;br /&gt;
                        &amp;lt;language tag=&amp;quot;en-GB&amp;quot;&amp;gt;en-GB/en-GB.com_helloworld.sys.ini&amp;lt;/language&amp;gt;&lt;br /&gt;
		&amp;lt;/languages&amp;gt;&lt;br /&gt;
	&amp;lt;/administration&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/extension&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;translate&amp;gt;&lt;br /&gt;
== Contributors == &amp;lt;!--T:58--&amp;gt;&lt;br /&gt;
&amp;lt;/translate&amp;gt;&lt;br /&gt;
*[[User:Robbiej|Robbie Jackson]]&lt;br /&gt;
&lt;br /&gt;
{{-}}&lt;br /&gt;
&amp;lt;div class=&amp;quot;row&amp;quot;&amp;gt; &lt;br /&gt;
&amp;lt;div class=&amp;quot;large-6 columns&amp;quot;&amp;gt;{{Basic button|&amp;lt;translate&amp;gt;&amp;lt;!--T:4--&amp;gt; S:MyLanguage/J3.x:Developing_an_MVC_Component/Adding_an_install-uninstall-update_script_file|Prev: Adding an install-uninstall-update script file&amp;lt;/translate&amp;gt;|class=expand success}}&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;div class=&amp;quot;large-6 columns&amp;quot;&amp;gt;{{Basic button|&amp;lt;translate&amp;gt;&amp;lt;!--T:5--&amp;gt; S:MyLanguage/J3.x:Developing_an_MVC_Component/Adding an Image|Next: Adding an image&amp;lt;/translate&amp;gt;|class=expand}}&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;noinclude&amp;gt;&lt;br /&gt;
[[Category:Joomla! 3.x{{#translation:}}]]&lt;br /&gt;
[[Category:Joomla! 3.0{{#translation:}}]]&lt;br /&gt;
[[Category:Joomla! 3.1{{#translation:}}]]&lt;br /&gt;
[[Category:Joomla! 3.2{{#translation:}}]]&lt;br /&gt;
[[Category:Joomla! 3.3{{#translation:}}]]&lt;br /&gt;
[[Category:Joomla! 3.4{{#translation:}}]]&lt;br /&gt;
[[Category:Beginner Development{{#translation:}}]]&lt;br /&gt;
[[Category:Component Development{{#translation:}}]]&lt;br /&gt;
[[Category:Tutorials{{#translation:}}]]&lt;br /&gt;
[[Category:Tutorials in a Series{{#translation:}}]]&lt;br /&gt;
&amp;lt;/noinclude&amp;gt;&lt;/div&gt;</summary>
		<author><name>Stan31337</name></author>
	</entry>
	<entry>
		<id>https://docs.sandbox.joomla.org/index.php?title=J3.x:Developing_an_MVC_Component/Adding_ACL&amp;diff=588830</id>
		<title>J3.x:Developing an MVC Component/Adding ACL</title>
		<link rel="alternate" type="text/html" href="https://docs.sandbox.joomla.org/index.php?title=J3.x:Developing_an_MVC_Component/Adding_ACL&amp;diff=588830"/>
		<updated>2019-01-29T03:18:50Z</updated>

		<summary type="html">&lt;p&gt;Stan31337: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;noinclude&amp;gt;&amp;lt;languages /&amp;gt;&amp;lt;/noinclude&amp;gt;&lt;br /&gt;
{{review}}&lt;br /&gt;
{{:J3.1:Developing an MVC Component/&amp;lt;translate&amp;gt;&amp;lt;!--T:1--&amp;gt;&lt;br /&gt;
en&amp;lt;/translate&amp;gt;}}&lt;br /&gt;
&amp;lt;translate&amp;gt;== Introduction == &amp;lt;!--T:2--&amp;gt;&amp;lt;/translate&amp;gt;&lt;br /&gt;
&amp;lt;translate&amp;gt;&amp;lt;!--T:3--&amp;gt;&lt;br /&gt;
This tutorial is part of the [[S:MyLanguage/J3.2:Developing an MVC Component | Developing an MVC Component for Joomla! 3.2]] tutorial. You are encouraged to read the previous parts of the tutorial before reading this.&amp;lt;/translate&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;translate&amp;gt;== Adding Access Control == &amp;lt;!--T:4--&amp;gt;&amp;lt;/translate&amp;gt;&lt;br /&gt;
&amp;lt;translate&amp;gt;&amp;lt;!--T:5--&amp;gt;&lt;br /&gt;
With Joomla!&#039;s Access Control we can define which user groups are allowed or denied to do which actions in your component. In this example we use actions that are defined in the core. For the component as a whole: core.admin (access to the configuration) and core.manage (access to the backend). And at various levels actions like create, delete and edit. Besides those core actions you can define your own actions, but that is often not necessary and is not shown in this example. View/Read Access is not managed via those actions but with View Access Levels; see general documentation about Joomla!&#039;s ACL for that.&amp;lt;/translate&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;translate&amp;gt;&amp;lt;!--T:6--&amp;gt;&lt;br /&gt;
In the #__assets table the actual list is stored: which user groups are allowed or denied to do which actions on which resources (assets). This is the implementation of the Access Control List (ACL).&amp;lt;/translate&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;translate&amp;gt;&amp;lt;!--T:7--&amp;gt;&lt;br /&gt;
In this article we will show how to add and use access permissions at several levels of granularity: for your component as a whole, for the categories and for the individual items.&amp;lt;/translate&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;translate&amp;gt;&lt;br /&gt;
&amp;lt;!--T:97--&amp;gt;&lt;br /&gt;
To test this functionality create users and associate them with the user groups which have access to the back end admin functionality (ie those user groups which have Administrator Login permission in the Global Configuration Permission Settings). By default this is Manager and Administrator, but you can also define your own user groups, and optionally set them as children of Manager or Administrator.&amp;lt;/translate&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;translate&amp;gt;&lt;br /&gt;
&amp;lt;!--T:98--&amp;gt;&lt;br /&gt;
If you&#039;re not already very familiar with Joomla Access Control then it&#039;s recommended to watch this video [https://youtu.be/CFqXAc3orkY ACL Explained] (between 2 minutes and 32 minutes is the section to watch) and read this [[S:MyLanguage/J3.x:Access_Control_List_Tutorial|Access Control List Tutorial]].&lt;br /&gt;
&amp;lt;/translate&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;translate&amp;gt;&amp;lt;!--T:101--&amp;gt; Three videos associated with this tutorial step cover Joomla&#039;s [https://youtu.be/kOqWcSF-p5Q Access Control Infrastructure], an explanation of this step&#039;s [https://youtu.be/sljTur6zMOs tutorial code] and a supplementary video on [https://youtu.be/CS_Ok1t550E Access View Levels].&amp;lt;/translate&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;translate&amp;gt;&lt;br /&gt;
== Minimal ACL requirements at the component level == &amp;lt;!--T:10--&amp;gt;&lt;br /&gt;
&amp;lt;/translate&amp;gt;&lt;br /&gt;
&amp;lt;translate&amp;gt;&amp;lt;!--T:11--&amp;gt;&lt;br /&gt;
There are 2 actions that need to be defined at the component level for a Joomla! 2.5+ component to offer basic ACL support:&amp;lt;/translate&amp;gt;&lt;br /&gt;
&amp;lt;translate&amp;gt;&amp;lt;!--T:12--&amp;gt;&lt;br /&gt;
* &#039;&#039;&#039;Configure&#039;&#039;&#039; (core.admin): which groups are allowed to configure the component level permissions via the &#039;Options&#039; toolbar button?&amp;lt;/translate&amp;gt;&lt;br /&gt;
&amp;lt;translate&amp;gt;&amp;lt;!--T:13--&amp;gt;&lt;br /&gt;
* &#039;&#039;&#039;Access Component&#039;&#039;&#039; (core.manage): which groups are allowed to access the component&#039;s backend?&amp;lt;/translate&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;translate&amp;gt;&amp;lt;!--T:14--&amp;gt;&lt;br /&gt;
This basic ACL support is done in 4 simple steps:&amp;lt;/translate&amp;gt;&lt;br /&gt;
&amp;lt;translate&amp;gt;&amp;lt;!--T:15--&amp;gt;&lt;br /&gt;
* [[#Add_the_2_minimal_component_level_actions_to_access.xml|Add the 2 minimal component level actions to access.xml]]&amp;lt;/translate&amp;gt;&lt;br /&gt;
&amp;lt;translate&amp;gt;&amp;lt;!--T:16--&amp;gt;&lt;br /&gt;
* [[#Add_the_permissions_fieldset_to_config.xml|Add the permissions fieldset to config.xml]]&amp;lt;/translate&amp;gt;&lt;br /&gt;
&amp;lt;translate&amp;gt;&amp;lt;!--T:17--&amp;gt;&lt;br /&gt;
* [[#Add_the_.27Options.27_toolbar_button_when_user_is_authorised_for_it|Add the &#039;Options&#039; toolbar button]]&amp;lt;/translate&amp;gt;&lt;br /&gt;
&amp;lt;translate&amp;gt;&amp;lt;!--T:18--&amp;gt;&lt;br /&gt;
* [[#Restrict_the_access_to_the_component.27s_backend_to_authorised_usergroups|Restrict the access to the component&#039;s backend]]&amp;lt;/translate&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;translate&amp;gt;&lt;br /&gt;
=== Add the 2 minimal component level actions to access.xml === &amp;lt;!--T:19--&amp;gt;&lt;br /&gt;
&amp;lt;/translate&amp;gt;&lt;br /&gt;
&amp;lt;translate&amp;gt;&amp;lt;!--T:20--&amp;gt;&lt;br /&gt;
A minimal ACL &amp;lt;/tt&amp;gt;access.xml&amp;lt;/tt&amp;gt; would consist of only those 2 basic actions:&amp;lt;/translate&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tt&amp;gt;Basic admin/access.xml&amp;lt;/tt&amp;gt;&lt;br /&gt;
&amp;lt;source lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;?xml version=&amp;quot;1.0&amp;quot; encoding=&amp;quot;utf-8&amp;quot; ?&amp;gt;&lt;br /&gt;
&amp;lt;access component=&amp;quot;com_helloworld&amp;quot;&amp;gt;&lt;br /&gt;
	&amp;lt;section name=&amp;quot;component&amp;quot;&amp;gt;&lt;br /&gt;
		&amp;lt;action name=&amp;quot;core.admin&amp;quot; title=&amp;quot;JACTION_ADMIN&amp;quot; description=&amp;quot;JACTION_ADMIN_COMPONENT_DESC&amp;quot; /&amp;gt;&lt;br /&gt;
		&amp;lt;action name=&amp;quot;core.manage&amp;quot; title=&amp;quot;JACTION_MANAGE&amp;quot; description=&amp;quot;JACTION_MANAGE_COMPONENT_DESC&amp;quot; /&amp;gt;&lt;br /&gt;
	&amp;lt;/section&amp;gt;&lt;br /&gt;
&amp;lt;/access&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;translate&amp;gt;&amp;lt;!--T:21--&amp;gt;&lt;br /&gt;
See &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Adding_categories#admin/access.xml|admin/access.xml]]&#039;&#039; for the current and more elaborate version.&amp;lt;/translate&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;translate&amp;gt;&lt;br /&gt;
=== Add the permissions fieldset to config.xml === &amp;lt;!--T:22--&amp;gt;&lt;br /&gt;
&amp;lt;/translate&amp;gt;&lt;br /&gt;
&amp;lt;translate&amp;gt;&amp;lt;!--T:23--&amp;gt;&lt;br /&gt;
Add the following permissions fieldset to &amp;lt;tt&amp;gt;admin/config.xml&amp;lt;/tt&amp;gt; in order to be able to set our component level permissions.&amp;lt;/translate&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
	&amp;lt;fieldset&lt;br /&gt;
		name=&amp;quot;permissions&amp;quot;&lt;br /&gt;
		label=&amp;quot;JCONFIG_PERMISSIONS_LABEL&amp;quot;&lt;br /&gt;
		description=&amp;quot;JCONFIG_PERMISSIONS_DESC&amp;quot;&lt;br /&gt;
	&amp;gt;&lt;br /&gt;
		&amp;lt;field&lt;br /&gt;
			name=&amp;quot;rules&amp;quot;&lt;br /&gt;
			type=&amp;quot;rules&amp;quot;&lt;br /&gt;
			label=&amp;quot;JCONFIG_PERMISSIONS_LABEL&amp;quot;&lt;br /&gt;
			class=&amp;quot;inputbox&amp;quot;&lt;br /&gt;
			validate=&amp;quot;rules&amp;quot;&lt;br /&gt;
			filter=&amp;quot;rules&amp;quot;&lt;br /&gt;
			component=&amp;quot;com_helloworld&amp;quot;&lt;br /&gt;
			section=&amp;quot;component&amp;quot;&lt;br /&gt;
		/&amp;gt;&lt;br /&gt;
	&amp;lt;/fieldset&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;translate&amp;gt;&amp;lt;!--T:24--&amp;gt;&lt;br /&gt;
See the [[#admin.2Fconfig.xml|more elaborate config.xml example]] further downwards for the exact place where to insert this code.&amp;lt;/translate&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;translate&amp;gt;&lt;br /&gt;
=== Add the &#039;Options&#039; toolbar button when user is authorised for it === &amp;lt;!--T:25--&amp;gt;&lt;br /&gt;
&amp;lt;/translate&amp;gt;&lt;br /&gt;
&amp;lt;translate&amp;gt;&amp;lt;!--T:26--&amp;gt;&lt;br /&gt;
In the &amp;lt;tt&amp;gt;admin/views/helloworlds/view.html.php&amp;lt;/tt&amp;gt; file you can add the following code to check if the user can edit the preferences:&amp;lt;/translate&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;php&amp;quot; highlight=&amp;quot;2-3,5&amp;quot;&amp;gt;&lt;br /&gt;
    // Options button.&lt;br /&gt;
    if (JFactory::getUser()-&amp;gt;authorise(&#039;core.admin&#039;, &#039;com_helloworld&#039;)) &lt;br /&gt;
    {&lt;br /&gt;
	JToolBarHelper::preferences(&#039;com_helloworld&#039;);&lt;br /&gt;
    }&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;translate&amp;gt;&amp;lt;!--T:27--&amp;gt;&lt;br /&gt;
See further downwards for a [[#admin/views/helloworlds/view.html.php|more elaborated example of &#039;&#039;admin/views/helloworlds/view.html.php&#039;&#039;]] where this &#039;&#039;JToolBarHelper::preferences(&#039;com_helloworld&#039;)&#039;&#039; is done in an addToolBar()-method together with the other toolbar buttons and the &#039;&#039;JUser-&amp;gt;authorise()&#039;&#039;-check is done with JHelperContent, resulting in the $canDo-property.&amp;lt;/translate&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;translate&amp;gt;&lt;br /&gt;
=== Restrict the access to the component&#039;s backend to authorised usergroups === &amp;lt;!--T:28--&amp;gt;&lt;br /&gt;
&amp;lt;/translate&amp;gt;&lt;br /&gt;
&amp;lt;translate&amp;gt;&amp;lt;!--T:29--&amp;gt;&lt;br /&gt;
To control the access to the backend of the component add the following lines to the &amp;lt;tt&amp;gt;admin/helloworld.php&amp;lt;/tt&amp;gt; entry-file:&amp;lt;/translate&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;php&amp;quot;&amp;gt;&lt;br /&gt;
// Access check: is this user allowed to access the backend of this component?&lt;br /&gt;
if (!JFactory::getUser()-&amp;gt;authorise(&#039;core.manage&#039;, &#039;com_helloworld&#039;)) &lt;br /&gt;
{&lt;br /&gt;
	throw new Exception(JText::_(&#039;JERROR_ALERTNOAUTHOR&#039;));&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;translate&amp;gt;&amp;lt;!--T:30--&amp;gt;&lt;br /&gt;
See further downwards for the [[#admin/helloworld.php|whole code of the &#039;&#039;admin/helloworld.php&#039;&#039; file]].&amp;lt;/translate&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;translate&amp;gt;&lt;br /&gt;
== Adding more actions, also at category level and item level == &amp;lt;!--T:31--&amp;gt;&lt;br /&gt;
&amp;lt;/translate&amp;gt;&lt;br /&gt;
&amp;lt;translate&amp;gt;&amp;lt;!--T:32--&amp;gt;&lt;br /&gt;
When adding more actions and more levels, the above described 4 steps are done too:&amp;lt;/translate&amp;gt;&lt;br /&gt;
&amp;lt;translate&amp;gt;&amp;lt;!--T:33--&amp;gt;&lt;br /&gt;
* [[#Describing_the_actions_you_want_to_control_the_access_to|Add the actions to access.xml; here we can add more actions and levels]]&amp;lt;/translate&amp;gt;&lt;br /&gt;
&amp;lt;translate&amp;gt;&amp;lt;!--T:34--&amp;gt;&lt;br /&gt;
* [[#Adding_the_setting_of_permissions_in_the_component.27s_Preferences|Add the permissions-fieldset to config.xml]]&amp;lt;/translate&amp;gt;&lt;br /&gt;
&amp;lt;translate&amp;gt;&amp;lt;!--T:35--&amp;gt;&lt;br /&gt;
* [[#Displaying_only_the_right_toolbar_buttons|Add the &#039;Options&#039; toolbar button]]&amp;lt;/translate&amp;gt;&lt;br /&gt;
&amp;lt;translate&amp;gt;&amp;lt;!--T:36--&amp;gt;&lt;br /&gt;
* [[#Restricting_access_to_the_component|Restrict the access to the component&#039;s backend&lt;br /&gt;
]]&amp;lt;/translate&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;translate&amp;gt;&amp;lt;!--T:37--&amp;gt;&lt;br /&gt;
In addition we also have to do the following steps:&amp;lt;/translate&amp;gt;&lt;br /&gt;
&amp;lt;translate&amp;gt;&amp;lt;!--T:38--&amp;gt;&lt;br /&gt;
* [[#Add_the_asset_id_column_to_the_database_table|Add an asset_id to the item&#039;s database table for item level access control]]&amp;lt;/translate&amp;gt;&lt;br /&gt;
&amp;lt;translate&amp;gt;&amp;lt;!--T:39--&amp;gt;&lt;br /&gt;
* [[#Setting_the_permission_values_in_the_assets_table|Store the permissions in the assets table. Especially take care of setting the asset_id of the parent-asset]]&amp;lt;/translate&amp;gt;&lt;br /&gt;
&amp;lt;translate&amp;gt;&amp;lt;!--T:40--&amp;gt;&lt;br /&gt;
* [[#Showing_the_setting_of_permissions_on_the_item_level|Make the settings of the permissions at the item level editable]]&amp;lt;/translate&amp;gt;&lt;br /&gt;
&amp;lt;translate&amp;gt;&amp;lt;!--T:41--&amp;gt;&lt;br /&gt;
* [[#Adding_language_strings|Add some language strings]]&amp;lt;/translate&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;translate&amp;gt;&lt;br /&gt;
=== Describing the actions you want to control the access to === &amp;lt;!--T:42--&amp;gt;&lt;br /&gt;
&amp;lt;/translate&amp;gt;&lt;br /&gt;
&amp;lt;translate&amp;gt;&amp;lt;!--T:43--&amp;gt;&lt;br /&gt;
Each component (or part of it) has its own set of permissions that can be controlled. They are described in an &amp;lt;tt&amp;gt;access.xml&amp;lt;/tt&amp;gt; file located at the root of the &#039;&#039;admin&#039;&#039; folder. In this helloworld-example the actions to which access is controlled are divided in three sections: at the component level, the category level and the item level. An &#039;item&#039; is called a &#039;message&#039; in our example component, hence the name of the third section.&amp;lt;/translate&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span id=&amp;quot;admin/access.xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;tt&amp;gt;admin/access.xml&amp;lt;/tt&amp;gt;&lt;br /&gt;
&amp;lt;source lang=&amp;quot;xml&amp;quot; highlight=&amp;quot;9-10,12-18&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;?xml version=&amp;quot;1.0&amp;quot; encoding=&amp;quot;utf-8&amp;quot; ?&amp;gt;&lt;br /&gt;
&amp;lt;access component=&amp;quot;com_helloworld&amp;quot;&amp;gt;&lt;br /&gt;
	&amp;lt;section name=&amp;quot;component&amp;quot;&amp;gt;&lt;br /&gt;
		&amp;lt;action name=&amp;quot;core.admin&amp;quot; title=&amp;quot;JACTION_ADMIN&amp;quot; description=&amp;quot;JACTION_ADMIN_COMPONENT_DESC&amp;quot; /&amp;gt;&lt;br /&gt;
		&amp;lt;action name=&amp;quot;core.manage&amp;quot; title=&amp;quot;JACTION_MANAGE&amp;quot; description=&amp;quot;JACTION_MANAGE_COMPONENT_DESC&amp;quot; /&amp;gt;&lt;br /&gt;
		&amp;lt;action name=&amp;quot;core.create&amp;quot; title=&amp;quot;JACTION_CREATE&amp;quot; description=&amp;quot;JACTION_CREATE_COMPONENT_DESC&amp;quot; /&amp;gt;&lt;br /&gt;
		&amp;lt;action name=&amp;quot;core.delete&amp;quot; title=&amp;quot;JACTION_DELETE&amp;quot; description=&amp;quot;JACTION_DELETE_COMPONENT_DESC&amp;quot; /&amp;gt;&lt;br /&gt;
		&amp;lt;action name=&amp;quot;core.edit&amp;quot; title=&amp;quot;JACTION_EDIT&amp;quot; description=&amp;quot;JACTION_EDIT_COMPONENT_DESC&amp;quot; /&amp;gt;&lt;br /&gt;
		&amp;lt;action name=&amp;quot;core.edit.state&amp;quot; title=&amp;quot;JACTION_EDITSTATE&amp;quot; description=&amp;quot;JACTION_EDITSTATE_COMPONENT_DESC&amp;quot; /&amp;gt;&lt;br /&gt;
		&amp;lt;action name=&amp;quot;core.edit.own&amp;quot; title=&amp;quot;JACTION_EDITOWN&amp;quot; description=&amp;quot;JACTION_EDITOWN_COMPONENT_DESC&amp;quot; /&amp;gt;&lt;br /&gt;
	&amp;lt;/section&amp;gt;&lt;br /&gt;
	&amp;lt;section name=&amp;quot;category&amp;quot;&amp;gt;&lt;br /&gt;
		&amp;lt;action name=&amp;quot;core.create&amp;quot; title=&amp;quot;JACTION_CREATE&amp;quot; description=&amp;quot;COM_CATEGORIES_ACCESS_CREATE_DESC&amp;quot; /&amp;gt;&lt;br /&gt;
		&amp;lt;action name=&amp;quot;core.delete&amp;quot; title=&amp;quot;JACTION_DELETE&amp;quot; description=&amp;quot;COM_CATEGORIES_ACCESS_DELETE_DESC&amp;quot; /&amp;gt;&lt;br /&gt;
		&amp;lt;action name=&amp;quot;core.edit&amp;quot; title=&amp;quot;JACTION_EDIT&amp;quot; description=&amp;quot;COM_CATEGORIES_ACCESS_EDIT_DESC&amp;quot; /&amp;gt;&lt;br /&gt;
		&amp;lt;action name=&amp;quot;core.edit.state&amp;quot; title=&amp;quot;JACTION_EDITSTATE&amp;quot; description=&amp;quot;COM_CATEGORIES_ACCESS_EDITSTATE_DESC&amp;quot; /&amp;gt;&lt;br /&gt;
		&amp;lt;action name=&amp;quot;core.edit.own&amp;quot; title=&amp;quot;JACTION_EDITOWN&amp;quot; description=&amp;quot;COM_CATEGORIES_ACCESS_EDITOWN_DESC&amp;quot; /&amp;gt;&lt;br /&gt;
	&amp;lt;/section&amp;gt;&lt;br /&gt;
	&amp;lt;section name=&amp;quot;message&amp;quot;&amp;gt;&lt;br /&gt;
		&amp;lt;action name=&amp;quot;core.delete&amp;quot; title=&amp;quot;JACTION_DELETE&amp;quot; description=&amp;quot;COM_HELLOWORLD_ACCESS_DELETE_DESC&amp;quot; /&amp;gt;&lt;br /&gt;
		&amp;lt;action name=&amp;quot;core.edit&amp;quot; title=&amp;quot;JACTION_EDIT&amp;quot; description=&amp;quot;COM_HELLOWORLD_ACCESS_EDIT_DESC&amp;quot; /&amp;gt;&lt;br /&gt;
	&amp;lt;/section&amp;gt;&lt;br /&gt;
&amp;lt;/access&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;translate&amp;gt;&lt;br /&gt;
=== Adding the setting of permissions in the component&#039;s Preferences === &amp;lt;!--T:44--&amp;gt;&lt;br /&gt;
&amp;lt;/translate&amp;gt;&lt;br /&gt;
&amp;lt;translate&amp;gt;&amp;lt;!--T:45--&amp;gt;&lt;br /&gt;
Since we now use Access Control permissions in our component, we need to be able to set them at the component level. That is done in the Preferences of this component: the screen you see after clicking the &#039;Options&#039; button. The config.xml-file is a form-definition for those Preferences. We could define the component level actions here too, as a child of the &amp;quot;rules&amp;quot; field-tag, but it is now preferred to also put those actions in &amp;lt;tt&amp;gt;access.xml&amp;lt;/tt&amp;gt; in that way all access rules for this component are on one spot.&amp;lt;/translate&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span id=&amp;quot;admin/config.xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;tt&amp;gt;admin/config.xml&amp;lt;/tt&amp;gt;&lt;br /&gt;
&amp;lt;source lang=&amp;quot;xml&amp;quot; highlight=&amp;quot;19-34&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;?xml version=&amp;quot;1.0&amp;quot; encoding=&amp;quot;utf-8&amp;quot;?&amp;gt;&lt;br /&gt;
&amp;lt;config&amp;gt;&lt;br /&gt;
	&amp;lt;fieldset&lt;br /&gt;
		name=&amp;quot;greetings&amp;quot;&lt;br /&gt;
		label=&amp;quot;COM_HELLOWORLD_CONFIG_GREETING_SETTINGS_LABEL&amp;quot;&lt;br /&gt;
		description=&amp;quot;COM_HELLOWORLD_CONFIG_GREETING_SETTINGS_DESC&amp;quot;&lt;br /&gt;
	&amp;gt;&lt;br /&gt;
		&amp;lt;field&lt;br /&gt;
			name=&amp;quot;show_category&amp;quot;&lt;br /&gt;
			type=&amp;quot;radio&amp;quot;&lt;br /&gt;
			label=&amp;quot;COM_HELLOWORLD_HELLOWORLD_FIELD_SHOW_CATEGORY_LABEL&amp;quot;&lt;br /&gt;
			description=&amp;quot;COM_HELLOWORLD_HELLOWORLD_FIELD_SHOW_CATEGORY_DESC&amp;quot;&lt;br /&gt;
			default=&amp;quot;0&amp;quot;&lt;br /&gt;
		&amp;gt;&lt;br /&gt;
			&amp;lt;option value=&amp;quot;0&amp;quot;&amp;gt;JHIDE&amp;lt;/option&amp;gt;&lt;br /&gt;
			&amp;lt;option value=&amp;quot;1&amp;quot;&amp;gt;JSHOW&amp;lt;/option&amp;gt;&lt;br /&gt;
		&amp;lt;/field&amp;gt;&lt;br /&gt;
	&amp;lt;/fieldset&amp;gt;&lt;br /&gt;
	&amp;lt;fieldset&lt;br /&gt;
		name=&amp;quot;permissions&amp;quot;&lt;br /&gt;
		label=&amp;quot;JCONFIG_PERMISSIONS_LABEL&amp;quot;&lt;br /&gt;
		description=&amp;quot;JCONFIG_PERMISSIONS_DESC&amp;quot;&lt;br /&gt;
	&amp;gt;&lt;br /&gt;
		&amp;lt;field&lt;br /&gt;
			name=&amp;quot;rules&amp;quot;&lt;br /&gt;
			type=&amp;quot;rules&amp;quot;&lt;br /&gt;
			label=&amp;quot;JCONFIG_PERMISSIONS_LABEL&amp;quot;&lt;br /&gt;
			class=&amp;quot;inputbox&amp;quot;&lt;br /&gt;
			validate=&amp;quot;rules&amp;quot;&lt;br /&gt;
			filter=&amp;quot;rules&amp;quot;&lt;br /&gt;
			component=&amp;quot;com_helloworld&amp;quot;&lt;br /&gt;
			section=&amp;quot;component&amp;quot;&lt;br /&gt;
		/&amp;gt;&lt;br /&gt;
	&amp;lt;/fieldset&amp;gt;&lt;br /&gt;
&amp;lt;/config&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;translate&amp;gt;&lt;br /&gt;
=== Displaying only the right toolbar buttons === &amp;lt;!--T:46--&amp;gt;&lt;br /&gt;
&amp;lt;/translate&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;translate&amp;gt;&amp;lt;!--T:47--&amp;gt;&lt;br /&gt;
Which toolbar buttons to display depends on the Access Control permissions for the user. &amp;lt;/translate&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;translate&amp;gt;&lt;br /&gt;
&amp;lt;!--T:99--&amp;gt;&lt;br /&gt;
In common with Joomla core components, we use JHelperContent::getActions() to find the permissions. We pass to this function the identity of the asset record, and it returns an object containing all the Actions which are associated with our helloworld component, together with (for each Action) whether the currently logged-in user has that permission or not. If we then call &amp;lt;tt&amp;gt;get(&#039;some.action&#039;)&amp;lt;/tt&amp;gt; on this object, it will return true or false, depending on whether the user has this permission or not. &lt;br /&gt;
&amp;lt;/translate&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;translate&amp;gt;&amp;lt;!--T:48--&amp;gt;&lt;br /&gt;
In the &amp;lt;tt&amp;gt;admin/views/helloworlds/view.html.php&amp;lt;/tt&amp;gt;, put this code:&amp;lt;/translate&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span id=&amp;quot;admin/views/helloworlds/view.html.php&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;tt&amp;gt;admin/views/helloworlds/view.html.php&amp;lt;/tt&amp;gt;&lt;br /&gt;
&amp;lt;source lang=&amp;quot;php&amp;quot; highlight=&amp;quot;42-44,48,81-83,85-87,89-91,93-96,98&amp;quot; &amp;gt;&lt;br /&gt;
&amp;lt;?php&lt;br /&gt;
/**&lt;br /&gt;
 * @package     Joomla.Administrator&lt;br /&gt;
 * @subpackage  com_helloworld&lt;br /&gt;
 *&lt;br /&gt;
 * @copyright   Copyright (C) 2005 - 2018 Open Source Matters, Inc. All rights reserved.&lt;br /&gt;
 * @license     GNU General Public License version 2 or later; see LICENSE.txt&lt;br /&gt;
 */&lt;br /&gt;
&lt;br /&gt;
// No direct access to this file&lt;br /&gt;
defined(&#039;_JEXEC&#039;) or die(&#039;Restricted access&#039;);&lt;br /&gt;
&lt;br /&gt;
/**&lt;br /&gt;
 * HelloWorlds View&lt;br /&gt;
 *&lt;br /&gt;
 * @since  0.0.1&lt;br /&gt;
 */&lt;br /&gt;
class HelloWorldViewHelloWorlds extends JViewLegacy&lt;br /&gt;
{&lt;br /&gt;
	/**&lt;br /&gt;
	 * Display the Hello World view&lt;br /&gt;
	 *&lt;br /&gt;
	 * @param   string  $tpl  The name of the template file to parse; automatically searches through the template paths.&lt;br /&gt;
	 *&lt;br /&gt;
	 * @return  void&lt;br /&gt;
	 */&lt;br /&gt;
	function display($tpl = null)&lt;br /&gt;
	{&lt;br /&gt;
		&lt;br /&gt;
		// Get application&lt;br /&gt;
		$app = JFactory::getApplication();&lt;br /&gt;
		$context = &amp;quot;helloworld.list.admin.helloworld&amp;quot;;&lt;br /&gt;
		// Get data from the model&lt;br /&gt;
		$this-&amp;gt;items		= $this-&amp;gt;get(&#039;Items&#039;);&lt;br /&gt;
		$this-&amp;gt;pagination	= $this-&amp;gt;get(&#039;Pagination&#039;);&lt;br /&gt;
		$this-&amp;gt;state		= $this-&amp;gt;get(&#039;State&#039;);&lt;br /&gt;
		$this-&amp;gt;filter_order	= $app-&amp;gt;getUserStateFromRequest($context.&#039;filter_order&#039;, &#039;filter_order&#039;, &#039;greeting&#039;, &#039;cmd&#039;);&lt;br /&gt;
		$this-&amp;gt;filter_order_Dir = $app-&amp;gt;getUserStateFromRequest($context.&#039;filter_order_Dir&#039;, &#039;filter_order_Dir&#039;, &#039;asc&#039;, &#039;cmd&#039;);&lt;br /&gt;
		$this-&amp;gt;filterForm    	= $this-&amp;gt;get(&#039;FilterForm&#039;);&lt;br /&gt;
		$this-&amp;gt;activeFilters 	= $this-&amp;gt;get(&#039;ActiveFilters&#039;);&lt;br /&gt;
&lt;br /&gt;
		// What Access Permissions does this user have? What can (s)he do?&lt;br /&gt;
		$this-&amp;gt;canDo = JHelperContent::getActions(&#039;com_helloworld&#039;);&lt;br /&gt;
&lt;br /&gt;
		// Check for errors.&lt;br /&gt;
		if (count($errors = $this-&amp;gt;get(&#039;Errors&#039;)))&lt;br /&gt;
		{&lt;br /&gt;
			throw new Exception(implode(&amp;quot;\n&amp;quot;, $errors), 500);&lt;br /&gt;
		}&lt;br /&gt;
&lt;br /&gt;
		// Set the submenu&lt;br /&gt;
		HelloWorldHelper::addSubmenu(&#039;helloworlds&#039;);&lt;br /&gt;
&lt;br /&gt;
		// Set the toolbar and number of found items&lt;br /&gt;
		$this-&amp;gt;addToolBar();&lt;br /&gt;
&lt;br /&gt;
		// Display the template&lt;br /&gt;
		parent::display($tpl);&lt;br /&gt;
&lt;br /&gt;
		// Set the document&lt;br /&gt;
		$this-&amp;gt;setDocument();&lt;br /&gt;
	}&lt;br /&gt;
&lt;br /&gt;
	/**&lt;br /&gt;
	 * Add the page title and toolbar.&lt;br /&gt;
	 *&lt;br /&gt;
	 * @return  void&lt;br /&gt;
	 *&lt;br /&gt;
	 * @since   1.6&lt;br /&gt;
	 */&lt;br /&gt;
	protected function addToolBar()&lt;br /&gt;
	{&lt;br /&gt;
		$title = JText::_(&#039;COM_HELLOWORLD_MANAGER_HELLOWORLDS&#039;);&lt;br /&gt;
&lt;br /&gt;
		if ($this-&amp;gt;pagination-&amp;gt;total)&lt;br /&gt;
		{&lt;br /&gt;
			$title .= &amp;quot;&amp;lt;span style=&#039;font-size: 0.5em; vertical-align: middle;&#039;&amp;gt;(&amp;quot; . $this-&amp;gt;pagination-&amp;gt;total . &amp;quot;)&amp;lt;/span&amp;gt;&amp;quot;;&lt;br /&gt;
		}&lt;br /&gt;
&lt;br /&gt;
		JToolBarHelper::title($title, &#039;helloworld&#039;);&lt;br /&gt;
&lt;br /&gt;
		if ($this-&amp;gt;canDo-&amp;gt;get(&#039;core.create&#039;)) &lt;br /&gt;
		{&lt;br /&gt;
			JToolBarHelper::addNew(&#039;helloworld.add&#039;, &#039;JTOOLBAR_NEW&#039;);&lt;br /&gt;
		}&lt;br /&gt;
		if ($this-&amp;gt;canDo-&amp;gt;get(&#039;core.edit&#039;)) &lt;br /&gt;
		{&lt;br /&gt;
			JToolBarHelper::editList(&#039;helloworld.edit&#039;, &#039;JTOOLBAR_EDIT&#039;);&lt;br /&gt;
		}&lt;br /&gt;
		if ($this-&amp;gt;canDo-&amp;gt;get(&#039;core.delete&#039;)) &lt;br /&gt;
		{&lt;br /&gt;
			JToolBarHelper::deleteList(&#039;&#039;, &#039;helloworlds.delete&#039;, &#039;JTOOLBAR_DELETE&#039;);&lt;br /&gt;
		}&lt;br /&gt;
		if ($this-&amp;gt;canDo-&amp;gt;get(&#039;core.admin&#039;)) &lt;br /&gt;
		{&lt;br /&gt;
			JToolBarHelper::divider();&lt;br /&gt;
			JToolBarHelper::preferences(&#039;com_helloworld&#039;);&lt;br /&gt;
		}&lt;br /&gt;
	}&lt;br /&gt;
	/**&lt;br /&gt;
	 * Method to set up the document properties&lt;br /&gt;
	 *&lt;br /&gt;
	 * @return void&lt;br /&gt;
	 */&lt;br /&gt;
	protected function setDocument() &lt;br /&gt;
	{&lt;br /&gt;
		$document = JFactory::getDocument();&lt;br /&gt;
		$document-&amp;gt;setTitle(JText::_(&#039;COM_HELLOWORLD_ADMINISTRATION&#039;));&lt;br /&gt;
	}&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&amp;lt;span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;translate&amp;gt;&amp;lt;!--T:91--&amp;gt;&lt;br /&gt;
In the &amp;lt;tt&amp;gt;admin/views/helloworld/view.html.php&amp;lt;/tt&amp;gt;, put this code:&amp;lt;/translate&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span id=&amp;quot;admin/views/helloworld/view.html.php&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;tt&amp;gt;admin/views/helloworld/view.html.php&amp;lt;/tt&amp;gt;&lt;br /&gt;
&amp;lt;source lang=&amp;quot;php&amp;quot; highlight=&amp;quot;23,39-41,45,79-111&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;?php&lt;br /&gt;
/**&lt;br /&gt;
 * @package     Joomla.Administrator&lt;br /&gt;
 * @subpackage  com_helloworld&lt;br /&gt;
 *&lt;br /&gt;
 * @copyright   Copyright (C) 2005 - 2018 Open Source Matters, Inc. All rights reserved.&lt;br /&gt;
 * @license     GNU General Public License version 2 or later; see LICENSE.txt&lt;br /&gt;
 */&lt;br /&gt;
&lt;br /&gt;
// No direct access to this file&lt;br /&gt;
defined(&#039;_JEXEC&#039;) or die(&#039;Restricted access&#039;);&lt;br /&gt;
&lt;br /&gt;
/**&lt;br /&gt;
 * HelloWorld View&lt;br /&gt;
 *&lt;br /&gt;
 * @since  0.0.1&lt;br /&gt;
 */&lt;br /&gt;
class HelloWorldViewHelloWorld extends JViewLegacy&lt;br /&gt;
{&lt;br /&gt;
	protected $form;&lt;br /&gt;
	protected $item;&lt;br /&gt;
	protected $script;&lt;br /&gt;
	protected $canDo;&lt;br /&gt;
&lt;br /&gt;
	/**&lt;br /&gt;
	 * Display the Hello World view&lt;br /&gt;
	 *&lt;br /&gt;
	 * @param   string  $tpl  The name of the template file to parse; automatically searches through the template paths.&lt;br /&gt;
	 *&lt;br /&gt;
	 * @return  void&lt;br /&gt;
	 */&lt;br /&gt;
	public function display($tpl = null)&lt;br /&gt;
	{&lt;br /&gt;
		// Get the Data&lt;br /&gt;
		$this-&amp;gt;form = $this-&amp;gt;get(&#039;Form&#039;);&lt;br /&gt;
		$this-&amp;gt;item = $this-&amp;gt;get(&#039;Item&#039;);&lt;br /&gt;
		$this-&amp;gt;script = $this-&amp;gt;get(&#039;Script&#039;);&lt;br /&gt;
&lt;br /&gt;
		// What Access Permissions does this user have? What can (s)he do?&lt;br /&gt;
		$this-&amp;gt;canDo = JHelperContent::getActions(&#039;com_helloworld&#039;, &#039;helloworld&#039;, $this-&amp;gt;item-&amp;gt;id);&lt;br /&gt;
&lt;br /&gt;
		// Check for errors.&lt;br /&gt;
		if (count($errors = $this-&amp;gt;get(&#039;Errors&#039;)))&lt;br /&gt;
		{&lt;br /&gt;
			throw new Exception(implode(&amp;quot;\n&amp;quot;, $errors), 500);&lt;br /&gt;
		}&lt;br /&gt;
&lt;br /&gt;
		// Set the toolbar&lt;br /&gt;
		$this-&amp;gt;addToolBar();&lt;br /&gt;
&lt;br /&gt;
		// Display the template&lt;br /&gt;
		parent::display($tpl);&lt;br /&gt;
&lt;br /&gt;
		// Set the document&lt;br /&gt;
		$this-&amp;gt;setDocument();&lt;br /&gt;
	}&lt;br /&gt;
&lt;br /&gt;
	/**&lt;br /&gt;
	 * Add the page title and toolbar.&lt;br /&gt;
	 *&lt;br /&gt;
	 * @return  void&lt;br /&gt;
	 *&lt;br /&gt;
	 * @since   1.6&lt;br /&gt;
	 */&lt;br /&gt;
	protected function addToolBar()&lt;br /&gt;
	{&lt;br /&gt;
		$input = JFactory::getApplication()-&amp;gt;input;&lt;br /&gt;
&lt;br /&gt;
		// Hide Joomla Administrator Main menu&lt;br /&gt;
		$input-&amp;gt;set(&#039;hidemainmenu&#039;, true);&lt;br /&gt;
&lt;br /&gt;
		$isNew = ($this-&amp;gt;item-&amp;gt;id == 0);&lt;br /&gt;
&lt;br /&gt;
		JToolBarHelper::title($isNew ? JText::_(&#039;COM_HELLOWORLD_MANAGER_HELLOWORLD_NEW&#039;)&lt;br /&gt;
		                             : JText::_(&#039;COM_HELLOWORLD_MANAGER_HELLOWORLD_EDIT&#039;), &#039;helloworld&#039;);&lt;br /&gt;
		// Build the actions for new and existing records.&lt;br /&gt;
		if ($isNew)&lt;br /&gt;
		{&lt;br /&gt;
			// For new records, check the create permission.&lt;br /&gt;
			if ($this-&amp;gt;canDo-&amp;gt;get(&#039;core.create&#039;)) &lt;br /&gt;
			{&lt;br /&gt;
				JToolBarHelper::apply(&#039;helloworld.apply&#039;, &#039;JTOOLBAR_APPLY&#039;);&lt;br /&gt;
				JToolBarHelper::save(&#039;helloworld.save&#039;, &#039;JTOOLBAR_SAVE&#039;);&lt;br /&gt;
				JToolBarHelper::custom(&#039;helloworld.save2new&#039;, &#039;save-new.png&#039;, &#039;save-new_f2.png&#039;,&lt;br /&gt;
				                       &#039;JTOOLBAR_SAVE_AND_NEW&#039;, false);&lt;br /&gt;
			}&lt;br /&gt;
			JToolBarHelper::cancel(&#039;helloworld.cancel&#039;, &#039;JTOOLBAR_CANCEL&#039;);&lt;br /&gt;
		}&lt;br /&gt;
		else&lt;br /&gt;
		{&lt;br /&gt;
			if ($this-&amp;gt;canDo-&amp;gt;get(&#039;core.edit&#039;))&lt;br /&gt;
			{&lt;br /&gt;
				// We can save the new record&lt;br /&gt;
				JToolBarHelper::apply(&#039;helloworld.apply&#039;, &#039;JTOOLBAR_APPLY&#039;);&lt;br /&gt;
				JToolBarHelper::save(&#039;helloworld.save&#039;, &#039;JTOOLBAR_SAVE&#039;);&lt;br /&gt;
 &lt;br /&gt;
				// We can save this record, but check the create permission to see&lt;br /&gt;
				// if we can return to make a new one.&lt;br /&gt;
				if ($this-&amp;gt;canDo-&amp;gt;get(&#039;core.create&#039;)) &lt;br /&gt;
				{&lt;br /&gt;
					JToolBarHelper::custom(&#039;helloworld.save2new&#039;, &#039;save-new.png&#039;, &#039;save-new_f2.png&#039;,&lt;br /&gt;
					                       &#039;JTOOLBAR_SAVE_AND_NEW&#039;, false);&lt;br /&gt;
				}&lt;br /&gt;
			}&lt;br /&gt;
			if ($this-&amp;gt;canDo-&amp;gt;get(&#039;core.create&#039;)) &lt;br /&gt;
			{&lt;br /&gt;
				JToolBarHelper::custom(&#039;helloworld.save2copy&#039;, &#039;save-copy.png&#039;, &#039;save-copy_f2.png&#039;,&lt;br /&gt;
				                       &#039;JTOOLBAR_SAVE_AS_COPY&#039;, false);&lt;br /&gt;
			}&lt;br /&gt;
			JToolBarHelper::cancel(&#039;helloworld.cancel&#039;, &#039;JTOOLBAR_CLOSE&#039;);&lt;br /&gt;
		}&lt;br /&gt;
	}&lt;br /&gt;
	/**&lt;br /&gt;
	 * Method to set up the document properties&lt;br /&gt;
	 *&lt;br /&gt;
	 * @return void&lt;br /&gt;
	 */&lt;br /&gt;
	protected function setDocument() &lt;br /&gt;
	{&lt;br /&gt;
		$isNew = ($this-&amp;gt;item-&amp;gt;id == 0);&lt;br /&gt;
		$document = JFactory::getDocument();&lt;br /&gt;
		$document-&amp;gt;setTitle($isNew ? JText::_(&#039;COM_HELLOWORLD_HELLOWORLD_CREATING&#039;)&lt;br /&gt;
		                           : JText::_(&#039;COM_HELLOWORLD_HELLOWORLD_EDITING&#039;));&lt;br /&gt;
		$document-&amp;gt;addScript(JURI::root() . $this-&amp;gt;script);&lt;br /&gt;
		$document-&amp;gt;addScript(JURI::root() . &amp;quot;/administrator/components/com_helloworld&amp;quot;&lt;br /&gt;
		                                  . &amp;quot;/views/helloworld/submitbutton.js&amp;quot;);&lt;br /&gt;
		JText::script(&#039;COM_HELLOWORLD_HELLOWORLD_ERROR_UNACCEPTABLE&#039;);&lt;br /&gt;
	}&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;translate&amp;gt;&lt;br /&gt;
=== Restricting access to the component === &amp;lt;!--T:51--&amp;gt;&lt;br /&gt;
&amp;lt;/translate&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;translate&amp;gt;&amp;lt;!--T:52--&amp;gt;&lt;br /&gt;
The main idea in ACL is to restrict actions to groups of users. The first action to be restricted is access to the administrative backend of the component itself. With your favourite file editor, edit the &amp;lt;tt&amp;gt;admin/helloworld.php&amp;lt;/tt&amp;gt; file and add the lines with the access check.&amp;lt;/translate&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span id=&amp;quot;admin/helloworld.php&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;tt&amp;gt;admin/helloworld.php&amp;lt;/tt&amp;gt;&lt;br /&gt;
&amp;lt;source lang=&amp;quot;php&amp;quot; highlight=&amp;quot;17-22&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;?php&lt;br /&gt;
/**&lt;br /&gt;
 * @package     Joomla.Administrator&lt;br /&gt;
 * @subpackage  com_helloworld&lt;br /&gt;
 *&lt;br /&gt;
 * @copyright   Copyright (C) 2005 - 2018 Open Source Matters, Inc. All rights reserved.&lt;br /&gt;
 * @license     GNU General Public License version 2 or later; see LICENSE.txt&lt;br /&gt;
 */&lt;br /&gt;
&lt;br /&gt;
// No direct access to this file&lt;br /&gt;
defined(&#039;_JEXEC&#039;) or die(&#039;Restricted access&#039;);&lt;br /&gt;
&lt;br /&gt;
// Set some global property&lt;br /&gt;
$document = JFactory::getDocument();&lt;br /&gt;
$document-&amp;gt;addStyleDeclaration(&#039;.icon-helloworld {background-image: url(../media/com_helloworld/images/tux-16x16.png);}&#039;);&lt;br /&gt;
&lt;br /&gt;
// Access check: is this user allowed to access the backend of this component?&lt;br /&gt;
if (!JFactory::getUser()-&amp;gt;authorise(&#039;core.manage&#039;, &#039;com_helloworld&#039;))&lt;br /&gt;
{&lt;br /&gt;
	throw new Exception(JText::_(&#039;JERROR_ALERTNOAUTHOR&#039;));&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
// Require helper file&lt;br /&gt;
JLoader::register(&#039;HelloWorldHelper&#039;, JPATH_COMPONENT . &#039;/helpers/helloworld.php&#039;);&lt;br /&gt;
&lt;br /&gt;
// Get an instance of the controller prefixed by HelloWorld&lt;br /&gt;
$controller = JControllerLegacy::getInstance(&#039;HelloWorld&#039;);&lt;br /&gt;
&lt;br /&gt;
// Perform the Request task&lt;br /&gt;
$controller-&amp;gt;execute(JFactory::getApplication()-&amp;gt;input-&amp;gt;get(&#039;task&#039;));;&lt;br /&gt;
&lt;br /&gt;
// Redirect if set by the controller&lt;br /&gt;
$controller-&amp;gt;redirect();&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&amp;lt;span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;translate&amp;gt;=== Add the asset_id column to the database table === &amp;lt;!--T:53--&amp;gt;&amp;lt;/translate&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;translate&amp;gt;&amp;lt;!--T:54--&amp;gt;&lt;br /&gt;
In order to be able to work with JTable an asset_id column has to be added to the database #__helloworld table.&amp;lt;/translate&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;translate&amp;gt;&amp;lt;!--T:55--&amp;gt;&lt;br /&gt;
So, &amp;lt;tt&amp;gt;admin/sql/install.mysql.utf8.sql&amp;lt;/tt&amp;gt; becomes:&amp;lt;/translate&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span id=&amp;quot;admin/sql/install.mysql.utf8.sql&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;tt&amp;gt;admin/sql/install.mysql.utf8.sql&amp;lt;/tt&amp;gt;&lt;br /&gt;
&amp;lt;source lang=&amp;quot;mysql&amp;quot; highlight=&amp;quot;5&amp;quot;&amp;gt;&lt;br /&gt;
DROP TABLE IF EXISTS `#__helloworld`;&lt;br /&gt;
&lt;br /&gt;
CREATE TABLE `#__helloworld` (&lt;br /&gt;
	`id`       INT(11)     NOT NULL AUTO_INCREMENT,&lt;br /&gt;
	`asset_id` INT(10)     NOT NULL DEFAULT &#039;0&#039;,&lt;br /&gt;
	`greeting` VARCHAR(25) NOT NULL,&lt;br /&gt;
	`published` tinyint(4) NOT NULL,&lt;br /&gt;
	`catid`	    int(11)    NOT NULL DEFAULT &#039;0&#039;,&lt;br /&gt;
	`params`   VARCHAR(1024) NOT NULL DEFAULT &#039;&#039;,&lt;br /&gt;
	PRIMARY KEY (`id`)&lt;br /&gt;
)&lt;br /&gt;
	ENGINE =MyISAM&lt;br /&gt;
	AUTO_INCREMENT =0&lt;br /&gt;
	DEFAULT CHARSET =utf8;&lt;br /&gt;
&lt;br /&gt;
INSERT INTO `#__helloworld` (`greeting`) VALUES&lt;br /&gt;
(&#039;Hello World!&#039;),&lt;br /&gt;
(&#039;Good bye World!&#039;);&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;translate&amp;gt;&amp;lt;!--T:56--&amp;gt;&lt;br /&gt;
For updates we add a sql-update-file:&amp;lt;/translate&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span id=&amp;quot;admin/sql/updates/mysql/0.0.14.sql&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;tt&amp;gt;admin/sql/updates/mysql/0.0.14.sql&amp;lt;/tt&amp;gt;&lt;br /&gt;
&amp;lt;source lang=&amp;quot;mysql&amp;quot;&amp;gt;&lt;br /&gt;
ALTER TABLE `#__helloworld` ADD COLUMN `asset_id` INT(10) UNSIGNED NOT NULL DEFAULT &#039;0&#039; AFTER `id`;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;translate&amp;gt;&lt;br /&gt;
=== Restricting access to the messages === &amp;lt;!--T:57--&amp;gt;&lt;br /&gt;
&amp;lt;/translate&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;translate&amp;gt;&amp;lt;!--T:58--&amp;gt;&lt;br /&gt;
So far we have restricted access to the component itself, but we also need to do that at &#039;&#039;message&#039;&#039; level.&amp;lt;/translate&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;translate&amp;gt;&amp;lt;!--T:59--&amp;gt;&lt;br /&gt;
To check the &#039;&#039;&#039;&amp;quot;core.delete&amp;quot;&#039;&#039;&#039; permission you need to modify the model class: &amp;lt;tt&amp;gt;admin/models/helloworld.php&amp;lt;/tt&amp;gt; by adding these lines:&amp;lt;/translate&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span id=&amp;quot;admin/models/helloworld.php&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;tt&amp;gt;admin/models/helloworld.php&amp;lt;/tt&amp;gt;&lt;br /&gt;
&amp;lt;source lang=&#039;php&#039; highlight=&amp;quot;96-105&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;?php&lt;br /&gt;
/**&lt;br /&gt;
 * @package     Joomla.Administrator&lt;br /&gt;
 * @subpackage  com_helloworld&lt;br /&gt;
 *&lt;br /&gt;
 * @copyright   Copyright (C) 2005 - 2018 Open Source Matters, Inc. All rights reserved.&lt;br /&gt;
 * @license     GNU General Public License version 2 or later; see LICENSE.txt&lt;br /&gt;
 */&lt;br /&gt;
&lt;br /&gt;
// No direct access to this file&lt;br /&gt;
defined(&#039;_JEXEC&#039;) or die(&#039;Restricted access&#039;);&lt;br /&gt;
&lt;br /&gt;
/**&lt;br /&gt;
 * HelloWorld Model&lt;br /&gt;
 *&lt;br /&gt;
 * @since  0.0.1&lt;br /&gt;
 */&lt;br /&gt;
class HelloWorldModelHelloWorld extends JModelAdmin&lt;br /&gt;
{&lt;br /&gt;
	/**&lt;br /&gt;
	 * Method to get a table object, load it if necessary.&lt;br /&gt;
	 *&lt;br /&gt;
	 * @param   string  $type    The table name. Optional.&lt;br /&gt;
	 * @param   string  $prefix  The class prefix. Optional.&lt;br /&gt;
	 * @param   array   $config  Configuration array for model. Optional.&lt;br /&gt;
	 *&lt;br /&gt;
	 * @return  JTable  A JTable object&lt;br /&gt;
	 *&lt;br /&gt;
	 * @since   1.6&lt;br /&gt;
	 */&lt;br /&gt;
	public function getTable($type = &#039;HelloWorld&#039;, $prefix = &#039;HelloWorldTable&#039;, $config = array())&lt;br /&gt;
	{&lt;br /&gt;
		return JTable::getInstance($type, $prefix, $config);&lt;br /&gt;
	}&lt;br /&gt;
&lt;br /&gt;
	/**&lt;br /&gt;
	 * Method to get the record form.&lt;br /&gt;
	 *&lt;br /&gt;
	 * @param   array    $data      Data for the form.&lt;br /&gt;
	 * @param   boolean  $loadData  True if the form is to load its own data (default case), false if not.&lt;br /&gt;
	 *&lt;br /&gt;
	 * @return  mixed    A JForm object on success, false on failure&lt;br /&gt;
	 *&lt;br /&gt;
	 * @since   1.6&lt;br /&gt;
	 */&lt;br /&gt;
	public function getForm($data = array(), $loadData = true)&lt;br /&gt;
	{&lt;br /&gt;
		// Get the form.&lt;br /&gt;
		$form = $this-&amp;gt;loadForm(&lt;br /&gt;
			&#039;com_helloworld.helloworld&#039;,&lt;br /&gt;
			&#039;helloworld&#039;,&lt;br /&gt;
			array(&lt;br /&gt;
				&#039;control&#039; =&amp;gt; &#039;jform&#039;,&lt;br /&gt;
				&#039;load_data&#039; =&amp;gt; $loadData&lt;br /&gt;
			)&lt;br /&gt;
		);&lt;br /&gt;
&lt;br /&gt;
		if (empty($form))&lt;br /&gt;
		{&lt;br /&gt;
			return false;&lt;br /&gt;
		}&lt;br /&gt;
&lt;br /&gt;
		return $form;&lt;br /&gt;
	}&lt;br /&gt;
	/**&lt;br /&gt;
	 * Method to get the script that have to be included on the form&lt;br /&gt;
	 *&lt;br /&gt;
	 * @return string	Script files&lt;br /&gt;
	 */&lt;br /&gt;
	public function getScript() &lt;br /&gt;
	{&lt;br /&gt;
		return &#039;administrator/components/com_helloworld/models/forms/helloworld.js&#039;;&lt;br /&gt;
	}&lt;br /&gt;
	/**&lt;br /&gt;
	 * Method to get the data that should be injected in the form.&lt;br /&gt;
	 *&lt;br /&gt;
	 * @return  mixed  The data for the form.&lt;br /&gt;
	 *&lt;br /&gt;
	 * @since   1.6&lt;br /&gt;
	 */&lt;br /&gt;
	protected function loadFormData()&lt;br /&gt;
	{&lt;br /&gt;
		// Check the session for previously entered form data.&lt;br /&gt;
		$data = JFactory::getApplication()-&amp;gt;getUserState(&lt;br /&gt;
			&#039;com_helloworld.edit.helloworld.data&#039;,&lt;br /&gt;
			array()&lt;br /&gt;
		);&lt;br /&gt;
&lt;br /&gt;
		if (empty($data))&lt;br /&gt;
		{&lt;br /&gt;
			$data = $this-&amp;gt;getItem();&lt;br /&gt;
		}&lt;br /&gt;
&lt;br /&gt;
		return $data;&lt;br /&gt;
	}&lt;br /&gt;
	/**&lt;br /&gt;
	 * Method to check if it&#039;s OK to delete a message. Overrides JModelAdmin::canDelete&lt;br /&gt;
	 */&lt;br /&gt;
	protected function canDelete($record)&lt;br /&gt;
	{&lt;br /&gt;
		if( !empty( $record-&amp;gt;id ) )&lt;br /&gt;
		{&lt;br /&gt;
			return JFactory::getUser()-&amp;gt;authorise( &amp;quot;core.delete&amp;quot;, &amp;quot;com_helloworld.helloworld.&amp;quot; . $record-&amp;gt;id );&lt;br /&gt;
		}&lt;br /&gt;
	}&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;translate&amp;gt;&amp;lt;!--T:60--&amp;gt;&lt;br /&gt;
To check &#039;&#039;&#039;&amp;quot;core.edit&amp;quot;&#039;&#039;&#039; (and &#039;&#039;&#039;core.add&#039;&#039;&#039; if you wish) you need to update the sub-controller (&#039;&#039;not&#039;&#039; the model). I am not sure why this is so, but that&#039;s how other standard Joomla components do it. You need to add the following lines in the file: &amp;lt;tt&amp;gt;admin/controllers/helloworld.php&amp;lt;/tt&amp;gt;&amp;lt;/translate&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span id=&amp;quot;admin/controllers/helloworld.php&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;tt&amp;gt;admin/controllers/helloworld.php&amp;lt;/tt&amp;gt;&lt;br /&gt;
&amp;lt;source lang=&#039;php&#039;  highlight=&amp;quot;21-49&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;?php&lt;br /&gt;
/**&lt;br /&gt;
 * @package     Joomla.Administrator&lt;br /&gt;
 * @subpackage  com_helloworld&lt;br /&gt;
 *&lt;br /&gt;
 * @copyright   Copyright (C) 2005 - 2018 Open Source Matters, Inc. All rights reserved.&lt;br /&gt;
 * @license     GNU General Public License version 2 or later; see LICENSE.txt&lt;br /&gt;
 */&lt;br /&gt;
// No direct access to this file&lt;br /&gt;
defined(&#039;_JEXEC&#039;) or die(&#039;Restricted access&#039;);&lt;br /&gt;
&lt;br /&gt;
/**&lt;br /&gt;
 * HelloWorld Controller&lt;br /&gt;
 *&lt;br /&gt;
 * @package     Joomla.Administrator&lt;br /&gt;
 * @subpackage  com_helloworld&lt;br /&gt;
 * @since       0.0.9&lt;br /&gt;
 */&lt;br /&gt;
class HelloWorldControllerHelloWorld extends JControllerForm&lt;br /&gt;
{&lt;br /&gt;
	/**&lt;br /&gt;
	* Implement to allowAdd or not&lt;br /&gt;
	*&lt;br /&gt;
	* Not used at this time (but you can look at how other components use it....)&lt;br /&gt;
	* Overwrites: JControllerForm::allowAdd&lt;br /&gt;
	*&lt;br /&gt;
	* @param array $data&lt;br /&gt;
	* @return bool&lt;br /&gt;
	*/&lt;br /&gt;
	protected function allowAdd($data = array())&lt;br /&gt;
	{&lt;br /&gt;
		return parent::allowAdd($data);&lt;br /&gt;
	}&lt;br /&gt;
	/**&lt;br /&gt;
	* Implement to allow edit or not&lt;br /&gt;
	* Overwrites: JControllerForm::allowEdit&lt;br /&gt;
	*&lt;br /&gt;
	* @param array $data&lt;br /&gt;
	* @param string $key&lt;br /&gt;
	* @return bool&lt;br /&gt;
	*/&lt;br /&gt;
	protected function allowEdit($data = array(), $key = &#039;id&#039;)&lt;br /&gt;
	{&lt;br /&gt;
		$id = isset( $data[ $key ] ) ? $data[ $key ] : 0;&lt;br /&gt;
		if( !empty( $id ) )&lt;br /&gt;
		{&lt;br /&gt;
			return JFactory::getUser()-&amp;gt;authorise( &amp;quot;core.edit&amp;quot;, &amp;quot;com_helloworld.helloworld.&amp;quot; . $id );&lt;br /&gt;
		}&lt;br /&gt;
	}&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;translate&amp;gt;&amp;lt;!--T:61--&amp;gt;&lt;br /&gt;
Please note that &#039;&#039;allowAdd&#039;&#039; simply calls its parent. I&#039;ve put it here in case you want to actually use it in your component. If you look at your &amp;lt;tt&amp;gt;admin/access.xml&amp;lt;/tt&amp;gt; file, you will notice there is no &#039;&#039;core.add&#039;&#039; action defined for &amp;quot;messages&amp;quot;, so you will need to add it there as well if you want to be able to configure it in the interface.&amp;lt;/translate&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;translate&amp;gt;=== Setting the permission values in the assets table === &amp;lt;!--T:62--&amp;gt;&amp;lt;/translate&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;translate&amp;gt;&amp;lt;!--T:63--&amp;gt;&lt;br /&gt;
In order to store permissions for each message in the assets database table, we have to instruct the table class associated with the model to save those permissions in the assets table.&amp;lt;/translate&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;translate&amp;gt;&amp;lt;!--T:64--&amp;gt;&lt;br /&gt;
JTable not only provides an interface for storing the data of the record itself in the item&#039;s database table, but also for storing the permissions for that record in the assets database table. Therefore we must add information to the bind()-method about the permission-values. We also  have to provide the asset name, asset title and the id of the asset parent via the helloworld JTable. Therefore we override 3 methods:&amp;lt;/translate&amp;gt;&lt;br /&gt;
&amp;lt;translate&amp;gt;&amp;lt;!--T:65--&amp;gt;&lt;br /&gt;
* _getAssetName(): a unique name for this asset, by which it can be retrieved&amp;lt;/translate&amp;gt;&lt;br /&gt;
&amp;lt;translate&amp;gt;&amp;lt;!--T:66--&amp;gt;&lt;br /&gt;
* _getAssetTitle(): a more human-friendly way to identify the asset (not necessary unique)&amp;lt;/translate&amp;gt;&lt;br /&gt;
&amp;lt;translate&amp;gt;&amp;lt;!--T:67--&amp;gt;&lt;br /&gt;
* _getAssetParentId(): the asset_id of the parent in the asset database table (from whom permissions are inherited)&amp;lt;/translate&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span id=&amp;quot;admin/tables/helloworld.php&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;tt&amp;gt;admin/tables/helloworld.php&amp;lt;/tt&amp;gt;&lt;br /&gt;
&amp;lt;source lang=&amp;quot;php&amp;quot; highlight=&amp;quot;45-52,56-109&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;?php&lt;br /&gt;
/**&lt;br /&gt;
 * @package     Joomla.Administrator&lt;br /&gt;
 * @subpackage  com_helloworld&lt;br /&gt;
 *&lt;br /&gt;
 * @copyright   Copyright (C) 2005 - 2018 Open Source Matters, Inc. All rights reserved.&lt;br /&gt;
 * @license     GNU General Public License version 2 or later; see LICENSE.txt&lt;br /&gt;
 */&lt;br /&gt;
// No direct access&lt;br /&gt;
defined(&#039;_JEXEC&#039;) or die(&#039;Restricted access&#039;);&lt;br /&gt;
&lt;br /&gt;
/**&lt;br /&gt;
 * Hello Table class&lt;br /&gt;
 *&lt;br /&gt;
 * @since  0.0.1&lt;br /&gt;
 */&lt;br /&gt;
class HelloWorldTableHelloWorld extends JTable&lt;br /&gt;
{&lt;br /&gt;
	/**&lt;br /&gt;
	 * Constructor&lt;br /&gt;
	 *&lt;br /&gt;
	 * @param   JDatabaseDriver  &amp;amp;$db  A database connector object&lt;br /&gt;
	 */&lt;br /&gt;
	function __construct(&amp;amp;$db)&lt;br /&gt;
	{&lt;br /&gt;
		parent::__construct(&#039;#__helloworld&#039;, &#039;id&#039;, $db);&lt;br /&gt;
	}&lt;br /&gt;
	/**&lt;br /&gt;
	 * Overloaded bind function&lt;br /&gt;
	 *&lt;br /&gt;
	 * @param       array           named array&lt;br /&gt;
	 * @return      null|string     null is operation was satisfactory, otherwise returns an error&lt;br /&gt;
	 * @see JTable:bind&lt;br /&gt;
	 * @since 1.5&lt;br /&gt;
	 */&lt;br /&gt;
	public function bind($array, $ignore = &#039;&#039;)&lt;br /&gt;
	{&lt;br /&gt;
		if (isset($array[&#039;params&#039;]) &amp;amp;&amp;amp; is_array($array[&#039;params&#039;]))&lt;br /&gt;
		{&lt;br /&gt;
			// Convert the params field to a string.&lt;br /&gt;
			$parameter = new JRegistry;&lt;br /&gt;
			$parameter-&amp;gt;loadArray($array[&#039;params&#039;]);&lt;br /&gt;
			$array[&#039;params&#039;] = (string)$parameter;&lt;br /&gt;
		}&lt;br /&gt;
&lt;br /&gt;
		// Bind the rules.&lt;br /&gt;
		if (isset($array[&#039;rules&#039;]) &amp;amp;&amp;amp; is_array($array[&#039;rules&#039;]))&lt;br /&gt;
		{&lt;br /&gt;
			$rules = new JAccessRules($array[&#039;rules&#039;]);&lt;br /&gt;
			$this-&amp;gt;setRules($rules);&lt;br /&gt;
		}&lt;br /&gt;
&lt;br /&gt;
		return parent::bind($array, $ignore);&lt;br /&gt;
	}&lt;br /&gt;
&lt;br /&gt;
	/**&lt;br /&gt;
	 * Method to compute the default name of the asset.&lt;br /&gt;
	 * The default name is in the form `table_name.id`&lt;br /&gt;
	 * where id is the value of the primary key of the table.&lt;br /&gt;
	 *&lt;br /&gt;
	 * @return	string&lt;br /&gt;
	 * @since	2.5&lt;br /&gt;
	 */&lt;br /&gt;
	protected function _getAssetName()&lt;br /&gt;
	{&lt;br /&gt;
		$k = $this-&amp;gt;_tbl_key;&lt;br /&gt;
		return &#039;com_helloworld.helloworld.&#039;.(int) $this-&amp;gt;$k;&lt;br /&gt;
	}&lt;br /&gt;
	/**&lt;br /&gt;
	 * Method to return the title to use for the asset table.&lt;br /&gt;
	 *&lt;br /&gt;
	 * @return	string&lt;br /&gt;
	 * @since	2.5&lt;br /&gt;
	 */&lt;br /&gt;
	protected function _getAssetTitle()&lt;br /&gt;
	{&lt;br /&gt;
		return $this-&amp;gt;greeting;&lt;br /&gt;
	}&lt;br /&gt;
	/**&lt;br /&gt;
	 * Method to get the asset-parent-id of the item&lt;br /&gt;
	 *&lt;br /&gt;
	 * @return	int&lt;br /&gt;
	 */&lt;br /&gt;
	protected function _getAssetParentId(JTable $table = NULL, $id = NULL)&lt;br /&gt;
	{&lt;br /&gt;
		// We will retrieve the parent-asset from the Asset-table&lt;br /&gt;
		$assetParent = JTable::getInstance(&#039;Asset&#039;);&lt;br /&gt;
		// Default: if no asset-parent can be found we take the global asset&lt;br /&gt;
		$assetParentId = $assetParent-&amp;gt;getRootId();&lt;br /&gt;
&lt;br /&gt;
		// Find the parent-asset&lt;br /&gt;
		if (($this-&amp;gt;catid)&amp;amp;&amp;amp; !empty($this-&amp;gt;catid))&lt;br /&gt;
		{&lt;br /&gt;
			// The item has a category as asset-parent&lt;br /&gt;
			$assetParent-&amp;gt;loadByName(&#039;com_helloworld.category.&#039; . (int) $this-&amp;gt;catid);&lt;br /&gt;
		}&lt;br /&gt;
		else&lt;br /&gt;
		{&lt;br /&gt;
			// The item has the component as asset-parent&lt;br /&gt;
			$assetParent-&amp;gt;loadByName(&#039;com_helloworld&#039;);&lt;br /&gt;
		}&lt;br /&gt;
&lt;br /&gt;
		// Return the found asset-parent-id&lt;br /&gt;
		if ($assetParent-&amp;gt;id)&lt;br /&gt;
		{&lt;br /&gt;
			$assetParentId=$assetParent-&amp;gt;id;&lt;br /&gt;
		}&lt;br /&gt;
		return $assetParentId;&lt;br /&gt;
	}&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;translate&amp;gt;&amp;lt;!--T:92--&amp;gt;&lt;br /&gt;
This code for _getAssetParentId() above uses JTableAsset to retrieve the asset_id of the asset-parent. This is different from the code in the current version of com_content, where the asset_id of the category is retrieved from the #__categories database table. That is another possibility; many ways leading to Rome.&amp;lt;/translate&amp;gt; &amp;lt;translate&amp;gt;&amp;lt;!--T:93--&amp;gt;&lt;br /&gt;
In com_content however, if an item would not be under a category, then the asset_id of the global asset is returned. That would of course not be right, but is fixed there by providing a default category &amp;quot;uncategorised&amp;quot;, so that an article is &#039;&#039;always&#039;&#039; under a category.&amp;lt;/translate&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;translate&amp;gt;&lt;br /&gt;
=== Showing the setting of permissions on the item level === &amp;lt;!--T:69--&amp;gt;&lt;br /&gt;
&amp;lt;/translate&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;translate&amp;gt;&amp;lt;!--T:70--&amp;gt;&lt;br /&gt;
Adding the rules field to the form-definition of the edit-form.&amp;lt;/translate&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;span id=&amp;quot;admin/models/forms/helloworld.xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;tt&amp;gt;admin/models/forms/helloworld.xml&amp;lt;/tt&amp;gt;&lt;br /&gt;
&amp;lt;source lang=&amp;quot;xml&amp;quot; highlight=&amp;quot;55-74&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;?xml version=&amp;quot;1.0&amp;quot; encoding=&amp;quot;utf-8&amp;quot;?&amp;gt;&lt;br /&gt;
&amp;lt;form&lt;br /&gt;
				addrulepath=&amp;quot;/administrator/components/com_helloworld/models/rules&amp;quot;&lt;br /&gt;
&amp;gt;&lt;br /&gt;
	&amp;lt;fieldset&lt;br /&gt;
				name=&amp;quot;details&amp;quot;&lt;br /&gt;
				label=&amp;quot;COM_HELLOWORLD_HELLOWORLD_DETAILS&amp;quot;&lt;br /&gt;
	&amp;gt;&lt;br /&gt;
		&amp;lt;field&lt;br /&gt;
				name=&amp;quot;id&amp;quot;&lt;br /&gt;
				type=&amp;quot;hidden&amp;quot;&lt;br /&gt;
				/&amp;gt;&lt;br /&gt;
		&amp;lt;field&lt;br /&gt;
				name=&amp;quot;greeting&amp;quot;&lt;br /&gt;
				type=&amp;quot;text&amp;quot;&lt;br /&gt;
				label=&amp;quot;COM_HELLOWORLD_HELLOWORLD_GREETING_LABEL&amp;quot;&lt;br /&gt;
				description=&amp;quot;COM_HELLOWORLD_HELLOWORLD_GREETING_DESC&amp;quot;&lt;br /&gt;
				size=&amp;quot;40&amp;quot;&lt;br /&gt;
				class=&amp;quot;inputbox validate-greeting&amp;quot;&lt;br /&gt;
				validate=&amp;quot;greeting&amp;quot;&lt;br /&gt;
				required=&amp;quot;true&amp;quot;&lt;br /&gt;
				default=&amp;quot;&amp;quot;&lt;br /&gt;
				/&amp;gt;&lt;br /&gt;
		&amp;lt;field&lt;br /&gt;
				name=&amp;quot;catid&amp;quot;&lt;br /&gt;
				type=&amp;quot;category&amp;quot;&lt;br /&gt;
				extension=&amp;quot;com_helloworld&amp;quot;&lt;br /&gt;
				class=&amp;quot;inputbox&amp;quot;&lt;br /&gt;
				default=&amp;quot;&amp;quot;&lt;br /&gt;
				label=&amp;quot;COM_HELLOWORLD_HELLOWORLD_FIELD_CATID_LABEL&amp;quot;&lt;br /&gt;
				description=&amp;quot;COM_HELLOWORLD_HELLOWORLD_FIELD_CATID_DESC&amp;quot;&lt;br /&gt;
				required=&amp;quot;true&amp;quot;&lt;br /&gt;
		&amp;gt;&lt;br /&gt;
			&amp;lt;option value=&amp;quot;0&amp;quot;&amp;gt;JOPTION_SELECT_CATEGORY&amp;lt;/option&amp;gt;&lt;br /&gt;
		&amp;lt;/field&amp;gt;&lt;br /&gt;
	&amp;lt;/fieldset&amp;gt;&lt;br /&gt;
	&amp;lt;fields name=&amp;quot;params&amp;quot;&amp;gt;&lt;br /&gt;
		&amp;lt;fieldset&lt;br /&gt;
				name=&amp;quot;params&amp;quot;&lt;br /&gt;
				label=&amp;quot;JGLOBAL_FIELDSET_DISPLAY_OPTIONS&amp;quot;&lt;br /&gt;
		&amp;gt;&lt;br /&gt;
			&amp;lt;field&lt;br /&gt;
					name=&amp;quot;show_category&amp;quot;&lt;br /&gt;
					type=&amp;quot;list&amp;quot;&lt;br /&gt;
					label=&amp;quot;COM_HELLOWORLD_HELLOWORLD_FIELD_SHOW_CATEGORY_LABEL&amp;quot;&lt;br /&gt;
					description=&amp;quot;COM_HELLOWORLD_HELLOWORLD_FIELD_SHOW_CATEGORY_DESC&amp;quot;&lt;br /&gt;
					default=&amp;quot;&amp;quot;&lt;br /&gt;
			&amp;gt;&lt;br /&gt;
				&amp;lt;option value=&amp;quot;&amp;quot;&amp;gt;JGLOBAL_USE_GLOBAL&amp;lt;/option&amp;gt;&lt;br /&gt;
				&amp;lt;option value=&amp;quot;0&amp;quot;&amp;gt;JHIDE&amp;lt;/option&amp;gt;&lt;br /&gt;
				&amp;lt;option value=&amp;quot;1&amp;quot;&amp;gt;JSHOW&amp;lt;/option&amp;gt;&lt;br /&gt;
			&amp;lt;/field&amp;gt;&lt;br /&gt;
		&amp;lt;/fieldset&amp;gt;&lt;br /&gt;
	&amp;lt;/fields&amp;gt;&lt;br /&gt;
	&amp;lt;fieldset&lt;br /&gt;
			name=&amp;quot;accesscontrol&amp;quot;&lt;br /&gt;
			label=&amp;quot;COM_HELLOWORLD_FIELDSET_RULES&amp;quot;&lt;br /&gt;
	&amp;gt;&lt;br /&gt;
    	&amp;lt;field&lt;br /&gt;
				name=&amp;quot;asset_id&amp;quot;&lt;br /&gt;
				type=&amp;quot;hidden&amp;quot;&lt;br /&gt;
				filter=&amp;quot;unset&amp;quot;&lt;br /&gt;
				/&amp;gt;&lt;br /&gt;
    	&amp;lt;field&lt;br /&gt;
				name=&amp;quot;rules&amp;quot;&lt;br /&gt;
				type=&amp;quot;rules&amp;quot;&lt;br /&gt;
				label=&amp;quot;COM_HELLOWORLD_FIELD_RULES_LABEL&amp;quot;&lt;br /&gt;
				filter=&amp;quot;rules&amp;quot;&lt;br /&gt;
				validate=&amp;quot;rules&amp;quot;&lt;br /&gt;
				class=&amp;quot;inputbox&amp;quot;&lt;br /&gt;
				component=&amp;quot;com_helloworld&amp;quot;&lt;br /&gt;
				section=&amp;quot;message&amp;quot;&lt;br /&gt;
				/&amp;gt;&lt;br /&gt;
    &amp;lt;/fieldset&amp;gt;&lt;br /&gt;
&amp;lt;/form&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;translate&amp;gt;&lt;br /&gt;
&amp;lt;!--T:100--&amp;gt;&lt;br /&gt;
The previous edit.php layout file would display the permissions field automatically, but we&#039;ve changed the layout to display in a tabbed format, similar to other Joomla components. When a user changes a permission there&#039;s an Ajax call to recalculate the Calculated Setting, and we need a little bit of javascript to enable that to work. &lt;br /&gt;
&amp;lt;/translate&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span id=&amp;quot;admin/views/helloworld/tmpl/edit.php&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;tt&amp;gt;admin/views/helloworld/tmpl/edit.php&amp;lt;/tt&amp;gt;&lt;br /&gt;
&amp;lt;source lang=&#039;php&#039;  highlight=&amp;quot;14-23,29,33-67&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;?php&lt;br /&gt;
/**&lt;br /&gt;
 * @package     Joomla.Administrator&lt;br /&gt;
 * @subpackage  com_helloworld&lt;br /&gt;
 *&lt;br /&gt;
 * @copyright   Copyright (C) 2005 - 2018 Open Source Matters, Inc. All rights reserved.&lt;br /&gt;
 * @license     GNU General Public License version 2 or later; see LICENSE.txt&lt;br /&gt;
 */&lt;br /&gt;
&lt;br /&gt;
// No direct access&lt;br /&gt;
defined(&#039;_JEXEC&#039;) or die(&#039;Restricted access&#039;);&lt;br /&gt;
JHtml::_(&#039;behavior.formvalidator&#039;);&lt;br /&gt;
&lt;br /&gt;
// The following is to enable setting the permission&#039;s Calculated Setting &lt;br /&gt;
// when you change the permission&#039;s Setting. &lt;br /&gt;
// The core javascript code for initiating the Ajax request looks for a field&lt;br /&gt;
// with id=&amp;quot;jform_title&amp;quot; and sets its value as the &#039;title&#039; parameter to send in the Ajax request&lt;br /&gt;
JFactory::getDocument()-&amp;gt;addScriptDeclaration(&#039;&lt;br /&gt;
	jQuery(document).ready(function() {&lt;br /&gt;
        greeting = jQuery(&amp;quot;#jform_greeting&amp;quot;).val();&lt;br /&gt;
		jQuery(&amp;quot;#jform_title&amp;quot;).val(greeting);&lt;br /&gt;
	});&lt;br /&gt;
&#039;);&lt;br /&gt;
&lt;br /&gt;
?&amp;gt;&lt;br /&gt;
&amp;lt;form action=&amp;quot;&amp;lt;?php echo JRoute::_(&#039;index.php?option=com_helloworld&amp;amp;layout=edit&amp;amp;id=&#039; . (int) $this-&amp;gt;item-&amp;gt;id); ?&amp;gt;&amp;quot;&lt;br /&gt;
    method=&amp;quot;post&amp;quot; name=&amp;quot;adminForm&amp;quot; id=&amp;quot;adminForm&amp;quot; class=&amp;quot;form-validate&amp;quot;&amp;gt;&lt;br /&gt;
    &lt;br /&gt;
    &amp;lt;input id=&amp;quot;jform_title&amp;quot; type=&amp;quot;hidden&amp;quot; name=&amp;quot;helloworld-message-title&amp;quot;/&amp;gt;&lt;br /&gt;
    &lt;br /&gt;
    &amp;lt;div class=&amp;quot;form-horizontal&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
    &amp;lt;?php echo JHtml::_(&#039;bootstrap.startTabSet&#039;, &#039;myTab&#039;, array(&#039;active&#039; =&amp;gt; &#039;details&#039;)); ?&amp;gt;&lt;br /&gt;
    &amp;lt;?php echo JHtml::_(&#039;bootstrap.addTab&#039;, &#039;myTab&#039;, &#039;details&#039;, &lt;br /&gt;
        empty($this-&amp;gt;item-&amp;gt;id) ? JText::_(&#039;COM_HELLOWORLD_TAB_NEW_MESSAGE&#039;) : JText::_(&#039;COM_HELLOWORLD_TAB_EDIT_MESSAGE&#039;)); ?&amp;gt;&lt;br /&gt;
        &amp;lt;fieldset class=&amp;quot;adminform&amp;quot;&amp;gt;&lt;br /&gt;
            &amp;lt;legend&amp;gt;&amp;lt;?php echo JText::_(&#039;COM_HELLOWORLD_LEGEND_DETAILS&#039;) ?&amp;gt;&amp;lt;/legend&amp;gt;&lt;br /&gt;
            &amp;lt;div class=&amp;quot;row-fluid&amp;quot;&amp;gt;&lt;br /&gt;
                &amp;lt;div class=&amp;quot;span6&amp;quot;&amp;gt;&lt;br /&gt;
                    &amp;lt;?php echo $this-&amp;gt;form-&amp;gt;renderFieldset(&#039;details&#039;);  ?&amp;gt;&lt;br /&gt;
                &amp;lt;/div&amp;gt;&lt;br /&gt;
            &amp;lt;/div&amp;gt;&lt;br /&gt;
        &amp;lt;/fieldset&amp;gt;&lt;br /&gt;
    &amp;lt;?php echo JHtml::_(&#039;bootstrap.endTab&#039;); ?&amp;gt;&lt;br /&gt;
&lt;br /&gt;
    &amp;lt;?php echo JHtml::_(&#039;bootstrap.addTab&#039;, &#039;myTab&#039;, &#039;params&#039;, JText::_(&#039;COM_HELLOWORLD_TAB_PARAMS&#039;)); ?&amp;gt;&lt;br /&gt;
        &amp;lt;fieldset class=&amp;quot;adminform&amp;quot;&amp;gt;&lt;br /&gt;
            &amp;lt;legend&amp;gt;&amp;lt;?php echo JText::_(&#039;COM_HELLOWORLD_LEGEND_PARAMS&#039;) ?&amp;gt;&amp;lt;/legend&amp;gt;&lt;br /&gt;
            &amp;lt;div class=&amp;quot;row-fluid&amp;quot;&amp;gt;&lt;br /&gt;
                &amp;lt;div class=&amp;quot;span6&amp;quot;&amp;gt;&lt;br /&gt;
                    &amp;lt;?php echo $this-&amp;gt;form-&amp;gt;renderFieldset(&#039;params&#039;);  ?&amp;gt;&lt;br /&gt;
                &amp;lt;/div&amp;gt;&lt;br /&gt;
            &amp;lt;/div&amp;gt;&lt;br /&gt;
        &amp;lt;/fieldset&amp;gt;&lt;br /&gt;
    &amp;lt;?php echo JHtml::_(&#039;bootstrap.endTab&#039;); ?&amp;gt;&lt;br /&gt;
&lt;br /&gt;
    &amp;lt;?php echo JHtml::_(&#039;bootstrap.addTab&#039;, &#039;myTab&#039;, &#039;permissions&#039;, JText::_(&#039;COM_HELLOWORLD_TAB_PERMISSIONS&#039;)); ?&amp;gt;&lt;br /&gt;
        &amp;lt;fieldset class=&amp;quot;adminform&amp;quot;&amp;gt;&lt;br /&gt;
            &amp;lt;legend&amp;gt;&amp;lt;?php echo JText::_(&#039;COM_HELLOWORLD_LEGEND_PERMISSIONS&#039;) ?&amp;gt;&amp;lt;/legend&amp;gt;&lt;br /&gt;
            &amp;lt;div class=&amp;quot;row-fluid&amp;quot;&amp;gt;&lt;br /&gt;
                &amp;lt;div class=&amp;quot;span12&amp;quot;&amp;gt;&lt;br /&gt;
                    &amp;lt;?php echo $this-&amp;gt;form-&amp;gt;renderFieldset(&#039;accesscontrol&#039;);  ?&amp;gt;&lt;br /&gt;
                &amp;lt;/div&amp;gt;&lt;br /&gt;
            &amp;lt;/div&amp;gt;&lt;br /&gt;
        &amp;lt;/fieldset&amp;gt;&lt;br /&gt;
    &amp;lt;?php echo JHtml::_(&#039;bootstrap.endTab&#039;); ?&amp;gt;&lt;br /&gt;
    &amp;lt;?php echo JHtml::_(&#039;bootstrap.endTabSet&#039;); ?&amp;gt;&lt;br /&gt;
&lt;br /&gt;
    &amp;lt;/div&amp;gt;&lt;br /&gt;
    &amp;lt;input type=&amp;quot;hidden&amp;quot; name=&amp;quot;task&amp;quot; value=&amp;quot;helloworld.edit&amp;quot; /&amp;gt;&lt;br /&gt;
    &amp;lt;?php echo JHtml::_(&#039;form.token&#039;); ?&amp;gt;&lt;br /&gt;
&amp;lt;/form&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;translate&amp;gt;&lt;br /&gt;
=== Adding language strings === &amp;lt;!--T:72--&amp;gt;&lt;br /&gt;
&amp;lt;/translate&amp;gt;&lt;br /&gt;
&amp;lt;translate&amp;gt;&amp;lt;!--T:73--&amp;gt;&lt;br /&gt;
We used several language strings that have to be added to the backend language-file.&amp;lt;/translate&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span id=&amp;quot;admin/language/en-GB/en-GB.com_helloworld.ini&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;tt&amp;gt;admin/language/en-GB/en-GB.com_helloworld.ini&amp;lt;/tt&amp;gt;&lt;br /&gt;
&amp;lt;source lang=&amp;quot;text&amp;quot; highlight=&amp;quot;41-51&amp;quot;&amp;gt;&lt;br /&gt;
; Joomla! Project&lt;br /&gt;
; Copyright (C) 2005 - 2018 Open Source Matters. All rights reserved.&lt;br /&gt;
; License GNU General Public License version 2 or later; see LICENSE.txt, see LICENSE.php&lt;br /&gt;
; Note : All ini files need to be saved as UTF-8&lt;br /&gt;
&lt;br /&gt;
COM_HELLOWORLD_ADMINISTRATION=&amp;quot;HelloWorld - Administration&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_ADMINISTRATION_CATEGORIES=&amp;quot;HelloWorld - Categories&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_NUM=&amp;quot;#&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_HELLOWORLDS_FILTER=&amp;quot;Filters&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_PUBLISHED=&amp;quot;Published&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_HELLOWORLDS_NAME=&amp;quot;Name&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_ID=&amp;quot;Id&amp;quot;&lt;br /&gt;
&lt;br /&gt;
COM_HELLOWORLD_HELLOWORLD_CREATING=&amp;quot;HelloWorld - Creating&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_HELLOWORLD_DETAILS=&amp;quot;Details&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_HELLOWORLD_EDITING=&amp;quot;HelloWorld - Editing&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_HELLOWORLD_ERROR_UNACCEPTABLE=&amp;quot;Some values are unacceptable&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_HELLOWORLD_FIELD_CATID_DESC=&amp;quot;The category the messages belongs to&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_HELLOWORLD_FIELD_CATID_LABEL=&amp;quot;Category&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_HELLOWORLD_FIELD_GREETING_DESC=&amp;quot;This message will be displayed&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_HELLOWORLD_FIELD_GREETING_LABEL=&amp;quot;Message&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_HELLOWORLD_FIELD_SHOW_CATEGORY_LABEL=&amp;quot;Show category&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_HELLOWORLD_FIELD_SHOW_CATEGORY_DESC=&amp;quot;If set to Show, the title of the message&amp;amp;rsquo;s category will show.&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_HELLOWORLD_HEADING_GREETING=&amp;quot;Greeting&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_HELLOWORLD_HEADING_ID=&amp;quot;Id&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_MANAGER_HELLOWORLD_EDIT=&amp;quot;HelloWorld manager: Edit Message&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_MANAGER_HELLOWORLD_NEW=&amp;quot;HelloWorld manager: New Message&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_MANAGER_HELLOWORLDS=&amp;quot;HelloWorld manager&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_EDIT_HELLOWORLD=&amp;quot;Edit message&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_N_ITEMS_DELETED_1=&amp;quot;One message deleted&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_N_ITEMS_DELETED_MORE=&amp;quot;%d messages deleted&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_N_ITEMS_PUBLISHED=&amp;quot;%d message(s) published&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_N_ITEMS_UNPUBLISHED=&amp;quot;%d message(s) unpublished&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_HELLOWORLD_GREETING_LABEL=&amp;quot;Greeting&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_HELLOWORLD_GREETING_DESC=&amp;quot;Add Hello World Greeting&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_SUBMENU_MESSAGES=&amp;quot;Messages&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_SUBMENU_CATEGORIES=&amp;quot;Categories&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_CONFIGURATION=&amp;quot;HelloWorld Configuration&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_CONFIG_GREETING_SETTINGS_LABEL=&amp;quot;Messages settings&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_CONFIG_GREETING_SETTINGS_DESC=&amp;quot;Settings that will be applied to all messages by default&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_FIELDSET_RULES=&amp;quot;Message Permissions&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_FIELD_RULES_LABEL=&amp;quot;Permissions&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_ACCESS_EDIT_DESC=&amp;quot;Is this group allowed to edit this message?&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_ACCESS_DELETE_DESC=&amp;quot;Is this group allowed to delete this message?&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_TAB_NEW_MESSAGE=&amp;quot;New Message&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_TAB_EDIT_MESSAGE=&amp;quot;Edit Message&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_TAB_PARAMS=&amp;quot;Parameters&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_TAB_PERMISSIONS=&amp;quot;Permissions&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_LEGEND_DETAILS=&amp;quot;Message Details&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_LEGEND_PARAMS=&amp;quot;Message Parameters&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_LEGEND_PERMISSIONS=&amp;quot;Message Permissions&amp;quot;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;translate&amp;gt;&lt;br /&gt;
== Further reading == &amp;lt;!--T:74--&amp;gt;&lt;br /&gt;
&amp;lt;/translate&amp;gt;&lt;br /&gt;
&amp;lt;translate&amp;gt;&amp;lt;!--T:75--&amp;gt;&lt;br /&gt;
More information on actions, assets and ACL can be found on the following pages:&amp;lt;/translate&amp;gt;&lt;br /&gt;
&amp;lt;translate&amp;gt;&amp;lt;!--T:76--&amp;gt;&lt;br /&gt;
* General information and use: [[S:MyLanguage/J3.x:Access_Control_List_Tutorial|Access Control List/Tutorial]]&amp;lt;/translate&amp;gt;&lt;br /&gt;
&amp;lt;translate&amp;gt;&amp;lt;!--T:78--&amp;gt;&lt;br /&gt;
* [[S:MyLanguage/How to implement actions in your code|How to implement actions in your code]]&amp;lt;/translate&amp;gt;&lt;br /&gt;
&amp;lt;translate&amp;gt;&amp;lt;!--T:79--&amp;gt;&lt;br /&gt;
* [[S:MyLanguage/Adding ACL rules to your component|Adding ACL rules to your component]]&amp;lt;/translate&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;translate&amp;gt;&lt;br /&gt;
== Packaging the component == &amp;lt;!--T:83--&amp;gt;&lt;br /&gt;
&amp;lt;/translate&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;translate&amp;gt;&amp;lt;!--T:84--&amp;gt;&lt;br /&gt;
Content of your code directory. Each file link below takes you to the step in the tutorial which has the latest version of that source code file. &amp;lt;/translate&amp;gt;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Adding_ACL#helloworld.xml|helloworld.xml]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Adding_a_view_to_the_site_part#site/helloworld.php|site/helloworld.php]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Developing_a_Basic_Component#index.html|site/index.html]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Adding_a_view_to_the_site_part#site/controller.php|site/controller.php]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Developing_a_Basic_Component#index.html|site/views/index.html]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Developing_a_Basic_Component#index.html|site/views/helloworld/index.html]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Adding_configuration#site/views/helloworld/view.html.php|site/views/helloworld/view.html.php]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Developing_a_Basic_Component#index.html|site/views/helloworld/tmpl/index.html]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Using_the_database#site/views/helloworld/tmpl/default.xml|site/views/helloworld/tmpl/default.xml]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Adding_configuration#site/views/helloworld/tmpl/default.php|site/views/helloworld/tmpl/default.php]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Developing_a_Basic_Component#index.html|site/models/index.html]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Adding_configuration#site/models/helloworld.php|site/models/helloworld.php]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Developing_a_Basic_Component#index.html|site/language/index.html]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Developing_a_Basic_Component#index.html|site/language/en-GB/index.html]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.x:Developing an MVC Component/Adding language management#site.2Flanguage.2Fen-GB.2Fen-GB.com_helloworld.ini|site/language/en-GB/en-GB.com_helloworld.ini]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Developing_a_Basic_Component#index.html|admin/index.html]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Adding_ACL#admin/helloworld.php|admin/helloworld.php]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Adding_ACL#admin/config.xml|admin/config.xml]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Basic_backend#admin/controller.php|admin/controller.php]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Adding_ACL#admin/access.xml|admin/access.xml]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Adding_categories#admin/helpers/helloworld.php|admin/helpers/helloworld.php]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Developing_a_Basic_Component#index.html|admin/helpers/index.html]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Developing_a_Basic_Component#index.html|admin/sql/index.html]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[J3.2:Developing_an_MVC_Component/Adding_ACL#admin/sql/install.mysql.utf8.sql|admin/sql/install.mysql.utf8.sql]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Using_the_database#admin/sql/uninstall.mysql.utf8.sql|admin/sql/uninstall.mysql.utf8.sql]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Developing_a_Basic_Component#index.html|admin/sql/updates/index.html]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Developing_a_Basic_Component#index.html|admin/sql/updates/mysql/index.html]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Developing_a_Basic_Component#admin/sql/updates/mysql/0.0.1.sql|admin/sql/updates/mysql/0.0.1.sql]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Adding_ACL#admin/sql/install.mysql.utf8.sql|admin/sql/updates/mysql/0.0.6.sql]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Adding_categories#admin/sql/updates/mysql/0.0.12.sql|admin/sql/updates/mysql/0.0.12.sql]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Adding_configuration#admin/sql/updates/mysql/0.0.13.sql|admin/sql/updates/mysql/0.0.13.sql]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Adding_ACL#admin/sql/updates/mysql/0.0.14.sql|admin/sql/updates/mysql/0.0.14.sql]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Developing_a_Basic_Component#index.html|admin/models/index.html]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Developing_a_Basic_Component#index.html|admin/models/fields/index.html]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Adding_categories#admin/models/fields/helloworld.php|admin/models/fields/helloworld.php]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Adding_categories#admin/models/helloworlds.php|admin/models/helloworlds.php]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Adding_ACL#admin/models/helloworld.php|admin/models/helloworld.php]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Adding decorations to the backend#admin/models/forms/filter_helloworlds.xml|admin/models/forms/filter_helloworlds.xml]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Developing_a_Basic_Component#index.html|admin/models/forms/index.html]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Adding_verifications#admin/models/forms/helloworld.js|admin/models/forms/helloworld.js]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Adding_ACL#admin/models/forms/helloworld.xml|admin/models/forms/helloworld.xml]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Adding_verifications#admin/models/rules/greeting.php|admin/models/rules/greeting.php]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Developing_a_Basic_Component#index.html|admin/models/rules/index.html]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Adding_ACL#admin/controllers/helloworld.php|admin/controllers/helloworld.php]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Adding_backend_actions#admin/controllers/helloworlds.php|admin/controllers/helloworlds.php]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Developing_a_Basic_Component#index.html|admin/controllers/index.html]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Developing_a_Basic_Component#index.html|admin/views/index.html]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Developing_a_Basic_Component#index.html|admin/views/helloworld/index.html]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Adding_ACL#admin/views/helloworld/view.html.php|admin/views/helloworld/view.html.php]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Developing_a_Basic_Component#index.html|admin/views/helloworld/tmpl/index.html]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Adding_ACL#admin/views/helloworld/tmpl/edit.php|admin/views/helloworld/tmpl/edit.php]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Adding_verifications#admin/views/helloworld/submitbutton.js|admin/views/helloworld/submitbutton.js]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Developing_a_Basic_Component#index.html|admin/views/helloworlds/index.html]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Adding_ACL#admin/views/helloworlds/view.html.php|admin/views/helloworlds/view.html.php]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Developing_a_Basic_Component#index.html|admin/views/helloworlds/tmpl/index.html]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Adding_categories#admin/views/helloworlds/tmpl/default.php|admin/views/helloworlds/tmpl/default.php]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Developing_a_Basic_Component#index.html|admin/tables/index.html]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Adding_ACL#admin/tables/helloworld.php|admin/tables/helloworld.php]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Developing_a_Basic_Component#index.html|admin/language/index.html]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Developing_a_Basic_Component#index.html|admin/language/en-GB/index.html]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.x:Developing an MVC Component/Adding_ACL#admin.2Flanguage.2Fen-GB.2Fen-GB.com_helloworld.ini|admin/language/en-GB/en-GB.com_helloworld.ini]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.x:Developing an MVC Component/Adding_decorations_to_the_backend#admin.2Flanguage.2Fen-GB.2Fen-GB.com_helloworld.sys.ini|admin/language/en-GB/en-GB.com_helloworld.sys.ini]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Developing_a_Basic_Component#index.html|media/index.html]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Developing_a_Basic_Component#index.html|media/images/index.html]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.x:Developing_an_MVC_Component/Adding_decorations_to_the_backend#Adding_some_icons|media/images/tux-16x16.png]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.x:Developing_an_MVC_Component/Adding_decorations_to_the_backend#Adding_some_icons|media/images/tux-48x48.png]]&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;translate&amp;gt;&amp;lt;!--T:85--&amp;gt;&lt;br /&gt;
Create a compressed file of this directory or directly download the [https://github.com/scionescire/Joomla-3.2-Hello-World-Component/archive/step-14-adding-ACL.zip archive] and install it using the extension manager of Joomla. You can add a menu item of this component using the menu manager in the backend.&amp;lt;/translate&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span id=&amp;quot;helloworld.xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;tt&amp;gt;helloworld.xml&amp;lt;/tt&amp;gt;&lt;br /&gt;
&amp;lt;source lang=&amp;quot;xml&amp;quot; highlight=&amp;quot;13&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;?xml version=&amp;quot;1.0&amp;quot; encoding=&amp;quot;utf-8&amp;quot;?&amp;gt;&lt;br /&gt;
&amp;lt;extension type=&amp;quot;component&amp;quot; version=&amp;quot;3.0&amp;quot; method=&amp;quot;upgrade&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
	&amp;lt;name&amp;gt;COM_HELLOWORLD&amp;lt;/name&amp;gt;&lt;br /&gt;
	&amp;lt;!-- The following elements are optional and free of formatting constraints --&amp;gt;&lt;br /&gt;
	&amp;lt;creationDate&amp;gt;January 2018&amp;lt;/creationDate&amp;gt;&lt;br /&gt;
	&amp;lt;author&amp;gt;John Doe&amp;lt;/author&amp;gt;&lt;br /&gt;
	&amp;lt;authorEmail&amp;gt;john.doe@example.org&amp;lt;/authorEmail&amp;gt;&lt;br /&gt;
	&amp;lt;authorUrl&amp;gt;http://www.example.org&amp;lt;/authorUrl&amp;gt;&lt;br /&gt;
	&amp;lt;copyright&amp;gt;Copyright Info&amp;lt;/copyright&amp;gt;&lt;br /&gt;
	&amp;lt;license&amp;gt;License Info&amp;lt;/license&amp;gt;&lt;br /&gt;
	&amp;lt;!--  The version string is recorded in the components table --&amp;gt;&lt;br /&gt;
	&amp;lt;version&amp;gt;0.0.14&amp;lt;/version&amp;gt;&lt;br /&gt;
	&amp;lt;!-- The description is optional and defaults to the name --&amp;gt;&lt;br /&gt;
	&amp;lt;description&amp;gt;COM_HELLOWORLD_DESCRIPTION&amp;lt;/description&amp;gt;&lt;br /&gt;
&lt;br /&gt;
	&amp;lt;install&amp;gt; &amp;lt;!-- Runs on install --&amp;gt;&lt;br /&gt;
		&amp;lt;sql&amp;gt;&lt;br /&gt;
			&amp;lt;file driver=&amp;quot;mysql&amp;quot; charset=&amp;quot;utf8&amp;quot;&amp;gt;sql/install.mysql.utf8.sql&amp;lt;/file&amp;gt;&lt;br /&gt;
		&amp;lt;/sql&amp;gt;&lt;br /&gt;
	&amp;lt;/install&amp;gt;&lt;br /&gt;
	&amp;lt;uninstall&amp;gt; &amp;lt;!-- Runs on uninstall --&amp;gt;&lt;br /&gt;
		&amp;lt;sql&amp;gt;&lt;br /&gt;
			&amp;lt;file driver=&amp;quot;mysql&amp;quot; charset=&amp;quot;utf8&amp;quot;&amp;gt;sql/uninstall.mysql.utf8.sql&amp;lt;/file&amp;gt;&lt;br /&gt;
		&amp;lt;/sql&amp;gt;&lt;br /&gt;
	&amp;lt;/uninstall&amp;gt;&lt;br /&gt;
	&amp;lt;update&amp;gt; &amp;lt;!-- Runs on update; New since J2.5 --&amp;gt;&lt;br /&gt;
		&amp;lt;schemas&amp;gt;&lt;br /&gt;
			&amp;lt;schemapath type=&amp;quot;mysql&amp;quot;&amp;gt;sql/updates/mysql&amp;lt;/schemapath&amp;gt;&lt;br /&gt;
		&amp;lt;/schemas&amp;gt;&lt;br /&gt;
	&amp;lt;/update&amp;gt;&lt;br /&gt;
&lt;br /&gt;
	&amp;lt;!-- Site Main File Copy Section --&amp;gt;&lt;br /&gt;
	&amp;lt;!-- Note the folder attribute: This attribute describes the folder&lt;br /&gt;
		to copy FROM in the package to install therefore files copied&lt;br /&gt;
		in this section are copied from /site/ in the package --&amp;gt;&lt;br /&gt;
	&amp;lt;files folder=&amp;quot;site&amp;quot;&amp;gt;&lt;br /&gt;
		&amp;lt;filename&amp;gt;index.html&amp;lt;/filename&amp;gt;&lt;br /&gt;
		&amp;lt;filename&amp;gt;helloworld.php&amp;lt;/filename&amp;gt;&lt;br /&gt;
		&amp;lt;filename&amp;gt;controller.php&amp;lt;/filename&amp;gt;&lt;br /&gt;
		&amp;lt;folder&amp;gt;views&amp;lt;/folder&amp;gt;&lt;br /&gt;
		&amp;lt;folder&amp;gt;models&amp;lt;/folder&amp;gt;&lt;br /&gt;
	&amp;lt;/files&amp;gt;&lt;br /&gt;
&lt;br /&gt;
        &amp;lt;languages folder=&amp;quot;site/language&amp;quot;&amp;gt;&lt;br /&gt;
		&amp;lt;language tag=&amp;quot;en-GB&amp;quot;&amp;gt;en-GB/en-GB.com_helloworld.ini&amp;lt;/language&amp;gt;&lt;br /&gt;
        &amp;lt;/languages&amp;gt;&lt;br /&gt;
&lt;br /&gt;
	&amp;lt;media destination=&amp;quot;com_helloworld&amp;quot; folder=&amp;quot;media&amp;quot;&amp;gt;&lt;br /&gt;
		&amp;lt;filename&amp;gt;index.html&amp;lt;/filename&amp;gt;&lt;br /&gt;
		&amp;lt;folder&amp;gt;images&amp;lt;/folder&amp;gt;&lt;br /&gt;
	&amp;lt;/media&amp;gt;&lt;br /&gt;
&lt;br /&gt;
	&amp;lt;administration&amp;gt;&lt;br /&gt;
		&amp;lt;!-- Administration Menu Section --&amp;gt;&lt;br /&gt;
		&amp;lt;menu link=&#039;index.php?option=com_helloworld&#039; img=&amp;quot;../media/com_helloworld/images/tux-16x16.png&amp;quot;&amp;gt;COM_HELLOWORLD_MENU&amp;lt;/menu&amp;gt;&lt;br /&gt;
		&amp;lt;!-- Administration Main File Copy Section --&amp;gt;&lt;br /&gt;
		&amp;lt;!-- Note the folder attribute: This attribute describes the folder&lt;br /&gt;
			to copy FROM in the package to install therefore files copied&lt;br /&gt;
			in this section are copied from /admin/ in the package --&amp;gt;&lt;br /&gt;
		&amp;lt;files folder=&amp;quot;admin&amp;quot;&amp;gt;&lt;br /&gt;
			&amp;lt;!-- Admin Main File Copy Section --&amp;gt;&lt;br /&gt;
			&amp;lt;filename&amp;gt;index.html&amp;lt;/filename&amp;gt;&lt;br /&gt;
			&amp;lt;filename&amp;gt;config.xml&amp;lt;/filename&amp;gt;&lt;br /&gt;
			&amp;lt;filename&amp;gt;helloworld.php&amp;lt;/filename&amp;gt;&lt;br /&gt;
			&amp;lt;filename&amp;gt;controller.php&amp;lt;/filename&amp;gt;&lt;br /&gt;
			&amp;lt;filename&amp;gt;access.xml&amp;lt;/filename&amp;gt;&lt;br /&gt;
			&amp;lt;!-- SQL files section --&amp;gt;&lt;br /&gt;
			&amp;lt;folder&amp;gt;sql&amp;lt;/folder&amp;gt;&lt;br /&gt;
			&amp;lt;!-- tables files section --&amp;gt;&lt;br /&gt;
			&amp;lt;folder&amp;gt;tables&amp;lt;/folder&amp;gt;&lt;br /&gt;
			&amp;lt;!-- models files section --&amp;gt;&lt;br /&gt;
			&amp;lt;folder&amp;gt;models&amp;lt;/folder&amp;gt;&lt;br /&gt;
			&amp;lt;!-- views files section --&amp;gt;&lt;br /&gt;
			&amp;lt;folder&amp;gt;views&amp;lt;/folder&amp;gt;&lt;br /&gt;
			&amp;lt;!-- controllers files section --&amp;gt;&lt;br /&gt;
			&amp;lt;folder&amp;gt;controllers&amp;lt;/folder&amp;gt;&lt;br /&gt;
			&amp;lt;!-- helpers files section --&amp;gt;&lt;br /&gt;
			&amp;lt;folder&amp;gt;helpers&amp;lt;/folder&amp;gt;&lt;br /&gt;
		&amp;lt;/files&amp;gt;&lt;br /&gt;
		&amp;lt;languages folder=&amp;quot;admin/language&amp;quot;&amp;gt;&lt;br /&gt;
        		&amp;lt;language tag=&amp;quot;en-GB&amp;quot;&amp;gt;en-GB/en-GB.com_helloworld.ini&amp;lt;/language&amp;gt;&lt;br /&gt;
                        &amp;lt;language tag=&amp;quot;en-GB&amp;quot;&amp;gt;en-GB/en-GB.com_helloworld.sys.ini&amp;lt;/language&amp;gt;&lt;br /&gt;
		&amp;lt;/languages&amp;gt;&lt;br /&gt;
	&amp;lt;/administration&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/extension&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;translate&amp;gt;&lt;br /&gt;
== Contributors == &amp;lt;!--T:86--&amp;gt;&lt;br /&gt;
&amp;lt;/translate&amp;gt;&lt;br /&gt;
*[[User:Dwarkesh0204|Dwarkesh Soni]]&lt;br /&gt;
*[[User:cdemko|Christophe Demko]]&lt;br /&gt;
*[[User:oaksu|Ozgur Aksu]]&lt;br /&gt;
*[[User:florian_denizot|Florian Denizot]]&lt;br /&gt;
*[[User:HermanPeeren|Herman Peeren]]&lt;br /&gt;
* TDZweb (Ståle Rolf Sæbøe), Elin Waring, Neil via https://groups.google.com/forum/#!topic/joomla-dev-general/aCH3GNA91m4&lt;br /&gt;
*[[User:Scionescire|Scionescire]]&lt;br /&gt;
*[[User:Robbiej|Robbie Jackson]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;row&amp;quot;&amp;gt; &lt;br /&gt;
&amp;lt;div class=&amp;quot;large-6 columns&amp;quot;&amp;gt;{{Basic button|&amp;lt;translate&amp;gt;&amp;lt;!--T:87--&amp;gt;&lt;br /&gt;
S:MyLanguage/J3.x:Developing_an_MVC_Component/Adding configuration|Prev: Adding configuration&amp;lt;/translate&amp;gt;|class=expand success}}&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;div class=&amp;quot;large-6 columns&amp;quot;&amp;gt;{{Basic button|&amp;lt;translate&amp;gt;&amp;lt;!--T:88--&amp;gt;&lt;br /&gt;
S:MyLanguage/J3.x:Developing_an_MVC_Component/Adding an install-uninstall-update script file|Next: Adding an install-uninstall-update script file&amp;lt;/translate&amp;gt;|class=expand}}&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
__NOTOC__&lt;br /&gt;
&amp;lt;noinclude&amp;gt;&lt;br /&gt;
[[Category:Joomla! 3.x{{#translation:}}]]&lt;br /&gt;
[[Category:Joomla! 3.0{{#translation:}}]]&lt;br /&gt;
[[Category:Joomla! 3.1{{#translation:}}]]&lt;br /&gt;
[[Category:Joomla! 3.2{{#translation:}}]]&lt;br /&gt;
[[Category:Joomla! 3.3{{#translation:}}]]&lt;br /&gt;
[[Category:Joomla! 3.4{{#translation:}}]]&lt;br /&gt;
[[Category:Beginner Development{{#translation:}}]]&lt;br /&gt;
[[Category:Component Development{{#translation:}}]]&lt;br /&gt;
[[Category:Tutorials{{#translation:}}]]&lt;br /&gt;
[[Category:Tutorials in a Series{{#translation:}}]]&lt;br /&gt;
&amp;lt;/noinclude&amp;gt;&lt;/div&gt;</summary>
		<author><name>Stan31337</name></author>
	</entry>
	<entry>
		<id>https://docs.sandbox.joomla.org/index.php?title=J3.x:Developing_an_MVC_Component/Adding_ACL&amp;diff=588829</id>
		<title>J3.x:Developing an MVC Component/Adding ACL</title>
		<link rel="alternate" type="text/html" href="https://docs.sandbox.joomla.org/index.php?title=J3.x:Developing_an_MVC_Component/Adding_ACL&amp;diff=588829"/>
		<updated>2019-01-29T03:09:47Z</updated>

		<summary type="html">&lt;p&gt;Stan31337: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;noinclude&amp;gt;&amp;lt;languages /&amp;gt;&amp;lt;/noinclude&amp;gt;&lt;br /&gt;
{{review}}&lt;br /&gt;
{{:J3.1:Developing an MVC Component/&amp;lt;translate&amp;gt;&amp;lt;!--T:1--&amp;gt;&lt;br /&gt;
en&amp;lt;/translate&amp;gt;}}&lt;br /&gt;
&amp;lt;translate&amp;gt;== Introduction == &amp;lt;!--T:2--&amp;gt;&amp;lt;/translate&amp;gt;&lt;br /&gt;
&amp;lt;translate&amp;gt;&amp;lt;!--T:3--&amp;gt;&lt;br /&gt;
This tutorial is part of the [[S:MyLanguage/J3.2:Developing an MVC Component | Developing an MVC Component for Joomla! 3.2]] tutorial. You are encouraged to read the previous parts of the tutorial before reading this.&amp;lt;/translate&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;translate&amp;gt;== Adding Access Control == &amp;lt;!--T:4--&amp;gt;&amp;lt;/translate&amp;gt;&lt;br /&gt;
&amp;lt;translate&amp;gt;&amp;lt;!--T:5--&amp;gt;&lt;br /&gt;
With Joomla!&#039;s Access Control we can define which user groups are allowed or denied to do which actions in your component. In this example we use actions that are defined in the core. For the component as a whole: core.admin (access to the configuration) and core.manage (access to the backend). And at various levels actions like create, delete and edit. Besides those core actions you can define your own actions, but that is often not necessary and is not shown in this example. View/Read Access is not managed via those actions but with View Access Levels; see general documentation about Joomla!&#039;s ACL for that.&amp;lt;/translate&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;translate&amp;gt;&amp;lt;!--T:6--&amp;gt;&lt;br /&gt;
In the #__assets table the actual list is stored: which user groups are allowed or denied to do which actions on which resources (assets). This is the implementation of the Access Control List (ACL).&amp;lt;/translate&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;translate&amp;gt;&amp;lt;!--T:7--&amp;gt;&lt;br /&gt;
In this article we will show how to add and use access permissions at several levels of granularity: for your component as a whole, for the categories and for the individual items.&amp;lt;/translate&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;translate&amp;gt;&lt;br /&gt;
&amp;lt;!--T:97--&amp;gt;&lt;br /&gt;
To test this functionality create users and associate them with the user groups which have access to the back end admin functionality (ie those user groups which have Administrator Login permission in the Global Configuration Permission Settings). By default this is Manager and Administrator, but you can also define your own user groups, and optionally set them as children of Manager or Administrator.&amp;lt;/translate&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;translate&amp;gt;&lt;br /&gt;
&amp;lt;!--T:98--&amp;gt;&lt;br /&gt;
If you&#039;re not already very familiar with Joomla Access Control then it&#039;s recommended to watch this video [https://youtu.be/CFqXAc3orkY ACL Explained] (between 2 minutes and 32 minutes is the section to watch) and read this [[S:MyLanguage/J3.x:Access_Control_List_Tutorial|Access Control List Tutorial]].&lt;br /&gt;
&amp;lt;/translate&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;translate&amp;gt;&amp;lt;!--T:101--&amp;gt; Three videos associated with this tutorial step cover Joomla&#039;s [https://youtu.be/kOqWcSF-p5Q Access Control Infrastructure], an explanation of this step&#039;s [https://youtu.be/sljTur6zMOs tutorial code] and a supplementary video on [https://youtu.be/CS_Ok1t550E Access View Levels].&amp;lt;/translate&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;translate&amp;gt;&lt;br /&gt;
== Minimal ACL requirements at the component level == &amp;lt;!--T:10--&amp;gt;&lt;br /&gt;
&amp;lt;/translate&amp;gt;&lt;br /&gt;
&amp;lt;translate&amp;gt;&amp;lt;!--T:11--&amp;gt;&lt;br /&gt;
There are 2 actions that need to be defined at the component level for a Joomla! 2.5+ component to offer basic ACL support:&amp;lt;/translate&amp;gt;&lt;br /&gt;
&amp;lt;translate&amp;gt;&amp;lt;!--T:12--&amp;gt;&lt;br /&gt;
* &#039;&#039;&#039;Configure&#039;&#039;&#039; (core.admin): which groups are allowed to configure the component level permissions via the &#039;Options&#039; toolbar button?&amp;lt;/translate&amp;gt;&lt;br /&gt;
&amp;lt;translate&amp;gt;&amp;lt;!--T:13--&amp;gt;&lt;br /&gt;
* &#039;&#039;&#039;Access Component&#039;&#039;&#039; (core.manage): which groups are allowed to access the component&#039;s backend?&amp;lt;/translate&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;translate&amp;gt;&amp;lt;!--T:14--&amp;gt;&lt;br /&gt;
This basic ACL support is done in 4 simple steps:&amp;lt;/translate&amp;gt;&lt;br /&gt;
&amp;lt;translate&amp;gt;&amp;lt;!--T:15--&amp;gt;&lt;br /&gt;
* [[#Add_the_2_minimal_component_level_actions_to_access.xml|Add the 2 minimal component level actions to access.xml]]&amp;lt;/translate&amp;gt;&lt;br /&gt;
&amp;lt;translate&amp;gt;&amp;lt;!--T:16--&amp;gt;&lt;br /&gt;
* [[#Add_the_permissions_fieldset_to_config.xml|Add the permissions fieldset to config.xml]]&amp;lt;/translate&amp;gt;&lt;br /&gt;
&amp;lt;translate&amp;gt;&amp;lt;!--T:17--&amp;gt;&lt;br /&gt;
* [[#Add_the_.27Options.27_toolbar_button_when_user_is_authorised_for_it|Add the &#039;Options&#039; toolbar button]]&amp;lt;/translate&amp;gt;&lt;br /&gt;
&amp;lt;translate&amp;gt;&amp;lt;!--T:18--&amp;gt;&lt;br /&gt;
* [[#Restrict_the_access_to_the_component.27s_backend_to_authorised_usergroups|Restrict the access to the component&#039;s backend]]&amp;lt;/translate&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;translate&amp;gt;&lt;br /&gt;
=== Add the 2 minimal component level actions to access.xml === &amp;lt;!--T:19--&amp;gt;&lt;br /&gt;
&amp;lt;/translate&amp;gt;&lt;br /&gt;
&amp;lt;translate&amp;gt;&amp;lt;!--T:20--&amp;gt;&lt;br /&gt;
A minimal ACL &amp;lt;/tt&amp;gt;access.xml&amp;lt;/tt&amp;gt; would consist of only those 2 basic actions:&amp;lt;/translate&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tt&amp;gt;Basic admin/access.xml&amp;lt;/tt&amp;gt;&lt;br /&gt;
&amp;lt;source lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;?xml version=&amp;quot;1.0&amp;quot; encoding=&amp;quot;utf-8&amp;quot; ?&amp;gt;&lt;br /&gt;
&amp;lt;access component=&amp;quot;com_helloworld&amp;quot;&amp;gt;&lt;br /&gt;
	&amp;lt;section name=&amp;quot;component&amp;quot;&amp;gt;&lt;br /&gt;
		&amp;lt;action name=&amp;quot;core.admin&amp;quot; title=&amp;quot;JACTION_ADMIN&amp;quot; description=&amp;quot;JACTION_ADMIN_COMPONENT_DESC&amp;quot; /&amp;gt;&lt;br /&gt;
		&amp;lt;action name=&amp;quot;core.manage&amp;quot; title=&amp;quot;JACTION_MANAGE&amp;quot; description=&amp;quot;JACTION_MANAGE_COMPONENT_DESC&amp;quot; /&amp;gt;&lt;br /&gt;
	&amp;lt;/section&amp;gt;&lt;br /&gt;
&amp;lt;/access&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;translate&amp;gt;&amp;lt;!--T:21--&amp;gt;&lt;br /&gt;
See &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Adding_categories#admin/access.xml|admin/access.xml]]&#039;&#039; for the current and more elaborate version.&amp;lt;/translate&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;translate&amp;gt;&lt;br /&gt;
=== Add the permissions fieldset to config.xml === &amp;lt;!--T:22--&amp;gt;&lt;br /&gt;
&amp;lt;/translate&amp;gt;&lt;br /&gt;
&amp;lt;translate&amp;gt;&amp;lt;!--T:23--&amp;gt;&lt;br /&gt;
Add the following permissions fieldset to &amp;lt;tt&amp;gt;admin/config.xml&amp;lt;/tt&amp;gt; in order to be able to set our component level permissions.&amp;lt;/translate&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
	&amp;lt;fieldset&lt;br /&gt;
		name=&amp;quot;permissions&amp;quot;&lt;br /&gt;
		label=&amp;quot;JCONFIG_PERMISSIONS_LABEL&amp;quot;&lt;br /&gt;
		description=&amp;quot;JCONFIG_PERMISSIONS_DESC&amp;quot;&lt;br /&gt;
	&amp;gt;&lt;br /&gt;
		&amp;lt;field&lt;br /&gt;
			name=&amp;quot;rules&amp;quot;&lt;br /&gt;
			type=&amp;quot;rules&amp;quot;&lt;br /&gt;
			label=&amp;quot;JCONFIG_PERMISSIONS_LABEL&amp;quot;&lt;br /&gt;
			class=&amp;quot;inputbox&amp;quot;&lt;br /&gt;
			validate=&amp;quot;rules&amp;quot;&lt;br /&gt;
			filter=&amp;quot;rules&amp;quot;&lt;br /&gt;
			component=&amp;quot;com_helloworld&amp;quot;&lt;br /&gt;
			section=&amp;quot;component&amp;quot;&lt;br /&gt;
		/&amp;gt;&lt;br /&gt;
	&amp;lt;/fieldset&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;translate&amp;gt;&amp;lt;!--T:24--&amp;gt;&lt;br /&gt;
See the [[#admin.2Fconfig.xml|more elaborate config.xml example]] further downwards for the exact place where to insert this code.&amp;lt;/translate&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;translate&amp;gt;&lt;br /&gt;
=== Add the &#039;Options&#039; toolbar button when user is authorised for it === &amp;lt;!--T:25--&amp;gt;&lt;br /&gt;
&amp;lt;/translate&amp;gt;&lt;br /&gt;
&amp;lt;translate&amp;gt;&amp;lt;!--T:26--&amp;gt;&lt;br /&gt;
In the &amp;lt;tt&amp;gt;admin/views/helloworlds/view.html.php&amp;lt;/tt&amp;gt; file you can add the following code to check if the user can edit the preferences:&amp;lt;/translate&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;php&amp;quot; highlight=&amp;quot;2-3,5&amp;quot;&amp;gt;&lt;br /&gt;
    // Options button.&lt;br /&gt;
    if (JFactory::getUser()-&amp;gt;authorise(&#039;core.admin&#039;, &#039;com_helloworld&#039;)) &lt;br /&gt;
    {&lt;br /&gt;
	JToolBarHelper::preferences(&#039;com_helloworld&#039;);&lt;br /&gt;
    }&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;translate&amp;gt;&amp;lt;!--T:27--&amp;gt;&lt;br /&gt;
See further downwards for a [[#admin/views/helloworlds/view.html.php|more elaborated example of &#039;&#039;admin/views/helloworlds/view.html.php&#039;&#039;]] where this &#039;&#039;JToolBarHelper::preferences(&#039;com_helloworld&#039;)&#039;&#039; is done in an addToolBar()-method together with the other toolbar buttons and the &#039;&#039;JUser-&amp;gt;authorise()&#039;&#039;-check is done with JHelperContent, resulting in the $canDo-property.&amp;lt;/translate&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;translate&amp;gt;&lt;br /&gt;
=== Restrict the access to the component&#039;s backend to authorised usergroups === &amp;lt;!--T:28--&amp;gt;&lt;br /&gt;
&amp;lt;/translate&amp;gt;&lt;br /&gt;
&amp;lt;translate&amp;gt;&amp;lt;!--T:29--&amp;gt;&lt;br /&gt;
To control the access to the backend of the component add the following lines to the &amp;lt;tt&amp;gt;admin/helloworld.php&amp;lt;/tt&amp;gt; entry-file:&amp;lt;/translate&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;php&amp;quot;&amp;gt;&lt;br /&gt;
// Access check: is this user allowed to access the backend of this component?&lt;br /&gt;
if (!JFactory::getUser()-&amp;gt;authorise(&#039;core.manage&#039;, &#039;com_helloworld&#039;)) &lt;br /&gt;
{&lt;br /&gt;
	throw new Exception(JText::_(&#039;JERROR_ALERTNOAUTHOR&#039;));&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;translate&amp;gt;&amp;lt;!--T:30--&amp;gt;&lt;br /&gt;
See further downwards for the [[#admin/helloworld.php|whole code of the &#039;&#039;admin/helloworld.php&#039;&#039; file]].&amp;lt;/translate&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;translate&amp;gt;&lt;br /&gt;
== Adding more actions, also at category level and item level == &amp;lt;!--T:31--&amp;gt;&lt;br /&gt;
&amp;lt;/translate&amp;gt;&lt;br /&gt;
&amp;lt;translate&amp;gt;&amp;lt;!--T:32--&amp;gt;&lt;br /&gt;
When adding more actions and more levels, the above described 4 steps are done too:&amp;lt;/translate&amp;gt;&lt;br /&gt;
&amp;lt;translate&amp;gt;&amp;lt;!--T:33--&amp;gt;&lt;br /&gt;
* [[#Describing_the_actions_you_want_to_control_the_access_to|Add the actions to access.xml; here we can add more actions and levels]]&amp;lt;/translate&amp;gt;&lt;br /&gt;
&amp;lt;translate&amp;gt;&amp;lt;!--T:34--&amp;gt;&lt;br /&gt;
* [[#Adding_the_setting_of_permissions_in_the_component.27s_Preferences|Add the permissions-fieldset to config.xml]]&amp;lt;/translate&amp;gt;&lt;br /&gt;
&amp;lt;translate&amp;gt;&amp;lt;!--T:35--&amp;gt;&lt;br /&gt;
* [[#Displaying_only_the_right_toolbar_buttons|Add the &#039;Options&#039; toolbar button]]&amp;lt;/translate&amp;gt;&lt;br /&gt;
&amp;lt;translate&amp;gt;&amp;lt;!--T:36--&amp;gt;&lt;br /&gt;
* [[#Restricting_access_to_the_component|Restrict the access to the component&#039;s backend&lt;br /&gt;
]]&amp;lt;/translate&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;translate&amp;gt;&amp;lt;!--T:37--&amp;gt;&lt;br /&gt;
In addition we also have to do the following steps:&amp;lt;/translate&amp;gt;&lt;br /&gt;
&amp;lt;translate&amp;gt;&amp;lt;!--T:38--&amp;gt;&lt;br /&gt;
* [[#Add_the_asset_id_column_to_the_database_table|Add an asset_id to the item&#039;s database table for item level access control]]&amp;lt;/translate&amp;gt;&lt;br /&gt;
&amp;lt;translate&amp;gt;&amp;lt;!--T:39--&amp;gt;&lt;br /&gt;
* [[#Setting_the_permission_values_in_the_assets_table|Store the permissions in the assets table. Especially take care of setting the asset_id of the parent-asset]]&amp;lt;/translate&amp;gt;&lt;br /&gt;
&amp;lt;translate&amp;gt;&amp;lt;!--T:40--&amp;gt;&lt;br /&gt;
* [[#Showing_the_setting_of_permissions_on_the_item_level|Make the settings of the permissions at the item level editable]]&amp;lt;/translate&amp;gt;&lt;br /&gt;
&amp;lt;translate&amp;gt;&amp;lt;!--T:41--&amp;gt;&lt;br /&gt;
* [[#Adding_language_strings|Add some language strings]]&amp;lt;/translate&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;translate&amp;gt;&lt;br /&gt;
=== Describing the actions you want to control the access to === &amp;lt;!--T:42--&amp;gt;&lt;br /&gt;
&amp;lt;/translate&amp;gt;&lt;br /&gt;
&amp;lt;translate&amp;gt;&amp;lt;!--T:43--&amp;gt;&lt;br /&gt;
Each component (or part of it) has its own set of permissions that can be controlled. They are described in an &amp;lt;tt&amp;gt;access.xml&amp;lt;/tt&amp;gt; file located at the root of the &#039;&#039;admin&#039;&#039; folder. In this helloworld-example the actions to which access is controlled are divided in three sections: at the component level, the category level and the item level. An &#039;item&#039; is called a &#039;message&#039; in our example component, hence the name of the third section.&amp;lt;/translate&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span id=&amp;quot;admin/access.xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;tt&amp;gt;admin/access.xml&amp;lt;/tt&amp;gt;&lt;br /&gt;
&amp;lt;source lang=&amp;quot;xml&amp;quot; highlight=&amp;quot;9-10,12-18&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;?xml version=&amp;quot;1.0&amp;quot; encoding=&amp;quot;utf-8&amp;quot; ?&amp;gt;&lt;br /&gt;
&amp;lt;access component=&amp;quot;com_helloworld&amp;quot;&amp;gt;&lt;br /&gt;
	&amp;lt;section name=&amp;quot;component&amp;quot;&amp;gt;&lt;br /&gt;
		&amp;lt;action name=&amp;quot;core.admin&amp;quot; title=&amp;quot;JACTION_ADMIN&amp;quot; description=&amp;quot;JACTION_ADMIN_COMPONENT_DESC&amp;quot; /&amp;gt;&lt;br /&gt;
		&amp;lt;action name=&amp;quot;core.manage&amp;quot; title=&amp;quot;JACTION_MANAGE&amp;quot; description=&amp;quot;JACTION_MANAGE_COMPONENT_DESC&amp;quot; /&amp;gt;&lt;br /&gt;
		&amp;lt;action name=&amp;quot;core.create&amp;quot; title=&amp;quot;JACTION_CREATE&amp;quot; description=&amp;quot;JACTION_CREATE_COMPONENT_DESC&amp;quot; /&amp;gt;&lt;br /&gt;
		&amp;lt;action name=&amp;quot;core.delete&amp;quot; title=&amp;quot;JACTION_DELETE&amp;quot; description=&amp;quot;JACTION_DELETE_COMPONENT_DESC&amp;quot; /&amp;gt;&lt;br /&gt;
		&amp;lt;action name=&amp;quot;core.edit&amp;quot; title=&amp;quot;JACTION_EDIT&amp;quot; description=&amp;quot;JACTION_EDIT_COMPONENT_DESC&amp;quot; /&amp;gt;&lt;br /&gt;
		&amp;lt;action name=&amp;quot;core.edit.state&amp;quot; title=&amp;quot;JACTION_EDITSTATE&amp;quot; description=&amp;quot;JACTION_EDITSTATE_COMPONENT_DESC&amp;quot; /&amp;gt;&lt;br /&gt;
		&amp;lt;action name=&amp;quot;core.edit.own&amp;quot; title=&amp;quot;JACTION_EDITOWN&amp;quot; description=&amp;quot;JACTION_EDITOWN_COMPONENT_DESC&amp;quot; /&amp;gt;&lt;br /&gt;
	&amp;lt;/section&amp;gt;&lt;br /&gt;
	&amp;lt;section name=&amp;quot;category&amp;quot;&amp;gt;&lt;br /&gt;
		&amp;lt;action name=&amp;quot;core.create&amp;quot; title=&amp;quot;JACTION_CREATE&amp;quot; description=&amp;quot;COM_CATEGORIES_ACCESS_CREATE_DESC&amp;quot; /&amp;gt;&lt;br /&gt;
		&amp;lt;action name=&amp;quot;core.delete&amp;quot; title=&amp;quot;JACTION_DELETE&amp;quot; description=&amp;quot;COM_CATEGORIES_ACCESS_DELETE_DESC&amp;quot; /&amp;gt;&lt;br /&gt;
		&amp;lt;action name=&amp;quot;core.edit&amp;quot; title=&amp;quot;JACTION_EDIT&amp;quot; description=&amp;quot;COM_CATEGORIES_ACCESS_EDIT_DESC&amp;quot; /&amp;gt;&lt;br /&gt;
		&amp;lt;action name=&amp;quot;core.edit.state&amp;quot; title=&amp;quot;JACTION_EDITSTATE&amp;quot; description=&amp;quot;COM_CATEGORIES_ACCESS_EDITSTATE_DESC&amp;quot; /&amp;gt;&lt;br /&gt;
		&amp;lt;action name=&amp;quot;core.edit.own&amp;quot; title=&amp;quot;JACTION_EDITOWN&amp;quot; description=&amp;quot;COM_CATEGORIES_ACCESS_EDITOWN_DESC&amp;quot; /&amp;gt;&lt;br /&gt;
	&amp;lt;/section&amp;gt;&lt;br /&gt;
	&amp;lt;section name=&amp;quot;message&amp;quot;&amp;gt;&lt;br /&gt;
		&amp;lt;action name=&amp;quot;core.delete&amp;quot; title=&amp;quot;JACTION_DELETE&amp;quot; description=&amp;quot;COM_HELLOWORLD_ACCESS_DELETE_DESC&amp;quot; /&amp;gt;&lt;br /&gt;
		&amp;lt;action name=&amp;quot;core.edit&amp;quot; title=&amp;quot;JACTION_EDIT&amp;quot; description=&amp;quot;COM_HELLOWORLD_ACCESS_EDIT_DESC&amp;quot; /&amp;gt;&lt;br /&gt;
	&amp;lt;/section&amp;gt;&lt;br /&gt;
&amp;lt;/access&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;translate&amp;gt;&lt;br /&gt;
=== Adding the setting of permissions in the component&#039;s Preferences === &amp;lt;!--T:44--&amp;gt;&lt;br /&gt;
&amp;lt;/translate&amp;gt;&lt;br /&gt;
&amp;lt;translate&amp;gt;&amp;lt;!--T:45--&amp;gt;&lt;br /&gt;
Since we now use Access Control permissions in our component, we need to be able to set them at the component level. That is done in the Preferences of this component: the screen you see after clicking the &#039;Options&#039; button. The config.xml-file is a form-definition for those Preferences. We could define the component level actions here too, as a child of the &amp;quot;rules&amp;quot; field-tag, but it is now preferred to also put those actions in &amp;lt;tt&amp;gt;access.xml&amp;lt;/tt&amp;gt; in that way all access rules for this component are on one spot.&amp;lt;/translate&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span id=&amp;quot;admin/config.xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;tt&amp;gt;admin/config.xml&amp;lt;/tt&amp;gt;&lt;br /&gt;
&amp;lt;source lang=&amp;quot;xml&amp;quot; highlight=&amp;quot;19-34&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;?xml version=&amp;quot;1.0&amp;quot; encoding=&amp;quot;utf-8&amp;quot;?&amp;gt;&lt;br /&gt;
&amp;lt;config&amp;gt;&lt;br /&gt;
	&amp;lt;fieldset&lt;br /&gt;
		name=&amp;quot;greetings&amp;quot;&lt;br /&gt;
		label=&amp;quot;COM_HELLOWORLD_CONFIG_GREETING_SETTINGS_LABEL&amp;quot;&lt;br /&gt;
		description=&amp;quot;COM_HELLOWORLD_CONFIG_GREETING_SETTINGS_DESC&amp;quot;&lt;br /&gt;
	&amp;gt;&lt;br /&gt;
		&amp;lt;field&lt;br /&gt;
			name=&amp;quot;show_category&amp;quot;&lt;br /&gt;
			type=&amp;quot;radio&amp;quot;&lt;br /&gt;
			label=&amp;quot;COM_HELLOWORLD_HELLOWORLD_FIELD_SHOW_CATEGORY_LABEL&amp;quot;&lt;br /&gt;
			description=&amp;quot;COM_HELLOWORLD_HELLOWORLD_FIELD_SHOW_CATEGORY_DESC&amp;quot;&lt;br /&gt;
			default=&amp;quot;0&amp;quot;&lt;br /&gt;
		&amp;gt;&lt;br /&gt;
			&amp;lt;option value=&amp;quot;0&amp;quot;&amp;gt;JHIDE&amp;lt;/option&amp;gt;&lt;br /&gt;
			&amp;lt;option value=&amp;quot;1&amp;quot;&amp;gt;JSHOW&amp;lt;/option&amp;gt;&lt;br /&gt;
		&amp;lt;/field&amp;gt;&lt;br /&gt;
	&amp;lt;/fieldset&amp;gt;&lt;br /&gt;
	&amp;lt;fieldset&lt;br /&gt;
		name=&amp;quot;permissions&amp;quot;&lt;br /&gt;
		label=&amp;quot;JCONFIG_PERMISSIONS_LABEL&amp;quot;&lt;br /&gt;
		description=&amp;quot;JCONFIG_PERMISSIONS_DESC&amp;quot;&lt;br /&gt;
	&amp;gt;&lt;br /&gt;
		&amp;lt;field&lt;br /&gt;
			name=&amp;quot;rules&amp;quot;&lt;br /&gt;
			type=&amp;quot;rules&amp;quot;&lt;br /&gt;
			label=&amp;quot;JCONFIG_PERMISSIONS_LABEL&amp;quot;&lt;br /&gt;
			class=&amp;quot;inputbox&amp;quot;&lt;br /&gt;
			validate=&amp;quot;rules&amp;quot;&lt;br /&gt;
			filter=&amp;quot;rules&amp;quot;&lt;br /&gt;
			component=&amp;quot;com_helloworld&amp;quot;&lt;br /&gt;
			section=&amp;quot;component&amp;quot;&lt;br /&gt;
		/&amp;gt;&lt;br /&gt;
	&amp;lt;/fieldset&amp;gt;&lt;br /&gt;
&amp;lt;/config&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;translate&amp;gt;&lt;br /&gt;
=== Displaying only the right toolbar buttons === &amp;lt;!--T:46--&amp;gt;&lt;br /&gt;
&amp;lt;/translate&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;translate&amp;gt;&amp;lt;!--T:47--&amp;gt;&lt;br /&gt;
Which toolbar buttons to display depends on the Access Control permissions for the user. &amp;lt;/translate&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;translate&amp;gt;&lt;br /&gt;
&amp;lt;!--T:99--&amp;gt;&lt;br /&gt;
In common with Joomla core components, we use JHelperContent::getActions() to find the permissions. We pass to this function the identity of the asset record, and it returns an object containing all the Actions which are associated with our helloworld component, together with (for each Action) whether the currently logged-in user has that permission or not. If we then call &amp;lt;tt&amp;gt;get(&#039;some.action&#039;)&amp;lt;/tt&amp;gt; on this object, it will return true or false, depending on whether the user has this permission or not. &lt;br /&gt;
&amp;lt;/translate&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;translate&amp;gt;&amp;lt;!--T:48--&amp;gt;&lt;br /&gt;
In the &amp;lt;tt&amp;gt;admin/views/helloworlds/view.html.php&amp;lt;/tt&amp;gt;, put this code:&amp;lt;/translate&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span id=&amp;quot;admin/views/helloworlds/view.html.php&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;tt&amp;gt;admin/views/helloworlds/view.html.php&amp;lt;/tt&amp;gt;&lt;br /&gt;
&amp;lt;source lang=&amp;quot;php&amp;quot; highlight=&amp;quot;42-44,48,81-83,85-87,89-91,93-96,98&amp;quot; &amp;gt;&lt;br /&gt;
&amp;lt;?php&lt;br /&gt;
/**&lt;br /&gt;
 * @package     Joomla.Administrator&lt;br /&gt;
 * @subpackage  com_helloworld&lt;br /&gt;
 *&lt;br /&gt;
 * @copyright   Copyright (C) 2005 - 2018 Open Source Matters, Inc. All rights reserved.&lt;br /&gt;
 * @license     GNU General Public License version 2 or later; see LICENSE.txt&lt;br /&gt;
 */&lt;br /&gt;
&lt;br /&gt;
// No direct access to this file&lt;br /&gt;
defined(&#039;_JEXEC&#039;) or die(&#039;Restricted access&#039;);&lt;br /&gt;
&lt;br /&gt;
/**&lt;br /&gt;
 * HelloWorlds View&lt;br /&gt;
 *&lt;br /&gt;
 * @since  0.0.1&lt;br /&gt;
 */&lt;br /&gt;
class HelloWorldViewHelloWorlds extends JViewLegacy&lt;br /&gt;
{&lt;br /&gt;
	/**&lt;br /&gt;
	 * Display the Hello World view&lt;br /&gt;
	 *&lt;br /&gt;
	 * @param   string  $tpl  The name of the template file to parse; automatically searches through the template paths.&lt;br /&gt;
	 *&lt;br /&gt;
	 * @return  void&lt;br /&gt;
	 */&lt;br /&gt;
	function display($tpl = null)&lt;br /&gt;
	{&lt;br /&gt;
		&lt;br /&gt;
		// Get application&lt;br /&gt;
		$app = JFactory::getApplication();&lt;br /&gt;
		$context = &amp;quot;helloworld.list.admin.helloworld&amp;quot;;&lt;br /&gt;
		// Get data from the model&lt;br /&gt;
		$this-&amp;gt;items		= $this-&amp;gt;get(&#039;Items&#039;);&lt;br /&gt;
		$this-&amp;gt;pagination	= $this-&amp;gt;get(&#039;Pagination&#039;);&lt;br /&gt;
		$this-&amp;gt;state		= $this-&amp;gt;get(&#039;State&#039;);&lt;br /&gt;
		$this-&amp;gt;filter_order	= $app-&amp;gt;getUserStateFromRequest($context.&#039;filter_order&#039;, &#039;filter_order&#039;, &#039;greeting&#039;, &#039;cmd&#039;);&lt;br /&gt;
		$this-&amp;gt;filter_order_Dir = $app-&amp;gt;getUserStateFromRequest($context.&#039;filter_order_Dir&#039;, &#039;filter_order_Dir&#039;, &#039;asc&#039;, &#039;cmd&#039;);&lt;br /&gt;
		$this-&amp;gt;filterForm    	= $this-&amp;gt;get(&#039;FilterForm&#039;);&lt;br /&gt;
		$this-&amp;gt;activeFilters 	= $this-&amp;gt;get(&#039;ActiveFilters&#039;);&lt;br /&gt;
&lt;br /&gt;
		// What Access Permissions does this user have? What can (s)he do?&lt;br /&gt;
		$this-&amp;gt;canDo = JHelperContent::getActions(&#039;com_helloworld&#039;);&lt;br /&gt;
&lt;br /&gt;
		// Check for errors.&lt;br /&gt;
		if (count($errors = $this-&amp;gt;get(&#039;Errors&#039;)))&lt;br /&gt;
		{&lt;br /&gt;
			throw new Exception(implode(&amp;quot;\n&amp;quot;, $errors), 500);&lt;br /&gt;
		}&lt;br /&gt;
&lt;br /&gt;
		// Set the submenu&lt;br /&gt;
		HelloWorldHelper::addSubmenu(&#039;helloworlds&#039;);&lt;br /&gt;
&lt;br /&gt;
		// Set the toolbar and number of found items&lt;br /&gt;
		$this-&amp;gt;addToolBar();&lt;br /&gt;
&lt;br /&gt;
		// Display the template&lt;br /&gt;
		parent::display($tpl);&lt;br /&gt;
&lt;br /&gt;
		// Set the document&lt;br /&gt;
		$this-&amp;gt;setDocument();&lt;br /&gt;
	}&lt;br /&gt;
&lt;br /&gt;
	/**&lt;br /&gt;
	 * Add the page title and toolbar.&lt;br /&gt;
	 *&lt;br /&gt;
	 * @return  void&lt;br /&gt;
	 *&lt;br /&gt;
	 * @since   1.6&lt;br /&gt;
	 */&lt;br /&gt;
	protected function addToolBar()&lt;br /&gt;
	{&lt;br /&gt;
		$title = JText::_(&#039;COM_HELLOWORLD_MANAGER_HELLOWORLDS&#039;);&lt;br /&gt;
&lt;br /&gt;
		if ($this-&amp;gt;pagination-&amp;gt;total)&lt;br /&gt;
		{&lt;br /&gt;
			$title .= &amp;quot;&amp;lt;span style=&#039;font-size: 0.5em; vertical-align: middle;&#039;&amp;gt;(&amp;quot; . $this-&amp;gt;pagination-&amp;gt;total . &amp;quot;)&amp;lt;/span&amp;gt;&amp;quot;;&lt;br /&gt;
		}&lt;br /&gt;
&lt;br /&gt;
		JToolBarHelper::title($title, &#039;helloworld&#039;);&lt;br /&gt;
&lt;br /&gt;
		if ($this-&amp;gt;canDo-&amp;gt;get(&#039;core.create&#039;)) &lt;br /&gt;
		{&lt;br /&gt;
			JToolBarHelper::addNew(&#039;helloworld.add&#039;, &#039;JTOOLBAR_NEW&#039;);&lt;br /&gt;
		}&lt;br /&gt;
		if ($this-&amp;gt;canDo-&amp;gt;get(&#039;core.edit&#039;)) &lt;br /&gt;
		{&lt;br /&gt;
			JToolBarHelper::editList(&#039;helloworld.edit&#039;, &#039;JTOOLBAR_EDIT&#039;);&lt;br /&gt;
		}&lt;br /&gt;
		if ($this-&amp;gt;canDo-&amp;gt;get(&#039;core.delete&#039;)) &lt;br /&gt;
		{&lt;br /&gt;
			JToolBarHelper::deleteList(&#039;&#039;, &#039;helloworlds.delete&#039;, &#039;JTOOLBAR_DELETE&#039;);&lt;br /&gt;
		}&lt;br /&gt;
		if ($this-&amp;gt;canDo-&amp;gt;get(&#039;core.admin&#039;)) &lt;br /&gt;
		{&lt;br /&gt;
			JToolBarHelper::divider();&lt;br /&gt;
			JToolBarHelper::preferences(&#039;com_helloworld&#039;);&lt;br /&gt;
		}&lt;br /&gt;
	}&lt;br /&gt;
	/**&lt;br /&gt;
	 * Method to set up the document properties&lt;br /&gt;
	 *&lt;br /&gt;
	 * @return void&lt;br /&gt;
	 */&lt;br /&gt;
	protected function setDocument() &lt;br /&gt;
	{&lt;br /&gt;
		$document = JFactory::getDocument();&lt;br /&gt;
		$document-&amp;gt;setTitle(JText::_(&#039;COM_HELLOWORLD_ADMINISTRATION&#039;));&lt;br /&gt;
	}&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&amp;lt;span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;translate&amp;gt;&amp;lt;!--T:91--&amp;gt;&lt;br /&gt;
In the &amp;lt;tt&amp;gt;admin/views/helloworld/view.html.php&amp;lt;/tt&amp;gt;, put this code:&amp;lt;/translate&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span id=&amp;quot;admin/views/helloworld/view.html.php&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;tt&amp;gt;admin/views/helloworld/view.html.php&amp;lt;/tt&amp;gt;&lt;br /&gt;
&amp;lt;source lang=&amp;quot;php&amp;quot; highlight=&amp;quot;23,39-41,45,79-111&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;?php&lt;br /&gt;
/**&lt;br /&gt;
 * @package     Joomla.Administrator&lt;br /&gt;
 * @subpackage  com_helloworld&lt;br /&gt;
 *&lt;br /&gt;
 * @copyright   Copyright (C) 2005 - 2018 Open Source Matters, Inc. All rights reserved.&lt;br /&gt;
 * @license     GNU General Public License version 2 or later; see LICENSE.txt&lt;br /&gt;
 */&lt;br /&gt;
&lt;br /&gt;
// No direct access to this file&lt;br /&gt;
defined(&#039;_JEXEC&#039;) or die(&#039;Restricted access&#039;);&lt;br /&gt;
&lt;br /&gt;
/**&lt;br /&gt;
 * HelloWorld View&lt;br /&gt;
 *&lt;br /&gt;
 * @since  0.0.1&lt;br /&gt;
 */&lt;br /&gt;
class HelloWorldViewHelloWorld extends JViewLegacy&lt;br /&gt;
{&lt;br /&gt;
	protected $form;&lt;br /&gt;
	protected $item;&lt;br /&gt;
	protected $script;&lt;br /&gt;
	protected $canDo;&lt;br /&gt;
&lt;br /&gt;
	/**&lt;br /&gt;
	 * Display the Hello World view&lt;br /&gt;
	 *&lt;br /&gt;
	 * @param   string  $tpl  The name of the template file to parse; automatically searches through the template paths.&lt;br /&gt;
	 *&lt;br /&gt;
	 * @return  void&lt;br /&gt;
	 */&lt;br /&gt;
	public function display($tpl = null)&lt;br /&gt;
	{&lt;br /&gt;
		// Get the Data&lt;br /&gt;
		$this-&amp;gt;form = $this-&amp;gt;get(&#039;Form&#039;);&lt;br /&gt;
		$this-&amp;gt;item = $this-&amp;gt;get(&#039;Item&#039;);&lt;br /&gt;
		$this-&amp;gt;script = $this-&amp;gt;get(&#039;Script&#039;);&lt;br /&gt;
&lt;br /&gt;
		// What Access Permissions does this user have? What can (s)he do?&lt;br /&gt;
		$this-&amp;gt;canDo = JHelperContent::getActions(&#039;com_helloworld&#039;, &#039;helloworld&#039;, $this-&amp;gt;item-&amp;gt;id);&lt;br /&gt;
&lt;br /&gt;
		// Check for errors.&lt;br /&gt;
		if (count($errors = $this-&amp;gt;get(&#039;Errors&#039;)))&lt;br /&gt;
		{&lt;br /&gt;
			throw new Exception(implode(&amp;quot;\n&amp;quot;, $errors), 500);&lt;br /&gt;
		}&lt;br /&gt;
&lt;br /&gt;
		// Set the toolbar&lt;br /&gt;
		$this-&amp;gt;addToolBar();&lt;br /&gt;
&lt;br /&gt;
		// Display the template&lt;br /&gt;
		parent::display($tpl);&lt;br /&gt;
&lt;br /&gt;
		// Set the document&lt;br /&gt;
		$this-&amp;gt;setDocument();&lt;br /&gt;
	}&lt;br /&gt;
&lt;br /&gt;
	/**&lt;br /&gt;
	 * Add the page title and toolbar.&lt;br /&gt;
	 *&lt;br /&gt;
	 * @return  void&lt;br /&gt;
	 *&lt;br /&gt;
	 * @since   1.6&lt;br /&gt;
	 */&lt;br /&gt;
	protected function addToolBar()&lt;br /&gt;
	{&lt;br /&gt;
		$input = JFactory::getApplication()-&amp;gt;input;&lt;br /&gt;
&lt;br /&gt;
		// Hide Joomla Administrator Main menu&lt;br /&gt;
		$input-&amp;gt;set(&#039;hidemainmenu&#039;, true);&lt;br /&gt;
&lt;br /&gt;
		$isNew = ($this-&amp;gt;item-&amp;gt;id == 0);&lt;br /&gt;
&lt;br /&gt;
		JToolBarHelper::title($isNew ? JText::_(&#039;COM_HELLOWORLD_MANAGER_HELLOWORLD_NEW&#039;)&lt;br /&gt;
		                             : JText::_(&#039;COM_HELLOWORLD_MANAGER_HELLOWORLD_EDIT&#039;), &#039;helloworld&#039;);&lt;br /&gt;
		// Build the actions for new and existing records.&lt;br /&gt;
		if ($isNew)&lt;br /&gt;
		{&lt;br /&gt;
			// For new records, check the create permission.&lt;br /&gt;
			if ($this-&amp;gt;canDo-&amp;gt;get(&#039;core.create&#039;)) &lt;br /&gt;
			{&lt;br /&gt;
				JToolBarHelper::apply(&#039;helloworld.apply&#039;, &#039;JTOOLBAR_APPLY&#039;);&lt;br /&gt;
				JToolBarHelper::save(&#039;helloworld.save&#039;, &#039;JTOOLBAR_SAVE&#039;);&lt;br /&gt;
				JToolBarHelper::custom(&#039;helloworld.save2new&#039;, &#039;save-new.png&#039;, &#039;save-new_f2.png&#039;,&lt;br /&gt;
				                       &#039;JTOOLBAR_SAVE_AND_NEW&#039;, false);&lt;br /&gt;
			}&lt;br /&gt;
			JToolBarHelper::cancel(&#039;helloworld.cancel&#039;, &#039;JTOOLBAR_CANCEL&#039;);&lt;br /&gt;
		}&lt;br /&gt;
		else&lt;br /&gt;
		{&lt;br /&gt;
			if ($this-&amp;gt;canDo-&amp;gt;get(&#039;core.edit&#039;))&lt;br /&gt;
			{&lt;br /&gt;
				// We can save the new record&lt;br /&gt;
				JToolBarHelper::apply(&#039;helloworld.apply&#039;, &#039;JTOOLBAR_APPLY&#039;);&lt;br /&gt;
				JToolBarHelper::save(&#039;helloworld.save&#039;, &#039;JTOOLBAR_SAVE&#039;);&lt;br /&gt;
 &lt;br /&gt;
				// We can save this record, but check the create permission to see&lt;br /&gt;
				// if we can return to make a new one.&lt;br /&gt;
				if ($this-&amp;gt;canDo-&amp;gt;get(&#039;core.create&#039;)) &lt;br /&gt;
				{&lt;br /&gt;
					JToolBarHelper::custom(&#039;helloworld.save2new&#039;, &#039;save-new.png&#039;, &#039;save-new_f2.png&#039;,&lt;br /&gt;
					                       &#039;JTOOLBAR_SAVE_AND_NEW&#039;, false);&lt;br /&gt;
				}&lt;br /&gt;
			}&lt;br /&gt;
			if ($this-&amp;gt;canDo-&amp;gt;get(&#039;core.create&#039;)) &lt;br /&gt;
			{&lt;br /&gt;
				JToolBarHelper::custom(&#039;helloworld.save2copy&#039;, &#039;save-copy.png&#039;, &#039;save-copy_f2.png&#039;,&lt;br /&gt;
				                       &#039;JTOOLBAR_SAVE_AS_COPY&#039;, false);&lt;br /&gt;
			}&lt;br /&gt;
			JToolBarHelper::cancel(&#039;helloworld.cancel&#039;, &#039;JTOOLBAR_CLOSE&#039;);&lt;br /&gt;
		}&lt;br /&gt;
	}&lt;br /&gt;
	/**&lt;br /&gt;
	 * Method to set up the document properties&lt;br /&gt;
	 *&lt;br /&gt;
	 * @return void&lt;br /&gt;
	 */&lt;br /&gt;
	protected function setDocument() &lt;br /&gt;
	{&lt;br /&gt;
		$isNew = ($this-&amp;gt;item-&amp;gt;id == 0);&lt;br /&gt;
		$document = JFactory::getDocument();&lt;br /&gt;
		$document-&amp;gt;setTitle($isNew ? JText::_(&#039;COM_HELLOWORLD_HELLOWORLD_CREATING&#039;)&lt;br /&gt;
		                           : JText::_(&#039;COM_HELLOWORLD_HELLOWORLD_EDITING&#039;));&lt;br /&gt;
		$document-&amp;gt;addScript(JURI::root() . $this-&amp;gt;script);&lt;br /&gt;
		$document-&amp;gt;addScript(JURI::root() . &amp;quot;/administrator/components/com_helloworld&amp;quot;&lt;br /&gt;
		                                  . &amp;quot;/views/helloworld/submitbutton.js&amp;quot;);&lt;br /&gt;
		JText::script(&#039;COM_HELLOWORLD_HELLOWORLD_ERROR_UNACCEPTABLE&#039;);&lt;br /&gt;
	}&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;translate&amp;gt;&lt;br /&gt;
=== Restricting access to the component === &amp;lt;!--T:51--&amp;gt;&lt;br /&gt;
&amp;lt;/translate&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;translate&amp;gt;&amp;lt;!--T:52--&amp;gt;&lt;br /&gt;
The main idea in ACL is to restrict actions to groups of users. The first action to be restricted is access to the administrative backend of the component itself. With your favourite file editor, edit the &amp;lt;tt&amp;gt;admin/helloworld.php&amp;lt;/tt&amp;gt; file and add the lines with the access check.&amp;lt;/translate&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span id=&amp;quot;admin/helloworld.php&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;tt&amp;gt;admin/helloworld.php&amp;lt;/tt&amp;gt;&lt;br /&gt;
&amp;lt;source lang=&amp;quot;php&amp;quot; highlight=&amp;quot;17-22&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;?php&lt;br /&gt;
/**&lt;br /&gt;
 * @package     Joomla.Administrator&lt;br /&gt;
 * @subpackage  com_helloworld&lt;br /&gt;
 *&lt;br /&gt;
 * @copyright   Copyright (C) 2005 - 2018 Open Source Matters, Inc. All rights reserved.&lt;br /&gt;
 * @license     GNU General Public License version 2 or later; see LICENSE.txt&lt;br /&gt;
 */&lt;br /&gt;
&lt;br /&gt;
// No direct access to this file&lt;br /&gt;
defined(&#039;_JEXEC&#039;) or die(&#039;Restricted access&#039;);&lt;br /&gt;
&lt;br /&gt;
// Set some global property&lt;br /&gt;
$document = JFactory::getDocument();&lt;br /&gt;
$document-&amp;gt;addStyleDeclaration(&#039;.icon-helloworld {background-image: url(../media/com_helloworld/images/tux-16x16.png);}&#039;);&lt;br /&gt;
&lt;br /&gt;
// Access check: is this user allowed to access the backend of this component?&lt;br /&gt;
if (!JFactory::getUser()-&amp;gt;authorise(&#039;core.manage&#039;, &#039;com_helloworld&#039;))&lt;br /&gt;
{&lt;br /&gt;
	throw new Exception(JText::_(&#039;JERROR_ALERTNOAUTHOR&#039;));&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
// Require helper file&lt;br /&gt;
JLoader::register(&#039;HelloWorldHelper&#039;, JPATH_COMPONENT . &#039;/helpers/helloworld.php&#039;);&lt;br /&gt;
&lt;br /&gt;
// Get an instance of the controller prefixed by HelloWorld&lt;br /&gt;
$controller = JControllerLegacy::getInstance(&#039;HelloWorld&#039;);&lt;br /&gt;
&lt;br /&gt;
// Perform the Request task&lt;br /&gt;
$controller-&amp;gt;execute(JFactory::getApplication()-&amp;gt;input-&amp;gt;get(&#039;task&#039;));;&lt;br /&gt;
&lt;br /&gt;
// Redirect if set by the controller&lt;br /&gt;
$controller-&amp;gt;redirect();&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&amp;lt;span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;translate&amp;gt;=== Add the asset_id column to the database table === &amp;lt;!--T:53--&amp;gt;&amp;lt;/translate&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;translate&amp;gt;&amp;lt;!--T:54--&amp;gt;&lt;br /&gt;
In order to be able to work with JTable an asset_id column has to be added to the database #__helloworld table.&amp;lt;/translate&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;translate&amp;gt;&amp;lt;!--T:55--&amp;gt;&lt;br /&gt;
So, &amp;lt;tt&amp;gt;admin/sql/install.mysql.utf8.sql&amp;lt;/tt&amp;gt; becomes:&amp;lt;/translate&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span id=&amp;quot;admin/sql/install.mysql.utf8.sql&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;tt&amp;gt;admin/sql/install.mysql.utf8.sql&amp;lt;/tt&amp;gt;&lt;br /&gt;
&amp;lt;source lang=&amp;quot;mysql&amp;quot; highlight=&amp;quot;5&amp;quot;&amp;gt;&lt;br /&gt;
DROP TABLE IF EXISTS `#__helloworld`;&lt;br /&gt;
&lt;br /&gt;
CREATE TABLE `#__helloworld` (&lt;br /&gt;
	`id`       INT(11)     NOT NULL AUTO_INCREMENT,&lt;br /&gt;
	`asset_id` INT(10)     NOT NULL DEFAULT &#039;0&#039;,&lt;br /&gt;
	`greeting` VARCHAR(25) NOT NULL,&lt;br /&gt;
	`published` tinyint(4) NOT NULL,&lt;br /&gt;
	`catid`	    int(11)    NOT NULL DEFAULT &#039;0&#039;,&lt;br /&gt;
	`params`   VARCHAR(1024) NOT NULL DEFAULT &#039;&#039;,&lt;br /&gt;
	PRIMARY KEY (`id`)&lt;br /&gt;
)&lt;br /&gt;
	ENGINE =MyISAM&lt;br /&gt;
	AUTO_INCREMENT =0&lt;br /&gt;
	DEFAULT CHARSET =utf8;&lt;br /&gt;
&lt;br /&gt;
INSERT INTO `#__helloworld` (`greeting`) VALUES&lt;br /&gt;
(&#039;Hello World!&#039;),&lt;br /&gt;
(&#039;Good bye World!&#039;);&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;translate&amp;gt;&amp;lt;!--T:56--&amp;gt;&lt;br /&gt;
For updates we add a sql-update-file:&amp;lt;/translate&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span id=&amp;quot;admin/sql/updates/mysql/0.0.14.sql&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;tt&amp;gt;admin/sql/updates/mysql/0.0.14.sql&amp;lt;/tt&amp;gt;&lt;br /&gt;
&amp;lt;source lang=&amp;quot;mysql&amp;quot;&amp;gt;&lt;br /&gt;
ALTER TABLE `#__helloworld` ADD COLUMN `asset_id` INT(10) UNSIGNED NOT NULL DEFAULT &#039;0&#039; AFTER `id`;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;translate&amp;gt;&lt;br /&gt;
=== Restricting access to the messages === &amp;lt;!--T:57--&amp;gt;&lt;br /&gt;
&amp;lt;/translate&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;translate&amp;gt;&amp;lt;!--T:58--&amp;gt;&lt;br /&gt;
So far we have restricted access to the component itself, but we also need to do that at &#039;&#039;message&#039;&#039; level.&amp;lt;/translate&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;translate&amp;gt;&amp;lt;!--T:59--&amp;gt;&lt;br /&gt;
To check the &#039;&#039;&#039;&amp;quot;core.delete&amp;quot;&#039;&#039;&#039; permission you need to modify the model class: &amp;lt;tt&amp;gt;admin/models/helloworld.php&amp;lt;/tt&amp;gt; by adding these lines:&amp;lt;/translate&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span id=&amp;quot;admin/models/helloworld.php&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;tt&amp;gt;admin/models/helloworld.php&amp;lt;/tt&amp;gt;&lt;br /&gt;
&amp;lt;source lang=&#039;php&#039; highlight=&amp;quot;96-105&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;?php&lt;br /&gt;
/**&lt;br /&gt;
 * @package     Joomla.Administrator&lt;br /&gt;
 * @subpackage  com_helloworld&lt;br /&gt;
 *&lt;br /&gt;
 * @copyright   Copyright (C) 2005 - 2018 Open Source Matters, Inc. All rights reserved.&lt;br /&gt;
 * @license     GNU General Public License version 2 or later; see LICENSE.txt&lt;br /&gt;
 */&lt;br /&gt;
&lt;br /&gt;
// No direct access to this file&lt;br /&gt;
defined(&#039;_JEXEC&#039;) or die(&#039;Restricted access&#039;);&lt;br /&gt;
&lt;br /&gt;
/**&lt;br /&gt;
 * HelloWorld Model&lt;br /&gt;
 *&lt;br /&gt;
 * @since  0.0.1&lt;br /&gt;
 */&lt;br /&gt;
class HelloWorldModelHelloWorld extends JModelAdmin&lt;br /&gt;
{&lt;br /&gt;
	/**&lt;br /&gt;
	 * Method to get a table object, load it if necessary.&lt;br /&gt;
	 *&lt;br /&gt;
	 * @param   string  $type    The table name. Optional.&lt;br /&gt;
	 * @param   string  $prefix  The class prefix. Optional.&lt;br /&gt;
	 * @param   array   $config  Configuration array for model. Optional.&lt;br /&gt;
	 *&lt;br /&gt;
	 * @return  JTable  A JTable object&lt;br /&gt;
	 *&lt;br /&gt;
	 * @since   1.6&lt;br /&gt;
	 */&lt;br /&gt;
	public function getTable($type = &#039;HelloWorld&#039;, $prefix = &#039;HelloWorldTable&#039;, $config = array())&lt;br /&gt;
	{&lt;br /&gt;
		return JTable::getInstance($type, $prefix, $config);&lt;br /&gt;
	}&lt;br /&gt;
&lt;br /&gt;
	/**&lt;br /&gt;
	 * Method to get the record form.&lt;br /&gt;
	 *&lt;br /&gt;
	 * @param   array    $data      Data for the form.&lt;br /&gt;
	 * @param   boolean  $loadData  True if the form is to load its own data (default case), false if not.&lt;br /&gt;
	 *&lt;br /&gt;
	 * @return  mixed    A JForm object on success, false on failure&lt;br /&gt;
	 *&lt;br /&gt;
	 * @since   1.6&lt;br /&gt;
	 */&lt;br /&gt;
	public function getForm($data = array(), $loadData = true)&lt;br /&gt;
	{&lt;br /&gt;
		// Get the form.&lt;br /&gt;
		$form = $this-&amp;gt;loadForm(&lt;br /&gt;
			&#039;com_helloworld.helloworld&#039;,&lt;br /&gt;
			&#039;helloworld&#039;,&lt;br /&gt;
			array(&lt;br /&gt;
				&#039;control&#039; =&amp;gt; &#039;jform&#039;,&lt;br /&gt;
				&#039;load_data&#039; =&amp;gt; $loadData&lt;br /&gt;
			)&lt;br /&gt;
		);&lt;br /&gt;
&lt;br /&gt;
		if (empty($form))&lt;br /&gt;
		{&lt;br /&gt;
			return false;&lt;br /&gt;
		}&lt;br /&gt;
&lt;br /&gt;
		return $form;&lt;br /&gt;
	}&lt;br /&gt;
	/**&lt;br /&gt;
	 * Method to get the script that have to be included on the form&lt;br /&gt;
	 *&lt;br /&gt;
	 * @return string	Script files&lt;br /&gt;
	 */&lt;br /&gt;
	public function getScript() &lt;br /&gt;
	{&lt;br /&gt;
		return &#039;administrator/components/com_helloworld/models/forms/helloworld.js&#039;;&lt;br /&gt;
	}&lt;br /&gt;
	/**&lt;br /&gt;
	 * Method to get the data that should be injected in the form.&lt;br /&gt;
	 *&lt;br /&gt;
	 * @return  mixed  The data for the form.&lt;br /&gt;
	 *&lt;br /&gt;
	 * @since   1.6&lt;br /&gt;
	 */&lt;br /&gt;
	protected function loadFormData()&lt;br /&gt;
	{&lt;br /&gt;
		// Check the session for previously entered form data.&lt;br /&gt;
		$data = JFactory::getApplication()-&amp;gt;getUserState(&lt;br /&gt;
			&#039;com_helloworld.edit.helloworld.data&#039;,&lt;br /&gt;
			array()&lt;br /&gt;
		);&lt;br /&gt;
&lt;br /&gt;
		if (empty($data))&lt;br /&gt;
		{&lt;br /&gt;
			$data = $this-&amp;gt;getItem();&lt;br /&gt;
		}&lt;br /&gt;
&lt;br /&gt;
		return $data;&lt;br /&gt;
	}&lt;br /&gt;
	/**&lt;br /&gt;
	 * Method to check if it&#039;s OK to delete a message. Overrides JModelAdmin::canDelete&lt;br /&gt;
	 */&lt;br /&gt;
	protected function canDelete($record)&lt;br /&gt;
	{&lt;br /&gt;
		if( !empty( $record-&amp;gt;id ) )&lt;br /&gt;
		{&lt;br /&gt;
			return JFactory::getUser()-&amp;gt;authorise( &amp;quot;core.delete&amp;quot;, &amp;quot;com_helloworld.helloworld.&amp;quot; . $record-&amp;gt;id );&lt;br /&gt;
		}&lt;br /&gt;
	}&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;translate&amp;gt;&amp;lt;!--T:60--&amp;gt;&lt;br /&gt;
To check &#039;&#039;&#039;&amp;quot;core.edit&amp;quot;&#039;&#039;&#039; (and &#039;&#039;&#039;core.add&#039;&#039;&#039; if you wish) you need to update the sub-controller (&#039;&#039;not&#039;&#039; the model). I am not sure why this is so, but that&#039;s how other standard Joomla components do it. You need to add the following lines in the file: &amp;lt;tt&amp;gt;admin/controllers/helloworld.php&amp;lt;/tt&amp;gt;&amp;lt;/translate&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span id=&amp;quot;admin/controllers/helloworld.php&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;tt&amp;gt;admin/controllers/helloworld.php&amp;lt;/tt&amp;gt;&lt;br /&gt;
&amp;lt;source lang=&#039;php&#039;  highlight=&amp;quot;21-49&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;?php&lt;br /&gt;
/**&lt;br /&gt;
 * @package     Joomla.Administrator&lt;br /&gt;
 * @subpackage  com_helloworld&lt;br /&gt;
 *&lt;br /&gt;
 * @copyright   Copyright (C) 2005 - 2018 Open Source Matters, Inc. All rights reserved.&lt;br /&gt;
 * @license     GNU General Public License version 2 or later; see LICENSE.txt&lt;br /&gt;
 */&lt;br /&gt;
// No direct access to this file&lt;br /&gt;
defined(&#039;_JEXEC&#039;) or die(&#039;Restricted access&#039;);&lt;br /&gt;
&lt;br /&gt;
/**&lt;br /&gt;
 * HelloWorld Controller&lt;br /&gt;
 *&lt;br /&gt;
 * @package     Joomla.Administrator&lt;br /&gt;
 * @subpackage  com_helloworld&lt;br /&gt;
 * @since       0.0.9&lt;br /&gt;
 */&lt;br /&gt;
class HelloWorldControllerHelloWorld extends JControllerForm&lt;br /&gt;
{&lt;br /&gt;
	/**&lt;br /&gt;
	* Implement to allowAdd or not&lt;br /&gt;
	*&lt;br /&gt;
	* Not used at this time (but you can look at how other components use it....)&lt;br /&gt;
	* Overwrites: JControllerForm::allowAdd&lt;br /&gt;
	*&lt;br /&gt;
	* @param array $data&lt;br /&gt;
	* @return bool&lt;br /&gt;
	*/&lt;br /&gt;
	protected function allowAdd($data = array())&lt;br /&gt;
	{&lt;br /&gt;
		return parent::allowAdd($data);&lt;br /&gt;
	}&lt;br /&gt;
	/**&lt;br /&gt;
	* Implement to allow edit or not&lt;br /&gt;
	* Overwrites: JControllerForm::allowEdit&lt;br /&gt;
	*&lt;br /&gt;
	* @param array $data&lt;br /&gt;
	* @param string $key&lt;br /&gt;
	* @return bool&lt;br /&gt;
	*/&lt;br /&gt;
	protected function allowEdit($data = array(), $key = &#039;id&#039;)&lt;br /&gt;
	{&lt;br /&gt;
		$id = isset( $data[ $key ] ) ? $data[ $key ] : 0;&lt;br /&gt;
		if( !empty( $id ) )&lt;br /&gt;
		{&lt;br /&gt;
			return JFactory::getUser()-&amp;gt;authorise( &amp;quot;core.edit&amp;quot;, &amp;quot;com_helloworld.helloworld.&amp;quot; . $id );&lt;br /&gt;
		}&lt;br /&gt;
	}&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;translate&amp;gt;&amp;lt;!--T:61--&amp;gt;&lt;br /&gt;
Please note that &#039;&#039;allowAdd&#039;&#039; simply calls its parent. I&#039;ve put it here in case you want to actually use it in your component. If you look at your &amp;lt;tt&amp;gt;admin/access.xml&amp;lt;/tt&amp;gt; file, you will notice there is no &#039;&#039;core.add&#039;&#039; action defined for &amp;quot;messages&amp;quot;, so you will need to add it there as well if you want to be able to configure it in the interface.&amp;lt;/translate&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;translate&amp;gt;=== Setting the permission values in the assets table === &amp;lt;!--T:62--&amp;gt;&amp;lt;/translate&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;translate&amp;gt;&amp;lt;!--T:63--&amp;gt;&lt;br /&gt;
In order to store permissions for each message in the assets database table, we have to instruct the table class associated with the model to save those permissions in the assets table.&amp;lt;/translate&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;translate&amp;gt;&amp;lt;!--T:64--&amp;gt;&lt;br /&gt;
JTable not only provides an interface for storing the data of the record itself in the item&#039;s database table, but also for storing the permissions for that record in the assets database table. Therefore we must add information to the bind()-method about the permission-values. We also  have to provide the asset name, asset title and the id of the asset parent via the helloworld JTable. Therefore we override 3 methods:&amp;lt;/translate&amp;gt;&lt;br /&gt;
&amp;lt;translate&amp;gt;&amp;lt;!--T:65--&amp;gt;&lt;br /&gt;
* _getAssetName(): a unique name for this asset, by which it can be retrieved&amp;lt;/translate&amp;gt;&lt;br /&gt;
&amp;lt;translate&amp;gt;&amp;lt;!--T:66--&amp;gt;&lt;br /&gt;
* _getAssetTitle(): a more human-friendly way to identify the asset (not necessary unique)&amp;lt;/translate&amp;gt;&lt;br /&gt;
&amp;lt;translate&amp;gt;&amp;lt;!--T:67--&amp;gt;&lt;br /&gt;
* _getAssetParentId(): the asset_id of the parent in the asset database table (from whom permissions are inherited)&amp;lt;/translate&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span id=&amp;quot;admin/tables/helloworld.php&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;tt&amp;gt;admin/tables/helloworld.php&amp;lt;/tt&amp;gt;&lt;br /&gt;
&amp;lt;source lang=&amp;quot;php&amp;quot; highlight=&amp;quot;45-52,56-109&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;?php&lt;br /&gt;
/**&lt;br /&gt;
 * @package     Joomla.Administrator&lt;br /&gt;
 * @subpackage  com_helloworld&lt;br /&gt;
 *&lt;br /&gt;
 * @copyright   Copyright (C) 2005 - 2018 Open Source Matters, Inc. All rights reserved.&lt;br /&gt;
 * @license     GNU General Public License version 2 or later; see LICENSE.txt&lt;br /&gt;
 */&lt;br /&gt;
// No direct access&lt;br /&gt;
defined(&#039;_JEXEC&#039;) or die(&#039;Restricted access&#039;);&lt;br /&gt;
&lt;br /&gt;
/**&lt;br /&gt;
 * Hello Table class&lt;br /&gt;
 *&lt;br /&gt;
 * @since  0.0.1&lt;br /&gt;
 */&lt;br /&gt;
class HelloWorldTableHelloWorld extends JTable&lt;br /&gt;
{&lt;br /&gt;
	/**&lt;br /&gt;
	 * Constructor&lt;br /&gt;
	 *&lt;br /&gt;
	 * @param   JDatabaseDriver  &amp;amp;$db  A database connector object&lt;br /&gt;
	 */&lt;br /&gt;
	function __construct(&amp;amp;$db)&lt;br /&gt;
	{&lt;br /&gt;
		parent::__construct(&#039;#__helloworld&#039;, &#039;id&#039;, $db);&lt;br /&gt;
	}&lt;br /&gt;
	/**&lt;br /&gt;
	 * Overloaded bind function&lt;br /&gt;
	 *&lt;br /&gt;
	 * @param       array           named array&lt;br /&gt;
	 * @return      null|string     null is operation was satisfactory, otherwise returns an error&lt;br /&gt;
	 * @see JTable:bind&lt;br /&gt;
	 * @since 1.5&lt;br /&gt;
	 */&lt;br /&gt;
	public function bind($array, $ignore = &#039;&#039;)&lt;br /&gt;
	{&lt;br /&gt;
		if (isset($array[&#039;params&#039;]) &amp;amp;&amp;amp; is_array($array[&#039;params&#039;]))&lt;br /&gt;
		{&lt;br /&gt;
			// Convert the params field to a string.&lt;br /&gt;
			$parameter = new JRegistry;&lt;br /&gt;
			$parameter-&amp;gt;loadArray($array[&#039;params&#039;]);&lt;br /&gt;
			$array[&#039;params&#039;] = (string)$parameter;&lt;br /&gt;
		}&lt;br /&gt;
&lt;br /&gt;
		// Bind the rules.&lt;br /&gt;
		if (isset($array[&#039;rules&#039;]) &amp;amp;&amp;amp; is_array($array[&#039;rules&#039;]))&lt;br /&gt;
		{&lt;br /&gt;
			$rules = new JAccessRules($array[&#039;rules&#039;]);&lt;br /&gt;
			$this-&amp;gt;setRules($rules);&lt;br /&gt;
		}&lt;br /&gt;
&lt;br /&gt;
		return parent::bind($array, $ignore);&lt;br /&gt;
	}&lt;br /&gt;
&lt;br /&gt;
	/**&lt;br /&gt;
	 * Method to compute the default name of the asset.&lt;br /&gt;
	 * The default name is in the form `table_name.id`&lt;br /&gt;
	 * where id is the value of the primary key of the table.&lt;br /&gt;
	 *&lt;br /&gt;
	 * @return	string&lt;br /&gt;
	 * @since	2.5&lt;br /&gt;
	 */&lt;br /&gt;
	protected function _getAssetName()&lt;br /&gt;
	{&lt;br /&gt;
		$k = $this-&amp;gt;_tbl_key;&lt;br /&gt;
		return &#039;com_helloworld.helloworld.&#039;.(int) $this-&amp;gt;$k;&lt;br /&gt;
	}&lt;br /&gt;
	/**&lt;br /&gt;
	 * Method to return the title to use for the asset table.&lt;br /&gt;
	 *&lt;br /&gt;
	 * @return	string&lt;br /&gt;
	 * @since	2.5&lt;br /&gt;
	 */&lt;br /&gt;
	protected function _getAssetTitle()&lt;br /&gt;
	{&lt;br /&gt;
		return $this-&amp;gt;greeting;&lt;br /&gt;
	}&lt;br /&gt;
	/**&lt;br /&gt;
	 * Method to get the asset-parent-id of the item&lt;br /&gt;
	 *&lt;br /&gt;
	 * @return	int&lt;br /&gt;
	 */&lt;br /&gt;
	protected function _getAssetParentId(JTable $table = NULL, $id = NULL)&lt;br /&gt;
	{&lt;br /&gt;
		// We will retrieve the parent-asset from the Asset-table&lt;br /&gt;
		$assetParent = JTable::getInstance(&#039;Asset&#039;);&lt;br /&gt;
		// Default: if no asset-parent can be found we take the global asset&lt;br /&gt;
		$assetParentId = $assetParent-&amp;gt;getRootId();&lt;br /&gt;
&lt;br /&gt;
		// Find the parent-asset&lt;br /&gt;
		if (($this-&amp;gt;catid)&amp;amp;&amp;amp; !empty($this-&amp;gt;catid))&lt;br /&gt;
		{&lt;br /&gt;
			// The item has a category as asset-parent&lt;br /&gt;
			$assetParent-&amp;gt;loadByName(&#039;com_helloworld.category.&#039; . (int) $this-&amp;gt;catid);&lt;br /&gt;
		}&lt;br /&gt;
		else&lt;br /&gt;
		{&lt;br /&gt;
			// The item has the component as asset-parent&lt;br /&gt;
			$assetParent-&amp;gt;loadByName(&#039;com_helloworld&#039;);&lt;br /&gt;
		}&lt;br /&gt;
&lt;br /&gt;
		// Return the found asset-parent-id&lt;br /&gt;
		if ($assetParent-&amp;gt;id)&lt;br /&gt;
		{&lt;br /&gt;
			$assetParentId=$assetParent-&amp;gt;id;&lt;br /&gt;
		}&lt;br /&gt;
		return $assetParentId;&lt;br /&gt;
	}&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;translate&amp;gt;&amp;lt;!--T:92--&amp;gt;&lt;br /&gt;
This code for _getAssetParentId() above uses JTableAsset to retrieve the asset_id of the asset-parent. This is different from the code in the current version of com_content, where the asset_id of the category is retrieved from the #__categories database table. That is another possibility; many ways leading to Rome.&amp;lt;/translate&amp;gt; &amp;lt;translate&amp;gt;&amp;lt;!--T:93--&amp;gt;&lt;br /&gt;
In com_content however, if an item would not be under a category, then the asset_id of the global asset is returned. That would of course not be right, but is fixed there by providing a default category &amp;quot;uncategorised&amp;quot;, so that an article is &#039;&#039;always&#039;&#039; under a category.&amp;lt;/translate&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;translate&amp;gt;&lt;br /&gt;
=== Showing the setting of permissions on the item level === &amp;lt;!--T:69--&amp;gt;&lt;br /&gt;
&amp;lt;/translate&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;translate&amp;gt;&amp;lt;!--T:70--&amp;gt;&lt;br /&gt;
Adding the rules field to the form-definition of the edit-form.&amp;lt;/translate&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;span id=&amp;quot;admin/models/forms/helloworld.xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;tt&amp;gt;admin/models/forms/helloworld.xml&amp;lt;/tt&amp;gt;&lt;br /&gt;
&amp;lt;source lang=&amp;quot;xml&amp;quot; highlight=&amp;quot;55-74&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;?xml version=&amp;quot;1.0&amp;quot; encoding=&amp;quot;utf-8&amp;quot;?&amp;gt;&lt;br /&gt;
&amp;lt;form&lt;br /&gt;
				addrulepath=&amp;quot;/administrator/components/com_helloworld/models/rules&amp;quot;&lt;br /&gt;
&amp;gt;&lt;br /&gt;
	&amp;lt;fieldset&lt;br /&gt;
				name=&amp;quot;details&amp;quot;&lt;br /&gt;
				label=&amp;quot;COM_HELLOWORLD_HELLOWORLD_DETAILS&amp;quot;&lt;br /&gt;
	&amp;gt;&lt;br /&gt;
		&amp;lt;field&lt;br /&gt;
				name=&amp;quot;id&amp;quot;&lt;br /&gt;
				type=&amp;quot;hidden&amp;quot;&lt;br /&gt;
				/&amp;gt;&lt;br /&gt;
		&amp;lt;field&lt;br /&gt;
				name=&amp;quot;greeting&amp;quot;&lt;br /&gt;
				type=&amp;quot;text&amp;quot;&lt;br /&gt;
				label=&amp;quot;COM_HELLOWORLD_HELLOWORLD_GREETING_LABEL&amp;quot;&lt;br /&gt;
				description=&amp;quot;COM_HELLOWORLD_HELLOWORLD_GREETING_DESC&amp;quot;&lt;br /&gt;
				size=&amp;quot;40&amp;quot;&lt;br /&gt;
				class=&amp;quot;inputbox validate-greeting&amp;quot;&lt;br /&gt;
				validate=&amp;quot;greeting&amp;quot;&lt;br /&gt;
				required=&amp;quot;true&amp;quot;&lt;br /&gt;
				default=&amp;quot;&amp;quot;&lt;br /&gt;
				/&amp;gt;&lt;br /&gt;
		&amp;lt;field&lt;br /&gt;
				name=&amp;quot;catid&amp;quot;&lt;br /&gt;
				type=&amp;quot;category&amp;quot;&lt;br /&gt;
				extension=&amp;quot;com_helloworld&amp;quot;&lt;br /&gt;
				class=&amp;quot;inputbox&amp;quot;&lt;br /&gt;
				default=&amp;quot;&amp;quot;&lt;br /&gt;
				label=&amp;quot;COM_HELLOWORLD_HELLOWORLD_FIELD_CATID_LABEL&amp;quot;&lt;br /&gt;
				description=&amp;quot;COM_HELLOWORLD_HELLOWORLD_FIELD_CATID_DESC&amp;quot;&lt;br /&gt;
				required=&amp;quot;true&amp;quot;&lt;br /&gt;
		&amp;gt;&lt;br /&gt;
			&amp;lt;option value=&amp;quot;0&amp;quot;&amp;gt;JOPTION_SELECT_CATEGORY&amp;lt;/option&amp;gt;&lt;br /&gt;
		&amp;lt;/field&amp;gt;&lt;br /&gt;
	&amp;lt;/fieldset&amp;gt;&lt;br /&gt;
	&amp;lt;fields name=&amp;quot;params&amp;quot;&amp;gt;&lt;br /&gt;
		&amp;lt;fieldset&lt;br /&gt;
				name=&amp;quot;params&amp;quot;&lt;br /&gt;
				label=&amp;quot;JGLOBAL_FIELDSET_DISPLAY_OPTIONS&amp;quot;&lt;br /&gt;
		&amp;gt;&lt;br /&gt;
			&amp;lt;field&lt;br /&gt;
					name=&amp;quot;show_category&amp;quot;&lt;br /&gt;
					type=&amp;quot;list&amp;quot;&lt;br /&gt;
					label=&amp;quot;COM_HELLOWORLD_HELLOWORLD_FIELD_SHOW_CATEGORY_LABEL&amp;quot;&lt;br /&gt;
					description=&amp;quot;COM_HELLOWORLD_HELLOWORLD_FIELD_SHOW_CATEGORY_DESC&amp;quot;&lt;br /&gt;
					default=&amp;quot;&amp;quot;&lt;br /&gt;
			&amp;gt;&lt;br /&gt;
				&amp;lt;option value=&amp;quot;&amp;quot;&amp;gt;JGLOBAL_USE_GLOBAL&amp;lt;/option&amp;gt;&lt;br /&gt;
				&amp;lt;option value=&amp;quot;0&amp;quot;&amp;gt;JHIDE&amp;lt;/option&amp;gt;&lt;br /&gt;
				&amp;lt;option value=&amp;quot;1&amp;quot;&amp;gt;JSHOW&amp;lt;/option&amp;gt;&lt;br /&gt;
			&amp;lt;/field&amp;gt;&lt;br /&gt;
		&amp;lt;/fieldset&amp;gt;&lt;br /&gt;
	&amp;lt;/fields&amp;gt;&lt;br /&gt;
	&amp;lt;fieldset&lt;br /&gt;
			name=&amp;quot;accesscontrol&amp;quot;&lt;br /&gt;
			label=&amp;quot;COM_HELLOWORLD_FIELDSET_RULES&amp;quot;&lt;br /&gt;
	&amp;gt;&lt;br /&gt;
    	&amp;lt;field&lt;br /&gt;
				name=&amp;quot;asset_id&amp;quot;&lt;br /&gt;
				type=&amp;quot;hidden&amp;quot;&lt;br /&gt;
				filter=&amp;quot;unset&amp;quot;&lt;br /&gt;
				/&amp;gt;&lt;br /&gt;
    	&amp;lt;field&lt;br /&gt;
				name=&amp;quot;rules&amp;quot;&lt;br /&gt;
				type=&amp;quot;rules&amp;quot;&lt;br /&gt;
				label=&amp;quot;COM_HELLOWORLD_FIELD_RULES_LABEL&amp;quot;&lt;br /&gt;
				filter=&amp;quot;rules&amp;quot;&lt;br /&gt;
				validate=&amp;quot;rules&amp;quot;&lt;br /&gt;
				class=&amp;quot;inputbox&amp;quot;&lt;br /&gt;
				component=&amp;quot;com_helloworld&amp;quot;&lt;br /&gt;
				section=&amp;quot;message&amp;quot;&lt;br /&gt;
				/&amp;gt;&lt;br /&gt;
    &amp;lt;/fieldset&amp;gt;&lt;br /&gt;
&amp;lt;/form&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;translate&amp;gt;&lt;br /&gt;
&amp;lt;!--T:100--&amp;gt;&lt;br /&gt;
The previous edit.php layout file would display the permissions field automatically, but we&#039;ve changed the layout to display in a tabbed format, similar to other Joomla components. When a user changes a permission there&#039;s an Ajax call to recalculate the Calculated Setting, and we need a little bit of javascript to enable that to work. &lt;br /&gt;
&amp;lt;/translate&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span id=&amp;quot;admin/views/helloworld/tmpl/edit.php&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;tt&amp;gt;admin/views/helloworld/tmpl/edit.php&amp;lt;/tt&amp;gt;&lt;br /&gt;
&amp;lt;source lang=&#039;php&#039;  highlight=&amp;quot;14-23,29,33-67&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;?php&lt;br /&gt;
/**&lt;br /&gt;
 * @package     Joomla.Administrator&lt;br /&gt;
 * @subpackage  com_helloworld&lt;br /&gt;
 *&lt;br /&gt;
 * @copyright   Copyright (C) 2005 - 2018 Open Source Matters, Inc. All rights reserved.&lt;br /&gt;
 * @license     GNU General Public License version 2 or later; see LICENSE.txt&lt;br /&gt;
 */&lt;br /&gt;
&lt;br /&gt;
// No direct access&lt;br /&gt;
defined(&#039;_JEXEC&#039;) or die(&#039;Restricted access&#039;);&lt;br /&gt;
JHtml::_(&#039;behavior.formvalidator&#039;);&lt;br /&gt;
&lt;br /&gt;
// The following is to enable setting the permission&#039;s Calculated Setting &lt;br /&gt;
// when you change the permission&#039;s Setting. &lt;br /&gt;
// The core javascript code for initiating the Ajax request looks for a field&lt;br /&gt;
// with id=&amp;quot;jform_title&amp;quot; and sets its value as the &#039;title&#039; parameter to send in the Ajax request&lt;br /&gt;
JFactory::getDocument()-&amp;gt;addScriptDeclaration(&#039;&lt;br /&gt;
	jQuery(document).ready(function() {&lt;br /&gt;
        greeting = jQuery(&amp;quot;#jform_greeting&amp;quot;).val();&lt;br /&gt;
		jQuery(&amp;quot;#jform_title&amp;quot;).val(greeting);&lt;br /&gt;
	});&lt;br /&gt;
&#039;);&lt;br /&gt;
&lt;br /&gt;
?&amp;gt;&lt;br /&gt;
&amp;lt;form action=&amp;quot;&amp;lt;?php echo JRoute::_(&#039;index.php?option=com_helloworld&amp;amp;layout=edit&amp;amp;id=&#039; . (int) $this-&amp;gt;item-&amp;gt;id); ?&amp;gt;&amp;quot;&lt;br /&gt;
    method=&amp;quot;post&amp;quot; name=&amp;quot;adminForm&amp;quot; id=&amp;quot;adminForm&amp;quot; class=&amp;quot;form-validate&amp;quot;&amp;gt;&lt;br /&gt;
    &lt;br /&gt;
    &amp;lt;input id=&amp;quot;jform_title&amp;quot; type=&amp;quot;hidden&amp;quot; name=&amp;quot;helloworld-message-title&amp;quot;/&amp;gt;&lt;br /&gt;
    &lt;br /&gt;
    &amp;lt;div class=&amp;quot;form-horizontal&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
    &amp;lt;?php echo JHtml::_(&#039;bootstrap.startTabSet&#039;, &#039;myTab&#039;, array(&#039;active&#039; =&amp;gt; &#039;details&#039;)); ?&amp;gt;&lt;br /&gt;
    &amp;lt;?php echo JHtml::_(&#039;bootstrap.addTab&#039;, &#039;myTab&#039;, &#039;details&#039;, &lt;br /&gt;
        empty($this-&amp;gt;item-&amp;gt;id) ? JText::_(&#039;COM_HELLOWORLD_TAB_NEW_MESSAGE&#039;) : JText::_(&#039;COM_HELLOWORLD_TAB_EDIT_MESSAGE&#039;)); ?&amp;gt;&lt;br /&gt;
        &amp;lt;fieldset class=&amp;quot;adminform&amp;quot;&amp;gt;&lt;br /&gt;
            &amp;lt;legend&amp;gt;&amp;lt;?php echo JText::_(&#039;COM_HELLOWORLD_LEGEND_DETAILS&#039;) ?&amp;gt;&amp;lt;/legend&amp;gt;&lt;br /&gt;
            &amp;lt;div class=&amp;quot;row-fluid&amp;quot;&amp;gt;&lt;br /&gt;
                &amp;lt;div class=&amp;quot;span6&amp;quot;&amp;gt;&lt;br /&gt;
                    &amp;lt;?php echo $this-&amp;gt;form-&amp;gt;renderFieldset(&#039;details&#039;);  ?&amp;gt;&lt;br /&gt;
                &amp;lt;/div&amp;gt;&lt;br /&gt;
            &amp;lt;/div&amp;gt;&lt;br /&gt;
        &amp;lt;/fieldset&amp;gt;&lt;br /&gt;
    &amp;lt;?php echo JHtml::_(&#039;bootstrap.endTab&#039;); ?&amp;gt;&lt;br /&gt;
&lt;br /&gt;
    &amp;lt;?php echo JHtml::_(&#039;bootstrap.addTab&#039;, &#039;myTab&#039;, &#039;params&#039;, JText::_(&#039;COM_HELLOWORLD_TAB_PARAMS&#039;)); ?&amp;gt;&lt;br /&gt;
        &amp;lt;fieldset class=&amp;quot;adminform&amp;quot;&amp;gt;&lt;br /&gt;
            &amp;lt;legend&amp;gt;&amp;lt;?php echo JText::_(&#039;COM_HELLOWORLD_LEGEND_PARAMS&#039;) ?&amp;gt;&amp;lt;/legend&amp;gt;&lt;br /&gt;
            &amp;lt;div class=&amp;quot;row-fluid&amp;quot;&amp;gt;&lt;br /&gt;
                &amp;lt;div class=&amp;quot;span6&amp;quot;&amp;gt;&lt;br /&gt;
                    &amp;lt;?php echo $this-&amp;gt;form-&amp;gt;renderFieldset(&#039;params&#039;);  ?&amp;gt;&lt;br /&gt;
                &amp;lt;/div&amp;gt;&lt;br /&gt;
            &amp;lt;/div&amp;gt;&lt;br /&gt;
        &amp;lt;/fieldset&amp;gt;&lt;br /&gt;
    &amp;lt;?php echo JHtml::_(&#039;bootstrap.endTab&#039;); ?&amp;gt;&lt;br /&gt;
&lt;br /&gt;
    &amp;lt;?php echo JHtml::_(&#039;bootstrap.addTab&#039;, &#039;myTab&#039;, &#039;permissions&#039;, JText::_(&#039;COM_HELLOWORLD_TAB_PERMISSIONS&#039;)); ?&amp;gt;&lt;br /&gt;
        &amp;lt;fieldset class=&amp;quot;adminform&amp;quot;&amp;gt;&lt;br /&gt;
            &amp;lt;legend&amp;gt;&amp;lt;?php echo JText::_(&#039;COM_HELLOWORLD_LEGEND_PERMISSIONS&#039;) ?&amp;gt;&amp;lt;/legend&amp;gt;&lt;br /&gt;
            &amp;lt;div class=&amp;quot;row-fluid&amp;quot;&amp;gt;&lt;br /&gt;
                &amp;lt;div class=&amp;quot;span12&amp;quot;&amp;gt;&lt;br /&gt;
                    &amp;lt;?php echo $this-&amp;gt;form-&amp;gt;renderFieldset(&#039;accesscontrol&#039;);  ?&amp;gt;&lt;br /&gt;
                &amp;lt;/div&amp;gt;&lt;br /&gt;
            &amp;lt;/div&amp;gt;&lt;br /&gt;
        &amp;lt;/fieldset&amp;gt;&lt;br /&gt;
    &amp;lt;?php echo JHtml::_(&#039;bootstrap.endTab&#039;); ?&amp;gt;&lt;br /&gt;
    &amp;lt;?php echo JHtml::_(&#039;bootstrap.endTabSet&#039;); ?&amp;gt;&lt;br /&gt;
&lt;br /&gt;
    &amp;lt;/div&amp;gt;&lt;br /&gt;
    &amp;lt;input type=&amp;quot;hidden&amp;quot; name=&amp;quot;task&amp;quot; value=&amp;quot;helloworld.edit&amp;quot; /&amp;gt;&lt;br /&gt;
    &amp;lt;?php echo JHtml::_(&#039;form.token&#039;); ?&amp;gt;&lt;br /&gt;
&amp;lt;/form&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;translate&amp;gt;&lt;br /&gt;
=== Adding language strings === &amp;lt;!--T:72--&amp;gt;&lt;br /&gt;
&amp;lt;/translate&amp;gt;&lt;br /&gt;
&amp;lt;translate&amp;gt;&amp;lt;!--T:73--&amp;gt;&lt;br /&gt;
We used several language strings that have to be added to the backend language-file.&amp;lt;/translate&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span id=&amp;quot;admin/language/en-GB/en-GB.com_helloworld.ini&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;tt&amp;gt;admin/language/en-GB/en-GB.com_helloworld.ini&amp;lt;/tt&amp;gt;&lt;br /&gt;
&amp;lt;source lang=&amp;quot;text&amp;quot; highlight=&amp;quot;41-51&amp;quot;&amp;gt;&lt;br /&gt;
; Joomla! Project&lt;br /&gt;
; Copyright (C) 2005 - 2018 Open Source Matters. All rights reserved.&lt;br /&gt;
; License GNU General Public License version 2 or later; see LICENSE.txt, see LICENSE.php&lt;br /&gt;
; Note : All ini files need to be saved as UTF-8&lt;br /&gt;
&lt;br /&gt;
COM_HELLOWORLD_ADMINISTRATION=&amp;quot;HelloWorld - Administration&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_ADMINISTRATION_CATEGORIES=&amp;quot;HelloWorld - Categories&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_NUM=&amp;quot;#&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_HELLOWORLDS_FILTER=&amp;quot;Filters&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_PUBLISHED=&amp;quot;Published&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_HELLOWORLDS_NAME=&amp;quot;Name&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_ID=&amp;quot;Id&amp;quot;&lt;br /&gt;
&lt;br /&gt;
COM_HELLOWORLD_HELLOWORLD_CREATING=&amp;quot;HelloWorld - Creating&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_HELLOWORLD_DETAILS=&amp;quot;Details&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_HELLOWORLD_EDITING=&amp;quot;HelloWorld - Editing&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_HELLOWORLD_ERROR_UNACCEPTABLE=&amp;quot;Some values are unacceptable&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_HELLOWORLD_FIELD_CATID_DESC=&amp;quot;The category the messages belongs to&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_HELLOWORLD_FIELD_CATID_LABEL=&amp;quot;Category&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_HELLOWORLD_FIELD_GREETING_DESC=&amp;quot;This message will be displayed&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_HELLOWORLD_FIELD_GREETING_LABEL=&amp;quot;Message&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_HELLOWORLD_FIELD_SHOW_CATEGORY_LABEL=&amp;quot;Show category&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_HELLOWORLD_FIELD_SHOW_CATEGORY_DESC=&amp;quot;If set to Show, the title of the message&amp;amp;rsquo;s category will show.&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_HELLOWORLD_HEADING_GREETING=&amp;quot;Greeting&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_HELLOWORLD_HEADING_ID=&amp;quot;Id&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_MANAGER_HELLOWORLD_EDIT=&amp;quot;HelloWorld manager: Edit Message&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_MANAGER_HELLOWORLD_NEW=&amp;quot;HelloWorld manager: New Message&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_MANAGER_HELLOWORLDS=&amp;quot;HelloWorld manager&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_EDIT_HELLOWORLD=&amp;quot;Edit message&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_N_ITEMS_DELETED_1=&amp;quot;One message deleted&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_N_ITEMS_DELETED_MORE=&amp;quot;%d messages deleted&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_N_ITEMS_PUBLISHED=&amp;quot;%d message(s) published&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_N_ITEMS_UNPUBLISHED=&amp;quot;%d message(s) unpublished&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_HELLOWORLD_GREETING_LABEL=&amp;quot;Greeting&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_HELLOWORLD_GREETING_DESC=&amp;quot;Add Hello World Greeting&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_SUBMENU_MESSAGES=&amp;quot;Messages&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_SUBMENU_CATEGORIES=&amp;quot;Categories&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_CONFIGURATION=&amp;quot;HelloWorld Configuration&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_CONFIG_GREETING_SETTINGS_LABEL=&amp;quot;Messages settings&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_CONFIG_GREETING_SETTINGS_DESC=&amp;quot;Settings that will be applied to all messages by default&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_FIELDSET_RULES=&amp;quot;Message Permissions&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_FIELD_RULES_LABEL=&amp;quot;Permissions&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_ACCESS_EDIT_DESC=&amp;quot;Is this group allowed to edit this message?&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_ACCESS_DELETE_DESC=&amp;quot;Is this group allowed to delete this message?&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_TAB_NEW_MESSAGE=&amp;quot;New Message&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_TAB_EDIT_MESSAGE=&amp;quot;Message Details&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_TAB_PARAMS=&amp;quot;Parameters&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_TAB_PERMISSIONS=&amp;quot;Permissions&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_LEGEND_DETAILS=&amp;quot;Message Details&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_LEGEND_PARAMS=&amp;quot;Message Parameters&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_LEGEND_PERMISSIONS=&amp;quot;Message Permissions&amp;quot;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;translate&amp;gt;&lt;br /&gt;
== Further reading == &amp;lt;!--T:74--&amp;gt;&lt;br /&gt;
&amp;lt;/translate&amp;gt;&lt;br /&gt;
&amp;lt;translate&amp;gt;&amp;lt;!--T:75--&amp;gt;&lt;br /&gt;
More information on actions, assets and ACL can be found on the following pages:&amp;lt;/translate&amp;gt;&lt;br /&gt;
&amp;lt;translate&amp;gt;&amp;lt;!--T:76--&amp;gt;&lt;br /&gt;
* General information and use: [[S:MyLanguage/J3.x:Access_Control_List_Tutorial|Access Control List/Tutorial]]&amp;lt;/translate&amp;gt;&lt;br /&gt;
&amp;lt;translate&amp;gt;&amp;lt;!--T:78--&amp;gt;&lt;br /&gt;
* [[S:MyLanguage/How to implement actions in your code|How to implement actions in your code]]&amp;lt;/translate&amp;gt;&lt;br /&gt;
&amp;lt;translate&amp;gt;&amp;lt;!--T:79--&amp;gt;&lt;br /&gt;
* [[S:MyLanguage/Adding ACL rules to your component|Adding ACL rules to your component]]&amp;lt;/translate&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;translate&amp;gt;&lt;br /&gt;
== Packaging the component == &amp;lt;!--T:83--&amp;gt;&lt;br /&gt;
&amp;lt;/translate&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;translate&amp;gt;&amp;lt;!--T:84--&amp;gt;&lt;br /&gt;
Content of your code directory. Each file link below takes you to the step in the tutorial which has the latest version of that source code file. &amp;lt;/translate&amp;gt;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Adding_ACL#helloworld.xml|helloworld.xml]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Adding_a_view_to_the_site_part#site/helloworld.php|site/helloworld.php]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Developing_a_Basic_Component#index.html|site/index.html]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Adding_a_view_to_the_site_part#site/controller.php|site/controller.php]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Developing_a_Basic_Component#index.html|site/views/index.html]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Developing_a_Basic_Component#index.html|site/views/helloworld/index.html]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Adding_configuration#site/views/helloworld/view.html.php|site/views/helloworld/view.html.php]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Developing_a_Basic_Component#index.html|site/views/helloworld/tmpl/index.html]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Using_the_database#site/views/helloworld/tmpl/default.xml|site/views/helloworld/tmpl/default.xml]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Adding_configuration#site/views/helloworld/tmpl/default.php|site/views/helloworld/tmpl/default.php]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Developing_a_Basic_Component#index.html|site/models/index.html]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Adding_configuration#site/models/helloworld.php|site/models/helloworld.php]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Developing_a_Basic_Component#index.html|site/language/index.html]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Developing_a_Basic_Component#index.html|site/language/en-GB/index.html]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.x:Developing an MVC Component/Adding language management#site.2Flanguage.2Fen-GB.2Fen-GB.com_helloworld.ini|site/language/en-GB/en-GB.com_helloworld.ini]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Developing_a_Basic_Component#index.html|admin/index.html]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Adding_ACL#admin/helloworld.php|admin/helloworld.php]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Adding_ACL#admin/config.xml|admin/config.xml]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Basic_backend#admin/controller.php|admin/controller.php]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Adding_ACL#admin/access.xml|admin/access.xml]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Adding_categories#admin/helpers/helloworld.php|admin/helpers/helloworld.php]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Developing_a_Basic_Component#index.html|admin/helpers/index.html]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Developing_a_Basic_Component#index.html|admin/sql/index.html]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[J3.2:Developing_an_MVC_Component/Adding_ACL#admin/sql/install.mysql.utf8.sql|admin/sql/install.mysql.utf8.sql]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Using_the_database#admin/sql/uninstall.mysql.utf8.sql|admin/sql/uninstall.mysql.utf8.sql]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Developing_a_Basic_Component#index.html|admin/sql/updates/index.html]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Developing_a_Basic_Component#index.html|admin/sql/updates/mysql/index.html]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Developing_a_Basic_Component#admin/sql/updates/mysql/0.0.1.sql|admin/sql/updates/mysql/0.0.1.sql]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Adding_ACL#admin/sql/install.mysql.utf8.sql|admin/sql/updates/mysql/0.0.6.sql]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Adding_categories#admin/sql/updates/mysql/0.0.12.sql|admin/sql/updates/mysql/0.0.12.sql]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Adding_configuration#admin/sql/updates/mysql/0.0.13.sql|admin/sql/updates/mysql/0.0.13.sql]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Adding_ACL#admin/sql/updates/mysql/0.0.14.sql|admin/sql/updates/mysql/0.0.14.sql]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Developing_a_Basic_Component#index.html|admin/models/index.html]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Developing_a_Basic_Component#index.html|admin/models/fields/index.html]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Adding_categories#admin/models/fields/helloworld.php|admin/models/fields/helloworld.php]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Adding_categories#admin/models/helloworlds.php|admin/models/helloworlds.php]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Adding_ACL#admin/models/helloworld.php|admin/models/helloworld.php]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Adding decorations to the backend#admin/models/forms/filter_helloworlds.xml|admin/models/forms/filter_helloworlds.xml]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Developing_a_Basic_Component#index.html|admin/models/forms/index.html]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Adding_verifications#admin/models/forms/helloworld.js|admin/models/forms/helloworld.js]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Adding_ACL#admin/models/forms/helloworld.xml|admin/models/forms/helloworld.xml]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Adding_verifications#admin/models/rules/greeting.php|admin/models/rules/greeting.php]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Developing_a_Basic_Component#index.html|admin/models/rules/index.html]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Adding_ACL#admin/controllers/helloworld.php|admin/controllers/helloworld.php]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Adding_backend_actions#admin/controllers/helloworlds.php|admin/controllers/helloworlds.php]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Developing_a_Basic_Component#index.html|admin/controllers/index.html]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Developing_a_Basic_Component#index.html|admin/views/index.html]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Developing_a_Basic_Component#index.html|admin/views/helloworld/index.html]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Adding_ACL#admin/views/helloworld/view.html.php|admin/views/helloworld/view.html.php]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Developing_a_Basic_Component#index.html|admin/views/helloworld/tmpl/index.html]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Adding_ACL#admin/views/helloworld/tmpl/edit.php|admin/views/helloworld/tmpl/edit.php]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Adding_verifications#admin/views/helloworld/submitbutton.js|admin/views/helloworld/submitbutton.js]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Developing_a_Basic_Component#index.html|admin/views/helloworlds/index.html]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Adding_ACL#admin/views/helloworlds/view.html.php|admin/views/helloworlds/view.html.php]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Developing_a_Basic_Component#index.html|admin/views/helloworlds/tmpl/index.html]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Adding_categories#admin/views/helloworlds/tmpl/default.php|admin/views/helloworlds/tmpl/default.php]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Developing_a_Basic_Component#index.html|admin/tables/index.html]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Adding_ACL#admin/tables/helloworld.php|admin/tables/helloworld.php]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Developing_a_Basic_Component#index.html|admin/language/index.html]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Developing_a_Basic_Component#index.html|admin/language/en-GB/index.html]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.x:Developing an MVC Component/Adding_ACL#admin.2Flanguage.2Fen-GB.2Fen-GB.com_helloworld.ini|admin/language/en-GB/en-GB.com_helloworld.ini]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.x:Developing an MVC Component/Adding_decorations_to_the_backend#admin.2Flanguage.2Fen-GB.2Fen-GB.com_helloworld.sys.ini|admin/language/en-GB/en-GB.com_helloworld.sys.ini]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Developing_a_Basic_Component#index.html|media/index.html]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Developing_a_Basic_Component#index.html|media/images/index.html]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.x:Developing_an_MVC_Component/Adding_decorations_to_the_backend#Adding_some_icons|media/images/tux-16x16.png]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.x:Developing_an_MVC_Component/Adding_decorations_to_the_backend#Adding_some_icons|media/images/tux-48x48.png]]&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;translate&amp;gt;&amp;lt;!--T:85--&amp;gt;&lt;br /&gt;
Create a compressed file of this directory or directly download the [https://github.com/scionescire/Joomla-3.2-Hello-World-Component/archive/step-14-adding-ACL.zip archive] and install it using the extension manager of Joomla. You can add a menu item of this component using the menu manager in the backend.&amp;lt;/translate&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span id=&amp;quot;helloworld.xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;tt&amp;gt;helloworld.xml&amp;lt;/tt&amp;gt;&lt;br /&gt;
&amp;lt;source lang=&amp;quot;xml&amp;quot; highlight=&amp;quot;13&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;?xml version=&amp;quot;1.0&amp;quot; encoding=&amp;quot;utf-8&amp;quot;?&amp;gt;&lt;br /&gt;
&amp;lt;extension type=&amp;quot;component&amp;quot; version=&amp;quot;3.0&amp;quot; method=&amp;quot;upgrade&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
	&amp;lt;name&amp;gt;COM_HELLOWORLD&amp;lt;/name&amp;gt;&lt;br /&gt;
	&amp;lt;!-- The following elements are optional and free of formatting constraints --&amp;gt;&lt;br /&gt;
	&amp;lt;creationDate&amp;gt;January 2018&amp;lt;/creationDate&amp;gt;&lt;br /&gt;
	&amp;lt;author&amp;gt;John Doe&amp;lt;/author&amp;gt;&lt;br /&gt;
	&amp;lt;authorEmail&amp;gt;john.doe@example.org&amp;lt;/authorEmail&amp;gt;&lt;br /&gt;
	&amp;lt;authorUrl&amp;gt;http://www.example.org&amp;lt;/authorUrl&amp;gt;&lt;br /&gt;
	&amp;lt;copyright&amp;gt;Copyright Info&amp;lt;/copyright&amp;gt;&lt;br /&gt;
	&amp;lt;license&amp;gt;License Info&amp;lt;/license&amp;gt;&lt;br /&gt;
	&amp;lt;!--  The version string is recorded in the components table --&amp;gt;&lt;br /&gt;
	&amp;lt;version&amp;gt;0.0.14&amp;lt;/version&amp;gt;&lt;br /&gt;
	&amp;lt;!-- The description is optional and defaults to the name --&amp;gt;&lt;br /&gt;
	&amp;lt;description&amp;gt;COM_HELLOWORLD_DESCRIPTION&amp;lt;/description&amp;gt;&lt;br /&gt;
&lt;br /&gt;
	&amp;lt;install&amp;gt; &amp;lt;!-- Runs on install --&amp;gt;&lt;br /&gt;
		&amp;lt;sql&amp;gt;&lt;br /&gt;
			&amp;lt;file driver=&amp;quot;mysql&amp;quot; charset=&amp;quot;utf8&amp;quot;&amp;gt;sql/install.mysql.utf8.sql&amp;lt;/file&amp;gt;&lt;br /&gt;
		&amp;lt;/sql&amp;gt;&lt;br /&gt;
	&amp;lt;/install&amp;gt;&lt;br /&gt;
	&amp;lt;uninstall&amp;gt; &amp;lt;!-- Runs on uninstall --&amp;gt;&lt;br /&gt;
		&amp;lt;sql&amp;gt;&lt;br /&gt;
			&amp;lt;file driver=&amp;quot;mysql&amp;quot; charset=&amp;quot;utf8&amp;quot;&amp;gt;sql/uninstall.mysql.utf8.sql&amp;lt;/file&amp;gt;&lt;br /&gt;
		&amp;lt;/sql&amp;gt;&lt;br /&gt;
	&amp;lt;/uninstall&amp;gt;&lt;br /&gt;
	&amp;lt;update&amp;gt; &amp;lt;!-- Runs on update; New since J2.5 --&amp;gt;&lt;br /&gt;
		&amp;lt;schemas&amp;gt;&lt;br /&gt;
			&amp;lt;schemapath type=&amp;quot;mysql&amp;quot;&amp;gt;sql/updates/mysql&amp;lt;/schemapath&amp;gt;&lt;br /&gt;
		&amp;lt;/schemas&amp;gt;&lt;br /&gt;
	&amp;lt;/update&amp;gt;&lt;br /&gt;
&lt;br /&gt;
	&amp;lt;!-- Site Main File Copy Section --&amp;gt;&lt;br /&gt;
	&amp;lt;!-- Note the folder attribute: This attribute describes the folder&lt;br /&gt;
		to copy FROM in the package to install therefore files copied&lt;br /&gt;
		in this section are copied from /site/ in the package --&amp;gt;&lt;br /&gt;
	&amp;lt;files folder=&amp;quot;site&amp;quot;&amp;gt;&lt;br /&gt;
		&amp;lt;filename&amp;gt;index.html&amp;lt;/filename&amp;gt;&lt;br /&gt;
		&amp;lt;filename&amp;gt;helloworld.php&amp;lt;/filename&amp;gt;&lt;br /&gt;
		&amp;lt;filename&amp;gt;controller.php&amp;lt;/filename&amp;gt;&lt;br /&gt;
		&amp;lt;folder&amp;gt;views&amp;lt;/folder&amp;gt;&lt;br /&gt;
		&amp;lt;folder&amp;gt;models&amp;lt;/folder&amp;gt;&lt;br /&gt;
	&amp;lt;/files&amp;gt;&lt;br /&gt;
&lt;br /&gt;
        &amp;lt;languages folder=&amp;quot;site/language&amp;quot;&amp;gt;&lt;br /&gt;
		&amp;lt;language tag=&amp;quot;en-GB&amp;quot;&amp;gt;en-GB/en-GB.com_helloworld.ini&amp;lt;/language&amp;gt;&lt;br /&gt;
        &amp;lt;/languages&amp;gt;&lt;br /&gt;
&lt;br /&gt;
	&amp;lt;media destination=&amp;quot;com_helloworld&amp;quot; folder=&amp;quot;media&amp;quot;&amp;gt;&lt;br /&gt;
		&amp;lt;filename&amp;gt;index.html&amp;lt;/filename&amp;gt;&lt;br /&gt;
		&amp;lt;folder&amp;gt;images&amp;lt;/folder&amp;gt;&lt;br /&gt;
	&amp;lt;/media&amp;gt;&lt;br /&gt;
&lt;br /&gt;
	&amp;lt;administration&amp;gt;&lt;br /&gt;
		&amp;lt;!-- Administration Menu Section --&amp;gt;&lt;br /&gt;
		&amp;lt;menu link=&#039;index.php?option=com_helloworld&#039; img=&amp;quot;../media/com_helloworld/images/tux-16x16.png&amp;quot;&amp;gt;COM_HELLOWORLD_MENU&amp;lt;/menu&amp;gt;&lt;br /&gt;
		&amp;lt;!-- Administration Main File Copy Section --&amp;gt;&lt;br /&gt;
		&amp;lt;!-- Note the folder attribute: This attribute describes the folder&lt;br /&gt;
			to copy FROM in the package to install therefore files copied&lt;br /&gt;
			in this section are copied from /admin/ in the package --&amp;gt;&lt;br /&gt;
		&amp;lt;files folder=&amp;quot;admin&amp;quot;&amp;gt;&lt;br /&gt;
			&amp;lt;!-- Admin Main File Copy Section --&amp;gt;&lt;br /&gt;
			&amp;lt;filename&amp;gt;index.html&amp;lt;/filename&amp;gt;&lt;br /&gt;
			&amp;lt;filename&amp;gt;config.xml&amp;lt;/filename&amp;gt;&lt;br /&gt;
			&amp;lt;filename&amp;gt;helloworld.php&amp;lt;/filename&amp;gt;&lt;br /&gt;
			&amp;lt;filename&amp;gt;controller.php&amp;lt;/filename&amp;gt;&lt;br /&gt;
			&amp;lt;filename&amp;gt;access.xml&amp;lt;/filename&amp;gt;&lt;br /&gt;
			&amp;lt;!-- SQL files section --&amp;gt;&lt;br /&gt;
			&amp;lt;folder&amp;gt;sql&amp;lt;/folder&amp;gt;&lt;br /&gt;
			&amp;lt;!-- tables files section --&amp;gt;&lt;br /&gt;
			&amp;lt;folder&amp;gt;tables&amp;lt;/folder&amp;gt;&lt;br /&gt;
			&amp;lt;!-- models files section --&amp;gt;&lt;br /&gt;
			&amp;lt;folder&amp;gt;models&amp;lt;/folder&amp;gt;&lt;br /&gt;
			&amp;lt;!-- views files section --&amp;gt;&lt;br /&gt;
			&amp;lt;folder&amp;gt;views&amp;lt;/folder&amp;gt;&lt;br /&gt;
			&amp;lt;!-- controllers files section --&amp;gt;&lt;br /&gt;
			&amp;lt;folder&amp;gt;controllers&amp;lt;/folder&amp;gt;&lt;br /&gt;
			&amp;lt;!-- helpers files section --&amp;gt;&lt;br /&gt;
			&amp;lt;folder&amp;gt;helpers&amp;lt;/folder&amp;gt;&lt;br /&gt;
		&amp;lt;/files&amp;gt;&lt;br /&gt;
		&amp;lt;languages folder=&amp;quot;admin/language&amp;quot;&amp;gt;&lt;br /&gt;
        		&amp;lt;language tag=&amp;quot;en-GB&amp;quot;&amp;gt;en-GB/en-GB.com_helloworld.ini&amp;lt;/language&amp;gt;&lt;br /&gt;
                        &amp;lt;language tag=&amp;quot;en-GB&amp;quot;&amp;gt;en-GB/en-GB.com_helloworld.sys.ini&amp;lt;/language&amp;gt;&lt;br /&gt;
		&amp;lt;/languages&amp;gt;&lt;br /&gt;
	&amp;lt;/administration&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/extension&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;translate&amp;gt;&lt;br /&gt;
== Contributors == &amp;lt;!--T:86--&amp;gt;&lt;br /&gt;
&amp;lt;/translate&amp;gt;&lt;br /&gt;
*[[User:Dwarkesh0204|Dwarkesh Soni]]&lt;br /&gt;
*[[User:cdemko|Christophe Demko]]&lt;br /&gt;
*[[User:oaksu|Ozgur Aksu]]&lt;br /&gt;
*[[User:florian_denizot|Florian Denizot]]&lt;br /&gt;
*[[User:HermanPeeren|Herman Peeren]]&lt;br /&gt;
* TDZweb (Ståle Rolf Sæbøe), Elin Waring, Neil via https://groups.google.com/forum/#!topic/joomla-dev-general/aCH3GNA91m4&lt;br /&gt;
*[[User:Scionescire|Scionescire]]&lt;br /&gt;
*[[User:Robbiej|Robbie Jackson]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;row&amp;quot;&amp;gt; &lt;br /&gt;
&amp;lt;div class=&amp;quot;large-6 columns&amp;quot;&amp;gt;{{Basic button|&amp;lt;translate&amp;gt;&amp;lt;!--T:87--&amp;gt;&lt;br /&gt;
S:MyLanguage/J3.x:Developing_an_MVC_Component/Adding configuration|Prev: Adding configuration&amp;lt;/translate&amp;gt;|class=expand success}}&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;div class=&amp;quot;large-6 columns&amp;quot;&amp;gt;{{Basic button|&amp;lt;translate&amp;gt;&amp;lt;!--T:88--&amp;gt;&lt;br /&gt;
S:MyLanguage/J3.x:Developing_an_MVC_Component/Adding an install-uninstall-update script file|Next: Adding an install-uninstall-update script file&amp;lt;/translate&amp;gt;|class=expand}}&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
__NOTOC__&lt;br /&gt;
&amp;lt;noinclude&amp;gt;&lt;br /&gt;
[[Category:Joomla! 3.x{{#translation:}}]]&lt;br /&gt;
[[Category:Joomla! 3.0{{#translation:}}]]&lt;br /&gt;
[[Category:Joomla! 3.1{{#translation:}}]]&lt;br /&gt;
[[Category:Joomla! 3.2{{#translation:}}]]&lt;br /&gt;
[[Category:Joomla! 3.3{{#translation:}}]]&lt;br /&gt;
[[Category:Joomla! 3.4{{#translation:}}]]&lt;br /&gt;
[[Category:Beginner Development{{#translation:}}]]&lt;br /&gt;
[[Category:Component Development{{#translation:}}]]&lt;br /&gt;
[[Category:Tutorials{{#translation:}}]]&lt;br /&gt;
[[Category:Tutorials in a Series{{#translation:}}]]&lt;br /&gt;
&amp;lt;/noinclude&amp;gt;&lt;/div&gt;</summary>
		<author><name>Stan31337</name></author>
	</entry>
	<entry>
		<id>https://docs.sandbox.joomla.org/index.php?title=J3.x:Developing_an_MVC_Component/Adding_language_management&amp;diff=588457</id>
		<title>J3.x:Developing an MVC Component/Adding language management</title>
		<link rel="alternate" type="text/html" href="https://docs.sandbox.joomla.org/index.php?title=J3.x:Developing_an_MVC_Component/Adding_language_management&amp;diff=588457"/>
		<updated>2019-01-23T04:44:37Z</updated>

		<summary type="html">&lt;p&gt;Stan31337: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;noinclude&amp;gt;&amp;lt;languages /&amp;gt;&amp;lt;/noinclude&amp;gt;&lt;br /&gt;
{{review}}&lt;br /&gt;
{{:J3.1:Developing an MVC Component/&amp;lt;translate&amp;gt;&amp;lt;!--T:1--&amp;gt;&lt;br /&gt;
en&amp;lt;/translate&amp;gt;}}&lt;br /&gt;
&amp;lt;translate&amp;gt;== Introduction == &amp;lt;!--T:2--&amp;gt;&amp;lt;/translate&amp;gt;&lt;br /&gt;
&amp;lt;translate&amp;gt;&amp;lt;!--T:3--&amp;gt;&lt;br /&gt;
This tutorial is part of the [[S:MyLanguage/J3.2:Developing an MVC Component | Developing an MVC Component for Joomla! 3.2]] tutorial. You are encouraged to read the previous parts of the tutorial before reading this.&amp;lt;/translate&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;translate&amp;gt;&amp;lt;!--T:42--&amp;gt; You can watch a video associated with this step in the tutorial at&amp;lt;/translate&amp;gt; [https://www.youtube.com/watch?v=jRVjozY_XGM &amp;lt;translate&amp;gt;&amp;lt;!--T:43--&amp;gt; Step 8, Adding Language Management&amp;lt;/translate&amp;gt;].&lt;br /&gt;
&lt;br /&gt;
{{#widget:YouTube|id=jRVjozY_XGM}}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;translate&amp;gt;&amp;lt;!--T:4--&amp;gt;&lt;br /&gt;
Joomla! 3.2 manages languages for components in four different situations:&amp;lt;/translate&amp;gt;&lt;br /&gt;
&amp;lt;translate&amp;gt;&amp;lt;!--T:5--&amp;gt;&lt;br /&gt;
* displaying a component in the public site&lt;br /&gt;
* managing a component in the backend&lt;br /&gt;
* managing menus in the backend&lt;br /&gt;
* installing a component&amp;lt;/translate&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;translate&amp;gt;&amp;lt;!--T:6--&amp;gt;&lt;br /&gt;
Joomla! 3.2 uses two different location folder for languages:&amp;lt;/translate&amp;gt;&lt;br /&gt;
&amp;lt;translate&amp;gt;&amp;lt;!--T:7--&amp;gt;&lt;br /&gt;
* one in &amp;lt;tt&amp;gt;administrator/language&amp;lt;/tt&amp;gt; or &amp;lt;tt&amp;gt;language&amp;lt;/tt&amp;gt;&amp;lt;/translate&amp;gt;&lt;br /&gt;
&amp;lt;translate&amp;gt;&amp;lt;!--T:8--&amp;gt;&lt;br /&gt;
* one in the component folder (&amp;lt;tt&amp;gt;administrator/components/*component*/language&amp;lt;/tt&amp;gt; or &amp;lt;tt&amp;gt;components/*component*/language&amp;lt;/tt&amp;gt;)&amp;lt;/translate&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;translate&amp;gt;&amp;lt;!--T:9--&amp;gt;&lt;br /&gt;
It depends how the component is installed.&amp;lt;/translate&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;translate&amp;gt;== Adding language translation in the public site == &amp;lt;!--T:10--&amp;gt;&amp;lt;/translate&amp;gt;&lt;br /&gt;
&amp;lt;translate&amp;gt;&amp;lt;!--T:11--&amp;gt;&lt;br /&gt;
With your favourite file manager and editor, put a file &amp;lt;tt&amp;gt;site/language/en-GB/en-GB.com_helloworld.ini&amp;lt;/tt&amp;gt;. This file will contain translation for the public part. For the moment, this file is empty.&amp;lt;/translate&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span id=&amp;quot;site/language/en-GB/en-GB.com_helloworld.ini&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;tt&amp;gt;site/language/en-GB/en-GB.com_helloworld.ini&amp;lt;/tt&amp;gt;&lt;br /&gt;
&amp;lt;source lang=&amp;quot;ini&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;translate&amp;gt;&amp;lt;!--T:12--&amp;gt;&lt;br /&gt;
For the moment, there are no translations strings in this file.&amp;lt;/translate&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;translate&amp;gt;== Adding language translation when managing the component == &amp;lt;!--T:13--&amp;gt;&amp;lt;/translate&amp;gt;&lt;br /&gt;
&amp;lt;translate&amp;gt;&amp;lt;!--T:14--&amp;gt;&lt;br /&gt;
With your favourite file manager and editor, put a file &amp;lt;tt&amp;gt;admin/language/en-GB/en-GB.com_helloworld.ini&amp;lt;/tt&amp;gt;. This file will contain translation for the backend part.&amp;lt;/translate&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span id=&amp;quot;admin/language/en-GB/en-GB.com_helloworld.ini&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;tt&amp;gt;admin/language/en-GB/en-GB.com_helloworld.ini&amp;lt;/tt&amp;gt;&lt;br /&gt;
&amp;lt;source lang=&amp;quot;ini&amp;quot;&amp;gt;&lt;br /&gt;
; Joomla! Project&lt;br /&gt;
; Copyright (C) 2005 - 2018 Open Source Matters. All rights reserved.&lt;br /&gt;
; License GNU General Public License version 2 or later; see LICENSE.txt, see LICENSE.php&lt;br /&gt;
; Note : All ini files need to be saved as UTF-8&lt;br /&gt;
&lt;br /&gt;
COM_HELLOWORLD_NUM=&amp;quot;#&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_PUBLISHED=&amp;quot;Published&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_HELLOWORLDS_NAME=&amp;quot;Name&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_ID=&amp;quot;Id&amp;quot;&lt;br /&gt;
&lt;br /&gt;
COM_HELLOWORLD_HELLOWORLD_FIELD_GREETING_DESC=&amp;quot;This message will be displayed&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_HELLOWORLD_FIELD_GREETING_LABEL=&amp;quot;Message&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_HELLOWORLD_HEADING_GREETING=&amp;quot;Greeting&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_HELLOWORLD_HEADING_ID=&amp;quot;Id&amp;quot;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;translate&amp;gt;== Adding language translation when managing the menus in the backend == &amp;lt;!--T:15--&amp;gt;&amp;lt;/translate&amp;gt;&lt;br /&gt;
&amp;lt;translate&amp;gt;&amp;lt;!--T:16--&amp;gt;&lt;br /&gt;
With your favourite file manager and editor, put a file &amp;lt;tt&amp;gt;admin/language/en-GB/en-GB.com_helloworld.sys.ini&amp;lt;/tt&amp;gt;. This file will contain translation for the backend part.&amp;lt;/translate&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span id=&amp;quot;admin/language/en-GB/en-GB.com_helloworld.sys.ini&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;tt&amp;gt;admin/language/en-GB/en-GB.com_helloworld.sys.ini&amp;lt;/tt&amp;gt;&lt;br /&gt;
&amp;lt;source lang=&amp;quot;ini&amp;quot;&amp;gt;&lt;br /&gt;
; Joomla! Project&lt;br /&gt;
; Copyright (C) 2005 - 2015 Open Source Matters. All rights reserved.&lt;br /&gt;
; License GNU General Public License version 2 or later; see LICENSE.txt, see LICENSE.php&lt;br /&gt;
; Note : All ini files need to be saved as UTF-8&lt;br /&gt;
&lt;br /&gt;
COM_HELLOWORLD=&amp;quot;Hello World!&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_DESCRIPTION=&amp;quot;This is the Hello World description&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_HELLOWORLD_VIEW_DEFAULT_TITLE=&amp;quot;Hello World&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_HELLOWORLD_VIEW_DEFAULT_DESC=&amp;quot;This view displays a selected message&amp;quot;&lt;br /&gt;
COM_HELLOWORLD_MENU=&amp;quot;Hello World!&amp;quot;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;translate&amp;gt;== Language File Location Options == &amp;lt;!--T:17--&amp;gt;&amp;lt;/translate&amp;gt;&lt;br /&gt;
&amp;lt;translate&amp;gt;&amp;lt;!--T:18--&amp;gt;&lt;br /&gt;
Starting with version 1.7 there are 2 ways to install language files for an extension. One can use one or the other or a combination of both.&amp;lt;/translate&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;translate&amp;gt;&amp;lt;!--T:19--&amp;gt;&lt;br /&gt;
The 1.5 way will install the files in the CORE language folders (&amp;lt;tt&amp;gt;ROOT/administrator/language/&amp;lt;/tt&amp;gt; and &amp;lt;tt&amp;gt;ROOT/language/&amp;lt;/tt&amp;gt;).&lt;br /&gt;
Since version 1.6, include the files in a &amp;quot;language&amp;quot; folder installed at the root of the extension.&amp;lt;/translate&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;translate&amp;gt;&amp;lt;!--T:20--&amp;gt;&lt;br /&gt;
Therefore an extension can include a language folder with a .sys.ini different from the one installed in the Joomla core language folders. (This last one not being included in that language folder but in root or any other folder not installed.)&amp;lt;/translate&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;translate&amp;gt;&amp;lt;!--T:21--&amp;gt;&lt;br /&gt;
This lets us display 2 different descriptions: one from the sys.ini in the &amp;quot;language&amp;quot; folder is used as a message displayed when installation is finished, the other (from the .ini) is used for &amp;quot;normal&amp;quot; operation, that is, when the extension is edited in the back-end. This can be extremely useful when the installation also uses some scripts and requires a different value for the description.&amp;lt;/translate&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{tip|&amp;lt;translate&amp;gt;&amp;lt;!--T:22--&amp;gt;&lt;br /&gt;
The sys.ini file is also used to translate the name of the extensions in some back-end Managers and to provide menu translation for components.&amp;lt;/translate&amp;gt;|title=&amp;lt;translate&amp;gt;&amp;lt;!--T:23--&amp;gt;&lt;br /&gt;
You Should Note!&amp;lt;/translate&amp;gt;}}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;translate&amp;gt;&amp;lt;!--T:24--&amp;gt;&lt;br /&gt;
Therefore, the xml would include since 1.6:&amp;lt;/translate&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;files&amp;gt;&lt;br /&gt;
&amp;lt;[...]&lt;br /&gt;
&amp;lt;folder&amp;gt;language&amp;lt;/folder&amp;gt;  // This folder HAS to include the right subfolders, i.e. language/en-GB/ ... language/fr-FR/&lt;br /&gt;
&amp;lt;filename&amp;gt;whatever&amp;lt;/filename&amp;gt;&lt;br /&gt;
[...]&lt;br /&gt;
&amp;lt;/files&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;administration&amp;gt;&lt;br /&gt;
    &amp;lt;files folder=&amp;quot;admin&amp;quot;&amp;gt;&lt;br /&gt;
        &amp;lt;[...]&lt;br /&gt;
        &amp;lt;folder&amp;gt;language&amp;lt;/folder&amp;gt;&lt;br /&gt;
        &amp;lt;filename&amp;gt;whatever&amp;lt;/filename&amp;gt;&lt;br /&gt;
        &amp;lt;[...]&lt;br /&gt;
    &amp;lt;/files&amp;gt;&lt;br /&gt;
&amp;lt;/administration&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;translate&amp;gt;&amp;lt;!--T:25--&amp;gt;&lt;br /&gt;
and/or then (1.5 way):&amp;lt;/translate&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;languages folder=&amp;quot;joomlacorelanguagefolders&amp;quot;&amp;gt; // If using another language folder for cleanliness. (Any folder name will fit.)&lt;br /&gt;
&amp;lt;language tag=&amp;quot;en-GB&amp;quot;&amp;gt;en-GB/en-GB.whatever.ini&amp;lt;/language&amp;gt; // or&lt;br /&gt;
&amp;lt;language tag=&amp;quot;en-GB&amp;quot;&amp;gt;en-GB.whatever.ini&amp;lt;/language&amp;gt; if no tagged subfolder&lt;br /&gt;
&amp;lt;language tag=&amp;quot;en-GB&amp;quot;&amp;gt;en-GB/en-GB.whatever.sys.ini&amp;lt;/language&amp;gt; // or&lt;br /&gt;
&amp;lt;language tag=&amp;quot;en-GB&amp;quot;&amp;gt;en-GB.whatever.sys.ini&amp;lt;/language&amp;gt; if no tagged subfolder&lt;br /&gt;
&amp;lt;/languages&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;translate&amp;gt;&amp;lt;!--T:26--&amp;gt;&lt;br /&gt;
or simply in ROOT:&amp;lt;/translate&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;languages&amp;gt;&lt;br /&gt;
&amp;lt;language tag=&amp;quot;en-GB&amp;quot;&amp;gt;en-GB.whatever.ini&amp;lt;/language&amp;gt;&lt;br /&gt;
&amp;lt;language tag=&amp;quot;en-GB&amp;quot;&amp;gt;en-GB.whatever.sys.ini&amp;lt;/language&amp;gt;&lt;br /&gt;
&amp;lt;/languages&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;translate&amp;gt;&amp;lt;!--T:27--&amp;gt;&lt;br /&gt;
Language file used by the installation script during the installation of a component(&#039;&#039;the first install&#039;&#039;, not an upgrade) obeys specific rules described in the article, [[S:MyLanguage/Specification of language files|Specification of language files]]. During the first installation, only the language file included in the component folder &amp;lt;code&amp;gt;(/administrator/components/com_helloworld/language)&amp;lt;/code&amp;gt; is used when present. If this file is only provided in the CORE language folder &amp;lt;code&amp;gt;(/administrator/language)&amp;lt;/code&amp;gt;, no translation occurs. This also applies to KEYs used in the manifest file.&amp;lt;/translate&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;translate&amp;gt;&amp;lt;!--T:28--&amp;gt;&lt;br /&gt;
When upgrading or uninstalling the extension (not installing), it is the sys.ini file present in the extension root language folder which will display the result of the installation from the description key/value. Thereafter, if present, the sys.ini as well as the .ini installed in the CORE language folder will have priority over the files present in the root language folder of the extension.&amp;lt;/translate&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{tip|title=&amp;lt;translate&amp;gt;&amp;lt;!--T:29--&amp;gt;&lt;br /&gt;
Advantages of Extension &amp;quot;Language&amp;quot; Folder&amp;lt;/translate&amp;gt;|&amp;lt;translate&amp;gt;&amp;lt;!--T:30--&amp;gt;&lt;br /&gt;
&#039;&#039;One advantage of installing the files in the extension &amp;quot;language&amp;quot; folder is that these &#039;&#039;&#039;are not touched when updating&#039;&#039;&#039; a language pack.&#039;&#039;{{-}}The other advantage is that this folder can include multiple languages (en-GB always, fr-FR, it-IT, etc.) not requiring the user to install the corresponding language pack. This is handy as they are available if, later on, a user installs the corresponding pack.&amp;lt;/translate&amp;gt;}}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;translate&amp;gt;== Packaging the component == &amp;lt;!--T:31--&amp;gt;&amp;lt;/translate&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;translate&amp;gt;&amp;lt;!--T:32--&amp;gt;&lt;br /&gt;
Content of your code directory&amp;lt;/translate&amp;gt;&lt;br /&gt;
* &#039;&#039;[[#helloworld.xml|helloworld.xml]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Adding_a_view_to_the_site_part#site/helloworld.php|site/helloworld.php]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Developing_a_Basic_Component#index.html|site/index.html]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Adding_a_view_to_the_site_part#site/controller.php|site/controller.php]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Developing_a_Basic_Component#index.html|site/views/index.html]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Developing_a_Basic_Component#index.html|site/views/helloworld/index.html]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Adding_a_view_to_the_site_part#site/views/helloworld/view.html.php|site/views/helloworld/view.html.php]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Developing_a_Basic_Component#index.html|site/views/helloworld/tmpl/index.html]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Using_the_database#site/views/helloworld/tmpl/default.xml|site/views/helloworld/tmpl/default.xml]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Adding_a_view_to_the_site_part#site/views/helloworld/tmpl/default.php|site/views/helloworld/tmpl/default.php]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Developing_a_Basic_Component#index.html|site/models/index.html]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Using_the_database#site/models/helloworld.php|site/models/helloworld.php]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Developing_a_Basic_Component#index.html|site/language/index.html]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Developing_a_Basic_Component#index.html|site/language/en-GB/index.html]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[#site/language/en-GB/en-GB.com_helloworld.ini|site/language/en-GB/en-GB.com_helloworld.ini]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Developing_a_Basic_Component#index.html|admin/index.html]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Basic_backend#admin/helloworld.php|admin/helloworld.php]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Basic_backend#admin/controller.php|admin/controller.php]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Developing_a_Basic_Component#index.html|admin/sql/index.html]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Using_the_database#admin/sql/install.mysql.utf8.sql|admin/sql/install.mysql.utf8.sql]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Using_the_database#admin/sql/uninstall.mysql.utf8.sql|admin/sql/uninstall.mysql.utf8.sql]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Developing_a_Basic_Component#index.html|admin/sql/updates/index.html]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Developing_a_Basic_Component#index.html|admin/sql/updates/mysql/index.html]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Developing_a_Basic_Component#admin/sql/updates/mysql/0.0.1.sql|admin/sql/updates/mysql/0.0.1.sql]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Using_the_database#admin/sql/install.mysql.utf8.sql|admin/sql/updates/mysql/0.0.6.sql]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Developing_a_Basic_Component#index.html|admin/models/index.html]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Developing_a_Basic_Component#index.html|admin/models/fields/index.html]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Using_the_database#admin/models/fields/helloworld.php|admin/models/fields/helloworld.php]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Basic_backend#admin/models/helloworlds.php|admin/models/helloworlds.php]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Developing_a_Basic_Component#index.html|admin/views/index.html]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Developing_a_Basic_Component#index.html|admin/views/helloworlds/index.html]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Basic_backend#admin/views/helloworlds/view.html.php|admin/views/helloworlds/view.html.php]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Developing_a_Basic_Component#index.html|admin/views/helloworlds/tmpl/index.html]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Basic_backend#admin/views/helloworlds/tmpl/default.php|admin/views/helloworlds/tmpl/default.php]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Developing_a_Basic_Component#index.html|admin/tables/index.html]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Using_the_database#admin/tables/helloworld.php|admin/tables/helloworld.php]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Developing_a_Basic_Component#index.html|admin/language/index.html]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[#admin/language/en-GB/en-GB.com_helloworld.ini|admin/language/en-GB/en-GB.com_helloworld.ini]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[#admin/language/en-GB/en-GB.com_helloworld.sys.ini|admin/language/en-GB/en-GB.com_helloworld.sys.ini]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Developing_a_Basic_Component#index.html|admin/language/en-GB/index.html]]&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;translate&amp;gt;&amp;lt;!--T:33--&amp;gt;&lt;br /&gt;
Create a compressed file of this directory or directly download the [https://github.com/scionescire/Joomla-3.2-Hello-World-Component/archive/step-8-adding-language-management.zip archive] and install it using the extension manager of Joomla. You can add a menu item of this component using the menu manager in the backend.&amp;lt;/translate&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span id=&amp;quot;helloworld.xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;tt&amp;gt;helloworld.xml&amp;lt;/tt&amp;gt;&lt;br /&gt;
&amp;lt;source lang=&amp;quot;xml&amp;quot; highlight=&amp;quot;4,13,15,45-47,51,70-73&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;?xml version=&amp;quot;1.0&amp;quot; encoding=&amp;quot;utf-8&amp;quot;?&amp;gt;&lt;br /&gt;
&amp;lt;extension type=&amp;quot;component&amp;quot; version=&amp;quot;3.0&amp;quot; method=&amp;quot;upgrade&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
	&amp;lt;name&amp;gt;COM_HELLOWORLD&amp;lt;/name&amp;gt;&lt;br /&gt;
	&amp;lt;!-- The following elements are optional and free of formatting constraints --&amp;gt;&lt;br /&gt;
	&amp;lt;creationDate&amp;gt;January 2018&amp;lt;/creationDate&amp;gt;&lt;br /&gt;
	&amp;lt;author&amp;gt;John Doe&amp;lt;/author&amp;gt;&lt;br /&gt;
	&amp;lt;authorEmail&amp;gt;john.doe@example.org&amp;lt;/authorEmail&amp;gt;&lt;br /&gt;
	&amp;lt;authorUrl&amp;gt;http://www.example.org&amp;lt;/authorUrl&amp;gt;&lt;br /&gt;
	&amp;lt;copyright&amp;gt;Copyright Info&amp;lt;/copyright&amp;gt;&lt;br /&gt;
	&amp;lt;license&amp;gt;License Info&amp;lt;/license&amp;gt;&lt;br /&gt;
	&amp;lt;!--  The version string is recorded in the components table --&amp;gt;&lt;br /&gt;
	&amp;lt;version&amp;gt;0.0.8&amp;lt;/version&amp;gt;&lt;br /&gt;
	&amp;lt;!-- The description is optional and defaults to the name --&amp;gt;&lt;br /&gt;
	&amp;lt;description&amp;gt;COM_HELLOWORLD_DESCRIPTION&amp;lt;/description&amp;gt;&lt;br /&gt;
&lt;br /&gt;
	&amp;lt;install&amp;gt; &amp;lt;!-- Runs on install --&amp;gt;&lt;br /&gt;
		&amp;lt;sql&amp;gt;&lt;br /&gt;
			&amp;lt;file driver=&amp;quot;mysql&amp;quot; charset=&amp;quot;utf8&amp;quot;&amp;gt;sql/install.mysql.utf8.sql&amp;lt;/file&amp;gt;&lt;br /&gt;
		&amp;lt;/sql&amp;gt;&lt;br /&gt;
	&amp;lt;/install&amp;gt;&lt;br /&gt;
	&amp;lt;uninstall&amp;gt; &amp;lt;!-- Runs on uninstall --&amp;gt;&lt;br /&gt;
		&amp;lt;sql&amp;gt;&lt;br /&gt;
			&amp;lt;file driver=&amp;quot;mysql&amp;quot; charset=&amp;quot;utf8&amp;quot;&amp;gt;sql/uninstall.mysql.utf8.sql&amp;lt;/file&amp;gt;&lt;br /&gt;
		&amp;lt;/sql&amp;gt;&lt;br /&gt;
	&amp;lt;/uninstall&amp;gt;&lt;br /&gt;
	&amp;lt;update&amp;gt; &amp;lt;!-- Runs on update; New since J2.5 --&amp;gt;&lt;br /&gt;
		&amp;lt;schemas&amp;gt;&lt;br /&gt;
			&amp;lt;schemapath type=&amp;quot;mysql&amp;quot;&amp;gt;sql/updates/mysql&amp;lt;/schemapath&amp;gt;&lt;br /&gt;
		&amp;lt;/schemas&amp;gt;&lt;br /&gt;
	&amp;lt;/update&amp;gt;&lt;br /&gt;
&lt;br /&gt;
	&amp;lt;!-- Site Main File Copy Section --&amp;gt;&lt;br /&gt;
	&amp;lt;!-- Note the folder attribute: This attribute describes the folder&lt;br /&gt;
		to copy FROM in the package to install therefore files copied&lt;br /&gt;
		in this section are copied from /site/ in the package --&amp;gt;&lt;br /&gt;
	&amp;lt;files folder=&amp;quot;site&amp;quot;&amp;gt;&lt;br /&gt;
		&amp;lt;filename&amp;gt;index.html&amp;lt;/filename&amp;gt;&lt;br /&gt;
		&amp;lt;filename&amp;gt;helloworld.php&amp;lt;/filename&amp;gt;&lt;br /&gt;
		&amp;lt;filename&amp;gt;controller.php&amp;lt;/filename&amp;gt;&lt;br /&gt;
		&amp;lt;folder&amp;gt;views&amp;lt;/folder&amp;gt;&lt;br /&gt;
		&amp;lt;folder&amp;gt;models&amp;lt;/folder&amp;gt;&lt;br /&gt;
	&amp;lt;/files&amp;gt;&lt;br /&gt;
&lt;br /&gt;
	&amp;lt;languages folder=&amp;quot;site/language&amp;quot;&amp;gt;&lt;br /&gt;
		&amp;lt;language tag=&amp;quot;en-GB&amp;quot;&amp;gt;en-GB/en-GB.com_helloworld.ini&amp;lt;/language&amp;gt;&lt;br /&gt;
	&amp;lt;/languages&amp;gt;&lt;br /&gt;
&lt;br /&gt;
	&amp;lt;administration&amp;gt;&lt;br /&gt;
		&amp;lt;!-- Administration Menu Section --&amp;gt;&lt;br /&gt;
		&amp;lt;menu link=&#039;index.php?option=com_helloworld&#039;&amp;gt;COM_HELLOWORLD_MENU&amp;lt;/menu&amp;gt;&lt;br /&gt;
		&amp;lt;!-- Administration Main File Copy Section --&amp;gt;&lt;br /&gt;
		&amp;lt;!-- Note the folder attribute: This attribute describes the folder&lt;br /&gt;
			to copy FROM in the package to install therefore files copied&lt;br /&gt;
			in this section are copied from /admin/ in the package --&amp;gt;&lt;br /&gt;
		&amp;lt;files folder=&amp;quot;admin&amp;quot;&amp;gt;&lt;br /&gt;
			&amp;lt;!-- Admin Main File Copy Section --&amp;gt;&lt;br /&gt;
			&amp;lt;filename&amp;gt;index.html&amp;lt;/filename&amp;gt;&lt;br /&gt;
			&amp;lt;filename&amp;gt;helloworld.php&amp;lt;/filename&amp;gt;&lt;br /&gt;
			&amp;lt;filename&amp;gt;controller.php&amp;lt;/filename&amp;gt;&lt;br /&gt;
			&amp;lt;!-- SQL files section --&amp;gt;&lt;br /&gt;
			&amp;lt;folder&amp;gt;sql&amp;lt;/folder&amp;gt;&lt;br /&gt;
			&amp;lt;!-- tables files section --&amp;gt;&lt;br /&gt;
			&amp;lt;folder&amp;gt;tables&amp;lt;/folder&amp;gt;&lt;br /&gt;
			&amp;lt;!-- models files section --&amp;gt;&lt;br /&gt;
			&amp;lt;folder&amp;gt;models&amp;lt;/folder&amp;gt;&lt;br /&gt;
			&amp;lt;!-- views files section --&amp;gt;&lt;br /&gt;
			&amp;lt;folder&amp;gt;views&amp;lt;/folder&amp;gt;&lt;br /&gt;
		&amp;lt;/files&amp;gt;&lt;br /&gt;
		&amp;lt;languages folder=&amp;quot;admin/language&amp;quot;&amp;gt;&lt;br /&gt;
			&amp;lt;language tag=&amp;quot;en-GB&amp;quot;&amp;gt;en-GB/en-GB.com_helloworld.ini&amp;lt;/language&amp;gt;&lt;br /&gt;
			&amp;lt;language tag=&amp;quot;en-GB&amp;quot;&amp;gt;en-GB/en-GB.com_helloworld.sys.ini&amp;lt;/language&amp;gt;&lt;br /&gt;
		&amp;lt;/languages&amp;gt;&lt;br /&gt;
	&amp;lt;/administration&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/extension&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;translate&amp;gt;&amp;lt;!--T:34--&amp;gt;&lt;br /&gt;
In this &amp;lt;tt&amp;gt;helloworld.xml&amp;lt;/tt&amp;gt; file, languages are installed in:&amp;lt;/translate&amp;gt;&lt;br /&gt;
&amp;lt;translate&amp;gt;&amp;lt;!--T:35--&amp;gt;&lt;br /&gt;
* &amp;lt;tt&amp;gt;administrator/language&amp;lt;/tt&amp;gt; for the admin part (look at the xml languages tag).&amp;lt;/translate&amp;gt;&lt;br /&gt;
&amp;lt;translate&amp;gt;&amp;lt;!--T:36--&amp;gt;&lt;br /&gt;
* &amp;lt;tt&amp;gt;components/com_helloworld/language&amp;lt;/tt&amp;gt; for the site part (there are no xml languages tag in the site part of the xml description file, but the language folder is included).&amp;lt;/translate&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{notice|&amp;lt;translate&amp;gt;&amp;lt;!--T:37--&amp;gt;&lt;br /&gt;
Please create a pull request or issue at https://github.com/joomla/Joomla-3.2-Hello-World-Component for any code descprepancies or if editing any of the source code on this page.&amp;lt;/translate&amp;gt;}}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;translate&amp;gt;== Contributors == &amp;lt;!--T:38--&amp;gt;&amp;lt;/translate&amp;gt;&lt;br /&gt;
*[[User:cdemko|Christophe Demko]]&lt;br /&gt;
*[[User:oaksu|Ozgur Aksu]]&lt;br /&gt;
*[[User:Scionescire|Scionescire]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;row&amp;quot;&amp;gt; &lt;br /&gt;
&amp;lt;div class=&amp;quot;large-6 columns&amp;quot;&amp;gt;{{Basic button|&amp;lt;translate&amp;gt;&amp;lt;!--T:39--&amp;gt;&lt;br /&gt;
S:MyLanguage/J3.x:Developing_an_MVC_Component/Basic backend|Prev: Basic backend&amp;lt;/translate&amp;gt;|class=expand success}}&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;div class=&amp;quot;large-6 columns&amp;quot;&amp;gt;{{Basic button|&amp;lt;translate&amp;gt;&amp;lt;!--T:40--&amp;gt;&lt;br /&gt;
S:MyLanguage/J3.x:Developing_an_MVC_Component/Adding backend actions|Next: Adding backend actions&amp;lt;/translate&amp;gt;|class=expand}}&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
__NOTOC__&lt;br /&gt;
&lt;br /&gt;
[[Category:Joomla! 3.x{{#translation:}}]]&lt;br /&gt;
[[Category:Joomla! 3.0{{#translation:}}]]&lt;br /&gt;
[[Category:Joomla! 3.1{{#translation:}}]]&lt;br /&gt;
[[Category:Joomla! 3.2{{#translation:}}]]&lt;br /&gt;
[[Category:Joomla! 3.3{{#translation:}}]]&lt;br /&gt;
[[Category:Joomla! 3.4{{#translation:}}]]&lt;br /&gt;
[[Category:Beginner Development{{#translation:}}]]&lt;br /&gt;
[[Category:Component Development{{#translation:}}]]&lt;br /&gt;
[[Category:Tutorials{{#translation:}}]]&lt;br /&gt;
[[Category:Tutorials in a Series{{#translation:}}]]&lt;br /&gt;
&amp;lt;/noinclude&amp;gt;&lt;/div&gt;</summary>
		<author><name>Stan31337</name></author>
	</entry>
	<entry>
		<id>https://docs.sandbox.joomla.org/index.php?title=J3.x:Developing_an_MVC_Component/Basic_backend&amp;diff=588456</id>
		<title>J3.x:Developing an MVC Component/Basic backend</title>
		<link rel="alternate" type="text/html" href="https://docs.sandbox.joomla.org/index.php?title=J3.x:Developing_an_MVC_Component/Basic_backend&amp;diff=588456"/>
		<updated>2019-01-23T04:15:29Z</updated>

		<summary type="html">&lt;p&gt;Stan31337: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;noinclude&amp;gt;&amp;lt;languages /&amp;gt;&amp;lt;/noinclude&amp;gt;&lt;br /&gt;
{{:J3.1:Developing an MVC Component/&amp;lt;translate&amp;gt;&amp;lt;!--T:1--&amp;gt;&lt;br /&gt;
en&amp;lt;/translate&amp;gt;}}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;translate&amp;gt;== Introduction == &amp;lt;!--T:2--&amp;gt;&amp;lt;/translate&amp;gt;&lt;br /&gt;
&amp;lt;translate&amp;gt;&amp;lt;!--T:3--&amp;gt;&lt;br /&gt;
This tutorial is part of the [[S:MyLanguage/J3.2:Developing an MVC Component | Developing an MVC Component for Joomla! 3.2]] tutorial. You are encouraged to read the previous parts of the tutorial before reading this.&amp;lt;/translate&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;translate&amp;gt;&amp;lt;!--T:31--&amp;gt; There are 2 videos associated with this step in the tutorial, covering [https://www.youtube.com/watch?v=lUEqly3EIPY MVC Structure and Pagination], and [https://www.youtube.com/watch?v=Qnd1z5umj0Y HTML elements and Javascript code].&amp;lt;/translate&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{#widget:YouTube|id=lUEqly3EIPY}}&lt;br /&gt;
&lt;br /&gt;
{{#widget:YouTube|id=Qnd1z5umj0Y}}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;translate&amp;gt;== Basic backend == &amp;lt;!--T:4--&amp;gt;&amp;lt;/translate&amp;gt;&lt;br /&gt;
&amp;lt;translate&amp;gt;&amp;lt;!--T:5--&amp;gt;&lt;br /&gt;
Designing the backend interface leads us to create at least a Model-View-Controller triptych. We have to modify the administrator entry point of our component, the &amp;lt;tt&amp;gt;admin/helloworld.php&amp;lt;/tt&amp;gt; file.&amp;lt;/translate&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span id=&amp;quot;admin/helloworld.php&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;tt&amp;gt;&#039;&#039;&#039;admin/helloworld.php&#039;&#039;&#039;&amp;lt;/tt&amp;gt;&lt;br /&gt;
&amp;lt;source lang=&amp;quot;php&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;?php&lt;br /&gt;
/**&lt;br /&gt;
 * @package     Joomla.Administrator&lt;br /&gt;
 * @subpackage  com_helloworld&lt;br /&gt;
 *&lt;br /&gt;
 * @copyright   Copyright (C) 2005 - 2018 Open Source Matters, Inc. All rights reserved.&lt;br /&gt;
 * @license     GNU General Public License version 2 or later; see LICENSE.txt&lt;br /&gt;
 */&lt;br /&gt;
&lt;br /&gt;
// No direct access to this file&lt;br /&gt;
defined(&#039;_JEXEC&#039;) or die(&#039;Restricted access&#039;);&lt;br /&gt;
&lt;br /&gt;
// Get an instance of the controller prefixed by HelloWorld&lt;br /&gt;
$controller = JControllerLegacy::getInstance(&#039;HelloWorld&#039;);&lt;br /&gt;
&lt;br /&gt;
// Perform the Request task&lt;br /&gt;
$controller-&amp;gt;execute(JFactory::getApplication()-&amp;gt;input-&amp;gt;get(&#039;task&#039;));&lt;br /&gt;
&lt;br /&gt;
// Redirect if set by the controller&lt;br /&gt;
$controller-&amp;gt;redirect();&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;translate&amp;gt;== Create the general controller == &amp;lt;!--T:30--&amp;gt;&lt;br /&gt;
The entry point now gets an instance of a &#039;&#039;HelloWorld&#039;&#039; prefixed controller. Let&#039;s create a basic controller for the administrator part:&amp;lt;/translate&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span id=&amp;quot;admin/controller.php&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;tt&amp;gt;&#039;&#039;&#039;admin/controller.php&#039;&#039;&#039;&amp;lt;/tt&amp;gt;&lt;br /&gt;
&amp;lt;source lang=&amp;quot;php&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;?php&lt;br /&gt;
/**&lt;br /&gt;
 * @package     Joomla.Administrator&lt;br /&gt;
 * @subpackage  com_helloworld&lt;br /&gt;
 *&lt;br /&gt;
 * @copyright   Copyright (C) 2005 - 2018 Open Source Matters, Inc. All rights reserved.&lt;br /&gt;
 * @license     GNU General Public License version 2 or later; see LICENSE.txt&lt;br /&gt;
 */&lt;br /&gt;
&lt;br /&gt;
// No direct access to this file&lt;br /&gt;
defined(&#039;_JEXEC&#039;) or die(&#039;Restricted access&#039;);&lt;br /&gt;
&lt;br /&gt;
/**&lt;br /&gt;
 * General Controller of HelloWorld component&lt;br /&gt;
 *&lt;br /&gt;
 * @package     Joomla.Administrator&lt;br /&gt;
 * @subpackage  com_helloworld&lt;br /&gt;
 * @since       0.0.7&lt;br /&gt;
 */&lt;br /&gt;
class HelloWorldController extends JControllerLegacy&lt;br /&gt;
{&lt;br /&gt;
	/**&lt;br /&gt;
	 * The default view for the display method.&lt;br /&gt;
	 *&lt;br /&gt;
	 * @var string&lt;br /&gt;
	 * @since 12.2&lt;br /&gt;
	 */&lt;br /&gt;
	protected $default_view = &#039;helloworlds&#039;;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;translate&amp;gt;&amp;lt;!--T:6--&amp;gt;&lt;br /&gt;
This controller will display the &#039;HelloWorlds&#039; view by default.&amp;lt;/translate&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;translate&amp;gt;== Create the view == &amp;lt;!--T:7--&amp;gt;&amp;lt;/translate&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;translate&amp;gt;&amp;lt;!--T:8--&amp;gt;&lt;br /&gt;
With your favourite file manager and editor, create a file &amp;lt;tt&amp;gt;admin/views/helloworlds/view.html.php&amp;lt;/tt&amp;gt; containing:&amp;lt;/translate&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span id=&amp;quot;admin/views/helloworlds/view.html.php&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;tt&amp;gt;&#039;&#039;&#039;admin/views/helloworlds/view.html.php&#039;&#039;&#039;&amp;lt;/tt&amp;gt;&lt;br /&gt;
&amp;lt;source lang=&amp;quot;php&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;?php&lt;br /&gt;
/**&lt;br /&gt;
 * @package     Joomla.Administrator&lt;br /&gt;
 * @subpackage  com_helloworld&lt;br /&gt;
 *&lt;br /&gt;
 * @copyright   Copyright (C) 2005 - 2018 Open Source Matters, Inc. All rights reserved.&lt;br /&gt;
 * @license     GNU General Public License version 2 or later; see LICENSE.txt&lt;br /&gt;
 */&lt;br /&gt;
&lt;br /&gt;
// No direct access to this file&lt;br /&gt;
defined(&#039;_JEXEC&#039;) or die(&#039;Restricted access&#039;);&lt;br /&gt;
&lt;br /&gt;
/**&lt;br /&gt;
 * HelloWorlds View&lt;br /&gt;
 *&lt;br /&gt;
 * @since  0.0.1&lt;br /&gt;
 */&lt;br /&gt;
class HelloWorldViewHelloWorlds extends JViewLegacy&lt;br /&gt;
{&lt;br /&gt;
	/**&lt;br /&gt;
	 * Display the Hello World view&lt;br /&gt;
	 *&lt;br /&gt;
	 * @param   string  $tpl  The name of the template file to parse; automatically searches through the template paths.&lt;br /&gt;
	 *&lt;br /&gt;
	 * @return  void&lt;br /&gt;
	 */&lt;br /&gt;
	function display($tpl = null)&lt;br /&gt;
	{&lt;br /&gt;
		// Get data from the model&lt;br /&gt;
		$this-&amp;gt;items		= $this-&amp;gt;get(&#039;Items&#039;);&lt;br /&gt;
		$this-&amp;gt;pagination	= $this-&amp;gt;get(&#039;Pagination&#039;);&lt;br /&gt;
&lt;br /&gt;
		// Check for errors.&lt;br /&gt;
		if (count($errors = $this-&amp;gt;get(&#039;Errors&#039;)))&lt;br /&gt;
		{&lt;br /&gt;
			JError::raiseError(500, implode(&#039;&amp;lt;br /&amp;gt;&#039;, $errors));&lt;br /&gt;
&lt;br /&gt;
			return false;&lt;br /&gt;
		}&lt;br /&gt;
&lt;br /&gt;
		// Display the template&lt;br /&gt;
		parent::display($tpl);&lt;br /&gt;
	}&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;translate&amp;gt;&amp;lt;!--T:9--&amp;gt;&lt;br /&gt;
In Joomla, views display data using layout. With your favourite file manager and editor, put a file &amp;lt;tt&amp;gt;admin/views/helloworlds/tmpl/default.php&amp;lt;/tt&amp;gt; containing&amp;lt;/translate&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span id=&amp;quot;admin/views/helloworlds/tmpl/default.php&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;tt&amp;gt;&#039;&#039;&#039;admin/views/helloworlds/tmpl/default.php&#039;&#039;&#039;&amp;lt;/tt&amp;gt;&lt;br /&gt;
&amp;lt;source lang=&amp;quot;php&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;?php&lt;br /&gt;
/**&lt;br /&gt;
 * @package     Joomla.Administrator&lt;br /&gt;
 * @subpackage  com_helloworld&lt;br /&gt;
 *&lt;br /&gt;
 * @copyright   Copyright (C) 2005 - 2018 Open Source Matters, Inc. All rights reserved.&lt;br /&gt;
 * @license     GNU General Public License version 2 or later; see LICENSE.txt&lt;br /&gt;
 */&lt;br /&gt;
&lt;br /&gt;
// No direct access to this file&lt;br /&gt;
defined(&#039;_JEXEC&#039;) or die(&#039;Restricted Access&#039;);&lt;br /&gt;
?&amp;gt;&lt;br /&gt;
&amp;lt;form action=&amp;quot;index.php?option=com_helloworld&amp;amp;view=helloworlds&amp;quot; method=&amp;quot;post&amp;quot; id=&amp;quot;adminForm&amp;quot; name=&amp;quot;adminForm&amp;quot;&amp;gt;&lt;br /&gt;
	&amp;lt;table class=&amp;quot;table table-striped table-hover&amp;quot;&amp;gt;&lt;br /&gt;
		&amp;lt;thead&amp;gt;&lt;br /&gt;
		&amp;lt;tr&amp;gt;&lt;br /&gt;
			&amp;lt;th width=&amp;quot;1%&amp;quot;&amp;gt;&amp;lt;?php echo JText::_(&#039;COM_HELLOWORLD_NUM&#039;); ?&amp;gt;&amp;lt;/th&amp;gt;&lt;br /&gt;
			&amp;lt;th width=&amp;quot;2%&amp;quot;&amp;gt;&lt;br /&gt;
				&amp;lt;?php echo JHtml::_(&#039;grid.checkall&#039;); ?&amp;gt;&lt;br /&gt;
			&amp;lt;/th&amp;gt;&lt;br /&gt;
			&amp;lt;th width=&amp;quot;90%&amp;quot;&amp;gt;&lt;br /&gt;
				&amp;lt;?php echo JText::_(&#039;COM_HELLOWORLD_HELLOWORLDS_NAME&#039;) ;?&amp;gt;&lt;br /&gt;
			&amp;lt;/th&amp;gt;&lt;br /&gt;
			&amp;lt;th width=&amp;quot;5%&amp;quot;&amp;gt;&lt;br /&gt;
				&amp;lt;?php echo JText::_(&#039;COM_HELLOWORLD_PUBLISHED&#039;); ?&amp;gt;&lt;br /&gt;
			&amp;lt;/th&amp;gt;&lt;br /&gt;
			&amp;lt;th width=&amp;quot;2%&amp;quot;&amp;gt;&lt;br /&gt;
				&amp;lt;?php echo JText::_(&#039;COM_HELLOWORLD_ID&#039;); ?&amp;gt;&lt;br /&gt;
			&amp;lt;/th&amp;gt;&lt;br /&gt;
		&amp;lt;/tr&amp;gt;&lt;br /&gt;
		&amp;lt;/thead&amp;gt;&lt;br /&gt;
		&amp;lt;tfoot&amp;gt;&lt;br /&gt;
			&amp;lt;tr&amp;gt;&lt;br /&gt;
				&amp;lt;td colspan=&amp;quot;5&amp;quot;&amp;gt;&lt;br /&gt;
					&amp;lt;?php echo $this-&amp;gt;pagination-&amp;gt;getListFooter(); ?&amp;gt;&lt;br /&gt;
				&amp;lt;/td&amp;gt;&lt;br /&gt;
			&amp;lt;/tr&amp;gt;&lt;br /&gt;
		&amp;lt;/tfoot&amp;gt;&lt;br /&gt;
		&amp;lt;tbody&amp;gt;&lt;br /&gt;
			&amp;lt;?php if (!empty($this-&amp;gt;items)) : ?&amp;gt;&lt;br /&gt;
				&amp;lt;?php foreach ($this-&amp;gt;items as $i =&amp;gt; $row) : ?&amp;gt;&lt;br /&gt;
&lt;br /&gt;
					&amp;lt;tr&amp;gt;&lt;br /&gt;
						&amp;lt;td&amp;gt;&lt;br /&gt;
							&amp;lt;?php echo $this-&amp;gt;pagination-&amp;gt;getRowOffset($i); ?&amp;gt;&lt;br /&gt;
						&amp;lt;/td&amp;gt;&lt;br /&gt;
						&amp;lt;td&amp;gt;&lt;br /&gt;
							&amp;lt;?php echo JHtml::_(&#039;grid.id&#039;, $i, $row-&amp;gt;id); ?&amp;gt;&lt;br /&gt;
						&amp;lt;/td&amp;gt;&lt;br /&gt;
						&amp;lt;td&amp;gt;&lt;br /&gt;
							&amp;lt;?php echo $row-&amp;gt;greeting; ?&amp;gt;&lt;br /&gt;
						&amp;lt;/td&amp;gt;&lt;br /&gt;
						&amp;lt;td align=&amp;quot;center&amp;quot;&amp;gt;&lt;br /&gt;
							&amp;lt;?php echo JHtml::_(&#039;jgrid.published&#039;, $row-&amp;gt;published, $i, &#039;helloworlds.&#039;, true, &#039;cb&#039;); ?&amp;gt;&lt;br /&gt;
						&amp;lt;/td&amp;gt;&lt;br /&gt;
						&amp;lt;td align=&amp;quot;center&amp;quot;&amp;gt;&lt;br /&gt;
							&amp;lt;?php echo $row-&amp;gt;id; ?&amp;gt;&lt;br /&gt;
						&amp;lt;/td&amp;gt;&lt;br /&gt;
					&amp;lt;/tr&amp;gt;&lt;br /&gt;
				&amp;lt;?php endforeach; ?&amp;gt;&lt;br /&gt;
			&amp;lt;?php endif; ?&amp;gt;&lt;br /&gt;
		&amp;lt;/tbody&amp;gt;&lt;br /&gt;
	&amp;lt;/table&amp;gt;&lt;br /&gt;
&amp;lt;/form&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;translate&amp;gt;&amp;lt;!--T:10--&amp;gt;&lt;br /&gt;
&#039;&#039;COM_HELLOWORLD_HELLOWORLDS_NAME&#039;&#039;, &#039;&#039;COM_HELLOWORLD_ID&#039;&#039; and the others are placeholders which will later be replaced with language-specific text. The [http://api.joomla.org/cms-3/classes/JText.html JText::_] method translates a string into the current language.&amp;lt;/translate&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;translate&amp;gt;&amp;lt;!--T:11--&amp;gt;&lt;br /&gt;
&amp;lt;tt&amp;gt;checkAll&amp;lt;/tt&amp;gt; is a javascript function defined in the Joomla core able to check all items.&amp;lt;/translate&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;translate&amp;gt;&amp;lt;!--T:12--&amp;gt;&lt;br /&gt;
&amp;lt;tt&amp;gt;JHtml::_&amp;lt;/tt&amp;gt; is a helper function able to display several HTML output. In this case, it will display a checkbox for the item.&amp;lt;/translate&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;translate&amp;gt;&amp;lt;!--T:13--&amp;gt;&lt;br /&gt;
&amp;lt;tt&amp;gt;JPagination&amp;lt;/tt&amp;gt; is a Joomla class able to manage and display pagination object.&amp;lt;/translate&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;translate&amp;gt;== Create the model == &amp;lt;!--T:14--&amp;gt;&amp;lt;/translate&amp;gt;&lt;br /&gt;
&amp;lt;translate&amp;gt;&amp;lt;!--T:15--&amp;gt;&lt;br /&gt;
The &#039;&#039;HelloWorlds&#039;&#039; view asks the model for data. In Joomla, there is a class able to manage a list of data: &#039;&#039;JModelList&#039;&#039;. Class &#039;&#039;JModelList&#039;&#039; and inherited classes need only one method:&amp;lt;/translate&amp;gt;&lt;br /&gt;
&amp;lt;translate&amp;gt;&amp;lt;!--T:16--&amp;gt;&lt;br /&gt;
* &#039;&#039;getListQuery&#039;&#039; which constructs an SQL query&amp;lt;/translate&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;translate&amp;gt;&amp;lt;!--T:17--&amp;gt;&lt;br /&gt;
and two states:&amp;lt;/translate&amp;gt;&lt;br /&gt;
&amp;lt;translate&amp;gt;&amp;lt;!--T:18--&amp;gt;&lt;br /&gt;
* &amp;lt;tt&amp;gt;list.start&amp;lt;/tt&amp;gt; for determining the list offset&lt;br /&gt;
* &amp;lt;tt&amp;gt;list.limit&amp;lt;/tt&amp;gt; for determining the list length&amp;lt;/translate&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;translate&amp;gt;&amp;lt;!--T:19--&amp;gt;&lt;br /&gt;
The &amp;lt;tt&amp;gt;getItems&amp;lt;/tt&amp;gt; and &amp;lt;tt&amp;gt;getPagination&amp;lt;/tt&amp;gt; methods are defined in JModelList class. They don&#039;t need to be defined in the &amp;lt;tt&amp;gt;HelloWorldModelHelloWorlds&amp;lt;/tt&amp;gt; class.&amp;lt;/translate&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span id=&amp;quot;admin/models/helloworlds.php&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;tt&amp;gt;&#039;&#039;&#039;admin/models/helloworlds.php&#039;&#039;&#039;&amp;lt;/tt&amp;gt;&lt;br /&gt;
&amp;lt;source lang=&amp;quot;php&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;?php&lt;br /&gt;
/**&lt;br /&gt;
 * @package     Joomla.Administrator&lt;br /&gt;
 * @subpackage  com_helloworld&lt;br /&gt;
 *&lt;br /&gt;
 * @copyright   Copyright (C) 2005 - 2018 Open Source Matters, Inc. All rights reserved.&lt;br /&gt;
 * @license     GNU General Public License version 2 or later; see LICENSE.txt&lt;br /&gt;
 */&lt;br /&gt;
// No direct access to this file&lt;br /&gt;
defined(&#039;_JEXEC&#039;) or die(&#039;Restricted access&#039;);&lt;br /&gt;
&lt;br /&gt;
/**&lt;br /&gt;
 * HelloWorldList Model&lt;br /&gt;
 *&lt;br /&gt;
 * @since  0.0.1&lt;br /&gt;
 */&lt;br /&gt;
class HelloWorldModelHelloWorlds extends JModelList&lt;br /&gt;
{&lt;br /&gt;
	/**&lt;br /&gt;
	 * Method to build an SQL query to load the list data.&lt;br /&gt;
	 *&lt;br /&gt;
	 * @return      string  An SQL query&lt;br /&gt;
	 */&lt;br /&gt;
	protected function getListQuery()&lt;br /&gt;
	{&lt;br /&gt;
		// Initialize variables.&lt;br /&gt;
		$db    = JFactory::getDbo();&lt;br /&gt;
		$query = $db-&amp;gt;getQuery(true);&lt;br /&gt;
&lt;br /&gt;
		// Create the base select statement.&lt;br /&gt;
		$query-&amp;gt;select(&#039;*&#039;)&lt;br /&gt;
                -&amp;gt;from($db-&amp;gt;quoteName(&#039;#__helloworld&#039;));&lt;br /&gt;
&lt;br /&gt;
		return $query;&lt;br /&gt;
	}&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;translate&amp;gt;&amp;lt;!--T:20--&amp;gt;&lt;br /&gt;
The &amp;lt;tt&amp;gt;_populateState&amp;lt;/tt&amp;gt; method is, by default, automatically called when a state is read by the &amp;lt;tt&amp;gt;getState&amp;lt;/tt&amp;gt; method.&amp;lt;/translate&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;translate&amp;gt;== Packaging the component == &amp;lt;!--T:21--&amp;gt;&amp;lt;/translate&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;translate&amp;gt;&amp;lt;!--T:22--&amp;gt;&lt;br /&gt;
Content of your code directory&amp;lt;/translate&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* &#039;&#039;[[#helloworld.xml|helloworld.xml]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Adding_a_view_to_the_site_part#site/helloworld.php|site/helloworld.php]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Developing_a_Basic_Component#index.html|site/index.html]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Adding_a_view_to_the_site_part#site/controller.php|site/controller.php]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Developing_a_Basic_Component#index.html|site/views/index.html]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Developing_a_Basic_Component#index.html|site/views/helloworld/index.html]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Adding_a_view_to_the_site_part#site/views/helloworld/view.html.php|site/views/helloworld/view.html.php]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Developing_a_Basic_Component#index.html|site/views/helloworld/tmpl/index.html]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Using_the_database#site/views/helloworld/tmpl/default.xml|site/views/helloworld/tmpl/default.xml]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Adding_a_view_to_the_site_part#site/views/helloworld/tmpl/default.php|site/views/helloworld/tmpl/default.php]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Developing_a_Basic_Component#index.html|site/models/index.html]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Using_the_database#site/models/helloworld.php|site/models/helloworld.php]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Developing_a_Basic_Component#index.html|admin/index.html]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[#admin/helloworld.php|admin/helloworld.php]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[#admin/controller.php|admin/controller.php]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Developing_a_Basic_Component#index.html|admin/sql/index.html]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Using_the_database#admin/sql/install.mysql.utf8.sql|admin/sql/install.mysql.utf8.sql]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Using_the_database#admin/sql/uninstall.mysql.utf8.sql|admin/sql/uninstall.mysql.utf8.sql]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Developing_a_Basic_Component#index.html|admin/sql/updates/index.html]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Developing_a_Basic_Component#index.html|admin/sql/updates/mysql/index.html]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Developing_a_Basic_Component#admin/sql/updates/mysql/0.0.1.sql|admin/sql/updates/mysql/0.0.1.sql]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Using_the_database#admin/sql/install.mysql.utf8.sql|admin/sql/updates/mysql/0.0.6.sql]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Developing_a_Basic_Component#index.html|admin/models/index.html]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Developing_a_Basic_Component#index.html|admin/models/fields/index.html]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Using_the_database#admin/models/fields/helloworld.php|admin/models/fields/helloworld.php]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[#admin/models/helloworlds.php|admin/models/helloworlds.php]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Developing_a_Basic_Component#index.html|admin/views/index.html]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Developing_a_Basic_Component#index.html|admin/views/helloworlds/index.html]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[#admin/views/helloworlds/view.html.php|admin/views/helloworlds/view.html.php]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Developing_a_Basic_Component#index.html|admin/views/helloworlds/tmpl/index.html]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[#admin/views/helloworlds/tmpl/default.php|admin/views/helloworlds/tmpl/default.php]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Developing_a_Basic_Component#index.html|admin/tables/index.html]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Using_the_database#admin/tables/helloworld.php|admin/tables/helloworld.php]]&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;translate&amp;gt;&amp;lt;!--T:23--&amp;gt;&lt;br /&gt;
Create a compressed file of this directory or directly download the [https://github.com/scionescire/Joomla-3.2-Hello-World-Component/archive/step-7-basic-backend.zip archive] and install it using the extension manager of Joomla. You can add a menu item of this component using the menu manager in the backend.&amp;lt;/translate&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span id=&amp;quot;helloworld.xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;tt&amp;gt;helloworld.xml&amp;lt;/tt&amp;gt;&lt;br /&gt;
&amp;lt;source lang=&amp;quot;xml&amp;quot; highlight=&amp;quot;13,56,63-64&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;?xml version=&amp;quot;1.0&amp;quot; encoding=&amp;quot;utf-8&amp;quot;?&amp;gt;&lt;br /&gt;
&amp;lt;extension type=&amp;quot;component&amp;quot; version=&amp;quot;3.0&amp;quot; method=&amp;quot;upgrade&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
	&amp;lt;name&amp;gt;Hello World!&amp;lt;/name&amp;gt;&lt;br /&gt;
	&amp;lt;!-- The following elements are optional and free of formatting constraints --&amp;gt;&lt;br /&gt;
	&amp;lt;creationDate&amp;gt;January 2018&amp;lt;/creationDate&amp;gt;&lt;br /&gt;
	&amp;lt;author&amp;gt;John Doe&amp;lt;/author&amp;gt;&lt;br /&gt;
	&amp;lt;authorEmail&amp;gt;john.doe@example.org&amp;lt;/authorEmail&amp;gt;&lt;br /&gt;
	&amp;lt;authorUrl&amp;gt;http://www.example.org&amp;lt;/authorUrl&amp;gt;&lt;br /&gt;
	&amp;lt;copyright&amp;gt;Copyright Info&amp;lt;/copyright&amp;gt;&lt;br /&gt;
	&amp;lt;license&amp;gt;License Info&amp;lt;/license&amp;gt;&lt;br /&gt;
	&amp;lt;!--  The version string is recorded in the components table --&amp;gt;&lt;br /&gt;
	&amp;lt;version&amp;gt;0.0.7&amp;lt;/version&amp;gt;&lt;br /&gt;
	&amp;lt;!-- The description is optional and defaults to the name --&amp;gt;&lt;br /&gt;
	&amp;lt;description&amp;gt;Description of the Hello World component ...&amp;lt;/description&amp;gt;&lt;br /&gt;
&lt;br /&gt;
	&amp;lt;install&amp;gt; &amp;lt;!-- Runs on install --&amp;gt;&lt;br /&gt;
		&amp;lt;sql&amp;gt;&lt;br /&gt;
			&amp;lt;file driver=&amp;quot;mysql&amp;quot; charset=&amp;quot;utf8&amp;quot;&amp;gt;sql/install.mysql.utf8.sql&amp;lt;/file&amp;gt;&lt;br /&gt;
		&amp;lt;/sql&amp;gt;&lt;br /&gt;
	&amp;lt;/install&amp;gt;&lt;br /&gt;
	&amp;lt;uninstall&amp;gt; &amp;lt;!-- Runs on uninstall --&amp;gt;&lt;br /&gt;
		&amp;lt;sql&amp;gt;&lt;br /&gt;
			&amp;lt;file driver=&amp;quot;mysql&amp;quot; charset=&amp;quot;utf8&amp;quot;&amp;gt;sql/uninstall.mysql.utf8.sql&amp;lt;/file&amp;gt;&lt;br /&gt;
		&amp;lt;/sql&amp;gt;&lt;br /&gt;
	&amp;lt;/uninstall&amp;gt;&lt;br /&gt;
	&amp;lt;update&amp;gt; &amp;lt;!-- Runs on update; New since J2.5 --&amp;gt;&lt;br /&gt;
		&amp;lt;schemas&amp;gt;&lt;br /&gt;
			&amp;lt;schemapath type=&amp;quot;mysql&amp;quot;&amp;gt;sql/updates/mysql&amp;lt;/schemapath&amp;gt;&lt;br /&gt;
		&amp;lt;/schemas&amp;gt;&lt;br /&gt;
	&amp;lt;/update&amp;gt;&lt;br /&gt;
&lt;br /&gt;
	&amp;lt;!-- Site Main File Copy Section --&amp;gt;&lt;br /&gt;
	&amp;lt;!-- Note the folder attribute: This attribute describes the folder&lt;br /&gt;
		to copy FROM in the package to install therefore files copied&lt;br /&gt;
		in this section are copied from /site/ in the package --&amp;gt;&lt;br /&gt;
	&amp;lt;files folder=&amp;quot;site&amp;quot;&amp;gt;&lt;br /&gt;
		&amp;lt;filename&amp;gt;index.html&amp;lt;/filename&amp;gt;&lt;br /&gt;
		&amp;lt;filename&amp;gt;helloworld.php&amp;lt;/filename&amp;gt;&lt;br /&gt;
		&amp;lt;filename&amp;gt;controller.php&amp;lt;/filename&amp;gt;&lt;br /&gt;
		&amp;lt;folder&amp;gt;views&amp;lt;/folder&amp;gt;&lt;br /&gt;
		&amp;lt;folder&amp;gt;models&amp;lt;/folder&amp;gt;&lt;br /&gt;
	&amp;lt;/files&amp;gt;&lt;br /&gt;
&lt;br /&gt;
	&amp;lt;administration&amp;gt;&lt;br /&gt;
		&amp;lt;!-- Administration Menu Section --&amp;gt;&lt;br /&gt;
		&amp;lt;menu link=&#039;index.php?option=com_helloworld&#039;&amp;gt;Hello World!&amp;lt;/menu&amp;gt;&lt;br /&gt;
		&amp;lt;!-- Administration Main File Copy Section --&amp;gt;&lt;br /&gt;
		&amp;lt;!-- Note the folder attribute: This attribute describes the folder&lt;br /&gt;
			to copy FROM in the package to install therefore files copied&lt;br /&gt;
			in this section are copied from /admin/ in the package --&amp;gt;&lt;br /&gt;
		&amp;lt;files folder=&amp;quot;admin&amp;quot;&amp;gt;&lt;br /&gt;
			&amp;lt;!-- Admin Main File Copy Section --&amp;gt;&lt;br /&gt;
			&amp;lt;filename&amp;gt;index.html&amp;lt;/filename&amp;gt;&lt;br /&gt;
			&amp;lt;filename&amp;gt;helloworld.php&amp;lt;/filename&amp;gt;&lt;br /&gt;
			&amp;lt;filename&amp;gt;controller.php&amp;lt;/filename&amp;gt;&lt;br /&gt;
			&amp;lt;!-- SQL files section --&amp;gt;&lt;br /&gt;
			&amp;lt;folder&amp;gt;sql&amp;lt;/folder&amp;gt;&lt;br /&gt;
			&amp;lt;!-- tables files section --&amp;gt;&lt;br /&gt;
			&amp;lt;folder&amp;gt;tables&amp;lt;/folder&amp;gt;&lt;br /&gt;
			&amp;lt;!-- models files section --&amp;gt;&lt;br /&gt;
			&amp;lt;folder&amp;gt;models&amp;lt;/folder&amp;gt;&lt;br /&gt;
			&amp;lt;!-- views files section --&amp;gt;&lt;br /&gt;
			&amp;lt;folder&amp;gt;views&amp;lt;/folder&amp;gt;&lt;br /&gt;
		&amp;lt;/files&amp;gt;&lt;br /&gt;
	&amp;lt;/administration&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/extension&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;translate&amp;gt;&amp;lt;!--T:24--&amp;gt;&lt;br /&gt;
Now you can see in your component &#039;&#039;&#039;hello-world&#039;&#039;&#039; an array with two colums, two rows and checkboxes. You can click the checkboxes in order to select the different options you want.&amp;lt;/translate&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{notice|&amp;lt;translate&amp;gt;&amp;lt;!--T:25--&amp;gt;&lt;br /&gt;
Please create a pull request or issue at https://github.com/joomla/Joomla-3.2-Hello-World-Component for any code descprepancies or if editing any of the source code on this page.&amp;lt;/translate&amp;gt;}}&lt;br /&gt;
&lt;br /&gt;
== Contributors ==&lt;br /&gt;
*[[User:Gunjanpatel|Gunjan Patel]]&lt;br /&gt;
*[[User:cdemko|Christophe Demko]]&lt;br /&gt;
*[[User:oaksu|Ozgur Aksu]]&lt;br /&gt;
*[[User:presto|Preston Smith]]&lt;br /&gt;
*[[User:scionescire|Scionescire]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;row&amp;quot;&amp;gt; &lt;br /&gt;
&amp;lt;div class=&amp;quot;large-6 columns&amp;quot;&amp;gt;{{Basic button|&amp;lt;translate&amp;gt;&amp;lt;!--T:26--&amp;gt;&lt;br /&gt;
S:MyLanguage/J3.x:Developing_an_MVC_Component/Using the database|Prev: Using the database&amp;lt;/translate&amp;gt;|class=expand success}}&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;div class=&amp;quot;large-6 columns&amp;quot;&amp;gt;{{Basic button|&amp;lt;translate&amp;gt;&amp;lt;!--T:27--&amp;gt;&lt;br /&gt;
S:MyLanguage/J3.x:Developing_an_MVC_Component/Adding language management|Next: Adding language management&amp;lt;/translate&amp;gt;|class=expand}}&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;noinclude&amp;gt;&lt;br /&gt;
&amp;lt;translate&amp;gt;&lt;br /&gt;
&amp;lt;!--T:29--&amp;gt;&lt;br /&gt;
[[Category:Joomla! 3.x]]&lt;br /&gt;
[[Category:Joomla! 3.0]]&lt;br /&gt;
[[Category:Joomla! 3.1]]&lt;br /&gt;
[[Category:Joomla! 3.2]]&lt;br /&gt;
[[Category:Joomla! 3.3]]&lt;br /&gt;
[[Category:Joomla! 3.4]]&lt;br /&gt;
[[Category:Beginner Development]]&lt;br /&gt;
[[Category:Component Development]]&lt;br /&gt;
[[Category:Tutorials]]&lt;br /&gt;
[[Category:Tutorials in a Series]]&lt;br /&gt;
&amp;lt;/translate&amp;gt;&lt;br /&gt;
&amp;lt;/noinclude&amp;gt;&lt;/div&gt;</summary>
		<author><name>Stan31337</name></author>
	</entry>
	<entry>
		<id>https://docs.sandbox.joomla.org/index.php?title=J3.x:Developing_an_MVC_Component/Using_the_database&amp;diff=588455</id>
		<title>J3.x:Developing an MVC Component/Using the database</title>
		<link rel="alternate" type="text/html" href="https://docs.sandbox.joomla.org/index.php?title=J3.x:Developing_an_MVC_Component/Using_the_database&amp;diff=588455"/>
		<updated>2019-01-23T04:02:50Z</updated>

		<summary type="html">&lt;p&gt;Stan31337: There is no model in backend yet&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;noinclude&amp;gt;&amp;lt;languages /&amp;gt;&amp;lt;/noinclude&amp;gt;&lt;br /&gt;
{{:J3.1:Developing an MVC Component/&amp;lt;translate&amp;gt;&amp;lt;!--T:1--&amp;gt;&lt;br /&gt;
en&amp;lt;/translate&amp;gt;}}&lt;br /&gt;
&amp;lt;translate&amp;gt;== Introduction == &amp;lt;!--T:2--&amp;gt;&amp;lt;/translate&amp;gt;&lt;br /&gt;
&amp;lt;translate&amp;gt;&amp;lt;!--T:3--&amp;gt;&lt;br /&gt;
This tutorial is part of the [[S:MyLanguage/J3.3:Developing an MVC Component | Developing an MVC Component for Joomla! 3.3]] tutorial. You are encouraged to read the previous parts of the tutorial before reading this. Also while doing this part you are also encouraged to read more on database queries, selecting data from a database table and retrieving it in several formats [[S:MyLanguage/Selecting_data_using_JDatabase|here]].&amp;lt;/translate&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;translate&amp;gt;&amp;lt;!--T:32--&amp;gt; There are also 3 videos associated with this step in the tutorial, covering [https://www.youtube.com/watch?v=JWS_3rx8RzY the Database Setup], [https://www.youtube.com/watch?v=rKEHDeFGlGM Displaying the message (using JTable)] and [https://www.youtube.com/watch?v=uEDNyG6pSEk Admin message selection (and JDatabase)].&amp;lt;/translate&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{#widget:YouTube|id=JWS_3rx8RzY}}&lt;br /&gt;
&lt;br /&gt;
{{#widget:YouTube|id=rKEHDeFGlGM}}&lt;br /&gt;
&lt;br /&gt;
{{#widget:YouTube|id=uEDNyG6pSEk}}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;translate&amp;gt;== Using the database == &amp;lt;!--T:4--&amp;gt;&amp;lt;/translate&amp;gt;&lt;br /&gt;
&amp;lt;translate&amp;gt;&amp;lt;!--T:5--&amp;gt;&lt;br /&gt;
Components usually manage their contents using the database. During the install/uninstall/update phase of a component, you can execute SQL queries through the use of SQL text files.&amp;lt;/translate&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;translate&amp;gt;&amp;lt;!--T:6--&amp;gt;&lt;br /&gt;
With your favourite file manager and editor create two files called &amp;lt;tt&amp;gt;admin/sql/install.mysql.utf8.sql&amp;lt;/tt&amp;gt; and &amp;lt;tt&amp;gt;admin/sql/updates/mysql/0.0.6.sql&amp;lt;/tt&amp;gt;. They should both have the same content, as follows:&amp;lt;/translate&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span id=&amp;quot;admin/sql/install.mysql.utf8.sql&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;tt&amp;gt;&#039;&#039;&#039;admin/sql/install.mysql.utf8.sql&#039;&#039;&#039; and &#039;&#039;&#039;admin/sql/updates/mysql/0.0.6.sql&#039;&#039;&#039;&amp;lt;/tt&amp;gt;&lt;br /&gt;
&amp;lt;source lang=&amp;quot;sql&amp;quot;&amp;gt;&lt;br /&gt;
DROP TABLE IF EXISTS `#__helloworld`;&lt;br /&gt;
&lt;br /&gt;
CREATE TABLE `#__helloworld` (&lt;br /&gt;
	`id`       INT(11)     NOT NULL AUTO_INCREMENT,&lt;br /&gt;
	`greeting` VARCHAR(25) NOT NULL,&lt;br /&gt;
	`published` tinyint(4) NOT NULL DEFAULT &#039;1&#039;,&lt;br /&gt;
	PRIMARY KEY (`id`)&lt;br /&gt;
)&lt;br /&gt;
	ENGINE =MyISAM&lt;br /&gt;
	AUTO_INCREMENT =0&lt;br /&gt;
	DEFAULT CHARSET =utf8;&lt;br /&gt;
&lt;br /&gt;
INSERT INTO `#__helloworld` (`greeting`) VALUES&lt;br /&gt;
(&#039;Hello World!&#039;),&lt;br /&gt;
(&#039;Good bye World!&#039;);&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;translate&amp;gt;&amp;lt;!--T:43--&amp;gt; &#039;&#039;&#039;Note.&#039;&#039;&#039; Nowadays Joomla recommends specifying&amp;lt;/translate&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tt&amp;gt;ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 DEFAULT COLLATE=utf8mb4_unicode_ci;&amp;lt;/tt&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;translate&amp;gt;&amp;lt;!--T:44--&amp;gt; instead of what is above. InnoDB is the more modern (and now default) MySQL database engine, replacing MyISAM, and utf8mb4 supports a wider range of character sets including emojis. However, I haven&#039;t tested all the steps in the tutorial with this setting, so if you use it and go through the complete tutorial series and find no problems please consider updating this file and where it occurs in other tutorial steps.&amp;lt;/translate&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;translate&amp;gt;&amp;lt;!--T:45--&amp;gt; Also note that if you look at a Joomla database many of the key database tables have a field called &#039;title&#039; for the sort of information which we&#039;re storing in our &#039;greeting&#039; field. It&#039;s generally advisable to follow the Joomla pattern, and use &#039;title&#039; as the field name, as when we try to use more complex functionality (such as ACL and associations) some of the core Joomla javascript routines we want to reuse expect a &#039;title&#039; field to be present. (Something to consider changing when this tutorial series is next updated).&amp;lt;/translate&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;translate&amp;gt;&amp;lt;!--T:46--&amp;gt;&lt;br /&gt;
Often you will find that the database table has a field to keep track of the published/unpublished state of an item. Using the name &#039;state&#039; within Joomla is not recommended as it can lead to conflicts, instead the name &#039;published&#039; is used.&amp;lt;br /&amp;gt;&lt;br /&gt;
Note: How to tell Joomla to store the value of the published form field into a different name database field? We do this by using the method [[S:MyLanguage/Column alias|setColumnAlias()]] (since 3.4.0).&amp;lt;/translate&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;translate&amp;gt;&amp;lt;!--T:7--&amp;gt;&lt;br /&gt;
The file &amp;lt;tt&amp;gt;install.mysql.utf8.sql&amp;lt;/tt&amp;gt; will be executed when you install this component. The file &#039;&#039;0.0.6.sql&#039;&#039; is executed when you do an update.&amp;lt;/translate&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;translate&amp;gt;&amp;lt;!--T:10--&amp;gt;&lt;br /&gt;
This is the install file. It will be executed if you put an appropriate order in the &amp;lt;tt&amp;gt;helloworld.xml&amp;lt;/tt&amp;gt; file.&amp;lt;/translate&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;translate&amp;gt;&amp;lt;!--T:9--&amp;gt;&lt;br /&gt;
&#039;&#039;&#039;Important Note:&#039;&#039;&#039; When saving the SQL files in utf8, be sure to save them as utf8 NOT BOM or the query will fail with MySQL error #1064.&amp;lt;/translate&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span id=&amp;quot;helloworld.xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;tt&amp;gt;&#039;&#039;&#039;helloworld.xml&#039;&#039;&#039;&amp;lt;/tt&amp;gt;&lt;br /&gt;
&amp;lt;source lang=&amp;quot;xml&amp;quot; highlight=&amp;quot;13,17-26,58-61&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;?xml version=&amp;quot;1.0&amp;quot; encoding=&amp;quot;utf-8&amp;quot;?&amp;gt;&lt;br /&gt;
&amp;lt;extension type=&amp;quot;component&amp;quot; version=&amp;quot;3.0&amp;quot; method=&amp;quot;upgrade&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
	&amp;lt;name&amp;gt;Hello World!&amp;lt;/name&amp;gt;&lt;br /&gt;
	&amp;lt;!-- The following elements are optional and free of formatting constraints --&amp;gt;&lt;br /&gt;
	&amp;lt;creationDate&amp;gt;January 2018&amp;lt;/creationDate&amp;gt;&lt;br /&gt;
	&amp;lt;author&amp;gt;John Doe&amp;lt;/author&amp;gt;&lt;br /&gt;
	&amp;lt;authorEmail&amp;gt;john.doe@example.org&amp;lt;/authorEmail&amp;gt;&lt;br /&gt;
	&amp;lt;authorUrl&amp;gt;http://www.example.org&amp;lt;/authorUrl&amp;gt;&lt;br /&gt;
	&amp;lt;copyright&amp;gt;Copyright Info&amp;lt;/copyright&amp;gt;&lt;br /&gt;
	&amp;lt;license&amp;gt;License Info&amp;lt;/license&amp;gt;&lt;br /&gt;
	&amp;lt;!--  The version string is recorded in the components table --&amp;gt;&lt;br /&gt;
	&amp;lt;version&amp;gt;0.0.6&amp;lt;/version&amp;gt;&lt;br /&gt;
	&amp;lt;!-- The description is optional and defaults to the name --&amp;gt;&lt;br /&gt;
	&amp;lt;description&amp;gt;Description of the Hello World component ...&amp;lt;/description&amp;gt;&lt;br /&gt;
&lt;br /&gt;
	&amp;lt;install&amp;gt; &amp;lt;!-- Runs on install --&amp;gt;&lt;br /&gt;
		&amp;lt;sql&amp;gt;&lt;br /&gt;
			&amp;lt;file driver=&amp;quot;mysql&amp;quot; charset=&amp;quot;utf8&amp;quot;&amp;gt;sql/install.mysql.utf8.sql&amp;lt;/file&amp;gt;&lt;br /&gt;
		&amp;lt;/sql&amp;gt;&lt;br /&gt;
	&amp;lt;/install&amp;gt;&lt;br /&gt;
	&amp;lt;uninstall&amp;gt; &amp;lt;!-- Runs on uninstall --&amp;gt;&lt;br /&gt;
		&amp;lt;sql&amp;gt;&lt;br /&gt;
			&amp;lt;file driver=&amp;quot;mysql&amp;quot; charset=&amp;quot;utf8&amp;quot;&amp;gt;sql/uninstall.mysql.utf8.sql&amp;lt;/file&amp;gt;&lt;br /&gt;
		&amp;lt;/sql&amp;gt;&lt;br /&gt;
	&amp;lt;/uninstall&amp;gt;&lt;br /&gt;
	&amp;lt;update&amp;gt; &amp;lt;!-- Runs on update; New since J2.5 --&amp;gt;&lt;br /&gt;
		&amp;lt;schemas&amp;gt;&lt;br /&gt;
			&amp;lt;schemapath type=&amp;quot;mysql&amp;quot;&amp;gt;sql/updates/mysql&amp;lt;/schemapath&amp;gt;&lt;br /&gt;
		&amp;lt;/schemas&amp;gt;&lt;br /&gt;
	&amp;lt;/update&amp;gt;&lt;br /&gt;
&lt;br /&gt;
	&amp;lt;!-- Site Main File Copy Section --&amp;gt;&lt;br /&gt;
	&amp;lt;!-- Note the folder attribute: This attribute describes the folder&lt;br /&gt;
		to copy FROM in the package to install therefore files copied&lt;br /&gt;
		in this section are copied from /site/ in the package --&amp;gt;&lt;br /&gt;
	&amp;lt;files folder=&amp;quot;site&amp;quot;&amp;gt;&lt;br /&gt;
		&amp;lt;filename&amp;gt;index.html&amp;lt;/filename&amp;gt;&lt;br /&gt;
		&amp;lt;filename&amp;gt;helloworld.php&amp;lt;/filename&amp;gt;&lt;br /&gt;
		&amp;lt;filename&amp;gt;controller.php&amp;lt;/filename&amp;gt;&lt;br /&gt;
		&amp;lt;folder&amp;gt;views&amp;lt;/folder&amp;gt;&lt;br /&gt;
		&amp;lt;folder&amp;gt;models&amp;lt;/folder&amp;gt;&lt;br /&gt;
	&amp;lt;/files&amp;gt;&lt;br /&gt;
&lt;br /&gt;
	&amp;lt;administration&amp;gt;&lt;br /&gt;
		&amp;lt;!-- Administration Menu Section --&amp;gt;&lt;br /&gt;
		&amp;lt;menu link=&#039;index.php?option=com_helloworld&#039;&amp;gt;Hello World!&amp;lt;/menu&amp;gt;&lt;br /&gt;
		&amp;lt;!-- Administration Main File Copy Section --&amp;gt;&lt;br /&gt;
		&amp;lt;!-- Note the folder attribute: This attribute describes the folder&lt;br /&gt;
			to copy FROM in the package to install therefore files copied&lt;br /&gt;
			in this section are copied from /admin/ in the package --&amp;gt;&lt;br /&gt;
		&amp;lt;files folder=&amp;quot;admin&amp;quot;&amp;gt;&lt;br /&gt;
			&amp;lt;!-- Admin Main File Copy Section --&amp;gt;&lt;br /&gt;
			&amp;lt;filename&amp;gt;index.html&amp;lt;/filename&amp;gt;&lt;br /&gt;
			&amp;lt;filename&amp;gt;helloworld.php&amp;lt;/filename&amp;gt;&lt;br /&gt;
			&amp;lt;!-- SQL files section --&amp;gt;&lt;br /&gt;
			&amp;lt;folder&amp;gt;sql&amp;lt;/folder&amp;gt;&lt;br /&gt;
			&amp;lt;!-- tables files section --&amp;gt;&lt;br /&gt;
			&amp;lt;folder&amp;gt;tables&amp;lt;/folder&amp;gt;&lt;br /&gt;
			&amp;lt;!-- models files section --&amp;gt;&lt;br /&gt;
			&amp;lt;folder&amp;gt;models&amp;lt;/folder&amp;gt;&lt;br /&gt;
		&amp;lt;/files&amp;gt;&lt;br /&gt;
	&amp;lt;/administration&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/extension&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;translate&amp;gt;&lt;br /&gt;
&amp;lt;!--T:40--&amp;gt;&lt;br /&gt;
Do the same for the uninstall file:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:41--&amp;gt;&lt;br /&gt;
With your favourite file manager and editor put a file &amp;lt;tt&amp;gt;admin/sql/uninstall.mysql.utf8.sql&amp;lt;/tt&amp;gt; containing:&amp;lt;/translate&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span id=&amp;quot;admin/sql/uninstall.mysql.utf8.sql&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;tt&amp;gt;&#039;&#039;&#039;admin/sql/uninstall.mysql.utf8.sql&#039;&#039;&#039;&amp;lt;/tt&amp;gt;&lt;br /&gt;
&amp;lt;source lang=&amp;quot;sql&amp;quot;&amp;gt;&lt;br /&gt;
DROP TABLE IF EXISTS `#__helloworld`;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;translate&amp;gt;== Schema Numbering == &amp;lt;!--T:33--&amp;gt; &amp;lt;/translate&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;translate&amp;gt;&lt;br /&gt;
&amp;lt;!--T:34--&amp;gt;&lt;br /&gt;
Your component has a version number (which is specified inside the &amp;lt;tt&amp;gt;&amp;lt;version&amp;gt;&amp;lt;/tt&amp;gt; tag in your helloword.xml manifest file), and your component&#039;s database schema has its own version number (which is based on the filenames of the sql update files).&amp;lt;/translate&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;translate&amp;gt;&lt;br /&gt;
&amp;lt;!--T:35--&amp;gt;&lt;br /&gt;
Joomla keeps track of the database schema version of your component through a record in its &amp;lt;tt&amp;gt;#__schemas&amp;lt;/tt&amp;gt; table. So when you first install a component, if there&#039;s a file called, say, &amp;lt;tt&amp;gt;admin/sql/updates/mysql/0.0.6.sql&amp;lt;/tt&amp;gt;, then Joomla will store the value &amp;lt;tt&amp;gt;0.0.6&amp;lt;/tt&amp;gt; it its schemas record. &amp;lt;/translate&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;translate&amp;gt;&lt;br /&gt;
&amp;lt;!--T:36--&amp;gt;&lt;br /&gt;
When you next install a newer version of this component - it doesn&#039;t have to be the next version, you can skip versions - Joomla will do the following:&lt;br /&gt;
* it will retrieve the component&#039;s latest database schema version from its &amp;lt;tt&amp;gt;#__schemas&amp;lt;/tt&amp;gt; table - so it might find in our example the value 0.0.6. &lt;br /&gt;
* it will get the filenames of all the files in the &amp;lt;tt&amp;gt;admin/sql/updates/mysql/&amp;lt;/tt&amp;gt; directory, and organise them in numerically increasing order.&lt;br /&gt;
* it will process in order the update files which have filenames numerically after the current schema version - so it might find files called 0.0.7.sql, 0.0.9.sql and 0.0.10.sql, and process these in order. &lt;br /&gt;
* it will update the schemas record to have the number of the last update file which it processed - eg 0.0.10. &amp;lt;/translate&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;translate&amp;gt;&lt;br /&gt;
&amp;lt;!--T:37--&amp;gt;&lt;br /&gt;
If you have already released versions of your component when you introduce database use, as we have simulated in this tutorial series, then your first update file must have exactly the same content as the install file.  If you have not, then it should be empty.&amp;lt;/translate&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;translate&amp;gt;&lt;br /&gt;
&amp;lt;!--T:38--&amp;gt;&lt;br /&gt;
Although it may be a good idea to keep the two version numbers in step, you don&#039;t have to. Joomla takes the schema version from the name of the numerically last update file. That&#039;s why it is recommended that there should be an initial update file, even if it&#039;s empty. If you want to keep your schema numbers in step with the component version numbers when you update your code but not the database schema, you simply include an update file to go with the new release number, and that update file, too, will be empty.&amp;lt;/translate&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;translate&amp;gt;&lt;br /&gt;
&amp;lt;!--T:39--&amp;gt;&lt;br /&gt;
As you make subsequent releases of your component the database install file must always contain the full schema and the update files only need to contain any changes you have made to the schema since the last update.&amp;lt;/translate&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;translate&amp;gt;&lt;br /&gt;
== Adding a new field type == &amp;lt;!--T:13--&amp;gt;&lt;br /&gt;
&amp;lt;/translate&amp;gt;&lt;br /&gt;
&amp;lt;translate&amp;gt;&amp;lt;!--T:14--&amp;gt;&lt;br /&gt;
For the moment, we have used a [[S:MyLanguage/J3.3:Developing an MVC Component/Adding a menu type to the site part|hard coded field type for messages]]. We need to use our database for choosing the message, and for this we need to define a custom field type (which we call &#039;&#039;helloworld&#039;&#039; below) as described [[S:MyLanguage/Creating_a_custom_form_field_type|here]].&amp;lt;/translate&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;translate&amp;gt;&amp;lt;!--T:15--&amp;gt;&lt;br /&gt;
Modify the &amp;lt;tt&amp;gt;site/views/helloworld/tmpl/default.xml&amp;lt;/tt&amp;gt; file and put these lines&amp;lt;/translate&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span id=&amp;quot;site/views/helloworld/tmpl/default.xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;tt&amp;gt;&#039;&#039;&#039;site/views/helloworld/tmpl/default.xml&#039;&#039;&#039;&amp;lt;/tt&amp;gt;&lt;br /&gt;
&amp;lt;source lang=&amp;quot;xml&amp;quot; highlight=&amp;quot;8,11-16&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;?xml version=&amp;quot;1.0&amp;quot; encoding=&amp;quot;utf-8&amp;quot;?&amp;gt;&lt;br /&gt;
&amp;lt;metadata&amp;gt;&lt;br /&gt;
	&amp;lt;layout title=&amp;quot;COM_HELLOWORLD_HELLOWORLD_VIEW_DEFAULT_TITLE&amp;quot;&amp;gt;&lt;br /&gt;
		&amp;lt;message&amp;gt;COM_HELLOWORLD_HELLOWORLD_VIEW_DEFAULT_DESC&amp;lt;/message&amp;gt;&lt;br /&gt;
	&amp;lt;/layout&amp;gt;&lt;br /&gt;
	&amp;lt;fields&lt;br /&gt;
			name=&amp;quot;request&amp;quot;&lt;br /&gt;
			addfieldpath=&amp;quot;/administrator/components/com_helloworld/models/fields&amp;quot;&lt;br /&gt;
			&amp;gt;&lt;br /&gt;
		&amp;lt;fieldset name=&amp;quot;request&amp;quot;&amp;gt;&lt;br /&gt;
			&amp;lt;field&lt;br /&gt;
					name=&amp;quot;id&amp;quot;&lt;br /&gt;
					type=&amp;quot;helloworld&amp;quot;&lt;br /&gt;
					label=&amp;quot;COM_HELLOWORLD_HELLOWORLD_FIELD_GREETING_LABEL&amp;quot;&lt;br /&gt;
					description=&amp;quot;COM_HELLOWORLD_HELLOWORLD_FIELD_GREETING_DESC&amp;quot;&lt;br /&gt;
					/&amp;gt;&lt;br /&gt;
		&amp;lt;/fieldset&amp;gt;&lt;br /&gt;
	&amp;lt;/fields&amp;gt;&lt;br /&gt;
&amp;lt;/metadata&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;translate&amp;gt;&amp;lt;!--T:16--&amp;gt;&lt;br /&gt;
It introduces a new field type and tells Joomla to look for the field definition in the &amp;lt;tt&amp;gt;/administrator/components/com_helloworld/models/fields&amp;lt;/tt&amp;gt; folder.&amp;lt;/translate&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;translate&amp;gt;&amp;lt;!--T:17--&amp;gt;&lt;br /&gt;
In order to learn more on database queries, selecting data from a database table and retrieving it in several formats [[S:MyLanguage/Selecting_data_using_JDatabase|click here]].&amp;lt;/translate&amp;gt;&lt;br /&gt;
&amp;lt;translate&amp;gt;&amp;lt;!--T:18--&amp;gt;&lt;br /&gt;
With your favourite file manager and editor put a file &#039;&#039;admin/models/fields/helloworld.php&#039;&#039; containing:&amp;lt;/translate&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span id=&amp;quot;admin/models/fields/helloworld.php&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;tt&amp;gt;&#039;&#039;&#039;admin/models/fields/helloworld.php&#039;&#039;&#039;&amp;lt;/tt&amp;gt;&lt;br /&gt;
&amp;lt;source lang=&amp;quot;php&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;?php&lt;br /&gt;
/**&lt;br /&gt;
 * @package     Joomla.Administrator&lt;br /&gt;
 * @subpackage  com_helloworld&lt;br /&gt;
 *&lt;br /&gt;
 * @copyright   Copyright (C) 2005 - 2018 Open Source Matters, Inc. All rights reserved.&lt;br /&gt;
 * @license     GNU General Public License version 2 or later; see LICENSE.txt&lt;br /&gt;
 */&lt;br /&gt;
&lt;br /&gt;
// No direct access to this file&lt;br /&gt;
defined(&#039;_JEXEC&#039;) or die(&#039;Restricted access&#039;);&lt;br /&gt;
&lt;br /&gt;
JFormHelper::loadFieldClass(&#039;list&#039;);&lt;br /&gt;
&lt;br /&gt;
/**&lt;br /&gt;
 * HelloWorld Form Field class for the HelloWorld component&lt;br /&gt;
 *&lt;br /&gt;
 * @since  0.0.1&lt;br /&gt;
 */&lt;br /&gt;
class JFormFieldHelloWorld extends JFormFieldList&lt;br /&gt;
{&lt;br /&gt;
	/**&lt;br /&gt;
	 * The field type.&lt;br /&gt;
	 *&lt;br /&gt;
	 * @var         string&lt;br /&gt;
	 */&lt;br /&gt;
	protected $type = &#039;HelloWorld&#039;;&lt;br /&gt;
&lt;br /&gt;
	/**&lt;br /&gt;
	 * Method to get a list of options for a list input.&lt;br /&gt;
	 *&lt;br /&gt;
	 * @return  array  An array of JHtml options.&lt;br /&gt;
	 */&lt;br /&gt;
	protected function getOptions()&lt;br /&gt;
	{&lt;br /&gt;
		$db    = JFactory::getDBO();&lt;br /&gt;
		$query = $db-&amp;gt;getQuery(true);&lt;br /&gt;
		$query-&amp;gt;select(&#039;id,greeting&#039;);&lt;br /&gt;
		$query-&amp;gt;from(&#039;#__helloworld&#039;);&lt;br /&gt;
		$db-&amp;gt;setQuery((string) $query);&lt;br /&gt;
		$messages = $db-&amp;gt;loadObjectList();&lt;br /&gt;
		$options  = array();&lt;br /&gt;
&lt;br /&gt;
		if ($messages)&lt;br /&gt;
		{&lt;br /&gt;
			foreach ($messages as $message)&lt;br /&gt;
			{&lt;br /&gt;
				$options[] = JHtml::_(&#039;select.option&#039;, $message-&amp;gt;id, $message-&amp;gt;greeting);&lt;br /&gt;
			}&lt;br /&gt;
		}&lt;br /&gt;
&lt;br /&gt;
		$options = array_merge(parent::getOptions(), $options);&lt;br /&gt;
&lt;br /&gt;
		return $options;&lt;br /&gt;
	}&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;translate&amp;gt;&amp;lt;!--T:19--&amp;gt;&lt;br /&gt;
The new field type displays a drop-down list of messages to choose from. You can see the result of this change in the menu manager section for the helloworld item.&amp;lt;/translate&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;translate&amp;gt;&lt;br /&gt;
== Display the chosen message == &amp;lt;!--T:20--&amp;gt;&lt;br /&gt;
&amp;lt;/translate&amp;gt;&lt;br /&gt;
&amp;lt;translate&amp;gt;&amp;lt;!--T:21--&amp;gt;&lt;br /&gt;
When a menu item of this component is created/updated, Joomla stores the identifier of the message. The &amp;lt;tt&amp;gt;HelloWorldModelHelloWorld&amp;lt;/tt&amp;gt; model has now to compute the message according to this identifier and the data stored in the database. To do this is uses the [https://docs.joomla.org/Using_the_JTable_class JTable] functionality, which is an alternative to JDatabase if only CRUD operations on single records are required.&amp;lt;/translate&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;translate&amp;gt;&amp;lt;!--T:22--&amp;gt;&lt;br /&gt;
Modify the &amp;lt;tt&amp;gt;site/models/helloworld.php&amp;lt;/tt&amp;gt; file:&amp;lt;/translate&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span id=&amp;quot;site/models/helloworld.php&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;tt&amp;gt;&#039;&#039;&#039;site/models/helloworld.php&#039;&#039;&#039;&amp;lt;/tt&amp;gt;&lt;br /&gt;
&amp;lt;source lang=&amp;quot;php&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;?php&lt;br /&gt;
/**&lt;br /&gt;
 * @package     Joomla.Administrator&lt;br /&gt;
 * @subpackage  com_helloworld&lt;br /&gt;
 *&lt;br /&gt;
 * @copyright   Copyright (C) 2005 - 2018 Open Source Matters, Inc. All rights reserved.&lt;br /&gt;
 * @license     GNU General Public License version 2 or later; see LICENSE.txt&lt;br /&gt;
 */&lt;br /&gt;
&lt;br /&gt;
// No direct access to this file&lt;br /&gt;
defined(&#039;_JEXEC&#039;) or die(&#039;Restricted access&#039;);&lt;br /&gt;
&lt;br /&gt;
/**&lt;br /&gt;
 * HelloWorld Model&lt;br /&gt;
 *&lt;br /&gt;
 * @since  0.0.1&lt;br /&gt;
 */&lt;br /&gt;
class HelloWorldModelHelloWorld extends JModelItem&lt;br /&gt;
{&lt;br /&gt;
	/**&lt;br /&gt;
	 * @var array messages&lt;br /&gt;
	 */&lt;br /&gt;
	protected $messages;&lt;br /&gt;
&lt;br /&gt;
	/**&lt;br /&gt;
	 * Method to get a table object, load it if necessary.&lt;br /&gt;
	 *&lt;br /&gt;
	 * @param   string  $type    The table name. Optional.&lt;br /&gt;
	 * @param   string  $prefix  The class prefix. Optional.&lt;br /&gt;
	 * @param   array   $config  Configuration array for model. Optional.&lt;br /&gt;
	 *&lt;br /&gt;
	 * @return  JTable  A JTable object&lt;br /&gt;
	 *&lt;br /&gt;
	 * @since   1.6&lt;br /&gt;
	 */&lt;br /&gt;
	public function getTable($type = &#039;HelloWorld&#039;, $prefix = &#039;HelloWorldTable&#039;, $config = array())&lt;br /&gt;
	{&lt;br /&gt;
		return JTable::getInstance($type, $prefix, $config);&lt;br /&gt;
	}&lt;br /&gt;
&lt;br /&gt;
	/**&lt;br /&gt;
	 * Get the message&lt;br /&gt;
	 *&lt;br /&gt;
	 * @param   integer  $id  Greeting Id&lt;br /&gt;
	 *&lt;br /&gt;
	 * @return  string        Fetched String from Table for relevant Id&lt;br /&gt;
	 */&lt;br /&gt;
	public function getMsg($id = 1)&lt;br /&gt;
	{&lt;br /&gt;
		if (!is_array($this-&amp;gt;messages))&lt;br /&gt;
		{&lt;br /&gt;
			$this-&amp;gt;messages = array();&lt;br /&gt;
		}&lt;br /&gt;
&lt;br /&gt;
		if (!isset($this-&amp;gt;messages[$id]))&lt;br /&gt;
		{&lt;br /&gt;
			// Request the selected id&lt;br /&gt;
			$jinput = JFactory::getApplication()-&amp;gt;input;&lt;br /&gt;
			$id     = $jinput-&amp;gt;get(&#039;id&#039;, 1, &#039;INT&#039;);&lt;br /&gt;
&lt;br /&gt;
			// Get a TableHelloWorld instance&lt;br /&gt;
			$table = $this-&amp;gt;getTable();&lt;br /&gt;
&lt;br /&gt;
			// Load the message&lt;br /&gt;
			$table-&amp;gt;load($id);&lt;br /&gt;
&lt;br /&gt;
			// Assign the message&lt;br /&gt;
			$this-&amp;gt;messages[$id] = $table-&amp;gt;greeting;&lt;br /&gt;
		}&lt;br /&gt;
&lt;br /&gt;
		return $this-&amp;gt;messages[$id];&lt;br /&gt;
	}&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;translate&amp;gt;&amp;lt;!--T:23--&amp;gt;&lt;br /&gt;
The model now asks the &#039;&#039;TableHelloWorld&#039;&#039; to get the message. This table class has to be defined in &amp;lt;tt&amp;gt;admin/tables/helloworld.php&amp;lt;/tt&amp;gt; file&amp;lt;/translate&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span id=&amp;quot;admin/tables/helloworld.php&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;tt&amp;gt;&#039;&#039;&#039;admin/tables/helloworld.php&#039;&#039;&#039;&amp;lt;/tt&amp;gt;&lt;br /&gt;
&amp;lt;source lang=&amp;quot;php&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;?php&lt;br /&gt;
/**&lt;br /&gt;
 * @package     Joomla.Administrator&lt;br /&gt;
 * @subpackage  com_helloworld&lt;br /&gt;
 *&lt;br /&gt;
 * @copyright   Copyright (C) 2005 - 2018 Open Source Matters, Inc. All rights reserved.&lt;br /&gt;
 * @license     GNU General Public License version 2 or later; see LICENSE.txt&lt;br /&gt;
 */&lt;br /&gt;
// No direct access&lt;br /&gt;
defined(&#039;_JEXEC&#039;) or die(&#039;Restricted access&#039;);&lt;br /&gt;
&lt;br /&gt;
/**&lt;br /&gt;
 * Hello Table class&lt;br /&gt;
 *&lt;br /&gt;
 * @since  0.0.1&lt;br /&gt;
 */&lt;br /&gt;
class HelloWorldTableHelloWorld extends JTable&lt;br /&gt;
{&lt;br /&gt;
	/**&lt;br /&gt;
	 * Constructor&lt;br /&gt;
	 *&lt;br /&gt;
	 * @param   JDatabaseDriver  &amp;amp;$db  A database connector object&lt;br /&gt;
	 */&lt;br /&gt;
	function __construct(&amp;amp;$db)&lt;br /&gt;
	{&lt;br /&gt;
		parent::__construct(&#039;#__helloworld&#039;, &#039;id&#039;, $db);&lt;br /&gt;
	}&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;translate&amp;gt;&amp;lt;!--T:24--&amp;gt;&lt;br /&gt;
You shouldn&#039;t see any differences, but if you access the database you should see a table named &#039;&#039;jos_helloworld&#039;&#039; with two columns: id and greeting. And two entries: &#039;&#039;Hello World!&#039;&#039; and &#039;&#039;Good bye World&#039;&#039;.&amp;lt;/translate&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;translate&amp;gt;&lt;br /&gt;
== Packaging the component == &amp;lt;!--T:25--&amp;gt;&lt;br /&gt;
&amp;lt;/translate&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;translate&amp;gt;&amp;lt;!--T:26--&amp;gt;&lt;br /&gt;
Content of your code directory&amp;lt;/translate&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* &#039;&#039;[[#helloworld.xml|helloworld.xml]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Adding_a_view_to_the_site_part#site/helloworld.php|site/helloworld.php]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Developing_a_Basic_Component#index.html|site/index.html]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Adding_a_view_to_the_site_part#site/controller.php|site/controller.php]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Developing_a_Basic_Component#index.html|site/views/index.html]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Developing_a_Basic_Component#index.html|site/views/helloworld/index.html]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Adding_a_view_to_the_site_part#site/views/helloworld/view.html.php|site/views/helloworld/view.html.php]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Developing_a_Basic_Component#index.html|site/views/helloworld/tmpl/index.html]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[#site/views/helloworld/tmpl/default.xml|site/views/helloworld/tmpl/default.xml]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Adding_a_view_to_the_site_part#site/views/helloworld/tmpl/default.php|site/views/helloworld/tmpl/default.php]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Developing_a_Basic_Component#index.html|site/models/index.html]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[#site/models/helloworld.php|site/models/helloworld.php]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Developing_a_Basic_Component#index.html|admin/index.html]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Developing_a_Basic_Component#admin/helloworld.php|admin/helloworld.php]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Developing_a_Basic_Component#index.html|admin/sql/index.html]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[#admin/sql/install.mysql.utf8.sql|admin/sql/install.mysql.utf8.sql]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[#admin/sql/uninstall.mysql.utf8.sql|admin/sql/uninstall.mysql.utf8.sql]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Developing_a_Basic_Component#index.html|admin/sql/updates/index.html]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Developing_a_Basic_Component#index.html|admin/sql/updates/mysql/index.html]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Developing_a_Basic_Component#admin/sql/updates/mysql/0.0.1.sql|admin/sql/updates/mysql/0.0.1.sql]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[#admin/sql/install.mysql.utf8.sql|admin/sql/updates/mysql/0.0.6.sql]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Developing_a_Basic_Component#index.html|admin/models/index.html]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Developing_a_Basic_Component#index.html|admin/models/fields/index.html]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[#admin/models/fields/helloworld.php|admin/models/fields/helloworld.php]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Developing_a_Basic_Component#index.html|admin/tables/index.html]]&#039;&#039;&lt;br /&gt;
* &#039;&#039;[[#admin/tables/helloworld.php|admin/tables/helloworld.php]]&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;translate&amp;gt;&amp;lt;!--T:27--&amp;gt;&lt;br /&gt;
Create a compressed file of this directory or directly download the [https://github.com/scionescire/Joomla-3.2-Hello-World-Component/archive/step-6-using-the-database.zip archive] and install it using the extension manager of Joomla. You can add a menu item of this component using the menu manager in the backend.&amp;lt;/translate&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{notice|&amp;lt;translate&amp;gt;&amp;lt;!--T:28--&amp;gt;&lt;br /&gt;
Please create a pull request or issue at https://github.com/joomla/Joomla-3.2-Hello-World-Component for any code discrepancies or if editing any of the source code on this page.&amp;lt;/translate&amp;gt;}}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;translate&amp;gt;&lt;br /&gt;
== Contributors == &amp;lt;!--T:42--&amp;gt;&lt;br /&gt;
&amp;lt;/translate&amp;gt;&lt;br /&gt;
*[[User:cdemko|Christophe Demko]]&lt;br /&gt;
*[[User:oaksu|Ozgur Aksu]]&lt;br /&gt;
*[[User:scionescire|Scionescire]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;row&amp;quot;&amp;gt; &lt;br /&gt;
&amp;lt;div class=&amp;quot;large-6 columns&amp;quot;&amp;gt;{{Basic button|&amp;lt;translate&amp;gt;&amp;lt;!--T:29--&amp;gt;&lt;br /&gt;
S:MyLanguage/J3.x:Developing_an_MVC_Component/Adding a variable request in the menu type|Prev: Adding a variable request in the menu type&amp;lt;/translate&amp;gt;|class=expand success}}&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;div class=&amp;quot;large-6 columns&amp;quot;&amp;gt;{{Basic button|&amp;lt;translate&amp;gt;&amp;lt;!--T:30--&amp;gt;&lt;br /&gt;
S:MyLanguage/J3.x:Developing_an_MVC_Component/Basic backend|Next: Basic backend&amp;lt;/translate&amp;gt;|class=expand}}&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;noinclude&amp;gt;&lt;br /&gt;
[[Category:Joomla! 3.x{{#translation:}}]]&lt;br /&gt;
[[Category:Joomla! 3.0{{#translation:}}]]&lt;br /&gt;
[[Category:Joomla! 3.1{{#translation:}}]]&lt;br /&gt;
[[Category:Joomla! 3.2{{#translation:}}]]&lt;br /&gt;
[[Category:Joomla! 3.3{{#translation:}}]]&lt;br /&gt;
[[Category:Joomla! 3.4{{#translation:}}]]&lt;br /&gt;
[[Category:Beginner Development{{#translation:}}]]&lt;br /&gt;
[[Category:Component Development{{#translation:}}]]&lt;br /&gt;
[[Category:Tutorials{{#translation:}}]]&lt;br /&gt;
[[Category:Tutorials in a Series{{#translation:}}]]&lt;br /&gt;
&amp;lt;/noinclude&amp;gt;&lt;/div&gt;</summary>
		<author><name>Stan31337</name></author>
	</entry>
	<entry>
		<id>https://docs.sandbox.joomla.org/index.php?title=J3.x:Developing_an_MVC_Component/Developing_a_Basic_Component&amp;diff=588437</id>
		<title>J3.x:Developing an MVC Component/Developing a Basic Component</title>
		<link rel="alternate" type="text/html" href="https://docs.sandbox.joomla.org/index.php?title=J3.x:Developing_an_MVC_Component/Developing_a_Basic_Component&amp;diff=588437"/>
		<updated>2019-01-22T06:25:19Z</updated>

		<summary type="html">&lt;p&gt;Stan31337: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;noinclude&amp;gt;&amp;lt;languages /&amp;gt;&amp;lt;/noinclude&amp;gt;&lt;br /&gt;
{{:J3.1:Developing an MVC Component/&amp;lt;translate&amp;gt;&amp;lt;!--T:1--&amp;gt;&lt;br /&gt;
en&amp;lt;/translate&amp;gt;}}&lt;br /&gt;
&amp;lt;translate&amp;gt;&lt;br /&gt;
== Notes == &amp;lt;!--T:21--&amp;gt;&lt;br /&gt;
This tutorial is part of the [[S:MyLanguage/J3.x:Developing_an_MVC_Component/Introduction|Developing a MVC Component for Joomla! 3.x]] tutorial. You are encouraged to read the previous parts of the tutorial before reading this.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:22--&amp;gt;&lt;br /&gt;
If you have used Joomla! before reading this tutorial, you have noticed that extensions are installed using a compressed file containing all the things which are needed for installing and uninstalling them.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:23--&amp;gt;&lt;br /&gt;
You can follow the steps below to create the Hello World! component, or you can directly download files from the git repository [https://github.com/Stevec4/Joomla-HelloWorld/raw/master/01%20Introduction/helloworld.zip archive]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:24--&amp;gt;&lt;br /&gt;
Here are some slides based on this documents to explain how to create basic to advance Joomla! components.&amp;lt;br /&amp;gt;&lt;br /&gt;
[http://bit.ly/joomlaWorkshopBasic Joomla! Basic Component Help]&amp;lt;br /&amp;gt;&lt;br /&gt;
[http://bit.ly/joomlaWorkshopAdvance Joomla! Advance Component Help]&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:55--&amp;gt;&lt;br /&gt;
There are also a number of videos which accompany steps in the tutorial, beginning with&amp;lt;br /&amp;gt;&lt;br /&gt;
[https://www.youtube.com/watch?v=4JDsdfnlOhE Step 1, Developing a Basic Component] and you can access the slides which are used in the series of video presentations at [https://docs.google.com/presentation/d/11g6qd64zmQObe8xMuEVubdUeIp0DcZ1wr8dq7LcrXIA Slides]. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:57--&amp;gt;&lt;br /&gt;
&#039;&#039;&#039;Important! Around version 3.8 the Joomla developers started changing the naming of Joomla classes and where they were stored in the directory structure. Many of the tutorial steps and videos refer to the old naming convention. To find the equivalent new class and where it&#039;s stored, look in your libraries/classmap.php file.&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:56--&amp;gt;&lt;br /&gt;
{{#widget:YouTube|id=4JDsdfnlOhE}}&lt;br /&gt;
&lt;br /&gt;
== How to add a component to Joomla! == &amp;lt;!--T:25--&amp;gt;&lt;br /&gt;
In this article we will cover how to create and install a basic Joomla! component. For this example we will be working with the Hello World! component.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:26--&amp;gt;&lt;br /&gt;
To begin, you must first use your preferred file manager to create a directory for the Hello World! component. This directory can be anywhere on your file system, as long as it is outside of your Joomla! installation directory. For this example we will name the directory &amp;lt;tt&amp;gt;com_helloworld&amp;lt;/tt&amp;gt;, but this directory can be named anything.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:27--&amp;gt;&lt;br /&gt;
Next, inside this directory we need to create some files. Using your preferred file manager, create the following files; as you create the files, add the source code for each file which is found in &#039;&#039;[[#File Details| File Details]]&#039;&#039;.&amp;lt;/translate&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:28--&amp;gt;&lt;br /&gt;
{| border=1&lt;br /&gt;
 | 1&lt;br /&gt;
 | &#039;&#039;[[#helloworld.xml|helloworld.xml]]&#039;&#039;&lt;br /&gt;
 | &amp;lt;translate&amp;gt;&amp;lt;!--T:35--&amp;gt;&lt;br /&gt;
this is an XML (manifest) file that tells Joomla! how to install our component.&amp;lt;/translate&amp;gt;&lt;br /&gt;
 |-&lt;br /&gt;
 | 2&lt;br /&gt;
 | &#039;&#039;[[#site/helloworld.php|site/helloworld.php]]&#039;&#039;&lt;br /&gt;
 | &amp;lt;translate&amp;gt;&amp;lt;!--T:36--&amp;gt;&lt;br /&gt;
this is the site entry point to the Hello World! component&amp;lt;/translate&amp;gt;&lt;br /&gt;
 |-&lt;br /&gt;
 | 3&lt;br /&gt;
 | &#039;&#039;[[#index.html|site/index.html]]&#039;&#039;&lt;br /&gt;
 | &amp;lt;translate&amp;gt;&amp;lt;!--T:37--&amp;gt;&lt;br /&gt;
prevents web server from listing directory content&amp;lt;/translate&amp;gt;&lt;br /&gt;
 |-&lt;br /&gt;
 | 4&lt;br /&gt;
 | &#039;&#039;[[#index.html|admin/index.html]]&#039;&#039;&lt;br /&gt;
 | &amp;lt;translate&amp;gt;&amp;lt;!--T:38--&amp;gt;&lt;br /&gt;
prevents web server from listing directory content&amp;lt;/translate&amp;gt;&lt;br /&gt;
 |-&lt;br /&gt;
 | 5&lt;br /&gt;
 | &#039;&#039;[[#admin/helloworld.php|admin/helloworld.php]]&#039;&#039;&lt;br /&gt;
 | &amp;lt;translate&amp;gt;&amp;lt;!--T:39--&amp;gt;&lt;br /&gt;
this is the administrator entry point to the Hello World! component&amp;lt;/translate&amp;gt;&lt;br /&gt;
 |-&lt;br /&gt;
 | 6&lt;br /&gt;
 | &#039;&#039;[[#index.html|admin/sql/index.html]]&#039;&#039;&lt;br /&gt;
 | &amp;lt;translate&amp;gt;&amp;lt;!--T:40--&amp;gt;&lt;br /&gt;
prevents web server from listing directory content&amp;lt;/translate&amp;gt;&lt;br /&gt;
 |-&lt;br /&gt;
 | 7&lt;br /&gt;
 | &#039;&#039;[[#index.html|admin/sql/updates/index.html]]&#039;&#039;&lt;br /&gt;
 | &amp;lt;translate&amp;gt;&amp;lt;!--T:54--&amp;gt;&lt;br /&gt;
prevents web server from listing directory content&amp;lt;/translate&amp;gt;&lt;br /&gt;
 |-&lt;br /&gt;
 | 8&lt;br /&gt;
 | &#039;&#039;[[#index.html|admin/sql/updates/mysql/index.html]]&#039;&#039;&lt;br /&gt;
 | &amp;lt;translate&amp;gt;&amp;lt;!--T:41--&amp;gt;&lt;br /&gt;
prevents web server from listing directory content&amp;lt;/translate&amp;gt;&lt;br /&gt;
 |-&lt;br /&gt;
 | 9&lt;br /&gt;
 | &#039;&#039;[[#admin/sql/updates/mysql/0.0.1.sql|admin/sql/updates/mysql/0.0.1.sql]]&#039;&#039;&lt;br /&gt;
 | &amp;lt;translate&amp;gt;&amp;lt;!--T:42--&amp;gt;&lt;br /&gt;
file allowing to initialise schema version of the com_helloworld component.&amp;lt;/translate&amp;gt;&lt;br /&gt;
 |}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;translate&amp;gt;&lt;br /&gt;
=== Installing the Hello World! Component === &amp;lt;!--T:29--&amp;gt;&lt;br /&gt;
Using your preferred file manager, create a .zip file of this directory. For this example we will name the file &amp;lt;tt&amp;gt;com_helloworld.zip&amp;lt;/tt&amp;gt;, again this file could have been named anything.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:30--&amp;gt;&lt;br /&gt;
Now we need to install the Hello World! component. There are two ways to do this, both are covered in [[S:MyLanguage/Installing an extension|Installing an Extension]]. Here we will cover the method using the Extension Manager of Joomla!. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:31--&amp;gt;&lt;br /&gt;
*Using your preferred web browser, navigate to the Administrator panel of your Joomla! site. The address would be &amp;lt;tt&amp;gt;&amp;lt;yoursite&amp;gt;/joomla/administrator/index.php&amp;lt;/tt&amp;gt;. For this example we will navigate to &amp;lt;tt&amp;gt;localhost/joomla/administrator/index.php&amp;lt;/tt&amp;gt;.&lt;br /&gt;
*Click Extensions {{rarr}} Manage {{rarr}} Install {{rarr}} Upload Package File {{rarr}} Choose File&lt;br /&gt;
*Navigate and Select File&lt;br /&gt;
*Click Upload &amp;amp; Install&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:32--&amp;gt;&lt;br /&gt;
Note - You should see a message letting you know if the installation succeeded or failed. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:33--&amp;gt;&lt;br /&gt;
You can test this basic function of the component by entering the Hello World! page for the site and administrator portions of your Joomla! website.&lt;br /&gt;
* Using your preferred web browser, navigate to the Hello World! component page located on the site portion of your website. The address would be &amp;lt;tt&amp;gt;&amp;lt;yoursite&amp;gt;/joomla/index.php?option=com_helloworld&amp;lt;/tt&amp;gt;. For this example we will navigate to &amp;lt;tt&amp;gt;localhost/joomla/index.php?option=com_helloworld&amp;lt;/tt&amp;gt;.&lt;br /&gt;
* Using your preferred web browser, navigate to the Hello World! component page located on the administrator portion of your website. The address would be &amp;lt;tt&amp;gt;&amp;lt;yoursite&amp;gt;/joomla/administrator/index.php?option=com_helloworld&amp;lt;/tt&amp;gt;. For this example we will navigate to &amp;lt;tt&amp;gt;localhost/joomla/administrator/index.php?option=com_helloworld&amp;lt;/tt&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:34--&amp;gt;&lt;br /&gt;
You can also notice that the &#039;&#039;Hello World!&#039;&#039; component is visible in the administrator site of your Joomla installation under the &#039;&#039;Components&#039;&#039; menu.&lt;br /&gt;
&lt;br /&gt;
==File Details== &amp;lt;!--T:15--&amp;gt;&lt;br /&gt;
&amp;lt;/translate&amp;gt;&lt;br /&gt;
{{vanchor|admin/sql/updates/mysql/0.0.1.sql}}&lt;br /&gt;
&amp;lt;translate&amp;gt;&amp;lt;!--T:16--&amp;gt;&lt;br /&gt;
is an empty file allowing to initialise schema version of the com_helloworld component.&amp;lt;/translate&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;sql&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{vanchor|helloworld.xml}}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;?xml version=&amp;quot;1.0&amp;quot; encoding=&amp;quot;utf-8&amp;quot;?&amp;gt;&lt;br /&gt;
&amp;lt;extension type=&amp;quot;component&amp;quot; version=&amp;quot;3.0&amp;quot; method=&amp;quot;upgrade&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
	&amp;lt;name&amp;gt;Hello World!&amp;lt;/name&amp;gt;&lt;br /&gt;
	&amp;lt;!-- The following elements are optional and free of formatting constraints --&amp;gt;&lt;br /&gt;
	&amp;lt;creationDate&amp;gt;January 2018&amp;lt;/creationDate&amp;gt;&lt;br /&gt;
	&amp;lt;author&amp;gt;John Doe&amp;lt;/author&amp;gt;&lt;br /&gt;
	&amp;lt;authorEmail&amp;gt;john.doe@example.org&amp;lt;/authorEmail&amp;gt;&lt;br /&gt;
	&amp;lt;authorUrl&amp;gt;http://www.example.org&amp;lt;/authorUrl&amp;gt;&lt;br /&gt;
	&amp;lt;copyright&amp;gt;Copyright Info&amp;lt;/copyright&amp;gt;&lt;br /&gt;
	&amp;lt;license&amp;gt;License Info&amp;lt;/license&amp;gt;&lt;br /&gt;
	&amp;lt;!--  The version string is recorded in the components table --&amp;gt;&lt;br /&gt;
	&amp;lt;version&amp;gt;0.0.1&amp;lt;/version&amp;gt;&lt;br /&gt;
	&amp;lt;!-- The description is optional and defaults to the name --&amp;gt;&lt;br /&gt;
	&amp;lt;description&amp;gt;Description of the Hello World component ...&amp;lt;/description&amp;gt;&lt;br /&gt;
&lt;br /&gt;
	&amp;lt;update&amp;gt; &amp;lt;!-- Runs on update; New since J2.5 --&amp;gt;&lt;br /&gt;
		&amp;lt;schemas&amp;gt;&lt;br /&gt;
			&amp;lt;schemapath type=&amp;quot;mysql&amp;quot;&amp;gt;sql/updates/mysql&amp;lt;/schemapath&amp;gt;&lt;br /&gt;
		&amp;lt;/schemas&amp;gt;&lt;br /&gt;
	&amp;lt;/update&amp;gt;&lt;br /&gt;
&lt;br /&gt;
	&amp;lt;!-- Site Main File Copy Section --&amp;gt;&lt;br /&gt;
	&amp;lt;!-- Note the folder attribute: This attribute describes the folder&lt;br /&gt;
		to copy FROM in the package to install therefore files copied&lt;br /&gt;
		in this section are copied from /site/ in the package --&amp;gt;&lt;br /&gt;
	&amp;lt;files folder=&amp;quot;site&amp;quot;&amp;gt;&lt;br /&gt;
		&amp;lt;filename&amp;gt;index.html&amp;lt;/filename&amp;gt;&lt;br /&gt;
		&amp;lt;filename&amp;gt;helloworld.php&amp;lt;/filename&amp;gt;&lt;br /&gt;
	&amp;lt;/files&amp;gt;&lt;br /&gt;
&lt;br /&gt;
	&amp;lt;administration&amp;gt;&lt;br /&gt;
		&amp;lt;!-- Administration Menu Section --&amp;gt;&lt;br /&gt;
		&amp;lt;menu link=&#039;index.php?option=com_helloworld&#039;&amp;gt;Hello World!&amp;lt;/menu&amp;gt;&lt;br /&gt;
		&amp;lt;!-- Administration Main File Copy Section --&amp;gt;&lt;br /&gt;
		&amp;lt;!-- Note the folder attribute: This attribute describes the folder&lt;br /&gt;
			to copy FROM in the package to install therefore files copied&lt;br /&gt;
			in this section are copied from /admin/ in the package --&amp;gt;&lt;br /&gt;
		&amp;lt;files folder=&amp;quot;admin&amp;quot;&amp;gt;&lt;br /&gt;
			&amp;lt;!-- Admin Main File Copy Section --&amp;gt;&lt;br /&gt;
			&amp;lt;filename&amp;gt;index.html&amp;lt;/filename&amp;gt;&lt;br /&gt;
			&amp;lt;filename&amp;gt;helloworld.php&amp;lt;/filename&amp;gt;&lt;br /&gt;
			&amp;lt;!-- SQL files section --&amp;gt;&lt;br /&gt;
			&amp;lt;folder&amp;gt;sql&amp;lt;/folder&amp;gt;&lt;br /&gt;
		&amp;lt;/files&amp;gt;&lt;br /&gt;
	&amp;lt;/administration&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/extension&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{vanchor|site/helloworld.php}}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;php&amp;quot;&amp;gt;&lt;br /&gt;
Hello World&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{vanchor|admin/helloworld.php}}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;php&amp;quot;&amp;gt;&lt;br /&gt;
Hello World administration&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{vanchor|index.html}}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;translate&amp;gt;&amp;lt;!--T:17--&amp;gt;&lt;br /&gt;
common to all folders&amp;lt;/translate&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;html4strict&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;html&amp;gt;&amp;lt;body bgcolor=&amp;quot;#FFFFFF&amp;quot;&amp;gt;&amp;lt;/body&amp;gt;&amp;lt;/html&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;translate&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Component Contents== &amp;lt;!--T:43--&amp;gt;&lt;br /&gt;
&amp;lt;/translate&amp;gt;&lt;br /&gt;
&amp;lt;translate&amp;gt;&amp;lt;!--T:44--&amp;gt;&lt;br /&gt;
At this point in the tutorial, your component should contain the following files:&amp;lt;/translate&amp;gt;&lt;br /&gt;
{| border=1&lt;br /&gt;
 | 1&lt;br /&gt;
 | &#039;&#039;[[#helloworld.xml|helloworld.xml]]&#039;&#039;&lt;br /&gt;
 | &amp;lt;translate&amp;gt;&amp;lt;!--T:45--&amp;gt;&lt;br /&gt;
this is an XML (manifest) file that tells Joomla! how to install our component.&amp;lt;/translate&amp;gt;&lt;br /&gt;
 |-&lt;br /&gt;
 | 2&lt;br /&gt;
 | &#039;&#039;[[#site/helloworld.php|site/helloworld.php]]&#039;&#039;&lt;br /&gt;
 | &amp;lt;translate&amp;gt;&amp;lt;!--T:46--&amp;gt;&lt;br /&gt;
this is the site entry point to the Hello World! component&amp;lt;/translate&amp;gt;&lt;br /&gt;
 |-&lt;br /&gt;
 | 3&lt;br /&gt;
 | &#039;&#039;[[#index.html|site/index.html]]&#039;&#039;&lt;br /&gt;
 | &amp;lt;translate&amp;gt;&amp;lt;!--T:47--&amp;gt;&lt;br /&gt;
prevents web server from listing directory content&amp;lt;/translate&amp;gt;&lt;br /&gt;
 |-&lt;br /&gt;
 | 4&lt;br /&gt;
 | &#039;&#039;[[#index.html|admin/index.html]]&#039;&#039;&lt;br /&gt;
 | &amp;lt;translate&amp;gt;&amp;lt;!--T:48--&amp;gt;&lt;br /&gt;
prevents web server from listing directory content&amp;lt;/translate&amp;gt;&lt;br /&gt;
 |-&lt;br /&gt;
 | 5&lt;br /&gt;
 | &#039;&#039;[[#admin/helloworld.php|admin/helloworld.php]]&#039;&#039;&lt;br /&gt;
 | &amp;lt;translate&amp;gt;&amp;lt;!--T:49--&amp;gt;&lt;br /&gt;
this is the administrator entry point to the Hello World! component&amp;lt;/translate&amp;gt;&lt;br /&gt;
 |-&lt;br /&gt;
 | 6&lt;br /&gt;
 | &#039;&#039;[[#index.html|admin/sql/index.html]]&#039;&#039;&lt;br /&gt;
 | &amp;lt;translate&amp;gt;&amp;lt;!--T:50--&amp;gt;&lt;br /&gt;
prevents web server from listing directory content&amp;lt;/translate&amp;gt;&lt;br /&gt;
 |-&lt;br /&gt;
 | 7&lt;br /&gt;
 | &#039;&#039;[[#index.html|admin/sql/updates/index.html]]&#039;&#039;&lt;br /&gt;
 | &amp;lt;translate&amp;gt;&amp;lt;!--T:51--&amp;gt;&lt;br /&gt;
prevents web server from listing directory content&amp;lt;/translate&amp;gt;&lt;br /&gt;
 |-&lt;br /&gt;
 | 8&lt;br /&gt;
 | &#039;&#039;[[#index.html|admin/sql/updates/mysql/index.html]]&#039;&#039;&lt;br /&gt;
 | &amp;lt;translate&amp;gt;&amp;lt;!--T:52--&amp;gt;&lt;br /&gt;
prevents web server from listing directory content&amp;lt;/translate&amp;gt;&lt;br /&gt;
 |-&lt;br /&gt;
 | 9&lt;br /&gt;
 | &#039;&#039;[[#admin/sql/updates/mysql/0.0.1.sql|admin/sql/updates/mysql/0.0.1.sql]]&#039;&#039;&lt;br /&gt;
 | &amp;lt;translate&amp;gt;&amp;lt;!--T:53--&amp;gt;&lt;br /&gt;
file allowing to initialise schema version of the com_helloworld component.&amp;lt;/translate&amp;gt;&lt;br /&gt;
 |}&lt;br /&gt;
&lt;br /&gt;
{{notice|&amp;lt;translate&amp;gt;&amp;lt;!--T:18--&amp;gt;&lt;br /&gt;
An updated git repository following along this tutorial is available @ https://github.com/Stevec4/Joomla-HelloWorld for any code descprepancies or edits please make a pull request.&amp;lt;/translate&amp;gt;}}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;row&amp;quot;&amp;gt; &lt;br /&gt;
&amp;lt;div class=&amp;quot;large-6 columns&amp;quot;&amp;gt;{{Basic button|&amp;lt;translate&amp;gt;&amp;lt;!--T:19--&amp;gt;&lt;br /&gt;
S:MyLanguage/J3.x:Developing_an_MVC_Component/Introduction|Prev: Introduction&amp;lt;/translate&amp;gt;|class=expand success}}&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;div class=&amp;quot;large-6 columns&amp;quot;&amp;gt;{{Basic button|&amp;lt;translate&amp;gt;&amp;lt;!--T:20--&amp;gt;&lt;br /&gt;
S:MyLanguage/J3.x:Developing_an_MVC_Component/Adding_a_view_to_the_site_part|Next: Adding a view to the site part&amp;lt;/translate&amp;gt;|class=expand}}&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
__NOTOC__&lt;br /&gt;
&amp;lt;noinclude&amp;gt;&lt;br /&gt;
&amp;lt;translate&amp;gt;&lt;br /&gt;
&amp;lt;!--T:2--&amp;gt;&lt;br /&gt;
[[Category:Joomla! 3.x]]&lt;br /&gt;
[[Category:Joomla! 3.0]]&lt;br /&gt;
[[Category:Joomla! 3.1]]&lt;br /&gt;
[[Category:Joomla! 3.2]]&lt;br /&gt;
[[Category:Joomla! 3.3]]&lt;br /&gt;
[[Category:Joomla! 3.4]]&lt;br /&gt;
[[Category:Beginner Development]]&lt;br /&gt;
[[Category:Component Development]]&lt;br /&gt;
[[Category:Tutorials]]&lt;br /&gt;
[[Category:Tutorials in a Series]]&lt;br /&gt;
&amp;lt;/translate&amp;gt;&lt;br /&gt;
&amp;lt;/noinclude&amp;gt;&lt;/div&gt;</summary>
		<author><name>Stan31337</name></author>
	</entry>
	<entry>
		<id>https://docs.sandbox.joomla.org/index.php?title=J3.x:Developing_an_MVC_Component/Adding_a_view_to_the_site_part&amp;diff=588436</id>
		<title>J3.x:Developing an MVC Component/Adding a view to the site part</title>
		<link rel="alternate" type="text/html" href="https://docs.sandbox.joomla.org/index.php?title=J3.x:Developing_an_MVC_Component/Adding_a_view_to_the_site_part&amp;diff=588436"/>
		<updated>2019-01-22T03:20:38Z</updated>

		<summary type="html">&lt;p&gt;Stan31337: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;noinclude&amp;gt;&amp;lt;languages /&amp;gt;&amp;lt;/noinclude&amp;gt;&lt;br /&gt;
{{:J3.1:Developing an MVC Component/&amp;lt;translate&amp;gt;&amp;lt;!--T:6--&amp;gt;&lt;br /&gt;
en&amp;lt;/translate&amp;gt;}}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;translate&amp;gt;&lt;br /&gt;
==Note== &amp;lt;!--T:37--&amp;gt;&lt;br /&gt;
&amp;lt;/translate&amp;gt;&lt;br /&gt;
&amp;lt;translate&amp;gt;&amp;lt;!--T:38--&amp;gt;&lt;br /&gt;
* This tutorial is part of the [[S:MyLanguage/J3.x:Developing_an_MVC_Component/Introduction|Developing a MVC Component for Joomla! 3.x]] tutorial. You are encouraged to read the previous parts of the tutorial before reading this.&amp;lt;/translate&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;translate&amp;gt;&lt;br /&gt;
&amp;lt;!--T:39--&amp;gt;&lt;br /&gt;
* You can follow the steps below to add a view to the Hello World! component, or you can directly download the [https://github.com/scionescire/Joomla-3.2-Hello-World-Component/archive/step-2-adding-a-site-view.zip archive]&lt;br /&gt;
&amp;lt;/translate&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;translate&amp;gt;&lt;br /&gt;
&amp;lt;!--T:90--&amp;gt;&lt;br /&gt;
* As you follow through the steps of the tutorial you may find problems. In this case you may find it useful to read the Joomla page on [[S:MyLanguage/How_to_debug_your_code|How to debug your code]].&lt;br /&gt;
&amp;lt;/translate&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;translate&amp;gt;&amp;lt;!--T:91--&amp;gt; * You can watch a video associated with this step in the tutorial at [https://www.youtube.com/watch?v=HNYEHoAznJE Step 2, Adding a View].&amp;lt;/translate&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{#widget:YouTube|id=HNYEHoAznJE}}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;translate&amp;gt;&lt;br /&gt;
==Adding a View to Hello World!== &amp;lt;!--T:40--&amp;gt;&lt;br /&gt;
&amp;lt;/translate&amp;gt;&lt;br /&gt;
__TOC__&lt;br /&gt;
&amp;lt;translate&amp;gt;&amp;lt;!--T:41--&amp;gt;&lt;br /&gt;
In this article we will cover how to add a view to a basic Joomla! component. For this example we will be continuing our work on the [[S:MyLanguage/J3.x:Developing_an_MVC_Component/Developing_a_Basic_Component| Hello World!]] component.&amp;lt;/translate&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;translate&amp;gt;&amp;lt;!--T:42--&amp;gt;&lt;br /&gt;
There are several ways to update a Joomla! component. In this tutorial we will focus option 2.&amp;lt;/translate&amp;gt;&lt;br /&gt;
{| border=1&lt;br /&gt;
 | 1&lt;br /&gt;
 | &amp;lt;translate&amp;gt;&amp;lt;!--T:43--&amp;gt;&lt;br /&gt;
Manually add the files into &amp;lt;tt&amp;gt;&amp;lt;path_to_joomla&amp;gt;/&amp;lt;/tt&amp;gt;&amp;lt;/translate&amp;gt;&lt;br /&gt;
 |-&lt;br /&gt;
 | 2&lt;br /&gt;
 | &amp;lt;translate&amp;gt;&amp;lt;!--T:44--&amp;gt;&lt;br /&gt;
Update using the Joomla! Extension Manager and the original directory, non-compressed, used for the component install&amp;lt;/translate&amp;gt;&lt;br /&gt;
 |-&lt;br /&gt;
 |3&lt;br /&gt;
 | &amp;lt;translate&amp;gt;&amp;lt;!--T:45--&amp;gt;&lt;br /&gt;
Update using the Joomla! Extension Manager and an [[S:MyLanguage/Deploying_an_Update_Server| Update Server]]&amp;lt;/translate&amp;gt;&lt;br /&gt;
 |}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;translate&amp;gt;&amp;lt;!--T:46--&amp;gt;&lt;br /&gt;
To add a view you will need to navigate to &amp;lt;tt&amp;gt;com_helloworld&amp;lt;/tt&amp;gt;, which is the original directory we made for our component. Using your preferred file manager, create or update the following files; as you create or update the files, add the source code for each file which is found in [[#File Details|File Details]].&amp;lt;/translate&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{| border=1&lt;br /&gt;
 | 1&lt;br /&gt;
 | &amp;lt;translate&amp;gt;&amp;lt;!--T:47--&amp;gt;&lt;br /&gt;
Update:&amp;lt;/translate&amp;gt; [[#site/helloworld.php| helloworld.php]]&lt;br /&gt;
 | &amp;lt;tt&amp;gt;&amp;lt;path_to_com_helloworld&amp;gt;/site/helloworld.php&amp;lt;/tt&amp;gt;&lt;br /&gt;
 |-&lt;br /&gt;
 | 2&lt;br /&gt;
 | &amp;lt;translate&amp;gt;&amp;lt;!--T:48--&amp;gt;&lt;br /&gt;
Create:&amp;lt;/translate&amp;gt; [[#site/controller.php| controller.php]]&lt;br /&gt;
 | &amp;lt;tt&amp;gt;&amp;lt;path_to_com_helloworld&amp;gt;/site/controller.php&amp;lt;/tt&amp;gt; &lt;br /&gt;
 |-&lt;br /&gt;
 | 3&lt;br /&gt;
 | &amp;lt;translate&amp;gt;&amp;lt;!--T:49--&amp;gt;&lt;br /&gt;
Create:&amp;lt;/translate&amp;gt; [[#index.html| index.html]]&lt;br /&gt;
 | &amp;lt;tt&amp;gt;&amp;lt;path_to_com_helloworld&amp;gt;/site/views/index.html&amp;lt;/tt&amp;gt;&lt;br /&gt;
 |-&lt;br /&gt;
 | 4&lt;br /&gt;
 | &amp;lt;translate&amp;gt;&amp;lt;!--T:50--&amp;gt;&lt;br /&gt;
Create:&amp;lt;/translate&amp;gt; [[#index.html| index.html]]&lt;br /&gt;
 | &amp;lt;tt&amp;gt;&amp;lt;path_to_com_helloworld&amp;gt;/site/views/helloworld/index.html&amp;lt;/tt&amp;gt;&lt;br /&gt;
 |-&lt;br /&gt;
 | 5&lt;br /&gt;
 | &amp;lt;translate&amp;gt;&amp;lt;!--T:51--&amp;gt;&lt;br /&gt;
Create:&amp;lt;/translate&amp;gt; [[#site/views/helloworld/view.html.php| view.html.php]]&lt;br /&gt;
 | &amp;lt;tt&amp;gt;&amp;lt;path_to_com_helloworld&amp;gt;/site/views/helloworld/view.html.php&amp;lt;/tt&amp;gt;&lt;br /&gt;
 |-&lt;br /&gt;
 | 6&lt;br /&gt;
 | &amp;lt;translate&amp;gt;&amp;lt;!--T:52--&amp;gt;&lt;br /&gt;
Create:&amp;lt;/translate&amp;gt; [[#site/views/helloworld/tml/default.php| default.php]]&lt;br /&gt;
 | &amp;lt;tt&amp;gt;&amp;lt;path_to_com_helloworld&amp;gt;/site/views/helloworld/tmpl/default.php&amp;lt;/tt&amp;gt;&lt;br /&gt;
 |-&lt;br /&gt;
 | 7&lt;br /&gt;
 | &amp;lt;translate&amp;gt;&amp;lt;!--T:53--&amp;gt;&lt;br /&gt;
Create:&amp;lt;/translate&amp;gt; [[#index.html| index.html]]&lt;br /&gt;
 | &amp;lt;tt&amp;gt;&amp;lt;path_to_com_helloworld&amp;gt;/site/views/helloworld/tmpl/index.html&amp;lt;/tt&amp;gt;&lt;br /&gt;
 |-&lt;br /&gt;
 | 8&lt;br /&gt;
 | &amp;lt;translate&amp;gt;&amp;lt;!--T:54--&amp;gt;&lt;br /&gt;
Update:&amp;lt;/translate&amp;gt; [[#helloworld.xml| helloworld.xml]]&lt;br /&gt;
 | &amp;lt;tt&amp;gt;&amp;lt;path_to_com_helloworld/helloworld.xml&amp;lt;/tt&amp;gt;&lt;br /&gt;
 |}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;translate&amp;gt;&lt;br /&gt;
=== Updating the Hello World! Component === &amp;lt;!--T:55--&amp;gt;&lt;br /&gt;
&amp;lt;/translate&amp;gt;&lt;br /&gt;
&amp;lt;translate&amp;gt;&amp;lt;!--T:56--&amp;gt;&lt;br /&gt;
To update the Hello World! Component in the Joomla! website, please follow the same steps for the [[S:MyLanguage/J3.x:Developing_an_MVC_Component/Developing_a_Basic_Component#Installing the Hello World! Component |original installation]].&amp;lt;/translate&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;translate&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==File Details== &amp;lt;!--T:57--&amp;gt;&lt;br /&gt;
&amp;lt;/translate&amp;gt;&lt;br /&gt;
{{vanchor|site/helloworld.php}} (Note that some browsers may not copy and paste highlighted text correctly into a text editor. If you find this, then please try a different browser).&lt;br /&gt;
&amp;lt;source lang=&amp;quot;php&amp;quot; highlight=&amp;quot;1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;?php&lt;br /&gt;
/**&lt;br /&gt;
 * @package     Joomla.Administrator&lt;br /&gt;
 * @subpackage  com_helloworld&lt;br /&gt;
 *&lt;br /&gt;
 * @copyright   Copyright (C) 2005 - 2018 Open Source Matters, Inc. All rights reserved.&lt;br /&gt;
 * @license     GNU General Public License version 2 or later; see LICENSE.txt&lt;br /&gt;
 */&lt;br /&gt;
&lt;br /&gt;
// No direct access to this file&lt;br /&gt;
defined(&#039;_JEXEC&#039;) or die(&#039;Restricted access&#039;);&lt;br /&gt;
&lt;br /&gt;
// Get an instance of the controller prefixed by HelloWorld&lt;br /&gt;
$controller = JControllerLegacy::getInstance(&#039;HelloWorld&#039;);&lt;br /&gt;
&lt;br /&gt;
// Perform the Request task&lt;br /&gt;
$input = JFactory::getApplication()-&amp;gt;input;&lt;br /&gt;
$controller-&amp;gt;execute($input-&amp;gt;getCmd(&#039;task&#039;));&lt;br /&gt;
&lt;br /&gt;
// Redirect if set by the controller&lt;br /&gt;
$controller-&amp;gt;redirect();&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{vanchor|site/controller.php}}&lt;br /&gt;
&amp;lt;source lang=&amp;quot;php&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;?php&lt;br /&gt;
/**&lt;br /&gt;
 * @package     Joomla.Administrator&lt;br /&gt;
 * @subpackage  com_helloworld&lt;br /&gt;
 *&lt;br /&gt;
 * @copyright   Copyright (C) 2005 - 2018 Open Source Matters, Inc. All rights reserved.&lt;br /&gt;
 * @license     GNU General Public License version 2 or later; see LICENSE.txt&lt;br /&gt;
 */&lt;br /&gt;
// No direct access to this file&lt;br /&gt;
defined(&#039;_JEXEC&#039;) or die(&#039;Restricted access&#039;);&lt;br /&gt;
/**&lt;br /&gt;
 * Hello World Component Controller&lt;br /&gt;
 *&lt;br /&gt;
 * @since  0.0.1&lt;br /&gt;
 */&lt;br /&gt;
class HelloWorldController extends JControllerLegacy&lt;br /&gt;
{&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{vanchor|site/views/helloworld/view.html.php}}&lt;br /&gt;
&amp;lt;source lang=&amp;quot;php&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;?php&lt;br /&gt;
/**&lt;br /&gt;
 * @package     Joomla.Administrator&lt;br /&gt;
 * @subpackage  com_helloworld&lt;br /&gt;
 *&lt;br /&gt;
 * @copyright   Copyright (C) 2005 - 2018 Open Source Matters, Inc. All rights reserved.&lt;br /&gt;
 * @license     GNU General Public License version 2 or later; see LICENSE.txt&lt;br /&gt;
 */&lt;br /&gt;
&lt;br /&gt;
// No direct access to this file&lt;br /&gt;
defined(&#039;_JEXEC&#039;) or die(&#039;Restricted access&#039;);&lt;br /&gt;
&lt;br /&gt;
/**&lt;br /&gt;
 * HTML View class for the HelloWorld Component&lt;br /&gt;
 *&lt;br /&gt;
 * @since  0.0.1&lt;br /&gt;
 */&lt;br /&gt;
class HelloWorldViewHelloWorld extends JViewLegacy&lt;br /&gt;
{&lt;br /&gt;
	/**&lt;br /&gt;
	 * Display the Hello World view&lt;br /&gt;
	 *&lt;br /&gt;
	 * @param   string  $tpl  The name of the template file to parse; automatically searches through the template paths.&lt;br /&gt;
	 *&lt;br /&gt;
	 * @return  void&lt;br /&gt;
	 */&lt;br /&gt;
	function display($tpl = null)&lt;br /&gt;
	{&lt;br /&gt;
		// Assign data to the view&lt;br /&gt;
		$this-&amp;gt;msg = &#039;Hello World&#039;;&lt;br /&gt;
&lt;br /&gt;
		// Display the view&lt;br /&gt;
		parent::display($tpl);&lt;br /&gt;
	}&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{vanchor|site/views/helloworld/tmpl/default.php}}&lt;br /&gt;
&amp;lt;source lang=&amp;quot;php&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;?php&lt;br /&gt;
/**&lt;br /&gt;
 * @package     Joomla.Administrator&lt;br /&gt;
 * @subpackage  com_helloworld&lt;br /&gt;
 *&lt;br /&gt;
 * @copyright   Copyright (C) 2005 - 2018 Open Source Matters, Inc. All rights reserved.&lt;br /&gt;
 * @license     GNU General Public License version 2 or later; see LICENSE.txt&lt;br /&gt;
 */&lt;br /&gt;
 &lt;br /&gt;
// No direct access to this file&lt;br /&gt;
defined(&#039;_JEXEC&#039;) or die(&#039;Restricted access&#039;);&lt;br /&gt;
?&amp;gt;&lt;br /&gt;
&amp;lt;h1&amp;gt;&amp;lt;?php echo $this-&amp;gt;msg; ?&amp;gt;&amp;lt;/h1&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{vanchor|index.html}}&lt;br /&gt;
&amp;lt;translate&amp;gt;&amp;lt;!--T:88--&amp;gt;&lt;br /&gt;
Note - the same code is used for all folders&amp;lt;/translate&amp;gt;&lt;br /&gt;
&amp;lt;source lang=&amp;quot;html4strict&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;html&amp;gt;&amp;lt;body bgcolor=&amp;quot;#FFFFFF&amp;quot;&amp;gt;&amp;lt;/body&amp;gt;&amp;lt;/html&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{vanchor|helloworld.xml}}&lt;br /&gt;
&amp;lt;source lang=&amp;quot;xml&amp;quot; highlight=&amp;quot;13,30,31&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;?xml version=&amp;quot;1.0&amp;quot; encoding=&amp;quot;utf-8&amp;quot;?&amp;gt;&lt;br /&gt;
&amp;lt;extension type=&amp;quot;component&amp;quot; version=&amp;quot;3.0&amp;quot; method=&amp;quot;upgrade&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
	&amp;lt;name&amp;gt;Hello World!&amp;lt;/name&amp;gt;&lt;br /&gt;
	&amp;lt;!-- The following elements are optional and free of formatting constraints --&amp;gt;&lt;br /&gt;
	&amp;lt;creationDate&amp;gt;January 2018&amp;lt;/creationDate&amp;gt;&lt;br /&gt;
	&amp;lt;author&amp;gt;John Doe&amp;lt;/author&amp;gt;&lt;br /&gt;
	&amp;lt;authorEmail&amp;gt;john.doe@example.org&amp;lt;/authorEmail&amp;gt;&lt;br /&gt;
	&amp;lt;authorUrl&amp;gt;http://www.example.org&amp;lt;/authorUrl&amp;gt;&lt;br /&gt;
	&amp;lt;copyright&amp;gt;Copyright Info&amp;lt;/copyright&amp;gt;&lt;br /&gt;
	&amp;lt;license&amp;gt;License Info&amp;lt;/license&amp;gt;&lt;br /&gt;
	&amp;lt;!--  The version string is recorded in the components table --&amp;gt;&lt;br /&gt;
	&amp;lt;version&amp;gt;0.0.2&amp;lt;/version&amp;gt;&lt;br /&gt;
	&amp;lt;!-- The description is optional and defaults to the name --&amp;gt;&lt;br /&gt;
	&amp;lt;description&amp;gt;Description of the Hello World component ...&amp;lt;/description&amp;gt;&lt;br /&gt;
&lt;br /&gt;
	&amp;lt;update&amp;gt; &amp;lt;!-- Runs on update; New since J2.5 --&amp;gt;&lt;br /&gt;
		&amp;lt;schemas&amp;gt;&lt;br /&gt;
			&amp;lt;schemapath type=&amp;quot;mysql&amp;quot;&amp;gt;sql/updates/mysql&amp;lt;/schemapath&amp;gt;&lt;br /&gt;
		&amp;lt;/schemas&amp;gt;&lt;br /&gt;
	&amp;lt;/update&amp;gt;&lt;br /&gt;
&lt;br /&gt;
	&amp;lt;!-- Site Main File Copy Section --&amp;gt;&lt;br /&gt;
	&amp;lt;!-- Note the folder attribute: This attribute describes the folder&lt;br /&gt;
		to copy FROM in the package to install therefore files copied&lt;br /&gt;
		in this section are copied from /site/ in the package --&amp;gt;&lt;br /&gt;
	&amp;lt;files folder=&amp;quot;site&amp;quot;&amp;gt;&lt;br /&gt;
		&amp;lt;filename&amp;gt;index.html&amp;lt;/filename&amp;gt;&lt;br /&gt;
		&amp;lt;filename&amp;gt;helloworld.php&amp;lt;/filename&amp;gt;&lt;br /&gt;
		&amp;lt;filename&amp;gt;controller.php&amp;lt;/filename&amp;gt;&lt;br /&gt;
		&amp;lt;folder&amp;gt;views&amp;lt;/folder&amp;gt;&lt;br /&gt;
	&amp;lt;/files&amp;gt;&lt;br /&gt;
&lt;br /&gt;
	&amp;lt;administration&amp;gt;&lt;br /&gt;
		&amp;lt;!-- Administration Menu Section --&amp;gt;&lt;br /&gt;
		&amp;lt;menu link=&#039;index.php?option=com_helloworld&#039;&amp;gt;Hello World!&amp;lt;/menu&amp;gt;&lt;br /&gt;
		&amp;lt;!-- Administration Main File Copy Section --&amp;gt;&lt;br /&gt;
		&amp;lt;!-- Note the folder attribute: This attribute describes the folder&lt;br /&gt;
			to copy FROM in the package to install therefore files copied&lt;br /&gt;
			in this section are copied from /admin/ in the package --&amp;gt;&lt;br /&gt;
		&amp;lt;files folder=&amp;quot;admin&amp;quot;&amp;gt;&lt;br /&gt;
			&amp;lt;!-- Admin Main File Copy Section --&amp;gt;&lt;br /&gt;
			&amp;lt;filename&amp;gt;index.html&amp;lt;/filename&amp;gt;&lt;br /&gt;
			&amp;lt;filename&amp;gt;helloworld.php&amp;lt;/filename&amp;gt;&lt;br /&gt;
			&amp;lt;!-- SQL files section --&amp;gt;&lt;br /&gt;
			&amp;lt;folder&amp;gt;sql&amp;lt;/folder&amp;gt;&lt;br /&gt;
		&amp;lt;/files&amp;gt;&lt;br /&gt;
	&amp;lt;/administration&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/extension&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;translate&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Code Explanation == &amp;lt;!--T:58--&amp;gt;&lt;br /&gt;
&amp;lt;/translate&amp;gt;&lt;br /&gt;
&amp;lt;translate&amp;gt;&amp;lt;!--T:59--&amp;gt;&lt;br /&gt;
In case you were curious as to why this works the way it does.&amp;lt;/translate&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== helloworld.php ===&lt;br /&gt;
&amp;lt;source lang=&amp;quot;php&amp;gt;&lt;br /&gt;
defined(&#039;_JEXEC&#039;) or die(&#039;Restricted access&#039;);&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;translate&amp;gt;&amp;lt;!--T:60--&amp;gt;&lt;br /&gt;
This enables for a secure entry point into the Joomla! platform. [[JEXEC| JEXEC]] contains a detailed explanation.&amp;lt;/translate&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;php&amp;quot;&amp;gt;&lt;br /&gt;
$controller = JControllerLegacy::getInstance(&#039;HelloWorld&#039;);&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;translate&amp;gt;&amp;lt;!--T:61--&amp;gt;&lt;br /&gt;
&#039;&#039;[https://api.joomla.org/cms-3/classes/JControllerLegacy.html JControllerLegacy]&#039;&#039; is a base class for a Joomla! Controller. In order for our website to use controllers, we must extend this class in our component. The &#039;&#039;[https://api.joomla.org/cms-3/classes/JControllerLegacy.html#method_getInstance getInstance]&#039;&#039; static method of the &#039;&#039;JControllerLegacy&#039;&#039; class will create a controller. In the code above, it will instantiate a controller object of a class named &#039;&#039;HelloWorldController&#039;&#039;. Joomla will look for the declaration of that class in &amp;lt;tt&amp;gt;&amp;lt;path_to_joomla&amp;gt;/htdocs/components/com_helloworld/controller.php&amp;lt;/tt&amp;gt;.&amp;lt;/translate&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;php&amp;quot;&amp;gt;&lt;br /&gt;
$input = JFactory::getApplication()-&amp;gt;input;&lt;br /&gt;
$controller-&amp;gt;execute($input-&amp;gt;getCmd(&#039;task&#039;));&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;translate&amp;gt;&amp;lt;!--T:62--&amp;gt;&lt;br /&gt;
After the controller is created, we instruct the controller to execute the task, as defined in the URL: &amp;lt;tt&amp;gt;&amp;lt;yoursite&amp;gt;/joomla/index.php?option=com_helloworld&amp;amp;task=&amp;lt;task_name&amp;gt;&amp;lt;/tt&amp;gt;. If no task is set, the default task &#039;display&#039; will be assumed. When display is used, the &#039;view&#039; variable will decide what will be displayed. Other common tasks are save, edit, new, etc.&amp;lt;/translate&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;php&amp;quot;&amp;gt;&lt;br /&gt;
$controller-&amp;gt;redirect();&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;translate&amp;gt;&amp;lt;!--T:63--&amp;gt;&lt;br /&gt;
The controller might decide to redirect the page, usually after a task like &#039;save&#039; has been completed. This last statement takes care of the actual redirection.&amp;lt;/translate&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;translate&amp;gt;&amp;lt;!--T:64--&amp;gt;&lt;br /&gt;
The main entry point, helloworld.php, essentially passes control to the controller, which handles performing the task that was specified in the request.  Our component specific controller doesn&#039;t do anything more than the parent class already does, which is why our controller class is empty.&amp;lt;/translate&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== controller.php ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;php&amp;quot;&amp;gt;&lt;br /&gt;
class HelloWorldController extends JControllerLegacy&lt;br /&gt;
{&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&amp;lt;translate&amp;gt;&amp;lt;!--T:65--&amp;gt;&lt;br /&gt;
When no task is given in the request variables, the default task will be executed. It&#039;s the display task by default. The JControllerLegacy class has such a task. In our example, it will display a view named HelloWorld.&amp;lt;/translate&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== view.html.php ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;php&amp;quot;&amp;gt;&lt;br /&gt;
class HelloWorldViewHelloWorld extends JViewLegacy&lt;br /&gt;
{&lt;br /&gt;
	function display($tpl = null)&lt;br /&gt;
	{&lt;br /&gt;
		// Assign data to the view&lt;br /&gt;
		$this-&amp;gt;msg = &#039;Hello World&#039;;&lt;br /&gt;
 &lt;br /&gt;
		// Display the view&lt;br /&gt;
		parent::display($tpl);&lt;br /&gt;
	}&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;translate&amp;gt;&amp;lt;!--T:66--&amp;gt;&lt;br /&gt;
The view sets up the text to be output and then calls the base display class.&lt;br /&gt;
&#039;&#039;[https://api.joomla.org/cms-3/classes/JViewLegacy.html JViewLegacy]&#039;&#039; is a base class for a Joomla! View. In our case, this method will display data using the tmpl/default.php file.&amp;lt;/translate&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;translate&amp;gt;&amp;lt;!--T:89--&amp;gt;&lt;br /&gt;
&#039;&#039;&#039;Caveat:&#039;&#039;&#039; If your view needs to load or otherwise embed individual JavaScript code, do not do that in the view, as the code might not get included when caching is enabled. Load those scripts in the controller instead. See &lt;br /&gt;
[https://issues.joomla.org/tracker/joomla-cms/11203 the related issue on the issue tracker].&amp;lt;/translate&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== default.php ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;php&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;h1&amp;gt;&amp;lt;?php echo $this-&amp;gt;msg; ?&amp;gt;&amp;lt;/h1&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;translate&amp;gt;&amp;lt;!--T:67--&amp;gt;&lt;br /&gt;
This template file will be included by the JViewLegacy class. Therefore, here, $this refers to the HelloWorldViewHelloWorld class.&amp;lt;/translate&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== helloworld.xml ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;version&amp;gt;0.0.2&amp;lt;/version&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;translate&amp;gt;&amp;lt;!--T:68--&amp;gt;&lt;br /&gt;
Updates the version number.&amp;lt;/translate&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;filename&amp;gt;controller.php&amp;lt;/filename&amp;gt;&lt;br /&gt;
&amp;lt;folder&amp;gt;views&amp;lt;/folder&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;translate&amp;gt;&amp;lt;!--T:69--&amp;gt;&lt;br /&gt;
Tells installer application to add controller.php and the views/directory&amp;lt;/translate&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;translate&amp;gt;&lt;br /&gt;
==Component Contents== &amp;lt;!--T:70--&amp;gt;&lt;br /&gt;
&amp;lt;/translate&amp;gt;&lt;br /&gt;
&amp;lt;translate&amp;gt;&amp;lt;!--T:71--&amp;gt;&lt;br /&gt;
At this point in the tutorial, your component should contain the following files:&amp;lt;/translate&amp;gt;&lt;br /&gt;
{| border=1&lt;br /&gt;
 | 1&lt;br /&gt;
 | &#039;&#039;[[#helloworld.xml|helloworld.xml]]&#039;&#039;&lt;br /&gt;
 | &amp;lt;translate&amp;gt;&amp;lt;!--T:72--&amp;gt;&lt;br /&gt;
this is an XML (manifest) file that tells Joomla! how to install our component.&amp;lt;/translate&amp;gt;&lt;br /&gt;
 |-&lt;br /&gt;
 | 2&lt;br /&gt;
 | &#039;&#039;[[#site/helloworld.php|site/helloworld.php]]&#039;&#039;&lt;br /&gt;
 | &amp;lt;translate&amp;gt;&amp;lt;!--T:73--&amp;gt;&lt;br /&gt;
this is the site entry point to the Hello World! component&amp;lt;/translate&amp;gt;&lt;br /&gt;
 |-&lt;br /&gt;
 | 3&lt;br /&gt;
 | &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Developing_a_Basic_Component#index.html|site/index.html]]&#039;&#039;&lt;br /&gt;
 | &amp;lt;translate&amp;gt;&amp;lt;!--T:74--&amp;gt;&lt;br /&gt;
prevents web server from listing directory content&amp;lt;/translate&amp;gt;&lt;br /&gt;
 |-&lt;br /&gt;
 | 4&lt;br /&gt;
 | &#039;&#039;[[#site/controller.php|site/controller.php]]&#039;&#039;&lt;br /&gt;
 | &amp;lt;translate&amp;gt;&amp;lt;!--T:75--&amp;gt;&lt;br /&gt;
file representing the controller&amp;lt;/translate&amp;gt;&lt;br /&gt;
 |-&lt;br /&gt;
 | 5&lt;br /&gt;
 | &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Developing_a_Basic_Component#index.html|site/views/index.html]]&#039;&#039;&lt;br /&gt;
 | &amp;lt;translate&amp;gt;&amp;lt;!--T:76--&amp;gt;&lt;br /&gt;
prevents web server from listing directory content&amp;lt;/translate&amp;gt;&lt;br /&gt;
 |-&lt;br /&gt;
 | 6&lt;br /&gt;
 | &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Developing_a_Basic_Component#index.html|site/views/helloworld/index.html]]&#039;&#039;&lt;br /&gt;
 | &amp;lt;translate&amp;gt;&amp;lt;!--T:77--&amp;gt;&lt;br /&gt;
prevents web server from listing directory content&amp;lt;/translate&amp;gt;&lt;br /&gt;
 |-&lt;br /&gt;
 | 7&lt;br /&gt;
 | &#039;&#039;[[#site/views/helloworld/view.html.php|site/views/helloworld/view.html.php]]&#039;&#039;&lt;br /&gt;
 | &amp;lt;translate&amp;gt;&amp;lt;!--T:78--&amp;gt;&lt;br /&gt;
file representing the view&amp;lt;/translate&amp;gt;&lt;br /&gt;
 |-&lt;br /&gt;
 | 8&lt;br /&gt;
 | &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Developing_a_Basic_Component#index.html|site/views/helloworld/tmpl/index.html]]&#039;&#039;&lt;br /&gt;
 | &amp;lt;translate&amp;gt;&amp;lt;!--T:79--&amp;gt;&lt;br /&gt;
prevents web server from listing directory content&amp;lt;/translate&amp;gt;&lt;br /&gt;
 |-&lt;br /&gt;
 | 9&lt;br /&gt;
 | &#039;&#039;[[#site/views/helloworld/tmpl/default.php|site/views/helloworld/tmpl/default.php]]&#039;&#039; &lt;br /&gt;
 | &amp;lt;translate&amp;gt;&amp;lt;!--T:80--&amp;gt;&lt;br /&gt;
the default view&amp;lt;/translate&amp;gt;&lt;br /&gt;
 |-&lt;br /&gt;
 | 10&lt;br /&gt;
 | &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Developing_a_Basic_Component#index.html|admin/index.html]]&#039;&#039;&lt;br /&gt;
 | &amp;lt;translate&amp;gt;&amp;lt;!--T:81--&amp;gt;&lt;br /&gt;
prevents web server from listing directory content&amp;lt;/translate&amp;gt;&lt;br /&gt;
 |-&lt;br /&gt;
 | 11&lt;br /&gt;
 | &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Developing_a_Basic_Component#admin/helloworld.php|admin/helloworld.php]]&#039;&#039;&lt;br /&gt;
 | &amp;lt;translate&amp;gt;&amp;lt;!--T:82--&amp;gt;&lt;br /&gt;
this is the administrator entry point to the Hello World! component&amp;lt;/translate&amp;gt;&lt;br /&gt;
 |-&lt;br /&gt;
 | 12&lt;br /&gt;
 | &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Developing_a_Basic_Component#index.html|admin/sql/index.html]]&#039;&#039;&lt;br /&gt;
 | &amp;lt;translate&amp;gt;&amp;lt;!--T:83--&amp;gt;&lt;br /&gt;
prevents web server from listing directory content&amp;lt;/translate&amp;gt;&lt;br /&gt;
 |-&lt;br /&gt;
 | 13&lt;br /&gt;
 | &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Developing_a_Basic_Component#index.html|admin/sql/updates/index.html]]&#039;&#039;&lt;br /&gt;
 | &amp;lt;translate&amp;gt;&amp;lt;!--T:84--&amp;gt;&lt;br /&gt;
prevents web server from listing directory content&amp;lt;/translate&amp;gt;&lt;br /&gt;
 |-&lt;br /&gt;
 | 14&lt;br /&gt;
 | &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Developing_a_Basic_Component#index.html|admin/sql/updates/mysql/index.html]]&#039;&#039;&lt;br /&gt;
 | &amp;lt;translate&amp;gt;&amp;lt;!--T:85--&amp;gt;&lt;br /&gt;
prevents web server from listing directory content&amp;lt;/translate&amp;gt;&lt;br /&gt;
 |-&lt;br /&gt;
 | 15&lt;br /&gt;
 | &#039;&#039;[[S:MyLanguage/J3.2:Developing_an_MVC_Component/Developing_a_Basic_Component#admin/sql/updates/mysql/0.0.1.sql|admin/sql/updates/mysql/0.0.1.sql]]&#039;&#039;&lt;br /&gt;
 | &amp;lt;translate&amp;gt;&amp;lt;!--T:86--&amp;gt;&lt;br /&gt;
file allowing to initialise schema version of the com_helloworld component.&amp;lt;/translate&amp;gt;&lt;br /&gt;
 |}&lt;br /&gt;
&lt;br /&gt;
{{notice|&amp;lt;translate&amp;gt;&amp;lt;!--T:18--&amp;gt;&lt;br /&gt;
Please create a pull request or issue at https://github.com/joomla/Joomla-3.2-Hello-World-Component for any code descprepancies or if editing any of the source code on this page.&amp;lt;/translate&amp;gt;}}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;row&amp;quot;&amp;gt; &lt;br /&gt;
&amp;lt;div class=&amp;quot;large-6 columns&amp;quot;&amp;gt;{{Basic button|&amp;lt;translate&amp;gt;&amp;lt;!--T:3--&amp;gt;&lt;br /&gt;
S:MyLanguage/J3.x:Developing_an_MVC_Component/Developing_a_Basic_Component|Prev: Developing a Basic Component&amp;lt;/translate&amp;gt;|class=expand success}}&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;div class=&amp;quot;large-6 columns&amp;quot;&amp;gt;{{Basic button|&amp;lt;translate&amp;gt;&amp;lt;!--T:4--&amp;gt;&lt;br /&gt;
S:MyLanguage/J3.x:Developing_an_MVC_Component/Adding_a_menu_type_to_the_site_part|Next: Adding a menu type to the site part&amp;lt;/translate&amp;gt;|class=expand}}&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;noinclude&amp;gt;&lt;br /&gt;
&amp;lt;translate&amp;gt;&lt;br /&gt;
&amp;lt;!--T:87--&amp;gt;&lt;br /&gt;
[[Category:Joomla! 3.x]]&lt;br /&gt;
[[Category:Joomla! 3.0]]&lt;br /&gt;
[[Category:Joomla! 3.1]]&lt;br /&gt;
[[Category:Joomla! 3.2]]&lt;br /&gt;
[[Category:Joomla! 3.3]]&lt;br /&gt;
[[Category:Joomla! 3.4]]&lt;br /&gt;
[[Category:Beginner Development]]&lt;br /&gt;
[[Category:Component Development]]&lt;br /&gt;
[[Category:Tutorials]]&lt;br /&gt;
[[Category:Tutorials in a Series]]&lt;br /&gt;
&amp;lt;/translate&amp;gt;&lt;br /&gt;
&amp;lt;/noinclude&amp;gt;&lt;/div&gt;</summary>
		<author><name>Stan31337</name></author>
	</entry>
</feed>