try another color:

 
try another fontsize: tiny small normal big huge
netsperience 2.x
Drupal web development and other stuff

Drupal

Welcome to netsperience 2.x

This is the personal web site of Randall Goya aka decibel.places

I develop, maintain, and extend web sites and web applications, mostly for Enterpise clients in publishing, media, education, marketing, and non-profit.

I build most of my projects with the Drupal content management framework. My profile on drupal.org -- my Drupal Certified to Rock score is 4

My Facebook & Twitter & Foursquare & Google+ & LinkedIn & Github & IMDb

View/Download my CV » more About Me » my portfolio » some tunes by me

You're probably wondering, "If this is netsperience 2.x, what happened to netsperience 1.0?" It was at GeoCities Free Hosting for over ten years, but now it's gone along with the rest of GeoCities - you can still view much of the old GeoCities site where I experimented with JavaScript and DHTML at ReoCities

Use Drupal? Join the Drupal Association!

Drupal Association Membership Drive

(because there's $ in numbers)

Help Grow Drupal Association MembershipThe Drupal Association plays an important part in keeping the community healthy and in keeping Drupal.org up and running. However, lots of people don't know about the Association, or don't realize the extent of the work we do. With this membership campaign, we're raising awareness of the Drupal Association, raising funds for community improvement projects like Community Cultivation Grants, and giving more of the Drupal community a sense of stewardship over Drupal.org and our ecosystem.
 
We want to raise $100,000 and get 1,000 new/renewed members before December 30. We currently have 3,200 members, so this goal is pretty big. We're aiming high, but know we can make it with your help.
 

How you can help

Share this campaign far and wide. Post on social media, your blog, your office bulletin board, your chat room, via smoke signal, or the next time you meet other Drupalers for a meal.

Link:

https://assoc.drupal.org/help-grow-our-membership

 

Congratulations! You’ve gained the ‘Community’ role on Drupal.org

An email explains the super-powers granted to Community role users:

Thanks for being an active user of Drupal.org! Due to your frequent
participation, you’ve been granted a ‘community’ role on Drupal.org.
You are joining thousands of active users who are helping us make this site a
better place for new users.

From now on, you may occasionally see a small ‘confirm’ button on
comments or user profiles of other users on Drupal.org. This means you are
looking at a new user, who hasn’t been confirmed as not a spammer yet, and
who doesn’t currently have full access to the site.


When you see this button, please take another look at what the person posted.
If their content looks valid and not spammy, just click ‘confirm’. By
doing so, you enable the person to fully participate on Drupal.org and
improve their daily experience on the site.

You can read more about Drupal.org user roles at
https://www.drupal.org/about-drupalorg/user-roles and about the community
role specifically at https://www.drupal.org/node/2471925 

Thanks for helping us make Drupal.org a better place!

- Drupal.org Team

I Was Mentored in Drupal by "dumbluck"

The Drupal community web site has a profile field to list "My mentors"

For example, on my profile I say I was mentored by:
  • robbiethegeek - how to appreciate Drupal awesomeness and its limitations
  • Alex UA - how to run a business providing Drupal services
  • forestmars - how to be involved in the Drupal community
  • smerrill - how to be an engineer with platform tools like Jenkins, Vagrant, Redis
  • snugug - how to make web sites responsive
  • ericduran - how to experiment with new doodads like HTML5, Android
  • zroger - how to use Drupal hooks and APIs in code

I started thinking about my dumb luck picking Drupal as a tool about 9 years ago. I was looking for a Content Management System that made sense.

I was awfully interested in a project called PAWS (PHP Automatic Web Site) -- and it's a good thing I didn't ride that horse, which was long ago put out to pasture.

A client asked me to convert his static PHP site so that he could manage the content in the include files without editing code. I built my first Drupal 4.x site, with the crazy hack of creating a node for every include, and then printing the includes/nodes inside a main node (Panels, sort of, which did not exist in Drupal then). I also customized the front end of the TinyMCE wysiwyg editor to add buttons to apply his brand's pink and blue colors. The client smoked a lot of pot, drifted away, came back a year or two later for more work -- without a database. Oh well, not the first - or last - time the db was lost by a client.

That experience convinced me that a lot could be done with Drupal that I had not been able to do without a lot of custom coding just to build the base web application. Other projects with early versions of WordPress and Mambo (predecessor to Joomla) left me unimpressed with their extensibility. I have often said since then that "WordPress is like the smaller sibling of Drupal, but Joomla is the evil cousin."

Then Earl Miles conjured up his merlinofchaos wizardry for Sony Music, creating Views and Panels and Ctools, and that was around the time that a lot of developers took notice of Drupal. I was profoundly convinced that Drupal had outgrown being a CMS enabling writers to (more or less) easily edit content without (much) coding, and had become a Content Management Framework that could perform elegant and dynamic manipulations of the content in its database.

So I had to add dumbluck to my mentors - not just for my early experiment hacking the node system, but for each solution that I was able to implement afterwards, because my choice of Drupal provided me with an extensible framework allowing complex algorithms for presentation of content, and the Drupal project improves with every contributor's enhancements.

I think I'm dumb, maybe just happy

I noticed in preparing this post that some Drupal user profiles are accessible by username, eg. https://www.drupal.org/u/decibel.places and https://www.drupal.org/u/robbiethegeek, while others, like merlinofchaos and smerrill, are only accessible by their UIDs https://www.drupal.org/user/26979 and https://www.drupal.org/user/77539 respectively.

Connect Drupal to Multiple Remote Databases via SSH Tunnel

I'm working on a Drupal application that stores data in separate mysql databases, and syncs some of the data to CouchDB with node.js scripts.

The extra mysql dbs are 16+ GB and it's not practical nor necessary to keep them locally since I only want to read the latest data in local development.

Wouldn't it be cool if my local development Drupal sites can read from the remote database servers?

In some cases you can just use the connection you find in the remote site's settings.php:

'otherdb' => 'mysqli://username:[email protected]/dbname'

(note: it's a Drupal 6 site so that's why you don't see an array - I will give a Drupal 7 example below)

However, there's often a twist: I must create a SSH tunnel to connect to this particular db server.

First, you need to have configured and installed SSH keys on your local and remote machines.

Then fire up your terminal and create the SSH tunnel to forward the remote mysql port to a local port. This technique is based on information clearly presented by RevSys (quick example) and noah.org (more details).

ssh -L [local port]:[db host]:[remote port] [ssh-username]@[remote host] -N
 
NOTES:
  1. -N tells ssh that you don't want to run a remote command; you only want to forward ports.
  2. use a different port for your tunnel [local port] than the one you normally use for mysql; for example, if you connect to mysql locally on the default port 3306, use 3307 (or any other unused port) for your tunnel. You should use the correct [remote port] which is typically 3306, and you can see if it is different by looking at settings.php in the remote site.
  3. Keep this connection alive as long as you need to connect to the remote database.
 
ssh -L 3307:[db host]:3306 [ssh-username]@[remote host] -N
 
Then you can test your connection (in a different terminal instance):
 
mysql -u[dbuser] -p -P 3307 -h 127.0.0.1
 
Here is the connection in settings.php for Drupal 6:
 
'otherdb' => 'mysqli://username:[email protected]:3307/dbname'
 
What's cool is that you can mix local and remote databases. For example, I want to use a local copy of the Drupal database, which is smaller and easier to sync, and read the data from the second (and third, in my case) remote dbs.
 
$db_url = array(
  'default' => 'mysqli://local-dbuser:[email protected]/local-dbname',
  'otherdb' => 'mysqli://username:[email protected]:3307/dbname',
  'otherdb2' => 'mysqli://username:[email protected]:3307/dbname2'
);
 
You can also connect Drupal to the default remote database, but it makes sense to use a local instance for development.
 
And in Drupal 7:
 
$databases['default']['default'] = array(
  'driver' => 'mysql',
  'database' => 'local-dbname',
  'username' => 'local-dbuser',
  'password' => 'password',
  'host' => 'localhost',
  'prefix' => '',
);
$databases['otherdb']['default'] = array(
  'driver' => 'mysql',
  'database' => 'dbname',
  'username' => 'username',
  'password' => 'password',
  'host' => '127.0.0.1',
  'port' => '3307',
  'prefix' => '',
);
 

WARNING: 

If the db user for the remote db has all privileges, your application may alter the remote database.
 
Therefore, you should create a "read-only" user for the remote database which will prevent you from altering it.
 
THINK
 

Drupal 7 Migrate V2 and Addressfield: SOLVED!

I had to migrate site members from a legacy site with an Oracle db to a relaunch on Drupal 7. Instead of connecting directly to Oracle, I was provided with an Excel dump which I converted to csv. Also the old site does not require members to be authenticated, so I did not have to deal with old passwords.

There are a lot of stale posts in Google results about migrating Addressfield that do not work on the latest Migrate V2 for Drupal 7. For one thing arguments in the field mapping are deprecated.

Using the Migrate module I was able to create migration classes for the users, and some other information; but I got stuck at importing the address data into the Drupal Addressfield table, because it uses subfields and requires building an array in Migrate.

I used colon notation for subfield mapping, but it was not working.

<?php
    $this
->addFieldMapping('body', 'body');
   
$this->addFieldMapping('body:summary', 'excerpt');
?>

Migrate kept throwing an error: Call to a member function import() on a non-object

But when I put drush_print_r on the line throwing the error, I could see the stdClass object arrays were there and populated with the correct data.

I decided to abandon the Addressfield migrate class and use db_insert in an existing class (class SchoolMigration) where I was already running db queries.

It worked, and although I was worried a direct db_insert would not roll back, since I registered the inserts in the process() function for class SchoolMigration, they also rolled back.

Building a Video Playlist for JW Player 6 with Drupal 7 Views

I took over a Drupal 7 project building a web application for college students to upload original videos about their school, and for schools to manage, group, and share the videos.

It's a startup privately funded by the principal, and we are literally working on a shoestring. My previous experience with media in Drupal led the principal to contact me via LinkedIn.

When it came time to build a video playlist in Drupal Views for JW Player version="6.7.4071" (formerly known as Longtail Video), I found very little useful documentation. In fact, someone suggested that those who know how are not interested in sharing their knowlege. -- but not me smiley

There are a couple of videos on YouTube by Bryan Ollendyke for Drupal 6. But a lot has changed in Drupal since then.

The Goal:

Back to the playlist: Site admins can mark a video featured by ticking a checkbox on the custom video content type. Now I want to display those featured videos as a playlist.

 

JW Player provides clear documentation about how to embed the player, and how to construct and load the playlist via a RSS feed.

The structure of the RSS file:

<rss version="2.0" xmlns:jwplayer="http://rss.jwpcdn.com/">
<channel>

  <item>
    <title>Sintel Trailer</title>
    <description>Sintel is a fantasy CGI from the Blender Open Movie Project.</description>
    <jwplayer:image>/assets/sintel.jpg</jwplayer:image>
    <jwplayer:source file="/assets/sintel.mp4" />
  </item>

</channel>
</rss>

There are various threads on drupal.org discussing video playlists for JW Player. None of them were particularly useful for me.

Coney Island Mermaid Parade is June 22 - and it has a Drupal site!

The 2013 Coney Island Mermaid Parade is on Saturday June 22

This year's King Neptune Judah Friedlander  Queen Mermaid Carole Radziwill!

Parade Web site: http://www.coneyisland.com/programs/mermaid-parade

And it's a Drupal web site!!!! cool

mermaid parade poster 2013

My photo gallery from the 2009 parade: http://netsperience.org/category/image-galleries/coney-island-mermaid-parade

Cinco de Mayo, Dries Buytaert in a sombrero etc.

As a 1/4 Mexican, I feel gifted with a birthday on Cinco de Mayo

(for you gringos, that's May 5th)

Even better to share a photo of Drupal creator and curator Dries Buytaert in a sombrero (while a student at Ghent University, where Drupal originated)

Dries Buytaert in a sombrero

photo via Forest Mars

Try my vegetarian recipes:

Bean burritos y arroz con frijoles

Pro Bowl Guacamole

This remains the 10th most popular post on my blog, up from 8709 views a year ago to 15,037 now

Twitter API Changes Again, Patch for Drupal 6.x Twitter Module

When I was unable to post to Twitter from my blog tonight, I found a very new thread on drupal.org discussing the issue: the Twitter API changed again!

I am only using the Twitter module on Drupal 6 sites right now, I took two of the fixes and combined them in a patch for the 6.x-3.0-beta9 version. Then MinhH submitted new code that only requires a change in one place.

here's my latest patch for the 6.x-3.0-beta9 version

since the Twitter API is constantly changing, and the module is not very stable, always read the thread carefully to make sure you are applying the latest patch! Others have cleaned up the code I added from MinhH, and created a patch for the 6.x-3.x-dev branch which makes sense (however I suspect that 6.x-3.0-beta9 may be ahead of the -dev branch, and it's not a branch provided in the project's Github). Anyway, Open Source rocks, Murray!

and because my Twitter RSS feed URL was also broken, I found this post

https://dev.twitter.com/discussions/844

which provides an update to the URL format:

https://api.twitter.com/1/statuses/user_timeline.rss?screen_name=decibelplaces

Syndicate content
Register
url