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
  #12  
Old 10-16-2011, 11:09 PM
Trangalleiro's Avatar
Trangalleiro Trangalleiro is offline
 
Join Date: Feb 2011
Location: A Coru?a
Posts: 10
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Hello

Thanks BirdOPrey5 for the MOD, installed and working perfectly in 4.1.7, as always.

Sorry for my English.

Greetings, Luis.
Reply With Quote
  #13  
Old 12-16-2011, 02:51 AM
Mr_Running Mr_Running is offline
 
Join Date: May 2010
Posts: 536
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Right now it highlights the bottom word.
It would be a nice improvement if it change with the increase font size and not just highlight the bottom of the word.

If the font size is increased.
How to get all of the entire word highlighted? <-- top to bottom
Reply With Quote
  #14  
Old 12-16-2011, 07:34 AM
pantani's Avatar
pantani pantani is offline
 
Join Date: Dec 2007
Location: Belgium
Posts: 126
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Works well on 4.1.8 thanks
Reply With Quote
  #15  
Old 12-16-2011, 10:48 AM
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 Mr_Running View Post
Right now it highlights the bottom word.
It would be a nice improvement if it change with the increase font size and not just highlight the bottom of the word.

If the font size is increased.
How to get all of the entire word highlighted? <-- top to bottom
Maybe you have a custom style? Link to your site? For most people it highlights the whole word.
Reply With Quote
  #16  
Old 12-16-2011, 03:24 PM
Mr_Running Mr_Running is offline
 
Join Date: May 2010
Posts: 536
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Upgrading shortly to 4.1.9

@BirdOPrey5 If it's still an issue may I send you the url by PM?

I hope your feeling better


Edit: Done the upgrade to 4.1.9 and the issue remains.
Reply With Quote
  #17  
Old 12-16-2011, 04:00 PM
Mr_Running Mr_Running is offline
 
Join Date: May 2010
Posts: 536
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by BirdOPrey5 View Post
For most people it highlights the whole word.
It's really noticeable with a font of 5, 6, 7
Reply With Quote
  #18  
Old 12-16-2011, 05:31 PM
BirdOPrey5's Avatar
BirdOPrey5 BirdOPrey5 is offline
Senior Member
 
Join Date: Jun 2008
Location: New York
Posts: 10,610
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

You need to put the [hl] tags INSIDE the Size tags...

wrong:
PHP Code:
[hl][SIZE=6]This is BIG highlighted text.[/SIZE][/hl
right:
PHP Code:
[SIZE=6][hl]This is BIG highlighted text 2.[/hl][/SIZE
Example of the difference: http://www.qapla.com/mods/showthread...?p=283#post283
Reply With Quote
Благодарность от:
Mr_Running
  #19  
Old 03-23-2012, 08:26 PM
cstreater cstreater is offline
 
Join Date: May 2010
Posts: 48
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Has anyone noticed that highlight is a built in BBCode in 4.x, but for some reason they didn't include a button for it?

Code is [highlight]
Reply With Quote
  #20  
Old 03-23-2012, 10:19 PM
Trevor Matthews Trevor Matthews is offline
 
Join Date: Oct 2010
Posts: 206
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Well spotted, I wonder why that isn't a button?
Thanks for the info.
Reply With Quote
  #21  
Old 05-23-2013, 02:51 AM
Snowhog's Avatar
Snowhog Snowhog is offline
 
Join Date: Oct 2011
Location: Andover, MN
Posts: 423
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Just too cool. Another fine mini-MOD. BoP5 rocks!! Added to our BBCodes. And, this is so much better than the 'hidden' [hightlight] BBCode in 4.x
Reply With Quote
Благодарность от:
BirdOPrey5
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 11:16 PM.


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.13081 seconds
  • Memory Usage 2,334KB
  • Queries Executed 26 (?)
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
  • (3)bbcode_code
  • (2)bbcode_php
  • (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
  • (11)post_thanks_box
  • (2)post_thanks_box_bit
  • (11)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (2)post_thanks_postbit
  • (11)post_thanks_postbit_info
  • (10)postbit
  • (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_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
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • 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
  • pagenav_page
  • pagenav_complete
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete