The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
|||
|
|||
TIMENOW in Plugins
Hello,
I have the following code on hook threadfpdata_presave: Code:
if($vbulletin->userinfo['joindate'] > TIMENOW - (86400 * 1)) { $this->set('visible', 0); } Thanks |
#2
|
|||
|
|||
I think this should work:
Code:
if($this->registry->userinfo['joindate'] > TIMENOW - (86400 * 1)) { $this->set('visible', 0); } |
#3
|
|||
|
|||
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. |
#4
|
|||
|
|||
Those variables might not be in scope.
Use global and see if they're there. |
#5
|
|||
|
|||
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) |
#6
|
|||
|
|||
I would recommend not using $GLOBALS.
Try using global $forumid; Does that give the same result? |
#7
|
||||
|
||||
I don't see whats wrong with using the superglobal array.
|
#8
|
|||
|
|||
Same reason you should use the input cleaner instead of their respective superglobals.
|
#9
|
||||
|
||||
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.
|
Thread Tools | |
Display Modes | |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|