Git Product home page Git Product logo

funkstagram's Introduction

Funkstagram: A Wordpress plugin by Funkhaus
      ___ _   _ _  _ _  __
     | __| | | | \| | |/ /
     | _|| |_| | .` | ' <
     |_| _\___/|_|\_|_|\_\
     | || | /_\| | | / __|
     | __ |/ _ \ |_| \__ \
     |_||_/_/ \_\___/|___/

Summary:

Funkstagram is a simple Instagram image importer for Wordpress. Pick users and/or tags and automatically load images into the Wordpress media library.

Features:

  • Import images for multiple users
  • Filter user images by tag
  • Custom post status (Draft|Pending-Review|Published) for each image
  • Import all Instagram images for a specific tag
  • Attach all imported images to a specific page
  • Runs automatically every 10 minutes, no cron job needed

Instructions for use:

  1. Download Funkstagram Master and unzip
  2. Move entire folder into plugins folder in Wordpress install, and activate through the admin interface
  3. Navigate to settings page at Tools > Funkstagram
  4. Put in Instagram API key. If you don't have one, register a new client at: http://instagram.com/developer/register/
  5. Select a page from the drop-down to attach all imported images to. If no page selected, photos will go straight to the media library with no parent
  6. If you plan to use the image status feature, set a default status for the images to import as.
  • Note: This won't change anything unless your theme is setup to use this feature. The status feature is particularly useful when you don't have full control over what images are being imported (i.e. importing all images tagged #awesome.) Status gives you an extra layer so images can be approved in the backend before showing up on the front.
  1. If importing by user, add usernames or user IDs into the Users to import field.
  2. Enter any tags into the Filter by tags field. If importing by user, only images with these tags from those particular users will be imported. If no users are specified, all images posted to Instagram with those particular tags will be imported.
  • Note: If importing by tag only and the tag is not specific enough, you will end up with a lot of images being imported
  1. Click save changes and then click the Import Now button to test importing. This may take a while if importing a large number of photos.
  2. When Import Now finishes, a log will appear at the bottom of the page. If 0 errors were returned, and images were successfully imported then check the enable auto-import box at the top of the screen and save changes. Images will now be imported automatically.
  • Note: If you would rather use a UNIX Cron to run the import rather than a Wordpress cron, use this URL format: http://example.com/wp-admin/admin-ajax.php?action=funkstagram_import

Videos:

When Funkstagram encounters a video post, it will automatically import the thumbnail of the video into the media library just as it does with all photo posts. For videos however it will also assign metadata to the attachment with the key instagram_video_url and the value will be the URL of the video as hosted on instagram's servers. If you'd like to support video playback on the front-end of your site, just check for any instagram_video_url values while you're looping through the imported images and use the URL to provide playback in whatever way you prefer.

Using statuses in your theme:

Using the image status feature, all images will be given a custom status, defaulting to 'draft'. The status of each image can be changed in the media library, or from within an Insert Media popup page. In this way images can be approved before they show on the front of the site, but first a loop needs to be set up that queries for published images only. This can be acheived by using the fgram_status meta key. An example loop might look like the one below:

$args = array(
	'post_parent'		=> $post->ID,					
	'post_type'       	=> 'attachment',
	'post_mime_type'  	=> 'image',
	'posts_per_page' 	=> -1,
	'meta_key' 			=> 'fgram_status',
	'meta_value' 		=> 'published',
	'post_type' 		=> 'attachment'
);
$images = get_posts($args);

This will load all imported images into the $images variable. You can then loop through and display them as you see fit.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.