Get out your tire irons, we’re going to Brooklyn

Photo credit nytimes.com

My mom had been dragging her feet about coming East for a visit for so long and giving me a series of lame excuses as to why she couldn’t come that I was beginning to think she’d secretly had a sex change and wasn’t ready to let me see her in man drag. None of her reasons seemed legitimate and I was getting very suspicious: I knew it had to be something so weird & crazy that she just didn’t want to say what it was. But I kept on kibbutzing encouraging her to come here to visit Grandma and me anyway because its been 5 years, already.

After a lot of pouting (mine) and outright tantrums (also mine) she finally told me she was worried that she wouldn’t be able to leave her hotel — which only served breakfast–and would have to wait hours to get something to eat until I was able to stop working and escort her to the nearest restaurant. It turned out that she was afraid of the minority peoples of Brooklyn rising up against her and tearing her limb from limb if she stepped foot outside her hotel –or if not of dismemberment by crazed mob maybe getting mugged a little bit.

My mother’s ideas about how awful it would be to have to walk around in Brooklyn by herself are possibly similar to my own ideas about how awful it would be to have to fight to the death like *Mad Max vs Master Blaster in the Thunderdome, two men enter, one man leaves!!

My mother was raised in NYC by white, upper middle class people and she knows Manhattan really well but back when she last actually lived here, around 1977, people did not go to Brooklyn unless they needed to dispose of a body. Now that that is what Staten Island is for, I’ve been trying to convince her that 2010 Brooklyn is pretty nice.
I mean, I’m not saying Brooklyn is totally crime-free but it has come a long way from the way it used to be. At least we in Brooklyn don’t murder people and stuff their bodies into cardboard boxes and leave them by the park …or at least not as often as we used to! (I’ve always wondered how many poor choices you have to make in life before you end up dead in a cardboard box by the park or if it’s something you can avoid by eating vegetables and exercising enough.) But anyway it’s been absolute AGES (October 2008 was 2 whole years ago!) since anybody and especially a little old **white lady from UTAH was murdered and stuffed into a cardboard box!

Actually, if you read anything about Brooklyn these days you’d think that its is full of people who enjoy living in fancy renovated brownstones while working as restauranteurs or architectural designers or making sure their ***outfits,tattoos,fauxhawks,artist/singer/writing slash bartendering careers are way cooler than yours.

When I found out what was really stopping her from wanting to come I told her she was completely wrong!

Here is what she wrote in response [Direct Quote]:

I’m just not used to that neighborhood you live in. I went to graduate school for three years in a high crime lower class black neighborhood on the south side of Chicago. Very scary. There were muggings, apartments cleaned out, rapes in the library. I walked around with a tire iron for protection. I once almost got my purse snatched by a group of young girls. To me from the outside your neighborhood looks similar. Don’t forget you did have that jewelry stolen. I just assumed that it is a high crime neighborhood. You say no. That’s good.

What? Comparing 2010 Fort Greene to Chicago in the 60’s?! You can’t even compare 2005 Fort Greene to 2010 Fort Greene! And the record, I was also robbed during the year I lived on 27th and 7th avenue. Mr. Robber was still in my place when I came home, demanded cash while holding me at knife-point and left with my brand new Sony Sportsman instead since I and my roommates had little else of value to steal and I certainly didn’t want to give him my last 20 bucks.
Curiously, I was never robbed during the year I lived on 3rd st between C & D (in the early 90’s this was as bad as living on (enter the name of the worst street you can think of) what with all the open heroin use and drug dealing.

At the time of my conversation with mom, I did not live in an all-white neighborhood and maybe that’s a scary place to visit to somebody like my mother who lives in a 98% white state in a 100% white neighborhood. But I don’t think it’s at all intellectually responsible to immediately assume that going into mostly black neighborhoods means you’re going to get mugged. And I got pretty mad at her for assuming she would.

You’re probably going to get mugged on Adelphi if you are trying to get your dealer on your BlackBerry at 4 in the morning. You’re probably going to get your purse lifted if you leave it in your shopping cart at Target and look the other way for a second because at the Atlantic Mall you really have to be on your toes! Your fancy SUV is probably going to get broken into if you leave it parked overnight on Flushing, esp. any block between Navy and Washington. Patrol cars from the 88th precinct are scarce, you probably won’t see any cops until they are called out. This is not a Crime Free city! So Mom isn’t totally out of her gourd to be apprehensive. Thing is she wouldn’t be doing any of the previously mentioned activities, she’d be staying at the new NuHotel on Smith St as described by the Observer [Direct Quote]:

The 93-room, newly built hotel, owned and operated by Hersha Hospitality and designed by Datumzero Design Office, is located on stylish Smith Street and sits squarely at the intersection of four intriguing Brooklyn neighborhoods: Downtown Brooklyn, home to the Brooklyn Academy of Music, the Courthouses, and the offices at MetroTech Center; Boerum Hill, where streets are lined with elegant brownstones and French bistros; Cobble Hill, a blend of old-world shops, bakeries and gardens; and Carroll Gardens, an old-fashioned Italian neighborhood with wide streets, chic restaurants and antique shops. Together, these areas possess all the requisites for a unique, insider’s experience.

Basically, that corner of Smith street is quite nice– just like the corner of Fulton and Greene is really nice and Dekalb and Clermont,too. Lots and lots of places about 5 blocks from my house are actually as nice or nicer than any block you have on the Upper West Side– as nice as they are they are far outside my price range. It always makes me laugh how people seem to resent you a little bit for living in a “bad neighborhood” as if you’re doing it to spite them and not because you’re slightly less rich than you’d like to be. In the decades I’ve lived in New York I have never been able to afford to live in a good neighborhood. I’m not complaining about it because I’ve preferred to look on the positive side: living in various poor neighborhoods has allowed me to be able to afford to live in New York while at the same time not having to miss out on the amenities available in nicer neighborhoods that aren’t that far away.

On a serious note:
The most hard hit victim of mugging crime was a Pratt student 2 years ago.
Around the same time there were reports of groups of teenagers surrounding victims and kicking and punching them and grabbing anything they could from them.
My boyfriend and I witnessed an attack like this on one of our neighbors who lives in the same building we do. It was about 5 teenage boys against one man. We ran out of our apartment to help him while calling 911 but his attackers had run off. Again, not a Crime Free city. Where is this Crime Free city? I probably wouldn’t be able to afford to live there even if it existed.

Update 2018: reading this article I wrote in 2010 in 2018 made me cringe a little bit (some word choices were tone-deaf, or outright insensitive) and so some words and phrases have been updated, deleted or changed. I didn’t mean to equate “nice” with “mostly white” but that is how this could be interpreted and for that, I apologize.

* Mad Max Beyond Thunderdome – Mel Gibson,Tina Turner – George Miller and George Ogilvie (directors) – Warner Bros – 1985
** My mother made the choice to be a white lady from Utah about 30 years ago.
*** The Moderne Hipstur, Piggelswerth-Wagstaff (pub.1924) .

@#$% SSL Image file breaking SSL connection on my latest project

I’ve been working on a new project customizing another Xsilva Lightspeed Web store with WordPress integration because that has been my ultimate goal and everything has been going along perfectly except it came down to testing the SSL connection for the customer registration and checkout pages (these 2 urls auto redirect to https:// if you turn SSL on in the admin panel). Well, the addressbar would start off a beautiful deep blue and the lower right hand of the locationbar lock icon would load but when it was all done zam! Lock icon broke, blue address bar disappeared. Nooooo.

The 1st thing I did to troubleshoot was make all links use / instead of http:// even though you can use http in urls that are not scripts or images. Then I took out some of my WordPress footer widgets,thinking it might be the Twitter Pro widget or something, but nope. Then I thought why not check all the media files with Tools >> Page Info >> Media? But every media file listed began with https:// so I closed the Page Info window and went back to work but it kept nagging me.These 2 pages must be secure, no way around it. So I opened Tools >> Page Info >> Media again and clicked on each image url to get the preview and there was the culprit, the default search icon -even though I did not want to use it it was being loaded into the page anyway. I’d loaded my own image folder to use in my stylesheet to reduce the clutter a bit and I did not have a search_go.png yet. So even though the path to the file was redirecting correctly to SSL, because it returned a 404, the secure connection was breaking.

The developers of Web Store give us a lot to work with but oftentimes some things are out of our hands. Things like input value and in this case image src are coded into the the template like this:
[php]<span style=""><?= $this->misc_components[‘search_img’]->Render(); ?></span>[/php]
Src file searchbox.tpl.php
Thankfully this is the easiest thing to fix, I just uploaded my search_go .png and it overwrote the default. Then I clicked back to my register page and this time the SSL connection remained alive! Who would have thought it could be something so small causing this much trouble?

Cufon.replace Even When Text Is Loaded by AJAX or jQuery

Recently I was confronted with a challenge: how to get the text of a heading that was being inserted with jquery+livequery to be replaced with Cufon.

The dilemma: Cufon couldn’t replace the text and it remained the plain, default typeface.

Luckily for me the last post this forum thread reported a way to fix it. Their solution was specific to the task they were trying to accomplish but it was simple to figure out how to re write to solve my problem.

If you are using Cufon already you’ll be familiar with this:

[php]Cufon.replace(‘h2.title’, { fontFamily: ‘greatfont’ });[/php]

If you’re familiar with jQuery you’ll be familiar with this, too:

[php]$("h2.title").livequery(function() {
$(this).text($("#breadcrumbs li:last-child").text());})[/php]

What I had to do was combine each into one function as a separate call from my other Cufon.replace code.
[php]$("h2.title").livequery(function() {
$(this).text($("#breadcrumbs li:last-child").text());
Cufon.replace(‘h2.title’, { fontFamily: ‘greatfont’ });
})[/php]

As added insurance I placed this right before the closing body tag:
[js]<script type="text/javascript">Cufon.now(); </script> [/js]

Add a Facebook Like Button to Your Xsilva Lightspeed Webstore Product Details Template

This tutorial demonstrates one method of getting the Facebook like button into your product detail tpl using XFBML which is Facebook Markup Language.
Difficulty: Medium
Requirements: You must be able comfortable editing webstore template files.

First configure your Like button . Hint, don’t reduce the size too much than the default which is 450. Much more information is available on the button configurator page.

Next make a backup of these 2 webstore template files:index.tpl.php and product_detail.php so that if you massively mess up you can just upload them and things will go back to normal.

We can add 2 of the 3 Open Graph tags required by Facebook because we have the code for dynamic meta titles. Open index.tpl.php in a text editor like Text Wrangler, find *@ lines 69 to 72 “@” in case you have made changes and line numbers have changed.

[php]<?php global $strPageTitle; ?>
<?php if (isset($strPageTitle)): ?>
<title><?= _xls_get_conf(‘STORE_NAME’, _sp(‘Shopping cart’)); ?> : <?php _p($strPageTitle); ?></title>
<?php endif; ?>[/php]

I reversed the order from the default phrasing because it’s good SEO to place the Page,Category or Product Title before the Site Title (Store Name in this case) but I digress.

[php]<?php global $strPageTitle; ?>
<?php if (isset($strPageTitle)): ?>
<title><?php _p($strPageTitle); ?> | <?= _xls_get_conf(‘STORE_NAME’, _sp(‘Shopping cart’)); ?> </title>
<meta property="og:title" content="<?php _p($strPageTitle); ?> | <?= _xls_get_conf(‘STORE_NAME’, _sp(‘Shopping cart’)); ?> "/>
<?php endif;?>
<meta property="og:site_name" content="Put Your Store Name Here"/>
[/php]

There’s one other og tag but I haven’ t figured it out, yet anyway here it is:

[html]<meta property="og:image" content="" />[/html]

Template files for the most part display product photos as background images which makes it trickier to do this one.The product slider you see on Custom Pages does use inline html photos but there is no access to the code that generates the HTML for the sliders… excuses excuses, I apologize. 2 out of 3 ain’t bad.

Moving on, we have to paste some Javascript into the bottom of the index.tpl.php template – I put mine before the last 2 lines of this file:
[js]<script src="http://connect.facebook.net/en_US/all.js"></script>
<script>
FB.init({
status : true, // check login status
cookie : true, // enable cookies to allow the server to access the session
xfbml : true // parse XFBML
});
</script>
<?php $this->RenderEnd(); ?>
</html>
[/js]

Edit alert !

Totally forgot about SSL on checkout and that http://connect.facebook.net/en_US/all.js index.tpl.php will break the security of the checkout page. Silly me. Not having time enough to write a solution on the spot – a simple solution is to host the file yourself, just download the file and upload it to the assets/js folder on your server. Then change the script src to “assets/js/all.js” and you’re good to go. Self hosting this file means that we have to keep an eye out for updates,though.

Now we can move on to putting the button in our product_details.tpl.php template. When it comes to advising you where in product_detail.php you can paste this code there are certain difficulties but here is where I recommend placement for an Unedited Deluxe product_details.tpl.php @ line 90, 89 is where the product description tag is. It makes sense to add the like button near the description.

[php]<p><?php $this->lblDescription->Render() ; ?><fb:like href="http://www.myawesomesite.com/index.php?product=<?php echo ($this->prod->Code) ?>" layout="button_count" show_faces="false" width="400" action="like" font="arial" colorscheme="light" /></p>[/php]

Yes, right in the paragraph tag! What an outlaw.