Updated 4a. JCB Demo Component Directory, Folders and Files (markdown)

Joseph Geller
2018-09-25 12:04:58 -05:00
parent 5d7b43259d
commit dc42a12d18

@@ -271,10 +271,6 @@ Beneath the directory structure and files presented next you will find a short e
\router.php \router.php
*** ***
Always keep in mind, JCB is doing most of the tasks related to items below referring to Joomla directories, files, classes, methods and properties. You do not have to, for example, put an index.html file in the root of every directory; you are not required to add the check for direct access to the file; you do not have to write code for the admin or site views unless you extend JCB with your own custom code. Always keep in mind, JCB is doing most of the tasks related to items below referring to Joomla directories, files, classes, methods and properties. You do not have to, for example, put an index.html file in the root of every directory; you are not required to add the check for direct access to the file; you do not have to write code for the admin or site views unless you extend JCB with your own custom code.
When combined with the leverage JCB has by reusing Joomla's MVC paradigm and adding the required structures and code to your own components required by Joomla! for you, a myriad of tasks are taken care of that you would otherwise spend valuable time doing, instead of focusing on your own code and and the logic required for it to execute properly. That's where elimination of time spent with these types of repetitive tasks and coding while reusing the code in the Joomla! API, greatly reduces your project's time-line.
Later, after viewing the remaining videos and the chapters that accompany each in this manual you'll have acquired mastery of even more JCB features and functions, not to mention the understanding and use of the Joomla! API in your own component's code.
*** ***
**index.html** - File containing one line of HTML that blocks directory view. Must be in root of each folder. **index.html** - File containing one line of HTML that blocks directory view. Must be in root of each folder.
@@ -283,7 +279,17 @@ Later, after viewing the remaining videos and the chapters that accompany each i
defined('_JEXEC') or die('Restricted access'); defined('_JEXEC') or die('Restricted access');
*** ***
## \demo.php ## \demo.php
### JCB - Editing the Site View, is where the site view entry point for the JCB Demo component is defined. This code has been inserted in JCB for you. It displays the site view named looks, which allows displaying the site view looking and the admin view look so one can edit their own look record in the looks_demo table. If access is given in Joomla!'s ACL to the JCB Demo component, the edit button displays below the name and description. It must first be added as a menu item to Joomla! It is suggested to add a user to Joomla! that is in the registered group. The created and modified by columns in the demo_look table in the Joomla! database for the owner must be changed to the one for a user after the super administrator enters a look record to edit it. Each user must be the owner and for now, the look record is entered by a different owner, super administrator so, so it must be changed to be visible. This brings up the matter of access control levels or ACL in Joomla! See the text after the view for information or you will not be able to edit a look despite owning it. ### Let's look at JCB, Editing the Site View; it's where the site view entry point for the JCB Demo component is defined. This code has been inserted in JCB for you. You will need to supply code for your own components and this code provides the basic elements required. You can:
* Login to admin as super administrator and create a look.
* Add a registered user.
* Create a Joomla! menu item for the demo component looks, access should be registered.
* Update the look table with the registered user is in created by and modified by columns if the table.
* Login as the registered user, select the looks option from the main menu and the following should display:
- The site view looks
- The site view looking
\ and the admin view look so one can edit their own look record in the looks_demo table. By default, access control is only allowed for the super administrator. If access is given in Joomla!'s ACL to the JCB Demo component for let's say the registered group of Joomla! users, the edit button will display below the name and description. This brings up the matter of access control levels or ACL in Joomla! See the text after the view for information or you will not be able to edit a look despite owning it.
Custom Script Custom Script
Add PHP (after getting the items)* Add PHP (after getting the items)*