Skip to content

Instantly share code, notes, and snippets.

@ngfw
Created November 14, 2013 14:58
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ngfw/7468236 to your computer and use it in GitHub Desktop.
Save ngfw/7468236 to your computer and use it in GitHub Desktop.
add social buttons to profile page
<div class="col-sm-12">
<?php
$this->canonical = \NG\Uri::baseUrl() . \NG\Registry::get('requestedLanguage') . "/people/" . $this->person['id'] ."/". urlencode($this->person['name']);
?>
<div class="well well-sm movieSocialButtons">
<ul class="pull-left">
<li><a href="#" data-url="<?php echo $this->canonical; ?>" class="gplusShare"><span class="micon-google-plus"></span> +1</a></li>
<li class="text-muted"> / </li>
<?php if (isset($this->person['profile_path']) and !empty($this->person['profile_path'])): ?>
<li><a href="#" data-url="<?php echo $this->canonical; ?>" data-media="<?php echo $this->profileOriginalImage . $this->person['profile_path']; ?>" data-description="<?php if(isset($this->person['name'])): echo $this->person['name']; endif;?>" class="pinitShare"> <span class="micon-pinterest"></span> Pinit</a></li>
<?php endif; ?>
<li class="text-muted"> / </li>
<li><a href="#" data-text="<?php if(isset($this->person['name'])): echo $this->person['name']; endif;?>" class="popout-menu-item twitterShare"> <span class="micon-twitter"></span> Tweet</a></li>
<li class="text-muted"> / </li>
<li><a href="#" data-url="<?php echo $this->canonical; ?>" class="popout-menu-item facebookShare"> <span class="micon-facebook"></span> Share</a></li>
</ul>
</div>
</div>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment