get_daily()) != '' ) { $postarr = array(); $postarr['post_title'] = $posttitle; $postarr['post_content'] = $postcontent; $postarr['post_category'] = $postcatid; $postarr['post_author'] = 1; $postarr['post_status'] = 'publish'; wp_insert_post($postarr); } else { return false; } } // options are added in case of plugin activation add_action('activate_'.basename(__FILE__), 'paopao_fanfou_daily_activate'); function paopao_fanfou_daily_activate() { add_option('FD_fanfouid',''); add_option('FD_timeline',date('G', time() + 32400)); add_option('FD_filteron','yes'); add_option('FD_posttitle',''); add_option('FD_postcat','Fanfou'); add_option('FD_postcatid','1'); } // options are deleted in case of plugin deactivation add_action('deactivate_'.basename(__FILE__), 'paopao_fanfou_daily_deactivate'); function paopao_fanfou_daily_deactivate() { delete_option("FD_fanfouid"); delete_option("FD_timeline"); delete_option("FD_filteron"); delete_option("FD_posttitle"); delete_option("FD_postcat"); delete_option("FD_postcatid"); if ( $timestamp = wp_next_scheduled('paopao_fanfou_daily_hook') ) { wp_unschedule_event( $timestamp, 'paopao_fanfou_daily_hook' ); } } add_action('paopao_fanfou_daily_hook', 'paopao_fanfou_daily'); add_action('admin_menu', 'Fanfou_Daily_menu'); function Fanfou_Daily_menu() { global $wpdb; if (function_exists('add_submenu_page')) add_submenu_page('plugins.php', __('Fanfou-Daily Options'), __('Fanfou-Daily Options'), 1, __FILE__, 'Fanfou_Daily_subpanel'); } function Fanfou_Daily_subpanel() { global $wpdb; if ($_POST['FD_stage'] == 'process') { update_option('FD_fanfouid', $_POST['FD_fanfouid_option']); update_option('FD_timeline', $_POST['FD_timeline_option']); update_option('FD_filteron', $_POST['FD_filteron_option']); update_option('FD_posttitle', $_POST['FD_posttitle_option']); update_option('FD_postcat', $_POST['FD_postcat_option']); if ($cats = $wpdb->get_results("SELECT cat_ID, cat_name FROM $wpdb->categories", ARRAY_A)) { $cat_flag = 0; foreach ($cats as $cat) { if ( $cat['cat_name'] == $_POST['FD_postcat_option'] ) { update_option('FD_postcatid', $cat['cat_ID']); $cat_flag = 1; break; } } if ( !$cat_flag ) { update_option('FD_postcatid', wp_create_category($_POST['FD_postcat_option'])); } } $newtimestamp = strtotime(date('Y-m-d', time() + 28800 ).' 00:00') + ( $_POST['FD_timeline_option'] * 3600 ) - 28800; if ( !($timestamp = wp_next_scheduled('paopao_fanfou_daily_hook')) ) { wp_schedule_event( $newtimestamp, 'daily', 'paopao_fanfou_daily_hook' ); } else { wp_unschedule_event( $timestamp, 'paopao_fanfou_daily_hook' ); wp_schedule_event( $newtimestamp, 'daily', 'paopao_fanfou_daily_hook' ); } } ?>

Fanfou-Daily Options…

Populate the form fields below to post your Fanfou messages to your blog daily. If you notice any bugs or have suggestions please contact the developers at Fanfou-Daily on paopao.name.

Make sure that your fanfou id below is validated.

Fanfou-Daily Preference
Your Fanfou id: " />
Post time:
Filter messages start with "@" : '; } else { echo ''; } ?>
Post title(default is "Fanfou Daily"): " />
Post categories(default is "Fanfou"): " />