Author |
Topic |
|
John_OAS
Starting Member
Australia
5 Posts |
Posted - 19 September 2007 : 00:46:16
|
I've done a few searches, and can't seem to find much information regarding tags for super and subscript codes.
I know they're available on at least one snitz based forum I frequent, and I've seen them mentioned here.
The standard list of codes doesn't seem to include the "sub" and "sup" tags I'm used to. Are these an add-on of some sort, or am I missing something?.
Edited to add, there's also a couple of comments in a test post I put in the testing forum.
Any help/pointers would be much appreciated.
|
Edited by - John_OAS on 19 September 2007 19:16:59 |
|
HuwR
Forum Admin
United Kingdom
20584 Posts |
Posted - 19 September 2007 : 02:55:35
|
I have not heard or seen any addons that add super/subscript tags |
|
|
AnonJr
Moderator
United States
5768 Posts |
Posted - 19 September 2007 : 07:00:51
|
I know Marcel added it to Oxle, but I'm not sure if he posted the code here or if he got the code from here (or based it off of anything here or there ... I'm not sure of anything other than I am desperately waiting for the coffee to brew.) |
|
|
phy1729
Average Member
USA
589 Posts |
Posted - 19 September 2007 : 19:52:50
|
find line 479ish in inc_func_common.asp fString = replace(fString, "[hr ]", "<hr noshade size=""1"">", 1, -1, 1) underneath add this fString = doCode(fString, "[sup]", "[/sup]", "<sup>", "</sup>") fString = doCode(fString, "[sub]", "[/sub]", "<sub>", "</sub>") |
Edited by - phy1729 on 19 September 2007 19:57:22 |
|
|
John_OAS
Starting Member
Australia
5 Posts |
Posted - 19 September 2007 : 20:44:33
|
Thank you, phy1729, that's exactly what I was after!
|
Edited by - John_OAS on 19 September 2007 20:44:56 |
|
|
phy1729
Average Member
USA
589 Posts |
Posted - 19 September 2007 : 20:45:59
|
No problem. |
|
|
John_OAS
Starting Member
Australia
5 Posts |
Posted - 19 September 2007 : 21:29:42
|
Actually, I've discovered a minor issue.
The above code works fine, but when you edit or reply to a message containing the new formatting codes, the html isn't re-mapped to forum code, so you end up with <sub></sub> type code in the message, which obviously doesn't look right.
It would seem that there's another bit of code somewhere that turns posts back into forum code for editing/replying. I'm having a look for it myself at present, but would appreciate any pointers! |
|
|
phy1729
Average Member
USA
589 Posts |
Posted - 19 September 2007 : 21:49:59
|
sorry don't know the code that well missed that part find line 295ish fString = replace(fString, "<hr noshade size=""1"">","[hr ]", 1, -1, 1) and under it add fString = replace(fString, "<sup>","[sup]", 1, -1, 1) fString = replace(fString, "</sup>","[/sup]", 1, -1, 1) fString = replace(fString, "<sub>","[sub]", 1, -1, 1) fString = replace(fString, "</sub>","[/sub]", 1, -1, 1) |
|
|
John_OAS
Starting Member
Australia
5 Posts |
Posted - 19 September 2007 : 21:59:35
|
quote: Originally posted by phy1729
sorry don't know the code that well missed that part find line 295ish fString = replace(fString, "<hr noshade size=""1"">","[hr ]", 1, -1, 1) and under it add fString = replace(fString, "<sup>","[sup]", 1, -1, 1) fString = replace(fString, "</sup>","[/sup]", 1, -1, 1) fString = replace(fString, "<sub>","[sub]", 1, -1, 1) fString = replace(fString, "</sub>","[/sub]", 1, -1, 1)
Yep, and that's in inc_func_posting.asp for those playing at home. |
Edited by - John_OAS on 19 September 2007 22:00:09 |
|
|
phy1729
Average Member
USA
589 Posts |
Posted - 19 September 2007 : 22:01:45
|
I have it as inc_func_posting.asp but I meant to tell you that sorry. |
|
|
Shaggy
Support Moderator
Ireland
6780 Posts |
Posted - 20 September 2007 : 04:35:40
|
If you want to add buttons for these tags to inc_post_buttons.asp, you'll find them in the newsletter mod (at least you used to be able to, it's been updated a few times since last I checked).
|
Search is your friend “I was having a mildly paranoid day, mostly due to the fact that the mad priest lady from over the river had taken to nailing weasels to my front door again.” |
|
|
Hamlin
Advanced Member
United Kingdom
2386 Posts |
Posted - 07 December 2007 : 09:23:48
|
quote: Originally posted by kmac
quote: Originally posted by phy1729
sorry don't know the code that well missed that part find line 295ish fString = replace(fString, "<hr noshade size=""1"">","[hr ]", 1, -1, 1) and under it add fString = replace(fString, "<sup>","[sup]", 1, -1, 1) fString = replace(fString, "</sup>","[/sup]", 1, -1, 1) fString = replace(fString, "<sub>","[sub]", 1, -1, 1) fString = replace(fString, "</sub>","[/sub]", 1, -1, 1)
Are the </sup> and [/sup] transposed in the example above?
They are in the correct order, that section is changing the text back from HTML to forum code. |
|
|
kmac
New Member
USA
58 Posts |
Posted - 07 December 2007 : 09:26:07
|
Thanks. I discovered my confusion seconds before your response. |
|
|
|
Topic |
|
|
|