Great work, Bloc. As a mod writer, I took a look at your code and have some suggestions:
- The id and version in package-info.xml and tinyportal.mod don't match, they should.
- The id in package-info.xml should not include the version number.
- The uninstall is not complete. You should remove the files you added when installing, also reverse the mod actions. Examples:
<remove-file name="$themedir/images/divider.gif" />
<modification format="boardmod" type="file" reverse="true">tinyportal.mod</modification>
[li]Replacing files like you do with index.php
, will make many other mods not work anymore. Use the script in code
only for what you can't do with the mod file, like db stuff. If you want the mod to do advanced things, the XML format, rather than the Boardmod one, may cover your needs. Try to make your mod as compatible with others as possible.[/li]
[li]Leave file extensions .php
will show the content of the file in most servers.[/li]
[li]Why do you use the mod file to change the files you just put with tp_install.php
[li]For indentation use tabs instead of spaces.[/li]
button doesn't look like the rest.[/li]
I didn't go over the actual code, so I don't have much to comment on that. I hope you find these observations useful to help you improve your mod, which I think is a great way of using SMF.