The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
|||
|
|||
How to hide FB Connect button on certain pages?
I hide the FB Connect button to non-members and only display it to logged in members. But, when I log out it shows up on the page that displays the cleared cookies. How can I hide the FB Connect button from this page only? Specifically, all iterations of login.php? Can I run CSS code only when the page was loaded and I'll just do "display:none" and be done with it? Or do I have to do a conditional statement like I had to do to hide the button from non-members? It breaks my style and looks wrong too.
|
#3
|
|||
|
|||
Would this work? I'm still new to PHP conditionals. <vb:if "THIS_SCRIPT == 'login'">Content here</vb:if>
|
#4
|
||||
|
||||
That should work. Just try it on your test site and you will see.
|
#5
|
|||
|
|||
Tried it and it threw out an error. I used exactly what I wrote in the post above yours.
The following error occurred when attempting to evaluate this template: An empty or invalid 'if' condition was found. EDIT: Tried <vb:if condition="THIS_SCRIPT == 'album'">Content here</vb:if> and it worked, but I've run into another problem. Apparently you can't nest if/else conditionals or I did it incorrectly. Is there another way to accomplish this? I only want the FB connect button to show up to logged in users, but for some reason when you log out it still thinks you're a logged in user and shows the Connect button anyways. This is what I tried: Code:
<!-- If Template=Login then hide FB Connect Button --> <vb:if condition="THIS_SCRIPT == 'login'"> <vb:else> <!-- Only show the FB Connect button to logged in users --> <vb:if condition="$bbuserinfo['userid'] == 0"> <span style="display:none"> </span> <vb:else /> <li id="fb_headerbox" class="hidden"> <vb:if condition="$show['facebookuser']"> <a id="fb_link" href="{vb:raw profileurl}"> <img id="fb_squarepic" width="16" height="16" alt="{vb:rawphrase facebook_connect}" src="{vb:raw squarepicurl}" /> <img id="fb_icon" width="14" height="14" alt="{vb:rawphrase facebook_connect}" src="{vb:stylevar imgdir_misc}/facebook.gif" /> </a> <vb:else /> <a id="fb_loginbtn" href="#"><img src="{vb:stylevar imgdir_misc}/facebook_login.gif" alt="{vb:rawphrase facebook_connect}" /></a> </vb:if> </li> <!-- Closing IF from FB Connect above for logged in users --> </vb:if> <!-- Closing IF from FB Connect Template Hide --> </vb:if> <vb:if condition="$bbuserinfo['userid'] == 0"> EDIT3: I tried <vb:if condition="$show['member']"> instead of <vb:if condition="$bbuserinfo['userid'] == 0"> and it's working now Thanks Lynne for working me through it. Could you please take a look at another problem I'm having in regards to none of the human verification questions working? Also please mark this thread Solved |
Thread Tools | |
Display Modes | |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|