The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
Submit to Twitter, Facebook and Digg Details »» | |||||||||||||||||||||||||||
I have been adding these as I go and decided to share, I am sure there are other versions out there but this is how I do it. See screenshot for example of where it goes and how it looks. Keeping up with the latest in social networking keeps traffic flowing to your site.
This can all be added at once or you may add only the one's you want. Additionally, this will probably work in any version of vB. In the SHOWTHREAD template find: Code:
<td class="vbmenu_control" id="threadtools" nowrap="nowrap"> Code:
<!-- Facebook Share --> <if condition="in_array($forum['forumid'], array(1,2))"> <else /> <td class="vbmenu_control" id="facebook" nowrap="nowrap"> <script>function fbs_click() {u=location.href;t=document.title;window.open('http://www.facebook.com/sharer.php?u='+encodeURIComponent(u)+'&t='+encodeURIComponent(t),'sharer','toolbar=0,status=0,width=626,height=436');return false;}</script><style> html .fb_share_button { display: -moz-inline-block; display:inline-block; padding:1px 20px 0 5px; height:15px; border:1px solid #d8dfea; background:url(http://b.static.ak.fbcdn.net/images/share/facebook_share_icon.gif?8:26981) no-repeat top right; } html .fb_share_button:hover { color:#fff; border-color:#295582; background:#3b5998 url(http://b.static.ak.fbcdn.net/images/share/facebook_share_icon.gif?8:26981) no-repeat top right; text-decoration:none; } </style> <a href="http://www.facebook.com/share.php?u=<url>" class="fb_share_button" onclick="return fbs_click()" target="_blank" style="text-decoration:none;">Share</a> </td> </if> <!-- / Facebook Share --> <!-- Twitter Share --> <if condition="in_array($forum['forumid'], array(1,2))"> <else /> <td class="vbmenu_control" id="twitter" nowrap="nowrap"> <script type="text/javascript"> var twtTitle = document.title; var twtUrl = location.href; var maxLength = 140 - (twtUrl.length + 1); if (twtTitle.length > maxLength) { twtTitle = twtTitle.substr(0, (maxLength - 3))+'...'; } var twtLink = 'http://twitter.com/home?status='+encodeURIComponent(twtTitle + ' ' + twtUrl); document.write('<a href="'+twtLink+'" target="_blank"'+'><img src="images/tweet.png" border="0" alt="Tweet This!" /'+'><'+'/a>'); </script> </div> </if> <!-- / Twitter Share --> <!-- Digg Share --> <if condition="in_array($forum['forumid'], array(1,2))"> <else /> <td class="vbmenu_control" id="digg" nowrap="nowrap"> <script type="text/javascript"> digg_url = 'http://www.YOURSITE.com/showthread.php?t=$thread[threadid]'; digg_title = "$threadinfo[title]"; <!-- Change color below to match your forum --> digg_bgcolor = '#FFFFFF'; digg_skin = 'compact'; digg_window = 'new'; </script> <script src="http://digg.com/tools/diggthis.js" type="text/javascript"></script> </td> </if> <!-- / Digg Share --> enter the forum id's of the forums where you do not want it to show <if condition="in_array($forum['forumid'], array(1,2))"> You will also see that in the digg section there is an option to change the background color and you will need to add your site URL. The tweet image is attached, upload to your forum and change the path in the "Twitter Share" section. Update: This has also been updated to vB4 Beta 3 here https://vborg.vbsupport.ru/showthread.php?t=228610 Screenshots
Show Your Support
|
Comments |
#82
|
|||
|
|||
I saw that when you digg the thread the script says 1 dugg. Is it possible for to do the same thing for Facebook and Twitter. Like 3 twitts
|
#83
|
|||
|
|||
u can use addthis code/ sharethis which gives a lot of socialbookmarking sites...
|
#84
|
|||
|
|||
Thank You it only took me a second to do!
|
#85
|
||||
|
||||
i love it so much thanks
|
#87
|
|||
|
|||
Partially cranky post ahead...
ericgtr has written a nice little mod here (installed). It does exactly what it says it does, and it does it well. It drives me crazy when people start asking for this addition or that change. "Can you make it do this? Can you make it do that?" I'm not speaking for the author here. I'm speaking for myself. If you want a mod to do additional/different stuff, learn to write code yourself. Otherwise, just be happy with what others share with us... free of charge. |
#88
|
||||
|
||||
I just used the facebook part and it's working perfectly. Thank you. Installed.
|
#89
|
|||
|
|||
Same problem, although i am only using facebook.
|
#90
|
||||
|
||||
installed facebook part....
works great...thanks! |
#91
|
||||
|
||||
First thanks for this great mod. (installed)
I have problem with twitter and vbseo. when I click on share on twitter it redirects me to my forum home. twitter url is like this in my forum : Code:
http://www.forum-name.com/http://twitter.com/home?status=The%20Apprentice%20-%20S10E02%20-%20AIO%20Boards%20-%20All%20in%20One%20Forums%20http%3A%2F%2Fwww.aioboards.com%2Ff198%2Fapprentice-s10e02-244198%2F |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|