PDA

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


Brad
08-07-2006, 10:00 PM
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-08-2006, 07:59 AM
w00t! first install.. Actually 2nd ;).. Brad install first himself :p..

Hornstar
08-08-2006, 08:50 AM
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-08-2006, 08:56 AM
See first post for screenshot.

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

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

BiReL41r
08-08-2006, 10:09 AM
Very nice.

Stromba
08-08-2006, 10:12 AM
;)

Great, just what i was looking for.

Brad
08-08-2006, 10:14 AM
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-08-2006, 04:58 PM
good work ;) installed for sure ;)

Disparage
08-08-2006, 06:57 PM
Install.

dragonhart
08-08-2006, 07:04 PM
thank you so much.....Dragonhart

Qwest
08-09-2006, 03:58 PM
Does this work off the user's own local time or the default server/vbulletin time?

Brad
08-09-2006, 10:12 PM
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
08-12-2006, 01:29 AM
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
08-12-2006, 06:07 AM
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
08-12-2006, 06:55 AM
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
08-16-2006, 05:49 AM
Installed thank you :D

adwade
08-17-2006, 04:04 AM
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
08-21-2006, 05:23 PM
installed on 3.6 gold. thanks

-bongwater

jiffy
08-22-2006, 05:17 PM
Installed, works great.

Danny Diamond
08-31-2006, 10:18 PM
Installed.

Thanks dude.
;)

Mischievious
09-07-2006, 04:09 AM
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
09-07-2006, 10:55 PM
nice & smooth.

NinaUK
09-12-2006, 03:33 PM
installed and working. thanks.:)

iran.gs
09-27-2006, 09:49 PM
lnstalled Excelent job.. Nice Site Ice

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

oberheimhaven
09-29-2006, 09:38 PM
Nice hack Installed 3.6.0 No Issues easy install

Thx
MarkAnthony

category
10-01-2006, 04:35 AM
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
10-01-2006, 06:20 AM
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
10-01-2006, 11:09 AM
installed thanks

ServerX14
10-02-2006, 07:59 PM
installed =)

Limerick
10-02-2006, 08:15 PM
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
10-07-2006, 10:43 AM
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
10-08-2006, 04:52 PM
can we make this work only for administrators and not for all users??

bump..sorry i didnt see this last post

Rich
10-11-2006, 06:13 PM
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
10-17-2006, 07:10 AM
Excellent job.

*clicks installed*

cuphongle
10-18-2006, 03:28 PM
very nice, simple

dagummit
10-29-2006, 07:06 PM
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
11-09-2006, 08:03 AM
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
11-24-2006, 06:20 PM
Thanks, great mod. :)

deezelpope
04-09-2007, 08:34 PM
Smooth install! Thank you!

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

Aveal
05-03-2007, 08:34 PM
nice!

works fine with Version 3.6.5

Majest
05-13-2007, 05:15 AM
Installed on 3.6.5.

BadgerDog
07-01-2007, 07:34 PM
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
07-01-2007, 07:44 PM
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
07-27-2007, 05:26 PM
Installed in 3.6.8.. still working fine! :up:

MeMySelfNi
09-28-2007, 04:06 AM
><installed><

redlabour
01-29-2008, 05:08 PM
Works with 3.7?

Freesteyelz
01-29-2008, 10:52 PM
I hope so...I've been running it from 3.6.8 --> 3.7 Beta 4. :)

Mecho
05-17-2008, 04:46 PM
yes , it works in latest version too (3.7 Gold)

gnubittol
05-18-2008, 07:25 AM
it works in version 3.6.10 :)

Deadly Assassin
06-15-2008, 10:57 AM
Nice one thanks

Boofo
06-15-2008, 12:02 PM
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
06-15-2008, 04:17 PM
ty Boofo!!

Michael2
06-17-2008, 06:37 PM
Installed on 3.7, works great, thanks!

Eq4bits
07-16-2008, 01:46 AM
just reinstalled after upgrading to 3.7.2PL1
works a charm :D

Brad
08-20-2008, 02:50 PM
Good to hear it works for 3.7, I've not updated it in ages. :)

NetRover
10-03-2008, 05:21 PM
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
11-07-2008, 07:55 PM
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
11-28-2008, 04:35 AM
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
12-02-2008, 04:39 AM
how come its not working wid vb3.7 ?

anthroforum
12-02-2008, 05:51 PM
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
12-18-2008, 05:34 AM
Will it work with 3.8?

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

The Coon
04-24-2009, 10:13 AM
And 3.8.2 thx!

Robru
07-08-2009, 05:30 PM
And 3.8.3 :)

m_k
08-05-2009, 06:59 PM
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
11-19-2009, 12:14 PM
And 3.8.3 :)

And 3.8.4 too :)

Nice mod! :up:

New Joe
02-16-2010, 04:37 AM
It would be good to have this for vB4.

wolfyman
02-20-2010, 12:35 PM
it must be a simple process to make it work for 4.x, right?

TundraSoul
03-12-2010, 07:29 PM
Also looking for this mod to work with vB4.x.

doopz
03-18-2010, 01:27 PM
Same here! would be very nice to have it working

New Joe
03-26-2010, 08:27 AM
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
04-01-2010, 03:14 AM
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
04-01-2010, 04:11 AM
How to make it work for vB4?

Alan_SP
04-05-2010, 03:15 PM
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
06-08-2010, 05:45 AM
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
06-09-2010, 11:08 PM
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
09-26-2010, 02:53 PM
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
01-04-2011, 10:23 PM
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
12-30-2014, 02:23 PM
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
12-30-2014, 03:42 PM
It still works just fine. Probably not with vB5, but I don't care for that. Thanks. :up:

Brad
03-31-2016, 07:54 AM
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. :)