Skip to content

Commit

Permalink
Fix #18: Separate Github star and watch buttons as per v2.0
Browse files Browse the repository at this point in the history
  • Loading branch information
kartik-v committed Feb 4, 2015
1 parent ea6f3d0 commit 75192ff
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 1 deletion.
3 changes: 2 additions & 1 deletion CHANGE.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
version 1.3.0
=============
**Date:** 16-Jan-2015
**Date:** 04-Feb-2015

- (enh #6): Remove Facebook PHP SDK support (old version v3.0).
- (enh #10): German translations added
Expand All @@ -26,6 +26,7 @@ version 1.3.0
- Ability to configure `anonymizeIp` property.
- Ability to add additional javascript **before** sending the ga data.
- Ability to add additional javascript **after** sending the ga data.
- (enh #18): Separate Github star and watch buttons as per v2.0.

version 1.2.0
=============
Expand Down
3 changes: 3 additions & 0 deletions GithubPlugin.php
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ class GithubPlugin extends Widget
{

const WATCH = 'watch';
const STAR = 'star';
const FORK = 'fork';
const FOLLOW = 'follow';
const API = 'http://ghbtns.com/github-btn.html';
Expand Down Expand Up @@ -62,6 +63,7 @@ class GithubPlugin extends Widget
*/
protected $validPlugins = [
self::WATCH,
self::STAR,
self::FORK,
self::FOLLOW
];
Expand Down Expand Up @@ -94,6 +96,7 @@ public function init()
} else {
unset($this->settings['count']);
}
$this->settings['v'] = 2;
$large = (!empty($this->settings['size']) && $this->settings['size'] == 'large');
$defaultOptions = ['allowtransparency' => "true", 'frameborder' => 0, 'scrolling' => 0] +
($large ? ['width' => 170, 'height' => 30] : ['width' => 110, 'height' => 20]);
Expand Down
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ Module that enables access to social plugins for Yii Framework 2.0. It includes
- Embedded Posts/Tweets
- GitHub
- Watch Button
- Star Button
- Fork Button
- Follow Button

Expand Down

0 comments on commit 75192ff

Please sign in to comment.