×
Please submit new Bug Reports on GitHub: github.com/Jensen-Technologies/component-creator-issues/issues
HOW TO CUSTOMIZE CODE
Ryan Minnig
New Member
Posts: 10
2 anos 3 meses atrás #9978
por Ryan Minnig
Respondido por Ryan Minnig no tópico HOW TO CUSTOMIZE CODE
It seems to me that the only way to accomplish custom code is to handle it at your local machine.
There is a nice tool called Meld (meldmerge.org/) which handles 3 way comparisons.
The 3 way comparisons can happen on the file for folder level.
Lets say you have version 0.0.30 of your component in an unmodified state. You also have 0.0.30 in a state where you have made changes to it. You then would make changes in Component Creator to your 0.0.30 version, bump up the version and download that zip then extract to a folder in an unmodified state.
A 3 way comparison would consist of a comparison between these 3 versions and it would be up to the author to recognize the changes from 0.0.30 to 0.0.31 and back merge them into the 0.0.30 (modified version), or forward the custom code into 0.0.31 (modified version), before or after "install" on your development site.
This, in addition to using SVN version control for component development is the route that I am going because I still love the ease at which I can make model changes to the component with CC, but still give me the ability to make changes to forms not available in CC, or have additional views of the same data (not available in CC).
One drawback to this method is that because of the version number appearing in the comments header of each file, the comparison tool shows diffs for nearly every file, so it is not straight forward to discover which files have been modified functionally.
There is a nice tool called Meld (meldmerge.org/) which handles 3 way comparisons.
The 3 way comparisons can happen on the file for folder level.
Lets say you have version 0.0.30 of your component in an unmodified state. You also have 0.0.30 in a state where you have made changes to it. You then would make changes in Component Creator to your 0.0.30 version, bump up the version and download that zip then extract to a folder in an unmodified state.
A 3 way comparison would consist of a comparison between these 3 versions and it would be up to the author to recognize the changes from 0.0.30 to 0.0.31 and back merge them into the 0.0.30 (modified version), or forward the custom code into 0.0.31 (modified version), before or after "install" on your development site.
This, in addition to using SVN version control for component development is the route that I am going because I still love the ease at which I can make model changes to the component with CC, but still give me the ability to make changes to forms not available in CC, or have additional views of the same data (not available in CC).
One drawback to this method is that because of the version number appearing in the comments header of each file, the comparison tool shows diffs for nearly every file, so it is not straight forward to discover which files have been modified functionally.
Por favor Acessar ou Registrar para participar da conversa.
OrganicWebs
New Member
Posts: 1
2 anos 3 meses atrás #9979
por OrganicWebs
Respondido por OrganicWebs no tópico HOW TO CUSTOMIZE CODE
Hi Soren,
It's been a year now since the Blog post. Has there been any progress on CC Event Triggers so we can efficiently customise CC?
I am a former J-Cook user too - and we have been able to customise the generated code by "Forking" views, models and controllers for a good many years. It was handy during a Joomla update - only took us seconds to regenerate an updated component in J-Cook and then install into Joomla (just like a regular component). The forks would stay intact - and our customizations would carry over. It is a very good system.
I'll still sitting on the fence with CC. If you sort out this requirement, I'll sign up.
It's been a year now since the Blog post. Has there been any progress on CC Event Triggers so we can efficiently customise CC?
I am a former J-Cook user too - and we have been able to customise the generated code by "Forking" views, models and controllers for a good many years. It was handy during a Joomla update - only took us seconds to regenerate an updated component in J-Cook and then install into Joomla (just like a regular component). The forks would stay intact - and our customizations would carry over. It is a very good system.
I'll still sitting on the fence with CC. If you sort out this requirement, I'll sign up.
Os seguintes usuário(s) disseram Obrigado: Rick Nevins
Por favor Acessar ou Registrar para participar da conversa.
Rick Nevins
New Member
Posts: 2
2 anos 2 meses atrás #10002
por Rick Nevins
Respondido por Rick Nevins no tópico HOW TO CUSTOMIZE CODE
I was also a J-Cook user. I just created a custom component with Component Creator which has an empty view that I then point to a script which copies any files in the com_mycomponent/_fork directory over to the com_mycomponent directory, preserving the directory structure. There is a database table where you can enter the name of the component to copy. It is a very simple script and so all you have to do is save any modified php files into the _fork directory (including the subdirectory structure) and then just after you reinstall your component, just click on one link (in my case it is called "copyfork") will copy all the modified files back to the proper directory.
Por favor Acessar ou Registrar para participar da conversa.
Tempo para a criação da página:0.049 segundos