Drupal Handbook

These are the things I have learned about Drupal and Don't want to forget.

http://drupal.org

http://drupal.org/handbooks 

Argument for Drupal

Argument for Drupal

A vote for Drupal

-features
modular
code hooks - Don't have to hack core to override changes.
theming
multi-sites from one code base

-downs
hard to install? - http://drupal.org/node/73537
ram requirements

hosts with Drupal loaded
http://www.siteground.com/
http://drupal.org/services/hosting

business case
http://drupal.org/node/73025

http://www.theonion.com/content/

http://www.twit.tv/
http://www.fearlessliving.org/
http://www.goodstorm.com/

http://appel.nasa.gov/
http://ourmedia.org/

Gmap module - Google map api
http://docs.codehaus.org/display/GEOSDOC/Drupal

Ann Arbor Library
http://www.aadl.org/

Drupal vs Plone

Answer to someone who asked the question, "Why did you chose Drupal over Plone?"

I do not know Plone in a way that would allow me to give a fair comparative response.  I am prepared to say what Drupal has to offer.  I will make some comparisons based on perceptions and reviews I've read.  But feel free to correct me if I have mis characterized Plone in any way.  It would be nice if you offered a similar response as to why you chose Plone over Drupal.



Drupal has grown much recently and continues to grow quickly.  Be careful not to judge Drupal based on old reviews.  The power of Drupal is not realized until you begin to add contributed modules.



1.  Drupal is PHP/MySQL - This is standard fair for sooooo many sites.  I will have the support of those groups as well as the Drupal community.  I can easily transport the site to any host and they will be able to run it with few to no server configuration changes.  This reduces the learning curve greatly.

* I have heard Plones learning curve is steep.  Over abstracted potentially?

2.  It has proven itself to be scalable to large sites.

http://www.spreadfirefox.com/

http://www.mtv.co.uk/

http://www.observer.com/

http://www.theonion.com/content/index

3.  Its truely modular.  Every function is a module.  Which means everything can be edited or replaced as needed.  The process of writing modules is well defined.  I find little conflict between modules.

* I have talked with several groups that are moving from Plone to Drupal because they have experienced module interference.

4.  There are a lot of modules available today and more everyday.  The Drupal community is really cranking out new modules right now.  The Drupal community is very large and very active.

http://drupal.org/project/Modules/name

5.  The Hook system - This is the best reason to choose Drupal.

http://api.drupal.org/api/5/group/hooks

If you wish to modify Drupal there is no need to Fork the version and change Drupal core (or any module for that matter) in any way.  If you don't like a portion of a module but for the most part it serves your needs, you simply write your own module that calls back the function that don't work for you.  So Drupal sites end up with the core Drupal, contributed modules that do mostly what you want and a module specifically written for the site that edits the functions to behave exactly as you like.  This solves the problem of versioning!  Upgrading is simple and consistently stable.

You never need to change Drupal core or contributed modules directly you just add new code that replaces the portions you don't like.  I don't fear upgrades.

*  This is the number one reason I hear Plone administrators complaining about.  Upgrades are an issue, especially if they use a lot of modules.

6.  The Taxonomy system - An advanced tagging system that allows you to create vocabularies that are hierarchical.  Content can be easily tagged with controlled vocabulary that allows you to organize your site.  It is a way to build an ontology into your content that is simple but powerful.

*  This is the second reason people move from Plone to Drupal.  Plone's catalog/document metaphor for building content breaks down with Large sites.  The users need ways to traverse and cluster content that only ontologies can solve.

http://drupal.org/handbook/modules/taxonomy

7.  Distributed network with Drupal authentication.  Users can use credentials from one site on another.  This facilitates interoperability between sites and allows the creation of a distributed community.

http://api.drupal.org/api/5/file/modules/drupal/drupal.module

* Don't think Plone can do this now.

Who uses Drupal?

Spread Firefox - Mozilla's official community marketing site. - http://www.spreadfirefox.com/

Ubuntu - Ubuntu is a community developed, linux-based operating system that is perfect for laptops, desktops and servers. It contains all the applications you need - a web browser, presentation, document and spreadsheet software, instant messaging and much more. Ubuntu is free software. - http://www.ubuntu.com

Eclipse - Eclipse is an open source community whose projects are focused on building an open development platform comprised of extensible frameworks, tools and runtimes for building, deploying and managing software across the lifecycle. A large and vibrant ecosystem of major technology vendors, innovative start-ups, universities, research institutions and individuals extend, complement and support the Eclipse platform. - http://www.eclipse.org

Open Source Initiative - Open source is a development method for software that harnesses the power of distributed peer review and transparency of process. The promise of open source is better quality, higher reliability, more flexibility, lower cost, and an end to predatory vendor lock-in. - http://www.opensource.org

Green Peace - http://www.greenpeace.org

Amnesty International - Amnesty International (AI) is a worldwide movement of people who campaign for internationally recognized human rights. - http://www.amnesty.org

The Onion - http://www.theonion.com

Sony MusicBox - - http://musicbox.sonybmg.com

Warner Bros. + Reprise Records - - http://www.warnerbrosrecords.com

Moby - - http://www.moby.com

Ozzy Ozbourne - - http://www.ozzy.com

This Week in Tech - - http://www.twit.tv

Lifetime television - - http://www.lifetimetv.com

Flex.org Showcase - - http://flex.org/showcase

MTV.co.uk - - http://www.mtv.co.uk

NASA Academy of Program/Project & Engineering Leadership (APPEL) - Under the Office of the Chief Engineer, the Academy of Program/Project & Engineering Leadership (APPEL) provides leadership, advice, direction, and support for the development and learning of the NASA program/project management and engineering community. - http://appel.nasa.gov

The New York Observer - The New York Observer, founded by Arthur L. Carter in 1987, is the weekly newspaper of New York. It is published every Wednesday, and electronically refreshed daily at - http://www.observer.com

Edutopia - The George Lucas Educational Foundation (GLEF) was founded in 1991 as a nonprofit operating foundation to celebrate and encourage innovation in schools. Since that time, we have been documenting, disseminating, and advocating for exemplary programs in K-12 public schools to help these practices spread nationwide. - http://www.edutopia.org/

Configuration

configuration

"the document contains no data" or can't upload file

symptom: Im trying to use an upload image module with drupal. when i
submit the form, I get a return from the server that says "the document
contains no data" or the site goes to a dead page.

solution: Apache is set to limit php pages to a maximum of 512 KB by
default. I increased the limit to 1 GB (the LimitRequestBody directive
in /etc/httpd/conf.d/php.conf).

There are also limits on file sizes in /etc/php.ini:
post_max_size = 8M
upload_max_filesize = 2M

You might want to change those values, depending on the files sizes you are using.

'administer -> modules' link fails(dead link)

Symptoms - After adding a new module the administer -> module
link fail (link is dead). When the module directory is removed the link
returns.

Solution - This is most likely a memory issue. PHP default load sets
"memory_limit = 8M" in /etc/php.ini. The more modules you add the more
memory you will need to run the module script. Change memory_limit to
20M. Requires a restart of httpd.

Ref:http://drupal.org/node/13358

Apache

apache

Drupal 'Internal Server Error'

Symptom: 'Internal Server Error' on new install of Drupal. Removing .htaccess file solves the problem.

The .htaccess file is the only thing in Drupal that can cause an
'Internal Server Error (500)'. This is most likely caused by a
misconfigured or restricted Apache configuration (Some hosts don't
allow PHP directives in .htaccess).

Solution:

    1. Reconfigure Apache if possible.
    2. Delete .htaccess file. It is not required but it is recommended.
    3. Add the following code to the top of the .htaccess file. Some
    hosts may not allow this 'Override'. It over rides the Apache config
    settings. Requires AllowOverride directive be set in Apache conf file.

...

AllowOverride All

FYI - In my case the following lines in the .htaccess file caused
the 500 error. Any one line caused the error so I had multiple lines of
failure. Commenting them out also solved the issue.

# Set some options.
Options -Indexes
Options +FollowSymLinks

# Reduce the time dynamically generated pages are cache-able.

ExpiresByType text/html A1

# Override PHP settings. More exist in sites/default/settings.php, but
# the following cannot be changed at runtime. The first IfModule is
# for Apache 1.3, the second for Apache 2.

php_value magic_quotes_gpc 0
php_value register_globals 0
php_value session.auto_start 0


php_value magic_quotes_gpc 0
php_value register_globals 0
php_value session.auto_start 0

# Set the default handler.
DirectoryIndex index.php

ref: http://drupal.org/node/31725

excerp from errant conf file that caused problem including solution:
Second line should be "AllowOverride FileInfo AuthConfig Limit Options
Indexes"

#

AllowOverride FileInfo AuthConfig Limit Options Indexes
Options Indexes SymLinksIfOwnerMatch

Order allow,deny
Allow from all

Order deny,allow
Deny from all

Drupal requirements

Drupal System Requirements
Here are a few directives that may need tweaking beyond the posted
Drupal requirements. I have padded these greatly. You will consume much
less than these limits. * LimitRequestBody directive in
/etc/httpd/conf.d/php.conf increase to 1 GB * post_max_size directive
in /etc/php.ini increase to 50M * upload_max_filesize directive in
/etc/php.ini increase to 50M * memory_limit directive in /etc/php.ini
increase to 50M
In addition, you could really use modrewrite on apache. This helps
create clean URLs but more importantly helps google index your site
completely. Google has limits on the number of links it will index
using url parameters.

Drupal requirements PLUS

Drupal System Requirements
Here are a few directives that may need tweaking beyond the posted Drupal requirements. I have padded these greatly. You will consume much
less than these limits.

* LimitRequestBody directive in /etc/httpd/conf.d/php.conf increase to 1 GB * post_max_size directive in /etc/php.ini increase to 50M
* upload_max_filesize directive in /etc/php.ini increase to 50M
* memory_limit directive in /etc/php.ini increase to 50M

In addition, you could really use modrewrite on apache. This helps create clean URLs but more importantly helps google index your site
completely. Google has limits on the number of links it will index using url parameters.

Multiple sites from one Drupal instance

ie. -- example.com/site and example.com/site2

This is done by creating a symbolic link at the directory location /www/html/ - 'ln -s . site'
and creating a seperate config file at /www/html/sites/example.com.site/settings.php
The directory file naming under /www/html/sites/ works like a DNS table
There is a default directory if no match is found.

ref: http://hofmonkey.org/INSTALL.txt

Multiple sites with one user db

I have two sites running from the same Drupal4.7 instance as explained in install.txt.

These two sites have seperate databases but share users. I did this
by editing $db_prefix in the slave site's settings.php. As explained at
http://drupal.org/node/22268.

I got errors like "Duplicate entry.." when trying to create a new user. As if the sequences table was not being shared.

The difficulty came in not recognizing that the $db_prefix in the master site's settings.php must also be edited.

The $db_prefix variable is carried into the sequences table. So,
even though I was using the same sequences table for both databases,
Drupal was making seperate entries for each site using the prefix as
part of the "name" column.

Solution:

Settings.php for the slave site should have this -

$db_url = 'mysql://user:pass@host/slave';
$db_prefix = array(
"default" => "slave.",
"users" => "master.",
"sessions" => "master.",
"authmap" => "master.",
"sequences" => "master.",
"profile_fields" => "master.",
"profile_values" => "master.",
"role" => "master.",
"user_roles" => "master.",
);

Settings.php for the master site should have this -

$db_url = 'mysql://user:pass@host/master';
$db_prefix = array(
"default" => "master.",
);

SEO

search bots

robots.txt

Attached is a generic robots.txt file for drupal

http://drupal.org/node/22265

http://www.searchengineworld.com/robots/robots_tutorial.htm

Drupal Book Reviews

Drupal Book Reviews

Drupal 5 Themes - book review

The first thing new Drupal developers ask me is, "How do I make my new Drupal site look different from the rest?" Drupal 5 Themes by Ric Shreves is the first book dedicated entirely to theming Drupal. This topic certainly deserves its own book and I'm glad we now have it. (On the down side Drupal 6 is already released and Drupal 7 is in the works.)

Somehow I’ve been able to avoid advanced theming by using sub-contractors or taking themes from the Drupal Theme Garden. But I realize that designers and programmers cannot go it alone. In order to build the most interactive sites, we need to reach across the gap and learn a bit about each other’s craft. Enter Drupal 5 Themes.

The book is written for designers who need to learn some base level Drupal theming. It covers Drupal’s use of the abstraction layer in a way that is easy to understand. And while the pace and brevity are appropriate for the non-programmer, be prepared to look at some code: Chapter 8 does a good job of exposing novices to the template.php file and the form_alter api, allowing them to take advantage of some of Drupal’s more advanced modification options.

As a programmer, my favorite section was Chapter 4 - A guide to Themeable Functions (p.87)—it makes an excellent quick reference guide by listing theme functions and their definitions, organized by module. I find these sorts of things super useful, relieving the poor souls who answer my endless questions in the Drupal-support IRC channel about "What is the right theme function to use?"

But this list, as well as the book in general, is limited as it only addresses theme functions in the Drupal core. Most sites I’ve developed have 20+ modules loaded, in addition to the Drupal core. It would be great to have additional references for popular modules and their theme functions. For instance, the Content Construction Kit and Views modules are becoming the preferred way of building forms, detail pages, and lists, therefore deserve addressing.

I recommend this book to designers who need to learn some Drupal, as well as to new Drupal programmers who are looking to get a handle on Drupal's abstracted theme layer. But the established Drupal programmer, like myself, will find it a little too brief and lacking in real world use cases, considering Drupal’s modular capabilities.

Drupal 6 Themes

Less than 5 months ago I posted a review of "Drupal 5 Themes" by Ric Shreves. I was really jazzed to have our first book dedicated to theming Drupal. But I was concerned that it was trailing too far behind Drupal's release schedule. At that time, I had already launched my first Drupal 6 site and was working on my exit plan from Drupal 5 development.

5 months later, I'm still working on my exit plan from Drupal 5 and now I have a tool to help me. "Drupal 6 Themes" by Ric Shreves has moved me closer to being Drupal 5 free. On a personal note, I have vowed to start all new projects on Drupal 6 and I'm sure to reach for this book. Keep up the pace Ric, Drupal 7 is closer than you think.

So many great Drupal books have come out this year (at least in title). I have not been able to look at them all yet. The maturing of Drupal as a platform is reflected in more focused books and Drupal theming deserves some focused attention. Theming is increasingly stretching the traditional tool-kit of the designer. No longer can the designer just turn over their work to be implemented by the developer. Gone are the days when designers can remain naive to server side scripting (PHP).

Some big changes have come in Drupal 6 theming. Themes, like modules, now have .info files, allowing us to enumerate and version our themes with out having to load the entire code. Hook_theme() is our new friend, theme functions must now be registered instead of being discovered on the fly. But the most interesting change for me, is that themes can now override core- and module-defined CSS files. I can't tell you how much time I have wasted tracking that class down to some random module style sheet gone wild. A new Jquery version is nice too. Ric covers all of these new features and simplifies the basics.

I am definitely recommending this book to designers and Drupal beginners. It covers all the basics and gives you a running start at developing your first Drupal 6 theme. But I was disappointed, as in the previous book, there was no material on how to theme the most common contributed modules like CCK, Views and Panels. Drupal's true glory and power come when you successfully mashup 30+ modules on top of Drupal core. I guess we need even more focused books titles like, "Drupal 6 Views 2 Theming".

Learning Drupal 6 Module Development

I was very excited to receive my copy of "Learning Drupal 6 Module Development" by Matt Butcher. So excited, I asked my wife, "Guess the title of the awesome book I just got?" Her sarcastic reply tells you much about me and the regular lecture she gets, "DRUPAL!?". Ok, so I'm a little beyond this book but the title is so great!

This book aims to provide a sound foundation for programmers new to Drupal on which to build and customize their own features in the form of a module. The ability to add features so simply is the true power of Drupal. Drupal's real goodness isn't truly experienced until you have added 20 contributed modules (over 3500 available today) and several custom modules of your own. It's this ability to extend, transform and over-ride Drupal at your pleasure that Butcher wants to empower you to do. If you are new to Drupal but not to programming I think you will find this book hits it mark. I definitely recommend this book.

The book works you through building an example module like all good technical books should. The example is not trivial and in so Butcher is able to walk you through the major components of building your first module. As I paint this book to be a good reference for those wanting to learn Drupal module development it must be compared to the established king of Drupal references, "Pro Drupal Development" (PDD) by John Vandyk. Although I think that the first book you should buy is PDD, Drupal demands volumes of books to cover the progressing target that is Drupal Knowledge. Butcher's book is slightly more focused than PDD and so is worth the read.

For the past 4 years, I have written Drupal modules daily. I don't recommend this book to an established Drupal developer like myself. Drupal module development has matured a great deal and the standards are high. In order to build the killer module it has to have Content Construction Kit (CCK), Views and Panels integration built in. These three contributed modules are utilized in every project I do lately. All three are being adopted rapidly and migrating to Drupal core. A module that is not CCK, Views and Panels aware is missing it's true potential. I do recognize including these addition were not feasible at the time as these modules had not been ported to Drupal 6 yet and would likely require 3 times the paper to cover. In addition, the newest bar for Drupal module developers to clear is built in automated tests. Without automated tests, you can't expect to build and confirm your modules to be robust enough for the wild wild west that is the Web. It may be fair to say this is too demanding a level to expect of a book of this scope but when I got to the end of "Learning Drupal 6 Module Development" those are the chapters I wanted next. The weak index and lack of an API reference are also disappointing.

Despite the fact that I am a little disappointed in the new knowledge available to someone with my experience, I do recommend this book to someone wanting to start the never ending training of Drupal module development. Butcher does cover the changes in Drupal since version 5 well (menu system is lacking): A revamped theming system, more robust install profile system, actions and sending mail. If you have no experience with PHP development I recommend starting with, "Building powerful and robust web sites with Drupal 6" by David Mercer.

Pro Drupal Development - book Review

As a Drupal developer it was a no brainer to purchase "Pro Drupal Development" by J. VanDyk and M. Westgate. I devour anything Drupal and this promised to be the first book on Drupal for developers. But I was not prepared to make a permanent space for it in my bag. I am often on the go, meeting clients and other programmers in the local coffee shops, now with book in tow. Since receiving my copy four months ago I have not been more than a few feet from it at all times. I was not finished the second chapter, "Writing a module", before it sent my back to my computer to try all the new things I had learned through its great examples.

My favorite chapter is chapter 8 "The Theme System". This chapter walks you through converting an html/css design into a full functioning Drupal theme. It was simply explained and I was able to convert a design in just a few hours. I consider that pretty good for my first try. Check it out for yourself, Apress the publisher is offering chapter 8 as a teaser (http://www.apress.com/book/downloadfile/3519).

This book is not for the beginner. It jumps right into the meat of the matter but thats what I appreciate most. A solid reference for the advanced Drupal developer.

When my computer is not on, it sets quietly in my bag snuggled up against my copy of "Pro Drupal Development". If only my computer could digest the book and do some programming for me then I could get back to all those video games that need my attention.

Drupal Performance Agency

The Drupal Performance Agency is a group of independent companies and consultants who are dedicated to improving Drupal performance.

Modules reviewed

Modules reviewed

Event vs Date + Calendar

CCK and Views modules have taken the Drupal community by storm. The ability to rapidly create a CCK content type and Views views of that content type has given power to the user in ways we are still comprehending. The ability to export these new CCK content types and Views views has given the community the ability to replicate features across sites with out replicating all that clicking. Even as a programmer who has created modules before, I find the easy and logic of these modules irresistible.

Many CCK field types have immerged and the Date field type has brought with it the Calendar module. The combination of the Date field and the Calendar module in the presence on the CCK and Views modules could be substituted for the Event module.

There is much debate over the potential death of the Event module. But it seems to me that the battle is not so clearly won yet.

Some debate at -
http://groups.drupal.org/node/3598
http://drupal.org/node/114282

The Event module represents a more turn-key solution as it has no dependencies. Also there are several modules that have extended the functionality and provided integration with modules like Organic Groups. Date+Calendar requires a lot more configuration. Personally I don't really care about the ICal functions that Calendar provides. Also there seems to still be some flux in the Calendar module where the Event has been weathered a bit. In writing this, I have learned that Calendar is no longer dependent on CCK.

The argument about the dependencies is wayning because so many modules are now dependent on CCK and Views that I can't see a site being able to avoid it with out lots of custom modules.

There seems to work on an upgrade path from Event to Date+Calendar so you can delay your descion if you are invested in Events. I'm one of those invested folks and will stick with Event for now.

node_privacy_byrole module

This module creates node based permissions view/edit by role(group).
Tested and deployed.

A neccessary addition if you want to mix public and private content.

Organic Groups Panels

Organic Groups Panels (ogp) is a new Drupal module that I think will become a phenomenon. Thanks to everyone who created this module (and its dependents)! It comes just in time for a project I'm working on now. Sweet!

Organic Groups (og) can solve so many complex group development models. I love it, but it always deserved a bit of custom coding to improve the user interface. Organic Groups Panels, released and distributed with OG, makes it so that I can turn that custom coding into Views and Panels that are OG aware. What this means is more functionality passed to the Group owners (privileged users) while reducing programming efforts.

Here is a screencast of this new functionality deployed on Groups.Drupal.org by Josh Koenig.

And here is a look at what I have done with the A2Drupal group page.

I'm really trying to contribute code back to the Drupal community but I can't keep up with this pace of development. Approximately one new module a day, one great module a month and a few ground breaking modules like OGP in the last year.

Poormanscron 5.x-1.1 Unstable

I have used the poormanscron 4.7.x-1.0 module on production Drupal sites. I am using it for the CZEN.org website without issue. But....

In testing the poormanscron 5.x-1.1 module on Drupal 5, I have noticed some issues. It kicks off multiple cron runs simultaneously. In combination with the Notify module, this generates multiple emails sent. Poo!
Have you tested the poormanscron module on Drupal 5? Are you seeing similar?

http://drupal.org/project/poormanscron

Until this issue is resolved, I am considering poormanscron 5.x-1.1 unstable and have removed it from the pre-installed modules.

I have added a crontab as part of the configuration of the Neogene.org website.
0 * * * * wget -O - -q http://www.neogene.org/cron.php

Let me know if cron.php does not execute hourly via anonymous user.

Update Status module 5.x-1.2: encouragement, desciption, status, configuration

Encouragement: I encourage all Drupal administrators to enable this module. Keeping you modules current is the first step to staying secure.

Description: - http://drupal.org/project/update_status
The "update status" module checks with drupal.org once a day to see if there are new officially released versions of Drupal and any modules that you are running. It requires cron to do its thing, so make sure that you have cron correctly enabled or it won't be able to know.

Status:
Pre-installed on Drupal 5 Resource Center websites.

Configuration:
Standard enable module: visit administer >> site building >> modules and enable this module.
Once enabled you can view available updates: http://drupal5.cei.psu.edu/admin/logs/updates

MultiSite

Issues, solutions and configurations related to multisite

Multi-site modules with the promise of content/user sharing

A list of modules that promise different levels of User and Content Sharing across sites plus my 2cents.

Crossite - http://drupal.org/project/crossite
The Crossite plugin allows you to share nodes across a Drupal multi-site configuration such that certain nodes belong to certain sites. This is a form of ultra-cheap aggregation where all the data of the nodes in a Drupal multi-site is shared across all the sites. Practically speaking, when you visit the node page that belongs to a different site than the one you are current on, you will be redirect to the other site.

*Have not tested this module. Sounds interesting. The description leaves me a little confused about hove distinct the boundaries are between nodes from different sites.

Domain Access - http://drupal.org/project/domain
A node access module that enabled multiple sites to be run from one installation.
The module uses Drupal's node_access() system to determine what content is available on each site in the network. Unlike other multi-domain modules for Drupal, the Domain Access module determines user access based on the active subdomain that the user is viewing, rather than which group or site the user belongs to.

*Just learned about this module. I have not tested it but the description seems very interesting

Multiple Domains - http://drupal.org/project/multidomain
This is a module which allows you to span one site across multiple domains.

You can configure which domains to use for different parts of your site including which protocol that section uses. It can also be used to put the ecommerce or user account functionality behind https, for instance.

*Have not tested this one either. This description leaves me very confused.

Organic Groups - http://drupal.org/project/og
Enable users to create and manage their own 'groups'. Each group can have subscribers, and maintains a group home page where subscribers communicate amongst themselves. They do so by posting the usual node types: blog, story, page, etc. A block is shown on the group home page which facilitates these posts. The block also provides summary information about the group.

* Although this is not really a multisite module it can be streached to serve many multisite needs. Especially when your site is group centric rather than content centric. I love this module.

Organic Groups Sites - http://drupal.org/project/og_sites
Together, og_sites_hub and og_sites provide multisite functionality in which a central 'hub' site has a set of associated sites leveraging Organic Groups functionality to selectively share data (nodes and users), such that the hub site has access to all data while associated sites see and edit only their own data plus that specifically shared by the hub site.

*Had high hopes for this module but my tests didn't end with a functioning multisite. The concept seems flawed and not really scalable to very large number of groups. The author is not actively developing this module.


Multiple sites with one user db

I have two sites running from the same Drupal4.7 instance as explained in install.txt.

These two sites have seperate databases but share users. I did this
by editing $db_prefix in the slave site's settings.php. As explained at
http://drupal.org/node/22268.

I got errors like "Duplicate entry.." when trying to create a new user. As if the sequences table was not being shared.

The difficulty came in not recognizing that the $db_prefix in the master site's settings.php must also be edited.

The $db_prefix variable is carried into the sequences table. So,
even though I was using the same sequences table for both databases,
Drupal was making seperate entries for each site using the prefix as
part of the "name" column.

Solution:

Settings.php for the slave site should have this -

$db_url = 'mysql://user:pass@host/slave';
$db_prefix = array(
"default" => "slave.",
"users" => "master.",
"sessions" => "master.",
"authmap" => "master.",
"sequences" => "master.",
"profile_fields" => "master.",
"profile_values" => "master.",
"role" => "master.",
"user_roles" => "master.",
);

Settings.php for the master site should have this -

$db_url = 'mysql://user:pass@host/master';
$db_prefix = array(
"default" => "master.",
);

Multisite Configuration Primer

ref: http://www.contractwebdevelopment.com/drupal-multisite-configurations-an...

How to Correctly Set up Drupal Multisite?

The ability for Drupal to run multiple sites from one account is a huge plus for admins that are deploying multiple Drupal installations. The simple reason for this is that all Drupal installations can be updated at once. Basically each additional domain "points" to the document root of your primary Drupal installation. All you need to do to update the files of each additional Drupal site is update the files in the root install once. Caution: Before deploying production sites in a multisite environment I urge you to read my notes on security below and updating multisite codebases.

Security

Before proceeding with these multisite installations please note that it's possible for malicious users of one site to access protected files of multisite installations if they are given the ability to run PHP code. For example, the normally protected settings.php file (which hides confidential database access information) of one multisite could be accessible by another by running the following PHP snippet:

<?php
$file 
file 'sites/example.com/settings.php' );
foreach (
$file as $key => $line) {
print 
$line;
print 
"<br />";
}
?>

Therefore it is vital that you follow the below guidelines:

  • Only administrators of the multisites should have access to the PHP input format that would enable them to do this in the first place, and never give the owners uid = 1.
  • If you need PHP input for users, run each user's php process as fast-cgi and only link their sites subdirectory from the primary installation.
  • It's recommended that you use a Virtual Host setup to begin with. You can also set up chrooted Apache environments. A V-host will usually do this for you.

Individual settings and themes for each site

In addition, each site will have its own settings and themes. This is where the "sites" folder comes in. You place each additional multisite in the /sites directory as its own directory. For example, the domain example.com would be added in /sites/example.com. It will have its own settings.php file, and its own theme folder.

Separate databases for each site

In the settings.php file for each site you will enter the information for its respective database. This way, each multisite will run off its own database. In addition, each will have access to its own theme files.

Fully separated control for each multisite

Finally, when you log into example.com (multisite pointing to your primary domain), you will be able to select which modules it uses, which theme, and will have full control over its settings as if it were its own separate Drupal installation.

How to set all this up?

The key behind Drupal multisite installations is that your host must enable you to point your additional sites to your primary Drupal installation's document root. This can be done via domain parking, symlinks and virtual hosts.

Multisite via parked domains

It is also possible to implement a multisite configuration by simply parking the multisite domain on top of your primary domain. This may in fact be the easiest route to take. You can then administer emails for the parked domains as well as access their databases by logging in to your primary root's admin (Cpanel).

Steps to park a domain on top of another

Domain Parking Via Cpanel

To park a domain in Cpanel (Control Panel), simply click on "parked domains," add your domain, and it will be parked on top of the root domain. To unpark the domain go back to "parked domains," select which domain you wish to unpark from the drop-down box and select "remove domain."

Domain Parking Via WHM

To park a domain in Web Host Manager, go to DNS Functions, and click on "park a domain." From here you will be able to select a) the domain to park on top of, and b) the domain to park. To unpark the domain select "List Parked Domains" from Account Information, and click "UnPark" next to the domain you wish to unpark.

Symlinks point subdirectories at your root installation.

Configuration with shell access

First create a subdomain (ie. newsite.primary.com). This will create a new folder: /root/public_html/newsite. Delete the "newsite" folder, as it will be replaced by your symlink. Inside "public_html," create the symlink with the following code (shell access):

ln -s . newsite

The symlink "newsite" now points to your document root (public_html) - voila!

Configuration without shell access

It is still possible to execute shell code without shell access. To execute shell code in Drupal, simply create a PHP page with the following and execute it from your root Drupal directory:

<?php print `ln -s /root_path/public_html/ /root_path/public_html/newsite`; ?>

In this example the first path is the primary domain, followed by the multisite domain. PHP also has a symlink function you can use:

<?php symlink('primary','multisite'); ?>

important: The first example uses backticks (usually to the left of the '1' key on your keyboard), while the second example uses single quotation marks. The backticks tell PHP to execute the code, which we need for the shell script, but in the symlink function we are simply inserting values into an existing function.

Multisite via Virtual Hosts

In order to use this method you or your host will need access to httpd.conf. Since this file controls the entire server this option is normally only available in dedicated hosting environments.

site-root:
NameVirtualHost 111.22.33.444
<VirtualHost 111.22.33.444>
DocumentRoot /absolute/path/to/drupal
ServerName site-root.com
</VirtualHost>
site-one:
<VirtualHost 111.22.33.444>
# note that the DocumentRoot is exactly the same for both VirtualHosts
DocumentRoot /absolute/path/to/drupal
ServerName site-one.com
</VirtualHost>
subdomain.site-two.com:
<VirtualHost 111.22.33.444>
# note that the DocumentRoot is exactly the same for both VirtualHosts
DocumentRoot /absolute/path/to/drupal
ServerName subdomain.site-two.com
</VirtualHost>

How to Update Multisite Installations?

This is a little more tricky, as multisite updating is not quite as smooth (yet) as you might first imagine. First of all, if you are still running 4.6, I recommend NOT deploying multisite environments that you plan on upgrading to 4.7+. The reason? The update process is tedious to the point that you might as well install separate sites. As for those installing 4.7 codebases, as I currently have the majority of my production sites running on, the upgrade process to 5.0 should work as follows, although I have yet to test this (I plan on doing so this week and will post back).

Upgrading from 4.7.x to 4.7.y in a multisite environment

The process involves replacing all the core files, and the running "update.php" on the primary domain. This will update the primary domain's database, but if you have your multisites set up with their own databases, you will need to update these independently. Simply run "update.php" from each installation. The problem with 4.6 upgrades is that this simply results in a blank screen (ie. doesn't work).

Using database prefixes

The alternative to setting up a separate database for each multisite installation is to assign all sites to the same database as the primary domain, but with their own table prefixes. So for example, for the users table you would have:

Multiple Databases

database1.site1.users
database2.site2.users
database3.site3.users

Single Database

database1.site1_users
database1.site2_users
database1.site3_users

An advantage prefixing gives you is that you can update all the multisites as once. The obvious disadvantage is that you have all your sites crammed into one database, which can make maintenance (backups) more tedious. Yet another advantage is that you can use this to implement shared functionality, such as allowing login sessions to authenticate across multiple sites.

MySQL

mysql

Drupal 4.7 search now requires 'create temporary tables'

Drupal 4.7 now requires 'create temporary tables' priveleges.

mysql> GRANT CREATE TEMPORARY TABLES ON tmp.* TO user@localhost;

More secure work around for limited mysql users (comments section) -
http://dev.mysql.com/doc/refman/4.1/en/privileges-provided.html

Drupal work around for hosts that won't provide 'create temp tables' - ref: http://drupal.org/node/49644

Lock Table error

Symptom: When you submit a page you receive this error.

user error: Access denied for user 'redpill'@'localhost' to database 'scsf'
query: LOCK TABLES sequences WRITE in /www/html/includes/database.mysql.inc on line 66.

user error: Access denied for user 'redpill'@'localhost' to database 'scsf'
query: LOCK TABLES sequences WRITE in /www/html/includes/database.mysql.inc on line 66.

warning: Cannot modify header information - headers already sent by
(output started at /www/html/includes/common.inc:384) in
/www/html/includes/common.inc on line 192.

Solution: The user needs lock permissions.

Mysql -u username -p
Enter password
GRANT LOCK TABLES ON drupaldbname.* TO 'drupaldbuser'@'drupalsitelocation';
FLUSH PRIVILEGES;

Problems with solutions

Problems with solutions

"the document contains no data" or can't upload file

symptom: Im trying to use an upload image module with drupal. when i
submit the form, I get a return from the server that says "the document
contains no data" or the site goes to a dead page.

solution: Apache is set to limit php pages to a maximum of 512 KB by
default. I increased the limit to 1 GB (the LimitRequestBody directive
in /etc/httpd/conf.d/php.conf).

There are also limits on file sizes in /etc/php.ini:
post_max_size = 8M
upload_max_filesize = 2M

You might want to change those values, depending on the files sizes you are using.

'administer -> modules' link fails (dead link) - PHP memory_limit

Symptoms - After adding a new module the administer -> module
link fail (link is dead). When the module directory is removed the link
returns.

Solution - This is most likely a memory issue. PHP default load sets
"memory_limit = 8M" in /etc/php.ini. The more modules you add the more
memory you will need to run the module script. Change memory_limit to
40M. Requires a restart of httpd.

Ref: http://drupal.org/node/13358

Access control

access controls

"Access denied" but Permissions set properly

Installing an access control module removes the default "grant all" entry in node_access table. Uninstalling or disabling the module doesn't neccessary return the the default "grant all" privilege.

run the SQL code below to return the entry.

INSERT INTO node_access VALUES (0, 0, 'all', 1, 0, 0);

ref: http://drupal.org/node/12757#comment-42578

node privacy by role "edit permissions" don't work - input type permissions

symptom: Granted edit permissions to a user but they can not edit the node.

solution: If the user's role does not have the permission to use the
"input type" the node is submitted as, they will not be allowed to
edit. Check "admin/input formats" and make sure the role has permission
to submit with that input format.

ex. A node is submitted with "Full HTML" input format and the role
is granted edit permissions but the role only has permission to submit
with "filtered HTML" input format. The role will not be allowed to edit.

User pages "not found" by regular users - but visible to admin

symptom: User profiles are not visable even when permissions are set properly.

Solution: in user table copy created field to access and login fields where (access or login fields) = 0

ref:  http://drupal.org/node/66653

Drupal 'Internal Server Error'

Symptom: 'Internal Server Error' on new install of Drupal. Removing .htaccess file solves the problem.

The .htaccess file is the only thing in Drupal that can cause an
'Internal Server Error (500)'. This is most likely caused by a
misconfigured or restricted Apache configuration (Some hosts don't
allow PHP directives in .htaccess).

Solution:

1. Reconfigure Apache if possible.
2. Delete .htaccess file. It is not required but it is recommended. rewrite rules will have to be added by Apache admin if you want to use clean URLs
3. Add the following code to the top of the .htaccess file. Some
hosts may not allow this 'Override'. It over rides the Apache config
settings. Requires AllowOverride directive be set in Apache conf file.

AllowOverride All

Garland theme missing color picker

Recently I had some trouble figuring why I the color picker was unavailable in the Garland theme.

Garland relies on the color module which is part of core.
http://drupal.org/node/109457

JSFX module collapsible block headers need mouse pointer

JSFX module - http://drupal.org/project/jsfx

Problem: The JSFX module provides collapsible blocks. But the block headers do not have mouse pointers and leaves the user unaware that the blocks are collapsed.

Solution: Added CSS code to the block.tpl.php file.


/**
* JSFX Adding pointers for IE
*/
.blockTop {
cursor: pointer;
}
.blockTopOpen {
cursor: pointer;
}

Secondary Problem: This worked well in most browsers but Opera exposed the code only in the header block.

Secondary Solution: Added a block-header.tpl.php file that did not have the code, as I did not want the header blocks to collapse anyway.

Organic groups - upgrading from 4.7 - 5.x but missing "group content by type"

Problem: I have come to like the Group Home Page presentation style of "group by content type" available in 4.7 version of OG. This seems absent in version 5.x. Can you help me achieve this presentation style in 5.x?

Solution: The Views Theme Wizard can export code that allows "Grouping Views by arbitrary fields" - http://drupal.org/node/101022
Just follow wizard and paste code as instructed in wizard.

Theme

Theme articles

Event.module has unwanted icalendar(webcal) links

Symptom: Event.module has icalendar(webcal) links that are unwanted.
solution: If using PHPtemplate engine - In template.php add
'. l(''.t('Add to iCalendar').'', $path, array('title' => t('Add this calendar to your iCalendar')), NULL, NULL, TRUE, TRUE) .'';
// return preg_replace("|http://|","webcal://", $ical_link);
}
?>
Change 'mytheme' to the name of your theme.
For other theme engines follow this reference URL
ref: http://drupal.org/node/30062#comment-77333

Remove submitted by on date from drupal page

you can disable the "Submitted by User on this date" on a per
content type basis. Goto administer -> themes -> configure (tab).
Scroll down to the section 'Display post information on'. Below that
you will see a list of content types, uncheck the ones you do not want
the "Submitted by" message to appear for.

http://drupal.org/node/39649

Third-party integrations

Third-party integrations

Drupal and Flex Links

Brian,
You had asked about Flash in Drupal. Here is what I could find for you. These is all pretty new but seems to be developing at warp speed like all other Drupal efforts.
A year ago it was reasonable for me to keep up with most Drupal developments but things have gone through the roof in the last year.

Dries Buytaert is the Lead on Drupal. Here is a recent post to his blog about Drupal and Flex.
http://buytaert.net/drupal-and-flex

This is a like article from Mike Potter at Adobe about using Flex components in Drupal
http://blogs.adobe.com/mikepotter/2006/05/drupal_with_fle.html

If you go to PHP section of flex.org you see they are pushing Drupal too.
http://flex.org/php/

Looks like the Flex website itself will be Drupal in a couple weeks.

Adobe is giving a talk at the big Drupal meeting in Barcelona http://barcelona2007.drupalcon.org/

These module are being built by an Adobe programmer. They are still in development and have not reached stable releases.
http://drupal.org/project/services
http://drupal.org/project/amfphp

This is all pretty new stuff but evolving at an incredible rate.
Drupal is being adopted in so many ways it is hard to keep up anymore.

gallery.module

http://drupal.org/project/gallery

I struggled with getting the gallery.module to work properly. The
addition of the following things in the documentation would be helpful.

1. Admin shadow account: The admin accounts need to be identical.
The module did not work until i edited the gallery admin account.
2. Group shadow accounts: The group names are different between Drupal
and Gallery. After synchonizing the the names of the groups the
permissions worked.
3. In the documentaion it says, Your gallery should now be available
at: http://your.site/gallery. This was not true for me. It was
available at http://your.site/?q=gallery.
4. Change the theme to Siriux. it looks a lot better. This works great with ADC Drupal theme

4a. When I changed the theme to Siriux within the BlueMarine them in
Drupal. The widths were wacky. To solve this theme problem. I removed a
bit of code in the gallery2/themes/siriux/templates/theme.tpl file. I
removed the following:

 

3Nov05

Upgraded the gallery.module to the attached version. Requires edit
of main.php. Well worth it. Comes with Drupal theme, block navigation,
image type selection fix, adds breadcrumbs.

You must use the matrix (default) theme to have sidebars work.
Siriux doesn't have sidebars. matrix theme problems discribed above are
corrected with drupal CSS that is included.

If reading the reference below, be careful to use the module posted
at the bottom of the thread not the top. Or you can just use my
attached version.

ref: http://drupal.org/node/32393
ref: http://drupal.gallery2.org/node/36525

Gallery2

open source web based photo album organizer. PHP-MySQL
http://gallery.menalto.com/

Notes on embedding gallery in Drupal
http://hofmonkey.org/?q=node/4991

cleanup script
http://codex.gallery2.org/index.php/Downloads:Cleanup_Script

How To - Drupal 4.7 TinyMCE embedded g2image

written by bmeredyk
Since I had a hard time getting this to work, I thought I'd post some instructions for others. 

Where to put files - this wasn't clear to me at all.
When you unzip the g2image package, you end up with a file structure like this:
tinymce_plugin/
tinymce_plugin/g2image/
wordpress_plugin/
CHANGELOG.HTML
CREDITS.HTML
README.HTML
(and a few other files)
You're going to want to upload the entire g2image/ folder that is within the

tinymce_plugin/ folder to your

<drupal_root_dir>/modules/tinymce/tinymce/jscripts/tiny_mce/plugins/ folder so you

have a final path of

<drupal_root_dir>/modules/tinymce/tinymce/jscripts/tiny_mce/plugins/g2image/
[Edit]
Another user kindly pointed out that your webserver - apache or whoever it is running

as - will need to have write permissions for the config.php file. Thanks Kaare for

pointing this out!
/modules/tinymce/tinymce/jscripts/tiny_mce/plugins/g2image/config.php
If you aren't lucky enough to have a hosting setup where php runs as your user,

you'll need to do the following.

Code:
chmod o+w ./modules/tinymce/tinymce/jscripts/tiny_mce/plugins/g2image/config.php #change above path to match your directory layout!
 
or use your ftp client to change the permissions.
Note, once the initial setup is finished, you can (and probably should) change the permissions back so
that not just anybody can edit your g2image config file. g2image *should* only need to write to that 
file when you first set things up. 
[/Edit]
If you're just setting up Drupal 4.7 like I was, you're definitely going to have a version of TinyMCE
newer than 2.0.3 so copy the two files found in the TinyMCE_version_2.0.3/ folder to the main g2image/ folder 
You're not done yet though, you need to let TinyMCE know that the new plugin is available before you
can actually use it. Open up the <drupal_root_dir>/modules/tinymce/plugin_reg.php file and add in the 
following two lines just above the line that says return $plugins; 
Code:
$plugins['g2image'] = array();
$plugins['g2image']['theme_advanced_buttons2'] = array('g2image');

All of the files for the plugin should be inplace now, so it's time to configure

Drupal itself.

Go to the Gallery module admin page (admin/settings/gallery) and under "Gallery

Image Assist (g2image) settings" set the mode to TinyMCE. Optionally you can set the

Default Action to insert a thumbnail and link to the image instead of using the filter

(I personally like to see the image inline). If you do choose to insert the thumbnail

you'll need to have the input type set to Full HTML (Filtered HTML doesn't allow img tags).

If you're going to stick with the "Gallery 2 Filter" you will need to enable it for the

preferred input formats. Go to admin/filters and for each format check the "Gallery 2

filter" box in the filters section.

Last, you need to setup the TinyMCE module to actually show the g2image button - go to

admin/settings/tinymce and select the profile(s) that you want the icon available in.

Under the "buttons and plugins" section chech the box next to the "Gallery 2 Image

Plugin" item.

You're finally done!


written by
bmeredyk
ref: http://www.galleryembedded.com/forums/viewtopic.php?t=3335

drupal - http://drupal.org (CMS, gallery.module)
gallery - http://gallery.menalto.com/ (gallery2)
tinyMCE - http://tinymce.moxiecode.com/ (embeded html editor)
Gallery2 image chooser - http://g2image.steffensenfamily.com (Plugin for tinymce to select gallery2 images)

Training, Tutorials and How-tos

Training, Tutorials and How-tos

3rd party Drupal training

Check out these 3rd party Drupal sites that provide quality training.
Drupal Dojo - http://groups.drupal.org/drupal-dojo
IBM's Drupal Guide - http://www-128.ibm.com/developerworks/ibm/osource/implement.html
Lullabot - http://www.lullabot.com/

Know of any other Drupal training sites worth mentioning?

Drupal and Dreamweaver

Added File extensions to C:\Program Files\Macromedia\Dreamweaver 8\Configuration\DocumentTypes\MMDocumentTypes.xml

Added File extensions to C:\Program Files\Macromedia\Dreamweaver 8\Configuration\extensions.txt

http://drupal.org/node/18151

DrupalCon 08 Boston Videos of presentations

Many sessions at Drupalcon 08 were video taped and are being uploaded to Archive.org

http://www.archive.org/search.php?query=subject:%22drupalcon%22

Ps. here is a link to the Barcelona presentations - http://www.archive.org/search.php?query=subject:%22drupalconbarcelona200...
or just search on Archive.org for Drupal and you will find more videos/audio/media - http://www.archive.org/search.php?query=drupal

Eclipse + Drupal

Notes on configuring Eclipse specifically for Drupal

http://www.eclipse.org/
Eclipse

http://www-128.ibm.com/developerworks/ibm/library/i-osource13/
Using open source software to design, develop, and deploy a collaborative Web site, Part 13: PHP development within Eclipse

http://groups.drupal.org/node/2663
discussion of Eclipse + Drupal

http://drupal.org/node/75242#comment-230643
Revised preferences for PDT
Sean B Fuller - May 10, 2007 - 15:00

I just upgraded to the PDT All-In-One, .07 RC3. Here is a clean list of the preferences. If someone wants to confirm that I didn't miss anything, perhaps a moderator-type could promote this list into the page?

After you have it installed, go to Windows -> Preferences and make the following changes:

1. Content Types

1. Expand the left-hand menu to General -> Content Types
2. Under "Content types" on the right, click Text -> PHP Source File
3. Add the *.engine, *.theme, *.install, *.inc, and *.module file types

2. Tab formatting for PHP

1. Expand the left-hand menu to PHP -> Formatter
2. Check the "Indent using spaces" radio button.
3. Change the indent size to 2.

3. Tab formatting for CSS

1. Expand the left-hand menu to Web and XML -> CSS Files -> CSS Source
2. Select 'Indent using spaces'
3. Set 'Intentation size' to 2

4. Tab formatting for JavaScript

1. Expand the left-hand menu to Web and XML -> Javascript Files -> Javascript Source
2. Select 'Indent using spaces'
3. Set 'Intentation size' to 2

5. Tab formatting for HTML

1. Expand the left-hand menu to Web and XML -> HTML Files -> HTML Source
2. Select 'Indent using spaces'
3. Set 'Intentation size' to 2

6. Tab formatting for XML

1. Expand the left-hand menu to Web and XML -> XML Files -> XML Source
2. Select 'Indent using spaces'
3. Set 'Intentation size' to 2

7. Make it Unix-friendly

1. Expand the left-hand menu to General ->Workspace
2. Text File encoding should be UTF-8
3. New text file line delimeter should be Unix

8. Set default text mode to -kkv

This keeps the patches you create from breaking the tags on drupal and other cvs repositories. To make this change:

1. Expand the left-hand menu to Team -> CVS
2. Click on the Files and Folders tab
3. set the "Default text mode" dropdown to "ASCII with keyword expansion (-kkv)"

I've heard reports that they are some issues with tabs, but that was a while ago and I haven't heard anything since. All of the above settings seem to work fine. I tested this configuration and pulled the output into word and turned on formatting marks and everything looked correct.

9. Tabulators

I'm not sure about this one. It seems to work the same either way:

1. Expand the left-hand menu to PHP -> Editor -> Typing
2. Check the "Tab key indents the current line" under Tabulators

--------------------
Sean B. Fuller
www.seanbfuller.com
www.tractiv.com

Implementing Drupal - Video

Angie Byron & Geoff Butterfield
Google Tech Talk

Excellent talk on Implementing Drupal. Well worth the watch.

http://drupal.org/node/183754
http://video.google.com/videoplay?docid=-4603504844034540440

Random Image Block using imagefield, imagecache and views

If you are using Imagefield, Imagecache and Views it is simple to create a random image block.
The Views module has a sort criteria of Random. In conjunction with the choice of one node per block can create a random image block.

Drupal.org has a great write-up on how to do this in the Handbook under Module snippets: Views
Random Image Block From One or More Galleries Using Views - http://drupal.org/node/82617

Remove unwanted tabs from pages

ref: http://drupal.org/node/68792 - http://drupal.org/node/85137

Some modules add tabs to pages that are not needed for general users, or not needed at all. You may wish to link to the page in a different way, as some users don't understand that they can click on the tab above a node.

There is currently no way to alter the hook_menu() generated tabs from code, so this function will find and strip out a tab based on its name.
Step 1 of 2

Locate your theme's template.php file. If one doesn't exist create an empty one. This is where you can place customisation PHP code.
Step 2 of 2

Custom functions placed in the themes template.php file should begin with the theme name. In the code snippet below replace "yourthemename" with the actual name of your theme, such as "bluemarine".

You may already have a '_phptemplate_variables' function defined depending on what theme you are using, if so do not include the function again from the snippet below.

function _phptemplate_variables($hook, $vars = array()) {

if($hook == 'page') {
yourthemename_removetab('address book', $vars);
// add additional lines here to remove other tabs
}

return $vars;
}

function yourthemename_removetab($label, &$vars) {
$tabs = explode("\n", $vars['tabs']);
$vars['tabs'] = '';

foreach($tabs as $tab) {
if(strpos($tab, '>' . $label . '<') === FALSE) {
$vars['tabs'] .= $tab . "\n";
}
}
}
?>