User Login    
 + Register
  • Main navigation
Login
Username:

Password:

Remember me



Lost Password?

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

Members: 1
Guests: 80

lansnode, more...
[Main Page]

Dev:global variables

From XOOPS Project

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

Printable version | Disclaimers | Privacy policy
Category: Development

Description

Xoops has a range of variables globally available after inclusion of mainfile.php

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


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

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

This page has been accessed 769 times. This page was last modified 17:24, 15 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