Advertisement:

Author Topic: Highlight tags  (Read 5871 times)

Offline Dav999

  • Jr. Member
  • **
  • Posts: 199
  • Gender: Male
Highlight tags
« on: January 29, 2014, 08:02:02 PM »
Link to Mod

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 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:
Code: [Select]
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/>
« Last Edit: January 31, 2014, 01:21:30 PM by Dav999 »

Offline Dav999

  • Jr. Member
  • **
  • Posts: 199
  • Gender: Male
Re: Highlight tags
« Reply #1 on: January 31, 2014, 01:09:18 AM »
This mod is available again :)

Offline br360

  • Support Specialist
  • SMF Hero
  • *
  • Posts: 2,398
    • GenXcommunity
Re: Highlight tags
« Reply #2 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. ;)

Offline Dav999

  • Jr. Member
  • **
  • Posts: 199
  • Gender: Male
Re: Highlight tags
« Reply #3 on: January 31, 2014, 03:28:25 AM »
Thanks. :)

Currently I'm planning to implement:
  • Support for SMF 1.1 done
  • A setting in the admin area to set the default highlighting color
  • A button/list for it on the post page
« Last Edit: February 01, 2014, 08:28:53 AM by Dav999 »

Offline Nicholaus

  • Semi-Newbie
  • *
  • Posts: 27
Re: Highlight tags
« Reply #4 on: January 31, 2014, 12:38:27 PM »
Hi David, good to see a good looking mod.

Offline Dav999

  • Jr. Member
  • **
  • Posts: 199
  • Gender: Male
Re: Highlight tags
« Reply #5 on: January 31, 2014, 01:18:21 PM »
Thanks!

* Dav999 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)

Offline Arantor

  • Resident Overthinker
  • SMF Friend
  • SMF Legend
  • *
  • Posts: 71,389
    • StoryBB/StoryBB on GitHub
Re: Highlight tags
« Reply #6 on: January 31, 2014, 01:22:45 PM »
I think it's an educated guess...
Don’t try to tell me that some power can corrupt a person. You haven’t had enough to know what it’s like.

No good deed goes unpunished / No act of charity goes unresented.

Offline Dav999

  • Jr. Member
  • **
  • Posts: 199
  • Gender: Male
Re: Highlight tags
« Reply #7 on: January 31, 2014, 01:37:49 PM »
I think it's an educated guess...

It could also have been Dave or something... :P

Offline GamePersia

  • Jr. Member
  • **
  • Posts: 261
  • Gender: Male
Re: Highlight tags
« Reply #8 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 !!
:(

Offline Arantor

  • Resident Overthinker
  • SMF Friend
  • SMF Legend
  • *
  • Posts: 71,389
    • StoryBB/StoryBB on GitHub
Re: Highlight tags
« Reply #9 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)
Don’t try to tell me that some power can corrupt a person. You haven’t had enough to know what it’s like.

No good deed goes unpunished / No act of charity goes unresented.

Offline GamePersia

  • Jr. Member
  • **
  • Posts: 261
  • Gender: Male
Re: Highlight tags
« Reply #10 on: February 02, 2014, 10:30:04 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 !!  :)

Offline Dav999

  • Jr. Member
  • **
  • Posts: 199
  • Gender: Male
Re: Highlight tags
« Reply #11 on: February 03, 2014, 09:56:42 AM »
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.

Offline Steve

  • Freak
  • SMF Friend
  • SMF Hero
  • *
  • Posts: 4,499
  • Gender: Male
  • I have not yet begun to procrastinate.
Re: Highlight tags
« Reply #12 on: February 14, 2014, 06:30:58 PM »
Sweet! Works great! Well done! :D
Online Manual

Please do not PM me for support.

Offline Dav999

  • Jr. Member
  • **
  • Posts: 199
  • Gender: Male
Re: Highlight tags
« Reply #13 on: February 15, 2014, 05:00:11 AM »
Thank you :)

Offline Steve

  • Freak
  • SMF Friend
  • SMF Hero
  • *
  • Posts: 4,499
  • Gender: Male
  • I have not yet begun to procrastinate.
Re: Highlight tags
« Reply #14 on: February 16, 2014, 03:51:01 PM »
... maybe I should just make it one button which inserts the code for the default color.

That would be cool. :)
Online Manual

Please do not PM me for support.

Offline kamili34

  • Jr. Member
  • **
  • Posts: 232
  • Gender: Male
  • noob
    • pilarki.org
Re: Highlight tags
« Reply #15 on: February 16, 2014, 04:43:11 PM »
Would be cool with buuton. :)

Offline Rain Forest

  • Full Member
  • ***
  • Posts: 657
  • 𝒢𝒾𝓇𝒶𝒻𝒻𝑒
    • Love Troops
Re: Highlight tags
« Reply #16 on: August 23, 2014, 07:20:59 AM »

Offline Majik_Imaje

  • Semi-Newbie
  • *
  • Posts: 73
Re: Highlight tags
« Reply #17 on: August 12, 2019, 01:21:57 PM »
                 can you give an example of how to add a different color ? NOTHING WORKS FOR ME

Offline Steve

  • Freak
  • SMF Friend
  • SMF Hero
  • *
  • Posts: 4,499
  • Gender: Male
  • I have not yet begun to procrastinate.
Re: Highlight tags
« Reply #18 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. :)
Online Manual

Please do not PM me for support.

Offline Majik_Imaje

  • Semi-Newbie
  • *
  • Posts: 73
Re: Highlight tags
« Reply #19 on: August 13, 2019, 11:17:39 PM »
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

Offline Diego Andrés

  • Customizer
  • SMF Hero
  • *
  • Posts: 3,248
  • Gender: Male
    • DiegoSetroc on GitHub
    • @bihgetter on Twitter
    • SMF Tricks - Free & Premium Themes
Re: Highlight tags
« Reply #20 on: August 13, 2019, 11:36:07 PM »
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.

SMF Tricks - Free & Premium Responsive Themes for SMF.

Offline Steve

  • Freak
  • SMF Friend
  • SMF Hero
  • *
  • Posts: 4,499
  • Gender: Male
  • I have not yet begun to procrastinate.
Re: Highlight tags
« Reply #21 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]
Online Manual

Please do not PM me for support.