User login

Complete

To be used with care. Pages are complete only when they meet the posting guidelines.

Ask Agaric: Views Block and Page with Different Fields

E-mail subject: Please help me with views???

Tony sent a message using the contact form at
http://agaricdesign.com/contact-us

Hi Ben,

My name is Tony and I have been reading allot of your tutorials on your
site and the reason that I am emailing you is that I have a problem with
views and I was wondering if you could be so kind in helping me out?

Heres the story:

phptemplate callback result when given $form directly

Background research that was eventually distilled into:
http://agaricdesign.com/note/how-theme-drupal-form

What we gave, $form:

<?php
function phptemplate_user_register($form) {
    drupal_set_message('<pre>'.print_r($form,TRUE).'</pre>');
    return $output;
}
?>

Load a node for a template file- in exactly the same way a node object is presented to a theme

Motivation for this function: sure, we could use a plain node_load($nid) and wrap every $node->field['0']['value'] in a check_plain or the function for rendering with the proper input format (check_plain). The proper format is available to be grabbed from the data provided by a regular node_load. But that's a lot of work and not the way we're used to theming things in .tpl.php

Using Subversion's "include" functionality– the svn:externals property

DEPRECATED: Use Piston

In this case we're using svn externals to have a module in two places in a repository, but of course it works just as well for a truly external repository.

A silly trip through the innards of views theming: output plain link with no HTML

Spoiler: if you want a plain value of a field to be output plain without surrounding <div class="field-item"> tags, make sure to select "Do not group multiple values".

Now for the masochists, let's follow how I found this out the really, really, really hard way!

Amazing what's available to a simple view in Drupal 5.

A views-list-agaric_view_name.tpl.php with the following sole contents:

Save the Nodes: preserving old d.o docs by flagging it as deprecated

On the last hours of the coding sprint following the amazing Drupal conference, I accosted Steven Peck and asked in person about (one of my many) pet issues: that documentation (or any non-spam node) not be deleted from Drupal.org. Assorted drupallers wandering around MIT agreed with this in principal, but also agreed with Steven that old content referring to unsupported versions of Drupal would have to be very clearly flagged.

Multiselect forms with Drupal 5's FAPI

I always have to look this up, so here it is. Two examples for the price of one. Oh, and a link to the official Drupal 5 form documentation.

Save configuration settings to a file instead of database: brainstorm

As a module developer who loves to make configuration options, I feel guilty every time I make one more variable_get() that's going to make yet another call to the database.

Proposed solution: every module we make (say, performance_enhancer.module) can have a configuration file (performance_enhancer.config) in it.

If that configuration file is copied to files/config (in wherever your files directory is located), that copy is used instead. (file_exists seems pretty fast.)

Does this make any sense to people?

Syndicate content