Hi there.
Because I use cmsmadesimple now for several years (start in the year 2007 with a 0.x version) and because I will have some extra free time in the near future (I'm almost 65) I want to help cmsmadesimple and start building some modules.
I have some programmer experience (powershell, a little php and javascript, dbase scripts) so I started with reading the "Module_writing_Tutorial " for CMSMS 2.0.1+ writen by Robert Campbell.
After succefull creating and install and uninstall (checked with myphpadmin) I started with the HolidayItem Class (in my case the IwPopupManagerItem Class) and the "Your First Admin Action". And the the fight started. After creating the action.defaultadmin.php and the template "defaultadmin.tpl" I tryed to start the Popup Manager Screen in the admin panel I received a 500 error. So I did something wrong.
I checked the code (defaultadmin.tpl, action.defaultadmin.php and the class.IwPopuManagerItem.php) over and over again but still 500 error.
Now I have 2 questions :
Is the manual still valued.
How can I check where the error is (in what code).
Please advise. After the startup I think I will learn how to create modules but the startup is a little hard it seems.
Please help.
Newbee needs help develop a module
-
- Power Poster
- Posts: 478
- Joined: Wed Jan 25, 2006 11:53 am
- Location: Netherlands
-
- Power Poster
- Posts: 478
- Joined: Wed Jan 25, 2006 11:53 am
- Location: Netherlands
Re: Newbee needs help develop a module
Her are the files I created :
This is what I see in the error_log :
[29-Jun-2025 15:47:31 Europe/Amsterdam] PHP Deprecated: Using unregistered function "count" in a template is deprecated and will be removed in a future release. Use Smarty::registerPlugin to explicitly register a custom modifier. in /home/xxxxxx/sub/ontwikkel.dev-infowebs.nl/lib/smarty/sysplugins/smarty_internal_templatecompilerbase.php on line 649
This is what I see in the error_log :
[29-Jun-2025 15:47:31 Europe/Amsterdam] PHP Deprecated: Using unregistered function "count" in a template is deprecated and will be removed in a future release. Use Smarty::registerPlugin to explicitly register a custom modifier. in /home/xxxxxx/sub/ontwikkel.dev-infowebs.nl/lib/smarty/sysplugins/smarty_internal_templatecompilerbase.php on line 649
- Attachments
-
- iwpopupmanager.zip
- (1.55 KiB) Downloaded 7 times
-
- Power Poster
- Posts: 478
- Joined: Wed Jan 25, 2006 11:53 am
- Location: Netherlands
Re: Newbee needs help develop a module
YESSSSSSSSSS
Found the problem.
In the manual in the action.defaultadmin.php the php close sign is missing. (?>)
After adding this to the code, no 500 error any more.
Now we getting somewhere

Found the problem.
In the manual in the action.defaultadmin.php the php close sign is missing. (?>)
After adding this to the code, no 500 error any more.
Now we getting somewhere

Re: Newbee needs help develop a module
The manual is still valid. Most modifications made to the core don't break backward compatibility, and functionalities need to be deprecated on a release before being removed in a future release, as a warning to developers, not to use it. Usually and preferably with some notice about what changed and what are the alternatives.musicscore wrote: ↑Sun Jun 29, 2025 1:32 pm Now I have 2 questions :
Is the manual still valued.
How can I check where the error is (in what code).
Please advise. After the startup I think I will learn how to create modules but the startup is a little hard it seems.
Please help.
On the question about how can you check errors... there are a number of different ways at your disposal but they may differ a bit depending on what development environment you are using. The most raw too you may use is to use the die('Code executed until this point. Stop!'); at points in your code where you might suspect there something wrong and move it to see if it dies on your line or before it, to pin point the error.
PS: ?> is not mandatory on PHP.... but at the end of a line or complete statement the ; is... and that is what is really missing on your code.
"There are 10 types of people in this world, those who understand binary... and those who don't."
* by the way: English is NOT my native language (sorry for any mistakes...).
Code of Condut | CMSMS Docs | Help Support CMSMS
My developer Page on the Forge
GeekMoot 2015 in Ghent, Belgium: I was there!
GeekMoot 2016 in Leicester, UK: I was there!
DevMoot 2023 in Cynwyd, Wales: I was there!
* by the way: English is NOT my native language (sorry for any mistakes...).
Code of Condut | CMSMS Docs | Help Support CMSMS
My developer Page on the Forge
GeekMoot 2015 in Ghent, Belgium: I was there!
GeekMoot 2016 in Leicester, UK: I was there!
DevMoot 2023 in Cynwyd, Wales: I was there!
-
- Power Poster
- Posts: 478
- Joined: Wed Jan 25, 2006 11:53 am
- Location: Netherlands
[Solved] Newbee needs help develop a module
Thank you for the quick response Jo Morg.
Seems that I did not check my code enought and it was indeed the ; at the end of one off the codes.
All is working now and I can continue to learn how to build a module.
Thanks again.
Seems that I did not check my code enought and it was indeed the ; at the end of one off the codes.
All is working now and I can continue to learn how to build a module.
Thanks again.