Aug 29
testing dp.SyntaxHighlighter



Nope, there's definately a problem with the simplistic nl2br() functionality added in to this forum. Looks like I'll have to modify that plugin rather than the GeSHi plugin or anything else. I think I do prefer the JavaScript based dp.SyntaxHighlighter over GeSHi though, but GeSHi does support more languages by default. So...will I create a dp.SyntaxHighlighter plugin for Serendipity, or just hack it into this blog the easy way? :-)

Posted by Brendon Kozlowski

Aug 25
Okay, so how will code look?

[geshi lang=php ln=y] //some code goes here
//I did a hard newline
//soft newline
public class myClass(){
private var $contents;
public function __construct(){
$this->contents = 'Hello World!';
}
public function __get(){
return $this->contents;
}
public function __toString(){
return $this->contents;
}
}

$classExample = new myClass;
$var = $classExample;
echo $var . "\n

";
echo $classExample;

//the code above looks the same, and outputs the same, but calls two different methods within the class structure.[/geshi]

That's my first ever written PHP5 OOP class...ever. Amazing, isn't it? Be wary, I haven't debugged it. ;-)
Wooooooooo! Serendipity GeSHi Plugin extended class has been edited to remove "<br />" tags. I know I'll need to tweak it a bit so that it doesn't incorrectly match (and then subsequently remove) these tags elsewhere in the body.

So, now that I can show example code without worries (much) I can move on to fixing up the design a bit to the way I'd want it to look.

--edit-- Okay, well it looks like GeSHi, or some other plugin, uses stripslashes on output, so to get a forward slash, I have to use \\ (and to output two like I did here, I had to actually type out 4). When editing, it only shows one or two. Great... I have some more research to do.

Posted by Brendon Kozlowski

Aug 24
This is by no means an exhaustive list, or in any particular order. I just feel like posting it. :-)
  • Understanding Unit Tests
  • Testing PHP5 Frameworks: CodeIgniter, CakePHP, ezComponents, Zend, Symfony, PRADO...simply their introductory tutorials to figure out which might be best for a particular job
  • Working with a Subversion server and related tools
  • Finishing up this blog :-)
  • Reading and implementing php|architect's Guide to PHP Security
  • Complete website redesign at work, layout, graphics, logo, design, backend, frontend, admin controls, databases, content, file structure, etc...
  • Adding content at work while still trying to do the above
  • Internet Gaming (web) Portal written in OOP PHP5 (thus all the planning involved)
  • 3 separate client sites


Ok...whew. I know I'm forgetting some stuff. Think that's enough? ;-)

Posted by Brendon Kozlowski

Aug 22
I am quite a book whore. I see a neat new techy book and I have to have it! For instance, check out my Amazon wishlist (and if you want, buy me something, hehe)! Granted, these are all related topics, but I like having a large reference section.

I'd have to say that the most recent book I've been reading, apart from the ever slowly yet steady reading of php|architect's Guide to PHP Security by Ilia Alshanetsky (main contributor of FUD Forum and many PHP core related fixes), would have to be David Allen's Getting Things Done. It's an approach to organization and management of one's own thoughts and practices to streamline our processes and reduce our stress levels, all while being able to manage more. Suffice it to say, I'm only on like page 30...

The main reason I picked up this book (from my local library) is because of a PHP script that I had been interested in, also aptly named PHP-GTD. I figured, if I'm going to use this tool, I should probably know just how to use it. I'm glad I did, as David Allen says that most people that have their own style of organization either don't follow it because it's cumbersome, applies to only a portion of their life, or they don't know how to use it properly, and he tries to simplify the process (I've yet to see if he does for me). But irregardless, PHP-GTD was laid out quite simplistically, is a simplistic program in and of itself, but is a bit confusing if you don't understand the methodology and theory behind it...and just from looking at it, I was able to tell that it *could* be extremely handy. By the way, this methodology is akin to the Dr. Atkins diet in the IT industry.

Considering I'm already thinking about who I can buy this book for during the holidays (and I never buy people books because I think it's corny), I'd have to say that, at the very least, the idea behind this book is great. I'd give it two thumbs up, but no extra frills (so far).

Posted by Brendon Kozlowski