sorry forget what i wrote in the last post about the way to find newbb version.
you can simply use method_exists to find if it is the newbb version which support any poll module.
$topic_handler = xoops_getmodulehandler('topic', 'newbb');
if (method_exists('NewbbTopicHandler', 'findPollModule')) {
$poll_module_in_newbb = $topic_handler->findPollModule();
} else {
$poll_module_in_newbb = "xoopspoll"; // it is hard-coded no clone is supported
}
if($poll_module_in_newbb == $thisModule->getVar("dirname") ) {
// do some actions like uninstall, ...
}
So IMO you dont need to write any extra code because as i said all old newbb versions only support hard-coded "xoopspoll" dirname.
Note: we should use the above findPollModule
only in OnInstall, OnUpdate and OnUninstall process because it is an in depth checking to find the newbb poll module.
In common usages you can search for and use new config "poll_module" in newbb.
Quote:
until you are able to merge your changes into the trunk.
Technically merging any old newbb version < 4.4 Alfred (include newbb 2, newbb 3.08 and trunk) with the latest irmtfan branch is as simple as copying files.
But newbb needs a team of developers include at least one core developer and an official badge.
Quote:
change date handling to use the PHP DateTime class support that was implemented back in PHP 5.2
By adding any enhancements in the future, xoops core will always support
its own function "formatTimestamp" or method "XoopsLocal::formatTimestamp"
So all developers should use it now and their modules will be work in any newer version of xoops.
Edit:
A side note:
this line will be dangerous for the current cloning method in xoopspoll using smartclone:
$poll_module_in_newbb = "xoopspoll"; // it is hard-coded no clone is supported
because it should be remained as "xoopspoll" in all xoopspoll clones!!!
That is show the necessity of using a helper class and try to remove any instance of dirname (here: xoopspoll) from codes
as much as possible.
so in the clone process you dont need to change strtolower($dirname) anymore.
irmtfan
Module Developer

Joined:
2003/12/7 14:14
From In the middle of nowhere
Group:
Registered Users
Community Coordinator (temporary)
(Show More)
(Show Less)