• RESUME
  • LOGIN

balanced scale media

  • blog
  • projects
  • services
  • contact
Home › Monthly archive

March 2010

Environment Based Database Selection In Drupal

boz — Mon, 03/15/2010 - 11:07

I needed to find a way to have only one settings.php file maintain my database configurations across both my local development and environment and my production server. Here is my solution. Is there a better way?

 

if($_SERVER['SERVER_NAME'] == "local.mydomain.com"){
	$db_url = 'mysql://username:password@localhost/databasename';
}
else{
	$db_url = 'mysql://username:password@production/databasename';
}
  • Drupal
  • boz's blog
  • Add new comment

Comparing Syntax of MooTools 1.1 with MooTools 1.2 and jQuery 1.4

boz — Fri, 03/12/2010 - 12:59

This is not a comprehensive comparison, but is a comparison of the functions that I used the most. Readers should note that while syntax appears similar, the philosophies of MooTools and jQuery are very different resulting in a fundamental differences in their implementation. This data is intended for those that are analyzing cost in switching frameworks and is not intended for someone trying to determine which framework to use.

  • JavaScript
  • boz's blog
  • 1 comment
  • Read more

Nid Based Panel Variants in Drupal

boz — Tue, 03/09/2010 - 20:47

For one of my recent projects, I had the privelege of learning how to use the Drupal panels module.  I needed a panel that swapped out content based on which page I was on.  Here is how to do it:

  • Drupal
  • boz's blog
  • Add new comment
  • Read more

Recent Posts

  • Generate Word Documents With PHP
  • Delete CCK Inactive Fields
  • Delete Nodes From A Certain Date in Drupal
  • Automated Node Titles Without Auto Node Title
  • Drupal Camp Iowa Ajax Example
  • Get Paid To Learn Drupal!
  • Presenting "JavaScript Guidelines : When and When Not to Script"
  • Drupal Form Alter on a Node Reference Widget
  • The Paradox Of Drupal
  • Programmatically Creating Users in Drupal with Profile Fields
more

Topics

  • Android
  • Apace
  • Aptana
  • Bazaar
  • Browser
  • Code
  • Drupal
  • Eclipse
  • Flex
  • HTML 5

Archive

  • February 2008 (1)
  • May 2008 (1)
  • July 2008 (3)
  • December 2008 (2)
  • January 2009 (2)
  • March 2009 (3)
  • April 2009 (5)
  • May 2009 (1)
  • July 2009 (1)
  • August 2009 (3)
more

Links

 

  • blog
  • projects
  • services
  • contact

© 2012 Balanced Scale Media, LLC. All Rights Reserved.