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
Beginner: Where to find php files
Moderator: General Moderators
- social_experiment
- DevNet Master
- Posts: 2793
- Joined: Sun Feb 15, 2009 11:08 am
- Location: .za
Re: Beginner: Where to find php files
Modules for joomla are stored inside yoursite/modules/
“Don’t worry if it doesn’t work right. If everything did, you’d be out of a job.” - Mosher’s Law of Software Engineering
Re: Beginner: Where to find php files
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
Thanks
- social_experiment
- DevNet Master
- Posts: 2793
- Joined: Sun Feb 15, 2009 11:08 am
- Location: .za
Re: Beginner: Where to find php files
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.millo_2k wrote: Is there no way to find what files are producing certain code within it?
“Don’t worry if it doesn’t work right. If everything did, you’d be out of a job.” - Mosher’s Law of Software Engineering
- John Cartwright
- Site Admin
- Posts: 11470
- Joined: Tue Dec 23, 2003 2:10 am
- Location: Toronto
- Contact:
Re: Beginner: Where to find php files
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.
/modules/mymodule/controllers/MyController.php, and the actions are methods in the controller.
Very quick to narrow down relevant code.