[C#] BBCode Highlighter for thread posts by sorpz

Posts 18 of 8 · Page 1 of 1
[C#] BBCode Highlighter for thread posts by sorpz
Hey Community,
I don't know whether this is the right section to post this but I hope so ...
This is a project i've just done quicky to use for another thread I'm creating rigth now and I just wanted to share it..

I hope you'll enjoy it
It does simply highlight code segments for c# and converts it into bbcode to use it in thread posts ..

Example:
Code:
using System;
using System.Collections.Generic;


namespace SorpzFramework.Web.Visual {
	class Program {
		public static void Main(string[] args) {
			// Sample Hello-World program...
			Console.WriteLine("Hellow, World");
			Console.ReadKey();
		}
	}
}


Scans:
[1/46] https://www.virustotal.com/en/file/f...is/1376523940/ (for any reason 1 hit..)
[0/22] CSharpToBBCodeConverter_by_sorpz.rar - Jottis Malwarescanner

Greetz sorpz


#1 edit:
You could also use the included SorpzFramework.Web.dll to create your own highlighter...
Just add it as reference to your project.. add 'using SorpzFramework.Web.Visuals;' and you'll be able to use BBThreadPostHighlighter type.. enjoy..
If you want to get a more detailed information on how to use it just ask...
CSharpToBBCodeConverter_by_sorpz_mpgh.net.rar16 KB · 4 downloads Scanning…
Screenshot.PNG35 KB · 15 downloads
Seem's extremely interesting, nice work.
I am in no respect a coder. I honestly shouldn't be in this section but your post caught my eye. Can you explain to a non programmer, in what occasion could I use this tool for my own threads. What exactly can I turn into BBcode? Because I tried and do not understand.

- Thank You for considering this Response. Enjoy the Thread Bump!
Quote Originally Posted by Truely_Handsome View Post
What exactly can I turn into BBcode? Because I tried and do not understand.
Well as you should know forums such like this one we are currently at are using bbcode.. Mpgh doesn't highlight any of the code keywords when posting code, so I thought making a tool simple inserting the tags for keywords such as c#.. so at the left interface of the program i've attached you'll paste the code you want use in a post such as the example up in my main post. Then you'll have to click the go button and on the right side the converted code will appear which you'll have to paste into you post in some tags..

So something like..
Code:
/* some multiline
 * comment...
 */
public abstract class MyClass {
      public string SomeProperty{ get; set; }
      public void SomeMethod() {
            // some singleline comment...
            string someStr = "Hello";
            return;
      }
}
becomes..
Code:
/* some multiline
 * comment...
 */
public abstract class MyClass {
      public string SomeProperty{ get; set; }
      public void SomeMethod() {
            // some singleline comment...
            string someStr = "Hello";
            return;
      }
}
Hope it helped
Quote Originally Posted by sorpz View Post
Hope it helped
Thank you, that did help. This is certainly advantage for Members like me with no level of coding experience. I will give this a shot, and thank you for taking the time to respond to my question. Adding thanks.
Quote Originally Posted by Truely_Handsome View Post
.. and thank you for taking the time to respond to my question.
No problem m8
Pretty damn cool bro.
You should add C++ support.
(If you PM me, I could help you code it.)
Quote Originally Posted by Kenshin13 View Post
.. add C++ support.
(If you PM me, I could help you code it.)
No pm needed bro. As mentioned in my main post you could easily download the dll and attach it to your own solution.. than you could start creating/using your own custom patterns for highlighting (RegEx) ..

Posts 18 of 8 · Page 1 of 1
This thread is closed for replies.

Similar Threads

Tags for this Thread

None

Need help?