1
0
mirror of https://github.com/e107inc/e107.git synced 2025-07-20 14:31:31 +02:00

XUP comment integration - first steps

This commit is contained in:
CaMer0n
2012-08-20 01:14:00 +00:00
parent 7e3bb486d4
commit 2ad79d7cdd

View File

@@ -375,8 +375,23 @@ class comment_shortcodes extends e_shortcode
function sc_comment_share($parm='')
{
return e107::getForm()->checkbox('comment_share',1,true). "Share on Facebook";
if(!$xup = e107::getUser()->getProviderName())
{
return;
}
list($prov,$id) = explode("_",$xup);
$prov = strtolower($prov);
if($prov == 'facebook' || $prov == 'twitter')
{
//TODO Move styling to e107.css
$text = "<img src='".e_IMAGE."xup/".$prov.".png' style='display:inline-block;width:26px;height:26px;vertical-align:middle' alt='Share' />";
$text .= e107::getForm()->checkbox('comment_share',$prov,true);
$text .= "Share";
return $text;
}
}