Jan 6
The very first alpha public version of Intype has been released for testing. The developers are looking for feedback on this release - but do keep in mind it is the very first release. If you've ever used an editor or IDE in Windows, you will probably wonder what's so special about something like this...there seem to be no features!

Continue reading "Windows version of TextMate: Intype"

Posted by Brendon Kozlowski

Nov 27
I'm in the process of creating a server install setup process for our Macintosh OSX G5 Server and originally had PHP v5.1.6 in the install steps. I had tested it with the live site data and all worked fine. Because PHP v5.2.0 is supposed to have speed and efficiency increases, as well as a hook to allow for the ability to keep track of upload progress (i.e.: visually follow an upload with a moving graph using PHP and JavaScript without any other odd language bridges or hacks), I figured I might as well just switch the versions in the documentation.

Well, I just tried it out today and finalized all of the virtualhost parameters and re-uploaded the live data. What nice thing do I see on the screen to greet me? ....nothing, it's a production server so errors are not displayed. Unfortunately for me I forgot to assign an error log file location...oops. Apache's error log was not definitive enough. Time to upgrade my local test machine's version of PHP as well.

WARNING: Redeclaration of <insert_func-name_here>() in ...

Okay, ummm...how is it being redeclared? It worked fine on v5.1.6...

With a little more research, I found the problem to be that MY FUNCTION NAME IS NOW A RESERVED WORD -- AN INTERNAL FUNCTION NAME. There's a new function category called Filter that also includes the aptly named function "filter_input()". Yeah, I can't imagine ANYONE who's ever written procedural code to have a function like that in there... So anyway, be warned. I had to add a prefix to my function and then edit any and all instances of it within my code.

...just yet another reason for me as to why to move completely over to OOP and forget about procedural PHP programming.

Posted by Brendon Kozlowski

Nov 27
Okay, technically if something's "undiscovered", no one knows about it...and it's impossible for something in a programming language to be undiscovered because for it to exist, someone has to know about it...in fact, a lot of someones have to know about it. Regardless...

I was recently reading about how difficult it was for someone to create a DATE field in an Atom feed (they were creating a home-brew blog/cms with Python). Well, accidentally while researching what the php.ini file directives (found in PHP 5.2.0+, but available since 5.0.0 according to Zend) for the date.sunset_zenith and date.sunrise_zenith were for. I still didn't entirely figure it out, but I can still set the latitude and longitude correctly. However, while looking for this information, I found that PHP apparently has CONST values for many abstract date formats...all thanks to W3Schools!

Constants: ATOM, DATE_COOKIE, DATE_ISO8601, DATE_RFC821, DATE_RFC850, DATE_RFC1036, DATE_RFC1123, DATE_RFC2822, DATE_RSS, and DATE_W3C

Now, it is very true that PHP's date functions are extremely thorough and easy to use, as well as to convert to/from. However, if you have constant values, why the heck not use them?!

Posted by Brendon Kozlowski

Nov 26
I haven't kept up with the Zend Framework as much as I would have liked to. The buzz has died down, and it seems that it also caused me to lose focus on it. Since I've been somewhat bored lately (although I like being bored, gives my imagination more time to itself) and have had time to even play some console games (my poor, poor neglected XBox system), I figure I'll give it another go.

What got me started with the Zend Framework (not the idea, but the actual code) was Rob Allen's personal blog by way of Zend's DevZone. Cal, reporter for DevZone, talked about a Framework tutorial that was written up by Rob Allen, and so I took a look. It wasn't some ugly looking blog post, it was a fully downloadable PDF. I just HAD to have myself a copy! I downloaded it, realized there were typos and errors, but for the most part, it was a HUGE introduction into how the Zend Framework actually worked. After fixing (overcoming) some bugs and completing the tutorial, I actually had a non-secure but fully functioning bootstrapped Zend-Framework-powered website section. I was happy. I was ecstatic, actually. I also had other projects waiting for me to complete. I don't even remember if I finished them or not...

Either way, the Zend Framework has updated its public stable release with a new version and Rob has updated his tutorial. I'm going through it right now and checking for errors that are still present (found 2 or 3 already) and will report back to him on them to help him out with that. If you want to get started using the Zend Framework and like viewing code to understand it (and playing with it) without a HUGE or whole lot of explanation as to what every little thing does (he does break it down, but not a whole lot, you would need some understanding of MVC architecture and PHP to understand this), then I strongly urge you to check out this tutorial.

Source: http://www.akrabat.com/zend-framework-tutorial/

Continue reading "Zend Framework v0.20"

Posted by Brendon Kozlowski

Nov 12
Okay, "FIXED" is a bit of an over-statement; the plugin did exactly as it was supposed to, it called PHP's nl2br() function on all input prior to output. Unfortunately, that's not always the desired result, so I've made it "smarter", not exactly "fixed" it...

With help from some members on the SitePoint forums, I've modified the serendipity_event_plugin_nl2br to work with HTML textarea, pre, and the BBCode GeSHi modifiers so that those ugly <br /> tags aren't added when they aren't wanted.

The updates are now live on this site, so I don't have to go back and update anything. Cool!

Here's what I did:
- Open up pluginsserendipity_event_nl2brserendipity_event_nl2br.php in your serendipity folder
- add two new functions (within the class, but order of where they go is unimportant, I placed them before the event_hook function) as shown below:

- find the following line in the event_hook function: $eventData[$element] = nl2br($eventData[$element]); and replace it with the following:


That should be it. (YAY, I can finally post code snippets now!) I eventually plan on updating this a bit more to allow for user submitted tags to be ignored by the nl2br function within this event. Any help on that would be appreciated since I don't entirely understand the plugin system, even after speed-reading through the example documentation. :-)

Posted by Brendon Kozlowski

(Page 3 of 3, totaling 15 entries)