1
i'm trying to modify a module so that it is as easy as possible to clone.
i have this at the top of my xoops_version.php
$MODULE_DIRNAME = 'xreviews';
$MOD_PREFIX = $MODULE_DIRNAME;
then further down i have:
$modversion['dirname'] = $MODULE_DIRNAME;
$modversion['tables'][0] = $MOD_PREFIX."_reviews";
both these work fine once it's installed as original.
but if i change the dirname to say 'xreviews2' and then try to install the module it tells me that the tables already exist.
this is because in the mysql.sql file i have the following:
CREATE TABLE xreviews_reviews
is there a way i can substitute the prefix in the sql file for the $MOD_PREFIX value when installing?