This has me beating my head on the desk a bit. I’m coding up a Drupal 6 module, and wanted to redirect the user after logging in, depending on what role they belong to.
In this example, let’s say I have a role called “treasurer” - and anyone that’s logged in and not a treasurer is [...]
Tweeting from Launchbar
I’ve been checking out Launchbar, thinking replacing my beloved Quicksilver because supposedly it is not being worked on much anymore. While viewing these very helpful Launchbar Video tutorials, I noticed one of them was about Tweeting from Launchbar. For firing off a quick tweet, this is very handy.
However, I had problems getting the script mentioned [...]
Finding Duplicates in MySQL
I get quite a few Excel files from clients that need to get cleaned up and inserted in to MySQL. Sometimes the import goes smoothly, sometimes it doesn’t. This last time, I had 3,741 rows in an Excel file, but somehow wound up with 3,751 rows in the database - what went wrong? Don’t know, [...]
Easily Search a Twitter Stream
I occasionally see people wondering how to search their Twitter stream, or anybody’s Twitter stream for that matter. Sure, you can easily search all of twitter for something, but what about limiting a search to a particular user? Twitter’s search features are pretty hit or miss for such specific searches, so as long as the [...]
Using the Shell and Cron to Automate Your MySQL Backups
This article describes a simple shell script that backs up your local MySQL databases. It also goes into how to automate the process so it runs everyday using a cron job. Handy!
Drupal Multi-site Configuration on a Dedicated Server
So I just figured out how to get Drupal’s multi-site configuration working on my Rackspace Linux server.
Let’s say your Drupal core is located at my-drupal-core.com. Install Drupal there, this will be your master copy.
Within your ’sites’ folder, create a folder for each domain you will want to run off this core installation. Let’s say [...]
Drupal - Adding Author Name Search to Main Search Results Page
Perhaps you typed an author’s name into Drupal’s search box, looking for content from that particular author. But for all Drupal knows, you’re just looking for content that matches the search phrase you just entered and could care less about who wrote it.
Drupal: Get a Username from a User ID
I’ve been really enjoying working with Drupal - the more I learn about it, the more ideas I get on how to use it. Yet, sometimes it can make a simple thing a bit daunting - like fetching a user’s name from a user id, without needed to load the entire user object with user_load() [...]
Drupal - Encoding Email Addresses to Deter Spam-bots
While working on my latest Drupal project, I really wanted an easy, brainless way for users to create clickable “mailto:” links that gave pesky spam-bots a hard time.
Turns out, the Bbcode module does just the trick. Even if you don’t normally use it, you can add this input filter to your standard HTML filters, and [...]
Transferring IMAP email to Google Apps for Your Domain
Over the holiday break, I took the plunge and migrated my businesses email service over to Gmail, using Google Apps for Your Domain (GAFYD) Premier Edition for businesses. For $50 per user per year, a 99.9% SAL, 25 gigs of space, extra bad-ass spam filtering, virus protection, backups, etc. I figured why the heck not.
Modifying [...]