Simple Machines Community Forum

Customizing SMF => Modifications and Packages => Topic started by: Dav999 on January 29, 2014, 08:02:02 PM

Title: Highlight tags
Post by: Dav999 on January 29, 2014, 08:02:02 PM
Link to Mod (https://custom.simplemachines.org/mods/index.php?mod=3825)

Highlight tags


With this mod, you can highlight text in posts on your forum as if you used a marker! To avoid confusion: this mod is not for syntax highlighting.

You can use [highlight]Text[/highlight] to highlight the text between the tags in yellow, or [highlight=(color)]Text[/highlight] for any other color.



Changelog
v1.2 (2016-08-23)
* Updated the regex for the rgb() syntax to allow values from 0-255 instead of 0-999
* Updated the early support for SMF 2.1
* Changed license from CC0 (http://creativecommons.org/publicdomain/zero/1.0/) to the Unlicense
v1.1 (2014-01-31)
* Added support for SMF 1.1.19 (and 2.1)
v1.0 (2014-01-24)
* Initial release




License:

This is free and unencumbered software released into the public domain.

Anyone is free to copy, modify, publish, use, compile, sell, or
distribute this software, either in source code form or as a compiled
binary, for any purpose, commercial or non-commercial, and by any
means.

In jurisdictions that recognize copyright laws, the author or authors
of this software dedicate any and all copyright interest in the
software to the public domain. We make this dedication for the benefit
of the public at large and to the detriment of our heirs and
successors. We intend this dedication to be an overt act of
relinquishment in perpetuity of all present and future rights to this
software under copyright law.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR
OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
OTHER DEALINGS IN THE SOFTWARE.

For more information, please refer to <http://unlicense.org/>
Title: Re: Highlight tags
Post by: Dav999 on January 31, 2014, 01:09:18 AM
This mod is available again :)
Title: Re: Highlight tags
Post by: br360 on January 31, 2014, 01:50:01 AM
Nice mod; thanks. Now when I use the highlight tag for news items, people may actually read them. ;)
Title: Re: Highlight tags
Post by: Dav999 on January 31, 2014, 03:28:25 AM
Thanks. :)

Currently I'm planning to implement:
Title: Re: Highlight tags
Post by: Nicholaus on January 31, 2014, 12:38:27 PM
Hi David, good to see a good looking mod.
Title: Re: Highlight tags
Post by: Dav999 on January 31, 2014, 01:18:21 PM
Thanks!

/me is wondering how you know my full first name

I've added support for SMF 1.1 now, and it also works on my testing installation of SMF 2.1 alpha, so I've added support for that as well! 8)
Title: Re: Highlight tags
Post by: Arantor on January 31, 2014, 01:22:45 PM
I think it's an educated guess...
Title: Re: Highlight tags
Post by: Dav999 on January 31, 2014, 01:37:49 PM
Quote from: Sir Cumber-Patcher on January 31, 2014, 01:22:45 PM
I think it's an educated guess...

It could also have been Dave or something... :P
Title: Re: Highlight tags
Post by: GamePersia on February 02, 2014, 10:02:13 PM
Nice one,...
But where is the icon for this ??
or we have to add this tag by writing it ?
Kindly gide for icon !!
:(
Title: Re: Highlight tags
Post by: Arantor on February 02, 2014, 10:18:34 PM
The mod does not add an icon. That is probably a good thing otherwise some people might go overboard with formatting.

Also, please do NOT use bold everywhere, it is rather hard to read and annoys people (me included)
Title: Re: Highlight tags
Post by: GamePersia on February 02, 2014, 10:30:04 PM
Quote from: Sir Cumber-Patcher on February 02, 2014, 10:18:34 PM
The mod does not add an icon. That is probably a good thing otherwise some people might go overboard with formatting.

Also, please do NOT use bold everywhere, it is rather hard to read and annoys people (me included)
Oh,..ok..
will be careful from next time !!  :)
Title: Re: Highlight tags
Post by: Dav999 on February 03, 2014, 09:56:42 AM
Quote from: GamePersia on February 02, 2014, 10:02:13 PM
Nice one,...

Thanks :)

I was thinking of adding a setting whether to show a dropdown with highlight colors or not, but this might set it apart from the rest of the BBCode which do not have options to show/hide their button without also enabling/disabling the feature. It still wouldn't hurt though.

Also, I'm wondering where to place a dropdown if I'm going to do that. It would probably be too big to fit on either line so maybe I should just make it one button which inserts the code for the default color.
Title: Re: Highlight tags
Post by: Steve on February 14, 2014, 06:30:58 PM
Sweet! Works great! Well done! :D
Title: Re: Highlight tags
Post by: Dav999 on February 15, 2014, 05:00:11 AM
Thank you :)
Title: Re: Highlight tags
Post by: Steve on February 16, 2014, 03:51:01 PM
Quote from: Dav999 on February 03, 2014, 09:56:42 AM... maybe I should just make it one button which inserts the code for the default color.

That would be cool. :)
Title: Re: Highlight tags
Post by: kamili34 on February 16, 2014, 04:43:11 PM
Would be cool with buuton. :)
Title: Re: Highlight tags
Post by: Rain Forest on August 23, 2014, 07:20:59 AM
Quote from: kamili34 on February 16, 2014, 04:43:11 PM
Would be cool with buuton. :)
agreed :)
Title: Re: Highlight tags
Post by: Majik_Imaje on August 12, 2019, 01:21:57 PM
                 can you give an example of how to add a different color ? NOTHING WORKS FOR ME
Title: Re: Highlight tags
Post by: Steve on August 13, 2019, 03:42:18 PM
[highlight=#0682aa]Text here[/highlight] or [highlight=blue]Text here[/highlight], etc.

Leave out the parenthesis as shown in the first post. :)
Title: Re: Highlight tags
Post by: Majik_Imaje on August 13, 2019, 11:17:39 PM
Quote from: Dav999 on January 31, 2014, 01:09:18 AM
This mod is available again :)

I can get the yellow to work very easily but could you please give  me an example to use any other color. I have tried and  tried to put the  rgb values inside the parenthesis but nothing ever happens.


[highlight]=(25,  225,  50)[ My text goes here [/end of tag
Title: Re: Highlight tags
Post by: Diego Andrés on August 13, 2019, 11:36:07 PM
Quote from: Majik_Imaje on August 13, 2019, 11:17:39 PM
Quote from: Dav999 on January 31, 2014, 01:09:18 AM
This mod is available again :)

I can get the yellow to work very easily but could you please give  me an example to use any other color. I have tried and  tried to put the  rgb values inside the parenthesis but nothing ever happens.


[highlight]=(25,  225,  50)[ My text goes here [/end of tag

Well, should be [highlight=rgb(25,  225,  50)]My text goes here [/highlight]

That's assuming I understood how the tag works.
Title: Re: Highlight tags
Post by: Steve on August 15, 2019, 03:11:53 PM
Actually, make sure there's no more than one space between the numbers. For example:

[highlight=rgb(25, 225, 50)]My text goes here [/highlight]

or

[highlight=rgb(25,225,50)]My text goes here [/highlight]