aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNathan Lasseter <nathan@4574.co.uk>2012-12-12 22:00:27 +0000
committerNathan Lasseter <nathan@4574.co.uk>2012-12-12 22:00:27 +0000
commitd1d90fe7532e615912e4bce9c623a9d74e215cd5 (patch)
tree8e6fb66382bd0e0fee68a8c30f24b4795c5a613b
parent84cfb101931e84e52d49e85147296602708049e3 (diff)
Updated tweet button default text
-rw-r--r--viewpost.php5
1 files changed, 3 insertions, 2 deletions
diff --git a/viewpost.php b/viewpost.php
index d07399b..0804551 100644
--- a/viewpost.php
+++ b/viewpost.php
@@ -10,8 +10,9 @@
echo "<div>\n";
echo "<a class=\"title\" href=\"{$blogRoot}post/" . urlencode($file) . "\">$file <span id=\"perma\">[Permalink]</span></a> ";
?>
- <a href="https://twitter.com/share" class="twitter-share-button" id="tweet" data-via="twitterapi" data-lang="en">[Tweet]</a>
- <script>!function(d,s,id){var js,fjs=d.getElementsByTagName(s)[0];if(!d.getElementById(id)){js=d.createElement(s);js.id=id;js.src="https://platform.twitter.com/widgets.js";fjs.parentNode.insertBefore(js,fjs);}}(document,"script","twitter-wjs");</script>
+<a href="https://twitter.com/share" class="twitter-share-button" data-text="<?php echo "$blogTitle: {$_GET['post']} {$_SERVER['SERVER_NAME']}{$_SERVER['REQUEST_URI']}"; ?>">[Tweet]</a>
+<script>!function(d,s,id){var js,fjs=d.getElementsByTagName(s)[0];if(!d.getElementById(id)){js=d.createElement(s);js.id=id;js.src="//platform.twitter.com/widgets.js";fjs.parentNode.insertBefore(js,fjs);}}(document,"script","twitter-wjs");</script>
+
<?php
$stat = stat("{$blogPosts}$file");
$date = date('d-m-Y H:i T', $stat['mtime']);