[RC] Social Media Buttons with privacy

A place for Extension Authors to post and receive feedback on Extensions still in development. No Extensions within this forum should be used within a live environment!
Anti-Spam Guide
Forum rules
READ: phpBB.com Board-Wide Rules and Regulations

IMPORTANT: Extensions Development rules

IMPORTANT FOR NEEDED EVENTS!!!
If you need an event for your extension please read this for the steps to follow to request the event(s)
Post Reply
User avatar
tas2580
Registered User
Posts: 295
Joined: Wed May 30, 2007 1:56 am
Location: Stuttgart, Germany
Contact:

[RC] Social Media Buttons with privacy

Post 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.
Last edited by tas2580 on Sat Oct 03, 2015 12:43 pm, edited 21 times in total.
User avatar
aurquiel
Registered User
Posts: 243
Joined: Fri May 15, 2009 1:45 am

Re: [BETA] Social Media Buttons with privacy

Post 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
User avatar
tas2580
Registered User
Posts: 295
Joined: Wed May 30, 2007 1:56 am
Location: Stuttgart, Germany
Contact:

Re: [BETA] Social Media Buttons with privacy

Post 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
User avatar
noth
Registered User
Posts: 2528
Joined: Fri Jan 07, 2005 7:10 pm
Location: North Surrey
Contact:

Re: [BETA] Social Media Buttons with privacy

Post by noth »

very interested in this, looks great! :D
Cable Player
Registered User
Posts: 516
Joined: Thu Feb 03, 2011 4:45 pm
Location: Hampshire, England

Re: [BETA] Social Media Buttons with privacy

Post by Cable Player »

Hi, do you have any screenshots or a demo?
Tuqe
Registered User
Posts: 63
Joined: Mon Nov 10, 2014 9:18 am
Location: Turkey

Re: [BETA] Social Media Buttons with privacy

Post 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:
User avatar
tas2580
Registered User
Posts: 295
Joined: Wed May 30, 2007 1:56 am
Location: Stuttgart, Germany
Contact:

Re: [BETA] Social Media Buttons with privacy

Post 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.
Tuqe
Registered User
Posts: 63
Joined: Mon Nov 10, 2014 9:18 am
Location: Turkey

Re: [BETA] Social Media Buttons with privacy

Post by Tuqe »

yesss
:ugeek:
Tuqe
Registered User
Posts: 63
Joined: Mon Nov 10, 2014 9:18 am
Location: Turkey

Re: [BETA] Social Media Buttons with privacy

Post 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.',
));
SüKûT
Registered User
Posts: 48
Joined: Fri Mar 15, 2013 11:50 am
Location: Türkiye
Contact:

Re: [BETA] Social Media Buttons with privacy

Post by SüKûT »

Can we change in the way that I show in the picture?

Image
User avatar
tas2580
Registered User
Posts: 295
Joined: Wed May 30, 2007 1:56 am
Location: Stuttgart, Germany
Contact:

Re: [BETA] Social Media Buttons with privacy

Post 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.
SüKûT
Registered User
Posts: 48
Joined: Fri Mar 15, 2013 11:50 am
Location: Türkiye
Contact:

Re: [BETA] Social Media Buttons with privacy

Post by SüKûT »

thanks :) and I have another question, Can we adapt to phpbbseo?
User avatar
tas2580
Registered User
Posts: 295
Joined: Wed May 30, 2007 1:56 am
Location: Stuttgart, Germany
Contact:

Re: [BETA] Social Media Buttons with privacy

Post by tas2580 »

Which SEO Mod do you use? Oh how your URLs look like?
SüKûT
Registered User
Posts: 48
Joined: Fri Mar 15, 2013 11:50 am
Location: Türkiye
Contact:

Re: [BETA] Social Media Buttons with privacy

Post 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
Anonymous_et_EE
Registered User
Posts: 138
Joined: Sun Jul 07, 2013 2:27 pm

Re: [BETA] Social Media Buttons with privacy

Post 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
Post Reply

Return to “Extensions in Development”