Download the PHP package tkiehne/silverstripe-tumblrfeed without Composer
On this page you can find all versions of the php package tkiehne/silverstripe-tumblrfeed. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download tkiehne/silverstripe-tumblrfeed
More information about tkiehne/silverstripe-tumblrfeed
Files in tkiehne/silverstripe-tumblrfeed
Package silverstripe-tumblrfeed
Short Description Tumblr API module for SilverStripe.
License CC0 1.0 Universal
Informations about the package silverstripe-tumblrfeed
Tumblr Feed Module
Silverstripe module to load Tumblr feeds via Tumblr API V2
Maintainer Contact
- Tom Kiehne ([email protected])
Requirements
- Silverstripe 3.x
Installation
Usage
-
Add to your
mysite/_config/config.yml
to extend the object of your choice:or set the following call in
mysite/_config.php
: - Build and flush using
/dev/build/?flush=1
- Add Tumblr API keys and blog name via Admin > Settings > Tumblr tab (Register your application to get your API keys)
- Place and Include call in your template (see below for options), e.g.:
Call Methods and Options
All Posts
Proxy Methods for Specific Post Types
Single Post by ID
Options
- limit = number of posts to show, from 1 to 20 (API max limit)
- offset = number of posts to skip
- type = name of post type to retrieve (see below)
- options = array of API options
- tag = name of a tag to filter by (single tag only)
- text = boolean flag; return plain text (true) or html markup (false, default) in text fields
- id = numeric Tumblr post ID
Templates
By default, the TumblrPosts.ss
include will call subsequent includes depending on post type. To customize the list container, override or create a copy of TumblrPosts
. To customize the way that posts are displayed within the container, override the respective Tumblr[TYPE]Post.ss
or, if you've customized the container, create your own include.
Include variables follow the syntax and structure of the Tumblr API, based on the "posts" collection of the response. See the module's default includes for examples and be aware of template context.
Caching
This module uses SS_Cache to reduce the amount of API requests. Default cache lifetime is 30 minutes.
You can change this value by putting this line in your _config.php
(1800 is cache lifetime in seconds):
SS_Cache::set_cache_lifetime('tumblr_api_cache', 1800, 10);
Dependencies
Uses the official Tumblr API v2 PHP Client