Problem with sub/sup bbcode buttons after upgrade

Get help with installation and running phpBB 3.1.x here. Please do not post bug reports, feature requests, or extension related questions here.
Scam Warning
Forum rules
READ: phpBB.com Board-Wide Rules and Regulations

NOTE: phpBB 3.1.x is at its End of Life stage and support will NOT be provided after July 1st, 2018.
User avatar
Farofylakas
Registered User
Posts: 139
Joined: Tue Oct 09, 2012 10:00 am

Problem with sub/sup bbcode buttons after upgrade

Post by Farofylakas »

Hi,
I've updated from 3.0.11 to 3.1.6 and installed the we_universal style.

I had a couple of extra bbcode buttons like: youtube, spoiler, sub and sup (for subscript and superscript).

youtube and spoiler still work alright but sub and sup don't. I've deleted them and added them again but the text doesn't seem to be affected by them.

Here's the setup:
BBCode usage: [sub]{TEXT}[/sub]
HTML replacement: <sub>{TEXT}</sub>
Help line: [sub]text[/sub]
Display on posting page: checked


a) What do I do wrong?

b) I'd like to have a button there, in the text editor, that adds an ascii star ( ☆ ) when pressed. How is that possible?

thanks :)
User avatar
Kailey
Community Team Leader
Community Team Leader
Posts: 3732
Joined: Mon Sep 01, 2014 1:00 am
Location: sudo rm -rf /
Name: Kailey Snay
Contact:

Re: Problem with sub/sup bbcode buttons after upgrade

Post by Kailey »

Farofylakas wrote:a) What do I do wrong?
These should work:

[subscript]{TEXT}[/subscript]
<span style="vertical-align: sub;">{TEXT}</span>

[superscript]{TEXT}[/superscript]
<span style="vertical-align: super;">{TEXT}</span>
Kailey Snay - Community Team Leader
Knowledge Base | Documentation | Community rules

If you have any questions about the rules/customs of this website, feel free to send me a PM.
User avatar
Farofylakas
Registered User
Posts: 139
Joined: Tue Oct 09, 2012 10:00 am

Re: Problem with sub/sup bbcode buttons after upgrade

Post by Farofylakas »

yes, works perfectly!

and as for the b) adding a button that adds a character in the text when clicked?

thanks! :)
User avatar
Kailey
Community Team Leader
Community Team Leader
Posts: 3732
Joined: Mon Sep 01, 2014 1:00 am
Location: sudo rm -rf /
Name: Kailey Snay
Contact:

Re: Problem with sub/sup bbcode buttons after upgrade

Post by Kailey »

I'm not sure. You could try a BBCode, but no guarantee.

[star][/star]
&#9734;
Kailey Snay - Community Team Leader
Knowledge Base | Documentation | Community rules

If you have any questions about the rules/customs of this website, feel free to send me a PM.
User avatar
Farofylakas
Registered User
Posts: 139
Joined: Tue Oct 09, 2012 10:00 am

Re: Problem with sub/sup bbcode buttons after upgrade

Post by Farofylakas »

but i'd like to skip bbcode, altogether, since there's no point in it. I don't need no formating. Just enter a plain character in the text ( ☆ ) .
User avatar
Farofylakas
Registered User
Posts: 139
Joined: Tue Oct 09, 2012 10:00 am

Re: Problem with sub/sup bbcode buttons after upgrade

Post by Farofylakas »

Any guidelines, as to this?

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

Re: Problem with sub/sup bbcode buttons after upgrade

Post by Lumpy Burgertushie »

type the character using your keyboard? ;)

maybe if you explainded exactly what you want to do we could help.

bbcode is not just about formatting. it is for the purpose of adding things to the post that would normally require html.


robert
Premium phpBB 3.3 Styles by PlanetStyles.net

I am pleased to announce that I have completed the first item on my bucket list. I have the bucket.
User avatar
cprgolds
Registered User
Posts: 459
Joined: Thu Oct 11, 2007 5:49 am
Location: Portland, Oregon

Re: Problem with sub/sup bbcode buttons after upgrade

Post by cprgolds »

Why not just use the Alt-Code?

★ ALT+9733
☆ ALT+9734
User avatar
Farofylakas
Registered User
Posts: 139
Joined: Tue Oct 09, 2012 10:00 am

Re: Problem with sub/sup bbcode buttons after upgrade

Post by Farofylakas »

It's not for me but for the editor available to the members...

These are different comibinations to remember. I'd like to have buttons in the editor so that the member can click and have some useful (to us) characters appear (indeed like ★ and ☆).

Any way to do it?

thanks :)
User avatar
cprgolds
Registered User
Posts: 459
Joined: Thu Oct 11, 2007 5:49 am
Location: Portland, Oregon

Re: Problem with sub/sup bbcode buttons after upgrade

Post by cprgolds »

This works...
star.png
User avatar
Farofylakas
Registered User
Posts: 139
Joined: Tue Oct 09, 2012 10:00 am

Re: Problem with sub/sup bbcode buttons after upgrade

Post by Farofylakas »

Yes, I know this works. The thing is, this way we enter needless tags in the text instead of the actual character.

I'd like to have just the character.

If there's no way to do it, then ok.

Thanks for trying to help. :)
User avatar
cprgolds
Registered User
Posts: 459
Joined: Thu Oct 11, 2007 5:49 am
Location: Portland, Oregon

Re: Problem with sub/sup bbcode buttons after upgrade

Post by cprgolds »

Farofylakas wrote:Yes, I know this works. The thing is, this way we enter needless tags in the text instead of the actual character.

I'd like to have just the character.

If there's no way to do it, then ok.

Thanks for trying to help. :)
If the tags get you the character that you want, why are they "needless"?

Otherwise, I think you are out of luck.
User avatar
Farofylakas
Registered User
Posts: 139
Joined: Tue Oct 09, 2012 10:00 am

Re: Problem with sub/sup bbcode buttons after upgrade

Post by Farofylakas »

It's like entering [a][/a] to get an "a" and that's not the right way.

Or like storing [Η][/Η][e][/e][l][/l][l][/l][ο][/ο] in the database instead of "Hello".

The ☆ is a simple legit ascii character like "a". I just need a simple way to enter it and have it stored the way it is. I don't need additional bbcodes in my db that will always require extra parsing to get... a simple character.

thnx though :)
User avatar
Lumpy Burgertushie
Registered User
Posts: 69223
Joined: Mon May 02, 2005 3:11 am
Contact:

Re: Problem with sub/sup bbcode buttons after upgrade

Post by Lumpy Burgertushie »

the correct way to input a ascii character that has not been provided on your keyboard is to type in the ascii code for it.

EDIT: I realized that It doesn't work the way I thought.

so, you have to type in the ascii code for it to work. there is no other way that I can find other than getting a keyboard that has that character on it etc.

robert
Premium phpBB 3.3 Styles by PlanetStyles.net

I am pleased to announce that I have completed the first item on my bucket list. I have the bucket.
User avatar
3Di
I've Been Banned!
Posts: 17538
Joined: Mon Apr 04, 2005 11:09 pm
Location: I'm with Ukraine 🇺🇦
Name: Marco
Contact:

Re: Problem with sub/sup bbcode buttons after upgrade

Post by 3Di »

kinerity wrote: Thu Jan 07, 2016 1:04 am
Farofylakas wrote:a) What do I do wrong?
These should work:

[subscript]{TEXT}[/subscript]
<span style="vertical-align: sub;">{TEXT}</span>

[superscript]{TEXT}[/superscript]
<span style="vertical-align: super;">{TEXT}</span>
These are better, I faced issues implementing sub/sup BBcodes in a live 3.1.12 board today.

SUB:
<span style="font-size: 75%;line-height: 0;position: relative;vertical-align: baseline;bottom: -0.25em;">{TEXT}</span>

SUP:
<span style="font-size: 75%;line-height: 0;position: relative;vertical-align: baseline;top: -0.5em;">{TEXT}</span>

Alternatively use the preferred HTML5's sub or sup tags <sub></sub> - <sup></sup> (depends on a server configuration basis I can say)
🆓 Free support for our extensions also provided here: phpBB Studio
🚀 Looking for a specific feature or alternative option? We will rock you!
Please PM me only to request paid works. Thx. Buy me a coffee -> Image
My development's activity º PhpStorm's proud user º Extensions, Scripts, MOD porting, Update/Upgrades
Locked

Return to “[3.1.x] Support Forum”