Monday, October 1, 2012

How to add your picture to your search listings

If you have recently seen your Google search results include pictures/avatars before the listing, and wondered how to add those to the listing for your site, the answer is simple fairly simple.
  1. Create a Google+ page. 
  2. Add a profile picture that you are not too embarrassed to have associated with your listing.  It should include your pretty face.
  3. Add the site that will feature your content to the "contributor to" section of your Google+ profile. Edit that here: http://plus.google.com/me/about/edit
  4. Add a tag to the HEAD section of the web page that will be appearing in the results.  It should include the href for your Google+ profile page. So for example, you can add

You can verify that everything is correct using the Structure Data Testing Tool (Rich Snippets).



Monday, August 27, 2012

Adding form varibles to Uploadify / Uploadifive

I started using this very nice script (Uploadify) to allow users to upload files to our server. One problem I found was that you can not add other inputs to the upload except at form load time. I found this to be annoying. And while there are some workarounds, I thought it wasn't as good as simply adding all the form sibling inputs to the upload. So, I modified the source code to allow uploading the sibling inputs.

If you find the lines here:
// Add the rest of the formData

for (i in settings.formData) {

      formData.append(i, settings.formData[i]);

}

And add in this code:
var parentform = $('#' + settings.id).closest('form');

$(parentform).find('input[type="text"], input[type="hidden"], select, textarea').each(function() {

    formData.append(this.name, this.value);

}

);


It will automatically add other (non-file) form inputs to the upload data.

Tuesday, August 21, 2012

New York Sales Tax Calculator VBSCRIPT

After having searched Google for hours to find a New York State tax rate calculator by address, I finally wrote this piece of code to scape the correct value from the NYS tax web site.

I thought I would share this with the world.