The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
||||
|
||||
Online status in memberlist
Like the Title suggests.
I have added it so far into the memberlist template like so:- Code:
<vb:if condition="$onlinestatus==0"> <img class="inlineimg onlinestatus" src="{vb:stylevar imgdir_statusicon}/user-offline_memberlist.png" alt="{vb:rawphrase x_is_offline, {vb:raw userinfo.username}}" border="0" /> <vb:elseif condition="$onlinestatus==1" /> <img class="inlineimg onlinestatus" src="{vb:stylevar imgdir_statusicon}/user-online_memberlist.png" alt="{vb:rawphrase x_is_online_now, {vb:raw userinfo.username}}" border="0" /> <vb:elseif condition="$onlinestatus==2" /> <img class="inlineimg onlinestatus" src="{vb:stylevar imgdir_statusicon}/user-invisible_memberlist.png" alt="{vb:rawphrase x_is_invisible, {vb:raw userinfo.username}}" border="0" /> </vb:if> Now, no matter what I do, the code only outputs the very first vb:if, and from what I have so far gathered, the $onlinestatus variable is not global and cannot be used in the memberlist template. Is there a way of making this available, or a hook to pull the correct info, I am at my wits end to get this to work. Remember, I am not a coder |
#2
|
||||
|
||||
It may be because the last vb:elseif should be vb:else
|
#3
|
||||
|
||||
Nah!
Didn't make a difference ozzy47, I have reworked this code a handful of times, using slightly different methods (which is probably why I made the mistake), but none of them will display anything other than the first vb:if, which is offline. Thanks anyway |
#4
|
|||
|
|||
I haven't tried it, but you might try this: Create a plugin using hook location memberlist_bit and code like this:
Code:
$memberlist['onlinestatus'] = fetch_online_status($memberlist); |
#5
|
||||
|
||||
I am trying that Kevin, but it is not working ATM, still looking into it.
|
#6
|
||||
|
||||
I get this error when viewing the memberlist
Quote:
|
#8
|
||||
|
||||
Thanks ozzy47 & kh99 :up:
This did exactly what I wanted, despite my 6hrs of trying. |
#9
|
||||
|
||||
Excellent, glad to hear it worked for you.
|
Thread Tools | |
Display Modes | |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|