Drupal Thinking
VPS
Ever since I started doing my own personal website back in aught-four, I've been on a shared hosting service. You pay a few bucks a month and you get some server space. And for my old Wordpress site, and until recently my Drupal sites have done fairly well on the shared hosting.
But I'm a bit of a control freak (which might explain why I have to have my own website). And my latest hosting company, Site 5, recently tweaked their servers and broke some functionality on one of my websites. Now there's nothing wrong in anything they did -- indeed not worrying about server upgrades is one of the benefits with shared hosting. But it offended my inner control freak, so something had to be done.
And that something is getting a Virtual Private Server (VPS). I went with Slicehost and for $38 a month I get a Linux box with an IP address, 20GB storage, 200GB bandwidth, and 512 MB of RAM. And that's it. Everything else -- Apache, PHP, MySQL -- I had to install by my lonesome. But not too lonesome, they have a robust set of tutorials to guide a VPS newbie such as me through the process.
It hasn't been all easy, but I've learned a lot and I now have a much greater control over my web servers. For instance, I've improved my web page performance to be over ten times faster. And going forward, I'll be able to play with the Solr search functionality with Drupal.
In short, it's worth the pain.
Drupal Menu IDs
One of the first things I do when customizing a Drupal install is to add CSS IDs to the menu items. At some point you're usually going to have to do something with the menu items, so it's nice to have the handles already in place for the grabbing. You drop the following code into your template.php file.
<?php
function phptemplate_menu_item($link, $has_children, $menu = '', $in_active_trail = FALSE, $extra_class = NULL) {
$class = ($menu ? 'expanded' : ($has_children ? 'collapsed' : 'leaf'));
if (!empty($extra_class)) {
$class .= ' '. $extra_class;
}
if ($in_active_trail) {
$class .= ' active-trail';
}
$id = preg_replace("/[^a-zA-Z0-9]/", "", strip_tags($link));
return '<li id="'.$id.'" class="'. $class .'">'. $link . $menu ."</li>\n";
}
?>On this site this code gives me id="menu-home" etc. for the items in the main nav. Using this I swap the text out for a png image to get the font all proper. Got this from drupal.org, Add unique IDs to menu items.
Upgraded to Drupal 6
Cue the stirring music and let loose the doves, I've upgraded this website to Drupal 6. It wasn't too much of a pain, but it helps that there's not a lot of nested whirling gears going on here -- this is a pretty straightforward, contrib module light site (at least for now).
So why? Well, if you don't keep up, you get left behind. Regular upgrading, no matter the pain, is actually what you want in software. No upgrades = dead product. And with open source software, it usually means a better product. I was in plenty of meetings at AOL where the product manager introduced complex new features to justify their salary rather than for the benefit of any user.
Haven't played around too much yet, so I'll comment on new features when I stumble upon them. So far, I like the drag-and-drop in admin/build/block (thanks Nate!)
Back from Drupal Conference
Just got back from Lullabot's Do It With Drupal conference. They sure do put together a good product. I went to one of their training workshops in Jan 07 which was just as useful.
Useful classes?
- Matt Westgate & John VanDyk - Performance and Scalability -- already working on tuning up a couple of my sites (more later)
- Robert Douglass - Drupal Search Options -- once I finish upgrading sites to 6.x I'll delve into the Solr search thing
- Earl Miles - Basic and Advanced views -- the additional features in the 2.x version is very impressive
And being in New Orleans wasn't too shabby either. It's an interesting and walkable city.
Why Another Blog
If you've been clicking around the website, you've probably found my personal blog, greg-willis.com. So why have another blog on a different domain?
Well, for a couple of reasons:
- Audience. The personal site is for the travel stuff and the pretty pictures. The folks who visit that website aren't necessarily interested in the PHP code or intricacies of the CCK module.
- Giving back to the Drupal Community. I'm not much of a creative PHP developer, so I'm not going to be building any modules that other folks would be interested in using. But I do run into a great many problems that a normal Drupal builder would run into. If I post the solutions that I've found, maybe I'll help someone else who's having the same issue.
- Helping myself. If I put all my code snippets and thoughts processes on this blog, then when I run into the issue again I'll know how I solved it.
So I hope this is useful and I don't kill myself with over committing to posting to two blogs. But this one will be less formal and has to do with things I'm doing on a daily basis. So we'll see. ;)
- « first
- ‹ previous
- 1
- 2
- 3