Keyword

Copy Category

More
13 years 7 months ago #80879 by Milan Stajkovic
Replied by Milan Stajkovic on topic Copy Category
I did exactly what u said, its not workin for me. No category button in categories... By the way, i'm installing it to may local server, does that make any changes...? Tnx.. in advanced...

irish said:Thank you for this "Jacob Friedman" it has been a big help. I had to figure out how to get it to work and since there were only two files in your post I went ahead and sorted out my issues and created a zip file with the correct paths and attached files. Hope you don't mind. The problem I was having with your code was that in the "models/categories.php at the end:" part, I had to replace the last " } " with your code.

Now all you will have to do is download the attached zip file and extract it on your local system or hard drive and upload the com_k2 folder and all contents to your servers: administrator/components/ folder and overwrite the com_k2 folders and files. Only the changed files for the duplication (copy categories) will be overwritten.
I have only tested this on K2 Component v2.3

Always! before changing core files make a backup in case you have problems.
Personally I keep a copy or backup of my server files on a disk in house. On test servers I usually browse all files to be changed on the server and rename them by adding "-saved" without the "quotes " to the end of a file name then upload the new files.

I have noticed that when trying to copy third level categories in number that it will only copy one at a time but if you copy any parent category along with its subs everything works just fine.
If you only want to copy the sub categories of the parent (to add them to another parent) just include the parent and once parent and subs are duplicated or copied select all subs and: 1) move the selected subs to an existing category or 2) rename the the parent and don't forget to check and see if the copied subs are attached to the correct parent which they should be once parent is renamed.
Hope this addition to Jacob Friedman's contribution helps...

Personally I think something like this should be expanded and included in the K2 Components core files as it is implicated in Joomla's core!
How about everyone else? please post comments so we can get this done....

Thanks again
irish

Please Log in or Create an account to join the conversation.

More
13 years 7 months ago #80880 by Milan Stajkovic
Replied by Milan Stajkovic on topic Copy Category
*Copy button*

Milan Stajkovic said:I did exactly what u said, its not workin for me. No category button in categories... By the way, i'm installing it to may local server, does that make any changes...? Tnx.. in advanced...

irish said:Thank you for this "Jacob Friedman" it has been a big help. I had to figure out how to get it to work and since there were only two files in your post I went ahead and sorted out my issues and created a zip file with the correct paths and attached files. Hope you don't mind. The problem I was having with your code was that in the "models/categories.php at the end:" part, I had to replace the last " } " with your code.
Now all you will have to do is download the attached zip file and extract it on your local system or hard drive and upload the com_k2 folder and all contents to your servers: administrator/components/ folder and overwrite the com_k2 folders and files. Only the changed files for the duplication (copy categories) will be overwritten.
I have only tested this on K2 Component v2.3

Always! before changing core files make a backup in case you have problems.
Personally I keep a copy or backup of my server files on a disk in house. On test servers I usually browse all files to be changed on the server and rename them by adding "-saved" without the "quotes " to the end of a file name then upload the new files.

I have noticed that when trying to copy third level categories in number that it will only copy one at a time but if you copy any parent category along with its subs everything works just fine.
If you only want to copy the sub categories of the parent (to add them to another parent) just include the parent and once parent and subs are duplicated or copied select all subs and: 1) move the selected subs to an existing category or 2) rename the the parent and don't forget to check and see if the copied subs are attached to the correct parent which they should be once parent is renamed.
Hope this addition to Jacob Friedman's contribution helps...

Personally I think something like this should be expanded and included in the K2 Components core files as it is implicated in Joomla's core!
How about everyone else? please post comments so we can get this done....

Thanks again
irish

Please Log in or Create an account to join the conversation.

  • Julien Nicolas Immobilier
  • Julien Nicolas Immobilier's Avatar
  • Offline
  • New Member
More
13 years 5 months ago #80881 by Julien Nicolas Immobilier
Replied by Julien Nicolas Immobilier on topic Copy Category
It doesn't work for me... Is there because of my Joomla version 1.5.22 ?
I've the same version of K2 than you (2.3).
Too bad because it would have help me a lot !!! K2 is fantastic but this "button copy categorie" should make it terrific !
Too many time when the structure of categories is repetitive :(


irish said:Thank you for this "Jacob Friedman" it has been a big help. I had to figure out how to get it to work and since there were only two files in your post I went ahead and sorted out my issues and created a zip file with the correct paths and attached files. Hope you don't mind. The problem I was having with your code was that in the "models/categories.php at the end:" part, I had to replace the last " } " with your code.

Now all you will have to do is download the attached zip file and extract it on your local system or hard drive and upload the com_k2 folder and all contents to your servers: administrator/components/ folder and overwrite the com_k2 folders and files. Only the changed files for the duplication (copy categories) will be overwritten.
I have only tested this on K2 Component v2.3

Always! before changing core files make a backup in case you have problems.
Personally I keep a copy or backup of my server files on a disk in house. On test servers I usually browse all files to be changed on the server and rename them by adding "-saved" without the "quotes " to the end of a file name then upload the new files.

I have noticed that when trying to copy third level categories in number that it will only copy one at a time but if you copy any parent category along with its subs everything works just fine.
If you only want to copy the sub categories of the parent (to add them to another parent) just include the parent and once parent and subs are duplicated or copied select all subs and: 1) move the selected subs to an existing category or 2) rename the the parent and don't forget to check and see if the copied subs are attached to the correct parent which they should be once parent is renamed.
Hope this addition to Jacob Friedman's contribution helps...

Personally I think something like this should be expanded and included in the K2 Components core files as it is implicated in Joomla's core!
How about everyone else? please post comments so we can get this done....

Thanks again
irish

Please Log in or Create an account to join the conversation.

  • Julien Nicolas Immobilier
  • Julien Nicolas Immobilier's Avatar
  • Offline
  • New Member
More
13 years 5 months ago #80882 by Julien Nicolas Immobilier
Replied by Julien Nicolas Immobilier on topic Copy Category
Excuse me... I was wrong !
It work and work well also on K2 2.4 and Joomla 1.5.22 !
Thanks a lot...
P.S : My error was a fault of attention. Take care to copy the file on ADMINISTRATOR ! LOL

julien.nicolas said:It doesn't work for me... Is there because of my Joomla version 1.5.22 ? I've the same version of K2 than you (2.3).
Too bad because it would have help me a lot !!! K2 is fantastic but this "button copy categorie" should make it terrific !
Too many time when the structure of categories is repetitive :(


irish said:Thank you for this "Jacob Friedman" it has been a big help. I had to figure out how to get it to work and since there were only two files in your post I went ahead and sorted out my issues and created a zip file with the correct paths and attached files. Hope you don't mind. The problem I was having with your code was that in the "models/categories.php at the end:" part, I had to replace the last " } " with your code.
Now all you will have to do is download the attached zip file and extract it on your local system or hard drive and upload the com_k2 folder and all contents to your servers: administrator/components/ folder and overwrite the com_k2 folders and files. Only the changed files for the duplication (copy categories) will be overwritten.
I have only tested this on K2 Component v2.3

Always! before changing core files make a backup in case you have problems.
Personally I keep a copy or backup of my server files on a disk in house. On test servers I usually browse all files to be changed on the server and rename them by adding "-saved" without the "quotes " to the end of a file name then upload the new files.

I have noticed that when trying to copy third level categories in number that it will only copy one at a time but if you copy any parent category along with its subs everything works just fine.
If you only want to copy the sub categories of the parent (to add them to another parent) just include the parent and once parent and subs are duplicated or copied select all subs and: 1) move the selected subs to an existing category or 2) rename the the parent and don't forget to check and see if the copied subs are attached to the correct parent which they should be once parent is renamed.
Hope this addition to Jacob Friedman's contribution helps...

Personally I think something like this should be expanded and included in the K2 Components core files as it is implicated in Joomla's core!
How about everyone else? please post comments so we can get this done....

Thanks again
irish

Please Log in or Create an account to join the conversation.

More
13 years 5 months ago #80883 by Milan Stajkovic
Replied by Milan Stajkovic on topic Copy Category
Milan Stajkovic said:*Copy button* Milan Stajkovic said:I did exactly what u said, its not workin for me. No category button in categories... By the way, i'm installing it to may local server, does that make any changes...? Tnx.. in advanced... irish said:Thank you for this "Jacob Friedman" it has been a big help. I had to figure out how to get it to work and since there were only two files in your post I went ahead and sorted out my issues and created a zip file with the correct paths and attached files. Hope you don't mind. The problem I was having with your code was that in the "models/categories.php at the end:" part, I had to replace the last " } " with your code. Now all you will have to do is download the attached zip file and extract it on your local system or hard drive and upload the com_k2 folder and all contents to your servers: administrator/components/ folder and overwrite the com_k2 folders and files. Only the changed files for the duplication (copy categories) will be overwritten. I have only tested this on K2 Component v2.3

Always! before changing core files make a backup in case you have problems.
Personally I keep a copy or backup of my server files on a disk in house. On test servers I usually browse all files to be changed on the server and rename them by adding "-saved" without the "quotes " to the end of a file name then upload the new files.

I have noticed that when trying to copy third level categories in number that it will only copy one at a time but if you copy any parent category along with its subs everything works just fine.
If you only want to copy the sub categories of the parent (to add them to another parent) just include the parent and once parent and subs are duplicated or copied select all subs and: 1) move the selected subs to an existing category or 2) rename the the parent and don't forget to check and see if the copied subs are attached to the correct parent which they should be once parent is renamed.
Hope this addition to Jacob Friedman's contribution helps...

Personally I think something like this should be expanded and included in the K2 Components core files as it is implicated in Joomla's core!
How about everyone else? please post comments so we can get this done....

Thanks again
irish





Problem solved, sorry the mistake was mine!
Works perfect! Should be included in default version!

Please Log in or Create an account to join the conversation.


Powered by Kunena Forum