Snitz Forums 2000
Snitz Forums 2000
Home | Profile | Register | Active Topics | Members | Search | FAQ
Username:
Password:
Save Password
Forgot your Password?

 All Forums
 Help Groups for Snitz Forums 2000 Users
 Help: General / Classic ASP versions(v3.4.XX)
 Subscript and superscript
 New Topic  Topic Locked
 Printer Friendly
Next Page
Author Previous Topic Topic Next Topic
Page: of 2

Torborg
Junior Member

Norway
109 Posts

Posted - 10 June 2010 :  07:01:01  Show Profile
Is there a mod or anyway to use subscript and superscript in the forum? So that you can write H2O, CO2 and E=MC2 the proper way.

leatherlips
Senior Member

USA
1838 Posts

Posted - 10 June 2010 :  08:27:16  Show Profile  Visit leatherlips's Homepage
I may have the code somewhere. I'll look into it and post what I have.

Mangione Magic Forum - The Music of Chuck Mangione

My Mods: Googiespell MOD | Link To Reply MOD | Petition MOD | Contact Page MOD | Share This Topic MOD | MP3 MOD | PageEar MOD | Google Viewer MOD
Go to Top of Page

leatherlips
Senior Member

USA
1838 Posts

Posted - 10 June 2010 :  08:57:35  Show Profile  Visit leatherlips's Homepage
Here you go. This should work. If not, let me know.

First upload the following two images to your forums images folder:



In inc_code.js Look for this:

function strike() {
   var text = getText();
   if (helpstat) {
      alert("Strike-Through Tag Makes the enclosed text have a line through it.\n\nUSE: This is some stricken text");
   } else if (basic) {
      AddTxt="[s]" + text + "[/s]";
      AddText(AddTxt);
   } else {
      if (text) {
         txt=prompt("Text to be stricken.",text);
      } else {
         txt=prompt("Text to be stricken.","Text");
      }
      if (txt!=null) {
         AddTxt="[s]"+txt+"[/s]";
         AddText(AddTxt);
      }
   }
}


Below that add this:

function sup() {
   var text = getText();
   if (helpstat) {
      alert("Sup tag writes the enclosed text as superscript.\n\nUSE: [sup]This text is superscript[/sup]");
   } else if (basic) {
      AddTxt="[sup]" + text + "[/sup]";
      AddText(AddTxt);
   } else {
      if (text) {
         txt=prompt("Text to be written superscript","text");
      } else { 
         txt=prompt("Text to be written supersript.","Text");
      }   
         if (txt!=null) {
            AddTxt="[sup]"+txt+"[/sup]";
            AddText(AddTxt);
      }
   }
}

function sub() {
   var text = getText();
   if (helpstat) {
      alert("Sub tag writes the enclosed text as subscript.\n\nUSE: [sub]This text is subscript[/sub]");
   } else if (basic) {
      AddTxt="[sub]" + text + "[/sub]";
      AddText(AddTxt);
   } else {
      if (text) {
         txt=prompt("Text to be written subscript","text");
      } else { 
         txt=prompt("Text to be written subscript.","Text");
      }   
         if (txt!=null) {
            AddTxt="[sub]"+txt+"[/sub]";
            AddText(AddTxt);
      }
   }
}


Open inc_post_buttons.asp and look for this:

"<a href=""Javascript:strike();"" tabindex=""-1"">" & getCurrentIcon(strIconEditorStrike,"Strikethrough","align=""top""") & "</a>" & vbNewLine & _


Below that add this:

"<a href=""Javascript:sup();"" tabindex=""-1"">" & getCurrentIcon(strIconEditorSuper,"Superscript","align=""top""") & "</a>" & _
"<a href=""Javascript:sub();"" tabindex=""-1"">" & getCurrentIcon(strIconEditorSub,"Subscript","align=""top""") & "</a>" & vbNewLine & _


Open inc_icon_files.asp and look for this:

Const strIconEditorStrike = "icon_editor_strike.gif|23|22"


Below that add this:

Const strIconEditorSuper = "icon_editor_sup.gif|23|22"
Const strIconEditorSub = "icon_editor_sub.gif|23|22"


Open inc_func_common.asp and look for this:

fString = doCode(fString, "[s]", "[/s]", "<s>", "</s>")

Below that add this:

fString = doCode(fString, "[sup]", "[/sup]", "<sup>", "</sup>")
fString = doCode(fString, "[sub]", "[/sub]", "<sub>", "</sub>")


That should do it.

Edit: (The strikethrough code above is being parsed in the forum. Hopefully you can still figure out what to look for. If not, let me know.)
[Fixed that for you - Shaggy]

Mangione Magic Forum - The Music of Chuck Mangione

My Mods: Googiespell MOD | Link To Reply MOD | Petition MOD | Contact Page MOD | Share This Topic MOD | MP3 MOD | PageEar MOD | Google Viewer MOD

Edited by - leatherlips on 10 June 2010 11:40:27
Go to Top of Page

leatherlips
Senior Member

USA
1838 Posts

Posted - 10 June 2010 :  11:41:13  Show Profile  Visit leatherlips's Homepage
Thanks Shaggy!

Mangione Magic Forum - The Music of Chuck Mangione

My Mods: Googiespell MOD | Link To Reply MOD | Petition MOD | Contact Page MOD | Share This Topic MOD | MP3 MOD | PageEar MOD | Google Viewer MOD
Go to Top of Page

HuwR
Forum Admin

United Kingdom
20601 Posts

Posted - 10 June 2010 :  11:56:42  Show Profile  Visit HuwR's Homepage
actually you can use [noparse][/noparse] here, (undocumented feature)

MVC .net dev/test site | Snitz .NET Core running on Raspberry Pi
Go to Top of Page

Torborg
Junior Member

Norway
109 Posts

Posted - 10 June 2010 :  13:33:38  Show Profile
Thanks.
Go to Top of Page

Torborg
Junior Member

Norway
109 Posts

Posted - 10 June 2010 :  16:52:18  Show Profile
I doesn't work. Can any of you see what is missing?

http://www.biologforeningen.org/enbiolog/topic.asp?TOPIC_ID=17743

us: gjest
pw: gjest

Edited by - Torborg on 10 June 2010 16:52:33
Go to Top of Page

leatherlips
Senior Member

USA
1838 Posts

Posted - 10 June 2010 :  17:34:45  Show Profile  Visit leatherlips's Homepage
The tags are working. I just make a reply in your post using them. I had to manually put them in though.

Did you add the functions above in inc_code.js? Your buttons are not putting in the tag. I suspect you forgot to add that step.

Mangione Magic Forum - The Music of Chuck Mangione

My Mods: Googiespell MOD | Link To Reply MOD | Petition MOD | Contact Page MOD | Share This Topic MOD | MP3 MOD | PageEar MOD | Google Viewer MOD

Edited by - leatherlips on 10 June 2010 17:36:23
Go to Top of Page

Torborg
Junior Member

Norway
109 Posts

Posted - 10 June 2010 :  17:37:12  Show Profile
Yes, I saw it. I can't get it to work in firefox, but now I noticed that it works in explorer.
Go to Top of Page

Torborg
Junior Member

Norway
109 Posts

Posted - 10 June 2010 :  17:39:16  Show Profile
quote:

Did you add the functions above in inc_code.js? Your buttons are not putting in the tag. I suspect you forgot to add that step.



I did put functions in inc_code.js. Hm
Go to Top of Page

leatherlips
Senior Member

USA
1838 Posts

Posted - 10 June 2010 :  17:42:30  Show Profile  Visit leatherlips's Homepage
You may need to refresh your page in IE. It is working for me in IE.

Mangione Magic Forum - The Music of Chuck Mangione

My Mods: Googiespell MOD | Link To Reply MOD | Petition MOD | Contact Page MOD | Share This Topic MOD | MP3 MOD | PageEar MOD | Google Viewer MOD
Go to Top of Page

leatherlips
Senior Member

USA
1838 Posts

Posted - 10 June 2010 :  17:46:32  Show Profile  Visit leatherlips's Homepage
It is working in all browsers for me: IE, Firefox, Safari, Opera and Chrome. You may need to empty the cache in IE as it may be looking at the older version of inc_code.js before you added the functions.

Mangione Magic Forum - The Music of Chuck Mangione

My Mods: Googiespell MOD | Link To Reply MOD | Petition MOD | Contact Page MOD | Share This Topic MOD | MP3 MOD | PageEar MOD | Google Viewer MOD
Go to Top of Page

Torborg
Junior Member

Norway
109 Posts

Posted - 10 June 2010 :  17:55:23  Show Profile
Emptied cache, and the it worked
Thanks a lot!!!
Go to Top of Page

leatherlips
Senior Member

USA
1838 Posts

Posted - 10 June 2010 :  17:56:38  Show Profile  Visit leatherlips's Homepage
No problem.

Mangione Magic Forum - The Music of Chuck Mangione

My Mods: Googiespell MOD | Link To Reply MOD | Petition MOD | Contact Page MOD | Share This Topic MOD | MP3 MOD | PageEar MOD | Google Viewer MOD
Go to Top of Page

Shaggy
Support Moderator

Ireland
6780 Posts

Posted - 11 June 2010 :  04:44:03  Show Profile
quote:
Originally posted by HuwR
actually you can use [noparse][/noparse] here, (undocumented feature
Forgot about that


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.”
Go to Top of Page

Torborg
Junior Member

Norway
109 Posts

Posted - 12 June 2010 :  09:17:00  Show Profile
For some people the forum puts in wrong type of code, <sub> instead of [sub].

http://www.biologforeningen.org/enbiolog/topic.asp?TOPIC_ID=17748
Go to Top of Page
Page: of 2 Previous Topic Topic Next Topic  
Next Page
 New Topic  Topic Locked
 Printer Friendly
Jump To:
Snitz Forums 2000 © 2000-2021 Snitz™ Communications Go To Top Of Page
This page was generated in 0.35 seconds. Powered By: Snitz Forums 2000 Version 3.4.07