Updated 055 Dynamic File and Folder Inclusion concept (markdown)

Amigo 2019-09-06 13:59:12 +02:00
parent cae52e7e06
commit 36459d2bfc

@ -7,21 +7,21 @@
I would like to introduce you to a feature that we have been working on for quite some time now. Most of the features already existed for quite a while. It is just that I have been trying to make it stable so that it will work well. [00:00:32](https://www.youtube.com/watch?v=_c7wzW075lA&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h00m32s) In doing so I had to extend it a bit. This feature has two or three concepts that I would like to explain. [00:00:49](https://www.youtube.com/watch?v=_c7wzW075lA&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h00m49s) It is about adding dynamic files, folders or even external files which maybe is on a website or on GitHub, and you want the content from that file and add it as code or even as a file to your system.[00:01:17](https://www.youtube.com/watch?v=_c7wzW075lA&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h01m17s)
I am working with components that are pulling data from all over the place. Most of these features are really what I needed to get projects going. [00:01:39](https://www.youtube.com/watch?v=_c7wzW075lA&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h01m39s)<<<<<<<<
Trying to save myself the time that I don't need to copy, paste, and move things around to ensure that it's a correct copy being used and on compilation. JCB itself is maybe one of the best explanations. Let's look at this. You know that there is a feature that you can add files and folders. This feature is like I said it's always been there. [00:02:03](https://www.youtube.com/watch?v=_c7wzW075lA&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h02m03s) But currently I have expanded this by adding an Advance tab to this feature. It's got this Basic tab which is the normal one. If you watched some of the previous tutorials, the older tutorials, I did explain how this works, and how you get these files. I'm not going to go into that.
I am working with components that are pulling data from all over the place. Most of these features are really what I needed to get projects going. There is a feature that can be used to add files and folders. This feature has always been there. [00:02:03](https://www.youtube.com/watch?v=_c7wzW075lA&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h02m03s) But currently I have expanded this by adding an Advance tab to this feature. It got this Basic tab which is the normal one. I did explain in previous tutorials, how you get these files.
### New Area - Advance
[00:02:24](https://www.youtube.com/watch?v=_c7wzW075lA&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h02m24s)
There is now a new area called Advance. [00:02:35](https://www.youtube.com/watch?v=_c7wzW075lA&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h02m35s) Advance area is able to grab files from anywhere in your system an add it to the component. It can be files outside of the root directory of your Joomla website.
There is now a new area called 'Advance'. [00:02:35](https://www.youtube.com/watch?v=_c7wzW075lA&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h02m35s) The 'Advance' area is able to grab files from anywhere in your system an add it to the component. It can be files outside of the root directory of your Joomla website. <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
### Note - Adding Files
[00:02:53](https://www.youtube.com/watch?v=_c7wzW075lA&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h02m53s)
Just being sure that the PHP which usually is a php has permission, has the right to the file and can read it. This is the only thing. But for most cases we won't need to grab files outside of the Joomla root directory, because we just editing a custom script, custom file inside of our Joomla Component which we've created. [00:03:24](https://www.youtube.com/watch?v=_c7wzW075lA&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h03m24s) But this file or this folders are not generated by JCB. We want those files where they are actively running inside of our component. We want them to be taken and put into the package without us having to move it around. That's what this featuring will now do. So you can like a I'm doing here(see video). You can use constants, [00:03:52](https://www.youtube.com/watch?v=_c7wzW075lA&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h03m52s) you'll see there's a little note here, that tells you that. That you can use constant paths and the full path directly without quotes. That means you don't need to do like in PHP, you do something like that, and you put this part in quotes, like that. Well you don't need to do any of that. You put the constant directly like that and the compiler will deal with this [00:04:21](https://www.youtube.com/watch?v=_c7wzW075lA&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h04m21s) and make it right. You can do that also with folders as well as with files.
Just make sure that the PHP has the right to the file and can read it(See Video). But for most cases it is not necessary to grab files outside the Joomla root directory, because we are just editing a custom file inside of our Joomla Component which we have created. [00:03:24](https://www.youtube.com/watch?v=_c7wzW075lA&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h03m24s) But this file or this folders are not generated by JCB. We want those files where they are actively running inside of our component. We want them to be taken and put into the package without us having to move it around. So you can like a I am doing here(see video). [00:03:52](https://www.youtube.com/watch?v=_c7wzW075lA&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h03m52s), There is a note; '_Please note... use constant paths_'. That you can use constant paths and the full path directly without quotes. That means you do not need to do like in PHP,(follow on video) <<<<<<<<<
you do something like that, and you put this part in quotes, like that. Well you don't need to do any of that. You put the constant directly like that and the compiler will deal with this [00:04:21](https://www.youtube.com/watch?v=_c7wzW075lA&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h04m21s) and make it right. You can do that also with folders as well as with files.
### Need To Set The Target Path And Relation To The Zip Package