DevPinoy.org
A Filipino Developers Community
   
[Announcement] Added code block support for source code postings

I know this has been long overdue but i finally found time to update the site to support code blocks. 

How to use [code][ /code ] tags:
In order to use the code highlighting in your posts use the tags

[c o de language="WhateverLanguage"][/ c ode]

in a post's body. Currently the languages supported are ASPX, C, C++, C#, COBOL, Eiffel, Fortan, Haskell, HTML, Java, Javascript, Mercury, MSIL, Pascal, Perl, PHP, Python, Ruby, SQL, Visual Basic, VBScript, VB.NET, XML. Make sure that the code pasted in your post, has no previous formating - copy the code to notepad first and then to the post's body in order to remove formating.

Below is a sample of a C# Code enclosed in a code block

[code language="C#"]

using System;
using System.Collections.Generic;
using System.Text;

namespace FASI.TicketChargeImporter.FileFormats
{
    public interface IProcessable
    {
        string FileName { get; set;}
        string ConnectionString { get; set;}
        bool MustArchiveFile { get; set;}

        int ProcessFile();
        int ProcessFile(string fileName, string connectionString, bool mustArchiveFile);

    }

[/code]

Here is a sample VB.NET code

[code language="VB.NET"]

 Imports System
Imports System.Collections.Generic
Imports System.Text

Namespace FASI.TicketChargeImporter.FileFormats
    Public Interface IProcessable
        Property FileName() As String
        Property ConnectionString() As String
        Property MustArchiveFile() As Boolean
       
        Function ProcessFile() As Integer
        Function ProcessFile(ByVal fileName As String, ByVal connectionString As String, ByVal mustArchiveFile As Boolean) As Integer
       
    End Interface
End Namespace

[/code]


Posted 12-07-2007 10:56 AM by keithrull

Comments

jokiz wrote re: [Announcement] Added code block support for source code postings
on 12-07-2007 7:58 PM

great! although i still prefer copysourceashtml since it carries over my vs color settings, ;p

lamia wrote re: [Announcement] Added code block support for source code postings
on 12-08-2007 6:26 AM

Hahaha! So maybe my technique worked. Lolz! I tried to leave the code from my last message as is(with the smilies) so Keith would notice.

Thank you very much Keith! Now I'm gonna enjoy posting code even more!

Keith Rull wrote re: [Announcement] Added code block support for source code postings
on 12-08-2007 4:20 PM

hahaha! yeah! I think your post was the cause why i updated the site. hehehe!

lamia wrote re: [Announcement] Added code block support for source code postings
on 12-09-2007 10:01 PM

Keith, it doesn't seem to be working... :(

Could you please take a look at my post? Am I doing something wrong?

devpinoy.org/.../creating-a-tab-control-component-functionality-with-dhtml.aspx

I tried the lower-case "languge=Javascript" and Language="Javascript" but still no good...

Can't we bring back the old code editor? Thanks!

keithrull wrote re: [Announcement] Added code block support for source code postings
on 12-10-2007 10:20 AM

I found the problem lamia. Language was mispelled. ;)

I have corrected the post and everything is working now.

keithrull wrote re: [Announcement] Added code block support for source code postings
on 12-10-2007 10:20 AM

the old code editor is not supported by CS anymore... hmmm.. let me try to recompile it and see if it works fine for us.

keithrull wrote re: [Announcement] Added code block support for source code postings
on 12-10-2007 10:51 AM

you can also use this:

www.manoli.net/csharpformat

the css for the code formater is already embedded on our website so all you need to do is copy and paste the code. I'll try to figure out a simpler way.

lamia wrote re: [Announcement] Added code block support for source code postings
on 12-10-2007 8:37 PM

@Keith

Thanks, and talking about human error! Lolz!

Recent Links Tagged With "fileformats" - JabberTags wrote Recent Links Tagged With "fileformats" - JabberTags
on 10-01-2008 3:34 PM

Pingback from  Recent Links Tagged With "fileformats" - JabberTags

User links about "fileformats" on iLinkShare wrote User links about "fileformats" on iLinkShare
on 11-08-2008 10:48 AM

Pingback from  User links about "fileformats" on iLinkShare

Copyright DevPinoy 2005-2008