Page 1 of 9

[RC] Social Media Buttons with privacy

Posted: Sat Dec 06, 2014 9:57 pm
by tas2580
Image

Extension Name: Social Media Buttons
Author: tas2580

Extension Description:
Adds Social Media Buttons on each thread. To protect the privacy of the users, requestets at the Social Media platforms will be made by the web server. The data will be cached to avoid too many requests. You can choose between 10 different styles for the buttons.

Extension Version: 1.0.0 RC1

Requirements: phpBB > 3.1.4

Demo URL: https://phpbb.tas2580.net/

Extension Download: https://tas2580.net/downloads/phpbb-soc ... a-buttons/

Github Repository: https://github.com/tas2580/socialbuttons

Image

After uploading make ext/tas2580/socialbuttons/cache/ writeable!

Supported Platforms:
  • Facebook
  • Twitter
  • Google+
  • Linkedin

FAQ

Shares are not counted
The number of shares will be cached so that you do not make too many querys at the social network. The time for caching can be set in the ACP.

Facebook shows the wrong image or description
This can be a problem with the Facebook cache, go to https://developers.facebook.com/tools/debug/ and recache your URL.

2 clicks for privacy?
This extension gets the number of shares over the webserver, so there is no connection between the user and the social networks, for that 2 clicks are not needed, your users have full privacy by displaying the buttons. Only when a user clicks on a button to share it will connect to the social network.

Re: [BETA] Social Media Buttons with privacy

Posted: Sun Dec 07, 2014 2:25 am
by aurquiel
Its a great Mod, just a sugesstion could you put a duplicated of the share buttons in the top above the button postreply it would be great

Re: [BETA] Social Media Buttons with privacy

Posted: Tue Dec 09, 2014 8:03 pm
by tas2580
I have added an ACP module to configure the extension. Now you can choose where the buttons should be displayes. Also you can set the cache time and turn on or off single platforms.

For the buttons at top I could not find a good hookpoint, maybe I will find a better one later.

Gruß Tobi

Re: [BETA] Social Media Buttons with privacy

Posted: Tue Dec 09, 2014 8:08 pm
by noth
very interested in this, looks great! :D

Re: [BETA] Social Media Buttons with privacy

Posted: Tue Dec 09, 2014 10:06 pm
by Cable Player
Hi, do you have any screenshots or a demo?

Re: [BETA] Social Media Buttons with privacy

Posted: Tue Dec 09, 2014 10:18 pm
by Tuqe
noth wrote:very interested in this, looks great! :D
but doesn't give an accurate shared links.
e.g.:
Site link: http://mysite.com/viewtopic.php?f=5&t=46
Share page view link : https://www.facebook.com/sharer/sharer. ... p?f=5&t=46
On Facebook link : http://mysite.com/viewtopic.php?f=5

Page can not be displayed error..

why, i don't understand ?
:oops:

Re: [BETA] Social Media Buttons with privacy

Posted: Tue Dec 09, 2014 10:30 pm
by tas2580
@Cable Player
Screenshots:
ACP Module
Frontend

@Tuqe
I have found that problem, thanks for reporting, I have fixed it, download the new version and it will work.

Re: [BETA] Social Media Buttons with privacy

Posted: Tue Dec 09, 2014 10:40 pm
by Tuqe
yesss
:ugeek:

Re: [BETA] Social Media Buttons with privacy

Posted: Tue Dec 09, 2014 10:47 pm
by Tuqe
Turkish translation:

Code: Select all

<?php
/**
*
* @package phpBB Extension - tas2580 Social Media Buttons
* @copyright (c) 2014 tas2580 (https://tas2580.net)
* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
*
*/

if (!defined('IN_PHPBB'))
{
    exit;
}

if (empty($lang) || !is_array($lang))
{
    $lang = array();
}

$lang = array_merge($lang, array(
    'SOCIAL_BUTTONS'			=> 'Sosyal Medya'da Paylaş',
	'SHARE_FACEBOOK'			=> 'Facebook'ta Paylaş',
	'SHARE_TWITTER'				=> 'Twitter'da Paylaş',
	'SHARE_GOOGLEPLUS'			=> 'Google+'ta Paylaş',
	'SHARE_LINKEDIN'			=> 'Linkedin'de Paylaş',
	'ACP_SOCIALBUTTONS_TITLE'	=> 'Sosyal Medya Butonları',
	'ACP_SETTINGS'				=> 'Ayarlar',
	'ACP_POSITION'				=> 'Pozisyon',
	'ACP_POSITION_EXPLAIN'		=> 'Butonların yeri için pozisyon belirleyin',
	'ACP_SUBMIT'				=> 'Güncelleme değişiklikleri',
	'ACP_POSITION_ALL'			=> 'Hem üstte hem altta',
	'ACP_POSITION_TOP'			=> 'Üstte',
	'ACP_POSITION_BOTTOM'		=> 'Altta',
	'ACP_CACHETIME'				=> 'Önbellek',
	'ACP_CACHETIME_EXPLAIN'		=> 'Önbellek temizliği hangi uzunlukta olsun?',
	'ACP_MULTIPLICATOR_SECONDS'	=> 'Saniye',
	'ACP_MULTIPLICATOR_MINUTES'	=> 'Dakika',
	'ACP_MULTIPLICATOR_HOURS'	=> 'Saat',
	'ACP_SET_PLATFORMS'			=> 'Aktif Et',
	'ACP_FACEBOOK'				=> 'Facebook',
	'ACP_TWITTER'				=> 'Twitter',
	'ACP_GOOGLE'				=> 'Google Plus',
	'ACP_LINKEDIN'				=> 'Linkedin',
	'ACP_SAVED'					=> 'Sosyal medya buton ayarları güncellendi.',
));

Re: [BETA] Social Media Buttons with privacy

Posted: Tue Dec 09, 2014 11:54 pm
by SüKûT
Can we change in the way that I show in the picture?

Image

Re: [BETA] Social Media Buttons with privacy

Posted: Wed Dec 10, 2014 12:26 am
by tas2580
The problem is that I cant find a template event for this position. But I will request one, maybe I can move it with the next phpBB version.

At the moment you have 2 options to move the buttons to a better position:

1. You can change your template by hand
Find in viewtopic_body.html

Code: Select all

<!-- IF .pagination or TOTAL_POSTS -->
Add bevor:

Code: Select all

<!-- IF S_SHOW_AT_TOP -->
	<!-- IF S_FACEBOOK -->
	<a href="#" onclick="return open_socialmedia('https://www.facebook.com/sharer/sharer.php?u={U_TOPIC}');" title="{L_SHARE_FACEBOOK}" class="socialmedia1">&nbsp;</a><span class="social_count">{SHARES_FACEBOOK}</span>
	<!-- ENDIF -->
	<!-- IF S_TWITTER -->
	<a href="#" onclick="return open_socialmedia('https://twitter.com/intent/tweet?text={TOPIC_TITLE}&url={U_TOPIC}');" title="{L_SHARE_TWITTER}" class="socialmedia3">&nbsp;</a><span class="social_count">{SHARES_TWITTER}</span>
	<!-- ENDIF -->
	<!-- IF S_GOOGLE -->
	<a href="#" onclick="return open_socialmedia('https://plus.google.com/share?url={U_TOPIC}&title={TOPIC_TITLE}');" title="{L_SHARE_GOOGLEPLUS}" class="socialmedia4">&nbsp;</a><span class="social_count">{SHARES_GOOGLE}</span>
	<!-- ENDIF -->
	<!-- IF S_LINKEDIN -->
	<a href="#" onclick="return open_socialmedia('http://www.linkedin.com/shareArticle?mini=true&url={U_TOPIC}&title={TOPIC_TITLE}');" title="{L_SHARE_LINKEDIN}" class="socialmedia2">&nbsp;</a><span class="social_count">{SHARES_LINKEDIN}</span>
	<!-- ENDIF -->
<!-- ENDIF -->
2. Move it into the topic tools:
Rename viewtopic_buttons_top_after.html to viewtopic_topic_tools_after.html

After this changes you need to purge the cache in ACP.

Re: [BETA] Social Media Buttons with privacy

Posted: Wed Dec 10, 2014 12:42 am
by SüKûT
thanks :) and I have another question, Can we adapt to phpbbseo?

Re: [BETA] Social Media Buttons with privacy

Posted: Wed Dec 10, 2014 12:52 am
by tas2580
Which SEO Mod do you use? Oh how your URLs look like?

Re: [BETA] Social Media Buttons with privacy

Posted: Wed Dec 10, 2014 1:02 am
by SüKûT
tas2580 wrote:Which SEO Mod do you use? Oh how your URLs look like?
This seo mod use: https://github.com/phpBBSEO/usu

And my site url e.g: http://www.sukutforum.com/son-umut-the- ... 14139.html

Re: [BETA] Social Media Buttons with privacy

Posted: Fri Dec 12, 2014 8:01 am
by Anonymous_et_EE
Estonian translation:

Code: Select all

<?php
/**
*
* @package phpBB Extension - tas2580 Social Media Buttons
* @copyright (c) 2014 tas2580 (https://tas2580.net) ; Estonian translation by http://www.phpbbeesti.com/
* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
*
*/

if (!defined('IN_PHPBB'))
{
    exit;
}

if (empty($lang) || !is_array($lang))
{
    $lang = array();
}

$lang = array_merge($lang, array(
    'SOCIAL_BUTTONS'			=> 'Sotsiaalmeedia',
	'SHARE_FACEBOOK'			=> 'Jaga Facebookis',
	'SHARE_TWITTER'				=> 'Jaga Twitteris',
	'SHARE_GOOGLEPLUS'			=> 'Jaga Google+\'is',
	'SHARE_LINKEDIN'			=> 'Jaga Linkedin\'is',
	'ACP_SOCIALBUTTONS_TITLE'	=> 'Sotsiaalmeedia nupud',
	'ACP_SETTINGS'				=> 'Seaded',
	'ACP_POSITION'				=> 'Asukoht',
	'ACP_POSITION_EXPLAIN'		=> 'Asukoht, kus soovid nuppe näidata.',
	'ACP_SUBMIT'				=> 'Uuenda muudatused',
	'ACP_POSITION_ALL'			=> 'Ülesse ja alla',
	'ACP_POSITION_TOP'			=> 'Üles',
	'ACP_POSITION_BOTTOM'		=> 'Alla',
	'ACP_CACHETIME'				=> 'Vahemälu aeg',
	'ACP_CACHETIME_EXPLAIN'		=> 'Kui kauaks peaks andmed jääma vahemällu?',
	'ACP_MULTIPLICATOR_SECONDS'	=> 'Sekundit',
	'ACP_MULTIPLICATOR_MINUTES'	=> 'Minutit',
	'ACP_MULTIPLICATOR_HOURS'	=> 'Tundi',
	'ACP_SET_PLATFORMS'			=> 'Luba järgnevad',
	'ACP_FACEBOOK'				=> 'Facebook',
	'ACP_TWITTER'				=> 'Twitter',
	'ACP_GOOGLE'				=> 'Google Plus',
	'ACP_LINKEDIN'				=> 'Linkedin',
	'ACP_SAVED'					=> 'Sotsiaalmeedia nuppude seaded uuendatud.',
));

Translation Zip file is here: http://www.phpbbeesti.com/foorum/viewto ... t=158#p252