User login

Drupal 6

Clean up and rationalize Drupal core Taxonomy Term Add and Edit form

I can't believe no one has done this!

Simplify the taxonomy interface for administrators by removing the taxonomy related terms box...

drupal taxonomy hide related terms
drupal form tweaks remove related terms

The commit message upon completion...

"Clean taxonomy term add / edit form by removing related terms and moving parents from the closed advanced fieldset to the open identification fieldset if the vocabulary has already been made hierarchical."

And the code:

Getting Views as Data with Drupal 6 Views 2

Is there a standard way to get views as data? (to count the rows and such) or is it expected that this will be done in the preprocess functions, and views methods always return themed output?

Kathleen worked around this by making changes directly in the theme's views-view.tpl.php.

Alternatively,

<?php
function pdtheme_preprocess_views_view__contributions(&$variables) { //...
?>

should let you see the variables. see if $rows exist, and in theory decide how to output from there.

Loading included files the Drupal way

The usual PHP functions include, require, include_once, and require_once should not be used in Drupal to load files from modules that aren't your own. Instead, use module_load_include():

http://api.drupal.org/api/function/module_load_include/6

See also http://api.drupal.org/api/function/drupal_load/6

Displaying taxonomy terms differently according to their vocabulary

This is how one would embed it in a node.tpl.php, but this should all be done in a pre-process function instead.

Hook theme registry alter issue takes away entire site theme

The entire theme disappearing issue has an identified culprit.

(It was sort of cute– devel still printed the query log, but that's all we got for each page.)

First I commented out scf.module's implementation of hook_theme(), but visiting the admin/build/modules and admin/build/themes pages didn't bring it back.

Then I commented out the implementation of hook_theme_registry_alter(), and that brought the site back (and with it, the ability to see the warning messages).

First, the guilty function, that appears to only work with the scf stub theme:

Drupal development modules

Agaric has added the following modules to our development git repository. Alphabetical order:

Access Drupal functions and session from a PHP script in a site subdirectory

If you want to use Drupal sessions and the logged in user object from a straight PHP script not at Drupal root but somewhere in subdirectories in a site, you will probably need to do something like I endend up doing in profiles/scf/switch.php to impersonate the Drupal site root directory.

In fact, I think the partial installation profile idea might need something like this.

(Skip down to resolution.)

Some test output code used to figure out what the domains and sessions were doing:

Syndicate content