Advertisement:

Author Topic: Facebook and Twitter Sharer ( 2.0 RC4 -> 2.0 )  (Read 47114 times)

Offline Aleksi "Lex" Kilpinen

  • SMF Friend
  • SMF Super Hero
  • *
  • Posts: 15,430
  • Gender: Male
  • The Artist Formerly Known as LexArma
Facebook and Twitter Sharer ( 2.0 RC4 -> 2.0 )
« on: December 13, 2010, 04:16:04 PM »
Notice! This mod is apparently broken at the moment, because of changes made by Facebook. I am looking in to this, and will keep you updated. - Lex

Link to Mod
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:


User submitted translations for version 2.0 (Facebook and Twitter):

Code: (portuguese_brazilian and portuguese_pt by Darkness_Black) [Select]
//Begin Sharer Mod by Lex - Translated By Darkness
$txt['sharer_allow'] = 'Permitir tópicos ser compartilhado para o Facebook ou Twitter? (Configurações Master)';
$txt['tweetsharer_board_enable'] = 'Permitir tópicos a serem partilhados no Twitter deste fórum';
$txt['facebooksharer_board_enable'] = 'Permitir tópicos a serem partilhados no Facebook deste fórum';
$txt['tweetsharer_board_enable_desc'] = 'Esta opção permite que as pessoas usem o Sharer mod para o Twitter no quadro selecionado.';
$txt['facebooksharer_board_enable_desc'] = 'Esta opção permite que as pessoas usem o Sharer mod para o Facebook no conselho selecionado.';
$txt['facebooksharer_button'] = 'Compartilhar';
//End Sharer Mod by Lex - Translated By Darkness
Code: (Italian by bruce86) [Select]
//Begin Sharer Mod by Lex
$txt['sharer_allow'] = 'Consenti argomenti da condividere su Facebook o Twitter? (Impostazione Principale)';
$txt['tweetsharer_board_enable'] = 'Consenti argomenti da condividere su Twitter da questo forum';
$txt['facebooksharer_board_enable'] = 'Consenti argomenti da condividere su Facebook da questo forum';
$txt['tweetsharer_board_enable_desc'] = 'Questa opzione permette alle persone di utilizzare il mod Sharer di Twitter sulla scheda selezionata.';
$txt['facebooksharer_board_enable_desc'] = 'Questa opzione permette alle persone di utilizzare il mod Sharer di Facebook sulla scheda selezionata.';
$txt['facebooksharer_button'] = 'Condividi';
//End Sharer Mod by Lex
« Last Edit: July 19, 2012, 01:26:31 PM by Aleksi "Lex" Kilpinen »
Finnish Support Local Moderator & Support Specialist
My Mods: Facebook and Twitter Sharer



Offline unformatted_

  • Jr. Member
  • **
  • Posts: 163
  • Gender: Male
Re: Facebook Sharer Mod
« Reply #1 on: December 14, 2010, 07:00:57 AM »
Its possible to show all comments on facebook from the topics posted via rss?

Offline Aleksi "Lex" Kilpinen

  • SMF Friend
  • SMF Super Hero
  • *
  • Posts: 15,430
  • Gender: Male
  • The Artist Formerly Known as LexArma
Re: Facebook Sharer Mod
« Reply #2 on: December 14, 2010, 07:07:25 AM »
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.
Finnish Support Local Moderator & Support Specialist
My Mods: Facebook and Twitter Sharer



Offline qubbah

  • Full Member
  • ***
  • Posts: 532
Re: Facebook Sharer Mod
« Reply #3 on: December 20, 2010, 11:35:32 AM »
soo many board to enable setting. is the any option to including all boards automatically?

Offline Aleksi "Lex" Kilpinen

  • SMF Friend
  • SMF Super Hero
  • *
  • Posts: 15,430
  • Gender: Male
  • The Artist Formerly Known as LexArma
Re: Facebook Sharer Mod
« Reply #4 on: December 20, 2010, 11:49:59 AM »
Not at the monent, no - but that's a good idea, and I'll try to remember that for the future. :)
Finnish Support Local Moderator & Support Specialist
My Mods: Facebook and Twitter Sharer



Offline C4G-TK

  • Sr. Member
  • ****
  • Posts: 960
  • SHOW others respect & you GET respect in return.
Re: Facebook Sharer Mod
« Reply #5 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.
-img removed-

Offline Aleksi "Lex" Kilpinen

  • SMF Friend
  • SMF Super Hero
  • *
  • Posts: 15,430
  • Gender: Male
  • The Artist Formerly Known as LexArma
Re: Facebook Sharer Mod
« Reply #6 on: December 22, 2010, 11:37:17 PM »
Sorry, no - Facebook controls that side of the functionality.
Finnish Support Local Moderator & Support Specialist
My Mods: Facebook and Twitter Sharer



Offline Aleksi "Lex" Kilpinen

  • SMF Friend
  • SMF Super Hero
  • *
  • Posts: 15,430
  • Gender: Male
  • The Artist Formerly Known as LexArma
Re: Facebook Sharer Mod
« Reply #7 on: December 23, 2010, 12:13:37 AM »
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.
Finnish Support Local Moderator & Support Specialist
My Mods: Facebook and Twitter Sharer



Offline DanteOz

  • Semi-Newbie
  • *
  • Posts: 82
  • Gender: Male
    • MegaXForum
Re: Facebook Sharer Mod
« Reply #8 on: December 23, 2010, 10:08:05 AM »
does it have share & like button on topics & like button in the board index?

Offline Aleksi "Lex" Kilpinen

  • SMF Friend
  • SMF Super Hero
  • *
  • Posts: 15,430
  • Gender: Male
  • The Artist Formerly Known as LexArma
Re: Facebook Sharer Mod
« Reply #9 on: December 23, 2010, 11:49:19 AM »
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.
Finnish Support Local Moderator & Support Specialist
My Mods: Facebook and Twitter Sharer



Online SA™

  • SMF Hero
  • ******
  • Posts: 3,366
  • (T)ogether (E)veryone (A)chieves (M)ore
    • DenotsNiaga on Facebook
Re: Facebook Sharer Mod
« Reply #10 on: December 23, 2010, 12:24:57 PM »
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/
http://www.facebook.com/devsamods

Xbox Live: smokerthecheese
PSN: joyrider83 <--- inactive

Quote
My allies are dead.
I'm 'bout to be too.
Zombies are chasing me.
F*** it, I'm screwed -___-

Offline C4G-TK

  • Sr. Member
  • ****
  • Posts: 960
  • SHOW others respect & you GET respect in return.
Re: Facebook Sharer Mod
« Reply #11 on: December 24, 2010, 02:32:09 PM »
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-

Offline Aleksi "Lex" Kilpinen

  • SMF Friend
  • SMF Super Hero
  • *
  • Posts: 15,430
  • Gender: Male
  • The Artist Formerly Known as LexArma
Re: Facebook Sharer Mod
« Reply #12 on: December 28, 2010, 02:45:51 AM »
@ 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.



Finnish Support Local Moderator & Support Specialist
My Mods: Facebook and Twitter Sharer



Offline taucher

  • Semi-Newbie
  • *
  • Posts: 80
  • Gender: Male
    • tauch-sport.net
Re: Facebook Sharer Mod
« Reply #13 on: January 03, 2011, 07:17:36 AM »
Is it possible to post also the title to facebook, not only the url?

Offline Aleksi "Lex" Kilpinen

  • SMF Friend
  • SMF Super Hero
  • *
  • Posts: 15,430
  • Gender: Male
  • The Artist Formerly Known as LexArma
Re: Facebook Sharer Mod
« Reply #14 on: January 03, 2011, 07:45:45 AM »
It gets the page title for the topic you are sharing, so what's the problem exactly?
Finnish Support Local Moderator & Support Specialist
My Mods: Facebook and Twitter Sharer



Offline taucher

  • Semi-Newbie
  • *
  • Posts: 80
  • Gender: Male
    • tauch-sport.net
Re: Facebook Sharer Mod
« Reply #15 on: January 03, 2011, 08:08:04 AM »
when i testet it, there was no page-title on facebook, only the link :(

Offline taucher

  • Semi-Newbie
  • *
  • Posts: 80
  • Gender: Male
    • tauch-sport.net
Re: Facebook Sharer Mod
« Reply #16 on: January 03, 2011, 08:11:23 AM »
ok - got it. sorry - my failure. Was in maintenance mode.

Offline Aleksi "Lex" Kilpinen

  • SMF Friend
  • SMF Super Hero
  • *
  • Posts: 15,430
  • Gender: Male
  • The Artist Formerly Known as LexArma
Re: Facebook Sharer Mod
« Reply #17 on: January 03, 2011, 08:23:34 AM »
Yep, you have to give guests access to the topics you are sharing, or it won't work correctly ;)
Finnish Support Local Moderator & Support Specialist
My Mods: Facebook and Twitter Sharer



Offline impreza

  • Sophist Member
  • *****
  • Posts: 1,035
    • http://www.open-info.eu/artykuly/
Re: Facebook Sharer Mod
« Reply #18 on: January 03, 2011, 08:39:55 AM »
Very cool addition - thank you
Bo warto wiedzieć www.open-info.eu co jest grane http://www.open-info.eu/turystyka/

Offline Aleksi "Lex" Kilpinen

  • SMF Friend
  • SMF Super Hero
  • *
  • Posts: 15,430
  • Gender: Male
  • The Artist Formerly Known as LexArma
Re: Facebook Sharer Mod
« Reply #19 on: January 04, 2011, 01:25:26 AM »
You're welcome :)
Finnish Support Local Moderator & Support Specialist
My Mods: Facebook and Twitter Sharer