User login

Drupal Development

Making forms redirect like they're supposed to even after complex hacking

wsf_action ben$ svn commit -m "that's drupal_goto, not drupal_go_to"

wsf_action ben$ svn commit -m "drupal_goto prevents form submission... how to make redirect work????"

wsf_action ben$ svn commit -m "despite not saying so, drupal_execute does return a redirect"

Subform limitations: errors in subform not noted or highlighted the same as main form

Note: Elements of a subform aren't included in the list of 'this is required' if there are main form errors triggered. Furthermore, the wrong element can turn red. In this case, the Title text is red, but it's the group title (renamed Action set name) that's blank.

Title field is required.
Description field is required.
Country field is required.
Province/State field is required.
Town field is required.

Where's the Action set name required?

Well, if you leave only it out you get the error:

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:

Agaric wants rotating user pictures!

Not much more to say about that... but it would be somehow more human and real to have a changing assortment of pictures representing users on a site along with their posts, rather than a single, static, unchanging mug.

I guess instead or in addition to this concept making user pictures NON-retroactive would be part of the concept-- the picture of you with your three-year-old post should be you from three years ago, not two months ago.

Resolution

Provide a theme function to allow override of your block output

See, the professionals have to learn this also! Excellent post from pingvision, scroll down to the second half to see the Drupal way!

http://pingv.com/blog/rad/200710/changing-blocks-output-using-block-template

Here's Agaric's contribution to making the countdown module's output themable:

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']

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);

Syndicate content