Giter Club home page Giter Club logo

modx-instagram-latest-posts's Introduction

MODX Revolution: latest posts from Instagram

This snippet allows us to get the latest posts from any Instagram user.

N.B.! Please take into account, 12 latest posts can be returned only as it's limited by Instagram.

Property Description Default
&accountName Instagram account name
&limit Set the limit on the maximum number of items that will be displayed 6
&showVideo Do we need to show the video as well? Available options: 1, 0 0
&innerTpl Inner chunk name Instagram-Inner
&outerTpl Outer chunk name Instagram-Outer
&errorTpl Error chunk name Instagram-Error
&cacheEnabled Do we need to cache the data from Instagram? Available options: 1, 0 1
&cacheExpTime Set the cache expiry time in seconds 3600

Installation

Please download the package "InstagramLatestPosts" via MODX Package Manager or from MODX Extras and install it

OR

Follow the steps below

  1. Create the snippet called InstagramLatestPosts and copy the snippet code there
  2. Create three chunks with the following names
  • Instagram-Outer
  • Instagram-Inner
  • Instagram-Error
  1. [optional] You can modify the chunk names above; if you do that please specify these names in the snippet parameters
  2. Copy the corresponding HTML code to the chunks above
  3. [optional] You can modify the chunk code as well; if you do that please use the following placeholders:
  • Instagram-Outer
Placeholder Description
[[+accountUrl]] The link to the Instagram profile
[[+items]] The items returned from Instagram
  • Instagram-Inner
Placeholder Description
[[+link]] The direct link to the corresponding post
[[+type]] The type of the item; it can have two values only: image, video
[[+url]] URL of the image or video depending on what you want to show
[[+user.profile_picture]] URL of the user avatar
[[+user.username]] Instagram account name
[[+user.full_name]] Full name of account
[[+caption]] Post caption
  • Instagram-Error
Placeholder Description
[[+error]] The error explaining the issue
  1. Place the snippet call in MODX where it's needed
[[!InstagramLatestPosts? &accountName=`nike`]]
  1. Modify the properties if you like as shown below

Usage

[[!InstagramLatestPosts?
	&accountName=`nike`
	&limit=`10`
	&showVideo=`1`
	&innerTpl=`MyInnerTemplate`
	&outerTpl=`MyOuterTemplate`
	&cacheEnabled=`1`
	&cacheExpTime=`1800`
]]

modx-instagram-latest-posts's People

Contributors

igorsuhinin avatar mishantrop avatar ig0r74 avatar

Watchers

James Cloos avatar Andrey avatar

Forkers

rgkenga

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.