|Version 34 (modified by anonymous, 7 years ago) (diff)|
Trac Blog Plugin
A blogging system for Trac.
If you have any issues, create a new ticket.
Download the zipped source from here.
Please do not bother with the 0.3 branch. It is known to not work. It is a work in progress. When it is ready, it will be moved out of the branch directory.
TracBlogPlugin will work with the current trunk and 0.9.x
If using 0.9.x it may be necessary to install the TagsPlugin and the WebAdmin plugin globally instead of the project's plugin directory. This is due to the need for those plugins to load before the TracBlogPlugin loads. Unfortunately, 0.9.x does not support plugin dependencies, so the only way to get it to work properly is installing the above plugins globally via:
# python setup.py install
An indication that this may be the case is if a message similar to the following is displayed
... resolve raise DistributionNotFound(req) # XXX put more info here DistributionNotFound: TracWebAdmin
Install in the same manner as any other Trac plugin:
# python setup.py bdist_egg # cp dist/*.egg /srv/trac/env/plugins
If the TracBlogPlugin is installed system wide, then you will need to enable the plugin in your trac.ini:
[components] tBlog.* = enabled
If you want only the blog to be your frontpage instead of the wiki, in trac.ini:
[trac] default_handler = TracBlogPlugin
nb: Using the TracBlogPlugin as the default_handler is a non supported, non recommended usage. But it has been known to work.
Otherwise, if you want to integrate the blog into your wiki, use the following examples in conjunction with regular WikiFormatting:
- Displays a blog based on tags The list of tags to be shown can be specified as arguments to the macro. If no tags are specified as parameters, then the default 'blog' tag is used.
The following options can be specified:
union - Specify whether the join for the tags listed should be a union or intersection(default).
num_posts - Number of posts to display.
year - Year for which to show posts.
month - Month for which to show posts.
day - Day of the month for which to show posts.
delta - How many days of posts should be shown.
mark_update - Specify whether to show "Updated on" for posts that have been updated.
hidecal - Hide the calendar (when set to true).
If specifying dates with year, month, and/or day, the current value is specified if missing. For example, if day is specified but year and month are not, then year will be filled in with the current year and month will be filled with the current month. If only year and month are specified, then that indicates the whole month is desired.
The num_posts options is bounded by the date options if combined. For example, if num_posts=5 and month=4 is specified, it will show up to 5 posts from the month of April. If only 3 posts exist, then only 3 are shown. If a date option is not specified, then it will show the last num_posts posts.[[BlogShow()]] [[BlogShow(blog,pacopablo)]] [[BlogShow(blog,pacopablo,union=True)]] [[BlogShow(blog,pacopablo,num_posts=5)]] [[BlogShow(blog,pacopablo,month=4,num_posts=5)]] [[BlogShow(blog,pacopablo,year=2006,month=4)]] [[BlogShow(blog,pacopablo,year=2006,month=4,day=12)]] [[BlogShow(blog,pacopablo,delta=5)]] [[BlogShow(blog,pacopablo,delta=5,mark_updated=False)]] [[BlogShow(blog,pacopablo,num_posts=3,hidecal=true)]]
- Inserts a link to create a new blog post
Accepts keyword arguments that specify default parameters. The macro will be hidden unless the user has BLOG_POSTER permissions.
tag - Tag that populates the "Tag under" field. This key may be specified as a tuple or list to pass multiple values.
blogtitle - Default blog entry title.
text - Default entry body text.
pagename - Default wiki page name.
readonly - Default readonly page status.
link - Text to display as the link.
[[BlogPost()]] [[BlogPost(tag=(blog,pacopablo))]] [[BlogPost(tag=blog,blogtitle="A Simple Title",text="Body Text")]] [[BlogPost(tag=blog,pagename=blog/newpage,readonly=1)]] [[BlogPost(tag=(blog,pacopablo),link="A New Blog Post")]]
[blog] date_format = %x %X ; format string in strftime format page_format = %Y/%m/%d/%H.%M ; format string in strftime format default_tag = blog ; comma separated list of tags post_size = 1024 ; number of bytes to show before truncation history_days = 30 ; number of days of blog entries to show new_blog_link = New Blog Post ; default value for new blog post link
If you use TracBlog, please post a link to your blog:
- DWTs Heavy Industries
- PHPUnit GSoC '07 Dev Blog
- Casa de Pacopablo
- The Seventh Game: Precursors
- SwapOff.org Personal blog of Alec Thomas
- voidblog.de Christian Aust
- betatim's blog Personal blog of Tim Head, betatim
- OpenSysAdmin.com Daniel Joseph Barnhart Clark
- Maia Mailguard Anti-spam software
- MockSoul Devblog Vadim Burmakin personal blog
- plumi.org Video sharing plugin for Plone.
-  by pacopablo on 2008-04-15 18:14:15
Added patch from retracile to include wiki:BlogHeader? in the top of the blog page.
-  by pacopablo on 2008-03-15 15:12:07
More 0.11 porting
-  by pacopablo on 2008-02-13 08:52:05
- Refs #1111 - First big push towards porting to 0.11
- The blog entry window has mostly been finished.