User login

Drupal 6

Set higher minimum server environment requirements for a Drupal installation profile

There's a hook for that! The logically named hook_requirements lets you set requirements for each module.

To make these requirements apply to an installation profile, simply put your implementation of hook_requirements in the .install file of a module that is required by that installation profile.

Skip down to the resolution for the code that worked– doing it this Drupal way.

Keep reading for the various wrong turns on the path to the right direction.

Remove "Add comment" links from teasers

See and report to:

How to disable "Add new comment" at teaser part, but "Read more" remains

Hi Brian,

So the Drupal user interface wasn't enough? You had to make a custom node template? It took us a few months to notice the new options for displaying fields, but now we use it a lot instead of node-TYPE.tpl.php files. And I'd be interested what in that post needed updating for Drupal 6!

Relating nodes by taxonomy with Views 2 relationships?

benjamin-agaric: a Views 2 question-- we have two content types (one for images, one for posts) connected to the same vocabulary, we would like a view of the images (actually a CCK field on a node type) where the link from the image goes to the single post tagged with that term. Now I'm thinking this is such an edge case I should just do it in the theme like always. But--

[these next messages were all sent pretty much simultaneously]

merlinofchaos: You probably need a custom field for that.

Be sure to register templates moved to module layer, and moving functions from template.php to module

Using FileMerge to compare (Mac OS X graphical diff), no differences between the page.tpl.php in the scf_base theme and the page.tpl.php I have in scf.module.

But the site doesn't look the same at all. That means the reason moving template files to the theme layer failed is because I am not calling them right.

Had to put them in hook_theme_registry, of course.

Once that was done, progress began in earnest. Breaking the site, of course.

Calling watchdog function (logging info) in Drupal 6

In Drupal 6, the way watchdog() is used has changed a bit.

It's all defined in the API, of course, but some things could use a little more clarification.

Here's the function definition as a starting point:

function watchdog($type, $message, $variables = array(), $severity = WATCHDOG_NOTICE, $link = NULL)

Using the taxonomy term associated with a node as an argument in a view

How to in Views 2

Using a taxonomy term associated with a node as the argument in your block view. In the original Views module, the PHP Argument handling code was a collapsed fieldset that opened to reveal a textarea in which to input code. In Views 2 this is still necessary, unless we're missing out on some uber-advanced method, but harder to get to.

Menus (and other theme options) disappear after directly editing the theme settings variable

After directly replacing just the icon location (changing sites/example to sites/default and nothing else) in the theme settings (global and theme-specific) of a site recently updated from Drupal 5 to Drupal 6, the menu for the site disappeared with array_merge errors in two lines in the ./includes/ file.

Going to the global theme settings and resaving the variables (which were all missing, no checkboxes marked) fixed the problem.

Strange. But true!


Increase Drupal logout time limit

4.7 era answer:

Increase cookie lifetime in settings.php with an ini_set command or, recommended, use the persistent login module:


Error based on stale schema cache?

I received an error because the schema for member module wasn't loading. After visiting the modules page all was fine.

Syndicate content