The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
|||
|
|||
User last active
Is there a variable for the last visit to the board? I am making a some modifications. Is there one for online status as well?
I tried this $bbuserinfo[lastvisit] and that didn't do it. Also I would like to pull some info from the db and display it in the profile Where would I make this modification in member.php? |
#2
|
|||
|
|||
$lastvisit = $DB_site->query("SELECT lastactivity FROM user");
That could be the query being run in member.php $lastvisit['lastactivity'] would be the variable I think. You'd need to use code like this though: $lastactive=intval($lastvisit['lastactivity']/86400) So the variable to place in the template getinfo would be $lastactive. Ok this is just my guess on what the code could be, don't use this until someone with more experience can confirm it. |
#3
|
||||
|
||||
if it's for the currently logged in user
there are several $bbuserinfo[lastvisit] -> unixdatelin from the last visit (last login) $bbuserinfo[lastactivity] -> unixdateline when the user was active the last time (normally it would be now) $bbuserinfo[lastpost] -> dateline of last post to convert the datelines into Humanreadable text you have to use the date() function |
#4
|
|||
|
|||
He said that $bbuserinfo[lastvisit] didn't work in member.php. So I just grabbed the data again and messed with it I didn't know there was already variables for them .
|
#5
|
|||
|
|||
no, $bbuserinfo[lastvisit] didn't work in the template.
and using $lastactive in the template doesn't work either |
#6
|
||||
|
||||
the $bbuserinfo variables work everywhere in every template except these templates are called from within a function where $bbuserinfo was not globalized....
if you want to show the infos from the user who's profile is viewed, you have to use $userinfo[...] instead of $bbuserinfo[..] |
#7
|
|||
|
|||
I don't think $lastactive will work in a template until some more code is added, I think it needs to be wrapped up with the eval()'d code for the getinfo template. Did you put in the query and other code I posted aswell? Just putting in the variable will not work.
|
#8
|
|||
|
|||
so insert the code into the member.php then the other code will work in the template?
|
#9
|
|||
|
|||
I'd need to look into this, but it's 11:30pm here and I have school tomorrow. I'll look at it tomorrow evening if it's ok and release it as a proper hack?
|
#10
|
|||
|
|||
<a href="https://vborg.vbsupport.ru/showthread.php?s=&threadid=48848" target="_blank">https://vborg.vbsupport.ru/showt...threadid=48848</a>
Hack released. |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|