I think I figured it out. But my knowledge of programming is half-assed and cobbled together. So, it might be best if someone with more experience in the area checks this out, or just wait until the developer has time to integrate it into the bridge.
In xf_integration.php, I added:
PHP:
require_once("include/widget.php");
require_once("include/XF_login_widget.php");
After:
PHP:
$XF->initializeXfApplication();
In XF_login_widget.php I went to the function widget( $args, $instance ), removed:
PHP:
require_once("widget.php");
$link = $XF->createLink('login/login');
echo $not_logged_in;
echo $after_widget;
And replaced it with:
PHP:
require("include/widget.php");
if ($XF->visitor['user_id'] == 0) {
echo $not_logged_in;
} else {
echo $xfUserLoggedIn ;
}
echo $after_widget;
In widget.php, I replaced everything after the developer's comments with:
PHP:
$not_logged_in =
// What to display if the user is not logged in
"<form action='community/login/login' method='post' class='xenForm eAuth' id='login' style='display: block;'>
<div class='xfLoginForm'>
<div class='xfLogin'>
<span>
<label for='LoginControl'>User Name or Email Address:</label>
</span>
<input type='text' name='login' id='LoginControl' />
<input type='hidden' name='register' value='0'>
</div>
<div class='xfPassword'>
<span>
<label for='ctrl_password'>Your Password:</label>
</span>
<input type='password' name='password' id='ctrl_password' />
</div>
<div class='xfLoginFormSubmit'>
<span>
<label for='ctrl_remember'><input type='checkbox' name='remember' value='1' id='ctrl_remember' /> Stay logged in</label>
</span>
<input type='submit' class='button primary' value='Log in' />
</div>
</div>
</form>
<div class='xfRegisterNow'>
<center>Don't have an account?<br>
<a href='/community/login/' class='xfRegisterNowText'>Register Now</a></center>
</div>
";
$xfUserLoggedIn = "<p>Hello, <b><a href='/community/members/" . strtolower($XF->visitor->get('username')) . "." . $XF->visitor->get("user_id") ."'> ". $XF->visitor->get('username') ."</a></b>! You are logged in.</p>
<p><a href='/community/logout/'>Log Out</a></p>
";
I also added the following to my Wordpress theme's style sheet:
Code:
/* XENFORO LOGIN WIDGET */
.xfLogin {
float: left;
margin-right: 15px;
}
.xfLogin span {
display: block;
clear:both;
}
.xfLogin #LoginControl {
color: #000000;
background: #dfdfdf;
border: 1px solid #999999;
}
.xfPassword span {
clear:both;
}
.xfPassword #ctrl_password {
color: #000000;
background: #dfdfdf;
border: 1px solid #999999;
}
.xfLoginFormSubmit {
margin-top: 10px;
padding-right: 16px;
text-align: right;
}
.xfLoginFormSubmit input.button {
color: #ffffff;
background: #555;
border: 1px solid #999999;
margin-left: 10px;
}
.xfRegisterNow {
margin-top: 10px;
}
.xfRegisterNow a {
font-size: 18px;
font-weight: bold;
}
/* XENFORO LOGIN WIDGET */