I decided to write a post to describe the features of the plugins that I wrote, and upgrades that I made to existing plugins to others can benefit from their use as well. You can see the actual source code, or else read my feeble descriptions.
User Comments by
Jon Daley:
Description: This plugin lets me have
this page
where you can show all comments by a particular user.
getHttpGetVar("user")
There is probably a better place for this function to live, but I needed it, so put it here. On my page, I use a form to allow people to pick which user's comments they want to see. You could use this to get any variables that are on the URL via the standard ?var1=val1&var2=val2
getCommentingUsers(based=BLOG)
This function will return an array of usernames who have commented on the posts. The input is either 'SITE' or 'BLOG', where 'BLOG' is the default. I actually haven't tried the 'SITE' option, since I only have one plog with comments.
getComments(username, maxcomments=all, based=BLOG)
Given a username, this function will return an array of comments posted by that user. If you only want a certain number of posts returned, set maxcomments to that number. See above function for description of the based parameter.
getArticle(article_id)
This function also seems like it should exist somewhere else, but I didn't see it anywhere. It returns an Article object given an id number.
Authentication by
Daniel Kehoe:
Description: This plugin lets me have more links when I am logged in, rather than just a visitor. As far as I remember, I didn't change this plugin.
posterIsLoggedIn(posterId)
Given a userid, this function returns true if that poster is the current user.
getPosterName(posterId)
Returns the name of a poster given his id.
getUserName(void)
Returns the name of the current user
Blog Statistics by
Minstrel Chiu:
Description: This is how I get the statistics as to how many unique visitors on the
about page.
I fixed up some typos, as well as made the database accesses more efficient. Additionally, I commented the table creation code that is only needed the first time. If you want to use my copy of the plugin, you will need to uncomment it, at least for the first use.
lots of functions
There are really too many functions to comment on here, they are all pretty self explanatory by looking at the configuration code for the plugin.
Category Browser by
Jon Daley:
Description: My first plugin. This is how I get the previous/next/first/newest in category links for each post.
getPrevArticle(articleId, blogId)
Given a blog id and an article id, this function will return the previous article in the same category.
getNextArticle(articleId, blogId)
I'll bet you can guess how this one works...
getFirstArticle(categoryId, blogId)
Given a category id and blog id, return the first (earliest) post in that category.
getLastArticle(articleId, blogId)
I'll bet you can guess how this one works...
Google Highlighter by
The pLog Team:
Description: I fixed this one up from the original, so it works with google custom searches in addition to a regular search. When a user clicks on a link from google, this plugin will highlight their search times, so the words are easier to see. See the plugin for the usage.
Recent Comments by
Mark Wu:
Description: This plugin makes the "Recent Comments" section of the sidebar work.
getRecentComments(maxComments=20, based='BLOG')
Get an array of the most recently posted comments.
getCommentArticle(articleId)
This plugin, like the UserComments plugin, also needed a function to get an Article object given an article id. Sounds like this functionality should be added to templateUtils or something.
Top Read Posts by
Mark Wu:
Description: This guy makes the "Most Read Posts" section of the sidebar work, where you can list most popular posts.
getTopReadPosts(maxPosts=3, based='BLOG')
Return the maxPost most popular posts. Get them from the 'BLOG' or the 'SITE'.
Posted by
Jon Daley on
December 15, 2004, 6:46 pm
| Read 7233 times
Category
Programming:
[
first]
[
previous]
[
next]
[
newest]
Internet:
[
first]
[
previous]
[
next]
[
newest]
You can download the 0.3.2 versions if you want.
I don't expect any problems, but I haven't gotten around to verifying that it is fine.
Because of that, I only use RecentComments and CategoryBrowser. I will have to work on porting the rest later.
A bunch of this post is out-of-date anyway, since I am now running 1.1 on this installation.