1
reynaldo
Getting current module name
  • 2004/10/17 9:29

  • reynaldo

  • Not too shy to talk

  • Posts: 106

  • Since: 2004/2/13


Hello,

I don't know if this is the appropriated forum for this question: how can I get the current module name?
for example, let’s say I want to code a block which display current module name.
How can I get it to display it using XOOPS API and without having to resort to cheap tricks like extracting it from the current URL? Is this possible? I read XOOPS API documentation but couldn’t find anything related.

Thanks for your help.

2
marcan
Re:Getting current module name
  • 2004/10/17 11:18

  • marcan

  • Just can't stay away

  • Posts: 824

  • Since: 2003/10/8


Hi reynaldom try this code :
Global $xoopsModule;
$moduleName $xoopsModule->getVar('name');
$dirName $xoopsModule->getVar('dirname');

The $moduleName variable now holds the name of the module, ie the name defined in System Admin > Modules for the specific module where the user is currently in.

The $dirname variable holds the name of the folder of the module, ie in http://www.yoursite.com/modules/$moduleName

Hope it helps !

Cheers !

Login

Who's Online

169 user(s) are online (111 user(s) are browsing Support Forums)


Members: 0


Guests: 169


more...

Donat-O-Meter

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

Latest GitHub Commits