-
-
Notifications
You must be signed in to change notification settings - Fork 178
040 Adding Helper Structures to any JCB component
Recently an inquiry about Help Menu integration for JCB Components has been made. As may be seen JCB has this Help Document area. Time does not allow to expand upon this Help Document area, perhaps it may be done in future. It is a feature that is very easily added to any other JCB Component.
If you have not purchased the Sermon Distributor Package, there is a place, one of the repositories on the VDM data, called JCB-Packages. Go to vdm-io, and then JCB-Packages on GitHub. Open 'Home' and then under Services, to find JCB-Packages. One of the packages is Sermon Distributor. This package can be downloaded but it can only be used when a key is purchased for it. 00:01:18 This key may be obtained at this link: http://vdm.bz/jcb-packages. There are a few packages available which are fully mapped components in JCB.00:02:13 If this is purchased all information and code and whatever may be necessary will be included which will help you to install the Sermon Distributor Package.
I am going to install the Sermon Distributor Package on this Demo website. This will not be demonstrated here, since all the instructions are included once you have installed the Sermon Distributor Package.
Admin Views has this new admin view called 'Help Document'. JCB have this Demo Component by default. To demonstrate it: This Demo Component is opened and a Helper structure is added to it. Presently it does not have any Helper structure. It is just a Demo Component with only a few structures.00:03:28 It only has that Admin View and one view called 'Look'. It does not have a Custom view, but it got a Site view called 'Looks' and 'Looking'. First, go to the Admin Views and click '+' to add another row. We are going to add the View - Help Documents, the support icon.
If this un-ticked problem shows up, just close that and open it again and all those tick boxes will be in place. Repeatable fields will be phased out and you will end up working with sub forms in future.<<<<<<<<
I'm going to add that 00:04:19 View - Help Document, we going to use the support Icon, and we going to leave most of this to defaults, except it doesn't have Metadata, we don't use Access. We can do the Import, but it doesn't have a front end editing. We don't want it to have one and we would have it in the 2nd position. Maybe not part of the Main Menu. We'll 00:04:52 save this. We'll save and close. That's all it takes. You've just install the Sermon Distributor Package into your JCB, that added the Help Document Admin View, and I've just linked that view to the demo component. I'll go to the Compiler. I'm going to compile that demo component. As you can see here, it isn't yet installed on my website. This is quite important not to have it in installed on the website. I'm going to compile it, then I'm going to install it. 00:05:43
Now if I go to Demo, we will see that it has this new Help Documents area. At the moment it doesn't have any Help Documents. What we can do to change that, is we can then go to the Help Documents, click New, and when it is opened, we'll select which group you want to Target. I'm just going to select all. Then I'm going to select in Location, Admin Area which I want to target a view. The Demo will be the Desk Dashboard. Then there is Help Documents. 00:06:23 There is Import. I'm going to take Looks. I'm going to target Looks area. I can give it a title. I can say what type of help do I want, I want a link to an Joomla article, want to put in my own custom text, or I want a link to an external URL.
This is usually what we will use when we ship a component. Since this will then give us the opportunity to link it to an external URL which we can update an edit without sending an update or an upgrade to the component. We can just change the help pages which we linked them to. This is how JCB is been setup. JCB is linking to an external Help Structure but you can decide whatever you want to do with this component.
You could say text for 00:07:20 example, and you could say "This is the help you need" and whatever. Save and close. If we go to Looks, we'll see automatically there is a new button called Help. If we click on it, it opens that Help. 00:07:47 You can go back to if you click on New then that Help menu won't show anymore. But you can close out, and you can then go back to the Help Documents, create another one. Again select or you could target a specific group, or you can target all groups. Again Admin area you can also target the Site area, and be able to link it to any of the front end areas. We can say now we don't want to 00:08:32 target the list(Looks), but the edit area(Look) which is singular. Again we can say give it a title. This time let me link it to an URL. Save and close. Let's go to Looks area, add New, and now we see that area also has a Help button. If we click on it, it opens that URL 00:09:13 in a pop-up, and as you see I just selected a video. That is how you can link to other external sources to be giving the Help to the specific page in the instructions that is necessary.
- Remember to Compile Before Install
Having set up a few Help Menus for the Component you can go back to Component Builder and to the Admin View 00:09:46 Area, and let's say you have a Help Document linked to Component Demo, you want to ship it with the information that you've created as Help inside of the Component. What I would do is, I would open this Admin View, and I'll give it a system name of demo. I'll go to MySQL(add MySQL), 00:10:31 say yes, I wanted to link it. I'll select MySQL source - Table. I would go to the Demo Table, select a Table. You see demo_help_document click on that, and I'll just remove some of the values that I know is not necessary.(See video) Created modified and version can stay. Save and close. I can save this or save as copy. If I have another component, I'll copy Help Document(demo) and link it to that components database. The only thing to remember when you've done this 00:11:36 Is it is you must first compile the component before you uninstall the local component. First come here(Compiler) and compile that(demo) component.
Let me quickly show you in the code what is happened. I've opened com_demo_v2_0_0_J3.zip package of a component. Go to Admin area, then to sql. Then I go to the install.mysql.utf8.sql document. Double clicked on that. It open this document. You'll see that they has 00:12:25 Insert Table. It also has Insert Data that we created. There is 'this is the help you need', there's a URL I added. It will insert this data into the database when this component is installed. 00:12:50 Having done those changes and linking the table to the component, it goes to the database and extract these values and places into the dump file of the Component. It does not place it into the update file, just that you know. That means that if users already have your component installed and they install this, it will not add these helper structures, you'll have to use Custom Scripting in the Joomla Component Area in the PHP tab. There is a place for update and uninstalled and installed 00:13:40 to add Custom PHP Script, where you can insert this data into the Database.
I'm going to show you what happens if the component is no longer installed, and you try to compile it. The first thing is I'm going to quickly uninstalled the Demo Component. I'm going to go to the compiler. I'm going to try and compile Demo Component. It will give 'An error has occurred'. It's telling you that it couldn't find "Table 'demo.#_demo_help_document'doesn't exist". 00:14:24 It couldn't find that table because you uninstalled it. The only way to compile this component would be to go back to the Admin View, and delink the component from the table.
Like I said make sure to compile the component before you uninstall the component which you are linking to. We linked to the installed components table. The other way to try and avoid this 00:14:55 is to instead of linking to the table, is to use a Dump file. I would click on Dump. Open your sql file that it created, and copy the values from that file or cut whatever. Paste those values in here MySQL. 00:15:28 You could leave a comment or even leave a comment out. This way if we save and close, we will even if the component is uninstalled, be able to compile. And still have this Demo or Shipping values of the component in place. Let's try compiling it again. This time it compiled without any errors. 00:16:04 If we go open the com_demo_v2_0_0_J3.zip package, Admin, sql, and then open install.mysql.utf8.sql file. We will see that it added that Dump Values right back into the file, and that's exactly what you would like it to do. This was just to demonstrate how to add a Help Menu Structure to any JCB Component. 00:16:45
You could do that without purchasing the Sermon Distributor Component. The only part that really is necessary, is for you to create a Helper Document, and of course this Helper Document that we are using from the Sermon Distributor Package has custom scripting in it. And it's this custom scripting that makes it adaptable to any other Component. I can quickly show you which areas this custom scripting must go, 00:17:18 but I would rather want you to buy the Components Package. It's in a relation to the Articles, and to the Site Views, and the Admin View, that we have Custom Fields that are a little tricky, as well as the user group. You need to 00:17:42 have a little perspective on how to setup user groups.
Admin View and Site View are the two areas that are difficult as well as the Articles. When JCB detects that this is a Help Document, and it detects those specific field values that are set up correctly, then it automatically build some of the front-end necessary concepts as well as adding this dynamic behavior in the back end. I hope this helps to at least show you that it is very doable, the adding in help 00:18:25 structure to a component. What I think makes this quite unique is that the component then ships with this pre-built in Help Structure, but the user that uses your component, he might want to give extra help or little different kind of help to the front end users of his Website, and he will be having access to this Help Area and editing it and changing it to the correct wording and expectations that he might have. 00:18:59 That is the way that you could add Helper structures to your JCB components.
- Home
- Beta Testing
- Custom Code
- PHP Settings
- Demo Component
-
Tutorials
- Hello World JCB
- Intro JCB Guide
- JCB Installation Steps
- Planning Components
- Field Type Overview
- Basic Fields Creation
- Admin View Management
- Advanced Field Usage
- Admin Component Integration
- Component Setting Customization
- Scripting Components
- Component FTP Options
- Dynamic Get Method
- Site View DynamicGet
- Site View Templates
- Template Setup Guide
- Layout Configuration Steps
- Custom Admin Management
- Adding Site Views
- Custom Admin Integration
- MySQL Demo Tweaking
- Global JCB Settings
- Custom Time Field
- User Helper Integration
- Email Helper Usage
- Message Store Email
- List View Unescape
- Export Import Customization
- Overwrite Custom Fields
- List Field Filtering
- Automatic Code Import
- Manual Code Implementation
- Component Export Import
- Custom Admin Buttons
- Translation Management
- Site View Permissions
- Component SQL Updates
- Site Edit Configuration
- JCB Backup System
- Helper Structure Integration
- JCB v2.5 Upgrade
- Tab Setup Guide
- JCB v2.6 Release
- Extended HelloWorld
- Field Rule Validation
- Community Snippets Intro
- Snippet Forking Tutorial
- Pull Request Snippets
- Library Manager Area
- Excel-based Translation
- Dynamic Router Details
- Database Auto Updates
- Subform Quick Demo
- VDM Package Import
- Dynamic File Inclusion
- File Field Upload
- Drag-n-Drop Upload
- Quick HelloWorld JCB
- Non-database Fields
- Dashboard Customization
- Menu Prefix Toggle
- Community JCB Packages
- Collaborative JCB Workflow
- JCB Package Install
- JCB JAB18 Event
- Convenient New Fields
- Component Language Strings
- Library Functionality Anticipation
- Join Field Relations
- License Template Change
- Code Reusability
- Local Dev Environment
- Extended Field Types
- Joomla Custom Fields
- Custom Field Expansion
- Site View Listing
- Run Expansion Method
- Form Site View
- Field URL Update
- Additional Helper Methods
- Field Validation Rules
- New Placeholder Feature
- Component Config Params
- Per-field Default Values