Ted Leung on the air: Open Source, Java, Python, and ...
I've just updated the comments plugin for PyBlosxom with changes for the upcoming PyBlosxom 1.2. If you are working off the CVS HEAD version of PyBlosxom, you can get the new versions here (or via CVS).
This is a drop in replacement for the existing plugin and will add the nofollow attribute to all <a> tags in the description of the comment. If your comment template (usually
comment.html) includes a link supplied by the comment poster then you should add a
rel="nofollow" attribute to your template
In Pyblosxom 1.1 (coming soon), we've decided to unbundle plugins from the distribution. I've been merging a bunch of changes that people have made to the comments plugin. The new plugin is available here.
If you are already using the comments plugin, there is a significant change to the behavior. You will need to modify your comments-story.html template to have just the content that should appear between the end of story.html and comment.html. This will typically be a
<div class="blosxomComments"> tag. If you see the body of your entry twice, you didn't modify the comments-story template.
Here's a list of the changes:
- Comment previews [ Bill Mill ]
- Users can configure the plugin to force all new comments into a "draft" mode where they have to be manually "published". Set
py['comment_draft_ext']to a filename extension. New comments are given this extension and must be renamed to have the regular comment_ext in order to published
- Add a comment rejection callback allowing people to write their own comment rejection plugins. [ Will Guaraldi ]
- Add $message variable so that users can see what happened to their comment: whether it was rejected, whether it was successful, whether it's in draft mode, ... [ Will Guaraldi ]
- Stop stomping templates [ Will Guaraldi ]
- Rich HTML mail notifications [ Roberto De Almeida ]
I spent a bunch of time over the last few days trying to see if I could coax better performance out of my blog. Some of you have probably noticed (or complained) that the blog is pretty slow. This is mostly due to the fact that I'm dynamically rendering the blog for almost 1200 entries. Here are the things that I've done so far:
- Move the comments directory out of the datadir -- this reduced the number of files that needed to be stat'ed by about 1400
- Turn on entry caching (my testing shows that entryshelve is faster than entrypickle. YMMV
- Implement a simple cache for tools.walk_internal that removes the redundant datadir scans caused by pycategories, pyarchives, and pycalendar
Also, somehow Planet Pyblosxom didn't make it into NetNewswire (fixed) so I wasn't seeing some of the pyblosxom related discussions that have been going on outside of the developer's mailing list. Will has been holding down the fort, but newcomers Bill, and Rob have some good ideas. I've been seriously contemplating switch my blog to WordPress due to the performance issues, but since things have improved a lot with only a small amount of effort, I think I'm going to spend some more energy trying to get pyblosxom to go faster. WordPress 1.3 doesn't look like it's showing up soon, and I'm not desperate enough to learn PHP so I can help/extend WordPress.
<a href="http://www.technorati.com/cosmos/search.html?rank=?mtcosmos&url=$base_url/$yr/$mo_num/$da%23$fn" title="Technorati Cosmos">I've also added my del.icio.us bookmarks to the sidebar...
<img src="/blog/images/bubble.gif" alt="Other blogs commenting on this post" />
- Added a logger and locking code
- Overhauled the xmlrpc system
- Added the verify_installation code
- Added handle callback
- Added Atom 0.3 flavour
- Overhaul of code base to fix concurrancy issues
- Added support for Metaweblog API
- Bug fixes, security fixes, and optimizations
firstname.lastname@example.org To: email@example.com From: firstname.lastname@example.org Subject: PyC(5D9A983C,url)dlq9F UeFb8RE4XhzEn6 9dwVwadJWbqLXc2EjtIcmkc9Q7f1aeAnNqR .the entire thing gets sent to the SMTP connection as the body of the e-mail. The updated plugin wraps To: From: and Subject: in the comment body in html tags, so a comment that has that data in it will still display, but will be illegal as SMTP commands.