you can use these codes in any template you want.(exp: Showthread)
I hope You like it.
Regards,
Ali.Ch.
//============//
----Facebook----
//============//
Style 1 :
--------
Preview :PHP Code:<!-- Facebook Share Button -->
<if condition="in_array($forum['forumid'], array(1,2))">
<else />
<a name="fb_share" type="box_count" href="http://www.facebook.com/sharer.php">Share</a><script src="http://static.ak.fbcdn.net/connect.php/js/FB.Share" type="text/javascript"></script>
</if>
<!-- / Facebook Share Button -->
Style 2 :
--------
Preview :PHP Code:<!-- Facebook Share Button -->
<if condition="in_array($forum['forumid'], array(1,2))">
<else />
<a name="fb_share" type="button_count" href="http://www.facebook.com/sharer.php">Share</a><script src="http://static.ak.fbcdn.net/connect.php/js/FB.Share" type="text/javascript"></script>
</if>
<!-- / Facebook Share Button -->
Style 3 :
--------
Preview :PHP Code:<!-- Facebook Share Button -->
<if condition="in_array($forum['forumid'], array(1,2))">
<else />
<a name="fb_share" type="button" href="http://www.facebook.com/sharer.php">Share</a><script src="http://static.ak.fbcdn.net/connect.php/js/FB.Share" type="text/javascript"></script>
</if>
<!-- / Facebook Share Button -->
//============//
-----Twitter-----
//============//
Style 1 :
--------
Preview :PHP Code:<!-- Tweet Button -->
<if condition="in_array($forum['forumid'], array(1,2))">
<else />
<a href="http://twitter.com/share" class="twitter-share-button" data-count="none" data-via="YOUR-TWITTER-USERNAME">Tweet</a><script type="text/javascript" src="http://platform.twitter.com/widgets.js"></script>
</if>
<!-- / Tweet Button -->
Style 2 :
--------
Preview :PHP Code:<!-- Tweet Button -->
<if condition="in_array($forum['forumid'], array(1,2))">
<else />
<a href="http://twitter.com/share" class="twitter-share-button" data-count="horizontal" data-via="YOUR-TWITTER-USERNAME">Tweet</a><script type="text/javascript" src="http://platform.twitter.com/widgets.js"></script>
</if>
<!-- / Tweet Button -->
Style 3 :
--------
Preview :PHP Code:<!-- Tweet Button -->
<if condition="in_array($forum['forumid'], array(1,2))">
<else />
<a href="http://twitter.com/share" class="twitter-share-button" data-count="vertical" data-via="YOUR-TWITTER-USERNAME">Tweet</a><script type="text/javascript" src="http://platform.twitter.com/widgets.js"></script>
</if>
<!-- / Tweet Button -->
//============//
-------Digg-------
//============//
Style 1 :
--------
Preview :PHP Code:<!-- Digg share button -->
<if condition="in_array($forum['forumid'], array(1,2))">
<else />
<script type="text/javascript">
(function() {
var s = document.createElement('SCRIPT'), s1 = document.getElementsByTagName('SCRIPT')[0];
s.type = 'text/javascript';
s.async = true;
s.src = 'http://widgets.digg.com/buttons.js';
s1.parentNode.insertBefore(s, s1);
})();
</script>
<a class="DiggThisButton DiggCompact"></a>
</if>
<!-- / Digg Share Button -->
Style 2 :
--------
Preview :PHP Code:<!-- Digg share button -->
<if condition="in_array($forum['forumid'], array(1,2))">
<else />
<script type="text/javascript">
(function() {
var s = document.createElement('SCRIPT'), s1 = document.getElementsByTagName('SCRIPT')[0];
s.type = 'text/javascript';
s.async = true;
s.src = 'http://widgets.digg.com/buttons.js';
s1.parentNode.insertBefore(s, s1);
})();
</script>
<a class="DiggThisButton DiggMedium"></a></if>
<!-- / Digg Share Button -->
Style 3 :
--------
Preview :PHP Code:<!-- Digg share button -->
<if condition="in_array($forum['forumid'], array(1,2))">
<else />
<script type="text/javascript">
(function() {
var s = document.createElement('SCRIPT'), s1 = document.getElementsByTagName('SCRIPT')[0];
s.type = 'text/javascript';
s.async = true;
s.src = 'http://widgets.digg.com/buttons.js';
s1.parentNode.insertBefore(s, s1);
})();
</script>
<a class="DiggThisButton DiggWide"></a>
</if>
<!-- / Digg Share Button -->
==================================
Here is the example of using these codes :
Goto : Admincp > Styles & Templates > Style Manager > Your Style > Edit Templates > Showthreads
Now you have several options to implant these codes ,
I've implanted these after below line in a Shadow Box :
But you can implant it anywhere you want.HTML Code:<a name="poststop" id="poststop"></a>
OR,
in your favorite text editor like notepad++
Put this :
below line afterHTML Code:<td class="vbmenu_control" id="facebook" nowrap="nowrap">
and add thisHTML Code:<if condition="in_array($forum['forumid'], array(1,2))"> <else />
before this :HTML Code:</td>
HTML Code:</if>
and put the prepared code after below line in your showthread template.
=================================HTML Code:<td class="vbmenu_control" id="threadtools" nowrap="nowrap">
Sources : Digg.com/Facebook.com/Twitter.com


3Likes
LinkBack URL
About LinkBacks














Reply With Quote
, but I would suggest you explaining a bit more (specially for non-technical users) how the template conditional works:



