get_var("SELECT post_title FROM wp_posts WHERE ID=$Post_ID"); $post_content = $wpdb->get_var("SELECT post_content FROM wp_posts WHERE ID=$Post_ID"); //Write to shared $tmpfile //EVENTUALLY UI will allow custom html before/around subject and message. $tempf = fopen($tmpfile,'w'); fwrite($tempf,"MABPostID: $Post_ID\nMABEmail: $email\nMABPassword: $passwd\nMABSubject: $post_subject\nMABText:\n $post_content\n"); fclose($tempf); //Execute perl script $success = passthru("perl \"$AutoBulletin_path\" ../wp-content/plugins/autobul.tmp"); //$file = '/home/yubimusubi/php.out'; //$success = passthru("echo \"$email\" \"$passwd\" \"$AutoBulletin_path\" \"$post_content\" > $file"); return $success; } } //First things first, we need the directory this file //exists in for tmpfile creation. $mab_cwd = getcwd(); add_action('publish_post', array('AutoBulletin', 'bulletin')); //add_filter('the_content', 'mab_globalize'); ?>