vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 4.x Add-ons (https://vborg.vbsupport.ru/forumdisplay.php?f=245)
-   -   Miscellaneous Hacks - Postbit last date and time online (https://vborg.vbsupport.ru/showthread.php?t=300025)

Spangle 09-08-2013 08:17 AM

Good little snippet this

Bubble #5 09-20-2013 01:56 AM

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

It is too long and breaking up. Thanks :)

Adam Wood 09-24-2013 02:41 AM

The examples are in the legacy postbit. Anyone know if this works in the horizontal postbit?

justicechick 09-25-2013 11:06 PM

Quote:

Originally Posted by Bubble #5 (Post 2446816)
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

ozzy47 09-25-2013 11:08 PM

Only problem with that is anywhere the word Minutes shows up, even in posts, it will be changed to Mins.

justicechick 09-25-2013 11:20 PM

Quote:

Originally Posted by ozzy47 (Post 2448007)
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.

ozzy47 09-25-2013 11:30 PM

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.

justicechick 09-26-2013 12:42 AM

Quote:

Originally Posted by Adam Wood (Post 2447611)
The examples are in the legacy postbit. Anyone know if this works in the horizontal postbit?

Here is the proof for horizontal postbit. https://vborg.vbsupport.ru/external/2013/09/19.png

Bubble #5 09-26-2013 01:24 AM

Quote:

Originally Posted by ozzy47 (Post 2448007)
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 :p

ozzy47 09-26-2013 01:26 AM

Quote:

Originally Posted by Bubble #5 (Post 2448025)
DOH!!! Now I've got to change it back :p

You can use this method instead, https://vborg.vbsupport.ru/showpost....9&postcount=17


All times are GMT. The time now is 05:22 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
  • Page Generation 0.01652 seconds
  • Memory Usage 1,739KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)bbcode_code_printable
  • (5)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (2)pagenav_pagelink
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (10)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.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/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • printthread_start
  • pagenav_page
  • pagenav_complete
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete