The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
|||
|
|||
Idle? Member's name turns grey.
Looking for some help building a hack. If a member does not move pages for 5 minutes, their username turns grey to symbolize that they are idle.
|
#2
|
||||
|
||||
there is a var called "last action" or something similar in the $vbulletin->session var which should be of use for your idea. Just check if the number is greater than $whatever_amount_of_seconds, then make the name grey, otherwise don't.
|
#3
|
|||
|
|||
Can you nudge me in the right direction.
I have experience with template variables (if conditionals), however I am lost when you mention $vbulletin->session var |
#4
|
||||
|
||||
in template conditionals, you normally use regular php code, so... yeah. Something like this maybe:
HTML Code:
<vb:if condition="$vbulletin->session['lastactivity'] > 3600"><span class="idle"><vb:else /><span class="normal"></vb:if> Replace 3600 with any amount in seconds after you want the user to be idle. |
#5
|
|||
|
|||
Thanks, However I went into postbit_legacy and where it shows the username I added your code... with no effect
I've got to be missing something. HTML Code:
<if condition="$show['profile']"> <a class="bigusername" href="member.php?$session[sessionurl]u=$post[userid]">$post[musername]</a> <script type="text/javascript"> vbmenu_register("postmenu_$post[postid]", true); </script> <else /> <if condition="$vbulletin->session['lastactivity'] > 2000"><b>$post[musername]</b><else /><i>$post[musername]</i></if> </if> </div> |
#6
|
|||
|
|||
I am running Vbulletin 3.6.8 By the way, I think your above posts are referencing to vbulletin 4.0+
|
#7
|
||||
|
||||
kpf1827's code is for vB3
|
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|