vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 3.8 Add-ons (https://vborg.vbsupport.ru/forumdisplay.php?f=235)
-   -   BB Code Enhancements - Monospace Font BBcode (https://vborg.vbsupport.ru/showthread.php?t=246111)

BirdOPrey5 07-07-2010 10:00 PM

Monospace Font BBcode
 
1 Attachment(s)
This is another simple bb code that I couldn't find anywhere so I figured why not make it for anyone interested. This will let you use a monospace font outside the [code] and [php] tags... it will look like normal forum text except be mono-spaced.

There are two options, the first one requires you specify a color, the second doesn't take a color but you can still use the standard FONT-COLOR tags to set one.

Demo: here. *First option only*

Option 1. Add a new BBCode

Title: Monospace
BB Code Tag Name: mono
Replacement:
Code:

<span style="font-family: monospace; color:{option}; white-space:nowrap;">{param}</span>
Example: [mono="red"]Red mono text test.[/mono]
Description: This code makes text monospaced with an optional color.
Use Option: Yes
Button Image: (optional) https://vborg.vbsupport.ru/external/2010/07/61.jpg
Remove Tag If Empty: Yes
All Disable Options: No

You can use standard color names in the option such as red, blue, green, yellow, etc...
You can also use hex color codes preceded by the # sign for exact colors, such as #0000FF
Click here for common hex color codes.

If you don't want to specify a color you must still include ="" in the opening tag or the code won't be parsed. To use this code without a color instead install the following code:

Option 2. Add a new BBCode

Title: Monospace
BB Code Tag Name: mono
Replacement:
Code:

<span style="font-family: monospace; white-space:nowrap;">{param}</span>
Example: [mono]Monospace text test.[/mono]
Description: This code makes text monospaced.
Use Option: No
Button Image: (optional) https://vborg.vbsupport.ru/external/2010/07/61.jpg
Remove Tag If Empty: Yes
All Disable Options: No

Please mark as installed if you use this. :)


All times are GMT. The time now is 01:02 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.01066 seconds
  • Memory Usage 1,712KB
  • 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
  • (2)bbcode_code_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (1)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
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete