This forum is in archive mode. You will not be able to post new content.

Author Topic: Code hightlighting  (Read 9806 times)

0 Members and 1 Guest are viewing this topic.

Offline Stackprotector

  • Administrator
  • Titan
  • *
  • Posts: 2515
  • Cookies: 205
    • View Profile
Code hightlighting
« 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
« Last Edit: April 20, 2012, 11:34:24 AM by Factionwars »
~Factionwars

Offline lordarnoud

  • Peasant
  • *
  • Posts: 112
  • Cookies: 6
    • View Profile
Re: Code hightlighting
« Reply #1 on: April 20, 2012, 12:48:53 PM »
:O that's awesome! great job :) +1
« Last Edit: April 20, 2012, 12:49:17 PM by lordarnoud »

Offline Deque

  • P.I.N.N.
  • Global Moderator
  • Overlord
  • *
  • Posts: 1203
  • Cookies: 518
  • Programmer, Malware Analyst
    • View Profile
Re: Code hightlighting
« Reply #2 on: April 20, 2012, 02:05:46 PM »
Thank you, Factionwars.

Offline Kulverstukas

  • Administrator
  • Zeus
  • *
  • Posts: 6627
  • Cookies: 542
  • Fascist dictator
    • View Profile
    • My blog
Re: Code hightlighting
« Reply #3 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 :)

Offline ande

  • Owner
  • Titan
  • *
  • Posts: 2664
  • Cookies: 256
    • View Profile
Re: Code hightlighting
« Reply #4 on: April 20, 2012, 05:01:36 PM »
<3
if($statement) { unless(!$statement) { // Very sure } }
https://evilzone.org/?hack=true

Offline iTpHo3NiX

  • EZ's Pirate Captain
  • Administrator
  • Titan
  • *
  • Posts: 2920
  • Cookies: 328
    • View Profile
    • EvilZone
Re: Code hightlighting
« Reply #5 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
[09:27] (+lenoch) iTpHo3NiX can even manipulate me to suck dick
[09:27] (+lenoch) oh no that's voluntary
[09:27] (+lenoch) sorry

Offline Stackprotector

  • Administrator
  • Titan
  • *
  • Posts: 2515
  • Cookies: 205
    • View Profile
Re: Code hightlighting
« Reply #6 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.
~Factionwars

Offline r33per

  • Serf
  • *
  • Posts: 23
  • Cookies: 3
    • View Profile
Re: Code hightlighting
« Reply #7 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 :)



Offline techb

  • Soy Sauce Feeler
  • Global Moderator
  • King
  • *
  • Posts: 2350
  • Cookies: 345
  • Aliens do in fact wear hats.
    • View Profile
    • github
Re: Code hightlighting
« Reply #8 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.
>>>import this
-----------------------------

Offline @Veritas_Triumphus

  • Peasant
  • *
  • Posts: 65
  • Cookies: 2
    • View Profile
Re: Code hightlighting
« Reply #9 on: May 07, 2012, 12:08:28 PM »
I really like those, but why there is no Visual Basic?
Code: [Select]
while (1) {
document.write("I love EvilZone.org" + "<br />");
}

Offline Stackprotector

  • Administrator
  • Titan
  • *
  • Posts: 2515
  • Cookies: 205
    • View Profile
Re: Code hightlighting
« Reply #10 on: May 07, 2012, 12:47:53 PM »
Code: (vb) [Select]
lolcode=vb]
« Last Edit: May 07, 2012, 12:48:25 PM by Factionwars »
~Factionwars

Offline @Veritas_Triumphus

  • Peasant
  • *
  • Posts: 65
  • Cookies: 2
    • View Profile
Re: Code hightlighting
« Reply #11 on: May 07, 2012, 12:54:16 PM »
Oh, didnt noticed. Thanks :)
Code: [Select]
while (1) {
document.write("I love EvilZone.org" + "<br />");
}

Offline Kulverstukas

  • Administrator
  • Zeus
  • *
  • Posts: 6627
  • Cookies: 542
  • Fascist dictator
    • View Profile
    • My blog
Re: Code hightlighting
« Reply #12 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.

Offline s3my0n

  • Knight
  • **
  • Posts: 276
  • Cookies: 58
    • View Profile
    • ::1
Re: Code hightlighting
« Reply #13 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.
Easter egg in all *nix systems: E(){ E|E& };E

Offline Kulverstukas

  • Administrator
  • Zeus
  • *
  • Posts: 6627
  • Cookies: 542
  • Fascist dictator
    • View Profile
    • My blog
Re: Code hightlighting
« Reply #14 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.

 



Want to be here? Contact Ande, Factionwars or Kulverstukas on the forum or at IRC.