summaryrefslogtreecommitdiff
path: root/data/templates/editbookmark.tpl.php
diff options
context:
space:
mode:
authorChristian Weiske <cweiske@cweiske.de>2011-04-04 22:26:19 +0200
committerChristian Weiske <cweiske@cweiske.de>2011-04-04 22:26:19 +0200
commit361c94895daf7680e54589f8379dc9d647282941 (patch)
tree0b7f536d0043422d4b91cbce2dcb6ead3c947e06 /data/templates/editbookmark.tpl.php
parent28460d52cb556b1172fdcb5cb4c1cc15a13960a7 (diff)
downloadsemanticscuttle-361c94895daf7680e54589f8379dc9d647282941.tar.gz
semanticscuttle-361c94895daf7680e54589f8379dc9d647282941.tar.bz2
explain opera button commands
Diffstat (limited to 'data/templates/editbookmark.tpl.php')
-rw-r--r--data/templates/editbookmark.tpl.php21
1 files changed, 14 insertions, 7 deletions
diff --git a/data/templates/editbookmark.tpl.php b/data/templates/editbookmark.tpl.php
index fc03a59..99afa9c 100644
--- a/data/templates/editbookmark.tpl.php
+++ b/data/templates/editbookmark.tpl.php
@@ -24,6 +24,10 @@ function jsEscTitleDouble($title)
{
return addcslashes(addcslashes($title, "'"), "'\\");
}
+function fixOperaButtonName($name) {
+ //yes, opera has problems with double quotes in button names
+ return str_replace('"', "''", $name);
+}
if (is_array($row['tags'])) {
$row['tags'] = implode(', ', $row['tags']);
@@ -249,10 +253,6 @@ if (browser == "Opera") {
+ '<li>'
+ '<a class="bookmarklet" href="'
+ '<?php
-function fixOperaButtonName($name) {
- //yes, opera has problems with double quotes in button names
- return str_replace('"', "''", $name);
-}
$popupLink = 'javascript:'
. "location.href='"
. createURL('bookmarks', $GLOBALS['user'])
@@ -261,9 +261,16 @@ $popupLink = 'javascript:'
. "&title='+encodeURIComponent(document.title)+'"
. "&description='+encodeURIComponent(SELECTION)+'"
. "';";
-$link = 'opera:/button/Go to page,'
- . '"' . rawurlencode($popupLink) . '"'
- . ',,"Post to ' . fixOperaButtonName($GLOBALS['sitename']) . '",'
+$link = 'opera:/button/'
+ //Opera command
+ . 'Go to page,'
+ //command parameter 1
+ . '"' . rawurlencode($popupLink) . '",'
+ //command parameter 2
+ . ','
+ //button title
+ . '"Post to ' . fixOperaButtonName($GLOBALS['sitename']) . '",'
+ //button icon
. '"Scuttle"';
echo jsEscTitle(htmlspecialchars($link));
?>'.replace('SELECTION', selection)