Updated 032 JCB manual custom code implementation (markdown)

Amigo 2019-08-07 14:57:04 +02:00
parent 43e55c0bc7
commit fa58364073

@ -3,6 +3,7 @@
### Brief Explanation
[00:00:01](https://www.youtube.com/watch?v=KiAtJawZ3oo&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h00m01s)
(_Click on this time links to see Youtube video_)
Automatic import of custom code during compilation. This is one of the latest features that has been added to the JCB component. Although all its functionality is in place there is currently some limitations which exist that need to be explained. First, what does it accomplish? It actually mutated from that which its original purpose had been and became two things.[00:00:52](https://www.youtube.com/watch?v=KiAtJawZ3oo&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h00m52s) The first thing is, (and this is obviously what was initially intended) that it will be possible to add code to the component once it has been compiled and installed into that same Joomla website, then to be able to go into that code, with a few placeholders add code, that once the component is compiled again, JCB would dynamically grab that code, extract it into its database, store it there and from there on forward continue to add it back into the component every time. [00:01:43](https://www.youtube.com/watch?v=KiAtJawZ3oo&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h01m43s)The way it have been done was that the line numbers had not been used as the main way of determining where that code must be added. The reality is that the line numbers will always change. It may be Custom code that is added, for instance line '105', and if it is made to change at line '20', that means all the code moves down of course and it is impossible to know where to add your code without either writing over or placing it before, there are all kinds of complications. So the only way to resolve that is to create what had been initially called the fingerprint, but later became a hash reference of the code, a few lines of code above the custom script, and a few lines of code below the customs. [00:02:50](https://www.youtube.com/watch?v=KiAtJawZ3oo&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h02m50s) It varies from how many lines it uses. There is a reason for it.