Shariff (social share)

Fred
Shariff (social share)
Fred Friday 2nd June 2017, 20:19:31

image
Shariff enables website users to share their favorite content without compromising their privacy.
Facebook, Google+ and Twitter supply official sharing code snippets which quietly siphon personal data from all page visitors. Shariff enables visitors to see how popular your page is on Facebook and share your content with others without needless data leaks.

Download: shariff.zip (1.7 Mo)
2019/02/15 - Version 3.1.1:
+ Flatboard 2.0 compatibility
+ Deutch langpack by Alexander
+ Script update to latest version
- Backend work? Try it i don't understand how to work 😠

2018/01/24 - Version 2.1.1:
* [+] Update script in last version
* [-] Remove backend (impossible to make it work)
2017/06/02 - Version 1.0.2:
* [+] cache folder
* [+] added backend url in configuration
2017/06/02 - Version 1.0:
* Initial version

Last modified by Fred on Friday 15th February 2019, 15:08:00
  • Before ask a question, read the documentation.
  • 🎉  Featured as #1 product of the day on Product Hunt
  • Please like in alternativeto.net 👍🏻
  • ╰☆╮Flatboard╰☆╮ is a open source and community contributions are essential to project success!
  • <TextField>, my new CMS project designed by a passionate developer, for developers!
  • I am currently busy 😫.

Replies 24
Fred
Fred  Saturday 3rd June 2017, 15:16:35

Good !
I do not understand how the backend works, to display the counters.
I integrated it here even is I already shared messages, but I do not see any counter ...
If you can tell me more :)
  • Before ask a question, read the documentation.
  • 🎉  Featured as #1 product of the day on Product Hunt
  • Please like in alternativeto.net 👍🏻
  • ╰☆╮Flatboard╰☆╮ is a open source and community contributions are essential to project success!
  • <TextField>, my new CMS project designed by a passionate developer, for developers!
  • I am currently busy 😫.

AlexanderLiebrecht  Sunday 4th June 2017, 04:42:16

 
Hello @Fred,
I help you super gladly, because I now just adjusted your Plugin and the Share Counts are displayed. But probably one has to use all share Buttons more, rather all counts are displayed. Look at this at https://flatboard.wpzweinull.ch/view.php/topic/2017-06-0314163488cd0.
The file index.php under /plugin/shariff/backend looks with me like this. It's original and I just added my domain and defined the 'tmp' directory.

<?php
require_once __DIR__.'/vendor/autoload.php';
use Heise\Shariff\Backend;
/**
 * Demo Application using Shariff Backend
 */
class Application
{
    /**
     * Sample configuration
     *
     * @var array
     */
    private static $configuration = [
        'cache' => [
            'ttl' => 60,
              'cacheDir' => 'tmp'
        ],
        'domains' => [
            'flatboard.wpzweinull.ch',
            'www.ct.de'
        ],
        'services' => [
            'GooglePlus',
            'Facebook',
            'LinkedIn',
            'Reddit',
            'StumbleUpon',
            'Flattr',
            'Pinterest',
            'Xing',
            'AddThis'
        ]
    ];
    public static function run()
    {
        header('Content-type: application/json');
        $url = isset($_GET['url']) ? $_GET['url'] : '';
        if ($url) {
            $shariff = new Backend(self::$configuration);
            echo json_encode($shariff->get($url));
        } else {
            echo json_encode(null);
        }
    }
}
Application::run();


You must create a directory /tmp in the directory /plugin/shariff/backend. This gets CHMOD privileges of 777 to make it PHP-writable.
If you then call in the browser: http://mydomain.com/plugin/shariff/backend will display a Json value "null". Then the Shariff backend worked.
Please check it out after you have looked at the index.php.
We need this information in the index.php.

 'cache' => [
'ttl' => 60,
  'cacheDir' => 'tmp'

That would be all we have to do.

Fred
Fred  Sunday 4th June 2017, 19:09:47

Thank a lot Alexander,
Plugin update to 1.0.2 with cache folder and backend link.
Thank to try it again and give me yours feedback's ;)
  • Before ask a question, read the documentation.
  • 🎉  Featured as #1 product of the day on Product Hunt
  • Please like in alternativeto.net 👍🏻
  • ╰☆╮Flatboard╰☆╮ is a open source and community contributions are essential to project success!
  • <TextField>, my new CMS project designed by a passionate developer, for developers!
  • I am currently busy 😫.

AlexanderLiebrecht  Monday 5th June 2017, 12:16:24

 
Hi @Fred,
The share counts only worked through this small customization.
Look at this, please.
 
private static $configuration = [
  'cache' => [
'ttl' => 60,
'cacheDir' => 'tmp'
  ],
  'domains' => [
'flatboard.wpzweinull.ch'
  ],
  'services' => [
'GooglePlus',
'Facebook',
'LinkedIn',
'Reddit',
'StumbleUpon',
'Flattr',
'Pinterest',
'Xing',
'AddThis'
  ]
];

Perhaps you should also leave the / tmp directory in the index.php.
Then everyone can enter their domain.
I have made these adjustments now and the share counts have been displayed again.
The link to the Shariff backend in the plugin options is correct.

AlexanderLiebrecht  Monday 5th June 2017, 13:02:46

 
Just saw that you have no directory /tmp in the plugin download package. This must still be pure. Then note it in the index.php and already should function.
/cache directory, so it does not seem to work. I wanted to tell you more.

Fred
Fred  Monday 5th June 2017, 23:04:23

Ok, get the new index.php here and try it.
The script create the tmp folder in the backend folder, is good?
On the author script, i get a error in backend...
  • Before ask a question, read the documentation.
  • 🎉  Featured as #1 product of the day on Product Hunt
  • Please like in alternativeto.net 👍🏻
  • ╰☆╮Flatboard╰☆╮ is a open source and community contributions are essential to project success!
  • <TextField>, my new CMS project designed by a passionate developer, for developers!
  • I am currently busy 😫.

AlexanderLiebrecht  Tuesday 6th June 2017, 03:06:40

 
Very strange, but with me it is only with the index.php of Github from the Repository. Your index.php is good, but no share counts are displayed.
What else can we do? If you say it generates errors with you, the index.php does not go by the Author.
On my Webhosting it seems to work.
The /tmp directory is just right. I always create this manually, if none is present.
Hm ... what else can you do?

simon
Simon  Wednesday 24th January 2018, 07:45:48

The "backend" button does not work :