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 |
#32
|
||||
|
||||
i have some error and dunno where i must fix about the code, sometimes successfull, sometimes came like this when i press the button SHARE |F| (the pop up windows came up to share to FB but cannot got the info about thread that i wanna to share) :
(Must be at least 4 characters, letters and numbers only.) Email Address: (We’ll send your password to this address, so triple-check it.) so....error in where code? cause some times is successful in other thread when i press the button, came with the title post and image from my forum, can u tell me how to fix about this? i use the code from the Thread Starter and my forum using the VBSEO, and about the link to twitter is great, i had tried and successfull but some problem in share to FB. regards yossie3660 |
#33
|
||||
|
||||
Quote:
|
#34
|
|||
|
|||
Had a user call me today and ask for something like this.
Easy to install. Mike |
#35
|
||||
|
||||
Good Stuff, Always looking for ways the members can help promote. Putting this in there face may work. *Installed*
|
#36
|
|||
|
|||
I read and reread and tried to place the code, but I am showing nothing. I am not sure I am placing the code in the right place. Can you lead a poor site owner to the water? LOL! Thanks.
|
#37
|
||||
|
||||
I would like to ask, can I move the image "http://b.static.ak.fbcdn.net/images/...share_icon.gif" to my own host ?
|
#38
|
|||
|
|||
Great job on putting this block of code together for easily sharing the content. I know VBulletin already has Digg and StumbleUpon built in but having Twitter as part of the services to share too is key these days. I'm using the drop down menu version and it works a treat.
|
#39
|
|||
|
|||
Reverse the forumid's put what forums you DON'T want it to show in the ( ) and it will work. For some reason this is what I had to do. I put which forum ID's I wanted it to show in and it didn't show in any forums. So I took the ID's out and it showed just fine. So I reversed it
|
#40
|
|||
|
|||
Nice Mod, installed.
I would like to see something similar someday, but be able to do an inclusive array, not an exclusive one, meaning to be able to select JUST the forums we want this to display rather than entering all the forumids where you don't want it. However I appreciate the free code and will use it and thanks for all the time you put into it. Nice work. |
#41
|
||||
|
||||
FaceBook doesn't have the thread URL.
|
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|