Thursday, October 30, 2014

Find Drupal Installs on Your Server

Need to find Drupal installs on your 'Nix webserver? Run this on your docroot:

sudo find . \( ! -path '*/sites/*' ! -path '*/profiles/*' ! -path '*/themes/*' ! -path '*/modules/*' \) -iname 'CHANGELOG.txt' | xargs grep -m 1 'Drupal' -s1

Output will look something like this:

./cms/core/d7/drupal-7.32/CHANGELOG.txt-
./cms/core/d7/drupal-7.32/CHANGELOG.txt:Drupal 7.32, 2014-10-15
./cms/core/d7/drupal-7.32/CHANGELOG.txt-----------------------
--
./cms/core/d8/drupal-8.0.0-beta2/core/CHANGELOG.txt:Drupal 8.0, xxxx-xx-xx (development version)
./cms/core/d8/drupal-8.0.0-beta2/core/CHANGELOG.txt-----------------------
--
./cms/core/d6/drupal-6.33/CHANGELOG.txt-
./cms/core/d6/drupal-6.33/CHANGELOG.txt:Drupal 6.33, 2014-08-06
./cms/core/d6/drupal-6.33/CHANGELOG.txt-----------------------

Monday, November 25, 2013

Drupal Block Title vs. Subject

I couldn't find a post about the use of a "title" versus a "subject" in a custom block when building a module in Drupal 6. Running across this funny quirk in code and figured I'd share.

I have a module that defines a custom (navigation) block and was trying to change the title. I found that when I tried editing the title through the admin UI (

admin > build > blocks > custom block name
) nothing changed. That is the default title of the block as defined in the module was still there.

Here's how the block was defined in code:
// start navigation_block() function super_events_navigation_block($op = 'list', $delta = 0, $edit = array()) { ... $blocks = array(); switch($op){ case 'list': $block[0] = array( 'info' => t('Events Archive Navigation'), 'region' => 'right', 'status' => 1, 'weight' => 0, 'cache' => BLOCK_NO_CACHE, ); return $block; case 'view': switch($delta) { case '0': $block['title'] = t('Event Archives'); $block['content'] = theme('super_events_navigation_events'); break; } return $block; } } // end navigation_block()

Note the following line:
$block['title'] = t('Event Archives');

Apparently this works for displaying a title for a custom block, however it cannot be modified. Change this line so instead of "title" as the key you have "subject" as follows:
$block['subject'] = t('Event Archives');

Now the block's (display) title is changeable through the admin user interface.

Thursday, October 18, 2012

The Poet - a poem

The Poet (inspired by Dylan Thomas's reading of "Poem in October". Sorry Dylan.)

the poet who loves his own voice's song
waxes on and on about nothing.
charming women of a certain sort
their perfume stiff and cloying
as their flowered dresses
and unfriendly looks.
all poisoning my taste for poetry books.

~afn

Tuesday, September 25, 2012

Aliens (1986) as Political Metaphor

If you haven't seen it recently, Aliens (1986) is worth a look.

I mean, a corporate shill seeking profits at all costs. A former warrant officer who's been through hell, trying to make her way back to the world is called to a suicide mission under false pretenses. She's accompanied by a contingent of (Colonial) Marines slated to do the corporation's heavy lifting under false pretenses of their own: a pittance with the promise of greater glory and national duty. Only to be sacrificed as expendable in the face of an apocolyptic menace. The baddest among the heroes' ranks, two women and a little girl, all of whom are the embodiment of survival. And to top it all off, a faceless corporation acting as puppet master.

All I'm saying is when the hell did Wall Street and CEO's become the nation's heros? After this movie, I couldn't even watch "Mad About You", I hated Paul Reiser's character in "Aliens" (Burke) so much. I could hardly feel warm and fuzzy about a CEO, post-Union Carbide and in the midst of savings and loan bailouts. And in the balance, we have Ellen Ripley, Vasquez, and Newt. The working class mother, the soldier, and the future. Battered and bloodied but unbowed. There go you heroes! And in a final ballet of mecha-Tai-Chi who should arise as humanity's salvation? Ripley. Even when she's down, you can never count her out! We may not have Ripley yet, damned if we need another Burke.

And as the creepy skittering noises post-credits prove, even with Ripley on our team, we might not be able to "sleep all the way home", but at least we've got Hope.

Sunday, March 04, 2012

Drupal 7 + OpenID: First Attempt

So it worked, but with caveats. Here's what worked:
  • associating exiting account with Google profile for OpenID (e.g. https://profiles.google.com/profilename)
  • logging into existing account using Google profile OpenID
  • OpenID Selector module for logging into existing account
Here are the caveat:
New logins using OpenID did not create new account. My attempts to login were met with the message:
Complete the registration by filling out the form below.
Unfortunately, for said form...and for me, no form below to be found. I am using a custom theme, to which I've added a custom (very simple) maintenance page template. So at this point, I'm trying to figure out what variables and custom functions I need to add to get the registration working. No luck yet (and marginal incentive as there's other more pressing stuff to finish), but here are some links I'll be checking out when I have a moment: