Updated 012 Component FTP and more (markdown)
parent
8dac3ef666
commit
e827523a79
@ -2,19 +2,19 @@
|
|||||||
|
|
||||||
### Adding README Script
|
### Adding README Script
|
||||||
|
|
||||||
Next in the component view we are going to add the README script to a component. The README script is commonly used as the components homepage. If you were to go to Github for example, let's open Github. We are on the demo components page on Github, and you'll see that it has this nice image here, and it has some details and some layout. Now this all is done with the README file. It's with this file here(README). We can open that and then look at the Raw. Here you can see it's basically the same text this we looking at previously. [00:00:53](https://www.youtube.com/watch?v=hzbZlLl-xlA&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h00m53s) Inside of component builder you can add this README and README text. This is placeholders(###version###).
|
Next in the component view we are going to add the README script to a component. The README script is commonly used as the components homepage. For example: If you were to go to the demo components page on Github, and see that it has this nice image here(See video) and it has some details and some layout. Now this all is done with the README file. We can open that and then look at the 'Raw'. It is basically the same text that we were looking at previously. [00:00:53](https://www.youtube.com/watch?v=hzbZlLl-xlA&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h00m53s) Inside of component builder you can add this README and README text. This is placeholders(###version###).
|
||||||
|
|
||||||
### Place Holders
|
### Place Holders
|
||||||
|
|
||||||
Now I know that(#) is part of the markdown for a header. You need to know a little bit about markdown. You need to you know what is placeholders and what is not. That is why I added the script so you can get an idea of everything that are placeholders. [00:01:27](https://www.youtube.com/watch?v=hzbZlLl-xlA&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h01m27s) These placeholders are automatically updated from the details that are in these fields here. You can see the actual placeholders names. It's nice, if you change the version here, it'll updated there automatically. So that is just README file.
|
Now (#) is part of the markdown for a header. You need to be acquainted with Markdown, to know what is placeholders and what is not. This script has been added in order for you to get an idea of everything that are placeholders. [00:01:27](https://www.youtube.com/watch?v=hzbZlLl-xlA&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h01m27s) These placeholders are automatically updated from the details that are in these fields. The actual placeholder names can be seen. If you change the version here(See video), it will be updated there automatically. So that is a README file.
|
||||||
|
|
||||||
### Component-Builder Link Back Info
|
### Component-Builder Link Back Info
|
||||||
|
|
||||||
Really a place for you to give a lot of information to those who are using your [00:02:01](https://www.youtube.com/watch?v=hzbZlLl-xlA&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h02m01s) application. Maybe you can add some links to it, or you could add some links to help menus, or even instructions on installing it, or anything else that you'd like to share through the README file. I would ask if it's not too much for you to leave this area, this commenting, the more people using component builder, the more involve within a community. Others getting this training set. Help us to sustain this project. If [00:02:36](https://www.youtube.com/watch?v=hzbZlLl-xlA&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h02m36s) you leave that in, it will certainly be helpful. You are not compulsory, I mean it's only if you want to.
|
It is a place to give a lot of information to those who are using your application.[00:02:01](https://www.youtube.com/watch?v=hzbZlLl-xlA&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h02m01s) You can add some links to it, or you can add some links to help menus, or even instructions on installing it, or anything else that you like to share through the README file. Although it is not compulsory , it will be appreciated if this commenting area can be left as it is, in order for more people to get involved in the community. Help us to sustain this project. If [00:02:36](https://www.youtube.com/watch?v=hzbZlLl-xlA&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h02m36s)
|
||||||
|
|
||||||
### Markdown Info
|
### Markdown Info
|
||||||
|
|
||||||
Then if you want to know more about markdown, then you can open this link here(Markdown-Cheatsheet). It shows you a little bit of cheat sheet of everything that you can do. That is looking at the README area.
|
Then if you want to know more about markdown, then you can open this link here(Markdown-Cheatsheet). That is looking at the README area.
|
||||||
|
|
||||||
### Admin - Site Views Adding Editing
|
### Admin - Site Views Adding Editing
|
||||||
|
|
||||||
@ -36,7 +36,7 @@ The backup and the Git folder is actually set up in your components global optio
|
|||||||
|
|
||||||
Then you have folder paths. These two first folder paths, called compiler folder and custom folder, I would leave them for now, they are a little buggy. I haven't fully managed to achieve them being flexible. To move them at this stage is difficult. For a number of reasons I would suggest you just leave them blank. But here you would add a backup folder. This should be related to the root of your server. As well as a Git folder. [00:09:41](https://www.youtube.com/watch?v=hzbZlLl-xlA&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h09m41s) Git folder would be where component builder creates a folder with all the components files without zipping them. And then you can go to that folder and create a Git create, a Git repository there. From that folder you can push to Github or any other Git server respectively. It's able to create a folder from which you can do Github or any other kind of repository work. Which are separate from your backup folder and also separate from the temporary folder in which [00:10:17](https://www.youtube.com/watch?v=hzbZlLl-xlA&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h10m17s) compiles the component. You can move it out of your Joomla install. That's what these folder paths are for. So when you do the compiling of the component it does that Git repository. It won't delete the .Gitfolder, it will just replace all the files in it. First remove the old ones then add the new ones and Git will see that only the files that is been changed, it will notice and those who you need to do a recommit, do just a normal commit to get it into your repository. If you don't know Git, then possibly it doesn't make sense to you. There's some great courses as well about Git on lynda.com as well as Udome. You can just go look in at those. That's a backup folder and the sales server. The same goes here with this FTP [00:11:18](https://www.youtube.com/watch?v=hzbZlLl-xlA&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h11m18s) credentials should be that direct folder in which these zip files should be stored. Unfortunately component builder cannot store it in subfolders at this point. The FTP details will just login to that FTP account, and in that folder which has the access you'll put the file there. No subfolders or other folders, the FTP details should be going directly to the folder. In the component builder, then will be in the back end components, component builder and then Helpers. There is a file called compiler. If you open that file, [00:12:14](https://www.youtube.com/watch?v=hzbZlLl-xlA&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h12m14s) you would see that we have a function here builtme. Here's all the placeholders that you can use in the builtme file, and will be replaced with the relative information.
|
Then you have folder paths. These two first folder paths, called compiler folder and custom folder, I would leave them for now, they are a little buggy. I haven't fully managed to achieve them being flexible. To move them at this stage is difficult. For a number of reasons I would suggest you just leave them blank. But here you would add a backup folder. This should be related to the root of your server. As well as a Git folder. [00:09:41](https://www.youtube.com/watch?v=hzbZlLl-xlA&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h09m41s) Git folder would be where component builder creates a folder with all the components files without zipping them. And then you can go to that folder and create a Git create, a Git repository there. From that folder you can push to Github or any other Git server respectively. It's able to create a folder from which you can do Github or any other kind of repository work. Which are separate from your backup folder and also separate from the temporary folder in which [00:10:17](https://www.youtube.com/watch?v=hzbZlLl-xlA&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h10m17s) compiles the component. You can move it out of your Joomla install. That's what these folder paths are for. So when you do the compiling of the component it does that Git repository. It won't delete the .Gitfolder, it will just replace all the files in it. First remove the old ones then add the new ones and Git will see that only the files that is been changed, it will notice and those who you need to do a recommit, do just a normal commit to get it into your repository. If you don't know Git, then possibly it doesn't make sense to you. There's some great courses as well about Git on lynda.com as well as Udome. You can just go look in at those. That's a backup folder and the sales server. The same goes here with this FTP [00:11:18](https://www.youtube.com/watch?v=hzbZlLl-xlA&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h11m18s) credentials should be that direct folder in which these zip files should be stored. Unfortunately component builder cannot store it in subfolders at this point. The FTP details will just login to that FTP account, and in that folder which has the access you'll put the file there. No subfolders or other folders, the FTP details should be going directly to the folder. In the component builder, then will be in the back end components, component builder and then Helpers. There is a file called compiler. If you open that file, [00:12:14](https://www.youtube.com/watch?v=hzbZlLl-xlA&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h12m14s) you would see that we have a function here builtme. Here's all the placeholders that you can use in the builtme file, and will be replaced with the relative information.
|
||||||
|
|
||||||
### Component Builder Compiler.PhP FTP Info
|
### Component Builder Compiler.PHP FTP Info
|
||||||
|
|
||||||
There is a function here called move file to FTP server. This move file to FTP server, calls another function called: getFTP. Now getFTP is this function here, it takes the signature, checks whether we already made such a connection before. And then loads that object. But here I'm using this parse string function to convert the string into the variables. All the variables in that string is converted to arrays or variables respectively. [00:13:12](https://www.youtube.com/watch?v=hzbZlLl-xlA&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h13m12s) That then is used to make use of Joomlas own client FTP class. If you want to know where that is, you can in NetBeans you'd click control spacebar. It shows you it's in libraries/Joomla/client/FTP.PHP. You can click there, open it, so we are using Joomlas built-in FTP client, and we passing the host, the port, the option, the username, the password, and making a connection. Then we sending that off to do this move file, which then takes the file content and moves it to the server. That's just for your own piece of mind that the data itself is not being leaked or compromised. [00:14:04](https://www.youtube.com/watch?v=hzbZlLl-xlA&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h14m04s) It's all handled right here and you can follow its events in component builder, from relations to the update server as well as to the sales server.
|
There is a function here called move file to FTP server. This move file to FTP server, calls another function called: getFTP. Now getFTP is this function here, it takes the signature, checks whether we already made such a connection before. And then loads that object. But here I'm using this parse string function to convert the string into the variables. All the variables in that string is converted to arrays or variables respectively. [00:13:12](https://www.youtube.com/watch?v=hzbZlLl-xlA&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h13m12s) That then is used to make use of Joomlas own client FTP class. If you want to know where that is, you can in NetBeans you'd click control spacebar. It shows you it's in libraries/Joomla/client/FTP.PHP. You can click there, open it, so we are using Joomlas built-in FTP client, and we passing the host, the port, the option, the username, the password, and making a connection. Then we sending that off to do this move file, which then takes the file content and moves it to the server. That's just for your own piece of mind that the data itself is not being leaked or compromised. [00:14:04](https://www.youtube.com/watch?v=hzbZlLl-xlA&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h14m04s) It's all handled right here and you can follow its events in component builder, from relations to the update server as well as to the sales server.
|
||||||
|
|
||||||
@ -46,4 +46,4 @@ The other thing that I know is quite in important. Is this update server, it is
|
|||||||
|
|
||||||
Now the way for you to think about this, if you have a new version 1.2.9, [00:15:43](https://www.youtube.com/watch?v=hzbZlLl-xlA&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h15m43s) then there needs to be a table alteration. You need to know if MySQL commands to do that. I'm not going to teach you that. You just need to put that MySQL command in here(MySQL - Update Dump) according to the Joomla conventions. The table name must have that #_ _ in front of it and Joomla will dynamically put in the prefix. You might just simply will do a MySQL script here. If you are making a change and the new release is 1.2.9 and 1.0 didn't have that [00:16:23](https://www.youtube.com/watch?v=hzbZlLl-xlA&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h16m23s) specific field or view, then you must realize that you're updating this one and the SQL must come next to that specific version. The update must be placed at the version, which needs the update. If you make a change don't put it here(1.2.9), because it won't update correctly. You need to put the update next [00:16:44](https://www.youtube.com/watch?v=hzbZlLl-xlA&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h16m44s) to the version(1.0) that needs to be updated. Then over here(Version URL), you would put the link to the respective downloads. Like here we have version 1.2.9 and then we have version 1.3.0 [00:16:59](https://www.youtube.com/watch?v=hzbZlLl-xlA&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h16m59s)and we added the 1.3.0 link heresee video).
|
Now the way for you to think about this, if you have a new version 1.2.9, [00:15:43](https://www.youtube.com/watch?v=hzbZlLl-xlA&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h15m43s) then there needs to be a table alteration. You need to know if MySQL commands to do that. I'm not going to teach you that. You just need to put that MySQL command in here(MySQL - Update Dump) according to the Joomla conventions. The table name must have that #_ _ in front of it and Joomla will dynamically put in the prefix. You might just simply will do a MySQL script here. If you are making a change and the new release is 1.2.9 and 1.0 didn't have that [00:16:23](https://www.youtube.com/watch?v=hzbZlLl-xlA&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h16m23s) specific field or view, then you must realize that you're updating this one and the SQL must come next to that specific version. The update must be placed at the version, which needs the update. If you make a change don't put it here(1.2.9), because it won't update correctly. You need to put the update next [00:16:44](https://www.youtube.com/watch?v=hzbZlLl-xlA&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h16m44s) to the version(1.0) that needs to be updated. Then over here(Version URL), you would put the link to the respective downloads. Like here we have version 1.2.9 and then we have version 1.3.0 [00:16:59](https://www.youtube.com/watch?v=hzbZlLl-xlA&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h16m59s)and we added the 1.3.0 link heresee video).
|
||||||
|
|
||||||
I'm using GitHub as my distributing platform of the application. You could use any URL. These URLs is what will be used in your updates server. The update server, [00:17:18](https://www.youtube.com/watch?v=hzbZlLl-xlA&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h17m18s) if I was to open that for us. First, we will go to the update server link, copy that. You'd see that it has this URLs here, for the download. As we move on it 1.3.0, 1.3.1, 1.3.2. and it's getting these details. It is getting them [00:17:48](https://www.youtube.com/watch?v=hzbZlLl-xlA&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h17m48s) from this version update area. The last version in this list being 1.3.2, must be the same as the one that you set here. That is important. We are at the current version [00:18:07](https://www.youtube.com/watch?v=hzbZlLl-xlA&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h18m07s) and it will do the necessary adjustments to that. That is all the concepts that would be necessary to cover regarding the component area. We've looked at adding admin views. [00:18:26](https://www.youtube.com/watch?v=hzbZlLl-xlA&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h18m26s) We will again look at site views and adding them as well as your custom admin views. We will possibly going into more depths about this MySQL tweak, what we briefly spoke about. But the for most part that's or the at component area, [00:18:48](https://www.youtube.com/watch?v=hzbZlLl-xlA&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h18m48s) and all it's nice features. It all stacks upon each other from the fields then the admin views, and then the components themselves. And if you have come this far you set out your component, you have added some admin views, you are now ready to [00:19:06](https://www.youtube.com/watch?v=hzbZlLl-xlA&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h19m06s) start building the front and the site area. You wouldn't be able to do effectively until now. It is necessary to first do the admin views and then only do the site views.
|
I'm using GitHub as my distributing platform of the application. You could use any URL. These URLs is what will be used in your updates server. The update server, [00:17:18](https://www.youtube.com/watch?v=hzbZlLl-xlA&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h17m18s) if I was to open that for us. First, we will go to the update server link, copy that. You'd see that it has this URLs here, for the download. As we move on it 1.3.0, 1.3.1, 1.3.2. and it's getting these details. It is getting them [00:17:48](https://www.youtube.com/watch?v=hzbZlLl-xlA&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h17m48s) from this version update area. The last version in this list being 1.3.2, must be the same as the one that you set here. That is important. We are at the current version [00:18:07](https://www.youtube.com/watch?v=hzbZlLl-xlA&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h18m07s) and it will do the necessary adjustments to that. That is all the concepts that would be necessary to cover regarding the component area. We've looked at adding admin views. [00:18:26](https://www.youtube.com/watch?v=hzbZlLl-xlA&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h18m26s) We will again look at site views and adding them as well as your custom admin views. We will possibly going into more depths about this MySQL tweak, what we briefly mentioned. But the for most part that's or the at component area, [00:18:48](https://www.youtube.com/watch?v=hzbZlLl-xlA&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h18m48s) and all it's nice features. It all stacks upon each other from the fields then the admin views, and then the components themselves. And if you have come this far you set out your component, you have added some admin views, you are now ready to [00:19:06](https://www.youtube.com/watch?v=hzbZlLl-xlA&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h19m06s) start building the front and the site area. You wouldn't be able to do effectively until now. It is necessary to first do the admin views and then only do the site views.
|
||||||
|
Loading…
Reference in New Issue
Block a user