EvilZone

Community => News and Announcements => Topic started by: Stackprotector on April 20, 2012, 11:31:05 AM

Title: Code hightlighting
Post by: Stackprotector on April 20, 2012, 11:31:05 AM
Hello people :) ,

I just installed a code highlight mod for the forum now we can all benefit of cool code :)

How to use:


Simple C++ example

Code: [Select]
[code=cpp] MY AWESU"M CODE [/code ]

Code: (cpp) [Select]
#include <iostream>
int main()
{
      std::cout << "Hello, Evilzone!\n";
}
Code example for PHP highlight line 4

Code: [Select]
[code=php ,4] CODEE[/code ]
Code: (php, 4) [Select]
    public function __construct() {
        if(!isset($_POST['action']) || is_array($_POST['action']) || trim($_POST['action']) == "")
        {
             die(json_encode(array('status' => '404')));
        }
        else
        {
             $this->action = strtolower(trim(htmlentities($_POST['action'])));
        }
    }

There are over 200 programming/scripting/code highlight templates included ;)

I may do a little color change but for now, feel free to edit your existing posts to higher the evilzone experience.


Have a good weekend :D
Title: Re: Code hightlighting
Post by: lordarnoud on April 20, 2012, 12:48:53 PM
:O that's awesome! great job :) +1
Title: Re: Code hightlighting
Post by: Deque on April 20, 2012, 02:05:46 PM
Thank you, Factionwars.
Title: Re: Code hightlighting
Post by: Kulverstukas on April 20, 2012, 04:15:57 PM
Current members are asked to modify their posts that include code with new code tags... it would be beneficial for all of us and very kind from your side :)
Title: Re: Code hightlighting
Post by: ande on April 20, 2012, 05:01:36 PM
<3
Title: Re: Code hightlighting
Post by: iTpHo3NiX on April 20, 2012, 05:59:44 PM
Nice one, I do remember having this at EZ at one point, defiantly good when trying to get help and posting sources ;) Great edition to EZ
Title: Re: Code hightlighting
Post by: Stackprotector on April 20, 2012, 07:36:06 PM
Nice one, I do remember having this at EZ at one point, defiantly good when trying to get help and posting sources ;) Great edition to EZ
Yes it is :),  tough i am not 100% good with the whiteness at method declaring.
Title: Re: Code hightlighting
Post by: r33per on April 21, 2012, 08:57:11 PM
just like to point out that "."'s are very difficult to see which could cause some confusion.
Other than that looks much cleaner :)


Title: Re: Code hightlighting
Post by: techb on April 21, 2012, 09:07:12 PM
Great feature. The grey lettering is a bit hard to see as well, but great job none the less.
Title: Re: Code hightlighting
Post by: @Veritas_Triumphus on May 07, 2012, 12:08:28 PM
I really like those, but why there is no Visual Basic?
Title: Re: Code hightlighting
Post by: Stackprotector on May 07, 2012, 12:47:53 PM
Code: (vb) [Select]
lolcode=vb]
Title: Re: Code hightlighting
Post by: @Veritas_Triumphus on May 07, 2012, 12:54:16 PM
Oh, didnt noticed. Thanks :)
Title: Re: Code hightlighting
Post by: Kulverstukas on May 07, 2012, 01:05:17 PM
Someone should look into changing the colors a bit :P can't read the code when I can't see it.
Title: Re: Code hightlighting
Post by: s3my0n on May 16, 2012, 01:22:55 PM
Someone should look into changing the colors a bit :P can't read the code when I can't see it.

Same here, bump for admin's eyes.
Title: Re: Code hightlighting
Post by: Kulverstukas on May 27, 2012, 11:42:51 PM
Same here, bump for admin's eyes.
Issue's been resolved. Also scrollbars were added so that codes with 100 lines doesn't take up all of the screen.
Title: Re: Code hightlighting
Post by: L0rd_M@dness on May 28, 2012, 07:28:01 AM
Great job, but C'mon! I wish this was Black & Green instead of White & Black would you do that for me please, FactionWarz? ;D