Extension:Bookmarking 2
From MediaWiki.org
|
Bookmarking 2 Release status: unknown |
|
|---|---|
| Implementation | Tag |
| Description | |
| Download | no link |
[edit] Purpose
[edit] Installation
[edit] Code
<?php # social bookmarking #install extension hook $wgExtensionFunctions[] = "wfbookmarkingExtension"; function wfbookmarkingExtension() { global $wgParser; $wgParser->setHook( "bookmarking", "renderbookmarking" ); } function renderbookmarking( $input, $argv, $parser ) { # get the page title global $wgTitle; $title=$wgTitle->mPrefixedText; # get the pages url $thisurl = "http://yoursite.com".$_SERVER['REQUEST_URI']; $prefix = "Add to: "; $seperator = " | "; $delicious = "<a href=\"http://del.icio.us/post\" onclick=\"window.open('http://del.icio.us/post?tags=" . $title . "&v=4&noui&jump=close&url=".$thisurl."&title=" . $title . "¬es= ". $title . ".', 'delicious','toolbar=no,width=700,height=400'); return false;\" title=\"Add to del.icio.us\" class=\"storyTool\"><img src=\"/common/images/delicious.gif\" width=\"14\" height=\"14\" alt=\"del.icio.us\" border=\"0\" /></a>"; $digg = "<a href=\"http://digg.com/submit\" onclick=\"window.open('http://digg.com/submit?phase=2&url=" . $thisurl . "&title=" . $title . "&bodytext=Find%20out%20how%20to%20set%20up%20Hamachi%20and%20" . $title . "&topic=software'); return false; \" title=\"Add to digg\" class=\"storyTool\"><img src=\"/common/images/digg.gif\" alt=\"Digg\" border=\"0\" /></a>"; $slashdot = "<a href=\"http://slashdot.org/bookmark.pl\" onclick=\"window.open('http://slashdot.org/bookmark.pl?url=" . $thisurl . "&title=" . $title ." '); return false; \" title=\"Add to Slashdot\" class=\"storyTool\"><img src=\"/common/images/slashdot.gif\" alt=\"Slashdot\" border=\"0\" /></a>"; $output = $prefix . $delicious . $seperator . $digg . $seperator . $slashdot; return $output; } ?>

