Php arguments in Views for Drupal can be the answer you need to getting your views to output correctly. Follow along as I go through a handful of very useful php arguments for Views.

I don't claim to fully understand Php and php arguments. I'm still learning, but what I do know I'm glad to share with those willing to listen.

I use php arguments mostly to get a view block to only show up on certain dynamic url pages. The first time I really used this technique was in one of my previous posts: Related Content with Views 2 in Drupal

Here are a few others with some explanations:

Similar Node Title:

if (arg(0) == 'node' && is_numeric(arg(1))) {
  $node = node_load(arg(1));
  return $node->title;
} else {
  return FALSE;

To use CCK Field Argument:

if (arg(0) == 'node' && is_numeric(arg(1))) {
$node = node_load(arg(1));
...Read more

Making a custom module in Drupal can be as easy or difficult as you would like it to be. For the purpose of the post we will be making a simple module in Drupal that you can use to alter forms.

Step 1
Make an info file for your module call it and rename the "mymodule" to whatever you will be calling your module.
In the info file you can put various items, but the only thing you will need is the following:

Drupal 5.x

name = "mymodule"
package = "My Modules"
description = "Put Description Here"

Drupal 6.x

name = My Module
description = "Put Description Here"
core = 6.x

If you plan on publishing this module you can put additional information in the file.

Step 2
Make a module file called mymodule.module and once again rename "mymodule" to your module name.
This module is going to be to alter forms so we will put the following code in.

Drupal 5.x
...Read more

Show related or similar content in a block with Views 2 in Drupal. Here is a step by step tutorial on how to accomplish this.

I first found this method over at Drupal Easy: Using Views 2 and Drupal 6 to Create a Related Pages Block. I'm going to show you a similar method with a few minor adjustments.

As of this writing this is accomplished with Views 2 and Drupal 6. ...Read more

  • Make a new view and call it whatever you want.
  • Add a Block Display
  • Add a new argument - Taxonomy: Term ID
    • Set up the argument with these options:
    • Provide Default Argument
    • Php Code:
    • $node=node_load(arg(1));
      foreach($node->taxonomy as $term){$terms[]=$term->tid;}
      return implode('+',$terms);
      }else {return;}
    • Check Allow Multiple Terms per Argument

Including an image with your RSS feed just got a whole lot easier. By using these easy steps you'll be on your way to stepping up your RSS feed.

Things you will need:

The Setup:
Follow the instructions for each module on how to install each one. ...Read more

Use simple e-mailing aliasing to speed up your work flow while testing user registrations.

GMail Aliases for Testing Multiple Drupal User Registrations was a recent article I read that change my work flow with testing Drupal user registration. E-mail Aliasing as defined by Gmail: Using an address alias.

I use a slightly different technique than the one in the mentioned articles. Both technique can be used with any CMS including Wordpress and Joomla.

The Basics:

Your e-mail address is, you simply add a dot or period anywhere in your e-mail name. Example: or ...Read more

Adding a blog can be one of the simplest things you can do to start generating more traffic to your site. Dynamic content is the key to breaking free from a static website and a blog is a good place to start.
Follow along as we dive into how and why a blog is a good starting point for dynamic content to your site.

Dynamic content in our case is content that changes or updates. Its a reason for people to come back to your site. If they have read all the pages your site has to offer, why would they want to come back? Lets give them a reason.

By blogging you accomplish several things in addition to driving more traffic to your site. ...Read more

  • You let your readers know what your site/company is up to, what plans you have, and where your site/company is headed.

What is Web Presence and why do you need it? This post is to help you understand the concept, what you can do about it, and how I can help.

Web Presence has different names such as internet presence and online presence, but they all carry the same meaning.

Web Presence is defined on Wikipedia as being "the appearance of a person or organization on the World Wide Web." And "the amount of web presence can be measured in the amount of sites a organization or individual has, which can include their own website, social network profiles, and their site's search engine ranking, traffic, popularity, and backlinks."

With that defined, you only need to ask is your web presence? Is one website enough? Would picking out a single social site benefit me? ...Read more

Have you ever wondered what it means when you hear 16x9, Fullscreen, Widescreen, or Pan and Scan? More importantly what does that mean to you as a consumer? I'm going to give you a few simple explanations with examples of aspect ratios.

These are the terms and ratios we are going to be covering: Widescreen, Fullscreen, Pan and Scan, Letterbox, 4x3, 16x9, 1.33:1, 1.78:1, 1.85:1, and 2.39:1. Now there are more ratios and those can be found over at the Aspect Ratio Wiki, but these are the most common ones. ...Read more


A few days ago I saw a tweet from Rob Feature saying that he had posted over at Geeks & God that they had just launched a new website called Free Mission

After reading the post I headed over to Free Mission to see what it was all about. In a nutshell its a site that is dedicated to making free websites for missionaries who are out in the field. Anybody who wants to contribute just has to sign up and start helping.

Drupal is going to be used for the sites for many reasons:

  1. Once a template install is figured out, it will be fairly easy to drop into new site configurations.
  2. Most of the people working with the project are already experienced with Drupal so time is minimized.
...Read more

Theming a Drupal User Profile is actually much easier than you think. Follow these few simple steps and you will be on your way to a fully customized user profile for your Drupal site.

This article assumes that you know how to theme a node, if not, first read Theming a node in Drupal...The Easy Way.

There are two main ways to get custom field into the user profile, content profile or using the core user profile that ships with Drupal. If you just want simple fields the core module is the way to go. For the sake of this article I will be using the core user profile module.

Using 6.x go to, there you can set up a couple of fields to your liking. ...Read more