Forum Replies Created

Viewing 1 replies (of 1 total)
  • The function is being declared twice when multiple instances of the widget are loaded.

    Go to line 226 in twitter_widget.class.php in the controller folder and wrap the twitter_time_diff function with

    if(!function_exists('twitter_time_diff')){ }

    so you have

    if(!function_exists('twitter_time_diff')){
    	function twitter_time_diff( $from, $to = '' ) {
    		$diff = human_time_diff($from,$to);
    		$replace = array(
    			' hour' => 'h',
    			' hours' => 'h',
    			' day' => 'd',
    			' days' => 'd',
    			' minute' => 'm',
    			' minutes' => 'm',
    			' second' => 's',
    			' seconds' => 's',
    		);
    		return strtr($diff,$replace);
    	}
    }
Viewing 1 replies (of 1 total)