2017 © Pedro Peláez
 

library nette-component-social-plugins

Social plugins component for Nette Framework

image

hostbox/nette-component-social-plugins

Social plugins component for Nette Framework

  • Friday, August 29, 2014
  • by HostBox
  • Repository
  • 2 Watchers
  • 9 Stars
  • 2,410 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 2 Forks
  • 1 Open issues
  • 13 Versions
  • 2 % Grown

The README.md

Social Plugins for Nette Framework Build Status

Support for Facebook, Twitter, Google+, LinkedIn and Pinterest

Facebook:, (*1)

  • Activity feed
  • Comments
  • Embedded post
  • Facepile
  • Follow button
  • Like box
  • Like button
  • Send button
  • Share button

Twitter:, (*2)

  • Follow button
  • Hashtag button
  • Mention button
  • Share button
  • Embedded timeline
  • Embedded favorites
  • Embedded search

Google+:, (*3)

  • +1 button
  • Share button
  • Profile badge
  • Page badge
  • Community badge

LinkedIn:, (*4)

  • Company insider
  • Company profile
  • Member profile
  • Share button
  • Recommend button

Pinterest:, (*5)

  • Pin It button
  • Follow button
  • Pin widget
  • Profile widget
  • Board widget

Package Installation

The best way to install Social Plugins is using Composer:, (*6)

$ composer require hostbox/nette-component-social-plugins

Packagist - Versions, (*7)

Nette Forum (cs) - plugin section, (*8)

Nette Addons, (*9)

or manual edit composer.json in your project, (*10)

"require": {
    "hostbox/nette-component-social-plugins": "v1.5.0"
}

Component Installation

config.neon, (*11)

services:
    # Configs
    - HostBox\Components\Facebook\SocialPlugins\Config('facebookAppId')
    - HostBox\Components\Twitter\SocialPlugins\Config
    - HostBox\Components\Google\SocialPlugins\Config
    # Factories
    - HostBox\Components\Facebook\SocialPlugins\FacebookFactory
    - HostBox\Components\Twitter\SocialPlugins\TwitterFactory
    - HostBox\Components\Google\SocialPlugins\GoogleFactory
    - HostBox\Components\Pinterest\SocialPlugins\PinterestFactory

Presenter, (*12)

use HostBox\Components\Facebook\SocialPlugins\LikeBox;
use HostBox\Components\Google\SocialPlugins\GoogleFactory;
use HostBox\Components\Google\SocialPlugins\PlusOneButton;
use HostBox\Components\Pinterest\SocialPlugins\PinItButton;
use HostBox\Components\Pinterest\SocialPlugins\PinterestFactory;
use HostBox\Components\Twitter\SocialPlugins\FollowButton;
use HostBox\Components\Twitter\SocialPlugins\TwitterFactory;

class HomepagePresenter extends BasePresenter {

    /** @var FacebookFactory */
    protected $facebookFactory;

    /** @var TwitterFactory */
    protected $twitterFactory;

    /** @var GoogleFactory */
    protected $googleFactory;

    /** @var PinterestFactory */
    protected $pinterestFactory;

    /**
     * @var LinkedInFactory
     * @inject
     */
    public $linkedInFactory;

    public function __construct(FacebookFactory $facebookFactory, TwitterFactory $twitterFactory, GoogleFactory $googleFactory, PinterestFactory $pinterestFactory) {
        $this->facebookFactory = $facebookFactory;
        $this->twitterFactory = $twitterFactory;
        $this->googleFactory = $googleFactory;
        $this->pinterestFactory = $pinterestFactory;
    }

    // component create by Factory
    public function createComponentFacebookLikeButton() {
        return $this->facebookFactory->createLikeButton();
    }

    // default settings by factory function parameter
    public function createComponentFacebookLikeBox() {
        return $this->facebookFactory->createLikeBox(array(
            'colorScheme' => LikeBox::COLOR_SCHEME_DARK,
            'showFaces' => TRUE
        ));
    }

    // by component function parameter
    public function createComponentTwitterShareButton() {
        $component = $this->twitterFactory->createFollowButton();
        $component->assign(array(
            'size' => FollowButton::SIZE_LARGE,
            'showCount' => TRUE
        ));

        return $component;
    }

    // by component variable
    public function createComponentGooglePlusOneButton() {
        $component = $this->googleFactory->createPlusOneButton();
        $component->size = PlusOneButton::SIZE_SMALL;

        return $component;
    }

    public function createComponentLinkedInShareButton() {
        return $this->linkedInFactory->createShareButton();
    }

    public function createComponentPinterestFollowButton() {
        return $this->pinterestFactory->createFollowButton(array(
            'userName' => 'pinterest',
            'text' => 'Pinterest'
        ));
    }
}

Template, (*13)

{control facebookLikeButton}

// temporary(only for this render) settings editing in Template
{control facebookLikeButton, layout => 'box_count', showFaces => true}

{control facebookLikeBox}
{control twitterShareButton}
{control googlePlusOneButton}
{control linkedInShareButton}
{control pinterestFollowButton}

{control facebookLikeButton:jsScript}
{control twitterShareButton:jsScript}
{control googlePlusOneButton:jsScript}
{control linkedInShareButton:jsScript}
{control pinterestFollowButton:jsScript}

The Versions

29/08 2014

dev-master

9999999-dev

Social plugins component for Nette Framework

  Sources   Download

MIT

The Requires

 

The Development Requires

by Pavel Macháň

plugin component social google facebook twitter nette linkedin pinterest

29/08 2014

v1.5.2

1.5.2.0

Social plugins component for Nette Framework

  Sources   Download

MIT

The Requires

 

The Development Requires

by Pavel Macháň

plugin component social google facebook twitter nette linkedin pinterest

18/07 2014

v1.5.1

1.5.1.0

Social plugins component for Nette Framework

  Sources   Download

MIT

The Requires

 

The Development Requires

by Pavel Macháň

plugin component social google facebook twitter nette linkedin pinterest

15/04 2014

v1.5.0

1.5.0.0

Social plugins component for Nette Framework

  Sources   Download

MIT

The Requires

 

The Development Requires

by Pavel Macháň

plugin component social google facebook twitter nette linkedin pinterest

17/12 2013

v1.4.0

1.4.0.0

Social plugins component for Nette Framework

  Sources   Download

MIT

The Requires

 

The Development Requires

by Pavel Macháň

plugin component social google facebook twitter nette linkedin pinterest

17/12 2013

v1.3.2

1.3.2.0

Social plugins component for Nette Framework

  Sources   Download

MIT

The Requires

 

by Pavel Macháň

plugin component social google facebook twitter nette linkedin pinterest

16/12 2013

v1.3.1

1.3.1.0

Social plugins component for Nette Framework

  Sources   Download

MIT

The Requires

 

by Pavel Macháň

plugin component social google facebook twitter nette linkedin pinterest

11/12 2013

v1.3.0

1.3.0.0

Social plugins component for Nette Framework

  Sources   Download

MIT

The Requires

 

by Pavel Macháň

11/12 2013

v1.2.0

1.2.0.0

Social plugins component for Nette Framework

  Sources   Download

MIT

The Requires

 

by Pavel Macháň

10/12 2013

v1.1.2

1.1.2.0

Social plugins component for Nette Framework

  Sources   Download

MIT

The Requires

 

by Pavel Macháň

10/12 2013

v1.1.1

1.1.1.0

Social plugins component for Nette Framework

  Sources   Download

MIT

The Requires

 

by Pavel Macháň

09/12 2013

v1.1.0

1.1.0.0

Social plugins component for Nette Framework

  Sources   Download

MIT

The Requires

 

by Pavel Macháň

09/12 2013

v1.0.1

1.0.1.0

Social plugins component for Nette Framework

  Sources   Download

MIT

The Requires

 

by Pavel Macháň