1
man im getting a headache trying to figure out why this doesnt work.
xoops_version... $modversion['oninstall'] = "oninstall.php";
file is oninstall.php
le="color: #000000"><?php function xoops_module_install_xmspotlight(&$module){ global $xoopsDB; //add field in stories table for link to img for article or spotlight. if (!FieldExists('imgspotlight',$xoopsDB->prefix('stories'))) { $result = $xoopsDB->query("ALTER TABLE ".$xoopsDB->prefix('stories'). " ADD imgspotlight varchar(255) NOT NULL default ' ' "); //add some messages? } //add field in stories table for text for img credits if (!FieldExists('imgspotlightdesc',$xoopsDB->prefix('stories'))) { $result = $xoopsDB->query("ALTER TABLE ".$xoopsDB->prefix('stories')." ADD imgauthor varchar(255) NOT NULL default ' ' "); //add some messages? } } function FieldExists($fieldname,$table) { global $xoopsDB; $result=$xoopsDB->queryF("SHOW COLUMNS FROM $table LIKE '$fieldname'"); return($xoopsDB->getRowsNum($result) > 0); }
spent like an hour trying to figure out whats wrong.. any help would be great..
CBB / LatestNews / Publisher / XM-Spotlight
(ノ◕ヮ◕)ノ*:・゚✧