You are here

Drupal Tutorial

Fixing things when your Drupal content fields don't display or you can't edit the field

Suppose you've added a field to a Drupal content type, but puzzlingly the field doesn't display on the node edit page? Or the field doesn't display when you view a node? Why would that happen? Maybe, you think, a custom themed node edit page simply didn't display the field? All kinds of ideas might come to mind while you're scratching your head wondering what might be going on. Adding a field to a content type should make it easy to edit and display data in that field, right?


Add a Google CSE to a Drupal 7 site without using google_cse module

The https://drupal.org/project/google_cse module appears to be a dead project - the Drupal 7 port hasn't had any activity in over 2 years. If you want to use a Google Custom Search Engine (CSE) on a Drupal 7 site, what do you do? Turns out it's relatively straight-forward to just generate the CSE over on Google's website, take the code and paste it into a Block, and that's it.


Getting email validation straightened out for successful email transmissions (DKIM, SPF and PTR, oh my!)

One of the things Drupal does is generate emails for a variety of reasons. For example new account registrations include a step to validate the account, by sending an email containing a validation link. On the large online community website I run, a long-running problem has been that the validation email does not always get delivered. This shows up as a user registration that never gets validated.


Generating Apache style .htaccess redirects from Drupal's Path Redirect module

The "Path Redirect" module for Drupal 6 (http://drupal.org/project/path_redirect) is an excellent way to set up redirects from one URL to another. This module can be used for any purpose where you want the HTTP request for URL's on a Drupal website to automatically redirect to another URL. For example :-

  • you might want to have a nice URL to promote for some excellent product (example.com/excellent-camera) that lands on a merchant website while hiding the complexity of the merchant URL (making sure to include the affiliate link).

Make your own tiny URL service in Drupal with Shorten or ShURLy modules

Short (or tiny) URL's are great for sharing links on various social media services. Twitter's 140 character limit places a premium on bytes better used for words than URL's, e-mail clients get hinky with long URL's, and so on. It's possible to use services like tinyurl.com or bit.ly to create your short links, but as Drupal users we have a powerful platform at our fingertips. Maybe it can do the short URL natively or maybe it can be programmed to automatically retrieve short URL's from the existing services.


Configuring Drupal blocks when using the Domain Access module

Following on from my blog post the other day, Looking at (and a debugging tip) the Domain module for Drupal, I want to look at one of the gaps in the Domain Access module. Out of the box it does not modify the blocks configuration pages, meaning that out of the box all configured blocks show up for all domains. This is unlikely to be what you want, instead what's likely is to have different blocks for different domains.


A simple way to create a 'related posts' block using Views 2 in Drupal 6

Looking at the traffic data google Analytics collects on my web sites I see a high "bounce" rate which means many visitors leave right away. It means they come to the site, then look only at the one page, presumably to go elsewhere. I've been pondering what might be a good way to entice them to stay and look around. After all, my websites exist to instruct people, so the more pages they look at on my sites the more instruction I'm able to impart. Oh, and there's a higher chance they'll click on an ad or something.


Building a blog & podcast directory in Drupal using FeedAPI

Blog directories are simply a list of sites, characteristics of each site, and a listing of the recent blog posts on the site. They are very useful in helping people find blogs of interest. When a blog directory is focused on a specific topic it helps to build better awareness of that topic area. It's relatively easy to build a blog and podcast directory in Drupal using FeedAPI.


Cure for FAIL when using RedirectMatch with clean URL's on Drupal

I've had a problem with use of RedirectMatch on some of my sites which causes a FAIL in combination with Drupal's reliance on mod_rewrite to provide clean URL's. Over the years I've used different technologies to build sites and on occasion have converted a site built with static web pages into one driven with Drupal. This has meant a web of .htaccess files listing redirects for the old URL into a new URL. The goal is to help your readers continue to access the pages you wrote even when the location (URL) of the page changes.


Using views to publish both full and partial feeds in Drupal

There's a long standing debate over the content of RSS feeds. For the greatest convenience of your readers the full RSS feed is great, because they can read your articles in their feed aggregator. However as a publisher who needs to earn a living from my writing I only want to publish a teaser so that the reader will feel incentivized to visit my site. For me the feed is a lure to bring people to my site, and I cannot do justice to others' viewpiont.


Pages

Short URL