Updated 028 How to change exported values and setup custom import options (markdown)
parent
67f13730e3
commit
20b6cb3ac8
@ -33,15 +33,18 @@ NB. Don't add this feature here. [00:07:25](https://www.youtube.com/watch?v=fau5
|
|||||||
|
|
||||||
The adding of this customization of coloring is avoided because it should not be running during the export process. Only the values is needed. Again it can be seen that the export values are used. [00:07:53](https://www.youtube.com/watch?v=fau5mZ6naLc&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h07m53s) That is the places where the export function is involved, and by using this '$_export' it is possible to identify whether it's an export or not. If it is, changes can be made to the values as necessary. Going back to the back end just to show that this(PHP area) is the place where the query had been done.[00:08:30](https://www.youtube.com/watch?v=fau5mZ6naLc&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h08m30s)
|
The adding of this customization of coloring is avoided because it should not be running during the export process. Only the values is needed. Again it can be seen that the export values are used. [00:07:53](https://www.youtube.com/watch?v=fau5mZ6naLc&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h07m53s) That is the places where the export function is involved, and by using this '$_export' it is possible to identify whether it's an export or not. If it is, changes can be made to the values as necessary. Going back to the back end just to show that this(PHP area) is the place where the query had been done.[00:08:30](https://www.youtube.com/watch?v=fau5mZ6naLc&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h08m30s)
|
||||||
|
|
||||||
In the area 'Add PHP(getitems Method-before the translation fix & decryption)',it can be verified whether a export had been done and this can be taken(see video) instead of the exclamation, if export is '(isset($_export)' and export is 'true''(isset($_export)&&$_export)', then in the area below may be done what is necessary. That is if the values need to be changed before translation or before decryption or it may be made after. [00:09:18](https://www.youtube.com/watch?v=fau5mZ6naLc&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h09m18s) So after all was done and the values need to be changed on an export, it may be added.<<<<<<<<<<<<<<<<<
|
In the area 'Add PHP(getitems Method-before the translation fix & decryption)', it can be verified whether a export had been done and this can be taken(see video) instead of the exclamation, if export is '(isset($_export)' and export is 'true''(isset($_export)&&$_export)', then in the area below may be done what is necessary. That is if the values need to be changed before translation or before decryption or it may be made after. [00:09:18](https://www.youtube.com/watch?v=fau5mZ6naLc&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h09m18s) So after all was done and the values need to be changed on an export, it may be added.
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
### Import Features Explained
|
### Import Features Explained
|
||||||
|
|
||||||
Now if you want to have a different import type as usual. Usually to import values you just [00:09:40](https://www.youtube.com/watch?v=fau5mZ6naLc&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h09m40s) update these. If you leave the id in it updates, if you take the id out it creates. Now let's say I don't want to use the ids I want to use these values instead. And then you need to create a custom import concept. We have tried to make that easy as possible and yet it's still quite complex. [00:10:13](https://www.youtube.com/watch?v=fau5mZ6naLc&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h10m13s)
|
If a different import type than usual is needed, then to import values, these (figures in the assign column) need to be updated. [00:09:40](https://www.youtube.com/watch?v=fau5mZ6naLc&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h09m40s) If the ID is left in, it updates, if the ID is removed, it creates. If for instance the IDs is not used but rather these values instead, then a custom import concept needs to be created. Although a attempt had been made to make it simple it turned out to be still complex. [00:10:13](https://www.youtube.com/watch?v=fau5mZ6naLc&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h10m13s)
|
||||||
|
|
||||||
### Custom Import Tab(default import code)
|
### Custom Import Tab(default import code)
|
||||||
|
|
||||||
You basically go to custom import. There is a little warning, because it is quite daunting. You add there yes, and it will load into these areas, the actual script that are used by default in these various concepts. [00:10:38](https://www.youtube.com/watch?v=fau5mZ6naLc&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h10m38s) If you do not understand what you seeing here, I suppose you should rather not be trying to do this or you should seek some classes from lynda.com or elsewhere. Udome it's also a good place sharpen up some of your PHP skills. Then you could make changes to this, for example take out that chunk, [00:11:09](https://www.youtube.com/watch?v=fau5mZ6naLc&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h11m09s) then do a search, put something in you can find like your name or whatever. Save and compile it. Go and search where does this come up? Where does this come out? What is happening? You'd realize that [00:11:31](https://www.youtube.com/watch?v=fau5mZ6naLc&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h11m31s) we don't completely remove the default import method when you do this kind of changes. There is a way that you could make these changes, and have two import methods next to each other. It's not that easy but it's possible and it all depends on what you are doing in [00:11:59](https://www.youtube.com/watch?v=fau5mZ6naLc&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h11m59s) this HTML and PHP view area. So it depends on what you do in the view. Currently this is set up to do your normal import as you would usually do. Changing this will also change your normal import concept. That is how you would Change your custom import concept. Please read through the code. Maybe compile it. [00:12:33](https://www.youtube.com/watch?v=fau5mZ6naLc&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h12m33s) Go look at what it's done. Look around see how the default import and concepts work. Then make your changes accordingly. I have used this area quite a lot for various applications, because sometimes you have a user that says to you or a client, I want to import these sets of csv files, and they are like 4000 or 40000 lines and it needs to select only specific values. [00:13:06](https://www.youtube.com/watch?v=fau5mZ6naLc&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h13m06s) Well in that case this area is definitely what you looking for. You'll be able to adapt your import concept to accommodate those kind of complexity. Well that is how to change export values and create custom import values for any field view in the back end of your component. So literally changing how that button behaves and how that one behaves is what I have just shown you.
|
Go to custom import in Editing Admin View. There is a warning and below it,'yes' should be selected in the Custom Import option and it will load (See video) the actual script into these areas that are used by default in these various concepts. [00:10:38](https://www.youtube.com/watch?v=fau5mZ6naLc&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h10m38s) If this(PHP) does not make sense, rather not attempt to do it but do a search on courses like lynda.com and Udome etc. [00:11:09](https://www.youtube.com/watch?v=fau5mZ6naLc&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h11m09s) Changes may be made to this, for example: take out a portion, then do a search, put something in like 'your name'. Save and compile it. Do a search to see where it appears. [00:11:31](https://www.youtube.com/watch?v=fau5mZ6naLc&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h11m31s),,,,,<<<<<<<<<<<<<<<<<<<<<<<<
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
You'd realize that we don't completely remove the default import method when you do this kind of changes. There is a way that you could make these changes, and have two import methods next to each other. It's not that easy but it's possible and it all depends on what you are doing in [00:11:59](https://www.youtube.com/watch?v=fau5mZ6naLc&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h11m59s) this HTML and PHP view area. So it depends on what you do in the view. Currently this is set up to do your normal import as you would usually do. Changing this will also change your normal import concept. That is how you would Change your custom import concept. Please read through the code. Maybe compile it. [00:12:33](https://www.youtube.com/watch?v=fau5mZ6naLc&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h12m33s) Go look at what it's done. Look around see how the default import and concepts work. Then make your changes accordingly. I have used this area quite a lot for various applications, because sometimes you have a user that says to you or a client, I want to import these sets of csv files, and they are like 4000 or 40000 lines and it needs to select only specific values. [00:13:06](https://www.youtube.com/watch?v=fau5mZ6naLc&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h13m06s) Well in that case this area is definitely what you looking for. You'll be able to adapt your import concept to accommodate those kind of complexity. Well that is how to change export values and create custom import values for any field view in the back end of your component. So literally changing how that button behaves and how that one behaves is what I have just shown you.
|
Loading…
Reference in New Issue
Block a user