
07-02-2011, 11:08 AM
|
 |
Senior Member
|
|
Join Date: Jun 2008
Location: New York
Posts: 10,610
Благодарил(а): 0 раз(а)
Поблагодарили:
0 раз(а) в 0 сообщениях
|
|
Reserved.
The following text is not relevant to Version 3.0 or above.
Quote:
This post will contain useful hints and options for the Share Buttons that are outside the scope of the mod itself.
Condition to show Share Button(s) Only on Specific / Guest Viewable Forusm
This is a useful conditional if you want to hide the Facebook Like button (and all of the share buttons) in forums that aren't open to the public. If someone "Likes" a thread in a private forum people will be greeted with a no-permission "have to register" message which usually people will just get annoyed at rather than register. In fact if it's a private forum they may not even have access even after registering.
To use this conditional edit the SHOWTHREAD template... find the code:
Code:
<vb:if condition="$show['fb_likebutton']">
and change it too:
Code:
<vb:if condition="$show['fb_likebutton'] AND !in_array($threadinfo['forumid'], array(3,4,5))">
Where 3,4,5 are forum id's of the forums you want to hide the button in. You can add or remove more numbers as needed so long as they are separated by commas.
Alternate location for Share Buttons
This location has been used by VB 3.x forms and was recently suggested by someone (forget who, sorry) as a good location for the Facebook button on VB 4.x.
To do this edit the SHOWTHREAD template.
Find the code:
Code:
<vb:if condition="$show['fb_likebutton']">
{vb:raw fblikebutton}
</vb:if>
DELETE IT.
Now find the code:
Code:
<div id="thread_controls" class="thread_controls toolsmenu">
<div>
And right below it add:
Code:
<vb:if condition="$show['fb_likebutton']">
<span style="margin-left:0px; position:absolute; left:60px;
margin-top:3px;">{vb:raw fblikebutton}</span>
</vb:if>
This is for the default vBulletin 4 style. You may have to play with the style settings to get it to look right on a custom style.
This looks good on Chrome, IE9, and Firefox. The height alignments are a little off on Opera browsers but nothing too bad.
Screenshot Attached.
|
|