-
MODX Staff
- 12,272 Posts
Marc, UNB is really cool indeed, but is self-described by its dev as not really able to scale well that big.
Ryan Thrash, MODX Co-Founder
Follow me on Twitter at @rthrash or catch my occasional unofficial thoughts at thrash.me
-
MODX Staff
- 12,272 Posts
I really like UNB, actually, and tried to deploy it as the board here prior to going with SMF. At the time PHP5 was the gating factor. Phorum souds wonderful too.
Ryan Thrash, MODX Co-Founder
Follow me on Twitter at @rthrash or catch my occasional unofficial thoughts at thrash.me
My only thought on this will be to check their code, do they use $GLOBAL when declaring their global vars or do they use global identofier in front of their var, when declaring it.
Currently snippet is being evaluated using eval, while the eval is being called inside a function. So I assume when UNB declare a variables without using the specific indicator shown above, whatever variables that UNB defined in ther system will be local to the function that run the eval function.
I might be wrong on this assumption due to the fact that I just used PHP for a couple months since I decided to use MODx. But consulting this to UNB forum will be helpful maybe.
Sincerely,
Actually, when you declare variable not inside a function or a class, it will be automatically assigned as a global variables. The only problem is, when they just define it using $var_name = ’some_value’; on their program, then when the program being included inside a function, then when they specified global $var_name, it will look into a global var called $var_name, which is it’s not located inside a function, so the $var_name that suppose to be global, but because it’s being called inside a function, it’s no longer becoming global variables. So outputing $var_name will return null or nothing, instead of ’some_value’.
One of the solution will be to use $GLOBAL[’var_name’] = ’some_value’; when declaring it or using it, so it will make it easier to maintain global identity accross the program, even though the script later being included inside a function.
Btw, this is my tutorial and opinion from 3 months PHP programmer under training, so if I mention something wrong, please do correct me and pardon me.
I believe the UNB guys will help you with this. Just tell them that the system is being included inside a function, will this affect their system or not. That statement will make them give a clear answer yes or no.