6 ms·
Ah, it sounds like what's happening is this: joomla is a large piece of complex PHP code and you don't know how to figure out how to integrate the changes you w
by tgflynn 13y ago
Ah, it sounds like what's happening is this: joomla is a large piece of complex PHP code and you don't know how to figure out how to integrate the changes you want to make into it. Also there may be a lot of code in the framework that looks strange and you're having trouble figuring out how it works.
I've never worked with joomla myself, but I'll try to give you a few ideas about how I would approach figuring it out if I had no clue and the documentation wasn't helpful.
The steps I would take are:
1) Get a local test instance of your site setup.
2) Figure out how to insert a line of code that generates some sort of output that you can see as soon as it's executed (ie. a "print statement"). Usually this will go to some server log file. There should be something in the docs, hopefully an example, about logging.
3) Make a guess about what code gets executed when a page you're interested in gets rendered. Most likely this will be the php file that you see in that page's URL.
4) Once you've got a first message to print out try to reason through the control flow of the code, adding print statements here and there to test your understanding of what gets executed when.
By following this approach you should start to get a feel for how the joomla code works and eventually you will find out where code for your new feature should go. If you still have trouble figuring that out try to find a similar feature already implemented in joomla or some add-on or extension and see how that was implemented.
If you want a recommendation for an IDE I've found that Eclipse with the PHP plugin works pretty well, but for this process of understanding the joomla code I would just use whatever text editor you're comfortable with, an IDE will probably only get in the way of your investigations at this point.