Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

A tumblr feed processor for jquery

branch: master

Fetching latest commit…

Octocat-spinner-32-eaf2f5

Cannot retrieve the latest commit at this time

Octocat-spinner-32 assets
Octocat-spinner-32 sass
Octocat-spinner-32 .gitignore
Octocat-spinner-32 CHANGELOG.md
Octocat-spinner-32 LICENSE-GPL.md
Octocat-spinner-32 LICENSE-MIT
Octocat-spinner-32 README.md
Octocat-spinner-32 config.rb
Octocat-spinner-32 jquery.tumblr.js
README.md

jquery-tumblr

jquery-tumblr is a plugin that parses a tumblr feed and outputs markup.

It was inspired by the work of Chris Tran however realy bares no resemblance to his code.

Note that the markup generated is similar to that of tumblr's default theme however posts are enclosed in ul/li tags rather than just div's.

Example

<div id="loading">Loading...</div>
<div id="posts"></div>
<div id="pagination"></div>
    <script type="text/javascript">
    $(document).ready(function () {
        $('#posts')
            .tumblr({
                url:        'http://blog.thehiddenventure.com',
                pagination: '#pagination',
                loading:    '#loading'
            });
    });
    </script>

Url

You must the url of your tumblr blog. Note that if you have set a custom domain in tumblr, you should use this as the value you set.

  • url: your tumblr url (ie. http://(YOUR NAME).tumblr.com or http://(YOUR NAME CUSTOM DOMAIN).com )

Options

Pagination

  • pagination: A selector that specifies where the pagination will reside. If one does not exist, pagination is disabled.
  • perPage: The number of posts to return. The default is 20, and the maximum is 50.
  • start: The post offset to start from. The default is 0.
  • paginationOptions: Other options to pass to jquery_pagination - See https://github.com/gbirke/jquery_pagination

Appearance

  • loading: A selector that specifies a element that can be shown when loading content from tumblr.
  • photoSize: The photo size to use, accepted values are 75, 100, 250, 400, 500 and 1280. Default is 400.
  • videoSize: The video size to embed, accepted values are 250, 500 or false. If false, the tumblr 'video-player' parameter will be used.
  • timeago: If true (default) then jquery-timeago will be used for post dates.
  • shortLength: For captions and titles that are less than this length the css class 'short' will be added. Default is 50.
  • mediumLength: For captions and titles that are less than this length the css class 'medium' will be added. Default is 100.
  • fancybox: If true (default) then fancybox will be used when there are multiple photos. See photoThumbSize and photoLightboxSize
  • photoThumbSize: If there are multiple photos, they will be output in a ul/li tags, this value will be the size of image used. Accepted values are 75, 100, 250, 400, 500 and 1280. Default is 75.
  • photoLightboxSize: If there are multiple photos, this image size will be used for lightbox. Accepted values are 75, 100, 250, 400, 500 and 1280. Default is 1280.

Network

  • timeout: Ajax timeout defaults to 5000

Optional Requirements

  • jquery_pagination - is needed if you want pagination. Until an issue with jquery_pagination is resolved then you should use my fork
  • jquery-timeago - is needed if the timeago option is true (default).

License

Copyright (c) 2011 Alex Hayes Dual licensed under the MIT and GPL licenses.

Something went wrong with that request. Please try again.