Good.
I test your version and you used $dirname in some places but still there are many places you can use this. It is a step forward.
i found these:
for example if my module dirname is: rating
in table names:
$modversion['tables'][1] = "mod_rating_value";
in templates:
$modversion['templates'][] = array('file' => 'rating_header.html', 'description' => '');
in config you must eliminate the dirname.
it is not needed $modversion['config'][] = array(
'name' => "rating_editor",
in one sentence:
There should not be any dirname in xoops_version.php filealso: There should not be any dirname in any
possible places.
impossible places are: class and function names.
current functions which we have to use dirname is:
- block functions: edit and show func
- search function
- install, uninstall, ...
there is some minor issues and requests.
1- in table create:
TDMCreate/admin/tables.php?op=create_table
if user dont select any Table Icon it will not be stored. you have to select one default for this or eliminate it.
Also as i said in the last post, It is good to add some stuff from xoops 2.6 to xoops 2.56 module creator
2- could you please change this method:
$modversion[] = array(
'name' => _MI_RATING_NAME,
'version' => 1.0,
'description' => _MI_RATING_DESC,
'author' => "XOOPS Development T
with this:
$modversion = array();
$modversion["name"] = _MI_RATING_NAME;
It is more readable and can be changed line by line.
It is more important in some other arrays like config:
instead of this:
$modversion['config'][] = array(
'name' => "keywords",
use this:
$i++;
$modversion['config'][$i][ 'name'] = "keywords";
Requests: xoops 2.6 comes with some facilities but we can have some of them in xoops 2.5.6 modules very very easy
1- class request:
then you will be from codes like this:
$com_itemid = isset($_REQUEST["com_itemid"]) ? intval($_REQUEST["com_itemid"]) : 0;
It can be done very easy. see the "how to write standard module tutorial"
2- class helper:
then you will be free from any config, dirname, handler, ...
instead of this:
$categoriesHandler = xoops_getModuleHandler( 'rating_categories', 'rating' );
$criteria = new CriteriaCompo();
$categories = $categoriesHandler->getObjects( $criteria );
you have this:
$Rating = Rating::getInstance();
$criteria = new CriteriaCompo();
$categories = $Rating->getHandler("categories")->getAll( $criteria );
It can be done very easy. see the "how to write standard module tutorial"
Quote:
If you have time you can take action with ideas to improve it then assemble the code once the code includes all the necessary functionality.
I wrote the standard and you can implement it very easy in your modules.
but it will take many times for me to learn how your module creator works. so it is good for everybody to do the part which he best on it
Anyway I really dont have time for any other module. even i leave userlog development because I think there is more important functionality developers should work on which are vitally important for xoops.
eg: we dont have any efficient rating system like this in xoops:
http://coursesweb.net/php-mysql/voting-up-down-script-ajax_s2It is too bad for xoops. we have plenty of useless modules in xoops 2.5.6 but dont have some vital needs.
so In my very tight idea all developers should leave all works and just try to add an efficient rating system with all possibilities. 5 star rating, thank you system , vote up and down, ...
This is what we need in modern world.
That rating system is very hard for me. but anyway we should have it in the soonest possible time to be survive in the modern world.