PDA

View Full Version : Show Thread Enhancements - Last Seen Online in postbit


Brad
08 Aug 2006, 09:15
This modification will show the last time (and date) the user was online in the postbit template.

Version 2.0 is an improved version of the plug-in I released for vB 3.5.4. One nasty call to can_moderate was removed to save some processing time, all the code was also moved to one plug-in.

If the user is invisible the last online time will not be displayed if you do not have the proper usergroup permissions. The last online time will also not be shown for guest posts.

As far as I know all bugs are fixed in this version. It was tested on vB 3.6 RC3 and vB 3.6.0 (gold). It has not been tested on vBulletin 3.5.

Mudvayne
08 Aug 2006, 09:59
w00t! first install.. Actually 2nd ;).. Brad install first himself :p..

Hornstar
08 Aug 2006, 10:50
Okay cool, you got a demo or a Screen Shot that I can take a look at to see how it looks in action. Thanks

Brad
08 Aug 2006, 10:56
See first post for screenshot.

Mudvayne
08 Aug 2006, 11:34
http://www.golpo.net/forum/f22/movie-association-1007-new/ ;)..

Note: Brad.. Cud u make it for user profile page too?

BiReL41r
08 Aug 2006, 12:09
Very nice.

Stromba
08 Aug 2006, 12:12
;)

Great, just what i was looking for.

Brad
08 Aug 2006, 12:14
http://www.golpo.net/forum/f22/movie-association-1007-new/ ;)..

Note: Brad.. Cud u make it for user profile page too?
Profiles already show the last online time. ;)

Terminatoronly
08 Aug 2006, 18:58
good work ;) installed for sure ;)

Disparage
08 Aug 2006, 20:57
Install.

dragonhart
08 Aug 2006, 21:04
thank you so much.....Dragonhart

Qwest
09 Aug 2006, 17:58
Does this work off the user's own local time or the default server/vbulletin time?

Brad
10 Aug 2006, 00:12
Does this work off the user's own local time or the default server/vbulletin time?

The time and date is generated like all dates within vBulletin. In other words the time zone offset for each user is taken into effect.

Moonkat
12 Aug 2006, 03:29
I figured out where the postbit template thing was - you might want to add more detail to your instructions for those of us that are new to vBulletin and don't know where to find stuff.

I'm still not seeing this in the postbit, though. I am using the Kirsch template right now which has the postbit on the left rather than at the top, so is there a different thing I need to do to the templates?

The other possibility that I can think of - I have myself set to where I don't have to log in each time I come back to the page, is that the problem? So far I'm only running it on a test forum, so it's not on one that's in wide use.

Mudvayne
12 Aug 2006, 08:07
U shud've edit postbit_legacy template :).. I'm running it without having any problems.. U can't see this untill u edit ur templates..

Moonkat
12 Aug 2006, 08:55
I did & it still wasn't working. I may have missed something, so I'm going to clear it all out and try again :)

WeArab
16 Aug 2006, 07:49
Installed thank you :D

adwade
17 Aug 2006, 06:04
The page here doesn't have TEMPLATE EDITS checked, so I assumed you didn't have to do any. Yet when I D/L'd the install file and read your 'install.txt' that's the first thing it mentions.

Does the installer happen to handle the template edits for you or something?

Thanxx
Signed, I know oh so little of all this

bongwater
21 Aug 2006, 19:23
installed on 3.6 gold. thanks

-bongwater

jiffy
22 Aug 2006, 19:17
Installed, works great.

Danny Diamond
01 Sep 2006, 00:18
Installed.

Thanks dude.
;)

Mischievious
07 Sep 2006, 06:09
Hrmm. I found a bug where when people go into invisible mode, it completely jarbles up only their posts for others. Has anybody else ran into this yet?

Here's a screen shot of what happens whenever someone is invisible mode..

http://img.photobucket.com/albums/v715/MischievousSpirit/7d58b9eb.jpg

phpdevrus
08 Sep 2006, 00:55
nice & smooth.

NinaUK
12 Sep 2006, 17:33
installed and working. thanks.:)

iran.gs
27 Sep 2006, 23:49
lnstalled Excelent job.. Nice Site Ice

ssslippy
29 Sep 2006, 03:27
The 3.5.x version you to show the persons last online in their profile. Can this be readded to this version?

oberheimhaven
29 Sep 2006, 23:38
Nice hack Installed 3.6.0 No Issues easy install

Thx
MarkAnthony

category
01 Oct 2006, 06:35
question though can you change the time meaning i use normal for my time but in posbit-legacy its too long but if i change it it will change in both so i wonder can i change the time look instead of using the long ones on the forum?

Mudvayne
01 Oct 2006, 08:20
The 3.5.x version you to show the persons last online in their profile. Can this be readded to this version?
The function you are asking is a default vBulletin function.
question though can you change the time meaning i use normal for my time but in posbit-legacy its too long but if i change it it will change in both so i wonder can i change the time look instead of using the long ones on the forum?
You can try
<if condition="$show['last_seen_online']"><div>$vbphrase[last_seen_online]: <br />$post[lastseen_date] $post[lastseen_time]</div></if>

That 'll just split into two line.

TJs
01 Oct 2006, 13:09
installed thanks

ServerX14
02 Oct 2006, 21:59
installed =)

Limerick
02 Oct 2006, 22:15
Hello Brad,

Thanks for this hack, but prior to install it, I'd like to know if it is possible to let only Admin seeing this information in postbit ?

Limerick
07 Oct 2006, 12:43
Hello Brad,

Thanks for this hack, but prior to install it, I'd like to know if it is possible to let only Admin seeing this information in postbit ?

Nobody has the answer ?

giza
08 Oct 2006, 18:52
can we make this work only for administrators and not for all users??

bump..sorry i didnt see this last post

Rich
11 Oct 2006, 20:13
I don't have this installed but I am guessing you can wrap the template code in this:

<if condition="is_member_of($bbuserinfo, x)">
Template Edit Here
<else />
&nbsp;
</if>

"x" is the usergroup you want to see this. You can add multiple usergroups by writing x,y,z

The default admin usergroup is 6. For admin only, you would change the "x" to a 6.

jw00dy
17 Oct 2006, 09:10
Excellent job.

*clicks installed*

cuphongle
18 Oct 2006, 17:28
very nice, simple

dagummit
29 Oct 2006, 21:06
I searched for the text per the instructions in the zip, but neither my postbit or postbit_legacy templates has the coding:

<if condition="$post['joindate']"><div>$vbphrase[join_date]: $post[joindate]</div></if>

I am running 3.6.2, would this be a problem?

Viper007Bond
09 Nov 2006, 10:03
Thanks! :)

I needed a shorter version for my postbit_legacy though, so this is what I ended up using:

<if condition="$show['last_seen_online']"><div>Last Online: <if condition="$post[lastseen_date] == Today">$post[lastseen_time]<else />$post[lastseen_date]</if></div></if>
If they were online today, it shows only the time, otherwise it shows only the date. It's not perfect though as they coulda just been online but right before midnight your time (making it "Yesterday").

Been Told
24 Nov 2006, 20:20
Thanks, great mod. :)

deezelpope
09 Apr 2007, 22:34
Smooth install! Thank you!

IAWBody
10 Apr 2007, 18:24
I've had this installed for a while, and I just wanted to say thank you. :D

Aveal
03 May 2007, 22:34
nice!

works fine with Version 3.6.5

Majest
13 May 2007, 07:15
Installed on 3.6.5.

BadgerDog
01 Jul 2007, 21:34
The function you are asking is a default vBulletin function.

You can try
<if condition="$show['last_seen_online']"><div>$vbphrase[last_seen_online]: <br />$post[lastseen_date] $post[lastseen_time]</div></if>

That 'll just split into two line.


Thanks .... :)

I prefer this change visually.... :up:

Regards,
Badger

BadgerDog
01 Jul 2007, 21:44
I don't have this installed but I am guessing you can wrap the template code in this:

<if condition="is_member_of($bbuserinfo, x)">
Template Edit Here
<else />
&nbsp;
</if>

"x" is the usergroup you want to see this. You can add multiple usergroups by writing x,y,z

The default admin usergroup is 6. For admin only, you would change the "x" to a 6.


Thanks Rich.... :)

Used this part as well .... :up:

Regards,
Badger

Ville
27 Jul 2007, 19:26
Installed in 3.6.8.. still working fine! :up:

MeMySelfNi
28 Sep 2007, 06:06
><installed><

redlabour
29 Jan 2008, 19:08
Works with 3.7?

Freesteyelz
30 Jan 2008, 00:52
I hope so...I've been running it from 3.6.8 --> 3.7 Beta 4. :)

Mecho
17 May 2008, 18:46
yes , it works in latest version too (3.7 Gold)

gnubittol
18 May 2008, 09:25
it works in version 3.6.10 :)

Deadly Assassin
15 Jun 2008, 12:57
Nice one thanks

Boofo
15 Jun 2008, 14:02
If you want it to show when you hover over the avatar:

Find:

alt="<phrase 1="$post[username]">$vbphrase[xs_avatar]</phrase>"


REPLACE it with:


alt="<if condition="$show['last_seen_online']">$vbphrase[last_seen_online]: $post[lastseen_date] at $post[lastseen_time]<else /><phrase 1="$post[username]">$vbphrase[xs_avatar]</phrase></if>"



This will show Username's Avatar to guests and those who are unable to view the last online.

Serenity
15 Jun 2008, 18:17
ty Boofo!!

Michael2
17 Jun 2008, 20:37
Installed on 3.7, works great, thanks!

Eq4bits
16 Jul 2008, 03:46
just reinstalled after upgrading to 3.7.2PL1
works a charm :D

Brad
20 Aug 2008, 16:50
Good to hear it works for 3.7, I've not updated it in ages. :)

NetRover
03 Oct 2008, 19:21
Just going to update this as I'm still using the old version which still works on 3.7.2

I'm just hope changing over is easy because this is definitely one of thos must have mods my users would never want to be without.

Hornstar
07 Nov 2008, 21:55
Good to hear it works for 3.7, I've not updated it in ages. :)

Will you be updating it for 3.8 when it goes gold? It is such a great mod, it would be nice knowing that it is working the best it can. :)

Loki12
28 Nov 2008, 06:35
Works great on 3.7.4.

I have a question though ... I've seen on another forum, it would show like this:

Last Seen: 11 Minutes ago

etc ... how can it be edited so it shows in this format?

tafreeh
02 Dec 2008, 06:39
how come its not working wid vb3.7 ?

anthroforum
02 Dec 2008, 19:51
Works great on 3.7.4.

I have a question though ... I've seen on another forum, it would show like this:

Last Seen: 11 Minutes ago

etc ... how can it be edited so it shows in this format?

Yeah I would like it in that format too.

redlabour
18 Dec 2008, 07:34
Will it work with 3.8?

Ville
10 Jan 2009, 09:01
Will it work with 3.8?Yes, it seems to be working fine with 3.8.0! :up:

The Coon
24 Apr 2009, 12:13
And 3.8.2 thx!

Robru
08 Jul 2009, 19:30
And 3.8.3 :)

m_k
05 Aug 2009, 20:59
Working great on 3.7.6 :-)

Don't forget however that this hack requires one manual template edit - until I figured that out it wasn't working after my upgrade to 3.7.x

Kosmic1
19 Nov 2009, 14:14
And 3.8.3 :)

And 3.8.4 too :)

Nice mod! :up:

New Joe
16 Feb 2010, 06:37
It would be good to have this for vB4.

wolfyman
20 Feb 2010, 14:35
it must be a simple process to make it work for 4.x, right?

TundraSoul
12 Mar 2010, 21:29
Also looking for this mod to work with vB4.x.

doopz
18 Mar 2010, 15:27
Same here! would be very nice to have it working

New Joe
26 Mar 2010, 10:27
it must be a simple process to make it work for 4.x, right?
It is if you know about coding Mods, wish someone could do it,

Alan_SP
01 Apr 2010, 05:14
If you want just certain usergroups to know last activity, use code like this:

<if condition="is_member_of($bbuserinfo,6)"><div>$vbphrase[join_date]: $post[lastseen_date] $post[lastseen_time]</div></if>

In this <if condition="is_member_of($bbuserinfo,6)"> number 6 represents usergroup that has access to this information. 6 is default for administrators. If you want to enable this for moderators and supermoderators too, use:

<if condition="is_member_of($bbuserinfo,5,6,7)">

New Joe
01 Apr 2010, 06:11
How to make it work for vB4?

Alan_SP
05 Apr 2010, 17:15
I just played a bit more with this add-on. There's info for last post user made. And it's also in this cryptic format, so you need to edit add-on and find:

$this->post['lastseen_time'] = vbdate($this->registry->options['timeformat'], $this->post['lastactivity'], true);
$this->post['lastseen_date'] = vbdate($this->registry->options['dateformat'], $this->post['lastactivity'], true);

Add this code:

$this->post['lastpost_time'] = vbdate($this->registry->options['timeformat'], $this->post['lastpost'], true);
$this->post['lastpost_date'] = vbdate($this->registry->options['dateformat'], $this->post['lastpost'], true);

You should now have this:

$this->post['lastseen_time'] = vbdate($this->registry->options['timeformat'], $this->post['lastactivity'], true);
$this->post['lastseen_date'] = vbdate($this->registry->options['dateformat'], $this->post['lastactivity'], true);
$this->post['lastpost_time'] = vbdate($this->registry->options['timeformat'], $this->post['lastpost'], true);
$this->post['lastpost_date'] = vbdate($this->registry->options['dateformat'], $this->post['lastpost'], true);

To add it in postbit (or postbit legacy), just use lastpost_time and lastpost_date the way you like it and where you like it.:up:

mgurain
08 Jun 2010, 07:45
Hi,
this is a great mod, I wonder why it's not a default or an option in vbulletin ?
Do you have it updated for 3.8.5 ? I searched but find nothing other than this version.

Thanks,,

New Joe
10 Jun 2010, 01:08
Hi,
this is a great mod, I wonder why it's not a default or an option in vbulletin ?
Do you have it updated for 3.8.5 ? I searched but find nothing other than this version.

Thanks,,

I just installed it on vB 3.8.5 and it worked.

Alan_SP
26 Sep 2010, 16:53
How to make it work for vB4?

I just tested it on my upgrade testing site and it works with vB4 too. You only need to change code you put in postbit (legacy or new one, which I don't use).

My code looks like this (and just to let you know, I use last time user posted in postbit):

<vb:if condition="is_member_of($bbuserinfo,5,6,7,11)"><dt>Zad.Akt</dt> <dd>{vb:raw post.lastseen_date} {vb:raw post.lastseen_time}</dd></vb:if>

<vb:if condition="is_member_of($bbuserinfo,5,6,7,11)"><dt>Zad.Post</dt> <dd>{vb:raw post.lastpost_date} {vb:raw post.lastpost_time}</dd></vb:if>

To explain:

This part <vb:if condition="is_member_of($bbuserinfo,5,6,7,11)"> checks if the user is part of this usergroups (I allow it just for moderators and up to see this info). You can check for different conditions.

This is where actual message is written in postbit: <dt>Zad.Akt</dt> <dd>{vb:raw post.lastseen_date} {vb:raw post.lastseen_time}</dd>. This part: <dt>Zad.Akt</dt>, you put your own text respectively, what you want users to see as description for info. Don't forget to close if statement, do it with: </vb:if> I don't used any phrasing, it's a bit different if you want to use phrases. You'll need to create phrase and use it.

This add-on can be put to vB4 section with no problem. :)

adwade
05 Jan 2011, 00:23
I just installed it on vB 3.8.5 and it worked.

I just installed it on vB 3.8.6PL1 and it works perfectly.

However, I chose to add the code on my Postbit Legacy 'after' (not before) the following:

<if condition="$post['joindate']"><div>$vbphrase[join_date]: $post[joindate]</div></if>

Thus, it places the Last Online information, just 'below' the Join Date...instead of above it.

Sweet MOD though! :D I've always wondered why vB didn't have an option to chose Join Date -or- Last Online Date:confused: Doesn't matter now though, as I've got 'em BOTH Thanxx to Brad :up:

Brad
30 Dec 2014, 16:23
All these years later and this thing is still working, even on another major version.

Sorry for not providing support I got busy with life and don't have a vBulletin license anymore. :(

Good to see my old work still getting some use! :D

Alan_SP
30 Dec 2014, 17:42
It still works just fine. Probably not with vB5, but I don't care for that. Thanks. :up:

Brad
31 Mar 2016, 10:54
It still works just fine. Probably not with vB5, but I don't care for that. Thanks. :up:

You're welcome! I made this stuff for people to use and tinker with and reading through all the posts I see lots of people doing that. I had to do a double take when I read boofo's contribution to the modification....I miss him. :(

A kind person helped me gain access to my old vBulletin license. Once I'm verified again I'm going to release another version of this modification. I don't know how soon it'll be but I'll get around to it eventually.

Oh and remember all my releases are open source/free to use. So if you want to take some of my old work and port it to another version or release another version of the modification feel free. :)