views:

52

answers:

1

Suggest me, is it a good idea to make changes in default Joomla code structure?

I need to keep an insert query after every insert/update/delete operation in Joomla administrator code. so that i can track the change i have made.

Is it good idea to make the changes every where in the default code in Joomla default structure?

+1  A: 

Generically speaking (that is, without knowledge of Joomla internals):

  • If this is your one and only project and you just build upon an existing codebase, go forth and modify it. It helps to keep track on what you did where, if you want to port Joomla updates later to your codebase, but sooner or later you should make a cut.

  • If, however, you use Joomla for more than one project and/or want to keep in track with Joomla's future development, changing core files can (and presumably will) become a maintenence nightmare. The only way to keep this in usable dimensions is to restrict touching core files to a minimum and well-defined set of places.

I assume, you want to go with the second option. In this case, let me give you some advice on what worked at our company:

  • We mangled with WordPress. What helped us much, was to store WP in one folder and a version of files we touched in a different folder (in our VCS). This way, we always knew exactly, what file from the WP core we touched. Making a productive environment was 1. exporting the WP files and 2. exporting the shadow copy and move it over the WP core files.

  • Writing extensions/plugins: Almost any larger software has a way to extend it. Learn the plugin/hook/extension/addon mechanism of Joomla and try to do as much of your changing as possible with that.

  • If it's database related: Maybe it's enough to change only one file of Joomla: /libraries/joomla/database/database.php. Even better, it might be possible to extend this class (or JDatabaseMySQL, that is) and somewhere in the configuration tell Joomla to use this class.

Boldewyn
I have kept this query after a lot of digging and smashing on my head, go thru this link u will come to know where and why i am stucked, and why i am forced to do this.. And YES I DONT WANT TO DO WHAT I HAVE DONE.. PLEASE guide me http://stackoverflow.com/questions/2605392/extract-primary-key-from-mysql-in-php
OM The Eternity