User login

Complete

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

Cutting cruft from third-party Mac OS X programs

Trim down Mac OS X applications (but be careful, as one might expect, you can break apps by messing with them in this way)

http://rixstep.com/4/2/trimmit,00.shtml

I asked Rixstep specifically about open source free software Java-based applications, generally ported from GNU-Linux:

Trimming apps:

What about Java-heavy cross-platform FOSS ports such as NeoOffice and Gimp?

Generally yes trimmable, or generally no?

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 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.

Designed to life

Functionality designed to your life is the Agaric Design signature. Utilizing open source, free software from around the world, Agaric Design websites are impeccably crafted with a modern, sophisticated and understated spirit. Our guiding philosophy is to bring open source and usability that works effortlessly in your day to day life.

I know we will become a favorite in your contacts list. And thank you! I consider that the ultimate compliment.


Dan Hakimzadeh

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

Do not show group-adding subform when adding an action to an existing group

And finally, restricting adding that extra form, the group subform in the action node posting form, to only when the action is called without a group specified:

In restricting that subset of form_alter...

Could check $form here:

[#action] => /eng/node/add/action?gids[]=156

But it seems more precise to check $form over in this mess:

Getting a subform to show up correctly

damn. action_group_node_form, the form that is an organic group, has none of its organic group-iness when pulled up through subform.

The trick-- and it is tricky -- is to specify your node type not just with the agaric_example_type_node_form but also in the arguments, 'type' must be set to agaric_example_type.

Solar Power - a grant plan?

Dan's grant
plants do it so it's possible

if you have a solar panel that shifts with the sun
at the end of the day, with leftover electricity
solar arrays in key spots that all they do is make electricity and feed it into the grid

solar power is possible with capacitors and batteries

the real impact, like on the whole mushroom theory
[is it popping up everywhere]

and then people can't just flip the switch of [$5/hr more]

I'm just talking about the science, bottom line numbers

60 Hz, 120 V

Storing lots of little pieces of data for a module: best practices? Interim practices?

How to store a bunch of little variables?

Location.module does it this way, a separate, dynamically produced variable for every field and node type. The value is either 0 (don't display), 1 (display), or 2 (required)

      $workflow_setting = variable_get('location_'. $field_name .'_'. $node->type, $field_name == 'country' ? 1 : 0);

Syndicate content