Skip to content

Instantly share code, notes, and snippets.

@rwetzlmayr
Created August 7, 2010 13:20
Show Gist options
  • Save rwetzlmayr/512809 to your computer and use it in GitHub Desktop.
Save rwetzlmayr/512809 to your computer and use it in GitHub Desktop.
<txp:php>global $sh_title, $sh_url, $sh_sitename, $sh_summary, $sitename;
$nil = array();
$sh_title = rawurlencode(title(array('nowidow' => false)));
$sh_url = rawurlencode(permlink($nil));
$sh_sitename = rawurlencode($sitename);
$sh_summary = rawurlencode(preg_replace('/^(.{0,120}).*$/su','$1', strip_tags(body($nil)))).'…';
</txp:php>
<ul class="share-this" id="share-this">
<li class="xing"><a rel="nofollow" href="https://www.xing.com/app/user?op=share;url=<txp:php>global $sh_url;
echo $sh_url;</txp:php>;title=<txp:php>global $sh_title;
echo $sh_title;</txp:php>;provider=<txp:php>global $sh_sitename;
echo $sh_sitename;</txp:php>" title="Ihren XING-Kontakten zeigen">Ihren XING-Kontakten zeigen</a></li>
<li class="twitter"><a rel="nofollow" href="http://twitter.com/home?status=Lese%20gerade:%20<txp:php>global $sh_title;echo $sh_title;</txp:php>%20at%20<txp:php>global $sh_url;echo $sh_url;</txp:php>" title="Bei Twitter tweeten">Bei Twitter tweeten</a></li>
<li class="facebook"><a rel="nofollow" href="http://www.facebook.com/sharer.php?u=<txp:php>global $sh_url;
echo $sh_url;</txp:php>&amp;t=<txp:php>global $sh_title; echo $sh_title;</txp:php>" title="Auf Facebook teilen">Auf Facebook teilen</a></li>
<li class="linkedin"><a rel="nofollow" href="http://www.linkedin.com/shareArticle?mini=true&amp;url=<txp:php>global $sh_url;
echo $sh_url;</txp:php>&amp;title=<txp:php>global $sh_title; echo $sh_title;</txp:php>&amp;summary=<txp:php>global $sh_summary; echo $sh_summary;</txp:php>&amp;source=<txp:php>global $sh_sitename;
echo $sh_sitename;</txp:php>" title="Auf LinkedIn teilen">Auf LinkedIn teilen</a>
</li>
</ul>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment