(Was) Open Source Collaboration and Project Management

I just came across activeCollab, which used to be an open source collaboration and project management tool. activeCollab is similar to BaseCamp from 37 signals.

activeCollab is written in PHP, runs unlimited projects, supports tagging, global search (including uploaded files), comments, milestones and more. It’s currently free software and was recently completely open source. However, it has come to my attention that activeCollab has changed their licensing and is closing the source on their project.

If you like BaseCamp but feel limited by it’s features and business model, this is certainly an attractive option, if you don’t mind the closed source.

What project management tools do you use?

Translating Photoshop Fonts to HTML/CSS

Translating Photoshop font sizes to scalable and accurate web font sizes can be a real challenge! I found a great link today with an very useful equation and a mention of a technique I’ve used previously. I used the combination today for a client project.

The challenge in translating designs is that designers often use points for fonts as opposed to pixels, so you have to be able to convert between the two. Another challenge is that browsers render font sizes differently.

I always want fonts to scale so I like using em’s. 1em is a different size on different browsers, so it needs to be reset at the start of the CSS stylesheet. I do this using:

body {
font-size: 62.5%; /*Sets all fonts to 10px*/
}

Today, I also combined that with the relative font equation and got great results, although I’m not 100% sure the approximate conversion of points to pixels comparison table is representative of all browsers.

Here’s the equation:

emr = pxt ÷ pxp, where

emr = result font size, in em’s;
pxt = target font size, in px;
pxp = parent element’s font size, in px;

I noticed also that if you are using Photoshop, you can change your rulers preference to use pixels for font sizes to figure out the pixel equivalent and use the relative font equation to calculate the em value. This takes the guess work out of converting points to pixels in font sizes. Then you can easily use the font size reset technique and the relative font size equation to calculate appropriate ems.

I’m looking for the best solution for scalable fonts so if you have another technique, please share or link in a comment.

Additional Resources:

Choosing a Content Management System (CMS)

Choosing a Content management system remains to be an issue for site maintainers and web site owners. The first issue seems to be “Do we need a CMS?”. The second issue is, of course, cost.

A common misconception is that there requirement of size before an organization can benefit from a Content Management System. Even small websites can gain valuable benefit from CMS solutions. The key is to pick the CMS that best fits your organizations needs and growth expectations.

And don’t be fooled into thinking you have to sell your first born child or a year’s wages to get a CMS. There are many different levels of CMS applications and different levels of implementation, both of which effect price.

Let’s discuss some of the details of Content Management Systems… Read the rest »

Show/Hide ID’s or Divs

Here’s a little code to show and hide divs or layers that is backwards compatible to Netscape 4 and IE 4. This is older code, but great for sites where you want to show and hide divs or layers but don’t have the need for the newer JavaScript libraries like Prototype or Scriptaculous.

Read the rest »

Open Source Stacks

Open Source stacks have become more prevalent over the last 3 years. Open Source stacks offer integration of varied softwares, flexibility through code transparency and highly customizable integration methods. Open Source stacks aren’t necessarily inexpensive but they are free from vendor lock-down and offer long-term cost savings.

More companies are being formed around Open Source software stacks. IBM, Gluecode Software Inc. (acquired by IBM in 2005), OpenLogic Inc., SourceLabs Inc. and SpikeSource Inc. are a few of the vendors developing common tools for managing applications running on Open Source stacks.

Open Source for business is a growing industry, evidenced by the growing number of integration codebases and Open Source acquisitions taking place in the marketplace. This trend is also fueling the growth of Open Source consulting firms, as expert consultants are employed to assist small, mid-sized and large corporations to integrate Open Source into their technology platforms.

Do you know of any other useful stacks out there or companies built on Open Source Stacks? Submit a comment with a link and description and we’ll build a list.

vbWikiPro - Vbulletin and Mediawiki Single Sign-on

Looking to integrate Vbulletin and Mediawiki? After much time working on just this issue, I have a suggestion…vbWikiPro. vbWikiPro is a “stack” integration of vBulletin and MediaWiki that authenticates against the vBulletin tables and autocreates MediaWiki users for a seamless integration of these two applications.

You can even integrate vBulletin into non-vb pages by using some similarity to the following code:


# include php from vbulletin
$curdir = getcwd ();
chdir($_SERVER['DOCUMENT_ROOT'] .  '/forums');

ob_start();
require_once( $_SERVER['DOCUMENT_ROOT'] . '/forums/global.php');
ob_end_clean();

$vbulletin->userinfo =& $vbulletin->session->fetch_userinfo($_COOKIE['bbuserid']);
chdir ($curdir);

The ob_start() and ob_end_clean() buffer output until you’re ready to output. This prevents the issue where if a newline character exists in the include, it causes the application to die by printing headers too quickly. This assumes the path of your forums is in your document root. If it’s not, for some reason, adjust accordingly.

If you include this in every page (say, init.php), you’ll have access to the vBulletin object, except in the Mediawiki pages. In those pages, the MW session takes over and you’ll need to access the Mediawiki object. This is great because you can maintain your highly customized skins without any changes.

The documentation is limited, but the coding is easy to read and the support of www.nuhit.com is phenomenal! They are also working on documentation. The appearance of the website looks a bit unsupported right now but nothing could be further from the case. The developer is actually supporting the site so you have direct access to the developer.

Most of the heavy lifting is done in the forum includes, so you can follow the logic easily without changing directories.

This “stack” is highly recommended!

Dutch Government Embraces Web Standards

The Dutch government has legislatively mandated accessibility for websites, according to Dutch developer Peter Paul Koch. Accessibility is now mandatory as of Sept. 1 of 2006.

The highlights are:

  • valid HTML 4.01 or XHTML 1.0
  • CSS and semantic HTML and separation of structure and presentation
  • progressive enhancement
  • the W3C DOM (instead of the old Microsoft document.all)
  • meaningful values of class and id
  • meaningful alt attributes on all images

and:

  • scripts that work on links should extend the basic link functionality (think accessible popups)
  • if a link makes no sense without a script, it shouldn’t be in the HTML (but be generated by JavaScript)
  • use of forms or scripts as the only means of getting certain information is prohibited
  • removing the focus rectangle on links is prohibited
  • information offered in a closed format (think Word) should also be offered in an open format
  • the semantics of many HTML elements are explicitly defined

New government websites must comply with these standards, as defined by the W3C. Also, existing government websites must comply by 2011.

Understanding CSS Positioning

There are generally four ways to position elements on a page.

  • Position:static
  • Position:absolute
  • Position:relative
  • Floats
  • Margins

There are pro’s and con’s to each of these methods and it’s easiest to research before you start implementing. In addition, I often do sketches of the layout before starting to code HTML markup and CSS. Once you understand how the layout works, you can compensate for ‘future’ situations.

I’m super-lazy (in a good way), which means I don’t like to go back and fix issues because of simple changes. I’ve found certain methods of positioning to be particularly useful in making a design implementation scalable so I don’t have to go back and fix…

Read the rest »

PHP Unexpectedly Printing Headers

I worked today on an issue where PHP was unexpectedly printing headers to the browser. I spent a while trying to track this down.

I followed the execution sequence and noticed, by using debug statements and the headers_sent() function in PHP, that headers were printing just after an include statement but there was no print(), echo() or any other reason for the headers to be printed in the include.

In addition, I had a similar debug statement as the last line of the include that told me that no headers were printed. So the execution would return to the file that included the second and before anything else happened, headers were being printed!

It turned out that there was a new line after the ?> in the include file which constitutes output and, therefore, headers were being sent to the browser. The solution was easy, remove the newline character. This made me think, is there a better way to prevent this easy-to-make mistake from happening?

My solution was as follows:

ob_start();
require(somefile.php);
ob_end_clean();

This buffers the output of any require or include until you’re ready to actually output something.

Cross Language Encryption/Decryption

I recently had a need for cross language encryption and decryption of cookies. More specifically, I needed to encrypt cookies in perl and decrypt the same cookies in PHP. After many Google searches, I finally found a post on a mailing list and contacted the author, Josh Kuo.

I don’t always expect a response when e-mailing someone I don’t know because we’re all really busy but Josh was very kind in his replies. He sent me a link to his project Qrypto on SourceForge which can be used to encrypt and decrypt just about anything including cookies, files, url strings. Qrypto currently supports Perl, PHP and Python and there are plans for other popular languages in the future.

I had spent a couple of days trying to come up with a cross-language encryption and decryption solution on my own. With the use of the qrypto project and Josh’s kind help, I had it running in a single morning. Open source is a beautiful thing.

I’ll show you just how easy it was…

Read the rest »