Git Product home page Git Product logo

silverware-flickr's Introduction

SilverWare Flickr Module

Latest Stable Version Latest Unstable Version License

Provides a component to show a series of tagged photos from a Flickr account in SilverWare apps.

Contents

Requirements

Installation

Installation is via Composer:

$ composer require silverware/flickr

Configuration

As with all SilverStripe modules, configuration is via YAML. You may modify the default endpoint and timeout for the API via YAML:

SilverWare\Flickr\API\FlickrAPI:
  default_endpoint: https://api.flickr.com/services/rest
  default_timeout: 10

Before this module can be used, you will need to create a Flickr API key. Once you have created your API key, you can define it for your app in one of two ways:

  • via site configuration (Settings tab)
  • via YAML configuration file

This module will add a Flickr tab to the Services tab under SilverWare in your site settings. You can paste your API key into the 'Flickr API Key' field.

Alternatively, you can add your API key to YAML config for your app:

SilverWare\Flickr\API\FlickrAPI:
  api_key: <paste the key here>

The key defined in site configuration will take precedence over the YAML key.

Usage

This module provides a FlickrPhotosComponent for use within your SilverWare templates and layouts.

After creating the component, you may enter the Flickr User ID (also known as the NSID) for the component using the CMS. The Flickr User ID is typically in the format 12345678@N01. In addition, you can define a series of comma-separated tags in order to show only photos with those tags.

On the Options tab of the component, you may change any of the default options, which include:

  • Number of photos
  • Thumbnail size (in pixels)
  • Tag mode: all or any (determines whether to show photos with all tags, or any tag)
  • Title mode: none, title or footer (for lightbox popups)
  • Logo width (in pixels)
  • Link title
  • Cache duration (in seconds)

Resulting photos are cached between requests to avoid unnecessary API calls. Any time you change either the User ID, photo tags, or tag mode, the component will automatically clear the cache. Flushing the site will also clear the photo cache.

Issues

Please use the issue tracker for bug reports and feature requests.

Contribution

Your contributions are gladly welcomed to help make this project better. Please see contributing for more information.

Maintainers

Colin Tucker Praxis Interactive
Colin Tucker Praxis Interactive

License

BSD-3-Clause © Praxis Interactive

silverware-flickr's People

Contributors

colintucker avatar

Stargazers

 avatar

Watchers

 avatar  avatar

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.