Newsroom / Blog

PHP

BThomas's picture

Drupal 6 - Inserting & Updating Nodes Programmatically

Jul16th

On a number of occasions in the last year, we've created new websites that required importing a great deal of content from an old website. Instead of going through the hassle (not to mention the sheer length of time) of entering each page via the node insert form, it's much easier to utilize the programmatic node insert feature of Drupal.

BThomas's picture

Programmatically Output a Views Block in Drupal 6

Apr29th

One of the best things about developing in Drupal 6 is the almost limitless ability to hook into core functions, contributed modules, and being able to tailor Drupal to meet your individual needs. For me, a lot of these awesome features involve the ability to programmatically utilize Drupal core modules, such as Views and CCK.

BThomas's picture

Retrieve E-Mails With The PHP IMAP Class

Feb7th

Have you ever had the need to retrieve e-mail information and utilize the data for display on a website, GUI, or for some other web-based purpose? Recently, I was tasked with doing just that. The goal was to retrieve thousands of e-mail submissions from a contact form and parse out the information into readable CSV format.

SocialTwist Tell-a-Friend

Tags: E-Mail, PHP, Tutorial

BThomas's picture

Easy PHP String to Time Conversion Calculator

Jan20th

PHP String to Time Converter

Earlier today, I was attempting to utilize the php strtotime function to manipulate dates in a number of different ways. After the 20th time of editing the code, saving it, and running the php script to get a result, I became a bit frustrated with the mundane editing and re-running of code, and decided to look for a better way to do my testing.

SocialTwist Tell-a-Friend

Tags: PHP, Projects

CODell's picture

Method Chaining with PHP

Dec19th

Method chaining is a fluent interface design pattern used to simplyify your code. If you've used frameworks like Zend or jQuery, you probably have some experience with chaining. Essentially your objects return themselves, allowing you to "chain" multiple actions together.

BThomas's picture

PHP Thumbnail Creation Tutorial

Dec8th

This tutorial will explain how to take any image and proportionally shrink it to any size you define.

The three main goals of this function are:

  1. Shrink an image to a defined size
  2. Keep the new image proportional to the old image
  3. Create the new image in the same directory as the old image with a defined prefix (i.e. 'tn_')

And here we go!