Other Login-Bar on Wordpress pages

mopple

New member
Hi, I'm looking for a way to add the Login-Bar to every Wordpress site.

I bridged Wordpress with my Xenforo Forum. But as you might know it's pretty annoying to visit the main site then go to the forum to login and then go back to the mainsite again.

So, for better understanding two pictures from the Login-Bar:

uy5S0oq.png



n7ppaGZ.png


Some infos:

If you need further informations, just ask.

Thanks in advance.
 
Nobody? I could pay $5 PayPal. (Sorry, don't have more.)

Update: I found this now:


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 */

The problem is, it still isn't working.

http://xenscripts.com/community/threads/xf-login-widget.578/
 
Did you figure this out yet? Also how did you bridge from Wordpress into Xenforo with Wordpress as the master?
 
Really wish there was a solution to this.

This would depend upon the WordPress theme. Any theme using mega menu can have a widget included in the menu drop down. The styling would need to be changed from there but if a bridge has a login widget then that can be included in the main menu of the WordPress theme.
 
This would depend upon the WordPress theme. Any theme using mega menu can have a widget included in the menu drop down. The styling would need to be changed from there but if a bridge has a login widget then that can be included in the main menu of the WordPress theme.

The main issue I have, I don't permit comments on my blog: http://www.bubbleslayer.com without being logged in. My theme does not show a comment box at the bottom in this case, just a small, "Log in" text. If you got to bigger sites like Engadget, etc, they have a comment box even when you're not logged in and when you click in it to type, it initiates the login process. This is very intuitive. I'm hoping when you fix the comments with your XenWord bridge, the wpdiscuz plugin will show that comment box even when someone is not logged in, prompt them to login with some kind of interactive menu and displays the convenient social login options there as well.
 
Definitely theme related. You could build in a login link that'll redirect you to XenForo login or use a widget.

I'm hoping when you fix the comments with your XenWord bridge, the wpdiscuz plugin will show that comment box even when someone is not logged in, prompt them to login with some kind of interactive menu and displays the convenient social login options there as well.

This works locally on the development but failed on TuxReports, and I haven't figured out why. You may try it but watch the database to see if post_id in the commentmeta is flipped to '0' -- you'll know quickly by doing a refresh on the single post page.
 
Definitely theme related. You could build in a login link that'll redirect you to XenForo login or use a widget.



This works locally on the development but failed on TuxReports, and I haven't figured out why. You may try it but watch the database to see if post_id in the commentmeta is flipped to '0' -- you'll know quickly by doing a refresh on the single post page.

I can't risk the hassle of fixing the issue. I'll look for a thread with any other details on the matter on your forum, so all information is grouped :)
 
Back
Top Bottom