diff --git a/.gitignore b/.gitignore index 6f6d812..69eff7d 100644 --- a/.gitignore +++ b/.gitignore @@ -1,4 +1,5 @@ dist/ build.properties package.xml +semanticscuttle-dump.sql data/config.unittest.php diff --git a/data/config.default.php b/data/config.default.php index 85b9ccb..b975fac 100644 --- a/data/config.default.php +++ b/data/config.default.php @@ -334,7 +334,7 @@ $index_sidebar_blocks = array( * @var string * @link http://php.net/date */ -$shortdate = 'd-m-Y'; +$shortdate = 'Y-m-d'; /** * Format of long dates. diff --git a/data/locales/de_DE/LC_MESSAGES/messages.mo b/data/locales/de_DE/LC_MESSAGES/messages.mo index 0b18fac..05778b7 100644 Binary files a/data/locales/de_DE/LC_MESSAGES/messages.mo and b/data/locales/de_DE/LC_MESSAGES/messages.mo differ diff --git a/data/locales/de_DE/LC_MESSAGES/messages.po b/data/locales/de_DE/LC_MESSAGES/messages.po index fdd27a5..a5c774f 100644 --- a/data/locales/de_DE/LC_MESSAGES/messages.po +++ b/data/locales/de_DE/LC_MESSAGES/messages.po @@ -604,7 +604,7 @@ msgid "" "file to your computer" msgstr "" "Speichern Sie die resultierende XMLXML-Datei lokal auf Ihrem Computer" #: data/templates/importDelicious.tpl.php:35 msgid "" diff --git a/data/templates/admin.tpl.php b/data/templates/admin.tpl.php index c8d47e8..50680f6 100644 --- a/data/templates/admin.tpl.php +++ b/data/templates/admin.tpl.php @@ -11,7 +11,7 @@ foreach($users as $user) { echo ''; if($user->getUsername() != $currentUser->getUsername()) { diff --git a/data/templates/bookmarkcommondescriptionedit.tpl.php b/data/templates/bookmarkcommondescriptionedit.tpl.php index af5909a..807c58b 100644 --- a/data/templates/bookmarkcommondescriptionedit.tpl.php +++ b/data/templates/bookmarkcommondescriptionedit.tpl.php @@ -30,7 +30,8 @@ window.onload = function() { if(strlen($description['cdDatetime'])>0) { echo T_('Last modification:').' '.$description['cdDatetime'].', '; $lastUser = $userservice->getUser($description['uId']); - echo ''.$lastUser['username'].''; + echo '' + . SemanticScuttle_Model_UserArray::getName($lastUser) . ''; } ?> diff --git a/data/templates/bookmarklet.inc.php b/data/templates/bookmarklet.inc.php new file mode 100644 index 0000000..9867745 --- /dev/null +++ b/data/templates/bookmarklet.inc.php @@ -0,0 +1,117 @@ +

+

+ + diff --git a/data/templates/bookmarks.tpl.php b/data/templates/bookmarks.tpl.php index e32d3c9..55d6a0f 100644 --- a/data/templates/bookmarks.tpl.php +++ b/data/templates/bookmarks.tpl.php @@ -62,12 +62,16 @@ if($currenttag!= '' && $cdservice->getLastTagDescription($currenttag)) { } //common tag description edit -if($userservice->isLoggedOn()) { - if($currenttag!= '' && ($GLOBALS['enableCommonTagDescriptionEditedByAll'] || $currentUser->isAdmin())) { +if ($userservice->isLoggedOn()) { + if ($currenttag != '' + && ($GLOBALS['enableCommonTagDescriptionEditedByAll'] + || $currentUser->isAdmin() + ) + ) { echo ' '; echo !is_array($cDescription) || strlen($cDescription['cdDescription'])==0?T_('Edit the common description of this tag'):''; echo ' '; - } elseif(isset($hash)) { + } else if (isset($hash)) { echo ' ('; echo T_('Edit the common description of this bookmark').')'; } @@ -117,33 +121,33 @@ $votingSort = 'voting_desc'; switch(getSortOrder()) { case 'date_asc': - $dateArrow = ' ↑'; + $dateArrow = ' ↑'; $dateSort = 'date_desc'; break; case 'title_asc': - $titleArrow = ' ↑'; + $titleArrow = ' ↑'; $titleSort = 'title_desc'; break; case 'title_desc': - $titleArrow = ' ↓'; + $titleArrow = ' ↓'; $titleSort = 'title_asc'; break; case 'voting_asc': - $votingArrow = ' ↑'; + $votingArrow = ' ↑'; $votingSort = 'voting_desc'; break; case 'voting_desc': - $votingArrow = ' ↓'; + $votingArrow = ' ↓'; $votingSort = 'voting_asc'; break; case 'date_desc': default: - $dateArrow = ' ↓'; + $dateArrow = ' ↓'; $dateSort = 'date_asc'; break; } @@ -292,10 +296,9 @@ if ($currenttag!= '') { $edit = ' - ' . T_('Edit') . '' - . ''; + .''; } // Last update @@ -309,10 +312,11 @@ if ($currenttag!= '') { $copy .= T_('you'); } else { $copy .= '' - . $row['username'] . ''; + . SemanticScuttle_Model_UserArray::getName($row) + . ''; } - // Udders! + // others if (!isset($hash)) { $others = $otherCounts[$row['bAddress']]; $ostart = ''; @@ -390,7 +394,7 @@ if ($currenttag!= '') { echo ' ' . "\n"; echo ' \n"; if ($row['bDescription'] == '') { diff --git a/data/templates/dynamictags.inc.php b/data/templates/dynamictags.inc.php index b18565b..8cf07c1 100644 --- a/data/templates/dynamictags.inc.php +++ b/data/templates/dynamictags.inc.php @@ -36,28 +36,40 @@ $allPopularTagsCount = count($allPopularTags); // function printing the cloud -function writeTagsProposition($tagsCloud, $title) { - echo 'document.write(\'
\');'; - echo 'document.write(\'

'. $title .'<\/h3>\');'; - echo 'document.write(\'

\');'; +function writeTagsProposition($tagsCloud, $title) +{ + static $id = 0; + ++$id; + + echo <<' ++ '

$title

' ++ '

' ++ '
'); +JS; $taglist = ''; - foreach(array_keys($tagsCloud) as $key) { - $row =& $tagsCloud[$key]; + foreach (array_keys($tagsCloud) as $key) { + $row = $tagsCloud[$key]; $entries = T_ngettext('bookmark', 'bookmarks', $row['bCount']); - $taglist .= ''. filter($row['tag']) .'<\/span> '; + $taglist .= '' + . filter($row['tag']) + . ' '; } - - echo 'document.write(\''. $taglist .'\');'; - echo 'document.write(\'<\/p>\');'; - echo 'document.write(\'<\/div>\');'; - + echo '$(\'#edit-tagcloud-' . $id . ' p\').append(' + . json_encode($taglist) + . ");\n"; } if ($allPopularTagsCount > 0 || $userPopularTagsCount > 0 ) { ?> - - +
diff --git a/data/templates/editbookmark.tpl.php b/data/templates/editbookmark.tpl.php index 25524b9..8b71230 100644 --- a/data/templates/editbookmark.tpl.php +++ b/data/templates/editbookmark.tpl.php @@ -16,33 +16,41 @@ switch ($row['bStatus']) { break; } -$this->includeTemplate("dojo.inc"); - function jsEscTitle($title) { return addcslashes($title, "'"); } +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']); +} + +$ajaxUrl = ROOT . 'ajax/' + . ( + ($GLOBALS['adminsAreAdvisedTagsFromOtherAdmins'] && $currentUser->isAdmin()) + ? 'getadmintags' + : 'getcontacttags' + ) . '.php'; ?> - - - - -
- + - + - style="display:none"> - - + + + - + @@ -124,65 +132,83 @@ function jsEscTitle($title) ?> - -
@@ -50,7 +58,7 @@ function jsEscTitle($title) + 0): ?>

@@ -67,19 +75,19 @@ function jsEscTitle($title)
+
- -
" to include one tag in another. e.g.: europe>france>paris')?>" to include one tag in another. e.g.: europe>france>paris'))?>
+ +
+ + + + + + + + includeTemplate('dynamictags.inc'); // Bookmarklets and import links if (empty($_REQUEST['popup']) && (!isset($showdelete) || !$showdelete)) { + +$this->includeTemplate('bookmarklet.inc.php'); ?> - -

- -

- - + diff --git a/data/templates/sidebar.block.recent.php b/data/templates/sidebar.block.recent.php index e34f820..1ffeb4d 100644 --- a/data/templates/sidebar.block.recent.php +++ b/data/templates/sidebar.block.recent.php @@ -31,7 +31,7 @@ if ($recentTags && count($recentTags) > 0) { } echo $contents ."

\n"; ?> -

+

'; - echo $row['shTerms']; + echo htmlspecialchars($row['shTerms']); echo ''; echo ' '; - echo $row['username']; + echo SemanticScuttle_Model_UserArray::getName($row); echo ''; echo ' ('.T_('bookmarks').')'; echo ''; @@ -27,7 +27,7 @@ foreach ($lastUsers as $row) { ?> -

+

0):?> -

+