aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--admin.php3
-rw-r--r--bookmarks.php2
-rw-r--r--config.inc.php.example1
-rw-r--r--edit.php11
-rw-r--r--functions.inc.php11
-rw-r--r--history.php2
-rw-r--r--index.php3
-rw-r--r--locales/fr_FR/LC_MESSAGES/messages.mobin25757 -> 25990 bytes
-rw-r--r--locales/fr_FR/LC_MESSAGES/messages.po127
-rw-r--r--locales/messages.po110
-rw-r--r--scuttle.css6
-rw-r--r--search.php2
-rw-r--r--tags.php2
-rw-r--r--templates/bookmarks.tpl.php107
-rw-r--r--templates/sidebar.block.users.php2
-rw-r--r--upgrade.txt2
-rw-r--r--watchlist.php2
17 files changed, 225 insertions, 168 deletions
diff --git a/admin.php b/admin.php
index c51d925..6061565 100644
--- a/admin.php
+++ b/admin.php
@@ -46,10 +46,9 @@ if ( !$currentUser->isAdmin() ) {
}
@list($url, $action, $user) = isset($_SERVER['PATH_INFO']) ? explode('/', $_SERVER['PATH_INFO']) : NULL;
-
if ( $action
-&& strpos($_SERVER['HTTP_REFERER'], ROOT.'admin.php') === 0 // Prevent CSRF attacks
+&& (strpos($_SERVER['HTTP_REFERER'], ROOT.'admin') === 0) // Prevent CSRF attacks
) {
switch ( $action ) {
case 'delete':
diff --git a/bookmarks.php b/bookmarks.php
index 8a09e0a..4922379 100644
--- a/bookmarks.php
+++ b/bookmarks.php
@@ -239,7 +239,7 @@ if ($templatename == 'editbookmark.tpl') {
$tplVars['range'] = 'user';
// Pagination
- $perpage = getPerPageCount();
+ $perpage = getPerPageCount($currentUser);
if (intval(GET_PAGE) > 1) {
$page = GET_PAGE;
$start = ($page - 1) * $perpage;
diff --git a/config.inc.php.example b/config.inc.php.example
index 0b9d658..4518c8c 100644
--- a/config.inc.php.example
+++ b/config.inc.php.example
@@ -51,6 +51,7 @@ $shortdate = 'd-m-Y'; # format of short dates.
$longdate = 'j F Y'; # format of long dates.
$nofollow = true; # include rel="nofollow" attribute on bookmark links ? {true,false}
$defaultPerPage = 10; # default number of bookmarks per page (-1 means no limit)
+$defaultPerPageForAdmins = 10; # default number of bookmarks per page for admins (-1 means no limit)
$defaultRecentDays = 14; # number of days that bookmarks or tags should be considered recent.
# bookmarks order by (date, title, url) in order ascending or descending
# date_desc - By date of entry descending.
diff --git a/edit.php b/edit.php
index 01f2e59..76a977c 100644
--- a/edit.php
+++ b/edit.php
@@ -1,4 +1,5 @@
<?php
+
/***************************************************************************
Copyright (C) 2004 - 2006 Scuttle project
http://sourceforge.net/projects/scuttle/
@@ -39,23 +40,27 @@ isset($_GET['popup']) ? define('GET_POPUP', $_GET['popup']): define('GET_POPUP',
isset($_POST['popup']) ? define('POST_POPUP', $_POST['popup']): define('POST_POPUP', '');
isset($_POST['referrer']) ? define('POST_REFERRER', $_POST['referrer']): define('POST_REFERRER', '');
-
// Header variables
$tplVars['pagetitle'] = T_('Edit Bookmark');
$tplVars['subtitle'] = T_('Edit Bookmark');
$tplVars['loadjs'] = true;
-list ($url, $bookmark) = explode('/', $_SERVER['PATH_INFO']);
+list ($url, $bookmark) = explode('/', $_SERVER['PATH_INFO']);
+
if (!($row = $bookmarkservice->getBookmark(intval($bookmark), true))) {
$tplVars['error'] = sprintf(T_('Bookmark with id %s not was not found'), $bookmark);
$templateservice->loadTemplate('error.404.tpl', $tplVars);
exit();
} else {
+
if (!$bookmarkservice->editAllowed($row)) {
$tplVars['error'] = T_('You are not allowed to edit this bookmark');
$templateservice->loadTemplate('error.500.tpl', $tplVars);
exit();
} else if (POST_SUBMITTED != '') {
+
+
+
if (!POST_TITLE || !POST_ADDRESS) {
$tplVars['error'] = T_('Your bookmark must have a title and an address');
} else {
@@ -66,7 +71,7 @@ if (!($row = $bookmarkservice->getBookmark(intval($bookmark), true))) {
$description = trim(POST_DESCRIPTION);
$privateNote = trim(POST_PRIVATENOTE);
$status = intval(POST_STATUS);
- $tags = trim(POST_TAGS);
+ $tags = trim(POST_TAGS);
if (!$bookmarkservice->updateBookmark($bId, $address, $title, $description, $privateNote, $status, $tags)) {
$tplvars['error'] = T_('Error while saving your bookmark');
diff --git a/functions.inc.php b/functions.inc.php
index 48c7178..08d5f33 100644
--- a/functions.inc.php
+++ b/functions.inc.php
@@ -35,9 +35,14 @@ function filter($data, $type = NULL) {
return $data;
}
-function getPerPageCount() {
- global $defaultPerPage;
- return $defaultPerPage;
+function getPerPageCount($userObject = null) {
+ global $defaultPerPage, $defaultPerPageForAdmins;
+
+ if(isset($defaultPerPageForAdmins) && $userObject != null && $userObject->isAdmin()) {
+ return $defaultPerPageForAdmins;
+ } else {
+ return $defaultPerPage;
+ }
}
function getSortOrder($override = NULL) {
diff --git a/history.php b/history.php
index 1891695..b676515 100644
--- a/history.php
+++ b/history.php
@@ -46,7 +46,7 @@ if ($usecache) {
}
// Pagination
-$perpage = getPerPageCount();
+$perpage = getPerPageCount($currentUser);
if (intval(GET_PAGE) > 1) {
$page = GET_PAGE;
$start = ($page - 1) * $perpage;
diff --git a/index.php b/index.php
index 3f5136c..df55b05 100644
--- a/index.php
+++ b/index.php
@@ -34,6 +34,7 @@ isset($_GET['sort']) ? define('GET_SORT', $_GET['sort']): define('GET_SORT', '')
// Logout action
if (GET_ACTION == "logout") {
$userservice->logout();
+ $tplVars['currentUser'] = null;
$tplvars['msg'] = T_('You have now logged out');
}
@@ -57,7 +58,7 @@ if ($usecache) {
}
// Pagination
-$perpage = getPerPageCount();
+$perpage = getPerPageCount($currentUser);
if (intval(GET_PAGE) > 1) {
$page = GET_PAGE;
$start = ($page - 1) * $perpage;
diff --git a/locales/fr_FR/LC_MESSAGES/messages.mo b/locales/fr_FR/LC_MESSAGES/messages.mo
index 57a6bac..9d586d0 100644
--- a/locales/fr_FR/LC_MESSAGES/messages.mo
+++ b/locales/fr_FR/LC_MESSAGES/messages.mo
Binary files differ
diff --git a/locales/fr_FR/LC_MESSAGES/messages.po b/locales/fr_FR/LC_MESSAGES/messages.po
index cb1ec3a..32b737a 100644
--- a/locales/fr_FR/LC_MESSAGES/messages.po
+++ b/locales/fr_FR/LC_MESSAGES/messages.po
@@ -8,8 +8,8 @@ msgid ""
msgstr ""
"Project-Id-Version: Scuttle\n"
"Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2009-05-19 16:02+0200\n"
-"PO-Revision-Date: 2009-05-19 16:02+0100\n"
+"POT-Creation-Date: 2009-05-19 17:57+0200\n"
+"PO-Revision-Date: 2009-05-19 17:47+0100\n"
"Last-Translator: BenjaminHKB <benjamin.huynh-kim-bang@loria.fr>\n"
"Language-Team: fr-FR <toony.sf@chezouam.net>\n"
"MIME-Version: 1.0\n"
@@ -137,49 +137,49 @@ msgstr "Erreur pendant l'enregistrement de votre signet."
msgid "Save Changes"
msgstr "Enregistrer les modifications"
-#: ../../../functions.inc.php:139
+#: ../../../functions.inc.php:144
msgid "message_die() was called multiple times."
msgstr "message_die() was called multiple times. ?"
-#: ../../../functions.inc.php:151
+#: ../../../functions.inc.php:156
msgid "SQL Error"
msgstr "Erreur SQL"
-#: ../../../functions.inc.php:157
+#: ../../../functions.inc.php:162
msgid "Line"
msgstr "Ligne"
-#: ../../../functions.inc.php:157 ../../../templates/importDelicious.tpl.php:8
+#: ../../../functions.inc.php:162 ../../../templates/importDelicious.tpl.php:8
#: ../../../templates/importNetscape.tpl.php:9
#: ../../../templates/importStructure.tpl.php:10
msgid "File"
msgstr "Fichier"
-#: ../../../functions.inc.php:163
+#: ../../../functions.inc.php:168
msgid "Information"
msgstr "Information"
-#: ../../../functions.inc.php:168
+#: ../../../functions.inc.php:173
msgid "Critical Information"
msgstr "Information critique."
-#: ../../../functions.inc.php:173
+#: ../../../functions.inc.php:178
msgid "An error occured"
msgstr "Une erreur s'est produite."
-#: ../../../functions.inc.php:176
+#: ../../../functions.inc.php:181
msgid "General Error"
msgstr "Erreur générale."
-#: ../../../functions.inc.php:184
+#: ../../../functions.inc.php:189
msgid "An critical error occured"
msgstr "Une erreur critique s'est produite."
-#: ../../../functions.inc.php:187
+#: ../../../functions.inc.php:192
msgid "Critical Error"
msgstr "Erreur critique."
-#: ../../../functions.inc.php:196
+#: ../../../functions.inc.php:201
msgid "DEBUG MODE"
msgstr "Mode de débogage."
@@ -245,20 +245,20 @@ msgstr "Nouveau lien entre tags :"
msgid "Import Structure"
msgstr "Importer une structure"
-#: ../../../index.php:37
+#: ../../../index.php:38
msgid "You have now logged out"
msgstr "Vous êtes maintenant déconnecté."
-#: ../../../index.php:44
+#: ../../../index.php:45
#, php-format
msgid "%s: Recent bookmarks"
msgstr "%s: Signets récents"
-#: ../../../index.php:77
+#: ../../../index.php:78
msgid "Store, share and tag your favourite links"
msgstr "Conservez, partagez et taggez vos liens favoris"
-#: ../../../index.php:78
+#: ../../../index.php:79
msgid "All Bookmarks"
msgstr "Tous les signets"
@@ -686,7 +686,7 @@ msgid "bookmark(s)"
msgstr "signet(s)"
#: ../../../templates/admin.tpl.php:19
-#: ../../../templates/bookmarks.tpl.php:173
+#: ../../../templates/bookmarks.tpl.php:227
msgid "Delete"
msgstr "Supprimer"
@@ -778,74 +778,86 @@ msgstr "Signets des autres utilisateurs pour ce tag"
msgid "Only your bookmarks for this tag"
msgstr "Uniquement vos signets pour ce tag"
+#: ../../../templates/bookmarks.tpl.php:153
+#: ../../../templates/bookmarks.tpl.php:159
+msgid "First"
+msgstr "Première"
+
+#: ../../../templates/bookmarks.tpl.php:154
+#: ../../../templates/bookmarks.tpl.php:160
+msgid "Previous"
+msgstr "Précédent"
+
#: ../../../templates/bookmarks.tpl.php:167
+#: ../../../templates/bookmarks.tpl.php:170
+msgid "Next"
+msgstr "Suivant"
+
+#: ../../../templates/bookmarks.tpl.php:168
+#: ../../../templates/bookmarks.tpl.php:171
+msgid "Last"
+msgstr "Dernière"
+
+#: ../../../templates/bookmarks.tpl.php:181
+#, php-format
+msgid "Page %d of %d"
+msgstr "Page %d de %d"
+
+#: ../../../templates/bookmarks.tpl.php:221
msgid "Tags:"
msgstr "Tags:"
-#: ../../../templates/bookmarks.tpl.php:173
+#: ../../../templates/bookmarks.tpl.php:227
msgid "Edit"
msgstr "Editer"
-#: ../../../templates/bookmarks.tpl.php:177
+#: ../../../templates/bookmarks.tpl.php:231
msgid "Last update"
msgstr "Date de dernière mise à jour"
-#: ../../../templates/bookmarks.tpl.php:180
+#: ../../../templates/bookmarks.tpl.php:234
msgid "by"
msgstr "par"
-#: ../../../templates/bookmarks.tpl.php:182
+#: ../../../templates/bookmarks.tpl.php:236
msgid "you"
msgstr "vous"
-#: ../../../templates/bookmarks.tpl.php:196
+#: ../../../templates/bookmarks.tpl.php:250
#, php-format
msgid " and %s1 other%s"
msgstr " et %s1 autre%s"
-#: ../../../templates/bookmarks.tpl.php:199
+#: ../../../templates/bookmarks.tpl.php:253
#, php-format
msgid " and %2$s%1$s others%3$s"
msgstr " et %2$s%1$s autres%3$s"
-#: ../../../templates/bookmarks.tpl.php:207
+#: ../../../templates/bookmarks.tpl.php:261
+msgid "Copy this bookmark to YOUR bookmarks."
+msgstr "Copier ce signet dans VOS signets."
+
+#: ../../../templates/bookmarks.tpl.php:261
msgid "Copy"
msgstr "Copier"
-#: ../../../templates/bookmarks.tpl.php:226
+#: ../../../templates/bookmarks.tpl.php:280
msgid "This bookmark is certified by an admin user."
msgstr "Ce signet est certifié par un administrateur."
-#: ../../../templates/bookmarks.tpl.php:265
+#: ../../../templates/bookmarks.tpl.php:319
msgid "Private Note on this bookmark"
msgstr "Note privée sur ce signet"
-#: ../../../templates/bookmarks.tpl.php:291
-#: ../../../templates/bookmarks.tpl.php:297
-msgid "First"
-msgstr "Première"
-
-#: ../../../templates/bookmarks.tpl.php:292
-#: ../../../templates/bookmarks.tpl.php:298
-msgid "Previous"
-msgstr "Précédent"
-
-#: ../../../templates/bookmarks.tpl.php:305
-#: ../../../templates/bookmarks.tpl.php:308
-msgid "Next"
-msgstr "Suivant"
-
-#: ../../../templates/bookmarks.tpl.php:306
-#: ../../../templates/bookmarks.tpl.php:309
-msgid "Last"
-msgstr "Dernière"
+#: ../../../templates/bookmarks.tpl.php:330
+msgid "Come back to the top of this page."
+msgstr "Revenir en haut de cette page."
-#: ../../../templates/bookmarks.tpl.php:319
-#, php-format
-msgid "Page %d of %d"
-msgstr "Page %d de %d"
+#: ../../../templates/bookmarks.tpl.php:330
+msgid "Top of the page"
+msgstr "Haut de page"
-#: ../../../templates/bookmarks.tpl.php:325
+#: ../../../templates/bookmarks.tpl.php:336
msgid "No bookmarks available"
msgstr "Pas de signets disponibles."
@@ -924,7 +936,7 @@ msgstr "Note : utiliser \"=\" pour rendre deux tags synonymes ex: europe=eu"
#: ../../../templates/importDelicious.tpl.php:15
#: ../../../templates/importNetscape.tpl.php:16
msgid "Privacy"
-msgstr "Vision"
+msgstr "Accès"
#: ../../../templates/editbookmark.tpl.php:87
#: ../../../templates/importDelicious.tpl.php:18
@@ -1241,12 +1253,12 @@ msgid ""
" at least 5 characters, alphanumeric (no spaces, no dots or other special "
"ones)"
msgstr ""
-"au moins 5 caractères, alphanumériques (pas d'espaces, pas de points ou "
+" au moins 5 caractères, alphanumériques (pas d'espaces, pas de points ou "
"autre caractère spécial)"
#: ../../../templates/register.tpl.php:28
msgid " to send you your password if you forget it"
-msgstr "pour vous envoyer votre mot de passe en cas de perte"
+msgstr " pour vous envoyer votre mot de passe en cas de perte"
#: ../../../templates/register.tpl.php:33
msgid "Antispam question"
@@ -1329,8 +1341,8 @@ msgid "Create a link to another tag"
msgstr "Créer un lien vers un autre tag"
#: ../../../templates/sidebar.block.users.php:14
-msgid "Last Users"
-msgstr "Derniers utilisateurs"
+msgid "New Users"
+msgstr "Nouveaux Utilisateurs"
#: ../../../templates/sidebar.block.users.php:23
#: ../../../templates/users.tpl.php:17
@@ -1459,6 +1471,9 @@ msgstr "Profil"
msgid "created in"
msgstr "Créé en "
+#~ msgid "Last Users"
+#~ msgstr "Derniers utilisateurs"
+
#, fuzzy
#~ msgid "Watched by"
#~ msgstr "Consultés"
diff --git a/locales/messages.po b/locales/messages.po
index 48819cf..2dafde8 100644
--- a/locales/messages.po
+++ b/locales/messages.po
@@ -8,7 +8,7 @@ msgid ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2009-05-19 16:02+0200\n"
+"POT-Creation-Date: 2009-05-19 17:57+0200\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
@@ -133,49 +133,49 @@ msgstr ""
msgid "Save Changes"
msgstr ""
-#: ../../../functions.inc.php:139
+#: ../../../functions.inc.php:144
msgid "message_die() was called multiple times."
msgstr ""
-#: ../../../functions.inc.php:151
+#: ../../../functions.inc.php:156
msgid "SQL Error"
msgstr ""
-#: ../../../functions.inc.php:157
+#: ../../../functions.inc.php:162
msgid "Line"
msgstr ""
-#: ../../../functions.inc.php:157 ../../../templates/importDelicious.tpl.php:8
+#: ../../../functions.inc.php:162 ../../../templates/importDelicious.tpl.php:8
#: ../../../templates/importNetscape.tpl.php:9
#: ../../../templates/importStructure.tpl.php:10
msgid "File"
msgstr ""
-#: ../../../functions.inc.php:163
+#: ../../../functions.inc.php:168
msgid "Information"
msgstr ""
-#: ../../../functions.inc.php:168
+#: ../../../functions.inc.php:173
msgid "Critical Information"
msgstr ""
-#: ../../../functions.inc.php:173
+#: ../../../functions.inc.php:178
msgid "An error occured"
msgstr ""
-#: ../../../functions.inc.php:176
+#: ../../../functions.inc.php:181
msgid "General Error"
msgstr ""
-#: ../../../functions.inc.php:184
+#: ../../../functions.inc.php:189
msgid "An critical error occured"
msgstr ""
-#: ../../../functions.inc.php:187
+#: ../../../functions.inc.php:192
msgid "Critical Error"
msgstr ""
-#: ../../../functions.inc.php:196
+#: ../../../functions.inc.php:201
msgid "DEBUG MODE"
msgstr ""
@@ -241,20 +241,20 @@ msgstr ""
msgid "Import Structure"
msgstr ""
-#: ../../../index.php:37
+#: ../../../index.php:38
msgid "You have now logged out"
msgstr ""
-#: ../../../index.php:44
+#: ../../../index.php:45
#, php-format
msgid "%s: Recent bookmarks"
msgstr ""
-#: ../../../index.php:77
+#: ../../../index.php:78
msgid "Store, share and tag your favourite links"
msgstr ""
-#: ../../../index.php:78
+#: ../../../index.php:79
msgid "All Bookmarks"
msgstr ""
@@ -655,7 +655,7 @@ msgid "bookmark(s)"
msgstr ""
#: ../../../templates/admin.tpl.php:19
-#: ../../../templates/bookmarks.tpl.php:173
+#: ../../../templates/bookmarks.tpl.php:227
msgid "Delete"
msgstr ""
@@ -745,74 +745,86 @@ msgstr ""
msgid "Only your bookmarks for this tag"
msgstr ""
+#: ../../../templates/bookmarks.tpl.php:153
+#: ../../../templates/bookmarks.tpl.php:159
+msgid "First"
+msgstr ""
+
+#: ../../../templates/bookmarks.tpl.php:154
+#: ../../../templates/bookmarks.tpl.php:160
+msgid "Previous"
+msgstr ""
+
#: ../../../templates/bookmarks.tpl.php:167
+#: ../../../templates/bookmarks.tpl.php:170
+msgid "Next"
+msgstr ""
+
+#: ../../../templates/bookmarks.tpl.php:168
+#: ../../../templates/bookmarks.tpl.php:171
+msgid "Last"
+msgstr ""
+
+#: ../../../templates/bookmarks.tpl.php:181
+#, php-format
+msgid "Page %d of %d"
+msgstr ""
+
+#: ../../../templates/bookmarks.tpl.php:221
msgid "Tags:"
msgstr ""
-#: ../../../templates/bookmarks.tpl.php:173
+#: ../../../templates/bookmarks.tpl.php:227
msgid "Edit"
msgstr ""
-#: ../../../templates/bookmarks.tpl.php:177
+#: ../../../templates/bookmarks.tpl.php:231
msgid "Last update"
msgstr ""
-#: ../../../templates/bookmarks.tpl.php:180
+#: ../../../templates/bookmarks.tpl.php:234
msgid "by"
msgstr ""
-#: ../../../templates/bookmarks.tpl.php:182
+#: ../../../templates/bookmarks.tpl.php:236
msgid "you"
msgstr ""
-#: ../../../templates/bookmarks.tpl.php:196
+#: ../../../templates/bookmarks.tpl.php:250
#, php-format
msgid " and %s1 other%s"
msgstr ""
-#: ../../../templates/bookmarks.tpl.php:199
+#: ../../../templates/bookmarks.tpl.php:253
#, php-format
msgid " and %2$s%1$s others%3$s"
msgstr ""
-#: ../../../templates/bookmarks.tpl.php:207
+#: ../../../templates/bookmarks.tpl.php:261
+msgid "Copy this bookmark to YOUR bookmarks."
+msgstr ""
+
+#: ../../../templates/bookmarks.tpl.php:261
msgid "Copy"
msgstr ""
-#: ../../../templates/bookmarks.tpl.php:226
+#: ../../../templates/bookmarks.tpl.php:280
msgid "This bookmark is certified by an admin user."
msgstr ""
-#: ../../../templates/bookmarks.tpl.php:265
+#: ../../../templates/bookmarks.tpl.php:319
msgid "Private Note on this bookmark"
msgstr ""
-#: ../../../templates/bookmarks.tpl.php:291
-#: ../../../templates/bookmarks.tpl.php:297
-msgid "First"
-msgstr ""
-
-#: ../../../templates/bookmarks.tpl.php:292
-#: ../../../templates/bookmarks.tpl.php:298
-msgid "Previous"
+#: ../../../templates/bookmarks.tpl.php:330
+msgid "Come back to the top of this page."
msgstr ""
-#: ../../../templates/bookmarks.tpl.php:305
-#: ../../../templates/bookmarks.tpl.php:308
-msgid "Next"
-msgstr ""
-
-#: ../../../templates/bookmarks.tpl.php:306
-#: ../../../templates/bookmarks.tpl.php:309
-msgid "Last"
-msgstr ""
-
-#: ../../../templates/bookmarks.tpl.php:319
-#, php-format
-msgid "Page %d of %d"
+#: ../../../templates/bookmarks.tpl.php:330
+msgid "Top of the page"
msgstr ""
-#: ../../../templates/bookmarks.tpl.php:325
+#: ../../../templates/bookmarks.tpl.php:336
msgid "No bookmarks available"
msgstr ""
@@ -1262,7 +1274,7 @@ msgid "Create a link to another tag"
msgstr ""
#: ../../../templates/sidebar.block.users.php:14
-msgid "Last Users"
+msgid "New Users"
msgstr ""
#: ../../../templates/sidebar.block.users.php:23
diff --git a/scuttle.css b/scuttle.css
index 4d1b0ee..5cbfb0c 100644
--- a/scuttle.css
+++ b/scuttle.css
@@ -501,9 +501,15 @@ p#sort a:hover {
p#sort span {
display: none;
}
+
+p.backToTop{
+ text-align:center;
+}
+
p.paging {
font-size: small;
margin-left: 1em;
+ text-align:center;
}
p.paging a,
p.paging span.disable {
diff --git a/search.php b/search.php
index 708f429..75d6d7a 100644
--- a/search.php
+++ b/search.php
@@ -54,7 +54,7 @@ if (POST_TERMS != '') {
$tplVars['loadjs'] = true;
// Pagination
- $perpage = getPerPageCount();
+ $perpage = getPerPageCount($currentUser);
if (intval(GET_PAGE) > 1) {
$page = GET_PAGE;
$start = ($page - 1) * $perpage;
diff --git a/tags.php b/tags.php
index 738abb7..376d9fe 100644
--- a/tags.php
+++ b/tags.php
@@ -71,7 +71,7 @@ array(filter($sitename .': '. $pagetitle), createURL('rss', 'all/'. filter($cat,
);
// Pagination
-$perpage = getPerPageCount();
+$perpage = getPerPageCount($currentUser);
if (intval(GET_PAGE) > 1) {
$page = GET_PAGE;
$start = ($page - 1) * $perpage;
diff --git a/templates/bookmarks.tpl.php b/templates/bookmarks.tpl.php
index 5aefc82..5820a4b 100644
--- a/templates/bookmarks.tpl.php
+++ b/templates/bookmarks.tpl.php
@@ -133,6 +133,60 @@ if($currenttag!= '') {
}
?></p>
+<?php
+ // PAGINATION
+
+ // Ordering
+ $sortOrder = '';
+ if (GET_SORT != '') {
+ $sortOrder = 'sort='. GET_SORT;
+ }
+
+ $sortAmp = (($sortOrder) ? '&amp;'. $sortOrder : '');
+ $sortQue = (($sortOrder) ? '?'. $sortOrder : '');
+
+ // Previous
+ $perpage = getPerPageCount($currentUser);
+ if (!$page || $page < 2) {
+ $page = 1;
+ $start = 0;
+ $bfirst = '<span class="disable">'. T_('First') .'</span>';
+ $bprev = '<span class="disable">'. T_('Previous') .'</span>';
+ } else {
+ $prev = $page - 1;
+ $prev = 'page='. $prev;
+ $start = ($page - 1) * $perpage;
+ $bfirst= '<a href="'. sprintf($nav_url, $user, $currenttag, '') . $sortQue .'">'. T_('First') .'</a>';
+ $bprev = '<a href="'. sprintf($nav_url, $user, $currenttag, '?') . $prev . $sortAmp .'">'. T_('Previous') .'</a>';
+ }
+
+ // Next
+ $next = $page + 1;
+ $totalpages = ceil($total / $perpage);
+ if (count($bookmarks) < $perpage || $perpage * $page == $total) {
+ $bnext = '<span class="disable">'. T_('Next') .'</span>';
+ $blast = '<span class="disable">'. T_('Last') ."</span>\n";
+ } else {
+ $bnext = '<a href="'. sprintf($nav_url, $user, $currenttag, '?page=') . $next . $sortAmp .'">'. T_('Next') .'</a>';
+ $blast = '<a href="'. sprintf($nav_url, $user, $currenttag, '?page=') . $totalpages . $sortAmp .'">'. T_('Last') ."</a>\n";
+ }
+
+ // RSS
+ $brss = '';
+ $size = count($rsschannels);
+ for ($i = 0; $i < $size; $i++) {
+ $brss = '<a style="background:#FFFFFF" href="'. $rsschannels[$i][1] .'" title="'. $rsschannels[$i][0] .'"><img src="'. ROOT .'images/rss.gif" width="16" height="16" alt="'. $rsschannels[$i][0] .'" /></a>';
+ }
+
+ $pagesBanner = '<p class="paging">'. $bfirst .'<span> / </span>'. $bprev .'<span> / </span>'. $bnext .'<span> / </span>'. $blast .'<span> / </span>'. sprintf(T_('Page %d of %d'), $page, $totalpages) ." ". $brss ." </p>\n";
+
+ if(getPerPageCount($currentUser) > 10) {
+ echo $pagesBanner; // display a page banner if too many bookmarks to manage
+ }
+
+
+?>
+
<ol <?php echo ($start > 0 ? ' start="'. ++$start .'"' : ''); ?>
@@ -204,7 +258,7 @@ if($currenttag!= '') {
if ($userservice->isLoggedOn()
&& ($currentUser->getId() != $row['uId'])
&& !$bookmarkservice->bookmarkExists($row['bAddress'], $currentUser->getId())) {
- $copy .= ' - <a href="'. createURL('bookmarks', $currentUser->getUsername() .'?action=add&amp;copyOf='. $row['bId']) .'">'. T_('Copy') .'</a>';
+ $copy .= ' - <a href="'. createURL('bookmarks', $currentUser->getUsername() .'?action=add&amp;copyOf='. $row['bId']) .'" title="'.T_('Copy this bookmark to YOUR bookmarks.').'">'. T_('Copy') .'</a>';
}
// Nofollow option
@@ -272,54 +326,11 @@ if($currenttag!= '') {
</ol>
<?php
- // PAGINATION
-
- // Ordering
- $sortOrder = '';
- if (GET_SORT != '') {
- $sortOrder = 'sort='. GET_SORT;
- }
-
- $sortAmp = (($sortOrder) ? '&amp;'. $sortOrder : '');
- $sortQue = (($sortOrder) ? '?'. $sortOrder : '');
-
- // Previous
- $perpage = getPerPageCount();
- if (!$page || $page < 2) {
- $page = 1;
- $start = 0;
- $bfirst = '<span class="disable">'. T_('First') .'</span>';
- $bprev = '<span class="disable">'. T_('Previous') .'</span>';
- } else {
- $prev = $page - 1;
- $prev = 'page='. $prev;
- $start = ($page - 1) * $perpage;
- $bfirst= '<a href="'. sprintf($nav_url, $user, $currenttag, '') . $sortQue .'">'. T_('First') .'</a>';
- $bprev = '<a href="'. sprintf($nav_url, $user, $currenttag, '?') . $prev . $sortAmp .'">'. T_('Previous') .'</a>';
- }
-
- // Next
- $next = $page + 1;
- $totalpages = ceil($total / $perpage);
- if (count($bookmarks) < $perpage || $perpage * $page == $total) {
- $bnext = '<span class="disable">'. T_('Next') .'</span>';
- $blast = '<span class="disable">'. T_('Last') ."</span>\n";
- } else {
- $bnext = '<a href="'. sprintf($nav_url, $user, $currenttag, '?page=') . $next . $sortAmp .'">'. T_('Next') .'</a>';
- $blast = '<a href="'. sprintf($nav_url, $user, $currenttag, '?page=') . $totalpages . $sortAmp .'">'. T_('Last') ."</a>\n";
+ if(getPerPageCount($currentUser)>7) {
+ echo '<p class="backToTop"><a href="#header" title="'.T_('Come back to the top of this page.').'">'.T_('Top of the page').'</a></p>';
}
-
- // RSS
- $brss = '';
- $size = count($rsschannels);
- for ($i = 0; $i < $size; $i++) {
- $brss = '<a style="background:#FFFFFF" href="'. $rsschannels[$i][1] .'" title="'. $rsschannels[$i][0] .'"><img src="'. ROOT .'images/rss.gif" width="16" height="16" alt="'. $rsschannels[$i][0] .'" /></a>';
- }
-
- echo '<p class="paging">'. $bfirst .'<span> / </span>'. $bprev .'<span> / </span>'. $bnext .'<span> / </span>'. $blast .'<span> / </span>'. sprintf(T_('Page %d of %d'), $page, $totalpages) ." ". $brss ." </p>\n";
-
-
-
+ echo $pagesBanner; // display previous and next links pages + RSS link
+
} else {
echo '<p class="error">'.T_('No bookmarks available').'</p>';
diff --git a/templates/sidebar.block.users.php b/templates/sidebar.block.users.php
index b6eef24..3ad18bc 100644
--- a/templates/sidebar.block.users.php
+++ b/templates/sidebar.block.users.php
@@ -11,7 +11,7 @@ $lastUsers = $userservice->getUsers(3);
if ($lastUsers && count($lastUsers) > 0) {
?>
-<h2><?php echo T_('Last Users'); ?></h2>
+<h2><?php echo T_('New Users'); ?></h2>
<div id="users">
<table>
<?php
diff --git a/upgrade.txt b/upgrade.txt
index e09d5e7..98ccf56 100644
--- a/upgrade.txt
+++ b/upgrade.txt
@@ -11,6 +11,8 @@ $sidebarTopMessage = ''; #HTML message appearing at the top of the sidebar
$sidebarBottomMessage = ''; #HTML message appearing at the bottom of the sidebar
$adminsCanModifyBookmarksFromOtherUsers = true; # 'true' if admin users can edit or delete bookmarks belonging to other users. Else 'false'.
$adminsAreAdvisedTagsFromOtherAdmins = false; # 'true' if tags from other admins are proposed to each admin (in add/edit a bookmark page). Else 'false'.
+$defaultPerPageForAdmins = 20; # default number of bookmarks per page for admins (-1 means no limit)
+
=== From version 0.91 to 0.92 ===
diff --git a/watchlist.php b/watchlist.php
index cd3a000..8780395 100644
--- a/watchlist.php
+++ b/watchlist.php
@@ -76,7 +76,7 @@ if ($user) {
$tplVars['userinfo'] =& $userinfo;
// Pagination
- $perpage = getPerPageCount();
+ $perpage = getPerPageCount($currentUser);
if (intval(GET_PAGE) > 1) {
$page = GET_PAGE;
$start = ($page - 1) * $perpage;