Location: PHPKode > scripts > Latest Vines > latest-vines-widget/readme.txt
=== Plugin Name ===
Contributors: timwhitlock
Donate link: http://timwhitlock.info/donate-to-a-project/
Tags: twitter, vine, video, widget, sidebar
Requires at least: 3.5.1
Tested up to: 3.5.1
Stable tag: 1.0.5
License: GPLv2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html

Show off your latest Vines on your blog

== Description ==

Provides a sidebar widget that displays your latest Vine videos as playable thumbnails.

Connect your Twitter account to the plugin and the latest Vines you've tweeted will be pulled in.

Built by <a href="//twitter.com/timwhitlock">@timwhitlock</a> / <a rel="author" href="https://plus.google.com/106703751121449519322">Tim Whitlock</a>

Sponsored by [BRANDS ON VINE](http://brandsonvine.com)

See also [Latest Tweets](http://wordpress.org/extend/plugins/latest-tweets-widget/)

== Installation ==

1. Unzip all files to the `/wp-content/plugins/` directory
2. Log into Wordpress admin and activate the 'Latest Vines' plugin through the 'Plugins' menu

Once the plugin is installed you must bind it to a Twitter account as follows:

3. Register a Twitter application at https://dev.twitter.com/apps
4. Note the Consumer key and Consumer secret under OAuth settings
5. Log into Wordpress admin and go to Settings > Twitter API
6. Enter the consumer key and secret and click 'Save settings'
7. Click the 'Connect to Twitter' button and follow the prompts.

Once your site is authenticated you can configure the widget as follows:

8. Log into Wordpress admin and go to Appearance > Widgets
9. Drag 'Latest Vines' from 'Available widgets' to where you want it. e.g. Main Sidebar
10. Optionally configure the widget title and number of Vines to display.

== Frequently Asked Questions ==

= What does this have to do with Twitter? =

Vine doesn't have a public API [yet]. Most people tweet their vines, so this seems like a sensible place to pull them from.

= How can I style the widget? =

See the 'Other Notes' tab for theming information.

= How I do know what my OAuth settings are? =

These details are available in the [Twitter dashboard](https://dev.twitter.com/apps)

= What do I put in the third and fourth fields? =

Once you've populated the first two fields, just click the *Connect* button and follow the prompts.

= Why do I have to register my own Twitter app? =

Because I'm proving code, not a service. If I set up a Twitter app for this plugin I'd be responsible for every person who uses it. 
If Twitter closed my account or revoked my keys every instance of this plugin would break. Twitter also place limits on the number of users that can connect to a single app.

= I get SSL certificate errors =

You can disable SSL verification of twitter.com by adding this to your theme functions.php:  
`add_filter('https_ssl_verify', '__return_false');`  
Do so at your own risk.

== Changelog ==

= 1.0.5 =
* Critical [bugfix](http://wordpress.org/support/topic/fatal-error-on-version-104-in-frontend) 

= 1.0.4 =
* Library update and added translations

= 1.0.3 =
* Allow library coexist across plugins

= 1.0.2 =
Library update and readme edits

= 1.0.1 =
* Fix for IE 9

= 1.0.0 =
* Initial push to wordpress.org

== Upgrade Notice ==

= 1.0.5 =
* Fixes critical bug in 1.0.4. Upgrade essential,

== Theming ==

For starters you can alter some of the HTML using built-in WordPress features.  
See [Widget Filters](http://codex.wordpress.org/Plugin_API/Filter_Reference#Widgets)
and [Widgetizing Themes](http://codex.wordpress.org/Widgetizing_Themes)


This plugin contains no default CSS. That's deliberate, so you can style it how you want.

**Custom HTML**

If you want to override the default markup of the vines, the following filters are also available:

* Add a header between the widget title and the vines with `latest_vines_render_before`
* Render each thumbnail image with `latest_vines_render_thumb`
* Render each composite vine with `latest_vines_render_vine`
* Override the unordered list for vines with `latest_vines_render_list` 
* Add a footer before the end of the widget with `latest_vines_render_after`

Here's an **example** of using some of the above in your theme's functions.php file:

    add_filter('latest_vines_render_thumb', function( $url, $width, $height ){
        return '<img src="'.$url.'" width="145" height="145" class="my-thumb" />';
    }, 10 , 3 );
    add_filter('latest_vines_render_vine', function( $url, $img, array $meta ){
        return $url; // <- will use default
    }, 10 , 3 );
    add_filter('latest_vines_render_after', function(){
        return '<footer><a href="https://vine.co/me">More from me</a></footer>';
    }, 10, 0 );

Be warned that if you change the default HTML, you may break the JavaScript and have to override that too.

Return current item: Latest Vines