Dev:$XoopsModule

From XOOPS Web Application System

Jump to: navigation, search

$xoopsModule is an array that allows you to access some module-wide configuration data within your programming.

The most common one is the name of the directory or the 'dirname' variable so that you can make a module easily renameable (one of the most common FAQs).

Using

usage is as simple as this:

   $xoopsModule->getVar('varname')

where varname is the name of one of the variables below.

Note: When you try to get dirname of a module, use $xoopsModule->getVar('dirname', 'n') instead of $xoopsModule->getVar('dirname') to skip unnecessary text sanitizing.

Variables

   * mid - number, unknown usage
   * name - text
   * version - number
   * last_update - date (number)
   * weight - number (for module priority)
   * isactive - number
   * dirname - text, name of directory (unclear if this comes from the xoops_version file or from the path)
   * hasmain - number (main menu?)
   * hasadmin - number
   * hassearch - number, assumed boolean for search usage
   * hasconfig - number
   * hascomments - number, assumed boolean for comments usage
   * hasnotification - number, assumed boolean for notifications usage
Personal tools