• Welcome to Tux Reports: Where Penguins Fly. We hope you find the topics varied, interesting, and worthy of your time. Please become a member and join in the discussions.

Duplicate Comments Now Fixed

LPH

Flight Director
Flight Instructor
Thanks to the developer of the XenScripts WP to XP bridge, the comments are now working properly. Comments created in WP were being duplicated, therefore, the comment form was removed. This is now solved and so the comment form is now available. You will still need to login to comment but at least it isn't necessary to go to the forums.

I also needed to re-write one of the functions in the bridge [xf_replacement_user_functions.php] so that the redirect protocol was proper as well as work properly for a multi-site configuration. Notice the $login is relative.

function xf_login_redirect($url)
{
global $XF;
$login = '/community/login';
$protocol = 'http://';
if(strpos($login, '?') === false)
{
return $login . '?redirect=' . $protocol . $_SERVER['SERVER_NAME'] . $_SERVER['REQUEST_URI'];
}
else
{
return $login . '&redirect=' . $protocol . $_SERVER['SERVER_NAME'] . $_SERVER['REQUEST_URI'];
}
return $login;
}

The logout link was also fixed to a relative path:

function xf_logout_redirect($url)
{
global $XF;
$logout = '/community/logout';
return $logout;
}

Next, some CSS was added to the child themes so that the comment form fit properly underneath each article.

#respond {
background: none repeat scroll 0 0 #DDDDDD;
border: 1px solid #D3D3D3;
border-radius: 3px 3px 3px 3px;
margin: 0 40px 0 auto;
width: 89%;
}

Hopefully these changes make commenting on posts easier.

Next - I need to figure out how to change the line - "You must be logged in to post a comment." It should be clear that it is possible to Sign Up through that link, including using a Facebook ID.
View on the Blog
 
Top