MyBB Community Forums

Full Version: How to Hide facebook Login button once logged in..
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2
Hi Experts,

I am having a facebook login button on my home page it's working fine but once user is getting in on that time also it's displaying on the page which is not correct as it should hide once user logged in to the application ...

any solution..my web page URL is http://makeadvise.com/

Thanks & Regards,
Prince
Moved to Plugin Support.
move the fb login link from header to header_welcomeblock_guest template....
Hi Kumar,

Thanks for reply, if i am putting this code

<a href="{$mybb->settings['bburl']}/myfbconnect.php?action=login"><img src="http://makeadvise.com/images/makeadvise_fblogin.png" /></a>

to header_welcomeblock_guest page on that case even user can not see FB login button before log in ..


please tell me in header_welcomeblock_guest page where i have put this code...

Thanks,
Prince
why dont you put it in the login pop up box, up on top menu

but you can also use the conditional plugin to check for the userUID
you can add it anywhere in the header_welcomeblock_guest template...

any content added to header_welcomeblock_guest will be shown only to guests (not logged in) while the content in header will be shown to both guests and logged in members...
Hi Kumar,

Now i removed the code from header and put it in to header_welcomeblock_guest file please refer below image , but login with FB is not displaying for Guest ..
[attachment=33694]
Thanks,
Prince
could you paste the content of header_welcomeblock_guest template here... you may also PM me temp admin. account to check this if you wish...
Hi Kumar,

Please find the full file code which is given below ..

-----------------header_welcomeblock_guest Start----------------------------------
{$lang->welcome_guest} <span class="loginbutton"><a href="{$mybb->settings['bburl']}/member.php?action=login" onclick="$('#quick_login').modal({ fadeDuration: 250, keepelement: true }); return false;"><i style="font-size: 14px;" class="fa fa-sign-in fa-fw"></i> {$lang->welcome_login}</a></span> <span class="registerbutton"><a href="{$mybb->settings['bburl']}/member.php?action=register"><i style="font-size: 14px;" class="fa fa-user fa-fw"></i> {$lang->welcome_register}</a> &mdash;

<!--<a href="{$mybb->settings['bburl']}/myfbconnect.php?action=login">{$lang->myfbconnect_login}</a></span>-->

<a href="{$mybb->settings['bburl']}/myfbconnect.php?action=login"><img src="http://makeadvise.com/images/makeadvise_fblogin.png" /></a>



<div class="modal" id="quick_login" style="display: none;">
<form method="post" action="{$mybb->settings['bburl']}/member.php">

<input name="action" type="hidden" value="do_login" />
<input name="url" type="hidden" value="" />
<input name="quick_login" type="hidden" value="1" />
<div class="welcometitle">
<h1>Login at {$mybb->settings['homename']}</h1>
</div>
<div class="welcomebox">
Welcome on Makeadvise.com.<br /><br />
Enjoy the crossbrowser design, tested in the latest Google Chrome, Mozilla Firefox and Opera versions.<br /><br />
What are you waiting for?! Join us now!
</div>
<div class="welcomelogin">
<ul>
<li><span class="log"><i class="fa fa-user fa-fw"></i></span><input name="quick_username" id="quick_login_username" type="text" value="Username" class="textlog" size="25" /></li>
<li><span class="log"><i class="fa fa-lock fa-fw"></i></span><input name="quick_password" id="quick_login_password" type="password" value="Password" class="textlog" size="25" /></li>
</ul>
<br style="clear: both;"/>
<input name="quick_remember" id="quick_login_remember" type="checkbox" value="yes" class="checkbox" checked="checked" />
<label for="quick_login_remember" style="color: #363636;">{$lang->remember_me}</label><br />
<a href="{$mybb->settings['bburl']}/member.php?action=lostpw" class="lost_password">{$lang->lost_password}</a>
<br style="clear: both;"/><br />
<input class="loginbutton" name="submit" type="submit" value="{$lang->login}" style="cursor: pointer;" />
<span class="registerbutton"><a href="{$mybb->settings['bburl']}/member.php?action=register"><i style="font-size: 14px;" class="fa fa-user fa-fw"></i> Register</a></span>


</div>
</form>
</div>

<script type="text/javascript">
$("#quick_login input[name='url']").val($(location).attr('href'));
</script>

-----------------------------header_welcomeblock_guest End----------------------------------
Pages: 1 2