From 1e963a9d3034cbae6955590da99f8cdf2aa0f071 Mon Sep 17 00:00:00 2001 From: Amigo <49749100+aamigo@users.noreply.github.com> Date: Fri, 26 Jul 2019 09:07:48 +0200 Subject: [PATCH] Updated 032 JCB manual custom code implementation (markdown) --- 032-JCB-manual-custom-code-implementation.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/032-JCB-manual-custom-code-implementation.md b/032-JCB-manual-custom-code-implementation.md index 59cec5e..59328b7 100644 --- a/032-JCB-manual-custom-code-implementation.md +++ b/032-JCB-manual-custom-code-implementation.md @@ -2,7 +2,8 @@ ### Brief Explanation -[00:00:00](https://www.youtube.com/watch?v=KiAtJawZ3oo&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h00m00s) +[00:00:01](https://www.youtube.com/watch?v=KiAtJawZ3oo&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h00m01s) + 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.