PDA

View Full Version : Show Thread Enhancements - [vB4.0.X] Submit to Twitter, Facebook and Digg


demonfatal
09-14-2010, 10:00 PM
This mod is an update for vB4.0.X from the modification Submit to Twitter, Facebook and Digg (https://vborg.vbsupport.ru/showthread.php?p=1837400#post1837400) made by ericgtr (https://vborg.vbsupport.ru/member.php?u=34182)... :rolleyes:

This modification add a "button" in the thread (top menu) and allow the users to share it using Twitter, Facebook and Digg...See the screenshot for example :p


https://vborg.vbsupport.ru/attachment.php?attachmentid=121989&d=1284567125



And here we go:
------------------------------------------------------------------------------------------------------------------

Open the SHOWTHREAD template and find:
<vb:if condition="$show['firstunreadlink']">

Add above:
<li class="popupmenu nohovermenu">
<h6><a class="popupctrl" href="javascript://"><blink><font style="background:#FC3" color="#000000">Share</font></blink></a></h6>
<ul class="popupbody popuphover" style="background:#FFF">
<li><label>
<img class="inlineimg" src="images/facebook_share_icon.gif" alt="Share on Facebook" />
<script>function fbs_click() {u=location.href;t=document.title;window.open('htt p://www.facebook.com/sharer.php?u='+encodeURIComponent(u)+'&t='+encodeURIComponent(t),'sharer','toolbar=0,stat us=0,width=626,height=436');return false;}</script>
<a href="http://www.facebook.com/share.php?u=<url>" onclick="return fbs_click()" target="_blank" class="fb_share_link">Share on Facebook</a>
</label></li>
<li><label>
<img class="inlineimg" src="images/twitter_icon.gif" alt="Submit to Twitter" />
<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"'+'>Tweet This!<'+'/a>');</script>
</label></li>
<li><label>
<img class="inlineimg" src="images/digg_icon.gif" alt="Submit to Digg" />
<script src="http://widgets.digg.com/buttons.js" type="text/javascript"></script> <a class="DiggThisButton DiggCompact"></a>
</label></li>
</ul>
</li>


Add the files in attachment in the folder "images" of your style...

------------------------------------------------------------------------------------------------------------------

If you installed this hack please Click "Mark as Installed (https://vborg.vbsupport.ru/vborg_miscactions.php?do=installhack&threadid=250560)"



Enjoy! ;)

NightLord
09-15-2010, 03:49 PM
thanks again :)

demonfatal
09-15-2010, 05:12 PM
You welcome! Just click Mark as Installed is you use it... ;)

Ahmet Turan
09-17-2010, 03:14 PM
thanks

chuckhodson
09-20-2010, 04:52 AM
Works great man thanks.

Vanion
09-20-2010, 01:45 PM
Works great. Thanks!

homanhtruong
09-22-2010, 10:23 AM
Great Work. Thanks so much

VonDoom
09-25-2010, 11:14 AM
Nice! Thanks

acezakj
09-26-2010, 07:59 PM
Marked as installed anyway you could tell me how to change the colors to normal ?

demonfatal
09-27-2010, 10:36 AM
Search for:
<blink><font style="background:#FC3" color="#000000">Share</font></blink>


Replace with:
<blink><font color="#000000">Share</font></blink>= Color removed.

Or replace with:
<font color="#000000">Share</font>= Color and blink effect removed.

XiTCLUB
10-02-2010, 09:37 AM
thanks man

forumuz
10-12-2010, 01:45 PM
When I click "tweet this" , it directs to my main page :S
Where do I make mistake :S

demonfatal
10-12-2010, 07:43 PM
When I click "tweet this" , it directs to my main page :S
Where do I make mistake :S

What do you mean with: it directs to my main page?
Please more informations are needed and screen shoot are welcome...

Martin9887
11-06-2010, 08:13 PM
Lovely mod, thanks very much!

Few questions though, I'd like to have URL's shortened for twitter? I believe it can integrated, but I'm not sure where in the code, thanks.

demonfatal
11-06-2010, 11:04 PM
Hope this can help you:
http://twitterfacts.blogspot.com/2007/05/url-shortening-services-on-twitter.html
and using an API:
http://thurly.net/apidocs.php

zonaenlinea
11-10-2010, 10:55 PM
thanks perfect

Popa Andrei
11-11-2010, 06:35 AM
Just gived up this onehttps://vborg.vbsupport.ru/showthread.php?t=228610&page=6&highlight=twitter for this plugins :D
Good job

LeventX
01-03-2011, 11:29 AM
Thnks.. But twitter share link error...


Looking For;

http://www.hdturk.net

demonfatal
01-03-2011, 04:38 PM
Search in SHOWTHREAD:
http://twitter.com/home?status

I think you have this URL:
http://www.hdturk.net/http://twitter.com/home?status

Remove before this URL:
http://www.hdturk.net/

Let me know.

OldSchoolDSL
01-25-2011, 12:35 AM
Installed and working

4.1.1

Thank you

jeleven
01-29-2011, 03:35 PM
just installed on 4.0.2 not work ;(

demonfatal
02-24-2011, 12:39 AM
Can you tell me what error you get??
Or what is not working?
More details please...If you want help...

Zachery
02-24-2011, 01:40 AM
Couldnt you have just moved the social bookmark stuff north and added these to the template?

oldfan
06-30-2011, 06:15 PM
works great thanks!!

merk_aus
06-30-2011, 10:42 PM
works great but have removed the <font color="#000000"> stuff as that is making the link black.

For those wishing to just have this looking like the rest of your links at the time find:
<blink><font color="#000000">Share</font></blink>

and Replace with:
<blink>Share</blink>

It will make the Share Link look the same as all of your other links.

EDIT: If anyone knows how to have bit.ly built into this so the url's are shorter it would be greatly appreciated if you could share.

pentolkorek
07-31-2011, 11:57 AM
installed and work..

Btw, how to include our twitter username and integrated url shortener when klik Tweet This?

example:

Thread Subject http://t.co/BlaBla via @username

fxdigi-cash
01-16-2013, 02:47 AM
great trick. This is exactly what I was looking for. Thanks man. works fine on vb.4.2
Cheers

Wirral.Talk
01-26-2013, 09:26 PM
How can i make the menu show correctly because at the moment there is gaps (please see screenshot) Also how do i remove digg so its just Twitter and Facebook. Thank you.

vimarc
02-22-2013, 01:57 PM
As shown in picture - tweet this and facebook text next to image but actually after install text droping below image. how i can make it look like as suggested in image

fxdigi-cash
03-03-2013, 09:00 PM
How can i make the menu show correctly because at the moment there is gaps (please see screenshot) Also how do i remove digg so its just Twitter and Facebook. Thank you.

I believe you can just remove the image and leave it as text like this (removed digg):

<li class="popupmenu nohovermenu">
<h6><a class="popupctrl" href="javascript://"><blink><font style="background:#FC3" color="#000000">Share</font></blink></a></h6>
<ul class="popupbody popuphover" style="background:#FFF">
<li><label>
<img class="inlineimg" src="images/facebook_share_icon.gif" alt="Share on Facebook" />
<script>function fbs_click() {u=location.href;t=document.title;window.open('htt p://www.facebook.com/sharer.php?u='+encodeURIComponent(u)+'&t='+encodeURIComponent(t),'sharer','toolbar=0,stat us=0,width=626,height=436');return false;}</script>
<a href="http://www.facebook.com/share.php?u=<url>" onclick="return fbs_click()" target="_blank" class="fb_share_link">Share on Facebook</a>
</label></li>
<li><label>
<img class="inlineimg" src="images/twitter_icon.gif" alt="Submit to Twitter" />
<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"'+'>Tweet This!<'+'/a>');</script>
</label></li>

</ul>
</li>

maybe you want to remove all pictures - see below:

<li class="popupmenu nohovermenu">
<h6><a class="popupctrl" href="javascript://"><blink><font style="background:#FC3" color="#000000">Share</font></blink></a></h6>
<ul class="popupbody popuphover" style="background:#FFF">
<li><label>
<script>function fbs_click() {u=location.href;t=document.title;window.open('htt p://www.facebook.com/sharer.php?u='+encodeURIComponent(u)+'&t='+encodeURIComponent(t),'sharer','toolbar=0,stat us=0,width=626,height=436');return false;}</script>
<a href="http://www.facebook.com/share.php?u=<url>" onclick="return fbs_click()" target="_blank" class="fb_share_link">Share on Facebook</a>
</label></li>
<li><label>
<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"'+'>Tweet This!<'+'/a>');</script>
</label></li>
<li><label>
<script src="http://widgets.digg.com/buttons.js" type="text/javascript"></script> <a class="DiggThisButton DiggCompact"></a>
</label></li>
</ul>
</li>

leave feedback and use whatever code you like.

Cheers

fxdigi-cash
03-03-2013, 09:02 PM
As shown in picture - tweet this and facebook text next to image but actually after install text droping below image. how i can make it look like as suggested in image

I think there is no enough space between the text and its logo (picture) so that's why it goes to the next line...

Add extra space between them and it should work fine