Blogs
Remote Drush
boz — Thu, 08/19/2010 - 22:36
I finally sat down to understand a recent post by lullabot on Drush 3 remote capabilities. Its taken me a couple of hours to set up, but this will save me hours in drupal updates. Thank you drush project!
My hangs were on setting up the ssh key, which I omitted at first and then realized that it was a requirement for drush. The second hangup I had was to make sure my *.aliases.drushrc.php files were wrapped in <?php ?> tags. Hopefully that helps some one else.
Update CCK Fields In Custom Drupal Nodes
boz — Tue, 06/22/2010 - 13:17
This was a major hang up on my recent project. I thought I would share in hopes of saving someone else sometime. The explanation for the code being this tedious has to do with CCK's database structure. Each field is given its own table, so to avoid costly queries CCK has a database cache. Here is the code. I had to read through several other posts to find this. I'll try to link to those when I get time.
Image Security Made Simple With jQuery
boz — Sat, 05/22/2010 - 15:30
$(document).ready(function(){
$("img").bind("contextmenu",function(){ return false; });
});
This simple piece of code prevents the right click menu from opening on images.
Simple Apache / MySql Backup Script
boz — Sat, 05/22/2010 - 14:26
Here is a simple script for backing up your local server settings and databases. Replace "/media/storage/_backup" with your destination directory.
cp /etc/hosts /media/storage/_backup/hosts cp -r /etc/apache2/sites-available /media/storage/_backup/sites-avialable mysqldump -u root -psecret --all-databases > /media/storage/_backup/backup.sql
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';
}
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.
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:
Security Updates for 2010
boz — Tue, 02/09/2010 - 12:27
Another round of security updates were sucessfull as of February 8th, 2010. All hosted sites are up to date.
Contribution to Sandy's Ankeny
boz — Thu, 02/04/2010 - 14:07
We recently had the opportunity to contribute a Wordpress theme to Sandy's Ankeny thanks to Slash Web Studios. Sandy's Ankeny is a new blog maintained by, well, Sandy, who has previously worked at the Register and the Ankeny Press Citizen. Congratulations to Sandy on the new project!
Access localhost from a VirtualBox Guest OS on Ubuntu
boz — Thu, 12/03/2009 - 13:48
I recently installed Windows 7 via VirtualBox for some cross browser testing. While in development I needed to map localhost from the Windows 7 Guest OS to my Apache server in Ubuntu. Some quick searching around turned up the following ip address. All I had to do was update the current localhost line in my Windows 7 hosts file.
10.0.2.2 localhost


