WordPress plugin: Completely Random Widget

 

During the process of (re)building this site in WordPress I was trying to come up with ideas for the sidebar. I used to have a widget that showed a random image from a folder, which was cool but a little limited. What if it could be expanded to pull an image from the entire internet? Introducing the Completely Random Widget. This is the first project I have submitted to the WordPress Plugin Directory. You can see it in action on the sidebar of this site. In essence it is a sidebar widget that uses Google images to find a totally random image from the web and display it on your site. You can check it out it’s page in the Plugin Directory, give it a try on your site! This site is running a custom version that archives each image that gets displayed, and I’ve set up a Random Image Archive Page so you can see every image that the widget has ever displayed on this site! Give this plugin a try and let me know what you think!

Embed YouTube videos as HD

[UPDATE: I’ve updated this post and it is working as of 3/7/2014]

Recently I was helping out with the Customer Dish learning center where we needed to embed some HD YouTube videos. We wanted to embed them as HD so the user did not have to hit play and then select the better quality. Turns out the hd=1 option does not work anymore, the new player automatically selects the ‘best’ resolution for the size of the embed, which is 480p or lower when your embed size is less than about 850px wide.

But there’s good news! There’s a parameter you can add to the embed code to preselect which resolution to play at. The user still has the option to change it but it will start playing at the preselected value.

Here’s how:

  1. Go to Share -> Embed on the video page
  2. Look for ?rel=0 in the src attribute of the embed code
  3. Add &vq=hd720 or &vq=hd1080 after ?rel=0
  4. Should look something like: src=”//www.youtube.com/embed/IA0pVPkBHjo?rel=0&vq=hd720

Now you should be good to go! Your videos will load in HD automatically and also have a full screen button.

A week of Facebook friends

So I was curious about when the best time to post something to Facebook was. So I created a script that spoofs my browser information and logs into Facebook. Then it scrapes the number of friends I have online from the chat bar at the bottom of the screen. The script runs every 5 minutes, 24-hours a day, and stores the number of friends I have online in a database.

I used the first week of readings to create the graph above. I find it fascinating! Every day follows the same basic shape with Monday and Tuesday seeing by far the most activity. Then it steadily decreases until the least popular day, Saturday. I’m really interested to see what next week looks like, will it be similar? I have posted the page that shows the real-time data here, so check it out if you want to see more!