Blogs API

| Last edited: 1/14/2010

Display Mode: Auto

Depending on the URL, auto will either produce a list of blogs, a list of blog entries for a particular blog or a single entry. See the blog howto page for more information on this.

Display Mode: List

Depending on the parameters of the monklet or getContent, 'list' will produce either a list of blogs or a list of entries. See the blog howto page for more information on this.

Display Mode: Cloud

This will display a tag cloud consisting of all the tags used for a blog.

Parameters

All parameters apply to the entries list page.

name

Only for display:list and cloud, will display a list of entries for that blog. Use name:none to get a list of all blogs. Use name:all to get a list of posts from all blogs.

Example:

"name:blog-title-slug",

features

Only show items published as featured.

Example:

"features",
Monklet Example:

features="features"

nonfeatures

Only show items not published as featured.

Example:

"nonfeatures",

Monklet Example:nonfeatures="nonfeatures"

howmany

Sets the maximum number of items to display

Example:

"howmany:3",

offset

Skips the first X records returned

Example:

"offset:1",

find_category

Only show items assigned to that category. Limited to one category.

Example:

"find_category:category-slug",

find_group

Only show items assigned to that group. Can find multiple groups with a comma separated list. Uses group slugs.

Example:

"find_group:group-slug1,group-slug2,group-slug3",

find_group_type

Only show items assigned to groups of a certain type. Does not override find_group.

Example:

"find_group:Small Group",

find_author

Only show items assigned to that author.

Example:

"find_author:author-slug",

page

For pagination, in a getContent (not required for monklets) this parameter is a good idea to prevent the cache from getting 'stuck' on the first page. Using 'nocache' also works.

Example:

"page:".$_GET['page'],

querystring

For pagination, will add to the end of the querystring of the pagination links. Any existing items in the querystring will automatically be added to the pagination generated links querystring.

Example: "querystring:author=bob&category=bible"

find_authors

Displays a list of authors for a blog. Uses  show_authorlist tags.

example:

"find_authors:yes",

find_tag

Finds all posts with that tag or tags. Spaces in tags should be replaced with a dash (-).

Example:

"find_tag:tag-slug,tag-slug2",

order

Sets sort order of items in list

itemdescription
recent by date, starting with most recent
title
by entry title, alphabetically
groupby

Sets a criteria to group the list by. This will produce an unordered list (<ul>) with the relevant titles as the list itmes (<li>). With recent, it will show the last 5 entries (can be changed with "howmany").

Available grouping criteria:

  • author
  • category
  • month
  • recent

Example:

"groupby:author",

tagmin

Only for display:cloud. Will only display tags that have been used X amount of times.

Example:

"tagmin:3",

URL Parameters 

All URL based parameters require display:auto

http://www.site.com/blog-slug/entry-slug/

This will display a detail page for an entry. "show_detail" tags will be used.

http://www.site.com/blog-slug/

This will display a list of entries for the blog. "before_show_postlist","show_postlist", and "after_show_postlist" tags will be used.

http://www.site.com/anything-other-than-a-blog-slug/

On any other page a list of blogs will be shown. "show_bloglist" tags will be used.

http://www.site.com/blog-slug/archive/11-2007/

Will display all entries from that month and year

http://www.site.com/blog-slug/category/category-slug/

Will display all entries from that category.

http://www.site.com/blog-slug/author/author-slug/

Will display all entries from that author.

http://www.site.com/blog-slug/authors/

Will display all list of authors for a blog. Uses "show_authorlist".

API

Blogs List 

If no blog is specified in the URL or through "name", show_bloglist tags are used.

show_bloglist
TagDescription
__blogtitle__
 Title of the Blog
 __blogdescription__  Description of the Blog
 __blogtitlelink__  Produces /blog-slug/
 __bloglastpost__  A link to the latest entry for this blog
 __bloglastposttext__  The complete text of the latest entry
__preview__

A shortened version of the text. HTML is stripped. Defaults to be no more than 250 characters. Can be specified with __preview limit='120'__

__blogrss__  The URL of the RSS feed for this blog

Blog Detail / Entry List

If the URL or 'name' specifies a blog, the following tags are available.

before_show_postlist,after_show_postlist

The same tags are availabel for before_show_postlistand after_show_postlist

 

TagDescription
 __blogtitle__  Title of the Blog
 __blogdescription__  Description of the Blog
 __blogslug__  Slug for the blog
 __blogrss__   The URL of the RSS feed for this blog
__blogcategory__ If find_category is used, displays that category
__pagination__ Divides the records into smaller groups and provides links to navigate through them
THE FOLLOWING TAGS ARE ONLY AVAILABLE FOR DETAIL OR IF find_author IS USED IN LIST MODE.
 __blogauthor__ Author tags are only available if find_author or /blog-slug/author/author-slug/ is used.

Displays the name of the author
__blogauthorslug__ The slug of the author
 __blogauthorcount__  The number of posts for that author
 __blogauthorimage__  The image for that author
 __blogauthorbio__  The bio for that author
__blogauthorusername__ The username of the author

 

show_authorlist

If find_authors or /blog-slug/authors/ is used. show_postlist tags will not be available if show_authorlist tags are used.

 

TagDescription
 __blogauthor__ Displays the name of the author
__blogauthorslug__ The slug of the author
 __blogauthorcount__ The number of posts for that author
 __blogauthorimage__ The image for that author
 __blogauthorbio__ The bio for that author
__blogauthorusername__ The username of the author

 

show_postlist

 

TagDescription
__blogtitle__ The title of the blog
__blogslug__ The slug of the blog
__blogtext__ The description of the blog
__blogposttitle__ The title of the entry
__blogpostslug__ The slug of the title
__blogtitlelink__ Produces /blog-slug/entry-slug/
__blogpostdate__ Formattable date. Use __blogpostdate format='j/m/Y'__ a complete list of tags is available
__blogsummary__ The summary of the blog post.
__blogauthor__ Author of the blog
__blogauthorslug__ The slug of the author
__blogauthorusername__ The username of the author
__preview__ A shortened version of the text or summary if available. HTML is stripped. Defaults to be no more than 250 characters. Can be specified with __preview limit='120'__.
__blogcommentNumber__ Formatted 'Comments(1)'
__blogcommentNumberonly__ Just the number of comments
__tags__ Comma separated list of tags for the post
__taglinks__ A list of tags as links. Use __taglinks url='blogs/tags/'__ to modify path. Defualts to '/blogslug/tags/'
__category__ The category assigned to the entry
__categoryurl__ Produces '/blog-slug/category/category-slug/
__categorylinks__ A list of categories as links. Use __categorylinks url='blogs/categories/' separator=' - '__ to modify path and the separator. Defaults to '/blogslug/category/' and ', '.
__blogemail__ Produces a mailto link with a link to the the entry in the message body. 
__blogpostpermalink__ The permanent link to the entry

 

Entry Detail

If the URL specifies a blog and an entry the following tags are available.

show_detail

 

TagDescription
__blogtitle__ The title of the blog
__blogslug__ The slug of the blog
__blogtext__ The description of the blog
__blogsummary__ Summary of the post
__blogrss__  The URL of the RSS feed for this blog
__blogposttitle__ The title of the entry
__blogposttitleslug__ The slug of post title
__blogpostdate__ Formattable date. Use __blogpostdate format='j/m/Y'__ a complete list of tags is available
__blogauthor__ Author of the blog
__blogauthorslug__ The slug of the author
__blogauthorusername__ The username of the author
__blogauthorimage__ The image for that author
__blogauthorbio__ The bio for that author
__blogcommentNumber__ Formatted 'Comments(1)'
__blogcommentNumberonly__ Just the number of comments
__blogcommentList__ A preformatted list of comments
__loginlink__ Use __loginlink linktext='Login'__ to change detault text
__tags__ Comma separated list of tags for the post
__taglinks__ A list of tags as links. Use __taglinks url='blogs/tags/'__ to modify path. Defualts to '/blogslug/tags/'
__category__ The category assigned to the entry
__categoryurl__ Produces '/blog-slug/category/category-slug/
__categorylinks__ A list of categories as links. Use __categorylinks url='blogs/categories/' separator=' - '__ to modify path and the separator. Defaults to '/blogslug/category/' and ', '.
__blogpostpermalink__ Preformatted list of comments with text box to add new comments

 

before_show_comments,after_show_comments

TagDescription
__loginlink__ Use __loginlink linktext='Login'__ to change detault text
__commentNumber__ Formatted 'Comments(1)'
__commentNumberonly__ Just the number of comments

show_thanks_comments

Sets the message that appears after a comment is left. There are no tags for the thanks message.

show_comments