News:

Wondering if this will always be free?  See why free is better.

Main Menu

Facebook and Twitter Sharer

Started by Aleksi "Lex" Kilpinen, December 13, 2010, 04:16:04 PM

Previous topic - Next topic

Aleksi "Lex" Kilpinen

Link to Mod

Notice! This mod is apparently broken at the moment, because of changes made by Facebook. I may work to fix this later, but no promises. - Lex

Facebook & Twitter Sharer Mod 2.0
With Optional Database Settings Uninstaller Built In
By Aleksi "Lex" Kilpinen

COMPATIBLE WITH SMF 2.0 RC4 -> SMF 2.0

Support for Curve and Core built in, will support most themes based on either one,
and any theme that doesn't have it's own Display.template and uses Curve's or Core's Display.template instead.

This mod adds easily customizable, and translatable Facebook Share and Twitter Tweet -buttons to topic view.

You can customize the FB button text, by editing the language string
$txt['facebooksharer_button'] in Modifications.{your language}.php
English and Finnish strings included in the package.

Notice!
Upon installation this mod will add two database columns named facebooksharer_board_enable and twittersharer_board_enable in to the boards table of your forums database. These columns hold the boardsettings for this mod.

SharerWithDBUninstall.zip version of the package, upon uninstallation will remove the same columns,
so after uninstalling, the settings for this mod will not be retained.

SharerNoDBUninstall.zip version of the package, upon uninstallation will not remove the same columns,
so after uninstalling, the settings for this mod will be retained.

Also, a separate uninstallsharer.php available, that removes the columns if you should need it.

Release History
- 06.07.2011, Released 2.0 Adding Twitter support :) Removed 1.* versions from modsite.
- 06.07.2011, Fixed fatal error upon install, in case settings were already in the DB.
                      Changed the board setting default value to be activated.
- 05.07.2011, Added 2.0 Final compatibility.
- 12.02.2011, Added RC5 compatibility.
- 04.02.2011, Found the actual reason for Core failing in 1.0 - Reverted changes in 1.1, and fixed the error from 1.0. Also fixed typos.
- 03.02.2011, 1.1 Fixed Core compatibility, at the same time making it more prone to fail - will see later if there's a better way to do this.
- 06.11.2010, Submitted 1.0 for the Cust.Site.

Licence:
Slava
Ukraini!


"Before you allow people access to your forum, especially in an administrative position, you must be aware that that person can seriously damage your forum. Therefore, you should only allow people that you trust, implicitly, to have such access." -Douglas

How you can help SMF

unformatted_

Its possible to show all comments on facebook from the topics posted via rss?

Aleksi "Lex" Kilpinen

Like I said in Show facebook comments on topic it's actually up to Facebook - and since FB usually only displays you (or anyone) info on people you already know,
it would not be too easy to manufacture something that would allow you to follow up on everything people do.
Slava
Ukraini!


"Before you allow people access to your forum, especially in an administrative position, you must be aware that that person can seriously damage your forum. Therefore, you should only allow people that you trust, implicitly, to have such access." -Douglas

How you can help SMF

qubbah

soo many board to enable setting. is the any option to including all boards automatically?

Aleksi "Lex" Kilpinen

Not at the monent, no - but that's a good idea, and I'll try to remember that for the future. :)
Slava
Ukraini!


"Before you allow people access to your forum, especially in an administrative position, you must be aware that that person can seriously damage your forum. Therefore, you should only allow people that you trust, implicitly, to have such access." -Douglas

How you can help SMF

C4G-TK

@ Lex

I've been loving your mod and so have my members.  There's just one thing that I'm trying to figure out how to control.  The person is allowed to choose which thumbnail to use for their post before they share it on Facebook.  Unfortunately, it is pulling in the images that people use from their signatures.  Is there some way to block it from pulling the images from the signatures and/or to always pull a generic image that you create for the site, so people can't choose? 

It isn't necessarily a problem, but I don't want people advertising the ad images from signatures via the mod onto Facebook because it appears that I'm "spamming" or trying to "solicit" some kind of money by it doing so.

-img removed-

Aleksi "Lex" Kilpinen

Sorry, no - Facebook controls that side of the functionality.
Slava
Ukraini!


"Before you allow people access to your forum, especially in an administrative position, you must be aware that that person can seriously damage your forum. Therefore, you should only allow people that you trust, implicitly, to have such access." -Douglas

How you can help SMF

Aleksi "Lex" Kilpinen

Actually, I first only thought of how to limit some images out - but then I came to think that FB might offer a setting to force it to use one and the same image always - but that would then completely remove the option to choose. I'm not sure of this though, and will have to look in to it.
I'm a bit busy with christmas and all for the next few days, but I'll get back to this later on.
Slava
Ukraini!


"Before you allow people access to your forum, especially in an administrative position, you must be aware that that person can seriously damage your forum. Therefore, you should only allow people that you trust, implicitly, to have such access." -Douglas

How you can help SMF

DanteOz

does it have share & like button on topics & like button in the board index?

Aleksi "Lex" Kilpinen

No, like it says in the description it just adds a share button to topics. No like button anywhere, no button at all on index.
Slava
Ukraini!


"Before you allow people access to your forum, especially in an administrative position, you must be aware that that person can seriously damage your forum. Therefore, you should only allow people that you trust, implicitly, to have such access." -Douglas

How you can help SMF

SA™

you can specify an image with meta tags

http://developers.facebook.com/docs/share

scroll down to Sharing Rich Media
http://samods.github.io/SAChatBar/

Xbox Live: smokerthecheese 360 or xbone
My Work
Piano Movers / Delivery service
QuoteMy allies are dead.
I'm 'bout to be too.
Zombies are chasing me.
F*** it, I'm screwed -___-

C4G-TK

Thanks for checking, Lex.

I'm travelling myself right now and my wireless card has died, so just got back from BestBuy on Xmas Eve with a USB Wireless Adapter to bide me until I get home.

Enjoy your holiday!

-img removed-

Aleksi "Lex" Kilpinen

Quote from: C4G-TK on December 22, 2010, 07:49:14 PM
@ Lex

I've been loving your mod and so have my members.  There's just one thing that I'm trying to figure out how to control.  The person is allowed to choose which thumbnail to use for their post before they share it on Facebook.  Unfortunately, it is pulling in the images that people use from their signatures.  Is there some way to block it from pulling the images from the signatures and/or to always pull a generic image that you create for the site, so people can't choose? 

It isn't necessarily a problem, but I don't want people advertising the ad images from signatures via the mod onto Facebook because it appears that I'm "spamming" or trying to "solicit" some kind of money by it doing so.

Okay, now - It would seem this should work.

Just add a line in your meta tags, with the following

<meta property="og:image" content="URL_to_thumbnail_image" />

So for example

<meta property="og:image" content="http://www.simplemachines.org/community/custom_avatars/avatar_200382_1275969085.png" />

To use your avatar here as a thumbnail image.

The following restrictions apply:

The og:image is the URL to the image that appears in the Feed story. The thumbnail's width AND height must be at least 50 pixels, and cannot exceed 130x110 pixels. The ratio of both height divided by width and width divided by height (w/h, h/w) cannot exceed 3.0. For example, an image of 126x39 pixels will not be displayed, as the ratio of width divided by height is greater than 3.0 (126/39 = 3.23). Images will be resized proportionally.



Slava
Ukraini!


"Before you allow people access to your forum, especially in an administrative position, you must be aware that that person can seriously damage your forum. Therefore, you should only allow people that you trust, implicitly, to have such access." -Douglas

How you can help SMF

taucher

Is it possible to post also the title to facebook, not only the url?

Aleksi "Lex" Kilpinen

It gets the page title for the topic you are sharing, so what's the problem exactly?
Slava
Ukraini!


"Before you allow people access to your forum, especially in an administrative position, you must be aware that that person can seriously damage your forum. Therefore, you should only allow people that you trust, implicitly, to have such access." -Douglas

How you can help SMF

taucher

when i testet it, there was no page-title on facebook, only the link :(

taucher

ok - got it. sorry - my failure. Was in maintenance mode.

Aleksi "Lex" Kilpinen

Yep, you have to give guests access to the topics you are sharing, or it won't work correctly ;)
Slava
Ukraini!


"Before you allow people access to your forum, especially in an administrative position, you must be aware that that person can seriously damage your forum. Therefore, you should only allow people that you trust, implicitly, to have such access." -Douglas

How you can help SMF

impreza

Very cool addition - thank you
Portal ToTemat.pl - treści w postaci artykułów i filmów tematycznych.

Aleksi "Lex" Kilpinen

Slava
Ukraini!


"Before you allow people access to your forum, especially in an administrative position, you must be aware that that person can seriously damage your forum. Therefore, you should only allow people that you trust, implicitly, to have such access." -Douglas

How you can help SMF

Advertisement: