×
Please submit new Bug Reports on GitHub: github.com/Jensen-Technologies/component-creator-issues/issues
HOW TO CUSTOMIZE CODE
Ryan Minnig
Yeni Üye
Posts: 10
2 yıl 4 ay önce #9978
Yazan: Ryan Minnig
Ryan Minnig tarafından HOW TO CUSTOMIZE CODE konusunda yanıtlandı
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.
Lütfen sohbete katılmak için Giriş ya da Hesap açın.
OrganicWebs
Yeni Üye
Posts: 1
2 yıl 4 ay önce #9979
Yazan: OrganicWebs
OrganicWebs tarafından HOW TO CUSTOMIZE CODE konusunda yanıtlandı
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.
Şu kullanıcı(lar) Teşekkür etti: Rick Nevins
Lütfen sohbete katılmak için Giriş ya da Hesap açın.
Rick Nevins
Yeni Üye
Posts: 2
2 yıl 2 ay önce #10002
Yazan: Rick Nevins
Rick Nevins tarafından HOW TO CUSTOMIZE CODE konusunda yanıtlandı
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.
Lütfen sohbete katılmak için Giriş ya da Hesap açın.
Sayfa oluşturma süresi: 0.052 saniye