From aaf293b18da42e41cfcaed16d13f1d25157fd7cb Mon Sep 17 00:00:00 2001
From: Christian Weiske
Date: Sat, 9 Oct 2010 10:18:52 +0200
Subject: make the bookmark page valid xhtml
---
data/templates/bookmarks.tpl.php | 14 +++++++++-----
1 file changed, 9 insertions(+), 5 deletions(-)
(limited to 'data/templates/bookmarks.tpl.php')
diff --git a/data/templates/bookmarks.tpl.php b/data/templates/bookmarks.tpl.php
index e32d3c9..29d7248 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').')';
}
@@ -312,7 +316,7 @@ if ($currenttag!= '') {
. $row['username'] . '';
}
- // Udders!
+ // others
if (!isset($hash)) {
$others = $otherCounts[$row['bAddress']];
$ostart = '';
@@ -390,7 +394,7 @@ if ($currenttag!= '') {
echo ' ' . "\n";
echo '
\n";
if ($row['bDescription'] == '') {
--
cgit v1.2.3
From 2e89b28ed9d902ac208355193e708e9b76845282 Mon Sep 17 00:00:00 2001
From: Christian Weiske
Date: Sat, 9 Oct 2010 12:15:11 +0200
Subject: embed the delete link directly in html instead of using javascript
---
data/templates/bookmarks.tpl.php | 5 ++---
1 file changed, 2 insertions(+), 3 deletions(-)
(limited to 'data/templates/bookmarks.tpl.php')
diff --git a/data/templates/bookmarks.tpl.php b/data/templates/bookmarks.tpl.php
index 29d7248..db560f2 100644
--- a/data/templates/bookmarks.tpl.php
+++ b/data/templates/bookmarks.tpl.php
@@ -296,10 +296,9 @@ if ($currenttag!= '') {
$edit = ' - '
. T_('Edit')
. ''
- . '';
+ .'';
}
// Last update
--
cgit v1.2.3
From a04938f5598b47314bff9f9c49710cd08aa28418 Mon Sep 17 00:00:00 2001
From: Christian Weiske
Date: Tue, 2 Nov 2010 19:07:59 +0100
Subject: get rid of arrow entities
---
data/templates/bookmarks.tpl.php | 12 ++++++------
data/templates/editprofile.tpl.php | 2 +-
data/templates/sidebar.block.menu.php | 6 +++---
data/templates/sidebar.block.recent.php | 2 +-
data/templates/sidebar.block.users.php | 2 +-
data/templates/sidebar.block.watchlist.php | 6 +++---
data/templates/tagrename.tpl.php | 4 ++--
7 files changed, 17 insertions(+), 17 deletions(-)
(limited to 'data/templates/bookmarks.tpl.php')
diff --git a/data/templates/bookmarks.tpl.php b/data/templates/bookmarks.tpl.php
index db560f2..34beb39 100644
--- a/data/templates/bookmarks.tpl.php
+++ b/data/templates/bookmarks.tpl.php
@@ -121,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;
}
diff --git a/data/templates/editprofile.tpl.php b/data/templates/editprofile.tpl.php
index 887dce3..518afbe 100644
--- a/data/templates/editprofile.tpl.php
+++ b/data/templates/editprofile.tpl.php
@@ -26,7 +26,7 @@ $this->includeTemplate($GLOBALS['top_include']);
|
|
- ← |
+ ← |
diff --git a/data/templates/sidebar.block.menu.php b/data/templates/sidebar.block.menu.php
index ee82997..94a9fa2 100644
--- a/data/templates/sidebar.block.menu.php
+++ b/data/templates/sidebar.block.menu.php
@@ -65,13 +65,13 @@ if (sizeof($menuTags) > 0 || ($userid != 0 && $userid === $logged_on_userid)) {
getUser($userid); ?>
0): ?>
- →
+ →
- →
+ →
- →
+ →
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";
?>
- →
+ →
- →
+ →
0):?>
-
+
@@ -27,7 +27,7 @@ foreach($watching as $watchuser) {
-
+
isLoggedOn() && $currentUser->getUsername() == $user): ?>
@@ -49,7 +49,7 @@ foreach($watching as $watchuser) {
-
+
diff --git a/data/templates/tagrename.tpl.php b/data/templates/tagrename.tpl.php
index ea8b516..894b964 100644
--- a/data/templates/tagrename.tpl.php
+++ b/data/templates/tagrename.tpl.php
@@ -11,12 +11,12 @@ window.onload = function() {
|
|
- ← |
+ ← |
|
|
- ← |
+ ← |
|
--
cgit v1.2.3
From 82ada0d75f249733936a0826b115b20cba0657ab Mon Sep 17 00:00:00 2001
From: Christian Weiske
Date: Tue, 15 Mar 2011 19:13:14 +0100
Subject: Implement request #3054906: Show user's full name instead of nickname
---
.../bookmarkcommondescriptionedit.tpl.php | 3 +-
data/templates/bookmarks.tpl.php | 3 +-
data/templates/sidebar.block.users.php | 2 +-
data/templates/tagcommondescriptionedit.tpl.php | 3 +-
data/templates/users.tpl.php | 9 ++++-
doc/ChangeLog | 5 +--
src/SemanticScuttle/Model/UserArray.php | 41 ++++++++++++++++++++++
src/SemanticScuttle/Service/Bookmark.php | 3 +-
src/SemanticScuttle/header.php | 1 +
www/rss.php | 2 +-
10 files changed, 63 insertions(+), 9 deletions(-)
create mode 100644 src/SemanticScuttle/Model/UserArray.php
(limited to 'data/templates/bookmarks.tpl.php')
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/bookmarks.tpl.php b/data/templates/bookmarks.tpl.php
index e32d3c9..c404358 100644
--- a/data/templates/bookmarks.tpl.php
+++ b/data/templates/bookmarks.tpl.php
@@ -309,7 +309,8 @@ if ($currenttag!= '') {
$copy .= T_('you');
} else {
$copy .= ''
- . $row['username'] . '';
+ . SemanticScuttle_Model_UserArray::getName($row)
+ . '';
}
// Udders!
diff --git a/data/templates/sidebar.block.users.php b/data/templates/sidebar.block.users.php
index 3ad18bc..826871e 100644
--- a/data/templates/sidebar.block.users.php
+++ b/data/templates/sidebar.block.users.php
@@ -18,7 +18,7 @@ if ($lastUsers && count($lastUsers) > 0) {
foreach ($lastUsers as $row) {
echo '';
echo '';
- echo $row['username'];
+ echo SemanticScuttle_Model_UserArray::getName($row);
echo '';
echo ' ('.T_('bookmarks').')';
echo ' |
';
diff --git a/data/templates/tagcommondescriptionedit.tpl.php b/data/templates/tagcommondescriptionedit.tpl.php
index d3a006a..f938f93 100644
--- a/data/templates/tagcommondescriptionedit.tpl.php
+++ b/data/templates/tagcommondescriptionedit.tpl.php
@@ -20,7 +20,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/users.tpl.php b/data/templates/users.tpl.php
index c209f94..fa92bef 100644
--- a/data/templates/users.tpl.php
+++ b/data/templates/users.tpl.php
@@ -14,7 +14,14 @@ if ($users && count($users) > 0) {
'.$row['username'].' ('.T_('profile').' '.T_('created in').' '.date('M Y',strtotime($row['uDatetime'])).') : '.T_('bookmarks').'';
+ echo '- '
+ . SemanticScuttle_Model_UserArray::getName($row) . ''
+ . ' ('
+ . T_('profile') . ' '
+ . T_('created in') . ' '
+ . date('M Y', strtotime($row['uDatetime'])) . ')'
+ . ' : '
+ . T_('bookmarks') . '
';
}
?>
diff --git a/doc/ChangeLog b/doc/ChangeLog
index 6144a81..4c93a9a 100644
--- a/doc/ChangeLog
+++ b/doc/ChangeLog
@@ -3,12 +3,13 @@ ChangeLog for SemantiScuttle
0.9X.X - 2010-XX-XX
-------------------
+- Fix bug #3187177: Wrong URL / Export XML Bookmarks
- Fix bug in getTagsForBookmarks() that fetched all tags
-- Show error message on mysqli connection errors
+- Implement request #3054906: Show user's full name instead of nickname
- Implement patch #3059829: update FR_CA translation
+- Show error message on mysqli connection errors
- Update php-gettext library to 1.0.10
- api/posts/add respects the "replace" parameter now
-- Fix bug #3187177: Wrong URL / Export XML Bookmarks
0.97.2 - 2011-02-17
diff --git a/src/SemanticScuttle/Model/UserArray.php b/src/SemanticScuttle/Model/UserArray.php
new file mode 100644
index 0000000..a0d9c9b
--- /dev/null
+++ b/src/SemanticScuttle/Model/UserArray.php
@@ -0,0 +1,41 @@
+
+ * @license GPL http://www.gnu.org/licenses/gpl.html
+ * @link http://sourceforge.net/projects/semanticscuttle
+ */
+
+/**
+ * Mostly static methods that help working with a user row array from database.
+ *
+ * @category Bookmarking
+ * @package SemanticScuttle
+ * @author Christian Weiske
+ * @license GPL http://www.gnu.org/licenses/gpl.html
+ * @link http://sourceforge.net/projects/semanticscuttle
+ */
+class SemanticScuttle_Model_UserArray
+{
+ /**
+ * Returns full user name as specified in the profile if it is set,
+ * otherwise the nickname/loginname is returned.
+ *
+ * @param array $row User row array from database
+ *
+ * @return string Full name or username
+ */
+ public static function getName($row)
+ {
+ if (isset($row['name']) && $row['name']) {
+ return $row['name'];
+ }
+ return $row['username'];
+ }
+}
+?>
\ No newline at end of file
diff --git a/src/SemanticScuttle/Service/Bookmark.php b/src/SemanticScuttle/Service/Bookmark.php
index 6f8a172..a30ad5f 100644
--- a/src/SemanticScuttle/Service/Bookmark.php
+++ b/src/SemanticScuttle/Service/Bookmark.php
@@ -734,7 +734,8 @@ class SemanticScuttle_Service_Bookmark extends SemanticScuttle_DbService
if (SQL_LAYER == 'mysql4') {
$query_1 .= 'SQL_CALC_FOUND_ROWS ';
}
- $query_1 .= 'B.*, U.'. $userservice->getFieldName('username');
+ $query_1 .= 'B.*, U.'. $userservice->getFieldName('username')
+ . ', U.name';
$query_2 = ' FROM '. $userservice->getTableName() .' AS U'
. ', '. $this->getTableName() .' AS B';
diff --git a/src/SemanticScuttle/header.php b/src/SemanticScuttle/header.php
index d1a5c29..4fecb8f 100644
--- a/src/SemanticScuttle/header.php
+++ b/src/SemanticScuttle/header.php
@@ -68,6 +68,7 @@ require_once 'SemanticScuttle/Service.php';
require_once 'SemanticScuttle/DbService.php';
require_once 'SemanticScuttle/Service/Factory.php';
require_once 'SemanticScuttle/functions.php';
+require_once 'SemanticScuttle/Model/UserArray.php';
if (count($GLOBALS['serviceoverrides']) > 0
&& !defined('UNIT_TEST_MODE')
diff --git a/www/rss.php b/www/rss.php
index 6dcfb4c..298d9ba 100644
--- a/www/rss.php
+++ b/www/rss.php
@@ -116,7 +116,7 @@ foreach ($bookmarks_tmp as $key => $row) {
'title' => $row['bTitle'],
'link' => $_link,
'description' => $row['bDescription'],
- 'creator' => $row['username'],
+ 'creator' => SemanticScuttle_Model_UserArray::getName($row),
'pubdate' => $_pubdate,
'tags' => $row['tags']
);
--
cgit v1.2.3