Archive for October, 2006

Compact Archive: WordPress Plugin

Description

My blog has posts going back over 11 years and the archive of posts by month in my sidebar was getting very much out of hand. In the search for a more compact way of displaying the monthly archive a plugin was born.

Compact Archive displays the monthly archive of posts in two compact forms. It can be shown as a block suitable for the body of an archives page, e.g.:

2006: Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov Dec
2005: Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov Dec
2004: Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov Dec

or in an even more compact form to fit nicely in a sidebar:

2006: J F M A M J J A S O N D
2005: J F M A M J J A S O N D
2004: J F M A M J J A S O N D

Instructions

  1. Upload the whole plugin folder (Compact_Archive) to your /wp-content/plugins/ directory.
  2. Go to your Admin|Plugins page and activate Compact Archive.
  3. Put<!--?php compact_archive(); ?--> at the place in your template where you want it to appear, e.g., in your sidebar:
     
  4. You might want to adjust your style sheet to make the months with no posts fade into the background.

The template tag, compact_archive, has some parameters:

compact_archive($style='initial', $before='

  • ', $after='

 

‘);

If $style == ‘initial’ (the default) the display will fit into a sidebar.

If $style == ‘block’ the display will be wide enough to fill the main column of a page.

$before and $after wrap each line of output. The default values make each line of the archive into a list item.

 

The year link at the start of each line is wrapped in and months with no posts are wrapped in so you can differentiate them visually using your style sheet.

Compact Archive honours whatever kind of permalink WordPress is using and the month names and abbreviations are chosen in accordance with the language locale (WPLANG) set in wp-config.php.

Acknowledgements

The idea for this plugin comes from the SmartArchives plugin by Justin Blanton ( http://justinblanton.com/projects/smartarchives/). It is a rewrite of the ‘block’ half of his tag. I have added a very compact version that fits nicely in a sidebar.

Feedback

If you try this plugin leave a comment here to let me know how you get on.

10 comments October 29th, 2006

Recent Comments: WordPress Plugin

Update

13th January, 2007

Recent Comments Version 2.0.0 beta is now available. Largely rewritten, it includes better retrieval of comments, some new options and many more possible styles of display. Version 2 now has its own page where future developments will be documented.

Comments are now closed for this post but can be added to the new page.

Version 1.04 just fixes two bugs. The Posts plugin were not working if more than one was installed! Also some users were getting odd characters appearing where they shouldn’t.
Version 1.03 allows some parameters (like ‘before_title’) to be blank, or to be more complex, e.g., 'before_title=

. Also allows trimming an excerpt so it ends with a word or a sentence and not in mid-word. NB excerpt_length is now counted in characters and not words as previously.
Version 1.02 fixes bugs with the option to show static pages.
Version 1.01 fixes bugs with default settings when Similar Posts is not also installed.
Adds the skip parameter to ignore a number of posts at the head of the list.

 

Description

Simply displays a list of your blog’s most recently commented posts. Good for getting visitors to explore your site and interact.

This plugin was designed as a cousin to Similar Posts. It will work fine on its own but if Similar Posts is installed Recent Comments will take its settings from the Similar Posts options page.

Instructions

  1. Download the latest version of Recent Comments.
  2. Upload the whole plugin folder (Recent_Comments) to your /wp-content/plugins/ directory.
  3. Go to your Admin|Plugins page and activate Recent Comments.
  4. Putat the place in your WP loop where you want the list of recently commented posts to appear. By default the plugin wraps each post with
  5. and
  6. but that can be changed.
  7. The behaviour of the plugin can be adjusted in two ways. If Similar Posts is installed you can use its options page. Otherwise, a query-style parameter does the trick (see below).

Acknowledgements

Recent Comments was inspired by Scott Reilly’s excellent Customizable Post Listings plugin.

Under the Hood

The way the list of recent posts is displayed can be set from the Options|Similar Posts page (if it is installed). You can exclude certain categories of post, for example, or change the code that comes before and after the link.

These general options can be overridden in specific cases by passing a query-style parameter, e.g.:

<!--?php recent_comments('limit=10'); ?-->
lists the 10 most recently commented posts
<!--?php recent_comments('none_text=sorry&#038;show_static=false'); ?-->
lists the default number of posts, excluding static pages, and specifies what to display if there are none

If you do not specify an option its value is taken from the options page.
This means you can use the template tag in different ways in different places.

The full list of parameters is as follows (with the default value in parentheses):

limit
maximum number of posts to show (5)
skip
how many posts to skip before listing (0)
show_static
include static pages (false)
show_private
include password-protected posts (false)
excluded_cats
comma separated list of categories to exclude (by ID) (9999, the default means none)
excluded_authors
comma separated list of authors to exclude (by ID) (9999, the default means none)
none_text
what to show if no posts match–can be plain text or a permalink
before_title
what to show before a link ()
after_title
what to show after a link()
trim_before
remove the first instance of ‘before_title’ (false)
show_excerpt
include a snippet of the post after the link (false)
excerpt_length
how long an excerpt should be (50 characters)
excerpt_format
‘char’, the default, does nothing, ‘word’ trims the excerpt to the last full word, and ‘sent’ to the full sentence. If the excerpt would be trimmed to nothing no trimming is applied.
ellipsis
add ‘ …’ after the excerpt
before_excerpt
what to show before an excerpt ()
after_excerpt
what to show after an excerpt ()

Feedback

If you try this plugin leave a comment here to let me know how you get on.

8 comments October 26th, 2006

Recent Posts: WordPress Plugin

Update

13th January, 2007

Recent Posts Version 2.0.0 beta is now available. Largely rewritten, it includes some new options and many more possible styles of display. Version 2 now has its own page where future developments will be documented.

Comments are now closed for this post but can be added to the new page.

Version 1.04 just fixes two bugs. The Posts plugin were not working if more than one was installed! Also some users were getting odd characters appearing where they shouldn’t.
Version 1.03 allows some parameters (like ‘before_title’) to be blank, or to be more complex, e.g., 'before_title=

. Also allows trimming an excerpt so it ends with a word or a sentence and not in mid-word. NB excerpt_length is now counted in characters and not words as previously.
Version 1.02 fixes bugs with the option to show static pages.
Version 1.01 fixes bugs with default settings when Similar Posts is not also installed.
Adds the skip parameter to ignore a number of posts at the head of the list.

 

Description

Simply displays a list of your blog’s most recent posts. Good for getting visitors to explore your site.

This plugin was designed as a cousin to Similar Posts. It will work fine on its own but if Similar Posts is installed Recent Posts will take its settings from the Similar Posts options page.

Instructions

  1. Download the latest version of Recent Posts.
  2. Upload the whole plugin folder (Recent_Posts) to your /wp-content/plugins/ directory.
  3. Go to your Admin|Plugins page and activate Recent Posts.
  4. Put 

    at the place in your WP loop where you want the list of recent posts to appear. By default the plugin wraps each post with

  5. and
  6.  

    but that can be changed.

  7. The behaviour of the plugin can be adjusted in two ways. If Similar Posts is installed you can use its options page. Otherwise, a query-style parameter does the trick (see below).

Acknowledgements

Recent Posts was inspired by Scott Reilly’s excellent Customizable Post Listings plugin.

Under the Hood

The way the list of recent posts is displayed can be set from the Options|Similar Posts page (if it is installed). You can exclude certain categories of post, for example, or change the code that comes before and after the link.

These general options can be overridden in specific cases by passing a query-style parameter, e.g.:

<!--?php recent_posts('limit=10'); ?-->
lists the 10 most recent posts
<!--?php recent_posts('none_text=sorry&#038;show_static=false'); ?-->
lists the default number of posts, excluding static pages, and specifies what to display if there are none

If you do not specify an option its value is taken from the options page.
This means you can use the template tag in different ways in different places.

The full list of parameters is as follows (with the default value in parentheses):

limit
maximum number of posts to show (5)
skip
how many posts to skip before listing (0)
show_static
include static pages (false)
show_private
include password-protected posts (false)
excluded_cats
comma separated list of categories to exclude (by ID) (9999, the default means none)
excluded_authors
comma separated list of authors to exclude (by ID) (9999, the default means none)
none_text
what to show if no posts match–can be plain text or a permalink
before_title
what to show before a link ()
after_title
what to show after a link( 

)

trim_before
remove the first instance of ‘before_title’ (false)
show_excerpt
include a snippet of the post after the link (false)
excerpt_length
how long an excerpt should be (50 characters)
excerpt_format
‘char’, the default, does nothing, ‘word’ trims the excerpt to the last full word, and ‘sent’ to the full sentence. If the excerpt would be trimmed to nothing no trimming is applied.
ellipsis
add ‘ …’ after the excerpt
before_excerpt
what to show before an excerpt ()
after_excerpt
what to show after an excerpt ( 

)

Feedback

If you try this plugin leave a comment here to let me know how you get on.

26 comments October 26th, 2006

Random Posts: WordPress Plugin

Update

13th January, 2007

Random Posts Version 2.0.0 beta is now available. Largely rewritten, it includes some new options and many more possible styles of display. Version 2 now has its own page where future developments will be documented.

Comments are now closed for this post but can be added to the new page.

Version 1.04 just fixes two bugs. The Posts plugin were not working if more than one was installed! Also some users were getting odd characters appearing where they shouldn’t.
Version 1.03 allows some parameters (like ‘before_title’) to be blank, or to be more complex, e.g., 'before_title=

. Also allows trimming an excerpt so it ends with a word or a sentence and not in mid-word. NB excerpt_length is now counted in characters and not words as previously.
Version 1.02 fixes a bug with the option to show static pages.
Version 1.01 fixes bugs with default settings when Similar Posts is not also installed.
Adds the skip parameter to ignore a number of posts at the head of the list.

 

Description

Simply displays a list of posts chosen at random from your blog. Good for getting visitors to explore the depths of your site.

This plugin was designed as a cousin to Similar Posts. It will work fine on its own but if Similar Posts is installed Random Posts will take its settings from the Similar Posts options page.

Instructions

  1. Download the latest version of Random Posts.
  2. Upload the whole plugin folder (Random_Posts) to your /wp-content/plugins/ directory.
  3. Go to your Admin|Plugins page and activate Random Posts.
  4. Putat the place in your WP loop where you want the list of random posts to appear. By default the plugin wraps each post with
  5. and
  6. but that can be changed.
  7. The behaviour of the plugin can be adjusted in two ways. If Similar Posts is installed you can use its options page. Otherwise, a query-style parameter does the trick (see below).

Acknowledgements

Random Posts was inspired by Scott Reilly’s excellent Customizable Post Listings plugin.

Under the Hood

The way the list of random posts is displayed can be set from the Options|Similar Posts page (if it is installed). You can exclude certain categories of post, for example, or change the code that comes before and after the link.

These general options can be overridden in specific cases by passing a query-style parameter, e.g.:

<!--?php random_posts('limit=10'); ?-->
lists 10 random posts
<!--?php random_posts('none_text=sorry&#038;show_static=false'); ?-->
lists the default number of posts, excluding static pages, and specifies what to display if there are none

If you do not specify an option its value is taken from the options page.
This means you can use the template tag in different ways in different places.

The full list of parameters is as follows (with the default value in parentheses):

limit
maximum number of posts to show (5)
skip
how many posts to skip before listing (0)
show_static
include static pages (false)
show_private
include password-protected posts (false)
excluded_cats
comma separated list of categories to exclude (by ID) (9999, the default means none)
excluded_authors
comma separated list of authors to exclude (by ID) (9999, the default means none)
none_text
what to show if no posts match–can be plain text or a permalink
before_title
what to show before a link ()
after_title
what to show after a link()

trim_before
remove the first instance of ‘before_title’ (false)
show_excerpt
include a snippet of the post after the link (false)
excerpt_length
how long an excerpt should be (50 characters)
excerpt_format
‘char’, the default, does nothing, ‘word’ trims the excerpt to the last full word, and ‘sent’ to the full sentence. If the excerpt would be trimmed to nothing no trimming is applied.
ellipsis
add ‘ …’ after the excerpt
before_excerpt
what to show before an excerpt ()
after_excerpt
what to show after an excerpt ()

Feedback

If you try this plugin leave a comment here to let me know how you get on.

10 comments October 26th, 2006

Similar Posts: Version 1.10

I’ve uploaded a new version of Similar Posts. It allows you to exclude particular authors (if you have a multi-author blog), to specify the text that is shown when no matches are found, and to display the output as, for example, a comma-separated sequence rather than a html list.

Previous versions of Similar Posts used an option page as the sole method of governing its behaviour. This version lets you override those options on a case-by-case basis with a query-style parameter, e.g.,<!--?php similar_posts('limit=3') ?--> limits the output to three posts. The new scheme allows you to use Similar Posts in several different places in you blog with different behaviour. For example, you might want to display a few similar posts under each post on your home page and also have a longer list in the sidebar of your single pages.

October 26th, 2006

Tuesday Week 29 Year II

Readings: Ephesians 2:12-22; Luke 12:35-38

Paul is falling over himself with metaphors today, mixing and matching like crazy, but all to one end: the urgent communication of a distance dwindled to nothing.

In Christ, foreign has become familiar. In Christ, two become one. In Christ, distance becomes closeness; hostility, harmony; war, peace.

We are now a single body, a single building, a single Temple.

We are no longer strangers, no longer lost and alone. We are saints and citizens and children of God’s own household.

The truth is we need all that rhetorical excess. We don’t find it easy to believe that the deed has been done, that we are one in God, part of the family, familiar, at home with God. Above all that God is at home with us… with you and with me. We keep inserting distances, awkwardnesses.

Luke tells a parable today about such awkwardness: we are waiting for God, he says, like servants waiting on their Master’s return but, when God comes, he does the waiting, he waits on us. I love the image: God puts on an apron, sits us down to dinner, hands us the menu, and waits on us hand and foot.

That’s our God.

2 comments October 24th, 2006

‘Lunging, Flailing, Mispunching’

That’s the title the London Review of Books gives Terry Eagleton’s savaging of The God Delusion by Richard Dawkins. It’s a guilty pleasure to read something as well-written (pleasure) and scathing (there’s the guilt). He begins:

Imagine someone holding forth on biology whose only knowledge of the subject is the Book of British Birds, and you have a rough idea of what it feels like to read Richard Dawkins on theology. Card-carrying rationalists like Dawkins, who is the nearest thing to a professional atheist we have had since Bertrand Russell, are in one sense the least well-equipped to understand what they castigate, since they don’t believe there is anything there to be understood, or at least anything worth understanding. This is why they invariably come up with vulgar caricatures of religious faith that would make a first-year theology student wince. The more they detest religion, the more ill-informed their criticisms of it tend to be. If they were asked to pass judgment on phenomenology or the geopolitics of South Asia, they would no doubt bone up on the question as assiduously as they could. When it comes to theology, however, any shoddy old travesty will pass muster. These days, theology is the queen of the sciences in a rather less august sense of the word than in its medieval heyday.

After which he takes the gloves off…

I was taken by Eagleton’s pen portrait of Jesus:

Jesus hung out with whores and social outcasts, was remarkably casual about sex, disapproved of the family (the suburban Dawkins is a trifle queasy about this), urged us to be laid-back about property and possessions, warned his followers that they too would die violently, and insisted that the truth kills and divides as well as liberates. He also cursed self-righteous prigs and deeply alarmed the ruling class.

Thanks to Brandon for the link.

1 comment October 22nd, 2006

Sunday Week 29 Year B

Readings: Isaiah 53:10-11; Hebrews 4:14-16; Mark 10:35-45

I was watching a rerun of the West Wing the other evening, right back from the first series, and there was President Bartlett delivering an impassioned pep-talk to his daughter Zoë. She was about to leave for College and the passion flowed as the president grappled for words, trying to find how to say what he felt he needed to say. Here was his youngest about to step beyond the limits of his protection into an unsafe world and he wanted to say all that was in his heart of care and concern, of advice and admonition, of what to do and what not to do, who to know and who not to know—above all of who to be. All the stuff that needs to be said, yet cannot be said, but somehow is heard.

I remember being on the receiving end of just such a heart-to-heart—embarrassing and baffling and touching. To hear my father’s pride in me and his doubt and to see a strange vulnerability come over him as I realised the depth of my power to hurt him and the power of my desire not to. Here he was trying to give me the low-down, the pith of what he wanted for me, the essence of what he held most dear, the lessons he had learned, his fragile legacy of wisdom… for me, his son, to stand me in good stead, to make me a man.

Those two scenes have been with me today … with the echo of a third. Imagine it if you will. There’s God the Father on the timeless eve of the Incarnation, giving the Son just such a pep-talk, such a blessing. Telling him what to aim for, who to hang with, what to value, what to fear. I can see it, that picture—for some reason by the hearth of a roaring fire—but I can’t hear the words.

I find myself having to guess. Well, it’s not exactly guesswork since I’m supposing Jesus took that pep-talk to heart and lived it day-to-day to make his father proud. So I have a clue what passed between them. I glimpse a father’s concerns in his son’s. I hear an echo of a father’s words on his son’s lips… ‘The son of man did not come to be served but to serve and to give his life as a ransom for many’.

October 22nd, 2006

Sweetgrass and Grace

Sweetgrass is used by certain Native American tribes as a kind of incense. Dried and braided, lit and snuffed, it smoulders with a sweet smoke that is used in ‘smudging’, blessing a person and making a space for prayer. I had the good fortune to worship on the reservation several times when I was in the US and smudging always feels to me like washing your spirit in the sweet smoke. My smudging ‘stick’ has long expired but I still treasure the story of its picking. It was given to me by a friend from the Oregon Province of the Jesuits, JK Adams, and he told me about being taken out to pick sweetgrass while he was supplying as priest in Browning, Montana (I think–it might have been Heart Butte).

It’s not something you do lightly and the places where sweetgrass grows are not bandied about. You go at invitation and you go with some ritual and intent but not in a ponderous way. When you reach the place you ask that you might be able to see and find the unassuming grass. And then the hard part begins. It’s hard because its so easy. You mustn’t look for the sweetgrass. If you look for it you don’t find it. JK swears this is how it is. You have to be there and to walk around carefully not looking for the sweetgrass and if you are lucky you will glimpse some from the corner of your eye and then you can cut some. But you can’t make it appear by hunting for it. It has to come to you and show itself. It will not be possessed.

This is all on my mind after talking with another friend of mine about prayer. We both have a tendency to hunt for God–to feel uneasy when God just gives Godself. But God won’t be hunted. If you go looking, thinking to make God appear with your clever ways of praying, you’ll be frustrated. But God is there waiting to be seen once you manage to stop looking, waiting to give himself once you stop trying to make him yield. You have to be there in the field not looking if you want to find. And its a delight when you do, a gift, a blessing.

1 comment October 21st, 2006

Darwin Online

Thanks to the University of Cambridge the complete works of Charles Darwin are now available online and very popular, amassing 150,000 hits in 11 days. You can see facsimiles of his Beagle notebooks. It makes me very happy to see how bad his handwriting was…

The Independent today printed some extracts and got Richard Dawkins to write an appreciation of ‘one of the most admirable men that ever lived’.

Meanwhile, in The Tablet, John Cottingham gave Dawkins’ recent book, The God Delusion, a rough review.

1 comment October 20th, 2006

Previous Posts


Calendar

October 2006
M T W T F S S
« Sep   Nov »
 1
2345678
9101112131415
16171819202122
23242526272829
3031  

Posts by Month

Posts by Category