Photos from Facebook

Use your Facebook photo galleries on your WordPress-based site.

This past summer, I built a simple WordPress-based website for a friend of mine’s business. A designer/developer wanted $8K to build the site and he just couldn’t see spending that much money. While I know that the site I built for him isn’t nearly as polished as what the designers would have created, it certainly meets his primary needs: to provide basic information about his business to people who need it. You can see and judge for yourself here.

WordPress is an excellent tool for building Web sites. What I like about it is that once the site has been set up with the design and features needed, anyone with Admin access can modify its contents. That means that when he has a price change or hours change or some other change, he can go in and change it for himself. No need to bug me or wait for me to get around to it.

But what’s even better than that is the multitude of plugins available to add or enhance content.

Here’s an example. My friend has had a Facebook presence for some time now and his company is “liked” by a considerable number of people. They frequently check in to see what’s new. Yesterday, I helped him add about 10 photos of some work he’s been doing. The photos on Facebook were a big hit with his Facebook friends. I wanted to add the photos to his website. I poked around the plugin directory at WordPress.org and found one called Facebook Page Photo Gallery. This was even better than I’d hoped: it would take the photos I’d already uploaded to Facebook and present them on his WordPress-based site.

I decided to test it here before I went live on his site. I soon discovered that it works only with public photo galleries on Facebook — which meant it would not work with my personal Wall photos. (It probably would if I could figure out how to tweak the settings on Facebook, but I really don’t think it’s worth the bother.) It would, however, work with the Wall photos for Flying M Air‘s Facebook page. And it worked very well, as you can see here:

[fbphotos id=427099432352 limit=12 rand=1]

Did you notice that when you point to an image, it displays the caption?

This is a huge time-saver for me. Rather than have to re-upload and arrange the photos on the website, I can enter a WordPress shortcode with a few variables and a wonderful image display is created automatically. What else could I ask for?

How to Disable Hot Linking to Images

Roll up your sleeves and prepare to edit your .htaccess file.

Important Note:
Messing with your Web site or blog’s .htaccess file is very dangerous. Indeed, if you make an error, the entire site may stop working. Keep that in mind when using these instructions. I will not be held responsible for any problems that result from using this code.

Hot linking is when another Web site links directly to images or other files that reside on your Web server to embed them in their own Web pages or make them accessible to their own site visitors. For example, someone may like an image on your Web site that he/she wants to show off on his/her own. Rather than linking to the page on your site that displays the image, they might use the HTML IMG SRC tag to embed the image on their own site.

There are two problems with this:

  • In many cases, because the image actually appears on the other site, visitors are led to believe that the image belongs to that site’s owner — instead of you. Sometimes the other site owner might provide credit or even a link back to your site. But often times he/she does not. In my book, that’s image theft.
  • Because the image still resides on your server, each time the image is viewed on the other site, your server is required to serve up the image. That uses up your bandwidth. Obviously, if this happens a lot, you might see a slow-down in your site’s response time or your hosting company may begin to charge additional bandwidth fees. In other words, you’re paying to host images on someone else’s site.

The best way to stop hot linking is to modify your site’s .htaccess file to include code that prevents it. In researching this problem, I found several different collections of code. The one that I wound up using as a basis for my final code (shown below) can be found at “How to Disable Hot Linking” on the Online Marketing Blog.

Here’s my code:

RewriteEngine on
RewriteCond %{HTTP_REFERER} !^$
RewriteCond %{HTTP_REFERER} !^http://(www.)?mydomain.com/.*$ [NC]
RewriteCond %{HTTP_REFERER} !google. [NC]
RewriteCond %{HTTP_REFERER} !search?q=cache [NC]
RewriteRule .(jpg|gif|png|pdf)$ http://myotherdomain.com/images/StopStealing.jpg [R]

Here’s how it works:

RewriteEngine on

Enables mod_rewrite.

RewriteCond %{HTTP_REFERER} !^$

Allows requests made directly for the image without a referrer. You would include this line if you wanted to allow requests from browsers and other sources without referrers. (I commented out this line in my file, but may allow it.)

RewriteCond %{HTTP_REFERER} !^http://(www.)?mydomain.com/.*$ [NC]

Allows requests made from your Web site. Obviously, you’d replace mydomain.com with your domain.

RewriteCond %{HTTP_REFERER} !google. [NC]
RewriteCond %{HTTP_REFERER} !search?q=cache [NC]

Allows requests made from Google and search engines. If you don’t want your images to appear in search results, don’t include these two lines.

RewriteRule .(jpg|gif|png)$ http://myotherdomain.com/images/StopStealing.jpg [R]

Prevents images with .jpg, .gif, and .png extensions from appearing on pages with any other referrer. Instead, it shows the image shown here.

If you don’t want to include the image, you can use this line instead to result in a broken image icon:

RewriteRule .(jpg|gif|png)$ - [F]

Keep in mind that using this approach will prevent images from appearing in feed readers, too, so it’s not a good idea if you share your images with others via RSS.

Of course, to add or modify a .htaccess file, you need to know how. That’s beyond the scope of anything I’ll ever write. These instructions assume you already have some idea of how to do this. If you want to learn more about using .htaccess to control access to your Web site, be sure to check out this tutorial.

One more thing…please don’t expect me to help you debug your .htaccess file. Believe me, I know only enough about .htaccess to be dangerous; you would be better off without my help. Good luck!

How to Install Raw Camera Update 3.5 without Buying iPhoto ’11 or Aperture

And why you might want to do that.

I recently purchased a Nikon D7000 camera as an upgrade from my nearly 4 year old Nikon D80. (What an upgrade!) It was part of my attempt to improve my photography by using better equipment. Another part of that was shooting in raw and using processing tools like those available in Photoshop to fine-tune my images.

NEF in FinderI shot my first bunch of images last week and was very surprised to find that the raw images, which have Nikon’s .NEF file extension, did not appear with preview images in the Finder (shown here). I also could not use Quick Look, or open the raw images in any application on my Mac.

The reason this surprised me is that I could see, preview, Quick Look, and open the .NEF images created by my Nikon D80.

I did some research and discovered that the raw format is camera specific — a fact I’d kind of known all along — and I set out to find the software update that would allow me to see them. I was rather surprised that I’d missed the update, since I use Software Update and generally install all updates, whether I need them or not. I assumed I’d somehow skipped this particular update.

Raw 3.5 UpdaterI found the Digital Camera Raw Compatibility Update 3.5, which included support for the D7000, on Apple’s Web site, downloaded it, opened the disk image (DMG) file, and started the installation. The splash screen clearly stated that the updater added raw camera compatibility for a handful of new cameras to Aperture 3 and iPhoto ’11. I didn’t have either one of these installed. I don’t own Aperture — I’ve been using Photoshop forever — and I hadn’t yet updated to iPhoto ’11 from iPhoto ’09. But I assumed that an Apple update would add support to Mac OS X 10.6.6, which was installed on my Mac, so at least I’d be able to see previews of NEF images in the Finder.

Can't InstallMy third surprise (if you’re keeping count) came when the installer told me it could not install the software. The message made it clear that I needed to have Aperture 3 or iPhoto 9 (confusingly, this is the version number for iPhoto ’11, not iPhoto ’09) installed to install the update.

I was stuck.

I did more research and discovered an alternative method for viewing previews and using those Nikon D7000 raw images. More on that in another post.

But then I discovered a workaround for the installation problem. Apple offered a free Aperture 3.1 trial on its Web site. Several Twitter friends had recommended Aperture and I was interested in giving it a try. So I downloaded the trial version and installed it.

You can probably guess what’s coming. Because I now had Aperture 3.1 installed, I could also install the Digital Camera Raw Compatibility Update 3.5 software. I ran the installer and it successfully installed on my hard disk.

Quick Look NEFAfter running Aperture once — just to make sure my Mac knew I had it installed — I went back to the Finder folder full of NEF images from my D7000. Still no icon previews, but I think that’s because my Mac expected to open them in Photoshop CS3, which did not support the D7000 NEFs either. But when I selected an image and used Mac OS X’s Quick Look feature (Command-Y), the NEF preview appeared in the Quick Look window.

Oddly, a preview icon also appeared for some (but not all?) of the NEF files in the photos folder on the SD card. I’m not sure why only some of them were affected, but they were the later ones. Maybe they’ll all show up as icons the next time I insert this disk? When I copied the folder to my hard disk, all the NEF files appeared with preview icons.

So I guess I can say that I set out to do what I wanted to do. I can only assume that the support for NEF file icon previews will continue even if I decide not to buy Aperture and remove it from my computer.

Did this help you? Can you add anything to help me or others? Use the comments link or form to speak up. Just don’t attempt to start a Nikon vs. Canon debate; I don’t think that would add any useful information to the discussion.

Photoshop CS3 and Mac OS 10.6.3 Potential Problems

Having a problem? This might help.

After updating my Mac to Mac OS 10.6.3, I found that I could not successfully open Photoshop CS3. Although the program would go through what seemed like the entire startup process, it would unexpectedly quit right before it opened a document. There was nothing I could do to prevent this.

Needless to say, I was not a happy camper.

I started troubleshooting with a Google Search. Two pages were particularly helpful:

  • http://discussions.apple.com/thread.jspa?threadID=2382232&tstart=0 This thread on the Apple discussions forum contains 167 answers (so far) to the problem experienced by a user. As with most forums, the posts go off-topic to suggest Photoshop alternatives and attempt to place blame on either Apple or Adobe. If you have the time and patience to wade through the posts, however, you’ll discover several potential fixes.
  • http://kb2.adobe.com/cps/834/cpsid_83499.html This TechNote on Adobe.com gets to the meat of the matter without having to wade through a bunch of off-topic nonsense.

Apparently, the problem concerns all Adobe CS3 products and possibly some other software. It did not affect my copy of InDesign CS4.

Adobe provides three possible solutions. I’ll present them here in the order I think you should tackle them.

Disable Opening with Rosetta

Adobe suggests that you turn off the “Open Using Rosetta” check box in the Info window for Photoshop CS3 (or any other program that might be experiencing the problem. In the Finder, select the application’s icon. Then choose File > Get Info or press Command-I. In the General area of the Info window, turn off the check box labeled Open using Rosetta. Close the Info window. This was not the source of my problem, so I can’t verify whether this will help.

Obtain a New Serial Number

Adobe claims that the problem might have something to do with an invalid serial number registered for the computer. This is most likely to happen if your computer was serviced by Apple, perhaps to replace the logic board or some other major component. Per Adobe:

When launching Adobe CS3 applications on Apple’s Mac OS 10.6.3, the applications crash, or quit unexpectedly. This only occurs on systems where the system serial number is a value with more than 12 characters. This appears to only be the case when the system serial number doesn’t have a valid number, but instead has a value such as “System Serial#”, or “SystemSerialNumb”.

About this MacHow do you find the serial number registered by your computer? The easiest way is to choose Apple > About This Mac to display the About this Mac window for your computer. Click the Version number info right under where it says Mac OS X twice. The Version number will change to the Build number and then to your serial number as it is registered inside the computer.

When I originally read this and checked it against my serial number, I did not think this was my problem. After all, Adobe says it happens with serial numbers “more than 12 characters” in length. Mine was 11 10. And that was my problem. When I had my logic board replaced about a year and a half ago, the Apple genius entered an invalid serial number for the new logic board. He basically left out one character. Something in the Mac OS X 10.6.3 update triggered a serial number validation routine in CS3 products. When it came up with an invalid serial number, it refused to run Photoshop CS3.

The solution is not one you’ll like if you don’t have an Apple store nearby. This morning, I’ll be driving 50 miles to get the correct serial number entered into my Mac by a “genius.”

Revert to Mac OS X 10.6.2 or Earlier

Adobe suggests this as the first alternative. Downgrading operating system software is never something I recommend as a first option. After all, eventually you’ll have to upgrade again. Why not try to fix the problem if you can?

But if you can’t fix the problem any other way, downgrading to Mac OS X 10.6.2 might be the way to go. You can find instructions for downgrading at http://support.apple.com/kb/HT2597.

Are You Having This Problem?

If you’re having this problem, I’d like to hear from you. What software was affected? How did you resolve the problem? Add your comment to this post.

Please limit your comments to this topic. Rants against Apple or Adobe or suggestions on what software is better than Photoshop will not be approved.

My Geotagging Workflow

How I add GPS coordinates to my photos.

A while back, I decided I wanted to include the GPS coordinates in the EXIF data for my photos. Because my cameras (a Nikon D80 and a Nikon CoolPix something-or-other) don’t have built-in GPS features or communicate via bluetooth (or any other method) with a GPS, I have to manually attach the GPS coordinates to the photos.

I say manually, but I do this with software that automates the process. (I’m not a complete idiot.) Still, there’s a slightly convoluted workflow to get this all together. I thought I’d outline it here for two reasons:

  • Some blog readers might be genuinely interested. I’m not the only photo-snapping geek around.
  • By documenting this, I can look back, years from now, and see yet another example of how technology changes to make things easier and how I solved a “problem.”

So here’s the workflow rundown. I skipped the nitty gritty details to keep it short. (I read somewhere that people don’t like to read long blog posts.)

Step 1: Acquire the Photos

GlobalSat BT-335Bluetooth GPS w/ ChargersWhen I go out to do photography, I take minimal equipment. I don’t like to carry a bunch of stuff. But one of the things I do take with me (other than my camera) is a GPS data logger. I bought a GlobalSat BT-335 Bluetooth GPS Data Logger. I made my choice after lots of research, including this excellent review on bioneural.net. Three things sold me:

  • Price. It’s $69.95 on Amazon.com.
  • Size. It’s small and lightweight.
  • Connectivity. It’s Bluetooth, so I don’t have to deal with cables. (I hate cables.)

As an added bonus, when paired with my MacBook Pro, it puts live GPS data on my computer. Which is kind of cool, even though I currently have no use for this capability.

I’m not saying you should go out and buy this. I’m just saying that I did and I’m very satisfied. And while I certainly welcome comments that suggest other models, my choice has been made, so please don’t try to sell me on your solution.

A GPS data logger like the BT-335 does one thing, and it does it well. It keeps track of where you’ve been by recording GPS coordinates and corresponding times. It stores all this data inside itself with virtually no user interface. I attach it with a wrist strap I bought at a camera store to my camera’s shoulder strap. Before I start shooting photos, I turn it on and it does its thing. I basically forget all about it.

So when I go out to do photography, I turn on my GPS data logger and use my camera to take pictures. Pretty simply stuff, no?

It’s important to note here that the time on my camera must be right — at least within 10-20 seconds (if I’m on the move) or 1 to 2 minutes (if I’m moving more slowly). I check it against my computer’s clock (which is set by atomic clock) and adjust it a few times a year. The GPS data logger gets its date/time information from the GPS satellites.

Step 2: Get the Data and Photos on the Computer

The next step is to get all of the GPS data and the photos onto my computer.

LoadMyTracksAlthough GlobalSat has a perfectly fine utility for getting the data off its unit and onto a Mac, I use the freeware application, Load My Tracks. I tell it I’m using a GlobalSat DG-100 and because the unit is paired to my computer, it finds it. I can then download tracks into either GPX (which I need) or KML format. I download both — heck, why not? — into the folder where I’ll soon be downloading the photos. I then erase the data logger so I don’t have extra track points in it the next time I use it.

Next, I use a card reader with Image Capture, which comes with Mac OS X, to download all photos from my camera into the folder where I saved the track logs. They don’t have to be in the same folder, but I like it that way. Nice and neat. And it makes it easy to back up the logs with the photos.

Now I’ve got the GPS data and photos on my computer.

Step 3: Match GPS Coordinates to Photos

Next, I launch GPSPhotoLinker, another freeware application. I use the Load Tracks button to load up the GPX data file for the photo shoot. Then I use the Load Photos button to load all the photos I took during the shoot. I go into batch mode, which has my settings saved from the last session, and click Batch Save to Photos.

GPSPhotoLinker uses my settings and the data to write the GPS coordinates, including altitude, to each photo. It displays a progress bar as it works. When it’s done, the Latitude and Longitude for each photo appears in the appropriate columns in the list of photos. Here’s what it looks like while it’s working. (Yes, I took pictures of very big, red rocks.)

GPSPhotoLinker In Action

As for the big, red rocks, you can find them here. (But it seems to be off by a 10-20 feet; maybe it’s time to adjust the camera time again.)

Step 4: Backup

After losing a hard disk for the third time two years ago, I have become fanatical about backing up my data. After importing photos and linking the GPS data to them, I burn them onto a CD or DVD (depending on the capacity needed). When the burn is done, I check the CD or DVD to make sure it functions properly. Then I apply a label with the date and some descriptive information and file the CD or DVD in a box with a bunch of others.

I format the memory card for my camera in my camera to clear it out completely.

I then feel good about deleting photos off my hard disk, adding them to iPhoto, or modifying them in Photoshop or some other image editing too.

Sounds Like a Lot of Work?

It really isn’t a lot of work. It’s a whole workflow thing. Do it enough times and you can do it quickly. Steps 2 through 4 take about 15 minutes from start to finish.

That’s my flow for geotagging. What’s yours? Got a camera with a GPS or GPS connectivity built in? Please do brag about it by adding a comment here. I’d love to learn more.