Strikethrough text tag

Get help developing custom BBCodes or request one.
Post Reply
hrx
Registered User
Posts: 196
Joined: Wed Nov 18, 2015 11:21 am

Strikethrough text tag

Post by hrx » Mon Sep 24, 2018 11:58 am

Hi,

I have such a bbcode strikethrough tag created on the forum:

Code: Select all

[s]{TEXT}[/s]

<span style="text-decoration: line-through;">{TEXT}</span>

Strikethrough: [s]text[/s]
How can I change this code into a div code? Instead of span style. I mean something like:

viewtopic.php?f=438&t=2485656#p15092241

User avatar
Lumpy Burgertushie
Registered User
Posts: 65016
Joined: Mon May 02, 2005 3:11 am
Contact:

Re: Strikethrough text tag

Post by Lumpy Burgertushie » Tue Sep 25, 2018 4:06 am

just change span to div and you are done

you also shouldn't be using the TEXT for this. you should probably use SIMPLETEXT instead
.

robert
I am available for custom work on a donation basis. Please send me a PM with your needs.

Premium phpBB 3.2 Styles by PlanetStyles.net

OK, so what's the speed of dark?

hrx
Registered User
Posts: 196
Joined: Wed Nov 18, 2015 11:21 am

Re: Strikethrough text tag

Post by hrx » Tue Sep 25, 2018 10:29 am

Thanks for the explanation. Why can not I use {TEXT} here? This tag works correctly.

Code: Select all

[s]{TEXT}[/s]

<div style="text-decoration: line-through;">{TEXT}</div>

User avatar
Mick
Support Team Member
Support Team Member
Posts: 20091
Joined: Fri Aug 29, 2008 9:49 am
Location: Cardiff

Re: Strikethrough text tag

Post by Mick » Tue Sep 25, 2018 1:06 pm

{TEXT} matches anything

{SIMPLETEXT} Characters from the latin alphabet (A-Z), numbers, spaces, commas, dots, minus, plus, hyphen and underscore
"The more connected we get the more alone we become" - Kyle Broflovski

There are no ‘threads’ in phpBB, they are topics.

User avatar
Lumpy Burgertushie
Registered User
Posts: 65016
Joined: Mon May 02, 2005 3:11 am
Contact:

Re: Strikethrough text tag

Post by Lumpy Burgertushie » Tue Sep 25, 2018 3:45 pm

is this useage not problematic because it is within the html?


robert
I am available for custom work on a donation basis. Please send me a PM with your needs.

Premium phpBB 3.2 Styles by PlanetStyles.net

OK, so what's the speed of dark?

hrx
Registered User
Posts: 196
Joined: Wed Nov 18, 2015 11:21 am

Re: Strikethrough text tag

Post by hrx » Fri Sep 28, 2018 2:56 pm

So in the centering code, also need to change TEXT on SIMPLETEXT?

Code: Select all

[center]{TEXT}[/center]

<div style="text-align: center;">{TEXT}</div>

User avatar
EA117
Registered User
Posts: 45
Joined: Wed Aug 15, 2018 3:23 am
Contact:

Re: Strikethrough text tag

Post by EA117 » Mon Oct 01, 2018 12:37 am

Though "conceptually" it makes sense "I don't intend to strike-out things other than simple text", in the reality of applying this as a CSS text-decoration override, don't I want to permit striking out "complex things" of which text is only a part of it? e.g. If I changed it from {TEXT} to {SIMPLETEXT}, doesn't that prevent me from just striking out an entire block of text that happens to contain a LIST or some other text-containing element that {SIMPLETEXT} can't describe?

I think that's the answer to the CENTER question anyway; you want to continue using {TEXT}, because you can very well intend to center things besides literally "just text."

Post Reply

Return to “Custom BBCode Development and Requests”

Who is online

Users browsing this forum: No registered users and 6 guests