User Login    
 + Register
  • Main navigation
Login
Username:

Password:

Remember me



Lost Password?

Register now!
Who's Online
73 user(s) are online (12 user(s) are browsing XoopsWiki)

Members: 2
Guests: 71

krauh, status_tech, more...
[Main Page]

Dev:xoops install uninstall

From XOOPS Project

Main Page | Recent changes | Edit this page | Page history | Switch to MediaWiki mode

Printable version | Disclaimers | Privacy policy
Category: Development

onInstall and onUninstall

The module installation system features a way for mods to specify a custom installation / uninstallation script that will be called once the kernel has finished its own work. In xoops_version.php:

   $modversion['onInstall'] = 'install_funcs.php';
   $modversion['onUninstall'] = 'install_funcs.php';
   (Soon)$modversion['onUpdate'] = 'install_funcs.php';

Then in install_funcs.php:

   function xoops_module_install_<DIRNAME>( $xoopsMod ) {
       if (everythingIsOK) {
           return true;
       } else {
           return false;
       }
   }
   function xoops_module_uninstall_<DIRNAME>( $xoopsMod ) {
       if (everythingIsOK) {
           return true;
       } else {
           return false;
       }
   }
   function xoops_module_update_<DIRNAME> ( $xoopsMod, $oldversion) {
       switch ($oldversion) { //remember that version is multiplied with 100 to get an integer
           case 100: //perform actions to upgrade from version 1.00
               break;
           case 110: //perform actions to upgrade from version 1.10
               break;
       }
   }


Back to the dev:Main Page

Retrieved from "http://www.xoops.org/modules/mediawiki/index.php/Dev:xoops_install_uninstall"

This page has been accessed 803 times. This page was last modified 02:10, 16 December 2007. Content is available under XOOPS Project.


Developers for Hire
Developers for Hire
Local Support Sites
Make a donation
Please select an amount to donate


Do you want your username revealed with your donation?
Yes - List me as a Generous Donor
No - List my donation as from an Anonymous Donor


Powered by
XOOPS Code hosted on SourceForge

Powered by PHP

PHP 5

Powered by MySQL

Powered by Smarty

OSI certified

GPL

All content on this site is subject to the Creative Commons License
Top Tags
Theme (5) news (2) security (2) sport (1) Arabic (1) wiki (1) Christmas (1) jQuery (1) tag (1) module (1) SEO (1) comments (1)
Advertisement