Plugin Directory

Netflix-X2

Usage

For a deeper look into plugin options, please visit the plugin website. www.ericvb.com/wordpress-netflix-plugin

Quick and Easy

For quick and easy usage, configure the options from the Netflix-X2 section within the Wordpress administration panel, and then simply call the netflix function from within any of your wordpress files, such as sidebar.php.

Example:

<? netflix() ?>

Advanced Setup

For more advanced usage, there are more variables that can be set in the netflix function.

Example:

<? netflix($number_movies, $feed, $display_type, $image_size, $before, $after, $netflix_id); ?>

Options breakdown:

$number_movies - Number of feed elements displayed (default is 10)

$feed - Set which Netflix feed to use - Can be set to: * home- displays movies you have at home currently (default) * queue- displays movies in your queue in order * instant- displays movies from your watch instantly queue * recommendations- displays the movies Netflix has recommended for you * recent- displays your recent rental activity * reviews- displays the most recent movie reviews you.ve written

$display_type - What to display - Can be set to: * title- shows only the movies title (default) * image- display the movie cover image * both- shows both the title and cover image * raw- displays raw text from rss feed * description- displays the full review text if you use the reviews feed, displays the movie summary info for all other feeds. This includes the cover image. * textonly- displays the TEXT ONLY of whatever feed is chosen.

$image_size - If $type is set to "image" this defines the image size - Can be set to: * small- small image (64px X 90px) (default) * large- large image (110px X 154px)

$before - html appearing before each rss item (li, td, br tags for example)

$after - html appearing after each rss item

$netflix_id - your netflix id

Advanced Options Usage

For example, this code would display large images for the next 10 items in your queue in an unordered list:

<ul> 
<? netflix(10, "queue", "image", "large", "<li>", "</li>", "P9999999999999999999999999999"); ?> 
</ul> 

And this code would display the images and titles of the next 20 items in your watch instantly queue:

<ul>
<? netflix(10, "instant", "both", "large", "<li>", "</li>", "P9999999999999999999999999999"); ?>
</ul>

Additional Functions

<? netflix_movies($number_movies, $feed, $netflix_id) ?> 

get_id() - Displays the Netflix movie ID

get_title() - Get the movie title

get_link() - Get link to movie on the Netflix website

get_description() - Reviews RSS Feed: This function retrieves the review you.ve written. All other RSS Feeds: This function retrieves the movie summary.

get_textonly() - This displays only the text of whatever feed is being used. Embedded cover images are removed.

getcoverimage($size) - Displays the movie cover image (linked from Netflix.s site)

getcoverimage_source($size) - Gets the html link address for the cover image.

This example code of the netflix_movies function will show the last 8 movie reviews you wrote in a nicely formatted list:

<ul> 
<? $movies = netflix_movies(8, "reviews"); 
foreach ($movies as $movie) { 
echo '<li>'; 
echo '<strong>',$movie->get_title(),'</strong>'; 
echo '<br />'; 
echo $movie->get_description(); 
echo '</li>'; 
} ?> 
</ul>

One last example of code, this would select the next 25 movies from your queue, looping through them to display each cover image in a formatted html table.

<? $movies = netflix_movies(25, "queue"); 
echo '<table><tr>'; 
foreach ($movies as $movie) { 
echo '<td>'; 
echo $movie->get_cover_image(); 
echo '</td>'; 
} 
echo '</tr></table>';  ?>

Known Issues

If the Reviews RSS feed is unavailable (Netflix has the RSS feed down), the plugin may return an "invalid option" php error. Plan to add error checking code to at least not throw a php error.

Changelog

Version 1.2 * Adding "text only" options for feed display. This can be set in the plugin options screen, and can also be called directly by using the get_textonly() function. * Thanks to David McDonald - www.watchingred.com

Version 1.1 * Widgetized the netflix-x2 plugin. No configurable options yet though. * Added new display option "text" to the netflix function. This returns the user's written review if they have picked the reviews feed; and returns the movie description for any other feed selection.

Version 1.0 * Started with the original 3.1 version of Albert's plugin. * Added support for the Instant Queue RSS feed. * Added support for the Reviews RSS feed.

Roadmap

Future to do lists in upcomign releases.

  • Add configurable options to make the widget easier to use.

Contact

For any questions, concerns, or suggestions feel free to contact me by email: vanberge@gmail.com

Download

FYI

Compatibility beta

Your Setup

Log in to vote.

The Consensus

No data

Average Rating

5 stars
4 stars
3 stars
2 stars
1 star
(4 ratings)