method.*.php files not getting executed.

Talk about writing modules and plugins for CMS Made Simple, or about specific core functionality. This board is for PHP programmers that are contributing to CMSMS not for site developers
Post Reply
Wishbone
Power Poster
Power Poster
Posts: 1368
Joined: Tue Dec 23, 2008 8:39 pm

method.*.php files not getting executed.

Post by Wishbone »

I'm having a bit of trouble separating out my functions from the (module).module.php file. I'm able to get my action.default.php to work just fine, but when I try to put my functions in method.(function).php files, I keep on getting php errors saying that they are undefined functions, like these files aren't being read. Am I missing something?
User avatar
duclet
Forum Members
Forum Members
Posts: 187
Joined: Fri Jun 23, 2006 12:55 pm

Re: method.*.php files not getting executed.

Post by duclet »

Not every method can be separated out. Check the source code in /lib/classes/class.CMSModule.php to see if a method can be separated out. Either that or if you are using PHP5+, you can add the magic method __call.
Wishbone
Power Poster
Power Poster
Posts: 1368
Joined: Tue Dec 23, 2008 8:39 pm

Re: method.*.php files not getting executed.

Post by Wishbone »

Thanks.. I'm new to CMSMS and I was unsure on how to split up my modules..

What I was doing was making my module's multiple functions be called through paramaters in the "cms_module" call to my module. All calls were being channelled through the default action. What I did now was split my module into different actions (and separate files), which works now. Thanks.
Post Reply

Return to “Developers Discussion”