1
AndyM
xoops_getmodulehandler()
  • 2010/10/10 18:22

  • AndyM

  • Quite a regular

  • Posts: 296

  • Since: 2003/8/31


I've tried using the xoops_getmodulehandler() function for the first time, but have had little success.

As I understand it, you use the name of the class file in the module's class directory (without the .php extension). With the module's name (directory name) as an option.

I can duplicate a file and give it different names, but it might only work if I use "menu" for example, if it's called something else, it fails.

I'm not sure if I'm missing something here or not?

For example:

le="color: #000000"><?php Error: Handler does not exist Module: amevents Name: adminmenu


I've not done much coding over the last couple of years, so I'm rusty and looking at the function itself is not revealing anything to me.

2
bumciach
Re: xoops_getmodulehandler()
  • 2010/10/11 8:15

  • bumciach

  • Not too shy to talk

  • Posts: 153

  • Since: 2007/6/25


Do you change the name of the class also inside this file?

3
AndyM
Re: xoops_getmodulehandler()
  • 2010/10/11 13:03

  • AndyM

  • Quite a regular

  • Posts: 296

  • Since: 2003/8/31


Ah, thanks, that pointed me in the right direction.

For future reference for other people, the class name has to be:

le="color: #000000"><?php class <Modulename><Filename>Handler { code }


Where <Modulename> is the name of the module (automatically filled if not specified, and <Filename> is the name specified.

4
iHackCode
Re: xoops_getmodulehandler()

CBB / LatestNews / Publisher / XM-Spotlight

(ノ◕ヮ◕)ノ*:・゚✧

5
redheadedrod
Re: xoops_getmodulehandler()

Quote:

Bandit-X wrote:
https://xoops.org/modules/mediawiki/index.php/Dev:using_xoops_api <-- needs a little organizing


Yes the whole wiki could use some organizing. Something is in progress but is going slow. Will write up something more when it is available.

Login

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