Quick tips!
1. How 2 Guide - Template Conditionals
A Conditional If Statement simply put will show something to a user based on IF this or IF that SHOW them THIS. Very simple to follow once you initially grasp it so don't let it trick or fool you
Here's an Example:
Code:
<vb:if condition="$show['member']">
This conditional seen above starting with vb:if will only show the code in between the beginning and the end vb:if it is ended by the slash seen below /
</vb:if>
Now if you test this in 4.0 you will only see this code when logged in as a member

. How do I put this code somewhere and utilize it like UKBL first mentioned? Well you can edit your forums templates... vBulletin uses a .php file with code in it, a template with the code in it that corresponds to the php file and css in your style vars area to show you every single page in your vBulletin so basically all three (and some other minor things no need to confuse you early on eh?) make the page display and you the forums owner can make it do your bidding!!
You can edit your styles templates by going to AdminCP > Style & Templates > Style Manager
Now I would create a Child Style to test with so you don't mess up your Live sites style...
AdminCP > Style & Templates > Style Manager > Select the style and to the right click the drop down and select "Add Child Style" and leave it all alone except change "Allow User Selection" to NO this way you can tinker with it behind the scenes

.
Then You'll see the new style and click the drop down on the right and choose "Edit Templates" now go down and double click "Header" then at the very top type in TESTING 123 hit save & reload then select the style since you can as an admin and in that style at the very top you'll now see TESTING123 in plain old text

.
You just edited your first template... now yes your right... you can do that but with all sorts of codes just be careful as some can make the style go

on you so it will require a slight learning curve... and conditionals?
Code:
<vb:if condition="$show['guest']">
TESTING 123
</vb:if>
Put that in the Header Template instead...
Now refresh your page (your still logged in as an admin) and now it's gone, it is only showing to visitors or Guests of the forum i.e. non-logged in users

.
Edit: Look what I just found
https://vborg.vbsupport.ru/showthread.php?t=231525 and special Thanks to BBR-APBT for taking the time to post it up
2. How 2 Guide - Use Facebook ID# OR Name
Revised Code by Steve to show using Facebook ID number and "Vanity" profile name i.e. if you have already selected your custom Facebook URL i.e. mine is no longer a number it is thelastsuperman

.
Quote:
Originally Posted by abqtj
I got it to work using your code, and also tweaked it using code in the link you gave to the 3.8 version.
If you want an update, here's what I'm using:
PHP Code:
<vb:if condition="is_member_of($bbuserinfo, 1,2,3,4,5,6,7,9,11,12)"> <vb:if condition="$post['field6']"> <a href="http://www.facebook.com/home.php/#/profile.php?id={vb:raw post.field6}&ref=profile"> <img src="images/misc/facebook.png" alt="My Facebook" style="border-style: none" target="_blank"/></a> </vb:if> </vb:if>
<vb:if condition="is_member_of($bbuserinfo, 1,2,3,4,5,6,7,9,11,12)"> <vb:if condition="$post['field7']"> <a href="http://www.facebook.com/?ref=home#/{vb:raw post.field7}?ref=profile"> <img src="images/misc/facebook.png" alt="My Facebook" style="border-style: none" target="_blank"/></a> </vb:if> </vb:if>
The second set, with field 7 in it, uses the vanity name instead of the user id.
Thanks again for this mod!!
-Steve
|
*Full Credit to UKBL so from here on out I need to see THANKS UKBL in your posts if you enjoy it