vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB3 General Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=111)
-   -   Code Formatting Hack?? C#/Visual Basic (https://vborg.vbsupport.ru/showthread.php?t=159515)

MultiSync77F 10-05-2007 02:21 AM

Code Formatting Hack?? C#/Visual Basic
 
There is a really nice php bbcode for vB that does a very good job of highlighting syntax for the code. The [ code ] tag really sucks. Is there a hack or custom bbcode or something that will do the same thing for C# or vb.net languages?

It really makes my forum look like crap and its hard to read the code people post because its all black and white and syntax or other errors just dont stand out like they would if you viewed the code in VS IDE.

Also when you copy and paste code from VS IDE into vB it completely destroys the formatting of the code, and truncates the spaces in key words, is there a way to fix this? Right now I have to copy the code into notepad and then back into vB and its really annoying.

For example:

private static readonly uint?

becomes

privatestaticreadonlyuint?

when you cut and paste directly from VS IDE. :(

MultiSync77F 10-09-2007 07:30 PM

*bump*

So there is nothing like this? With all these hacks, some of them pretty outragious. A lot of forums use code in their posts. I can't believe there isn't a .Net Code Box.

Thanks.

Analogpoint 10-09-2007 08:10 PM

<a href="https://vborg.vbsupport.ru/showthread.php?t=93071" target="_blank">https://vborg.vbsupport.ru/showthread.php?t=93071</a>

Dismounted 10-10-2007 04:58 AM

Quote:

Originally Posted by MultiSync77F (Post 1356458)
*bump*

So there is nothing like this? With all these hacks, some of them pretty outragious. A lot of forums use code in their posts. I can't believe there isn't a .Net Code Box.

Thanks.

That's because we have to develop functions to highlight the code. PHP already has a function built-in to highlight PHP code.

Analogpoint 10-10-2007 12:27 PM

Quote:

Originally Posted by Dismounted (Post 1356685)
That's because we have to develop functions to highlight the code. PHP already has a function built-in to highlight PHP code.

Use Geshi, no need to reinvent the wheel. Although, if he's talking about having it built into vB, I think it belongs in a mod.

Dashman 05-20-2008 12:57 PM

Quote:

For example:

private static readonly uint?

becomes

privatestaticreadonlyuint?

I have this same problem in 3.7. when pasting Java code from my IDE into VB.

My site is based around people submitting code so this is a really big problem for me!!

Can you let me know if you manage to fix this? Thanks!!


All times are GMT. The time now is 01:14 PM.

Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.01586 seconds
  • Memory Usage 1,722KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (3)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (6)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • printthread_start
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete