Kicking Drupal ass today

It’s Drupal day again, and import data problem continues to piss me off (migrate refuses to pass properly export my tables to View, and eventually just stopped importing my table rows at all; and node-import keeps failing at step 7, line 668). So instead of beating that dead horse some more, I moved on to problems I could actually solve, and solve them I did!

First, the breadcrumbs. I needed to a) include breadcrumbs, and b) style them to match the design. I used the Menu Breadcrumb module to solve the first problem, so that the breadcrumb would draw from Primary Links instead of Navigation. For the second, I first turned to Pro Drupal Development by John K. VanDyk–page 181 had the advice I needed, i.e. to add the following function to my theme’s template.php to change the breadcrumb separator from ‘>’ to ‘: :’ :

function phptemplate_breadcrumb($breadcrumb) {
if (!empty($breadcrumb)) {
return ''. implode(' : : ', $breadcrumb) .'';

But that wasn’t enough. I needed to remove “Home” as the first item of the breadcrumb, so I changed the above code to this:

function phptemplate_breadcrumb($breadcrumb) {
if (!empty($breadcrumb)) {
return ''. implode(' : : ', $breadcrumb) .'';

And that fixed that problem! The rest was just updating the css in the breadcrumb call in my page.tpl.php file:

For some reason, my css wasn’t working on the “: :”, so I fonted them, but otherwise this worked perfectly! Breadcrumb success!

Except, then the client wanted the breadcrumb changed for one content type. No problem!

(shoot, can’t put the code here without serious edits, due to its extreme php-ness. Damn! But there’s good info on hiding blocks for specific node types here.)

Seriously, I was on fire today!

Next problem, the drop down menus were appearing under the flash slideshows on six pages. I thought it had something to do with Nice Menus, but after much googling, I found the fix to this was actually in the Flash embed code, so I added this code to the swfobject code for each:

so.addParam("wmode", "transparent");

And those are the things I fixed today. Woot!

Of Scarves and Drupal Devilry

So I’m knitting again. Woot! I finished a (unfortunately heavy) orange and tag-yarn scarf last week, and now I’m working on two scarves/shawls (stockinette to the end, then drop every third stitch). One is sparkly red yarn (Karabella Stardust) and will be this year’s holiday scarf, and the other is a tweedy Plymouth Encore that I’m going to have to frog and restart, ’cause it’s too wide for only two balls of yarn.

I started up again because work, both my day job and my freelance projects, have been stressing me out, and after several near-meltdowns, I had a “D’oh!” moment and realized that I’d given up more than just something to do with my hands when I stopped knitting–I’d given up an important stress-reliever. I can’t believe I ever forgot how relaxing it is work with my hands and let my mind fly loose. Stupid.

Anyway, in other news, Drupal continues to kick my ass. I spent four hours yesterday trying–and failing–to beat the forums into submission. I still can’t figure out why setting a block exception for “forum” only works for the forum posts and not the other forum pages, and google was no help this time. I picked up another Drupal development book at B&N today, one more advanced and with far more customization examples than my other two books, so hopefully that’ll help, but for today I’m leaving the forums alone and working on some of the other things for the site that I might actually be able to fix. I need to get a few more successes under my belt before I tackle the evil forums again, and not just because my ego needs reinflating. I also need to have something closer to complete by Monday for the client. Yay?

And finally, because posts without pictures are just plain boring, here is a gratuitous photo relating to nothing else in this post. It’s from earlier this week at work, when the sun was setting and the fog was rolling in from two different directions. It was so damned beautiful that night I took about 40 pictures, but IMO this is one of the better ones.

Fog over Brentwood

Never expected to actually love Actionscript

Flash has been my life lately, specifically learning Actionscript 3.0 from a class at Otis. Tomorrow is the last one, and I must say, I wasn’t sure at first that it was a good idea, but now, nine classes later, I’m glad I did it. I’ve learned a lot, not least of which is that a) I’m not stupid, and b) there is usually no magic recipe for my task and I just have to do it on my own.

Two important things I’ve learned that either took much googling, or wasn’t on google at all:

1) .text and .htmlText are two different things. The second one will insure that your text field renders in html. (Learned this from a colleague, as google gave me no joy.)

2) MouseEvent.ROLL_OUT and MouseEvent.MOUSE_OUT are also two different things, and this is very important: The former works on the parent movieclip, while the latter is more likely to work on whatever child object is contained within the movieclip (so!frustrating!).

I have put them here so I will always remember them, and hopefully to make them easier for others to find, should they need them.

Now it’s time to conquer the checkboxes nested in a drop-down menu. Yay?

Me, myself and my work