The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
|||
|
|||
If creator of thread
Looking for an if statement for vbulletin, something like
if ($vbulletin->creator_of_thread Reason being: Code:
https://vborg.vbsupport.ru/showthread.php?t=183183 |
#2
|
||||
|
||||
I don't know where you are trying to use the variable, but have you tried $thread[postuserid] ? (postuserid is the name of the field in the thread table - and postusername is the user's name)
|
#3
|
|||
|
|||
if ($vbulletin->userinfo['permissions']['adminpermissions'] & $vbulletin->bf_ugp_adminpermissions['ismoderator'])
That is where it givers permissions to users. I want it to instead give permissions to not only admins but also the creator of the thread. |
#4
|
||||
|
||||
So did you try adding in something like "AND $vbulletin->userinfo['userid'] == $thread[postuserid]" ?
That would be if the viewer of the page is the thread creator. |
#5
|
|||
|
|||
Tried that with no luck. Even tried just the following:
Code:
<phpcode><![CDATA[if ($vbulletin->$vbulletin->userinfo['userid'] == $thread[postuserid]) { $show['btu_canban'] = true; }]]></phpcode> |
#6
|
||||
|
||||
What variable you use and whether it is available for use really depends on what hook location you are using. You should look in the code right before the hook location is called and see how they are defining/using variables. That is your best clue on what to do.
|
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|