Go Back   vb.org Archive > vBulletin Modifications > vBulletin 4.x Modifications > vBulletin 4.x Add-ons
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools
Postbit last date and time online Details »»
Postbit last date and time online
Version: 1.00, by justicechick justicechick is offline
Developer Last Online: Jul 2015 Show Printable Version Email this Page

Category: Miscellaneous Hacks - Version: 4.0.x Rating:
Released: 07-11-2013 Last Update: 07-12-2013 Installs: 35
Uses Plugins Template Edits
Re-useable Code  
No support by the author.

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)

Date and time in postbit

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

Download Now

File Type: zip Product last d&t online.zip (2.7 KB, 201 views)

Show Your Support

  • This modification may not be copied, reproduced or published elsewhere without author's permission.
Благодарность от:
iiioroh

Comments
  #12  
Old 09-08-2013, 08:17 AM
Spangle Spangle is offline
 
Join Date: Jun 2011
Posts: 520
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Good little snippet this
Reply With Quote
Благодарность от:
justicechick
  #13  
Old 09-20-2013, 01:56 AM
Bubble #5 Bubble #5 is offline
 
Join Date: Apr 2005
Posts: 984
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Where do we shorten the phrase "minutes" to "min" ?

It is too long and breaking up. Thanks
Reply With Quote
Благодарность от:
justicechick
  #14  
Old 09-24-2013, 02:41 AM
Adam Wood Adam Wood is offline
 
Join Date: Mar 2008
Posts: 16
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

The examples are in the legacy postbit. Anyone know if this works in the horizontal postbit?
Reply With Quote
  #15  
Old 09-25-2013, 11:06 PM
justicechick justicechick is offline
 
Join Date: Oct 2012
Location: Arkansas
Posts: 187
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Bubble #5 View Post
Where do we shorten the phrase "minutes" to "min" ?

It is too long and breaking up. Thanks
This is something that is actually done within vbulletin itself and not it the plugin.

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
Reply With Quote
  #16  
Old 09-25-2013, 11:08 PM
ozzy47's Avatar
ozzy47 ozzy47 is offline
 
Join Date: Jul 2009
Location: USA
Posts: 10,929
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Only problem with that is anywhere the word Minutes shows up, even in posts, it will be changed to Mins.
Reply With Quote
  #17  
Old 09-25-2013, 11:20 PM
justicechick justicechick is offline
 
Join Date: Oct 2012
Location: Arkansas
Posts: 187
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by ozzy47 View Post
Only problem with that is anywhere the word Minutes shows up, even in posts, it will be changed to Mins.
True Ozzy....I meant to include that . Thanks for catching it.
Reply With Quote
  #18  
Old 09-25-2013, 11:30 PM
ozzy47's Avatar
ozzy47 ozzy47 is offline
 
Join Date: Jul 2009
Location: USA
Posts: 10,929
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

What you could do is create a new plugin.
  1. Log into the ACP.
  2. On the side menu expand "Products & Plugins"
  3. Click on "Plugin Manager"
  4. At the very bottom there is a link to "Add New Plugin"
  5. On that page put in the following information-

    Product: vBulletin (this should be default)
    Title: Replace Minutes In Postbit
    Hook: postbit_display_complete (from a drop-down list)
    Execution Order: 5 (default value)
Code:
$vbulletin->templatecache['postbit_legacy'] = str_replace('Minutes','Mins',$vbulletin->templatecache['postbit_legacy']);
I tested this with the word Minutes directly in the postbit, and it works, I did not test it with this mod, but it should work.
Reply With Quote
  #19  
Old 09-26-2013, 12:42 AM
justicechick justicechick is offline
 
Join Date: Oct 2012
Location: Arkansas
Posts: 187
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Adam Wood View Post
The examples are in the legacy postbit. Anyone know if this works in the horizontal postbit?
Here is the proof for horizontal postbit.
Reply With Quote
Благодарность от:
tbworld
  #20  
Old 09-26-2013, 01:24 AM
Bubble #5 Bubble #5 is offline
 
Join Date: Apr 2005
Posts: 984
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by ozzy47 View Post
Only problem with that is anywhere the word Minutes shows up, even in posts, it will be changed to Mins.
DOH!!! Now I've got to change it back
Reply With Quote
  #21  
Old 09-26-2013, 01:26 AM
ozzy47's Avatar
ozzy47 ozzy47 is offline
 
Join Date: Jul 2009
Location: USA
Posts: 10,929
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Bubble #5 View Post
DOH!!! Now I've got to change it back
You can use this method instead, https://vborg.vbsupport.ru/showpost....9&postcount=17
Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 01:40 AM.


Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2024, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.04743 seconds
  • Memory Usage 2,344KB
  • Queries Executed 28 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)ad_showthread_beforeqr
  • (1)bbcode_code
  • (5)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)modsystem_post
  • (1)navbar
  • (4)navbar_link
  • (120)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (2)pagenav_pagelink
  • (11)post_thanks_box
  • (4)post_thanks_box_bit
  • (11)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (4)post_thanks_postbit
  • (11)post_thanks_postbit_info
  • (10)postbit
  • (1)postbit_attachment
  • (11)postbit_onlinestatus
  • (11)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open
  • (1)tagbit_wrapper 

Phrase Groups Available:
  • global
  • inlinemod
  • postbit
  • posting
  • reputationlevel
  • showthread
Included Files:
  • ./showthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_post_thanks.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_postinfo_query
  • fetch_postinfo
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • showthread_start
  • showthread_getinfo
  • forumjump
  • showthread_post_start
  • showthread_query_postids
  • showthread_query
  • bbcode_fetch_tags
  • bbcode_create
  • showthread_postbit_create
  • postbit_factory
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • fetch_musername
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • post_thanks_function_fetch_thanks_bit_start
  • post_thanks_function_show_thanks_date_start
  • post_thanks_function_show_thanks_date_end
  • post_thanks_function_fetch_thanks_bit_end
  • post_thanks_function_fetch_post_thanks_template_start
  • post_thanks_function_fetch_post_thanks_template_end
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_attachment
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • pagenav_page
  • pagenav_complete
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete