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.

Regular expressions: great when they work!

Wow, it's great when regular expressions work (even if you're fumbling in the dark with them...)

Traversing through an angle-bracket delimited term set (term hierarchy path).

Input:

this > is > a > term > list

Code:

    $regexp = '%(?:^|>\ *)("(?>[^"]*)(?>""[^"]* )*"|(?: [^">]*))%x';
    preg_match_all($regexp, $typed_termset, $term_matches);
    $typed_terms = array_unique($term_matches[1]);

Wow, it's great when regular expressions work (even if you're fumbling in the dark with them...)

Traversing through an angle-bracket delimited term set (term hierarchy path).

Input:

this > is > a > term > list

Code:

    $regexp = '%(?:^|>\ *)("(?>[^"]*)(?>""[^"]* )*"|(?: [^">]*))%x';
    preg_match_all($regexp, $typed_termset, $term_matches);
    $typed_terms = array_unique($term_matches[1]);

Result:

Array
(
    [0] => this
    [1] => is
    [2] => a
    [3] => term
    [4] => list
)

Further review of this expression to be sure it works as intended would certainly be appreciated.

cmt_term_*_set and also cmt_term_*_update functions?

// call me crazy, but the way I constructed cmt_term_description_set makes a cmt_term_description_update (which would need a select statement to get the content_id unnecessary)... no, for endorse functions the content_id would be passed with the form and save the SQL.
// however, cmt_term_*_update functions are still unnecessary because it's easier to call cmt_vote($content_type, $content_id) from the submit function for the endorse form.
// so this is deprecated
function cmt_term_description_update($tid, $description, $uid = NULL, $value = 1) {

<

blockquote

// call me crazy, but the way I constructed cmt_term_description_set makes a cmt_term_description_update (which would need a select statement to get the content_id unnecessary)... no, for endorse functions the content_id would be passed with the form and save the SQL.
// however, cmt_term_*_update functions are still unnecessary because it's easier to call cmt_vote($content_type, $content_id) from the submit function for the endorse form.
// so this is deprecated
function cmt_term_description_update($tid, $description, $uid = NULL, $value = 1) {
$result = db_query("SELECT content_id FROM {cmt_term_description} WHERE tid = %d AND description = '%s'", $tid, $description);

db_last_insert_id: what it means and how to use it

Or: What's the right way to auto-increment sequences in Drupal?

Drupal 6, not Drupal 5

db_last_insert_id is not for getting the next available number in a sequence. Repeat, it is not for saying gee, I want to insert something into table foo, what was the last foo_id I put in? Then I'll add +1 to it. No!

Or: What's the right way to auto-increment sequences in Drupal?

Drupal 6, not Drupal 5

db_last_insert_id is not for getting the next available number in a sequence. Repeat, it is not for saying gee, I want to insert something into table foo, what was the last foo_id I put in? Then I'll add +1 to it. No!

The point of db_last_insert_id is that you let the database worry about what the next ID is. You use an auto_incremented (MySQL) or serial (PGSQL) column, and the INSERT statement inserts a number for that column for you.

ibolmo: what's better drupal or modxcms?

So asked some random person in IRC #drupal.

The druplicon needs a stock answer for that... something like "it depends whether you use Drupal for good - http://groups.drupal.org/drupal-for-good - or evil - http://groups.drupal.org/drupal-for-evil "

A few days after promising not to put self-promotional fluff in Agaric's blog...

The Drupal Association has a malformed link to Agaric's site, so we'll using the opportunity to have a special welcome page.

Agaric Design Collective is yet another web design company out to change the world...

Microsoft is evil

News flash: Microsoft is evil.

I hope that manufacturers do start making different hardware that skips the many Microsoft Vista content protection hoops, and the open source free software operating systems gain an advantage in hardware innovation on top of freedom and security.

DemocraticMedia.ca post-campaign checklist

  1. In IE when someone trys to submit a group as a member the form is way down at the bottom of the page ? same for the when I submit a blog - looks like it gets squished out.
  2. Could we have a the Media in the Media in a block?
  3. Any suggestions on the front page set up now. I think we want to highlight a few ?Feature Campaigns? and then maybe have our posts featured. I guess I could just format the front page so that it lists some featured campaigns.

<

ol>

  • In IE when someone trys to submit a group as a member the form is way down at the bottom of the page ? same for the when I submit a blog - looks like it gets squished out.
  • Could we have a the Media in the Media in a block?
  • Any suggestions on the front page set up now. I think we want to highlight a few ?Feature Campaigns? and then maybe have our posts featured. I guess I could just format the front page so that it lists some featured campaigns.
    -perhaps at the top we also list our media in media feed and blog feed split half and half.
  • <

    ul>

  • Panels.
  • Definition of Online Advocacy

    From http://www.tsne.org/site/c.ghLUK3PCLoF/b.3015841/k.F9A6/Articles__Electronic_Advocacy_Practices.htm

    <

    blockquote>What is Online Advocacy?

    One of the more recent developments in nonprofit advocacy has been the development of online advocacy techniques. Also called electronic advocacy, Internet Advocacy and Activism Online, these techniques use the Internet and other types of high technology to promote policy change.

    [...]

    McNutt and Penkaukaus (2000) argue that these activities can be grouped into four interrelated processes: Gathering and Analyzing Information, Educating and Developing Awareness, Organizing and Coordinating Supporters, and Applying Pressure.

    To use Putty on local files

    It is not immediately intuitive how to use Putty to do shell stuff on ones own computer. There must be some ways of doing some things, because SCP exists for Windows.

    putty to show own files

    Dan will probably switch to Ubuntu before we get around to figuring this out.

    GNU-Linux system administration

    Resolution