Support » Fixing WordPress » IntenseDebate -> all comments appear from server IP address

  • Our server does this. It shows the server IP instead of users’. We used to avoid this by opening
    wp-includes/comment.php and adding:

    function auto_reverse_proxy_pre_comment_user_ip()
    {
    	if ( !empty($_SERVER['HTTP_X_FORWARDED_FOR']) )
    	{
    		$X_FORWARDED_FOR=explode(",", $_SERVER['HTTP_X_FORWARDED_FOR']);
    		$REMOTE_ADDR=trim($X_FORWARDED_FOR[0]); //Pega o primeiro elemento do array
    	}	else	{
    		$REMOTE_ADDR=$_SERVER['REMOTE_ADDR'];
    	}
    	return $REMOTE_ADDR;
    }
    add_filter ( 'pre_comment_user_ip','auto_reverse_proxy_pre_comment_user_ip');

    right before

    function wp_new_comment( $commentdata ) {

    And its comments, as seen on:

    http://codex.wordpress.org/Plugin_API/Filter_Reference/pre_comment_user_ip

    BUT…

    Now we have intensedebate installed. It is good, so I wouldn’t like to uninstall it.

    Now, instead of our servers IPs, it shows intensedebate servers’ IPs’.

    So, how can I again correct this?

    Any help? Tips?

    PS: How can I add “nofollow” to all comments when using intensedebate?

    Thanks in advance!

    Azis
    [Signature links removed by moderator per forum rules.]

  • The topic ‘IntenseDebate -> all comments appear from server IP address’ is closed to new replies.