Tony's ramblings on Open Source Software, Life and Photography

drupal

Another New Drupal Theme

Okay, so I decided I agreed with Vermyndax that my last custom theme had puke colors. I wanted a dark theme for the site, but dark themes can be so hard to read that I didn't want to do that to my readers, so I went with a slightly blue/gray text area and a dark background. The text area isn't white so there wouldn't be a stark contrast between it and the black border to hurt your eyes. I think it's a good compromise. I still have some tweaking work to do, but I have to say I like it!

This theme was created entirely with Gimp and PHPEclipse on my Linux laptop.

And yes, I know the right nav panel doesn't work quite right in IE6 (3.7% of my visitors use this.) Get a real browser. Upgrade to IE7 at least if you can't figure out how to install Firefox.


Categories:

Drupal Tweaking

I've just done several tweaks to my drupal install. I've installed and activated the Gravatar module, so if you have a Gravatar (and if you don't you should) it will display by your comments.

I also added the comment_info module so that your name and email will be remembered from visit to visit.

A bit of touch up to the CSS and theme styles to make everything float and break where I'd intended smoothed out the last little bit. I hope these changes will help improve your visit experience.


Categories:

Another Custom Drupal Theme

I just finished a new custom Drupal theme for my wife's website. Check it out! Completely designed from scratch using Gimp and Eclipse.


Categories:

Redesigned My Photography Site

I spent a few hours tonight reworking the Drupal theme I run on my photography website. It's definitely a bit out of the ordinary for what a Drupal blog typically looks like. It uses the Javascript Galleria photo gallery to display the photos.


Moving The Admin And User Pages In Drupal

I have a web host for one of my sites that overrides all URL's that begin with /admin or /user. Why both, I don't know, but they redirect both of those to their own administration console login.

That kind of throws a monkey wrench in setting up Drupal, which when using Clean URL's requires both of those and will conflict with the host redirect.

So, I found a little known trick of URL rewriting in Drupal 6 to cause both of those URL's to change for the entire site. Add the following lines to the bottom of your settings.php file:

function custom_url_rewrite_outbound(&$path, &$options, $original_path) {
  // Change all 'admin' to 'adm'.
  if (preg_match('|^admin(/.*)|', $path, $matches)) {
    $path = 'adm'. $matches[1];
  }
  // Change all 'user' to 'usr'.
  if (preg_match('|^user(/.*)|', $path, $matches)) {
    $path = 'usr'. $matches[1];
  }
  if ($path == 'admin') {
    $path = 'adm';
  }
  if ($path == 'user') {
      $path = 'usr';
   }
} 

function custom_url_rewrite_inbound(&$result, $path, $path_language) {
  if ($path == 'adm') {
    $result = 'admin';
  }
  if ($path == 'usr') {
    $result = 'user';
  }
  if (preg_match('|^adm(/.*)|', $path, $matches)) {
    $result = 'admin'. $matches[1];
  }
  if (preg_match('|^usr(/.*)|', $path, $matches)) {
    $result = 'user'. $matches[1];
  }
}

After that quick fix, your Drupal site will now use /adm and /usr for the appropriate subdirectories.


Categories:

My First Drupal Theme

I've just implemented my first 100% custom Drupal theme. I'm still in the process of tweaking it, and have some blocks to still add, but for the most part this is the new look.


Categories:

Drupal Pwnd My Images (for you guys)

I just realized today that the Image module I use in Drupal was not showing any images unless you were logged in as the administrator. Since I'm always logged in, I didn't know the problem existed.

Two checkboxes later and now everyone gets to see the picture goodness in posts.


Categories:

Migrating To Drupal And New Domain

Well, I've talked about it for a while, but I just took the plunge.

I just migrated my OSS Ramblings blog to the new domain and moved all the old posts into the new Drupal engine. I really like Drupal, and I'm thrilled that I was able to save all my old posts from my Nucleus CMS site.

I'm sure there'll be a few issues with the old import, but at least the text is here. Any that had images uploaded along with the post probably will be lacking the images.