![]() |
TIMENOW in Plugins
Hello,
I have the following code on hook threadfpdata_presave: Code:
if($vbulletin->userinfo['joindate'] > TIMENOW - (86400 * 1)) Thanks |
I think this should work:
Code:
if($this->registry->userinfo['joindate'] > TIMENOW - (86400 * 1)) |
Thanks, it works great!
I was also trying to put an if in the same plugin for check forumid i used if ($foruminfo['forumid'] == 4) and if ($threadinfo['forumid'] == 4) but it doesn't want to work. Any Idea? Thank you again. |
Those variables might not be in scope.
Use global and see if they're there. |
It looks like that it's not available in this hook, what i can do for get it working?
Thanks --- Got it working with: if ($GLOBALS['forumid'] == X) |
I would recommend not using $GLOBALS.
Try using global $forumid; Does that give the same result? |
I don't see whats wrong with using the superglobal array.
|
Same reason you should use the input cleaner instead of their respective superglobals.
|
Yours is the same thing, to my basic understanding, it just requires more lines. That bit should have already been passed though a cleaner, and he isn't taking any real user input, just checking if it is X. That data isn't going into the database.
|
All times are GMT. The time now is 04:04 PM. |
Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
![]() |
|
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|