huum
I read that document.
I dont like that it is all focused on GUI and in specific the GUI in admin parts.
as i said many times codes are more important than GUI and main part is far more important than admin part.
admin part is just good for us but we should care about our users
I think all parts of this document is very obvious. we should use Core API and one of them is moduleadmin class.
In this tutorial you just document this one class of core.
all developers should use core API as much as possible to make life easier for themselves and for others.
Im very tightin using Xoops API so i stick to XOOPS API so that the
userlog module will only work in admin part of modules used the moduleadmin class.there is some little issues and typo in this document.
1- in page 13
Quote:
You can call the 16x16 icon by calling the appropriate path and the name of the icon:
please dont promote it. it is hardcoded html in php files.
everybody must use xoModuleIcons16 smarty var.
2- typo in image page 14
mymodule/block/myblock.php
should be
mymodule/blocks/myblock.php
3- page 14
Quote:
Please also update the help.php file located in:
should be help.html
Im also completely against of this tutorial from page 15 to the end
the 2.9 Tables section is just promoting hardcoded html in php files.
there is no instruction how to do those nice things.
for example you promote TDMdownloads which has very bad hardcode html for creating those nice tables.
every developer should use templates in admin parts of the module like the user part.
eg:
$template_main = "userlog_admin_logs.html";
if ( !empty($template_main) ) {
$GLOBALS['xoopsTpl']->display("db:{$template_main}");
}
so we need a typical template html files for those nice tables/form things.
that is not very hard and we can find it everywhere in the net.
It makes life easier for everybody.
ok. i want to share with you one of the very nice works from trabis. it is the request class which is in xoops 2.6 but i hope all developers use in 2.5.5 too.
I used it in userlog.
instruction is very easy.
just copy publisher/class/request.php to YOUR_MODULE/class
open request.php file.
- replace all "PUBLISHER" with your desired word: eg the name of your module.(use match case)
that's it. now you are free from get/post methods and sanitizers.
just can use it like this everywhere in your module.
$startentry = UserlogRequest::getInt('startentry',0);
$limitentry = UserlogRequest::getInt('limitentry',$Userlog->getConfig("logs_perpage"));
$sortentry = UserlogRequest::getString('sortentry','log_id');
$orderentry = UserlogRequest::getString('orderentry','DESC');
$options = UserlogRequest::getArray("options");
the second one is default var as you can see yourself.