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
Highlight BBCode - Highlights text with a yellow box (BB Code) Details »»
Highlight BBCode - Highlights text with a yellow box (BB Code)
Version: 1.00, by BirdOPrey5 (Senior Member) BirdOPrey5 is offline
Developer Last Online: Aug 2023 Show Printable Version Email this Page

Category: BB Code Enhancements - Version: 4.0.x Rating:
Released: 08-07-2010 Last Update: Never Installs: 55
Re-useable Code Translations  
No support by the author.

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)

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)

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:

Show Your Support

  • This modification may not be copied, reproduced or published elsewhere without author's permission.

Comments
  #2  
Old 08-08-2010, 03:51 AM
Juggernaut Juggernaut is offline
 
Join Date: Dec 2009
Location: California
Posts: 589
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Very nice bb code
it would be cool if you put the password bbcode here as well
Reply With Quote
  #3  
Old 08-08-2010, 09:34 AM
Dr.osamA's Avatar
Dr.osamA Dr.osamA is offline
 
Join Date: Aug 2004
Location: Syrie
Posts: 979
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

thanxx man

installed + 5 stars
Reply With Quote
  #4  
Old 08-08-2010, 10:32 AM
Boofo's Avatar
Boofo Boofo is offline
 
Join Date: Mar 2002
Location: Des Moines, IA (USA)
Posts: 15,776
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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

Code:
<span class="highlight">Testing</span>
Reply With Quote
  #5  
Old 08-08-2010, 12:02 PM
BirdOPrey5's Avatar
BirdOPrey5 BirdOPrey5 is offline
Senior Member
 
Join Date: Jun 2008
Location: New York
Posts: 10,610
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Destron View Post
Very nice bb code
it would be cool if you put the password bbcode here as well
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 View Post
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.
Reply With Quote
  #6  
Old 08-08-2010, 12:20 PM
Boofo's Avatar
Boofo Boofo is offline
 
Join Date: Mar 2002
Location: Des Moines, IA (USA)
Posts: 15,776
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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.
Reply With Quote
  #7  
Old 08-08-2010, 12:36 PM
BirdOPrey5's Avatar
BirdOPrey5 BirdOPrey5 is offline
Senior Member
 
Join Date: Jun 2008
Location: New York
Posts: 10,610
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

No offense taken, Thanks for the info.
Reply With Quote
  #8  
Old 08-08-2010, 01:40 PM
mitch84 mitch84 is offline
 
Join Date: Mar 2008
Location: france
Posts: 516
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

work fine, installed, thx
Reply With Quote
  #9  
Old 09-04-2010, 02:59 PM
COL NIL SATIS COL NIL SATIS is offline
 
Join Date: Aug 2009
Location: Liverpool UK
Posts: 802
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

another good one...!!!!
Reply With Quote
  #10  
Old 01-05-2011, 10:41 PM
OldSchoolDSL OldSchoolDSL is offline
 
Join Date: Oct 2010
Posts: 1,196
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Wonderful.

Installed and working

4.1 PL2
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 12:51 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.13422 seconds
  • Memory Usage 2,314KB
  • Queries Executed 24 (?)
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
  • (5)bbcode_code
  • (2)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
  • (10)post_thanks_box
  • (10)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (10)post_thanks_postbit_info
  • (9)postbit
  • (10)postbit_onlinestatus
  • (10)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_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
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • fetch_musername
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • pagenav_page
  • pagenav_complete
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete