$xoopsOption is an array of options used by XOOPS in some aspects to show the page correctly.
E.g. $xoopsOption['template_main'] sets the template to be used in the main contents (module output area)
$xoopsOption['theme_use_smarty'] is a setting to determine whether the theme uses smarty or not. (Note: DEPRECATED in Xoops 2.2 since themes without Smarty are no longer supported)
$xoopsOption['pagetype'] can in modules be either admin, search or user and determines which language files are included from the core /language/[language]/ folder, admin.php, search.php or user.php.
$xoopsOption['nocommon'] if set to 1 before including mainfile.php, include/common.php (and the XOOPS Core API) will not be included
$xoopsOption['output_type'] can at this point (starting with XOOPS 2.2) only be set to "plain" (more will come in future XOOPS versions) in which case a page with only the module's output (but using the theme's CSS stylesheet) will be displayed (most likely to be used in popup windows where headers, logos and blocks are undesired) - if left out, the normal theme templates (theme.html/themeadmin.html) will be used.
$xoopsOption['cache_group'] (XOOPS 2.2+) identifier to distinguish cached versions of module output. An example could be that it is set as 0 for anonymous view, 1 for normal view, 2 for moderator view and 3 for admin view. The module developer has completely free hands to use whatever he or she feels is best, as long as (s)he uses the same setting every time. This option must be set BEFORE including /header.php as that is where the caching is checked.
There are a few more to disable certain blocks, if you should desire that, but I have rarely found a reason to do so. The most used is $xoopsOption['template_main'].
Back to Main Page











![[Main Page]](/modules/mediawiki/images/mediawiki.png)


