Skydrv-hotlink

A plugin that converts links to skydrive documents into direct download links. Simple to use, unobtrusive, adds convenience for users.

Author:Dino Chiesa (profile at wordpress.org)
WordPress version required:3.2
WordPress version tested:3.9.40
Plugin version:2014.07.03
Added to WordPress repository:06-06-2012
Last updated:04-07-2014
Warning! This plugin has not been updated in over 2 years. It may no longer be maintained or supported and may have compatibility issues when used with more recent versions of WordPress.
Rating, %:0
Rated by:0
Plugin URI:http://wordpress.org/plugins/skydrv-hotlink/
Total downloads:2 599
Active installs:10+
plugin download
Click to start download

skydrv-hotlink is a WordPress Plugin.

Onedrive is a cloud-based storage service offered by Microsoft, accessible at http://onedrive.com . It’s free. It works nicely and integrates well with Microsoft Office and Windows. Previously it was known as Skydrive.

One problem is that Onedrive does not easily provide direct-download links for the files located on onedrive. Suppose you would like to share a document that exists on your Skydrive. You click the “share” button, and Skydrive gives you a link which you can then embed into any web page.

But, that link is not a direct-download link for the file you intend to share. The actual download link will be embedded within that page. Clicking the “share” link provided by onedrive takes the user to onedrive, where they need to click another link to download the document.

This is fine, but perhaps not as convenient as it could be for users, in some cases.

This plugin allows a wordpress blog to eliminate that extra hop.
It automatically convert links to Onedrive documents into direct-download links.

The way it works:

  1. You login to Onedrive.

  2. Select the file you would like to share.

  3. Click the “share” button. (see screenshot #1)

  4. Copy (ctrl-C) the link for that particular file. Don’t use the URL shortener. The link should look something like this:

https://onedrive.live.com/redir?resid=842434EBE9688900!1169&authkey=!AA4kWNcMStEjSUg&ithint=file%2c.pptx

or like this:

https://onedrive.live.com/redir?resid=842434EBE9688900!1123

  1. Insert an anchor tag into one of your wordpress posts or one of your
    wordpress pages; specify that value as the href. It should look like
    this:

< a src=’https://onedrive.live.com/?id=842434EBE9688900!1123&cid=842434ebe9688900#’
class=’skydrv-hotlink’>Download the file</ a >

The markup is regular HTML markup, but the anchor must be decorated with the special class ‘skydrv-hotlink’. (see screenshot #2)

  1. When the actual page or post is rendered, the plugin will transform the href into a direct-download link. The transformed href will look something like this:

https://pszy1q.bay.livefilestore.com/y1p…many characters…Qgg/Dino%20Chiesa%20-%20Resume.docx

When the user clicks that link, it will download the file directly.

Note: The direct-download link has a limited lifetime, so you should not retain it indefinitely. In fact that is the entire reason this plugin exists. Set the cache period for the plugin to set the lifetime of any link. Generally, I’ve found that links are good for at least an hour.

Dependencies

  • This plugin relies on jQuery.
  • Therefore the user viewing your wordpress blog must have browser side Javascript enabled.
  • The publisher of the target document must have a Onedrive account.
  • The wordpress host must allow outgoing http connections. (true in most cases)
  • WordPress must be configured to enable curl. (true in most cases)
  • PHP should have mcrypt enabled. If not, operation of the plugin is less secure.

Thanks

Thanks for your interest!

You can make a donation at http://dinochiesa.github.io/Skydrv-hotlink-Donate.html

Check out all my plugins:
https://wordpress.org/extend/plugins/search.php?q=dpchiesa

-Dino Chiesa


Screenshots
FAQ
ChangeLog