Viewing 1 replies (of 1 total)
  • Plugin Author strictly-software

    (@strictly-software)

    There is code to prevent you tweeting for any posts before installation.

    If you don’t want this functionality you will need to remove the code or change the dates on all your posts.

    To remove this functionality that blocks tweets on old posts before the installation date open up the /strictly-tweetbot.class.php file in a text editor (notepad will do) and then find the PostTweets function which should be on line 714 or there abouts e.g

    public function PostTweets($post_id = 0) {
    
    	//ShowTweetBotDebug("IN PostTweets $post_id");
    
    	// no post ID? no tweet
    	if($post_id == 0){
    		return false;
    	// already tweeted?
    	}else if(get_post_meta($post_id, 'strictlytweetbot_posted_tweet', true) == '1'){
    		return false;
    	}
    
    	$post = get_post($post_id);
    
    	if ( $post == false || $post == null ) {
    		return false;
    	}
    
    	// check for private posts OR posts added before the plugin was installed
    	if ($post->post_status == 'private'){
    		return false;
    	}
    
    	<strong>// REMOVE THIS!!!!
    	if(!empty($this->install_date) && $post->post_date <= $this->install_date) {
    		return false;
    	}</strong>
    }

    So you want to remove the 3 lines of code that check whether the date of the post was before the installation date and if it was blocks any tweeting – e.g remove the following lines from the class.

    if(!empty($this->install_date) && $post->post_date <= $this->install_date) {
    	return false;
    }

    If you don’t want to do this then the other options are

    1. Pay me to add an option into the admin interface to switch this feature on or off.

    2. On all files you wsnt to edit and re-tweet before the installation of the plugin change the published date of the article to one after the installation date so that the code above will believe the post was published AFTER you installed the plugin.

    Thanks

    Rob

Viewing 1 replies (of 1 total)
  • The topic ‘[Plugin: Strictly Tweetbot] Tweet posts created prior to installing the plugin’ is closed to new replies.