The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
||||
|
||||
![]()
Hi all,
So I want to add last seen online to the postbit, there are no new mods for this and old ones do not seem to work. I know where I add the code manually but if I copy paste the same code used in the member profile it shows the title but not the date, as if the $ command is only good for the member page. Any ideas what I would use? |
#2
|
||||
|
||||
![]()
its probably going to be either a $userinfo or a $prepared var, it would only be $prepared if vB has an existing variable for last seen online.
I had a problem with signatures in my memberinfo template, when I used $post[signature] it would return the sig, but if there was a sig pic it would only show the bbcode tags for sig pics. I found out that memberinfo already had a sig part, so I used $prepared[signature] and it displayed the sig with pics, because vbulletin has already "prepared" the signature. |
#3
|
||||
|
||||
![]()
Neither work.
|
#4
|
||||
|
||||
![]()
As I posted over on vb.com, you'll need to use $post or $userinfo. However, the code you posted over on vb.com isn't going to work as is. You have a bunch of variables in it that aren't defined for use in the postbit. You will have to simplify it quite a bit.
edit: Someone posted this in another thread. It may work for you: HTML Code:
<div>$vbphrase[last_seen_online]: $post[lastseen_date] $post[lastseen_time]</div> |
#5
|
||||
|
||||
![]()
Yeah, doesn't work thanks anyway.
|
#6
|
||||
|
||||
![]()
You know, simply saying "doesn't work" isn't going to help us to help you. You need to post the code you are using with a couple of lines before and after your code if you want us to help you debug it. Also, post your plugin code (and location) so we can see how you are getting these variables.
|
#7
|
||||
|
||||
![]()
I'm just placeing it in postbit under join date.
Code:
<div>$vbphrase[last_seen_online]: $post[lastseen_date] $post[lastseen_time]</div> Likewise saying 'just create a plugin is not helpful. What does one put in this plugin? |
#8
|
||||
|
||||
![]()
I thought you were trying other variable names at first? Not $post[lastseen_date]. I thought you had some names from the memberinfo template that you were trying ($post[lastactivitydate] or $post[lastactivitytime]?). I never said to just create a plugin - I don't know if you need one. I did say that if you do have a plugin, you need to post your code for us to see.
And I know that phrase is not available because I checked - which is why I said you would have to create it or use text. |
#9
|
||||
|
||||
![]() Code:
<div>$vbphrase[last_seen_online]: $userinfo[lastactivitydate] $userinfo[lastactivitytime]</div> |
#10
|
||||
|
||||
![]()
Then it sounds like you will need to write a plugin to define the variables you want to use. You'll probably want to use one of the postbit_* hook locations. You should look in the code to see what variables are available at each location. If you have a date available, then you should be able to format it using something like (this is taken from a mod I wrote and you'll have to change it a little bit, I'm sure):
PHP Code:
|
![]() |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
![]() |
|
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|