Simple, powerful, beautiful websites.

Command Line PHP Memory Limits June 8, 2010

I was writing a script today that was too big to run as a normal web process, when I started to bump up against some PHP memory limit issues.  Basically, I was writing a large CSV file.  The php.ini file was out of reach (this was on a shared account), and I needed to up the Memory Limit for PHP... what to do? This!
php -d memory_limit=128M my_script.php

I <3 Drush May 31, 2010

Ok, I've just started using Drush on my latest project a few days ago.  And I LOVE IT. This is how easy it is to download a module: drush dl <module_name> And this is how easy it is to install that module: drush en <module_name> What used to take me at least 2 minutes (download the module, unpack it, upload it to sites/all/modules, enable it), now takes literally 10 seconds.  It's developer heaven. But wait, it gets better - I just performed my first update of all of my site's modules to their latest versions.  It took 1 minute.  Here is what I did: drush pm-update That's it.  Are you kidding me!??!  The 1 minute was spent waiting for drush to do it's thing (gather modules that needed updates, updating them, and then running the database update script).  AMAZING! I <3 Drush!

Rendering a View from code in Drupal 6 March 2, 2010

This is the type of thing that is I always forget how to do, so I figured it would make a good blog post, both for me, and for anyone else searching for this info online. Here is the situation: I've got a page in Drupal that I am rendering from code for some reason (in my current case, I'm using theme files to alter the output of a View, and I want to include another View within each row). It sure would be nice to know how to load up and display a View within my code. Here is how: execute_display($display_id, $view_args); print $content['content']; } ?> Nice! Now the view will show up just where I want it! If you have questions, post a comment!

Drupal Mission Statement February 24, 2010

For the longest time, I thought that there was a bug in Panels.  Why?  Because I would add the Mission statement to panels, and it wouldn't show up.  Well, guess what?  There is no bug! For some reason (probably legacy code), Drupal makes the assumption that you would only want to show your mission statement on the front page of your website.  So, the PHP Template engine removes the $mission variable from your page.tpl.php file if the front page is not being displayed.  But... fear not!  I've found a solution courtesy of Kineta Systems blog: , it's already handled in phptemplate.engine if (!$vars['is_front']) { $vars['mission'] = filter_xss_admin(theme_get_setting('mission')); } ?>

Grouping, Views, and Drupal January 5, 2010

Wow, I've been searching for a simple way to create a Grouped list in Drupal for a long time, and now I've finally found the way. But first, what is a grouped list?  Let's pretend that you want to have... oh I don't know... a schedule of upcoming events that people can register for on your website.  One easy and Drupal-friendly way to create this is to just make a View, and have it list the content on your site that represents the Events.  Straight forward enough, and anyone who has any Drupal experience can do that quickly. Now your client wants to be able to customize the display a bit, and they want to show a list of the month like this: March 2010
  • This is my event for March 2010.  3/12/10 - 3/14/10
  • This is my second event for March 2010. 3/22/10 - 3/24/10
April 2010
  • April Fools Day.  4/1/10
  • etc.
Until today, I thought I was going to have to rewrite the output of the View and do this the hard way.  Now, I know that Drupal can do the heavy lifting for me... I love me some Drupal! Without further ado: Create a Views event list grouped by months

Useful Web Development Links May 23, 2009

Encounter problem.  Search Google.  Solve problem.  Repeat. That's what being a Web Developer is all about.  So, in this post I'm going to catalogue useful links that I run into while solving problems.  Enjoy! (more...)

Useful Photoshop Hints May 20, 2009

I'm no photoshop wiz, but I've got some skills that I enjoy honing every now and then.  This post will serve as a list of useful photoshop resources I've found on the web, with an emphasis on specific tasks and how to do them. (more...)

I just wrote my first job description May 8, 2009

Things have been busy around here lately at Unstandardized Design.  Between new clients, existing clients, and large projects free time has felt a little bit hard to come by for the past few weeks.  Looking at the expected growth in the company, its become clear that the time to expand is now! (more...)

Combine Multiple PDFs May 4, 2009

It's amazing - some things should be easy... and aren't.  For instance, why did I have to spend 30 minutes figuring out how to combine multiple PDFs into a single file?  If the file extension stands for Portable Document Format, you'd figure it would be easy to deal with.  Well, it's not.  But here is how to join PDF files in Windows XP. (more...)

My Guide to Git (Part I) April 13, 2009

Git is a Version Control System, and I'm learning to use it.  What's Version Control?  Well, it keeps track of all the different versions a set of files go through.  In the case of what I do, I track a site's codebase starting on the day that I create it, and then I commit my changes as I make them.  This way, if I break a site, I can simply roll back to a working version of the site, and everything is A-OK.  Brilliant!  What follows are my notes from setting up Git on Windows. (more...)