I went through the tutorial
here and created a plugin that e-mails me when I publish a new wordpress post, using the publish_post hook we talked about.
Here is the code.
Code:
<?php
/*
Plugin Name: Email Friends
Plugin URL: http://stevepavlina.com/forums
Description: This plugin will e-mail Dan at his yahoo account when a new post is published.
Author: Dan Linehan
Version: 1
Author URL: http://bestconsultingever.com
*/
function email_friends($post_ID) {
$friends = 'puredemo@yahoo.com';
mail($friends,"Dan's blog updated",'I just put something on my blog: ~http://blog.example.com');
return $post_ID;
}
add_action('publish_post','email_friends');
?> You can save this code as a .php file, drag it into your plugins and activate it, just like any other plugin.
Working on a function that will post to SMF instead of emailing.