diff options
author | Andrew Dolgov <[email protected]> | 2010-11-22 14:04:32 +0300 |
---|---|---|
committer | Andrew Dolgov <[email protected]> | 2010-11-22 14:04:32 +0300 |
commit | 96d446011bd340c8dc6362876d846e8b89e4341a (patch) | |
tree | 651d741a48411cbb2ede45e09c6081e81e9f2ed3 /functions.php | |
parent | 083020ad8dfba8e1c504eed503edb4ed6133e0f0 (diff) |
add support for twitter buttons
Diffstat (limited to 'functions.php')
-rw-r--r-- | functions.php | 20 |
1 files changed, 19 insertions, 1 deletions
diff --git a/functions.php b/functions.php index 1db2d2738..9133c482a 100644 --- a/functions.php +++ b/functions.php @@ -4736,6 +4736,14 @@ print_article_enclosures($link, $id, $always_display_enclosures, $article_content); + $short_title = truncate_string(strip_tags($line['title']), 90); + + print "<a href=\"http://twitter.com/share\" + class=\"twitter-share-button\" + data-text=\"$short_title\" + data-url=\"".htmlspecialchars($line["link"])."\" + data-count=\"horizontal\">Tweet</a>"; + print "</div>"; print "</div>"; @@ -5160,7 +5168,8 @@ onclick=\"return cdmClicked(event, $id);\" class=\"titleWrap$hlc_suffix\"> <a class=\"title\" - target=\"_blank\" href=\"".$line["link"]."\">".$line["title"]. + target=\"_blank\" href=\"". + htmlspecialchars($line["link"])."\">".$line["title"]. " $entry_author</a>"; print $labels_str; @@ -5251,6 +5260,15 @@ print_article_enclosures($link, $id, $always_display_enclosures, $article_content); + $short_title = truncate_string( + strip_tags($line['title']), 90); + + print "<a href=\"http://twitter.com/share\" + class=\"twitter-share-button\" + data-text=\"$short_title\" + data-url=\"".htmlspecialchars($line["link"])."\" + data-count=\"horizontal\">Tweet</a>"; + print "</div>"; print "<div class=\"cdmFooter\">"; |