familypress-dot-net : tools for family weblogs

familypress-dot-net : tools for family weblogs

flickpress 0.8

2 July 2009

This update to flickpress expands the search feature I added to the previous version, adding search for user photos too. I also added a list of the Creative Commons and other licenses so you can choose which you’d like to search – maybe useful if you want to find a photo photo you don’t need to attribute. Finally, you can now add users by either email or username.

Due to a switch to the probably-recommended method of doing settings pages this version requires WordPress 2.8 or later.

Get flickpress 0.8 from the WordPress Plugins Directory.

…or right here: flickpress_0.8.zip

Birthdaze 0.3

8 June 2009

I’ve apparently had an old, broken version of this plugin listed for a while. Luckily, Christian tried it out and let me know it was broken. Thanks!

Birthdaze is a really simple plugin that adds an admin page to maintain a list of birthdays, plus a widget and template function to display the birthdays on your blog. For a little bit of privacy, only first name and last initial are displayed externally.

Download birthdaze: birthdaze_0.3.zip

flickpress 0.7

15 April 2009

Inspired a bit by Svein’s comment, I added a feature to search Flickr for Creative Commons and public domain photos. It’s probably still a little rough, but seems to work pretty well so far. Since most licenses require attribution, I’ve turned on the caption by default – and it now includes a link to the photo’s owner.

Download flickpress 0.7: flickpress_0.7.zip

Also, flickpress is now at the WordPress Plugins ranch, so you should be alerted to upgrades now.

Titlematic plugin 0.1

1 April 2009

If you run a group blog, your group members are going to forget to title their posts now and then. It’s mostly just an annoyance – posts without titles look funny – but some plugins get broken because they expect posts to have titles. So, I was using Luke’s Default Post Title plugin, which works well but just sets a default, such as “Untitled Post.” The code I borrowed from the Prologue theme for the quick post feature in OrgPress has a nice auto-title feature that takes the first 25 characters of post text and uses that for the title. It results in some silly titles, but at least they’re more informative than “Untitled Post.” I smooshed the two together into Titlematic, a plugin that sets the title for an untitled post to the first 25 characters of the post’s content and reverts to the “Untitled Post” thing if there isn’t any post content, such as when a post is just an image. Right now you’ve gotta edit the code to change the number of characters to use, so for the next version I’ll probably add some settings.

Download Titlematic 0.1: titlematic.0.1.zip

flickpress 0.6

27 March 2009

No, that’s not a typo…I’ve decided to rename my Flickr plugin. There’s an old WP plugin out there in the aether that’s got the old name, so a new name seemed like a good idea, especially if I’m going to post it at wordpress.org sometime.

The more exciting change in this version is that it uses ThickBox for the popup tool now, rather than the old ugly popup method. I think there were some advantages to the old way, but there’s a lot of peer pressure to use ThickBox or something like it. There’s also a new icon, but I’m not crazy about how it turned out, so I probably shouldn’t mention it.

Since this version involves a renaming you’ll want to deactivate the old version, delete the old folder in your plugins folder, then install the new version as usual. You’ll also need to re-enter your Flickr API key, and reactivate and reconfigure the widget if you’re using it.

If you’re reading this and still aren’t sure what the flickpress plugin does, it’s a simple plugin that makes it easy to insert photos from Flickr into your WordPress posts. It can access several different Flickr accounts, so it’s great for group blogs.

Download flickpress 0.6: flickpress_0.6.zip

OrgPress Theme 0.2

26 March 2009

This version adds the quick posting thing I mentioned in an earlier post, with some tweaks based on how it’s been working at my group blog. It’s fun and popular, but we decided to keep the quick posts separate from the regular posts, putting them in a sidebar block instead. Not much else has changed – just a couple of fixes to the archives.

Download OrgPress 0.2: orgpress_0.2.zip

Adding a quick post box to your theme

18 March 2009

Since I added a sidebar login form to my group blog, I’ve wanted to add a way for logged-in folks to make a quick post without going to the WordPress backend. I learned about the Prologue theme via a Twitter post about its successor, P2. There’s a comment at Lorelle’s blog pointing to where to get P2 via SVN, but it’s pretty complicated AJAX-y and JSON-y stuff – the original Prologue looked much easier to borrow from.

First, you’ll need the post form. You can put the form directly in your index.php, or it in a separate file (I called it post-form.php):

<?php $user = get_userdata( $current_user->ID ); ?>

<div id="postbox">
<h3><a class="togglepost" style="cursor:pointer">Make a quick post &raquo;</a></h3>
<div class="showhidepost">
<form id="new_post" name="new_post" method="post" action="<?php bloginfo( 'url' ); ?>/">
<input type="hidden" name="action" value="post" />
<?php wp_nonce_field( 'new-post' ); ?>
<textarea name="posttext" id="posttext" style="width: 100%;"></textarea><br />
<strong>Title:</strong> <input size="40" type="text" name="posttitle" id="posttitle" /> <input id="submit" type="submit" value="Post it &raquo;" />
</form>
</div>
</div>

Next, add code to detect a logged-in user with publishing permission, and either include the form or echo it out:

if( current_user_can( 'publish_posts' ) ) {
require_once dirname( __FILE__ ) . '/post-form.php';
}

Finally, add some code to your index.php to process submitted posts:

if( 'POST' == $_SERVER['REQUEST_METHOD'] && !empty( $_POST['action'] ) && $_POST['action'] == 'post' ) {
if ( ! is_user_logged_in() )
auth_redirect();
if( !current_user_can( 'publish_posts' ) ) {
wp_redirect( get_bloginfo( 'url' ) . '/' );
exit;
}
check_admin_referer( 'new-post' );
$user_id = $current_user->user_id;
$post_content = $_POST['posttext'];
$post_title = $_POST['posttitle'];
$post_id = wp_insert_post( array(
'post_author' => $user_id,
'post_title' => $post_title,
'post_content' => $post_content,
'post_status' => 'publish'
) );
wp_redirect( get_bloginfo( 'url' ) . '/' );
exit;
}

Prologue has a tags field, which I replaced with a title field – it’d be easy to add any of the fields from the backend posting form you think are important. It might also be interesting to make a template for a quick post page separate from the main blog, like a bulletin board. I think for that I’d put back Prologue’s auto-title feature, and add a hidden category field to make it easy to filter quick posts off the main blog.

WP-Polls for non-admins

27 February 2009

WP-Polls is a nice plugin that lets you add polls to your WordPress site, either in posts, pages, or in your sidebar via a widget. For some (probably logical) reason, the author decided to hard-code the WordPress role allowed to manage polls to the administrator. I’d rather let my blog users set up their own polls – maybe they’ll manage to blow up something by being able to, but I doubt it. Here’s how to allow a non-admin roles to manage polls:

  1. Search for “administrator” in wp-polls.php.
  2. Replace it with the desired role – such as “editor” or “author”.
  3. Deactivate and reactivate the plugin.

Keep in mind that you’ll need to re-do this each time you update the plugin…unless/until the plugin author decides to add an admin Settings page to do this.

OrgPress Theme 0.1

23 February 2009

I’ve been using a hacked-together combination of the two WordPress default themes and some group-oriented customizations at my own family blog for a while now. It took some work to clean it up for release, and there are probably some bugs left to work out, but here it is. I turned it on here for fun, but I’ll probably make a different version based on it for this site…I miss the horizontal menu. Some of the main features include:

  • Widget-friendly sidebar
  • Avatars all over the place
  • Threaded comments
  • Theme options page
  • Optional sidebar login form
  • Optional random headers
  • A LOT of reminders and links for users to log in
  • Automatically uses Compact Archives if it’s installed
  • Automatically uses Most Commented if it’s installed

Download OrgPress 0.1: orgpress_0.1.zip

flickrpress 0.5

13 February 2009

This version fixes issues with buttons and inserting, and also adds the ability to insert the Flickr image’s title as a caption. It uses the same CSS classes as the WordPress default theme, so as long as your theme includes similar caption classes it should work well. I’ve found that pasting in the image caption section from the default theme works pretty well with themes that don’t have caption style. This version has been tested with WordPress 2.7.1 and should still work fine with 2.7.

Download flickrpress 0.5: flickrpress_0.5.zip