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)
-   -   BB Code Enhancements - Highlight BBCode - Highlights text with a yellow box (BB Code) (https://vborg.vbsupport.ru/showthread.php?t=248192)

BirdOPrey5 08-07-2010 10:00 PM

Highlight BBCode - Highlights text with a yellow box (BB Code)
 
1 Attachment(s)
This is a simple bbcode to highlight text with a yellow box. You can of course change the color to your needs.

This has been confirmed working in the latest releases of IE, FF, Chrome, Safari, and Opera.

Demo: here.

Add a new BBCode

Title: Highlight
BB Code Tag Name: hl
Replacement:
Code:

<span style="background-color:yellow;color:black;">{param}</span>
OR
Replacement:
Code:

<span class="highlight">{param}</span>
(Thanks to Boofo who pointed this out, you may want to use the second option if you have a custom skin, it may look better. Best to try both and see which you prefer.)
Example: [hl]This is a highlight test[/hl]
Description: This highlights selected text.
Use Option: No
Button Image: (optional) https://vborg.vbsupport.ru/external/2010/08/53.jpg

Remove Tag If Empty: Yes
All Disable Options: No

The above implementation fixes the color of the highlight at yellow and the text black for easy use. If you prefer you may also install it with a variable highlight color. If you prefer to have the user choose the highlight color then instead add the following:

Title: Highlight
BB Code Tag Name: hl
Replacement:
Code:

<span style="background-color:{option};color:black;">{param}</span>
Example: [hl="cyan"]This is a highlight test[/hl]
Description: This highlights selected text.
Use Option: Yes
Button Image: (optional) https://vborg.vbsupport.ru/external/2010/08/53.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.

Please mark as installed if you use this. :)

Check My Profile for other BB Code enhancements. They work on all versions.

Screenshot:
https://vborg.vbsupport.ru/attachmen...1&d=1281238379

Juggernaut 08-08-2010 03:51 AM

Very nice bb code :D
it would be cool if you put the password bbcode here as well :D

Dr.osamA 08-08-2010 09:34 AM

thanxx man

installed + 5 stars

Boofo 08-08-2010 10:32 AM

That is already the default style highlight code in vb 4. This will do it in templates automatically.

Code:

<span class="highlight">Testing</span>

BirdOPrey5 08-08-2010 12:02 PM

Quote:

Originally Posted by Destron (Post 2080725)
Very nice bb code :D
it would be cool if you put the password bbcode here as well :D

I didn't create that BB Code so I won't post it here but will PM you info on it... Actually it kind of stinks because the password is revealed when you quote the post, so it's just for fun. I was talking with someone about rewriting it to store them in the database but quite frankly it hasn't been a priority.

Quote:

Originally Posted by Boofo (Post 2080783)
That is already the default style highlight code in vb 4. This will do it in templates automatically.

Code:

<span class="highlight">Testing</span>

I see that highlight is used when searching and such but I don't see any bb code implementation of it. If you're suggesting I use the code you posted as a replacement it's certainly just as valid but my code is more easily editable for the user to change the highlight color if so inclined. It may even be a smart idea so as not to confuse it with text highlighted by vBulletin automatically.

Boofo 08-08-2010 12:20 PM

I was just letting you know it was already there, that's all. I didn't know if you knew it or not. I use the default highlight code for my Thread Starter in Postbit hack, that is how I knew. No offense meant, sir. ;)

BirdOPrey5 08-08-2010 12:36 PM

No offense taken, Thanks for the info.

mitch84 08-08-2010 01:40 PM

work fine, installed, thx

COL NIL SATIS 09-04-2010 02:59 PM

another good one...!!!!

OldSchoolDSL 01-05-2011 10:41 PM

Wonderful.

Installed and working

4.1 PL2


All times are GMT. The time now is 10:47 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.01833 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
  • (5)bbcode_code_printable
  • (2)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