This website is composed of information connected through taxonomy. It is simultaneously a proof-of-concept and a means to allow Agaric to share and store information both within the collective and the world as part of our open documentation philosophy.

User login

This website is composed of information connected through taxonomy. It is simultaneously a proof-of-concept and a means to allow Agaric to share and store information both within the collective and the world as part of our open documentation philosophy.

Freelance or Small Business, what about Cooperative?

The Web Design Business Kit, by Brendon Sinclair, provides good advice, at least in the free sample chapters.

It does however, set up an absolute two-choice approach: freelancing, or owning a small business.

Not a token nod to a collective, co-operative form of organization? Equality, liberty, fraternity? And this from an Sinclair, who appears to take the view that work-or-starve is its own sort of slave labor in the introduction summary:

Find the next largest key in an array

php find the next largest key in an array
php find the next greatest key in an array

There is undoubtedly a better way, but recursion has melted my brain and search engines aren't saving me.

So this is what I did... actually, I used another approach entirely that didn't need this. But array_keys is how I would have started, then sorted it, and then had a foreach that compared my key to the keys it got as it walked through, and broken out of there with the new key the first one that was larger.

php find the next largest key in an array
php find the next greatest key in an array

There is undoubtedly a better way, but recursion has melted my brain and search engines aren't saving me.

So this is what I did... actually, I used another approach entirely that didn't need this. But array_keys is how I would have started, then sorted it, and then had a foreach that compared my key to the keys it got as it walked through, and broken out of there with the new key the first one that was larger.

    $terms_on_this_level = array_keys($parents);

I know there would have been a better way, but it's moot to me know anyway... until I search for this answer again and find my own, deeply unfulfilling, page.

Freelinking not working? Check WikiTools settings.

There's a setting in wikitools that literally says hijack freelinking . It has to be unchecked.

Dan figured this out.

Agaric Design... figuring stuff out little by little.

There's a setting in wikitools that literally says hijack freelinking . It has to be unchecked.

Dan figured this out.

Agaric Design... figuring stuff out little by little.

Form at a tab in administration section, Drupal 5

The shortcut:

In implementation of hook_menu, may_cache section...

The shortcut:

In implementation of hook_menu, may_cache section...


function cmt_menu($may_cache) {
$items = array();
if ($may_cache) {
//...
$items[] = array(
'access' => user_access('administer community managed taxonomy'),
'callback' => 'drupal_get_form',
'callback arguments' => array('cmt_settings_form'),
'description' => t('Configure Community-managed Taxonomy options that apply to all vocabularies with these settings.'),
'path' => 'admin/content/cmt/settings',
'title' => t('Settings'),

Delete from Drupal variable table where name LIKE

delete from variable where LIKE drupal

There are occasions when the usual approach:
variable_del('cmt_example_variable');
won't work.

This is not recommended as a shortcut, and in fact even here is problematic should there ever be a module called cmt_teaser_

delete from variable where LIKE drupal

There are occasions when the usual approach:
variable_del('cmt_example_variable');
won't work.

This is not recommended as a shortcut, and in fact even here is problematic should there ever be a module called cmt_teaser_

/**
* Implementation of hook_uninstall().
*/
function cmt_uninstall() {
  db_query("DELETE FROM {variable} WHERE name LIKE 'cmt_teaser_%'");
  cache_clear_all('variables', 'cache');
}

So this is bad practice, but I don't see

I'm not going to keep track of all the node types that ever were available to Community-Managed Taxonomy and might have had this variable created. I suppose I could just delete the variables for node types currently available to CMT and possibly leave a few variables, is better than the even slighter risk of deleting another modules variables?

Unadorned FALSE or TRUE not working in FAPI?

This is a Drupal 5 question. Why doesn't this work?

This is a Drupal 5 question. Why doesn't this work?

    $form_add['cmt_teaser'] = array(
      '#type' => 'radios',
      '#title' => 'Community-managed taxonomy display',
      '#options' => array(
        TRUE => t('Show term managing form on teasers and full content.'),
        FALSE => t('Show term managing form on full content'),
      ),
      '#default_value' => variable_get('cmt_teaser_' . $type . '_teaser', FALSE),
      '#description' => t('CMT forms can become large and complex, so displaying them on the teaser is usually not recommended.'),
    );

But this does:

Placing your changes to a form using hook form_alter

drupal form_alter placing in a form
Drupal 5

CivicActions has a useful
Drupal Programming Trick - Add an element before/after another element in form_alter.

drupal form_alter placing in a form
Drupal 5

CivicActions has a useful
Drupal Programming Trick - Add an element before/after another element in form_alter.

Display everything about a form in Drupal 5

To display everything about every form, Agaric uses this in a form_alter hook implementation:

drupal_set_message('<p>Form ID: ' . $form_id . '</p><pre>' . print_r($form, TRUE) . '</pre>');

In fact, we wrap it in our own function, which we have in our development module, agaric:

To display everything about every form, Agaric uses this in a form_alter hook implementation:

drupal_set_message('<p>Form ID: ' . $form_id . '</p><pre>' . print_r($form, TRUE) . '</pre>');

In fact, we wrap it in our own function, which we have in our development module, agaric:

function agaric_f($form_id, $form) {
  drupal_set_message('<p>Form ID: ' . $form_id . '</p><pre>' . print_r($form, TRUE) . '</pre>');
}

This is a more... complete... overwhelming... version of the line Agaric suggested for displaying the form ID of all forms.

Capitalize TRUE, FALSE, NULL per Drupal coding standards?

Are true and false PHP keywords capitalized in Drupal coding standards?

Yes.

TRUE, FALSE, NULL

Agaric doesn't have the citation, but we're pretty sure.

Are true and false PHP keywords capitalized in Drupal coding standards?

Yes.

TRUE, FALSE, NULL

Agaric doesn't have the citation, but we're pretty sure.

Backup solution for iBook, external hard drives, and more

Agaric, in particular myself, whose life is on a 60GB hard drive in this iBook, wants a more redundant, easier backup solution, badly.

Willing to pay to get this set up, and maybe offer the service to others...

back up my Mac to Linux RAID

http://sitening.com/blog/2006/05/23/how-to-backup-your-mac-intelligently/

Tyler Hall Says:

June 12th, 2006 at 11:02 pm

Renegade,