Subject:*
<
Name/Email:*
<
Message Icon:*
<
Select*
<
Message:*
<



Click the Preview to see the content in action.
Options:*
<
Confirmation Code*
<
9 - 4 = ?  
Input the result from the expression
Maximum attempts you can try: 10
*
<
   

Re: xoopsModuleConfig question
by banesto on 2009/1/18 20:06:44

worked like a charm! Thanks a lot! helped me a lot in making module block, which uses block configuration data!
Re: xoopsModuleConfig question
by kerkyra on 2008/6/10 9:12:36

thanks mate i did use that class and worked like a charm! If the class is included in the directory i was working on though it idnt work if included in the functions.php it works fine. thanks for the help :)
Re: xoopsModuleConfig question
by hervet on 2008/6/10 8:39:01

Hello Frank

Quote:

frankblack wrote:
$xoopsModuleConfig only returns the values of the current module and not from another (I think so)?!

You are true.

@kerkyra
Look at the News module, in include/functions.php there is a function (news_getmoduleoption) to get module's options.
http://xoops.instant-zero.com/modules/mydownloads/singlefile.php?cid=2&lid=8
Re: xoopsModuleConfig question
by kerkyra on 2008/6/10 8:26:31

i tried the code you suggested mate but did seem to work!
i am trying to get the current module config value!
The php file is in a subfolder within the folder of the module!

In the admin folder and the root of the module it works fine! In this new folder i created it does not...
Re: xoopsModuleConfig question
by frankblack on 2008/6/9 15:18:14

$xoopsModuleConfig only returns the values of the current module and not from another (I think so)?!

Maybe you have to add some more code your php-file and assign it to your template. Following code is just a guess:

le="color: #000000"><?php $module_handler =& xoops_gethandler('module'); $module =& $module_handler->getByDirname("nameoftheothermodule"); $config_handler =& xoops_gethandler('config'); $moduleConfig =& $config_handler->getConfigsByCat(0, $module->getVar('mid')); $xoopsTpl->assign('type',$moduleConfig['type']);


Non-tested-code, so no responsibility taken...

Notice: nameoftheothermodule should be replaced by the name of the module you want to take the config from, of course.

Who's Online

134 user(s) are online (102 user(s) are browsing Support Forums)


Members: 0


Guests: 134


more...

Donat-O-Meter

Stats
Goal: $15.00
Due Date: Jul 31
Gross Amount: $0.00
Net Balance: $0.00
Left to go: $15.00
Make donations with PayPal!

Latest GitHub Commits