Page 1 of 1
Beginner: Where to find php files
Posted: Wed Feb 02, 2011 10:20 am
by millo_2k
Hi there,
very basic question - but im literally a day into learning php! If I have a website (a joomla installation) which I need to modify some php of a module, how do I go about locating the file I would need to change (ie. firefox's firebug can locate the css needed to change style). How on earth do you find the file needed for any given bit of code being called.
Thanks everyone
Re: Beginner: Where to find php files
Posted: Wed Feb 02, 2011 11:00 am
by social_experiment
Modules for joomla are stored inside yoursite/modules/
Re: Beginner: Where to find php files
Posted: Thu Feb 03, 2011 2:32 am
by millo_2k
Thanks for getting back to me, I know some of the basic stuff, unfortunately a client has brought me in halfway on a website, which has an ecommerce component template with modules within that (hikashop) - and trying to track down where things are kept seems impossible. Is there no way to find what files are producing certain code within it?
Thanks
Re: Beginner: Where to find php files
Posted: Thu Feb 03, 2011 11:26 am
by social_experiment
millo_2k wrote: Is there no way to find what files are producing certain code within it?
There's always a way but it involves you accessing the files in a editor (Notepad++ , or something similar) and looking at the source code.
Re: Beginner: Where to find php files
Posted: Thu Feb 03, 2011 3:50 pm
by John Cartwright
Yea.. the relevant code can be anywhere. A good system will logically organize your code so that it will be easy to find. For instance, in MVC we have module/controller/action schema. Module/controller/action are generally a 1-1 match with the url. So to find the code
http://foorbar.com/mymodule/mycontroller/myacton we would look at our application folder under something like
/modules/mymodule/controllers/MyController.php, and the actions are methods in the controller.
Very quick to narrow down relevant code.