1) split your install/upgrade/uninstall into method.xxxxxx.php
2) split your actions into action.xxxxxx.php
3) split your events into event.xxxxxx.php
4) I split my admin tabs into seperate files using function.admin_tab_xxxxx.php or something like that
5) then I try to use classes
when I found that I'm going to be re-using those classes or functions I created an addon module for just that stuff CGExtensions
Best practice for location of module functions?
-
- Support Guru
- Posts: 8169
- Joined: Tue Oct 19, 2004 6:44 pm
- Location: Fernie British Columbia, Canada
Re: Best practice for location of module functions?
Follow me on twitter
Please post system information from "Extensions >> System Information" (there is a bbcode option) on all posts asking for assistance.
--------------------
If you can't bother explaining your problem well, you shouldn't expect much in the way of assistance.
Please post system information from "Extensions >> System Information" (there is a bbcode option) on all posts asking for assistance.
--------------------
If you can't bother explaining your problem well, you shouldn't expect much in the way of assistance.
-
- Support Guru
- Posts: 8169
- Joined: Tue Oct 19, 2004 6:44 pm
- Location: Fernie British Columbia, Canada
Re: Best practice for location of module functions?
I think the best module to look at would be Questions, it's pretty clean and well organized.
Typically though, I don't call one action from another, I use redirects to hande the flow.
Typically though, I don't call one action from another, I use redirects to hande the flow.
Follow me on twitter
Please post system information from "Extensions >> System Information" (there is a bbcode option) on all posts asking for assistance.
--------------------
If you can't bother explaining your problem well, you shouldn't expect much in the way of assistance.
Please post system information from "Extensions >> System Information" (there is a bbcode option) on all posts asking for assistance.
--------------------
If you can't bother explaining your problem well, you shouldn't expect much in the way of assistance.