Bronius Motekaitis on Twitter

Welcome to the homepage of Bronius Motekaitis

This site is to keep me up to date with myself, but you're welcome to follow along. Next time I go on a tangent, you may want to come with...

Drupal 7 modal popup Webform, User Login/Register in lightbox thickbox shadowbox ctools style!

Seeking login/register/forgot password in a modal popup for your Drupal 7 site? What about webforms? What about .. anything in a shadow modal popup??

I did a little research recently and came across this popular request and several hackish ways to go about it with popular packages like colorbox, lightbox, thickbox, shadowbox, and it looks like the smart, Drupal 7 way is to leverage CTools.  But who's got time to learn CTools??  Enter http://drupal.org/project/modal_forms!

How to pass along client/browser cookies to remote web service using drupal_http_request to share local session

A challenge I had faced recently was how to take the local user's browser cookies, which contains some shared top-level-domain session related values that tell a remote .Net service all about the user, and share it in a drupal_http_request call.  The ultimate goal is to share website partials (like the header containing Sign In/Sign Out link and verbiage), and that header partial is built, managed, and served by a .Net web application.

Yay, Google Chrome to the rescue (again and again)!

This time, Chrome came to my rescue with it's super Firefox-Awesomebar-like function of typing a partial-match in the addressbar to instantly bring back some otherwise lost work. Here's the story..

Remove .svn meta files and folders from git repo without deleting them from disk

First off, a disclaimer: I have to use SVN for an inherited project. We are moving to git.  In the meantime, i'm working locally in Git and pushing ("committing") to remote SVN.  Unfortunately, I didn't ignore .svn files/folders early enough and had to double back to clean up:

find . -type d -name '.svn' | xargs git rm -rf --ignore-unmatch

seems to have done the trick.  I'll know later.  .gitignore of course has .svn in it as well.

Photoshop CS5 - Antialias bug with vector tools (and how to overcome!)

A few years ago, I posted about a photoshop-shape-tool-anti-alias-bug and got a good bit of feedback here and at sitepoint forum. The issue still persists today in CS5-- in fact, it is not only at non-100% now.  I hope someone can show me that I'm wrong.  In the meantime, I found a work-around (sort of).

Ok, SPAM, you win but you DIE.

Ok, SPAM, you win!  But I get the final say (for now).  To mass-delete ALL spam, I did a "delete from comments where cid != 9189" which deleted ~8000 spam comments while preserving Matt's for posterity.

My apologies to me and the 5-8 others who legitimatly commented on content and had good insights to share.  I don't love spam, and I won't let it dominate my evening picking off 50 at a time in Sequel Pro (anymore).

Revisions not enabled but vid NEQ nid

Dah-ha!

Some time ago, I observed on a client project that version id (vid) was not equal to node id (nid) even though Revision/History was not enabled on this instance.  Weirdness.  In the end, it turned out to be something goofy with a mysql crash botched recovery and data restoration at the datacenter, but that's a tale for another time (perhaps over a beer at Dallas Drupal Days 2012?)

Moving Drupal 6 CCK fields from node down into content_multigroup

Follow me as I journey down a shaky path. 

Goal: I am moving some cck fields off of a Quote Node down into the experimental/abandoned/phantom project content_multigroup* whilst keeping the values from the database.  It is to be done with a combo of Feature revert and hook_update_n.

Plan: Leveraging the fact that reverting to Feature code with fields missing (removed) from Drupal/database does not in fact drop the db columns from the content_type_<type> table structure, I should be able to:

CCK Multigroup in Drupal 7? No, but try the old D6 node reference recipe instead.

Miss the old Drupal 6 recipe of:

cck node type + nodereference + nodereference_url + views_attach of Drupal 6 and days gone by?  Fear not-- you can still do it in Drupal 7 in much the same way, just with different names: