OnePress Community

I see lots of open source projetcs using Worpress as a blog platform, phpBB as a forum solution and Mediawiki as a wiki. I like them all, but maintaining them separately with no integrations is a pain. It's great when you register to a website and you can use the same fresh new account to comment on the blog, reply to a forum thread and/or contribute to a wiki page.

Excluding the wiki part, there is a tool that makes it all possible. OnePress is an integrated website and forum solution. It is, simply, a WordPress theme to serve as the foundation and framework for your web site and online  community.

Some of it´s cool features:

  • Seamless integration with phpBB, complete with unified login and widgets to display forum posts on site.
  • Widgetized WordPress layout with drag and drop interface to quickly build site.
  • Professional featured content widgets to display important posts with prominence.
  • Easy to use backend enhancements for editing OnePress widget content.
  • Highly optimized page rendering process for optimal performance.
  • Built with WordPress 2.7 and child themes in mind.  Flexible hook system for full theme customization.

PHP and PDF in pure Javascript

Javacript is the very first base stone concerning web 2.0. In the past, I always heard bad things about Javascript, but I guess all of them were said because Javascript was being used by the wrong people, in the wrong place and at the wrong time.

A lot of sites use huge Javacript libs, each one performing nice things, such as HTTP requests, animation effects, generation of RIA content, etc. Javascript is so famous now that several things have been ported to it, such as encryption algorithms.

I have found two of those Javascript ports that can be really useful, specially if you are a PHP developer (just like me): PHP.JS and jsPDF.

PHP.JS is an open source project in which you can use PHP functions client-side, in pure JavaScript. jsPDF is an open-source library for generating PDF documents using nothing but Javascript.

IE6 has already fulfilled its destiny, it’s time to upgrade!

One of the most annoying thing I did during the development of our web projects was to keep our apps running smooth in a wide range of old browsers. Not too many years ago, there was only one "king" in the browser's kingdom: Microsoft Internet Explorer. King is a little bit unappropriated, however on February, 2005, IE 6 was pumping the web engines with a market share of 82.79%, what is a quite impressive number.

Excluding the security problems, the non W3C compliant behavior and other issues, IE6 as the only major browser would be a great deal to all web developers. The existence of  just one browser means few environments to test and few compatibility if/elses. The web-developers burden, however, was far from being released.

In 1996, Opera was first released publicly with version 2.0. Coming next, Apple first released Safari as a public beta on January 7, 2003. Following the flow, in November 9, 2004, Mozilla came up with Firefox 1.0. The last one to join the party was Google Chrome, released as a public beta on September 2, 2008. With the built-in markup madness that HTML allows and with no clear rules for how a browser should behave, the web development became a nightmare.

Luckly things got better and the development of major browsers started to have its foundations over W3C standards and performance worries. Every new version of each browser introduced a set of brand new stuffs, including security improvements and higher Acid scores. Everything would be great, except for one huge problem: IE6, an old and obsolete browser, is still widely used!

That problem drastically increases the complexity of web apps, because developers, in order to ensure the website will look fine, have to workaround all the stupid things IE6 does. As the WordPress guys usually say, "code is poetry"; in my opinion IE6 compatibility code is classified as a bunch of ugly words within a rhyme. It's time to move on, let IE6 go!

To tell that to your users, a good approach is the ie6 upgrade warning. It is a little script (7.9kb) that displays a warning message politely informing the user to upgrade the browser to a newer version (links to newest IE, Firefox, Opera, Safari, Chrome are provided).

Make the Internet a better place, let old things in the past and move on to the new ones. Upgrade your browser.

Profiling and debugging PHP

Reviewing the code is an important task every programmer must (or should) perform. Sometimes the program you have just coded looks nice and fast, because all the tests you have performed using your well-controlled devel0pment sandbox showed no errors.

Unless you are a god when programming, you may have left some little performance tweaks behind. Most of the time you can replace several method calls with the returned value stored in a variable, or avoiding nested for/whiles, or freeing a result set in order to save some memory, etc. In the end, all those tweaks can make the difference between a smooth user experience and an extremely painful development problem.

If you are a PHP developer, you can use the free PHP Quick Profiler (PQP) to help profiling and debugging your code. No more echoing vars, objects or queries in order to find performance mistakes. Using an automated tool to show you what is going on, you can save a lot of time and ensure your app is stable and fast. I read about PQP at WebAppers these days. They also have a screenshot (below) and a link for a demo.

PHP Profiler

If you want more options for profiling and debugging, I recommend Xdebug, which is a very powerful tool. We have been using it at Decadium for a long time.  Some of the features include stack traces and function traces in error messages (with full parameter display, function/file name and line indications), information about memory allocation and protection for infinite recursions.

Xdebug is also free and has support for Windows and Linux.