DragonPrime - LoGD Resource Community
Welcome Guest
  • Good afternoon, Guest.
    Please log in, or register.
  • July 22, 2019, 03:39:52 PM
Home Forums News Downloads Login Register Advanced Search
* * *
DragonPrime Menu
Login
 
 
Resource Pages
Search

Pages: [1]   Go Down
  Print  
Author Topic: new functionalty in pre11 reg. module_addhook  (Read 3367 times)
0 Members and 1 Guest are viewing this topic.
XChrisX
Global Moderator
Mod God
*****
Offline Offline

Posts: 4647

Be aware of the squirrel!


View Profile WWW
« on: December 30, 2004, 02:19:23 AM »

So, now in pre11 there's a possibility to add code in the module_addhook() function

e.g.
Code:
module_addhook("gardens", 0, $condition);

if I set condition to
Code:
$condition = "if (\$session['user']['beta'] == 1) {return true;} else {return false;};";

I get an error message (as soon as I set $session['user']['beta'] to 1 ... ) like:

Fatal error: Call to undefined function 0() in C:\apachefriends\xampp\htdocs\lotgd\09811\lib\modules.php on line 284

what am I doing wrong here?!

I just wanted to have a module only appear if users are participating in beta-testing... (like the pavillion.php on central...
Logged

Running for more than three years now:
XChrisX
Global Moderator
Mod God
*****
Offline Offline

Posts: 4647

Be aware of the squirrel!


View Profile WWW
« Reply #1 on: December 30, 2004, 02:27:29 AM »

[5 Minutes later]

*argl*

*bashes his head on his desktop*

it mustn't be
Code:
module_addhook("gardens", 0, $condition);

but
Code:
module_addhook("gardens", false, $condition);

Now everything works as desired... Wink

Thanks for your attention ^^
Logged

Running for more than three years now:
Pages: [1]   Go Up
  Print  
 
Jump to:  


*
DragonPrime Notices
Version 1.1.2 is the current supported version and is available for download.

Support Us
No funds raised yet this year
Your help is greatly appreciated!
Recent Topics
DragonPrime LoGD
Who's Online
96 Guests, 0 Users
Home Forums News Downloads Login Register Advanced Search