Recommended laptop under £500.
Think I deserve a present? See my Amazon Wish List
|
Stumbleupon Blog Integration
As noted on StumbleUpon and your Blog you can let your visitors submit a blog post to Stumbleupon:
http://www.stumbleupon.com/submit?
url=http://www.yoursite.com/article.php&title=The+Article+Title
Please note: No line break in the example above.
Drop the following code into the footer of your blogs and you can easily add a link to share your page with the StumbleUpon community.
$page = $_SERVER['SERVER_NAME'] . $_SERVER['SCRIPT_URL'];
$encoded = urlencode($page);
$realname = basename($_SERVER[SCRIPT_FILENAME], "\.php");
$realname = eregi_replace("_", " ", $realname);
$realname = ucwords($realname);
$encoded_realname = urlencode($realname);
# Comment out the versions you don't need.
# Text link
print ("<p><a href=\"http://www.stumbleupon.com/submit?url=$encoded&title=$encoded_realname\">Stumble this: $realname</a></p>");
# Image link
print ("<p><a href=\"http://www.stumbleupon.com/submit?url=$encoded&title=$encoded_realname\"><img src=\"/images/stumbleupon.gif\" alt=\"Add to stumbleupon\" title=\"Click here to add '$realname' to your StumbleUpon blog\" border=0></a></p>");
print ("<p><a href=\"http://www.stumbleupon.com/submit?url=$encoded&title=$encoded_realname\"><img src=\"/images/small_su_logo2.png\" alt=\"Add to stumbleupon\" title=\"Click here to add '$realname' to your StumbleUpon blog\" border=0></a></p>");
print ("<p><a href=\"http://www.stumbleupon.com/submit?url=$encoded&title=$encoded_realname\"><img src=\"/images/small_su_logo.png\" alt=\"Add to stumbleupon\" title=\"Click here to add '$realname' to your StumbleUpon blog\" border=0></a></p>");
print ("<p><a href=\"http://www.stumbleupon.com/submit?url=$encoded&title=$encoded_realname\"><img src=\"/images/stumble1.gif\" alt=\"Add to stumbleupon\" title=\"Click here to add '$realname' to your StumbleUpon blog\" border=0></a></p>");
print ("<p><a href=\"http://www.stumbleupon.com/submit?url=$encoded&title=$encoded_realname\"><img src=\"/images/stumbleit.gif\" alt=\"Add to stumbleupon\" title=\"Click here to add '$realname' to your StumbleUpon blog\" border=0></a></p>");
print ("<p><a href=\"http://www.stumbleupon.com/submit?url=$encoded&title=$encoded_realname\"><img src=\"/images/stumbleupon.gif\" alt=\"Add to stumbleupon\" title=\"Click here to add '$realname' to your StumbleUpon blog\" border=0></a></p>");
print ("<p><a href=\"http://www.stumbleupon.com/submit?url=$encoded&title=$encoded_realname\"><img src=\"/images/su_micro.gif\" alt=\"Add to stumbleupon\" title=\"Click here to add '$realname' to your StumbleUpon blog\" border=0></a></p>");
print ("<p><a href=\"http://www.stumbleupon.com/submit?url=$encoded&title=$encoded_realname\"><img src=\"/images/thumbup1.gif\" alt=\"Add to stumbleupon\" title=\"Click here to add '$realname' to your StumbleUpon blog\" border=0></a></p>");
print ("<p><a href=\"http://www.stumbleupon.com/submit?url=$encoded&title=$encoded_realname\"><img src=\"/images/thumbup.gif\" alt=\"Add to stumbleupon\" title=\"Click here to add '$realname' to your StumbleUpon blog\" border=0></a></p>");
Working Example
Here follows what it looks like, obviously in your own blog, edit out the version you want, and replace the image file with the one you want to use.
|