SmartFAQ is developed by The SmartFactory (, a division of InBox Solutions (

How do I access a module's configuration settings?
  Requested and Answered by Dave_L on 2005/2/9 9:33:20     6283  reads 
Suppose that a parameter named 'foo' is defined in /modules/bar/xoops_version.php:

$modversion['config'][-]['name'] = 'foo';

1) To access this setting from within the module you use:

global $xoopsModuleConfig// needed only if within a function
echo "The  current value of 'foo' is: " $xoopsModuleConfig['foo'];

2) To access this setting anywhere, such as in a block, you use:

$module_handler =& xoops_gethandler('module');
$module         =& $module_handler->getByDirname('bar');
$config_handler =& xoops_gethandler('config');
$moduleConfig   =& $config_handler->getConfigsByCat(0$module->getVar('mid'));
"The  current value of 'foo' is: " $moduleConfig['foo'];

The comments are owned by the author. We aren't responsible for their content.



Lost Password? Register now!

Who's Online

58 user(s) are online (2 user(s) are browsing XOOPS FAQ)

Members: 0

Guests: 58



Goal: $100.00
Due Date: Dec 31
Gross Amount: $0.00
Net Balance: $0.00
Left to go: $100.00
Make donations with PayPal!

Did you know ?

If you are trying to edit the theme.html in your themes folder and nothing seems to be changed, be sure that you set "Update module template .html files from themes/your theme/templates directory?" to "YES" in General Settings!!

Random question

What is 'SSI'?