× Please submit new Bug Reports on GitHub: github.com/Jensen-Technologies/component-creator-issues/issues

HOW TO CUSTOMIZE CODE

1 year 7 months ago #9978 by Ryan Minnig
Replied by Ryan Minnig on topic 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.

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

1 year 7 months ago #9979 by OrganicWebs
Replied by OrganicWebs on topic 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.
The following user(s) said Thank You: Rick Nevins

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

1 year 5 months ago #10002 by Rick Nevins
Replied by Rick Nevins on topic 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.

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

Time to create page: 0.146 seconds
Powered by Kunena Forum

We use cookies so that you can place orders and we can provide a better service. You can control the use of cookies at the individual browser level. If you reject cookies, you may still use our website, but your ability to use some features or areas of our website may be limited.