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

Trangalleiro 10-16-2011 11:09 PM

Hello

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

Sorry for my English.

Greetings, Luis.

Mr_Running 12-16-2011 02:51 AM

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

pantani 12-16-2011 07:34 AM

Works well on 4.1.8 thanks :)

BirdOPrey5 12-16-2011 10:48 AM

Quote:

Originally Posted by Mr_Running (Post 2278203)
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.

Mr_Running 12-16-2011 03:24 PM

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.

Mr_Running 12-16-2011 04:00 PM

Quote:

Originally Posted by BirdOPrey5 (Post 2278279)
For most people it highlights the whole word.

It's really noticeable with a font of 5, 6, 7

BirdOPrey5 12-16-2011 05:31 PM

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

cstreater 03-23-2012 08:26 PM

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]

Trevor Matthews 03-23-2012 10:19 PM

Well spotted, I wonder why that isn't a button?
Thanks for the info.

Snowhog 05-23-2013 02:51 AM

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

Toorak Times 05-23-2013 08:18 AM

Quote:

Originally Posted by cstreater (Post 2312611)
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]


I wonder what else is hidden in the WYSIWYG???

Webmist 01-23-2016 04:35 PM

I've expanded on this with:
HTML Code:

<span class="highlighter" style="background-color:{option};">{param}</span>
added this to the additional.css file:
.highlighter {padding-top: 2px; padding-left: 5px; border: 2px solid #333333; color: #333333;}

You could even make a duplicate (i.e. hl16) and add font size 16px to the CSS by changing .highlighter to .hl16.


All times are GMT. The time now is 06:05 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.01173 seconds
  • Memory Usage 1,770KB
  • 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
  • (1)bbcode_html_printable
  • (2)bbcode_php_printable
  • (5)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (22)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