[edit]
Description
Xoops has a range of variables globally available after inclusion of mainfile.php
[edit]
PHP Values
$xoopsModule - The module object of the current module (Note: This variable should not be used in blocks, as you cannot be certain that you are in the block's module and hence, $xoopsModule may be a different module object. This restriction goes for some methods on certain classes ) $xoopsModuleConfig - Array of configuration values set in the module's preferences, if using the built-in preferences system in module xoops_version.php $xoopsUser - The user object of the user viewing the page. False if anonymous user $xoopsConfig - Array of general Xoops settings $xoopsOption - Array of page- and theme-specific information
[edit]
Smarty Values
<{$xoops_isuser}> - 1 if user is logged in, 0 if anonymous user
<{$xoops_uname}> - User name
<{$user_method}> - Logged in user's preferred notification method
<{$xoops_isadmin}> - 1 if admin, 0 if not (Admin rights to System module is the deciding factor - no other modules are considered)
<{$xoops_userid}> - User's ID
<{$xoops_charset}> - Charset used on the page, e.g. ISO-8859-1
<{$xoops_langcode}> - language code used for page (e.g. en for English)
<{$xoops_sitename}> - Site Name
<{$xoops_slogan}> - Site Slogan
<{$xoops_pagetitle}> - Page Title
<{$xoops_version}> - Xoops Version
<{$xoops_theme}> - Name of theme folder
<{$xoops_themecss}> - URL to theme's css file
<{$SCRIPT_NAME}> - path to file name requested from xoops root (e.g. modules/news/index.php)
<{$xoops_imageurl}> - URL to theme folder
<{$xoops_requesturi}> - requested url (e.g. /modules/news/article.php?storyid=1)
<{$xoops_rootpath}> - path to xoops root
<{$xoops_upload_url}> - URL to xoops uploads directory
<{$xoops_url}> - URL to xoops root
Back to Main Page

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






