Categories
General

flickpress 0.6

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

Categories
Kitchen

Apple custard pie

Apple Custard Pie

Ingredients:

  • a pie crust
  • about 4 apples
  • butter or coconut oil
  • 2 or 3 eggs
  • about 1/2 cup of crème fraîche or coconut milk
  • a couple of tablespoons of honey
  • spices like cinnamon, nutmeg, cloves, etc.
  • vanilla

First make a pie crust. My usual crust is pressed moist almond meal, baked at 350F for around 20 minutes. You can probably get that done while sauteing the apples, and you’ll be preheating the oven while you’re at it. Peel and chop the apples. Saute them in some butter, sprinkling in the spices you like – I use cinnamon and nutmeg. While they’re getting soft, mix up the eggs, crème fraîche, vanilla, and honey. Slowly mix in the hot apples once they’re soft, then dump the whole mess into the pie crust. Bake at 350 F until it looks golden brown and set, around 30 minutes or so. I sometimes bake it around 15 minutes at 350, then 325, then 300 – I think the texture turns out nicer that way. You will be sorely tempted to eat it hot, but it is better chilled with whipped topping.

Categories
General

OrgPress Theme 0.2

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

Categories
General

Adding a quick post box to your theme

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.

Categories
General

Kitchen sink soup

Kitchen sink soup #2

When you’ve just eaten a chicken and you’re getting sleepy, take a couple of minutes before getting out that tub of ice cream to put the remaining parts of the chicken – it’s soul really – into your favorite leftover repository. Then you can make soup the next day, making the $15 you spent to get that organic, free range, kosher chicken a little closer to worth it.

Ingredients:

  • chicken stock
  • a bunch of vegetables, such as carrots, onion, celery, beets, cabbage, leeks, bell pepper, collard greens, etc.
  • bacon

Start by making some chicken stock from the remains of that poor chicken – simmer whatever was left in some water with maybe some onion, carrot, celery, peppercorns, allspice, and thyme. Simmer for around 1/2 hour, probably over low heat, but it depends on your stove. Once that’s been going for a few minutes you can start softening the vegetables. Ideally, you had bacon for breakfast and left the pan dirty – if so, use that pan! Pretty much any vegetables will do, but I think chicken soup should at least contain onion, carrot, and celery. And more bacon. Once the vegetables are soft, pour in the stock. If there’s chicken left on the bones you can throw that in the soup too once it’s cool enough to pull off the bones. Do some tasting to check for saltiness. Some vinegar or lemon juice will add a lot of flavor if you’re avoiding salt. To make my soup even more likely to be accepted as dinner, I added some cooked lentils and garnished with creme fraiche and cheese.