Recommend this page to a friend! |
Download .zip |
Info | View files (43) | Download .zip | Reputation | Support forum (1) | Blog | Links |
Last Updated | Ratings | Unique User Downloads | Download Rankings | |||||
2013-01-29 (3 years ago) | Not enough user ratings | Total: 787 This week: 1 | All time: 4,152 This week: 1,047 |
Version | License | PHP version | Categories | |||
php-socializer 1.0 | BSD License | 5.3 | HTML, PHP 5, Social Networking |
Description | Author | |||||||||||||
This package can embed social buttons and widgets in Web pages. |
|
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 |
File | Role | Description | ||
---|---|---|---|---|
classes (1 directory) | ||||
functions (2 files) | ||||
public (1 file, 1 directory) | ||||
templates (1 file, 8 directories) | ||||
.travis.yml | Data | Auxiliary data | ||
composer.json | Data | Auxiliary data | ||
include.php | Conf. | Configuration script | ||
LICENSE | Data | Auxiliary data | ||
README.md | Doc. | Auxiliary data | ||
require.php | Aux. | Configuration script |
Files | / | classes | / | COI | / | Social |
File | Role | Description |
---|---|---|
AbstractElement.php | Class | Class source |
Cache.php | Class | Class source |
Compressor.php | Class | Class source |
Facebook.php | Class | Class source |
Flattr.php | Class | Class source |
GitHub.php | Class | Class source |
GooglePlus.php | Class | Class source |
LinkedIn.php | Class | Class source |
Manager.php | Class | Class source |
Pinterest.php | Class | Class source |
StumbleUpon.php | Class | Class source |
Twitter.php | Class | Class source |
Files | / | functions |
File | Role | Description |
---|---|---|
local.php | Aux. | Configuration script |
shortcuts.php | Aux. | Configuration script |
Files | / | public |
File | Role | Description | ||
---|---|---|---|---|
github (3 files) | ||||
facebook-channel.php | Aux. | Configuration script |
Files | / | public | / | github |
File | Role | Description |
---|---|---|
button.html | Data | Documentation |
github-icons-2x.png | Icon | Icon image |
github-icons.png | Icon | Icon image |
Files | / | templates |
File | Role | Description | ||
---|---|---|---|---|
facebook (1 file, 1 directory) | ||||
flattr (1 file, 1 directory) | ||||
github (1 file, 1 directory) | ||||
googleplus (1 file, 1 directory) | ||||
linkedin (1 file, 1 directory) | ||||
pinterest (1 file, 1 directory) | ||||
stumbleupon (1 file, 1 directory) | ||||
twitter (1 file, 1 directory) | ||||
script.js | Data | Auxiliary data |
Version Control | Unique User Downloads | Download Rankings | |||||||||||||||
100% |
|
|
Applications that use this package |
Raptor Editor User-friendly for content editors flexible and modular for developers |
Pages of Interest Michael Robinson's personal site |
If you know an application of this package, send a message to the author to add a link here.