The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
|||
|
|||
Boolean value for user online
Hi!
I'm editing the layout of the member pages (MEMBERINFO template) + I wanted to get a boolean value (or something similar) that says whether the user is online or not. At the moment all I can find is: $userinfo[onlinestatus] Which out puts the code for a red or green gif image :erm: Anybody know how I can do it? Thanks! |
#2
|
|||
|
|||
Not possible?
|
#3
|
|||
|
|||
<if condition="$userinfo[onlinestatus] == 1">
ONLINE CODE <else /> OFFLINE CODE </if> |
#4
|
|||
|
|||
Quote:
$userinfo[onlinestatus] returns: Code:
<img class="inlineimg" src="http://forumname.com/images/statusicon/user_online.gif" alt="okgaz is online now" border="0" /> Code:
1 |
#5
|
||||
|
||||
I believe you would need to create a plugin to create this value for your use.
|
#6
|
||||
|
||||
This may point you in the right direction: https://vborg.vbsupport.ru/showthread.php?t=153372
|
#7
|
|||
|
|||
Quote:
|
#8
|
||||
|
||||
Ah, forgot you weren't a Coder.
Create a plugin at hook location "member_complete" with the following: Code:
$status = fetch_online_status($userinfo, false); |
#9
|
|||
|
|||
Worked perfect, thanks!!!
Quote:
Something like: Code:
$reppower = fetch_reppower($userinfo, $perms); (that doesn't seem to work but I'm sure the solution is similar) |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|