New code posting method :)
After searching around google for a bit I found a guide which gave some great CSS for posting code in a blog type environment. I have taken bits of pieces of it and modified a small PHP script I wrote a while back for making posts with quotes to blackboard. Here is an example of the new look:
function parseIt()
{
$myChar = "";
$this->blockType = "";
$this->quoteFrom = "";
while ( ($myChar = $this->getNextChar()) != NULL)
{
switch ($this->currState)
{
case 'TEXT':
$this->parseText($myChar);
break;
}
}
}
This is just a random piece of code from the blackboard posting script that I hacked to get the new code posting script. For those of you who wonder what blackboard is… I would describe it as a system which allows different groups of people to collaborate with a 100% focus on education. So professors can go in, post grades, assignments, etc. It also has a forum feature where students in your class can post to this forum that only members of the class can see. I’m not a huge fan of blackboard and the forum posting system is quite lacking. So I wrote this little PHP script to allow me to easily denote when I was quoting someone, from the rest of what I was talking about.
Anyway I am happy with this new system and now i will not feel bad posting code on the blog. I do wish I could have a global CSS tag for all my code so I could change it all at once, but I don’t think wordpress will allow for that