×
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
pred 2 rokmi 2 mesiacmi #9978
od Ryan Minnig
Odpoveď od Ryan Minnig na tému 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.
Prosím Prihlásiť alebo Registrácia pre zdieľanie konverzácie.
OrganicWebs
New Member
Posts: 1
pred 2 rokmi 2 mesiacmi #9979
od OrganicWebs
Odpoveď od OrganicWebs na tému 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.
Nasledujúci užívateľ(ia) povedali ďakujem: Rick Nevins
Prosím Prihlásiť alebo Registrácia pre zdieľanie konverzácie.
Rick Nevins
New Member
Posts: 2
pred 2 rokmi 1 mesiacom #10002
od Rick Nevins
Odpoveď od Rick Nevins na tému 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.
Prosím Prihlásiť alebo Registrácia pre zdieľanie konverzácie.
Čas vytvorenia stránky: 0.055 sekúnd