diff --git a/e107_plugins/social/e_shortcode.php b/e107_plugins/social/e_shortcode.php index 6b59ed170..ac7690f99 100644 --- a/e107_plugins/social/e_shortcode.php +++ b/e107_plugins/social/e_shortcode.php @@ -150,8 +150,23 @@ class social_shortcodes extends e_shortcode } + /** + * @example {TWITTER_TIMELINE: id=xxxxxxx&theme=light} + */ + function sc_twitter_timeline($parm) + { + $ns = e107::getRender(); + + $account = dirname(XURL_TWITTER); + //data-related="twitterapi,twitter" + $text = 'Tweets by @'.$account.''; - + $text .= <<!function(d,s,id){var js,fjs=d.getElementsByTagName(s)[0],p=/^http:/.test(d.location)?'http':'https';if(!d.getElementById(id)){js=d.createElement(s);js.id=id;js.src=p+"://platform.twitter.com/widgets.js";fjs.parentNode.insertBefore(js,fjs);}}(document,"script","twitter-wjs"); +TMPL; + return (vartrue($parm['render'])) ? $ns->tablerender('',$text,'twitter-timeline',true) : $text; + } }