Cleaning Up Shorthand PHP Syntax

This one is more than a personal gripe, there's a valid server related issue when you write shorthand PHP code. If you are one of those people doing <? ?> stop now. You get into an issue of "is this php or xml" since you share the same opening tag. There's also a number servers out there that have the shorthand coding option turned off. Stop with the shorthand, all you do is create instability.

Tags: 

Tracking External Links

Google Analytics doesn't track external page links by default, you have to setup a small bit of javascript to delay the website exit, and trigger a virtual page hit. The code for doing that involves a small bit of jquery, and the newer version of the google tracking code.

Drupal Content Type Module Skeleton

If you're a big fan of CCK, you've probably noticed that there are limitations eventually. It does fantastic work with data, but not so much with the nodes themselves. If you need things like access rights, redirection after XYZ, or custom permissions for business logic, you will like end up having to create your own content type through a module. Following is a very simple copy paste you can use to get started. It's got the most common hooks in there. Just copy and replace 'node_type' with whatever you wish yours to be.

Tags: 

Pages

Subscribe to Fragmented Thought RSS