![]() |
Postbit last date and time online
1 Attachment(s)
Postbit last date and time online
This is a simple mod that will place the last date and time online in the postbit. Installation: (1) Product To Upload Via: Acp > Plugins & Products > Manage Products > Add/Import Product (1) Simple Template To Edit Via: Acp > Styles & Templates > postbit or postbit_legacy template This works on 4.0.0 up to 4.2.1 (see attached pics of 4.2.1) https://vborg.vbsupport.ru/external/2013/07/2.jpg?2Date and time in postbit https://vborg.vbsupport.ru/external/2013/07/1.jpg?1 Date only in postbit If you wish to only use the last date online in the postbit, without the time, use the XML titled LastdatePB |
That did the trick.....
One question, is it possible to take out the time of day? Currently it reads Last Online:1 Minute Ago @ 12:24 How do I change it to read Last Online:1 Minute Ago Thanks for all you have done.... Edit: Nevermind, common sense really, I figured it out... Cheers... |
Quote:
|
Any ideas how much this will slow down page load?
Also how to show just today, yesterday,... 100days ago? Thank you |
Quote:
|
For those that may have already installed this , have updated the zipfile. If you only want to use the last date online in the postbit please use the following code.
<!-- LAST ONLINE DATE START --> <vb:if condition="$post['lastactivity']"> <dt>{vb:rawphrase last_online_activity}</dt><dd>{vb:raw post.lastactivity_date} </dd> </vb:if> <!-- / LAST ONLINE DATE END --> |
Good job justicechick... Keep it up..
|
done...
|
But how can I remove the AM/PM part?
|
Quote:
and use the following when modifying your template. <!-- LAST ONLINE DATE START --> <vb:if condition="$post['lastactivity']"> <dt>{vb:rawphrase last_online_activity}</dt><dd>{vb:raw post.lastactivity_date} </dd> </vb:if> <!-- / LAST ONLINE DATE END --> |
Good little snippet this
|
Where do we shorten the phrase "minutes" to "min" ?
It is too long and breaking up. Thanks :) |
The examples are in the legacy postbit. Anyone know if this works in the horizontal postbit?
|
Quote:
The steps to do so are as follows. Admincp> Styles and Templetes> Replacement Variable > add new variable. You would then select the style theme you want to change the variable in (change each one you use if you want consistency) Enter The text to be searched : Minutes Enter Text to replace: Mins You might also want to create one for the word Minute to replace Min Submit and check your postbit then. Thanks |
Only problem with that is anywhere the word Minutes shows up, even in posts, it will be changed to Mins.
|
Quote:
|
What you could do is create a new plugin.
Code:
$vbulletin->templatecache['postbit_legacy'] = str_replace('Minutes','Mins',$vbulletin->templatecache['postbit_legacy']); |
Quote:
|
Quote:
|
Quote:
|
THANKS Ozzy, appreciate you taking the time to write that up :up:
|
Not a problem, glad to help. :)
|
Quote:
Thanks for looking out and lending a helping hand to us all... :up: Much appreciated! I did check this out though with and without the code you supplied and I couldnt get it to change it. Im sure that I must be missing something. https://vborg.vbsupport.ru/external/2013/09/15.png |
I dunno, as I said I did not try this with your mod, I will a bit later today when I get home from work and see what's going on.
|
Quote:
|
Yeah I will look into it, it may be how the plugins run in order. I will look somtime either tonight, or tomorrow, got alot going on ATM.
|
Quote:
|
All times are GMT. The time now is 06:28 PM. |
Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
![]() |
|
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|