PHP Classes

PHP Socializer: Embed social buttons and widgets in Web pages

Recommend this page to a friend!
  Info   View files View files (43)   DownloadInstall with Composer Download .zip   Reputation   Support forum (1)   Blog    
Ratings Unique User Downloads Download Rankings
StarStarStar 51%Total: 815 All time: 4,225 This week: 114Up
Version License PHP version Categories
php-socializer 1.0BSD License5.3HTML, PHP 5, Social Networking
Description 

Author

This package can embed social buttons and widgets in Web pages.

It can generate HTML with JavaScript for embedding several types of buttons of social networks and other sites in Web pages.

Currently it supports Facebook, Twitter, Google Plus, LinkedIn, StumbleUpon, GitHub, Pinterest and Flattr.

The buttons can be made invisible initially and fade in when they are loaded.

The sharing events of some buttons can be tracked with Google Analytics.

The manager class can combine the JavaScript necessary for different types of buttons, compress the code and cache it to avoid subsequent processing overhead.

Picture of Mike
Name: Mike <contact>
Classes: 1 package by
Country: New Zealand New Zealand
Age: 40
All time rank: 262512 in New Zealand New Zealand
Week rank: 314 Up2 in New Zealand New Zealand Up

Details

PHP Socializer ---------- PHP module intended to make adding social sharing buttons more enjoyable. Includes Google Analytics hooks to enable tracking of share activity. Currently supports Twitter, Facebook, Google Plus, LinkedIn, StumbleUpon, GitHub and Flattr buttons. Basic Example ------------- ![PHP Socializer Basic Example](http://pagesofinterest.net/images/github/coi-social/basic.png "PHP Socializer Basic Example") These buttons can be created with the following code: ```php <?php use COI\Social; include_once 'include.php'; // Contains constants include_once 'require.php'; // Not necessary if you're using an autoloader /* Somehere in your config */ // Create a manager for the Twitter, Google+ & LinkedIn button set new Social\Manager(array( 'twitter' => new Social\Twitter(array( 'username' => 'pagesofinterest', )), 'googleplus' => new Social\GooglePlus(array( 'size' => 'medium' )), 'linkedIn' => new Social\LinkedIn() ), array( 'fadeIn' => 400 )); /* Where the buttons should be displayed */ echo $socialManager->render(array( // These options override those used in the manager initialisation above 'url' => 'http://pagesofinterest.net/', 'title' => 'Pages of Interest', )); /* In your footer, just above the closing <body> tag */ // Output the <script> with src pointing to the combined, compressed & cached JavaScript echo COI\Social\Manager::combinedJavaScript(); ?> ``` Single Button ------------- ![PHP Socializer Single Button](http://pagesofinterest.net/images/github/coi-social/watch.png "PHP Socializer Single Button") To render a single button, use the following syntax: ```php <?php use COI\Social; include_once 'include.php'; // Contains constants include_once 'require.php'; // Not necessary if you're using an autoloader // Render a single button echo Social\GitHub(array( 'user' => 'faceleg', 'repository' => 'COI-Social', 'type' => Social\GitHub\Type\WATCH )); ?> ``` Credits ------- GitHub buttons created by Mark Dotto - [GitHub buttons](http://markdotto.github.com/github-buttons/ "GitHub Buttons").

  Files folder image Files  
File Role Description
Files folder imageclasses (1 directory)
Files folder imagefunctions (2 files)
Files folder imagepublic (1 file, 1 directory)
Files folder imagetemplates (1 file, 8 directories)
Accessible without login Plain text file .travis.yml Data Auxiliary data
Accessible without login Plain text file composer.json Data Auxiliary data
Accessible without login Plain text file include.php Conf. Configuration script
Accessible without login Plain text file LICENSE Data Auxiliary data
Accessible without login Plain text file README.md Doc. Auxiliary data
Accessible without login Plain text file require.php Aux. Configuration script

  Files folder image Files  /  classes  
File Role Description
Files folder imageCOI (1 directory)

  Files folder image Files  /  classes  /  COI  
File Role Description
Files folder imageSocial (12 files)

  Files folder image Files  /  classes  /  COI  /  Social  
File Role Description
  Plain text file AbstractElement.php Class Class source
  Plain text file Cache.php Class Class source
  Plain text file Compressor.php Class Class source
  Plain text file Facebook.php Class Class source
  Plain text file Flattr.php Class Class source
  Plain text file GitHub.php Class Class source
  Plain text file GooglePlus.php Class Class source
  Plain text file LinkedIn.php Class Class source
  Plain text file Manager.php Class Class source
  Plain text file Pinterest.php Class Class source
  Plain text file StumbleUpon.php Class Class source
  Plain text file Twitter.php Class Class source

  Files folder image Files  /  functions  
File Role Description
  Accessible without login Plain text file local.php Aux. Configuration script
  Accessible without login Plain text file shortcuts.php Aux. Configuration script

  Files folder image Files  /  public  
File Role Description
Files folder imagegithub (3 files)
  Accessible without login Plain text file facebook-channel.php Aux. Configuration script

  Files folder image Files  /  public  /  github  
File Role Description
  Accessible without login Plain text file button.html Data Documentation
  Accessible without login Image file github-icons-2x.png Icon Icon image
  Accessible without login Image file github-icons.png Icon Icon image

  Files folder image Files  /  templates  
File Role Description
Files folder imagefacebook (1 file, 1 directory)
Files folder imageflattr (1 file, 1 directory)
Files folder imagegithub (1 file, 1 directory)
Files folder imagegoogleplus (1 file, 1 directory)
Files folder imagelinkedin (1 file, 1 directory)
Files folder imagepinterest (1 file, 1 directory)
Files folder imagestumbleupon (1 file, 1 directory)
Files folder imagetwitter (1 file, 1 directory)
  Accessible without login Plain text file script.js Data Auxiliary data

  Files folder image Files  /  templates  /  facebook  
File Role Description
Files folder imagebuttons (2 files)
  Accessible without login Plain text file script.js Data Auxiliary data

  Files folder image Files  /  templates  /  facebook  /  buttons  
File Role Description
  Accessible without login Plain text file html5.php Aux. Class source
  Accessible without login Plain text file xbfml.php Aux. Sample output

  Files folder image Files  /  templates  /  flattr  
File Role Description
Files folder imagebuttons (1 file)
  Accessible without login Plain text file script.js Data Auxiliary data

  Files folder image Files  /  templates  /  flattr  /  buttons  
File Role Description
  Accessible without login Plain text file html.php Aux. Sample output

  Files folder image Files  /  templates  /  github  
File Role Description
Files folder imagebuttons (1 file)
  Accessible without login Plain text file script.js Data Auxiliary data

  Files folder image Files  /  templates  /  github  /  buttons  
File Role Description
  Accessible without login Plain text file html.php Aux. Sample output

  Files folder image Files  /  templates  /  googleplus  
File Role Description
Files folder imagebuttons (1 file)
  Accessible without login Plain text file script.js Data Auxiliary data

  Files folder image Files  /  templates  /  googleplus  /  buttons  
File Role Description
  Accessible without login Plain text file html.php Aux. Sample output

  Files folder image Files  /  templates  /  linkedin  
File Role Description
Files folder imagebuttons (1 file)
  Accessible without login Plain text file script.js Data Auxiliary data

  Files folder image Files  /  templates  /  linkedin  /  buttons  
File Role Description
  Accessible without login Plain text file html.php Aux. Sample output

  Files folder image Files  /  templates  /  pinterest  
File Role Description
Files folder imagebuttons (1 file)
  Accessible without login Plain text file script.js Data Auxiliary data

  Files folder image Files  /  templates  /  pinterest  /  buttons  
File Role Description
  Accessible without login Plain text file html.php Aux. Sample output

  Files folder image Files  /  templates  /  stumbleupon  
File Role Description
Files folder imagebuttons (1 file)
  Accessible without login Plain text file script.js Data Auxiliary data

  Files folder image Files  /  templates  /  stumbleupon  /  buttons  
File Role Description
  Accessible without login Plain text file html.php Aux. Sample output

  Files folder image Files  /  templates  /  twitter  
File Role Description
Files folder imagebuttons (2 files)
  Accessible without login Plain text file script.js Data Auxiliary data

  Files folder image Files  /  templates  /  twitter  /  buttons  
File Role Description
  Accessible without login Plain text file html-follow.php Aux. Sample output
  Accessible without login Plain text file html-tweet.php Aux. Sample output

 Version Control Unique User Downloads Download Rankings  
 100%
Total:815
This week:0
All time:4,225
This week:114Up
 User Ratings  
 
 All time
Utility:75%StarStarStarStar
Consistency:68%StarStarStarStar
Documentation:68%StarStarStarStar
Examples:-
Tests:-
Videos:-
Overall:51%StarStarStar
Rank:2510