Where is it meant to save the settings (bit.ly account API key, ping.fm key, etc)?
I am unable to get any changes I make to stick. Should it be saving in the wp_options table, or should it be writing it into the shorten2ping.php file directly, or …?
Thanks,
PS – Once I get this working I am going to add hashtags for the ping (they don’t mean much in Facebook, MySpace, etc, but can be important in Twitter)
Adding these is simple –
$post_url = get_permalink($post_id);
$post_title = get_the_title($post_id);
// --- add some tag bits here ------ //
$tags = wp_get_post_tags($post_id);
$my_tag_list = '';
if ($tags) {
foreach ($tags as $j=>$tag) {
$my_tag_list .= '#'.$tag->slug.' ';
}
// --- back to regular processing ----- //
// --- cut for brevity ----- //
//get message from settings and process title and link
$message = $s2p_options['message'];
$message = str_replace('[title]', $post_title, $message);
$message = str_replace('[link]', $short_url, $message);
// --- add the tags ----- //
// --- ToDo: determine length and truncate Title(?) or Tags in order to fit in Twitter post //
$message = str_replace('[tags]', $my_tag_list, $message);