Advertisement Jump to content
  • Advertisement
  • entries
  • comments
  • views

Sucks to be you!

Sign in to follow this  


You poor saps have to put up with this journal for another year. It's ok, you can cry.

In other news, I finally finished my C++ source-code highlighting PHP script. I say finally because I started it in '04. I just picked it up off of an old CD and finished it (after about 30 minutes of complaining.) Getting the comment highlighting code to work was the only thing left to do so I finished it.

You can check out an example over here:highlight_example.php
As you can it isn't perfect, but it works so I'm happy.

Here is my function if anybody is having problems with the same thing:

function FormatCpp($CodeToFormat)
$CodeToFormat = str_replace("\t", " ", $CodeToFormat);
$CodeToFormat = str_replace(" ", " ", $CodeToFormat);

$Regex= array(

$Replace = array(


$CodeToFormat = preg_replace($Regex, $Replace, $CodeToFormat);
$CodeToFormat = str_replace("\n", "
, $CodeToFormat);
$CodeToFormat = "
" . $CodeToFormat . "

return $CodeToFormat;

More GUI, Malathedra, and website stuff in tomorrow's episode.

Edit: I finally put a new site up. You can go here to check it out, but it is no where near completed. I need to figure out how to add an admin panel and such still.
Sign in to follow this  


Recommended Comments

There are no comments to display.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Advertisement

Important Information

By using, you agree to our community Guidelines, Terms of Use, and Privacy Policy. is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!