From 2ad79d7cdd212b2023ecb2bbd44e24fe4b11d66c Mon Sep 17 00:00:00 2001 From: CaMer0n Date: Mon, 20 Aug 2012 01:14:00 +0000 Subject: [PATCH] XUP comment integration - first steps --- .../shortcodes/batch/comment_shortcodes.php | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) diff --git a/e107_core/shortcodes/batch/comment_shortcodes.php b/e107_core/shortcodes/batch/comment_shortcodes.php index 9d7a56697..05816488f 100644 --- a/e107_core/shortcodes/batch/comment_shortcodes.php +++ b/e107_core/shortcodes/batch/comment_shortcodes.php @@ -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 = "Share"; + $text .= e107::getForm()->checkbox('comment_share',$prov,true); + + $text .= "Share"; + return $text; + } }