From 1eca2d231c79c046a3c122a09bd761fa8f641a6e Mon Sep 17 00:00:00 2001 From: mensonge Date: Tue, 19 May 2009 15:59:55 +0000 Subject: [PATCH] Many interface changes: add 'back to the top links', a variable to display more bookmarks for admins... git-svn-id: https://semanticscuttle.svn.sourceforge.net/svnroot/semanticscuttle/trunk@329 b3834d28-1941-0410-a4f8-b48e95affb8f --- admin.php | 3 +- bookmarks.php | 2 +- config.inc.php.example | 1 + edit.php | 11 +- functions.inc.php | 11 +- history.php | 2 +- index.php | 3 +- locales/fr_FR/LC_MESSAGES/messages.mo | Bin 25757 -> 25990 bytes locales/fr_FR/LC_MESSAGES/messages.po | 165 ++++++++++++++------------ locales/messages.po | 152 +++++++++++++----------- scuttle.css | 6 + search.php | 2 +- tags.php | 2 +- templates/bookmarks.tpl.php | 107 +++++++++-------- templates/sidebar.block.users.php | 2 +- upgrade.txt | 2 + watchlist.php | 2 +- 17 files changed, 265 insertions(+), 208 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 @@ 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 57a6bac0e1c21649cb29481118775e264d31c277..9d586d04f22859b00f110048f836d724d8cf4de0 100644 GIT binary patch delta 6751 zcmYk=3w+P@9>?+T*!^lYY}oua+sw?}Of#BRE{$9=mx`?Ik0G0FE|vUOQ7V_CDI}#6 zp>mRcafC`jhzcpWmCGsBA$1}t&g=dEeRq!U@mr zAtvA&oQS({s4*VXnO?_GF%JXq5=P;l7=+xUv^FeSEr z2CAL;*Z>!y`dNz+^l!Xm)bKWB@@9`MA3`;B9M!>P%*5bCXJ%O#P1%hRI2HB$EYt+% zV{?27wV2yc13rwYcoxIx--I=D9&ChaFbP{=N7T~Yjh(O@UAPhhaVM(5eW;F(VHN78 z(J&eBz+*TKTO~R7ufSx=UW^z>=CG|uuW4T=#^X=T1g>k0lTf?A2-W2}WM9li)Ep0? z*5(XqD8HeG?9X^YF&@=k3hMcmsOQ?D+Ra1VHyp#Tq&YjH8_I1(HEJMp@KIckYA7qk z8AvX+p*$Sb(QMRa%taS2MIFa2$cZxtQ3Jey+AMz>*QQ3I*1T(~$CwN<#Z&~~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b5_v>d!t;`VHEQ372QHI|BOV}hb#gGnFqZhl=3}rv_x}gIajPvC zFWU4ej3OSld2yBKMtrV}y)NQ1+V}i!r?P($Zz;hQO#J9cIsaP~OJnzvzec=Cd`sL- zOd)_%9F&6qgo1IL)0u XqPn(kuW8du3d^%6G;+@y@9p=0g<#J? 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 \n" "Language-Team: fr-FR \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:167 -msgid "Tags:" -msgstr "Tags:" - -#: ../../../templates/bookmarks.tpl.php:173 -msgid "Edit" -msgstr "Editer" - -#: ../../../templates/bookmarks.tpl.php:177 -msgid "Last update" -msgstr "Date de dernière mise à jour" - -#: ../../../templates/bookmarks.tpl.php:180 -msgid "by" -msgstr "par" - -#: ../../../templates/bookmarks.tpl.php:182 -msgid "you" -msgstr "vous" - -#: ../../../templates/bookmarks.tpl.php:196 -#, php-format -msgid " and %s1 other%s" -msgstr " et %s1 autre%s" - -#: ../../../templates/bookmarks.tpl.php:199 -#, 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 -msgid "Copy" -msgstr "Copier" - -#: ../../../templates/bookmarks.tpl.php:226 -msgid "This bookmark is certified by an admin user." -msgstr "Ce signet est certifié par un administrateur." - -#: ../../../templates/bookmarks.tpl.php:265 -msgid "Private Note on this bookmark" -msgstr "Note privée sur ce signet" - -#: ../../../templates/bookmarks.tpl.php:291 -#: ../../../templates/bookmarks.tpl.php:297 +#: ../../../templates/bookmarks.tpl.php:153 +#: ../../../templates/bookmarks.tpl.php:159 msgid "First" msgstr "Première" -#: ../../../templates/bookmarks.tpl.php:292 -#: ../../../templates/bookmarks.tpl.php:298 +#: ../../../templates/bookmarks.tpl.php:154 +#: ../../../templates/bookmarks.tpl.php:160 msgid "Previous" msgstr "Précédent" -#: ../../../templates/bookmarks.tpl.php:305 -#: ../../../templates/bookmarks.tpl.php:308 +#: ../../../templates/bookmarks.tpl.php:167 +#: ../../../templates/bookmarks.tpl.php:170 msgid "Next" msgstr "Suivant" -#: ../../../templates/bookmarks.tpl.php:306 -#: ../../../templates/bookmarks.tpl.php:309 +#: ../../../templates/bookmarks.tpl.php:168 +#: ../../../templates/bookmarks.tpl.php:171 msgid "Last" msgstr "Dernière" -#: ../../../templates/bookmarks.tpl.php:319 +#: ../../../templates/bookmarks.tpl.php:181 #, php-format msgid "Page %d of %d" msgstr "Page %d de %d" -#: ../../../templates/bookmarks.tpl.php:325 +#: ../../../templates/bookmarks.tpl.php:221 +msgid "Tags:" +msgstr "Tags:" + +#: ../../../templates/bookmarks.tpl.php:227 +msgid "Edit" +msgstr "Editer" + +#: ../../../templates/bookmarks.tpl.php:231 +msgid "Last update" +msgstr "Date de dernière mise à jour" + +#: ../../../templates/bookmarks.tpl.php:234 +msgid "by" +msgstr "par" + +#: ../../../templates/bookmarks.tpl.php:236 +msgid "you" +msgstr "vous" + +#: ../../../templates/bookmarks.tpl.php:250 +#, php-format +msgid " and %s1 other%s" +msgstr " et %s1 autre%s" + +#: ../../../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: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:280 +msgid "This bookmark is certified by an admin user." +msgstr "Ce signet est certifié par un administrateur." + +#: ../../../templates/bookmarks.tpl.php:319 +msgid "Private Note on this bookmark" +msgstr "Note privée sur ce signet" + +#: ../../../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:330 +msgid "Top of the page" +msgstr "Haut de page" + +#: ../../../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 \n" "Language-Team: LANGUAGE \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:167 -msgid "Tags:" -msgstr "" - -#: ../../../templates/bookmarks.tpl.php:173 -msgid "Edit" -msgstr "" - -#: ../../../templates/bookmarks.tpl.php:177 -msgid "Last update" -msgstr "" - -#: ../../../templates/bookmarks.tpl.php:180 -msgid "by" -msgstr "" - -#: ../../../templates/bookmarks.tpl.php:182 -msgid "you" -msgstr "" - -#: ../../../templates/bookmarks.tpl.php:196 -#, php-format -msgid " and %s1 other%s" -msgstr "" - -#: ../../../templates/bookmarks.tpl.php:199 -#, php-format -msgid " and %2$s%1$s others%3$s" -msgstr "" - -#: ../../../templates/bookmarks.tpl.php:207 -msgid "Copy" -msgstr "" - -#: ../../../templates/bookmarks.tpl.php:226 -msgid "This bookmark is certified by an admin user." -msgstr "" - -#: ../../../templates/bookmarks.tpl.php:265 -msgid "Private Note on this bookmark" -msgstr "" - -#: ../../../templates/bookmarks.tpl.php:291 -#: ../../../templates/bookmarks.tpl.php:297 +#: ../../../templates/bookmarks.tpl.php:153 +#: ../../../templates/bookmarks.tpl.php:159 msgid "First" msgstr "" -#: ../../../templates/bookmarks.tpl.php:292 -#: ../../../templates/bookmarks.tpl.php:298 +#: ../../../templates/bookmarks.tpl.php:154 +#: ../../../templates/bookmarks.tpl.php:160 msgid "Previous" msgstr "" -#: ../../../templates/bookmarks.tpl.php:305 -#: ../../../templates/bookmarks.tpl.php:308 +#: ../../../templates/bookmarks.tpl.php:167 +#: ../../../templates/bookmarks.tpl.php:170 msgid "Next" msgstr "" -#: ../../../templates/bookmarks.tpl.php:306 -#: ../../../templates/bookmarks.tpl.php:309 +#: ../../../templates/bookmarks.tpl.php:168 +#: ../../../templates/bookmarks.tpl.php:171 msgid "Last" msgstr "" -#: ../../../templates/bookmarks.tpl.php:319 +#: ../../../templates/bookmarks.tpl.php:181 #, php-format msgid "Page %d of %d" msgstr "" -#: ../../../templates/bookmarks.tpl.php:325 +#: ../../../templates/bookmarks.tpl.php:221 +msgid "Tags:" +msgstr "" + +#: ../../../templates/bookmarks.tpl.php:227 +msgid "Edit" +msgstr "" + +#: ../../../templates/bookmarks.tpl.php:231 +msgid "Last update" +msgstr "" + +#: ../../../templates/bookmarks.tpl.php:234 +msgid "by" +msgstr "" + +#: ../../../templates/bookmarks.tpl.php:236 +msgid "you" +msgstr "" + +#: ../../../templates/bookmarks.tpl.php:250 +#, php-format +msgid " and %s1 other%s" +msgstr "" + +#: ../../../templates/bookmarks.tpl.php:253 +#, php-format +msgid " and %2$s%1$s others%3$s" +msgstr "" + +#: ../../../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:280 +msgid "This bookmark is certified by an admin user." +msgstr "" + +#: ../../../templates/bookmarks.tpl.php:319 +msgid "Private Note on this bookmark" +msgstr "" + +#: ../../../templates/bookmarks.tpl.php:330 +msgid "Come back to the top of this page." +msgstr "" + +#: ../../../templates/bookmarks.tpl.php:330 +msgid "Top of the page" +msgstr "" + +#: ../../../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!= '') { } ?>

+'. T_('First') .''; + $bprev = ''. T_('Previous') .''; + } else { + $prev = $page - 1; + $prev = 'page='. $prev; + $start = ($page - 1) * $perpage; + $bfirst= ''. T_('First') .''; + $bprev = ''. T_('Previous') .''; + } + + // Next + $next = $page + 1; + $totalpages = ceil($total / $perpage); + if (count($bookmarks) < $perpage || $perpage * $page == $total) { + $bnext = ''. T_('Next') .''; + $blast = ''. T_('Last') ."\n"; + } else { + $bnext = ''. T_('Next') .''; + $blast = ''. T_('Last') ."\n"; + } + + // RSS + $brss = ''; + $size = count($rsschannels); + for ($i = 0; $i < $size; $i++) { + $brss = ''. $rsschannels[$i][0] .''; + } + + $pagesBanner = '

'. $bfirst .' / '. $bprev .' / '. $bnext .' / '. $blast .' / '. sprintf(T_('Page %d of %d'), $page, $totalpages) ." ". $brss ."

\n"; + + if(getPerPageCount($currentUser) > 10) { + echo $pagesBanner; // display a page banner if too many bookmarks to manage + } + + +?> +
    0 ? ' start="'. ++$start .'"' : ''); ?> @@ -204,7 +258,7 @@ if($currenttag!= '') { if ($userservice->isLoggedOn() && ($currentUser->getId() != $row['uId']) && !$bookmarkservice->bookmarkExists($row['bAddress'], $currentUser->getId())) { - $copy .= ' - '. T_('Copy') .''; + $copy .= ' - '. T_('Copy') .''; } // Nofollow option @@ -272,54 +326,11 @@ if($currenttag!= '') {
7) { + echo '

'.T_('Top of the page').'

'; } - - $sortAmp = (($sortOrder) ? '&'. $sortOrder : ''); - $sortQue = (($sortOrder) ? '?'. $sortOrder : ''); - - // Previous - $perpage = getPerPageCount(); - if (!$page || $page < 2) { - $page = 1; - $start = 0; - $bfirst = ''. T_('First') .''; - $bprev = ''. T_('Previous') .''; - } else { - $prev = $page - 1; - $prev = 'page='. $prev; - $start = ($page - 1) * $perpage; - $bfirst= ''. T_('First') .''; - $bprev = ''. T_('Previous') .''; - } - - // Next - $next = $page + 1; - $totalpages = ceil($total / $perpage); - if (count($bookmarks) < $perpage || $perpage * $page == $total) { - $bnext = ''. T_('Next') .''; - $blast = ''. T_('Last') ."\n"; - } else { - $bnext = ''. T_('Next') .''; - $blast = ''. T_('Last') ."\n"; - } - - // RSS - $brss = ''; - $size = count($rsschannels); - for ($i = 0; $i < $size; $i++) { - $brss = ''. $rsschannels[$i][0] .''; - } - - echo '

'. $bfirst .' / '. $bprev .' / '. $bnext .' / '. $blast .' / '. sprintf(T_('Page %d of %d'), $page, $totalpages) ." ". $brss ."

\n"; - - - + echo $pagesBanner; // display previous and next links pages + RSS link + } else { echo '

'.T_('No bookmarks available').'

'; 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) { ?> -

+

1) { $page = GET_PAGE; $start = ($page - 1) * $perpage;