Updated 040 Adding Helper Structures to any JCB component (markdown)

Amigo 2019-08-03 09:35:06 +02:00
parent a9da46ddfe
commit 8d763f2573
1 changed files with 3 additions and 5 deletions

@ -60,13 +60,11 @@ What has happened in the code? If the 'com_demo_v2_0_0_J3.zip' package of a comp
[00:13:48](https://www.youtube.com/watch?v=nw9YPu9emws&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h13m48s)
To illustrate what happens if the component is no longer installed, and a attempt is made to compile it: First thing is to uninstall the Demo Component. Then go to the compiler and try and compile Demo Component. It will indicate 'An error has occurred' and that it could not find "Table 'demo.#_demo_help_document'doesn't exist". [00:14:24](https://www.youtube.com/watch?v=nw9YPu9emws&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h14m24s) It could not find that table because it has been uninstalled. The only way to compile this component would be to go back to the Admin View, and 'delink' the component from the table.<<<<<<<<<<<
To illustrate what happens if the component is no longer installed, and a attempt is made to compile it: First thing is to uninstall the Demo Component. Then go to the compiler and try and compile Demo Component. It will indicate 'An error has occurred' and that it could not find "Table 'demo.#_demo_help_document'doesn't exist". [00:14:24](https://www.youtube.com/watch?v=nw9YPu9emws&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h14m24s) It could not find that table because it has been uninstalled. The only way to compile this component would be to go back to the Admin View, and 'delink' the component from the table. Remember to compile the component before you uninstall the component which you are linking to. We are linked to the installed components table. [00:14:55](https://www.youtube.com/watch?v=nw9YPu9emws&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h14m55s) Use a Dump file to avoid this , instead of linking to the table. Select 'Dump' and open the 'sql' file that it created, and copy the values from that file. Paste those values in here MySQL. [00:15:28](https://www.youtube.com/watch?v=nw9YPu9emws&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h15m28s) You could leave a comment or even leave a comment out. Save and close. Even if the component is uninstalled it will still be possible to compile and still have this Demo or Shipping values of the component in place. Let's compile it again. This time it compiled without any errors. [00:16:04](https://www.youtube.com/watch?v=nw9YPu9emws&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h16m04s) If the 'com_demo_v2_0_0_J3.zip' package is opened, and then open 'install.mysql.utf8.sql' file. It may be seen that it added that Dump Values right back into the file, and that is exactly what it should do. This was just to demonstrate how to add a Help Menu Structure to any JCB Component. [00:16:45](https://www.youtube.com/watch?v=nw9YPu9emws&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h16m45s)
### NS. Compile The Component Before Uninstall Components
You could do that without purchasing the Sermon Distributor Component. The only part that really is necessary, is to create a Helper Document, and of course this Helper Document that is used from the Sermon Distributor Package has custom scripting in it. It is this custom scripting that makes it adaptable to any other Component.<<<<<
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](https://www.youtube.com/watch?v=nw9YPu9emws&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h14m55s) 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](https://www.youtube.com/watch?v=nw9YPu9emws&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h15m28s) 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](https://www.youtube.com/watch?v=nw9YPu9emws&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h16m04s) 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](https://www.youtube.com/watch?v=nw9YPu9emws&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h16m45s)
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](https://www.youtube.com/watch?v=nw9YPu9emws&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h17m18s) 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](https://www.youtube.com/watch?v=nw9YPu9emws&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h17m42s) have a little perspective on how to setup user groups.
I can quickly show you which areas this custom scripting must go, [00:17:18](https://www.youtube.com/watch?v=nw9YPu9emws&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h17m18s) 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](https://www.youtube.com/watch?v=nw9YPu9emws&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h17m42s) have a little perspective on how to setup user groups.
### JCB Detects If It Is A Help Document