OSDN Git Service

Web: Add a "Bookmark on Delicious" link
authorTim Gerundt <tim@gerundt.de>
Wed, 4 Feb 2009 19:13:00 +0000 (19:13 +0000)
committerTim Gerundt <tim@gerundt.de>
Wed, 4 Feb 2009 19:13:00 +0000 (19:13 +0000)
Web/engine/css/print.css
Web/engine/css/screen.css
Web/page.inc

index cbd742a..036bd06 100644 (file)
@@ -59,6 +59,10 @@ a[name]:hover { color:black; text-decoration:none; }
        padding: 5px;
 }
 
+#bookmarks {
+       display: none;
+}
+
 #poweredby {
        display: none;
 }
index 0da6d56..0d6e6f4 100644 (file)
@@ -139,6 +139,10 @@ a[name]:hover { color:black; text-decoration:none; }
        margin-top: 0;
 }
 
+#bookmarks {
+       text-align: right;
+}
+
 #poweredby {
        margin: 0;
        margin-top: 1em;
index 4825c74..7f4d215 100644 (file)
      * print the foot from the page
      */
     function printFoot() {
-      $temp = "  </div> <!-- #content -->\n";
+      $temp = $this->getSocialBookmarks();
+      $temp .= "  </div> <!-- #content -->\n";
       $temp .= "<p id=\"poweredby\">\n";
       $temp .= "  <a href=\"http://sourceforge.net/\"><img src=\"http://sourceforge.net/sflogo.php?group_id=13216&amp;type=3\" width=\"125\" height=\"37\" border=\"0\" alt=\"SourceForge\" title=\"SourceForge.net\"></a>\n";
       $temp .= "  <a href=\"http://sourceforge.net/donate/index.php?group_id=13216\"><img src=\"/engine/images/project-support.jpg\" width=\"88\" height=\"32\" border=\"0\" alt=\"Donate\" title=\"Donate money to WinMerge\"></a>\n";
     }
 
     /**
+     * get the social bookmarks code
+     */
+    function getSocialBookmarks() {
+      $temp = "<div id=\"bookmarks\">\n";
+      $temp .= "<img src=\"http://static.delicious.com/img/delicious.small.gif\" height=\"10\" width=\"10\" alt=\"Delicious\">\n";
+      $temp .= "<a href=\"http://delicious.com/save\" onclick=\"window.open('http://delicious.com/save?v=5&amp;noui&amp;jump=close&amp;url='+encodeURIComponent(location.href)+'&amp;title='+encodeURIComponent(document.title), 'delicious','toolbar=no,width=550,height=550'); return false;\"> Bookmark this on Delicious</a>\n";
+      $temp .= "</div> <!-- #bookmarks -->\n";
+      return $temp;
+    }
+
+    /**
      * get the Piwik java script code
      */
     function getPiwikCode() {