User login

WSF2008

Override taxonomy/term style links for a custom (module-owned) vocabulary

(Solution at bottom.)

Agaric's initial test implementation hook_link_alter indicated that it doesn't quite act however the module w

Add onto a form from other sources (like a subform) before submitting

You spend enough time in FAPI and it speaks to you. (UPDATE: but it speaks lies.)

The beginnings of a chance to catch material from the subform and duplicate it for the main form:

this should take care of prefilling places

What hasn't worked:

Social Forums and Technology

Organizing mass forums
http://mayfirst.org/node/471

I wish I were part of the solution and not part of the problem on that one.

More complex thoughts to come.

For now...

The PWGD corollary:

If we can do Big Things
and avoid technocracy
we can have
true democracy.

http://mayfirst.org/organicinternet

You can pass part of an array variable by reference in PHP5

Pretty nifty. PHP5 (and PHP4 for all I know) lets you pass not merely an entire variable, but part of a variable that is an array (and has nested arrays). Passing a variable by reference allows you to make changes directly to that variable in a function without having to figure out how to add those changes back-- the changes are made in the original variable, not in a copy (which is how variables passed to a function typically operate).

Example number one: $form['taxonomy']

Copy a worklow-ng workflow to do same actions on create content as update

Workflow-ng has no duplicate functionality at this time, nor can you have it triggered on two or more events (or even edit the event). However, you can export the current set-up (configuration) that you like.

From the export tab: admin/build/workflow-ng/0/export

How to make a simple checkbox in CCK

To make a simple, single checkbox with a CCK field, Agaric thinks the best approach is:

admin/content/type/your_content_type

Add Field

Integer

Give it a label (this is not what will appear next to your checkbox; it is what will be used as a title above it)

Single on/off checkbox

The key is the allowed values list– you need two:

0|Check this box to fill out a profile for another organization you represent.
1|Check this box to fill out a profile for another organization you represent.

How to make patch files to contribute to contributed modules

These instructions assume a GNU-Linux, Mac OS X, or other UNIX-y computing environment.

Follow these instructions for using CVS:

http://drupal.org/patch/create

However, if you are making a patch for a contributed module rather than Drupal core, going to the Drupal root directory doesn't make sense.

Create a link for anonymous users only to proceed on to create content after registration

Dan Hak (smoothblendz) (5:49:46 PM): register?destination=node
Dan Hak (smoothblendz) (5:49:48 PM): !!!
Dan Hak (smoothblendz) (5:50:05 PM): doesnt goto create page like user/regiter would
I3IVIIVI (5:50:18 PM): well, in the meantime I'm still getting the register link for logged in users
Dan Hak (smoothblendz) (5:50:53 PM): <?php
 
if ($user->uid==0) {
  print l('<span class="buttn3">' . t('Present Action') . '</span>', 'user/register?destination=node/add/action', array(), NULL, NULL, FALSE, TRUE);

Hide the "More information about formatting options" link

Sometimes, you want to have an HTML-enabled input format, but you really don't need the "More information about formatting options" link. Too much clutter (also, in bad browsers like IE, if you go to the more info on input filters page, and click the back button is your browser, do you lose what you entered in the form?)

Possibly localization and a custom language could remove the line, but that's not the natural or best approach. The most wonderfulest Drupal hook, form_alter, is the Agaric way.

How to apply a patch to a Drupal module

Following the Drupal documentation on applying patches.

The module localization client, originally developed for Drupal 6, needs a patch to the Drupal core module, locale (note that while locale is core it is also optional and disabled by default).

Syndicate content