From 8c4b12e679d370d72f04a749ee1d55a7ca837983 Mon Sep 17 00:00:00 2001 From: "Duck (Jakob Munih)" Date: Sun, 22 Feb 2009 20:48:05 +0100 Subject: [PATCH] Add feeds. Remove dirver isFriend and isBlacklisted copy of friends method. Fix send message link. Slovenian translation update --- folks/edit/friends/blacklist.php | 5 +- folks/edit/friends/for.php | 6 +- folks/edit/friends/friends.php | 6 +- folks/edit/friends/from.php | 6 +- folks/edit/friends/index.php | 6 +- folks/edit/friends/know.php | 77 ++++++++++++++++ folks/edit/friends/of.php | 8 +- folks/lib/Driver.php | 52 ----------- folks/lib/Folks.php | 25 +++--- folks/lib/Friends.php | 16 ++++ folks/locale/sl_SI/LC_MESSAGES/folks.mo | Bin 27453 -> 27849 bytes folks/po/folks.pot | 153 +++++++++++++++++++------------- folks/po/sl_SI.po | 153 +++++++++++++++++++------------- folks/rss/activity.php | 57 ++++++++++++ folks/rss/friends.php | 52 +++++++++++ folks/rss/know.php | 65 ++++++++++++++ folks/rss/online.php | 28 ++++++ folks/templates/edit/add.php | 3 + folks/templates/feed/activities.php | 27 ++++++ folks/templates/feed/feed.php | 27 ++++++ folks/templates/user/user.php | 13 ++- folks/user.php | 8 +- 22 files changed, 580 insertions(+), 213 deletions(-) create mode 100644 folks/edit/friends/know.php create mode 100644 folks/rss/activity.php create mode 100644 folks/rss/friends.php create mode 100644 folks/rss/know.php create mode 100644 folks/rss/online.php create mode 100644 folks/templates/edit/add.php create mode 100644 folks/templates/feed/activities.php create mode 100644 folks/templates/feed/feed.php diff --git a/folks/edit/friends/blacklist.php b/folks/edit/friends/blacklist.php index 2dbd1cc67..eaaffebd4 100644 --- a/folks/edit/friends/blacklist.php +++ b/folks/edit/friends/blacklist.php @@ -16,9 +16,6 @@ require_once FOLKS_BASE . '/lib/Forms/AddFriend.php'; require_once FOLKS_BASE . '/edit/tabs.php'; $title = _("Blacklist"); -$remove_url = Util::addParameter(Horde::applicationUrl('edit/friends/blacklist.php'), 'user', null); -$remove_img = Horde::img('delete.png', '', '', $registry->getImageDir('horde')); -$profile_img = Horde::img('user.png', '', '', $registry->getImageDir('horde')); // Load driver require_once FOLKS_BASE . '/lib/Friends.php'; @@ -77,7 +74,7 @@ $actions = array( array('url' => Horde::applicationUrl('user.php'), 'img' => Horde::img('user.png', '', '', $registry->getImageDir('horde')), 'id' => 'user', - 'name' => _("Profile"))); + 'name' => _("View profile"))); $friend_form = new Folks_AddFriend_Form($vars, _("Add or remove user"), 'blacklist'); diff --git a/folks/edit/friends/for.php b/folks/edit/friends/for.php index 16a35e567..5ea034d02 100644 --- a/folks/edit/friends/for.php +++ b/folks/edit/friends/for.php @@ -32,7 +32,7 @@ $actions = array( array('url' => Horde::applicationUrl('user.php'), 'img' => Horde::img('user.png', '', '', $registry->getImageDir('horde')), 'id' => 'user', - 'name' => _("Profile")), + 'name' => _("View profile")), array('url' => Horde::applicationUrl('edit/friends/approve.php'), 'img' => Horde::img('tick.png', '', '', $registry->getImageDir('horde')), 'id' => 'user', @@ -42,10 +42,10 @@ $actions = array( 'id' => 'user', 'name' => _("Reject"))); if ($registry->hasInterface('letter')) { - $actions[] = array('url' => Horde::applicationUrl('user.php'), + $actions[] = array('url' => $registry->callByPackage('letter', 'compose', ''), 'img' => Horde::img('letter.png', '', '', $registry->getImageDir('letter')), 'id' => 'user_to', - 'name' => $registry->get('name', 'letter')); + 'name' => _("Send message")); } require FOLKS_TEMPLATES . '/common-header.inc'; diff --git a/folks/edit/friends/friends.php b/folks/edit/friends/friends.php index 73c6b9dc4..3fb489268 100644 --- a/folks/edit/friends/friends.php +++ b/folks/edit/friends/friends.php @@ -37,12 +37,12 @@ $actions = array( array('url' => Horde::applicationUrl('user.php'), 'img' => Horde::img('user.png', '', '', $registry->getImageDir('horde')), 'id' => 'user', - 'name' => _("Profile"))); + 'name' => _("View profile"))); if ($registry->hasInterface('letter')) { - $actions[] = array('url' => Horde::applicationUrl('user.php'), + $actions[] = array('url' => $registry->callByPackage('letter', 'compose', ''), 'img' => Horde::img('letter.png', '', '', $registry->getImageDir('letter')), 'id' => 'user_to', - 'name' => $registry->get('name', 'letter')); + 'name' => _("Send message")); } require FOLKS_TEMPLATES . '/common-header.inc'; diff --git a/folks/edit/friends/from.php b/folks/edit/friends/from.php index da9e20f05..e8ac38db0 100644 --- a/folks/edit/friends/from.php +++ b/folks/edit/friends/from.php @@ -32,12 +32,12 @@ $actions = array( array('url' => Horde::applicationUrl('user.php'), 'img' => Horde::img('user.png', '', '', $registry->getImageDir('horde')), 'id' => 'user', - 'name' => _("Profile"))); + 'name' => _("View profile"))); if ($registry->hasInterface('letter')) { - $actions[] = array('url' => Horde::applicationUrl('user.php'), + $actions[] = array('url' => $registry->callByPackage('letter', 'compose', ''), 'img' => Horde::img('letter.png', '', '', $registry->getImageDir('letter')), 'id' => 'user_to', - 'name' => $registry->get('name', 'letter')); + 'name' => _("Send message")); } require FOLKS_TEMPLATES . '/common-header.inc'; diff --git a/folks/edit/friends/index.php b/folks/edit/friends/index.php index 41ecc085b..4abbb6a77 100644 --- a/folks/edit/friends/index.php +++ b/folks/edit/friends/index.php @@ -36,12 +36,12 @@ $actions = array( array('url' => Horde::applicationUrl('user.php'), 'img' => Horde::img('user.png', '', '', $registry->getImageDir('horde')), 'id' => 'user', - 'name' => _("Profile"))); + 'name' => _("View profile"))); if ($registry->hasInterface('letter')) { - $actions[] = array('url' => Horde::applicationUrl('user.php'), + $actions[] = array('url' => $registry->callByPackage('letter', 'compose', ''), 'img' => Horde::img('letter.png', '', '', $registry->getImageDir('letter')), 'id' => 'user_to', - 'name' => $registry->get('name', 'letter')); + 'name' => _("Send message")); } require FOLKS_TEMPLATES . '/common-header.inc'; diff --git a/folks/edit/friends/know.php b/folks/edit/friends/know.php new file mode 100644 index 000000000..32edf90f8 --- /dev/null +++ b/folks/edit/friends/know.php @@ -0,0 +1,77 @@ + + * @package Folks + */ + +require_once dirname(__FILE__) . '/../../lib/base.php';; +require_once FOLKS_BASE . '/edit/tabs.php'; + +$title = _("People you might know"); + +// Load driver +require_once FOLKS_BASE . '/lib/Friends.php'; +$friends = Folks_Friends::singleton(); + +// Get friends +$my_list = $friends->getFriends(); +if ($my_list instanceof PEAR_Error) { + $notification->push($my_list); + $my_list = array(); +} + +// Get all friends of frends and make a top list of common users +$possibilities = array(); +foreach ($my_list as $friend) { + $friends = Folks_Friends::singleton(null, array('user' => $friend)); + $friend_friends = $friends->getFriends(); + if ($friend_friends instanceof PEAR_Error) { + continue; + } + foreach ($friend_friends as $friend_friend) { + if ($friend_friend == Auth::getAuth() || + in_array($friend_friend, $my_list)) { + continue; + } elseif (isset($possibilities[$friend_friend])) { + $possibilities[$friend_friend] += 1; + } else { + $possibilities[$friend_friend] = 0; + } + } +} + +arsort($possibilities); +$list = array_slice($possibilities, 0, 20, true); +$list = array_keys($list); + +// Prepare actions +$actions = array( + array('url' => Horde::applicationUrl('edit/friends/add.php'), + 'img' => Horde::img('delete.png', '', '', $registry->getImageDir('horde')), + 'id' => 'user', + 'name' => _("Add")), + array('url' => Horde::applicationUrl('user.php'), + 'img' => Horde::img('user.png', '', '', $registry->getImageDir('horde')), + 'id' => 'user', + 'name' => _("View profile"))); +if ($registry->hasInterface('letter')) { + $actions[] = array('url' => $registry->callByPackage('letter', 'compose', ''), + 'img' => Horde::img('letter.png', '', '', $registry->getImageDir('letter')), + 'id' => 'user_to', + 'name' => _("Send message")); +} + +require FOLKS_TEMPLATES . '/common-header.inc'; +require FOLKS_TEMPLATES . '/menu.inc'; + +echo $tabs->render('friends'); +require FOLKS_TEMPLATES . '/edit/friends.php'; + +require $registry->get('templates', 'horde') . '/common-footer.inc'; \ No newline at end of file diff --git a/folks/edit/friends/of.php b/folks/edit/friends/of.php index 11a7084b6..b3f4d4897 100644 --- a/folks/edit/friends/of.php +++ b/folks/edit/friends/of.php @@ -32,13 +32,13 @@ $actions = array( array('url' => Horde::applicationUrl('user.php'), 'img' => Horde::img('user.png', '', '', $registry->getImageDir('horde')), 'id' => 'user', - 'name' => _("Profile"))); + 'name' => _("View profile"))); if ($registry->hasInterface('letter')) { - $actions[] = array('url' => Horde::applicationUrl('user.php'), + $actions[] = array('url' => $registry->callByPackage('letter', 'compose', ''), 'img' => Horde::img('letter.png', '', '', $registry->getImageDir('letter')), 'id' => 'user_to', - 'name' => $registry->get('name', 'letter')); -}; + 'name' => _("Send message")); +} require FOLKS_TEMPLATES . '/common-header.inc'; require FOLKS_TEMPLATES . '/menu.inc'; diff --git a/folks/lib/Driver.php b/folks/lib/Driver.php index 241681862..0829354f5 100644 --- a/folks/lib/Driver.php +++ b/folks/lib/Driver.php @@ -157,58 +157,6 @@ class Folks_Driver { } /** - * Check if user is on blacklist - * - * @param string $user User owner - * @param string $chcek User to check - * - * @return boolean - */ - public function isBlacklisted($user, $check) - { - require_once FOLKS_BASE . '/lib/Friends.php'; - $friends = Folks_Friends::singleton(null, array('user' => $user)); - return $friends->isBlacklisted($check); - } - - /** - * Check if user is on blacklist - * - * @param string $user User owner - * @param string $chcek User to check - * - * @return boolean - */ - public function isFriend($user, $check) - { - if ($user == $check) { - return true; - } - - require_once FOLKS_BASE . '/lib/Friends.php'; - $friends = Folks_Friends::singleton(null, array('user' => $user)); - return $friends->isFriend($check); - } - - /** - * Check if user is on blacklist - * - * @param string $user User owner - * - * @return array firends usernames - */ - public function getFriends($user) - { - require_once FOLKS_BASE . '/lib/Friends.php'; - $friends = Folks_Friends::singleton(null, array('user' => $user)); - if ($friends) { - return array(); - } else { - return $friends->getFriends(); - } - } - - /** * Get usersnames online * * @return array users online diff --git a/folks/lib/Folks.php b/folks/lib/Folks.php index 84fe1dca9..86219d4e6 100644 --- a/folks/lib/Folks.php +++ b/folks/lib/Folks.php @@ -56,10 +56,10 @@ class Folks { /** * Get Image path */ - static public function getImageUrl($user, $view = 'small') + static public function getImageUrl($user, $view = 'small', $full = false) { if (empty($GLOBALS['conf']['images']['direct'])) { - return Util::addParameter(Horde::applicationUrl('view.php'), + return Util::addParameter(Horde::applicationUrl('view.php', $full), array('view' => $view, 'id' => $user), null, false); @@ -85,9 +85,7 @@ class Folks { */ function getUrlFor($controller, $data, $full = false, $append_session = 0) { - switch ($controller) { - case 'list': if (empty($GLOBALS['conf']['urls']['pretty'])) { return Horde::applicationUrl($data . '.php', $full, $append_session); @@ -95,6 +93,13 @@ class Folks { return Horde::applicationUrl('list/' . $data, $full, $append_session); } + case 'feed': + if (empty($GLOBALS['conf']['urls']['pretty'])) { + return Horde::applicationUrl('rss/' . $data . '.php', $full, $append_session); + } else { + return Horde::applicationUrl('feed/' . $data, $full, $append_session); + } + case 'user': if (empty($GLOBALS['conf']['urls']['pretty'])) { return Util::addParameter(Horde::applicationUrl('user.php', $full, $append_session), 'user', $data); @@ -227,11 +232,9 @@ class Folks { $mail = new Horde_Mime_Mail($subject, $body, $to, $GLOBALS['conf']['support'], NLS::getCharset()); require_once FOLKS_BASE . '/lib/version.php'; - try { - $mail->addHeader('User-Agent', 'Folks ' . FOLKS_VERSION); - $mail->addHeader('X-Originating-IP', $_SERVER['REMOTE_ADDR']); - $mail->addHeader('X-Remote-Browser', $_SERVER['HTTP_USER_AGENT']); - } catch (Horde_Mime_Exception $e) {} + $mail->addHeader('User-Agent', 'Folks ' . FOLKS_VERSION); + $mail->addHeader('X-Originating-IP', $_SERVER['REMOTE_ADDR']); + $mail->addHeader('X-Remote-Browser', $_SERVER['HTTP_USER_AGENT']); foreach ($attaches as $file) { if (file_exists($file)) { @@ -241,9 +244,7 @@ class Folks { list($mail_driver, $mail_params) = Horde::getMailerConfig(); - try { - return $mail->send($mail_driver, $mail_params); - } catch (Horde_Mime_Exception $e) {} + return $mail->send($mail_driver, $mail_params); } /** diff --git a/folks/lib/Friends.php b/folks/lib/Friends.php index 4b06b2815..cb3ad4681 100644 --- a/folks/lib/Friends.php +++ b/folks/lib/Friends.php @@ -184,6 +184,12 @@ class Folks_Friends { */ public function getBlacklist() { + static $blacklist; + + if (is_array($blacklist)) { + return $blacklist; + } + $blacklist = $this->_cache->get('folksBlacklist' . $this->_user, $GLOBALS['conf']['cache']['default_lifetime']); if ($blacklist) { return unserialize($blacklist); @@ -336,6 +342,12 @@ class Folks_Friends { */ public function getFriends($group = null) { + static $friends; + + if (is_array($friends)) { + return $friends; + } + $friends = $this->_cache->get('folksFriends' . $this->_user . $group, $GLOBALS['conf']['cache']['default_lifetime']); if ($friends) { return unserialize($friends); @@ -402,6 +414,10 @@ class Folks_Friends { */ public function isFriend($user) { + if ($user == $this->_user) { + return true; + } + $friends = $this->getFriends(); if ($friends instanceof PEAR_Error) { return $friends; diff --git a/folks/locale/sl_SI/LC_MESSAGES/folks.mo b/folks/locale/sl_SI/LC_MESSAGES/folks.mo index 9947ed8ab7f6c7f86d887c5c952c2945ad75ec9e..4ad339ee2a3b087ca1913f0b2b437a22c53fdd71 100644 GIT binary patch delta 7892 zcmZA53w+P@9>?+T?qfC^o7r6U$8L-b!)9b_Y}06F=CWZnj5gZVjHJt7I_2mhm7qTUTdus6Ce6S>5c zqd(q)fp|OW`lZf!w^>C&1HXzs_z||n!`L3bL){P%V@xoHV@vFcEwC51!88oTeC&l2 zF&dX(1U`xC|25P^wxPdq8?)O}FlI06f`h1zn^6OQjsbWYNsjpii_q6)%mf^dI=>0k z@fP&Mov7<~V;mkpE$kd>!oj35&`rTbK?8P2Ura@%EZv%k-Kghc7FJ^i+=!{T8+HG$ z7><5jjS0hORDV5D8S8^OKNvN^(dgDp##7MDt5J_)4l32lP#vvCrE(MMx_41~;zR6- z-{2G2o>?jrTTzeVP1FQF#Dmz3TG;ck&H`SJCI8wq`)N?BkE2rd9cqB{n22HIF99>K zHBLpIf~iLhbU#MoT2wzOT$CH1pG=c`Lv>R%m{+NT4?S*Sm z12m#P?nG^>J=UYBm7hU>ynrm$_|Taql7Kp&h8iammHE+b3R=N*WU*#0s)I+YYtWDS z2GpZ@4t3qT=)%*e*DQ=Q>An)`?|3MTq!))ZS znbD}tHy`=-n0syebEs4wMD2wiQ4^~Wvmo6;8axVtB|>w+p#5XLS<$v>iQkl zJ?K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ReSWKe37Y@0;Fx zZTfA|c9B?3+^zX%lk^}SBl;68R_j5+kLX1VCA1B)u{Pj8OrC7KfbS8v5vPb(iJRL& zl5z&6tq(E6{vaEX)9{ZHr8z_dafo=5h~e0dL^Kge`>*xakGzo1n_CD;Ch-;#M*pK`$FIht zxY6WCa4GRMaX&GdSV3r;O6(!Bh*88=;vPcVX2RW@i?1PRg1fObYAe75VvuRCr7xTO zf7(afEXEXoyon7s7yJUH?dv5gc iob2Q6@3}E>n3w0a!IvD%rw_U8dAPjD;W<+AbHtyVmJtR3 diff --git a/folks/po/folks.pot b/folks/po/folks.pot index f4b22bf08..8c47db837 100644 --- a/folks/po/folks.pot +++ b/folks/po/folks.pot @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: PACKAGE VERSION\n" "Report-Msgid-Bugs-To: dev@lists.horde.org\n" -"POT-Creation-Date: 2009-02-18 19:29+0100\n" +"POT-Creation-Date: 2009-02-22 20:39+0100\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -21,7 +21,7 @@ msgstr "" msgid "%s Invited to join %s." msgstr "" -#: edit/friends/add.php:42 edit/friends/friends.php:48 +#: edit/friends/add.php:42 #, php-format msgid "%s added you as a friend on %s" msgstr "" @@ -36,12 +36,12 @@ msgstr "" msgid "%s rejected you as a friend on %s" msgstr "" -#: user.php:63 +#: user.php:67 #, php-format msgid "%s's profile" msgstr "" -#: edit/edit.php:30 edit/edit.php:46 lib/Forms/AddFriend.php:29 +#: edit/edit.php:30 edit/edit.php:46 msgid "--- Select ---" msgstr "" @@ -65,7 +65,7 @@ msgstr "" msgid "-u, --username[=username] Horde login username" msgstr "" -#: edit/friends/add.php:41 edit/friends/friends.php:47 +#: edit/friends/add.php:41 #, php-format msgid "A confirmation was send to \"%s\"." msgstr "" @@ -94,11 +94,11 @@ msgstr "" msgid "Activity successfully deleted" msgstr "" -#: user.php:54 friends.php:31 edit/activity.php:40 +#: user.php:58 friends.php:31 edit/activity.php:40 msgid "Activity successfully posted" msgstr "" -#: templates/edit/tabs.php:23 +#: templates/edit/tabs.php:23 edit/friends/know.php:59 msgid "Add" msgstr "" @@ -112,7 +112,7 @@ msgstr "" msgid "Add %s to you blacklist?" msgstr "" -#: lib/Forms/AddFriend.php:33 +#: lib/Forms/AddFriend.php:19 msgid "Add / Remove" msgstr "" @@ -128,8 +128,7 @@ msgstr "" msgid "Add group" msgstr "" -#: edit/friends/add.php:62 edit/friends/blacklist.php:71 -#: edit/friends/friends.php:74 +#: edit/friends/add.php:62 edit/friends/blacklist.php:79 msgid "Add or remove user" msgstr "" @@ -170,7 +169,8 @@ msgstr "" msgid "Albums" msgstr "" -#: templates/edit/tabs.php:24 lib/Block/friends.php:35 +#: templates/edit/tabs.php:24 edit/friends/index.php:17 +#: lib/Block/friends.php:35 msgid "All" msgstr "" @@ -202,11 +202,15 @@ msgid "" "PUBLIC CONTENT." msgstr "" -#: lib/Folks.php:131 lib/Folks.php:135 +#: edit/friends/for.php:39 +msgid "Approve" +msgstr "" + +#: lib/Folks.php:136 lib/Folks.php:140 msgid "Aquarius" msgstr "" -#: lib/Folks.php:139 lib/Folks.php:143 +#: lib/Folks.php:144 lib/Folks.php:148 msgid "Aries" msgstr "" @@ -230,7 +234,7 @@ msgstr "" msgid "Birthday" msgstr "" -#: templates/user/actions.php:21 templates/edit/tabs.php:34 edit/tabs.php:24 +#: templates/user/actions.php:21 templates/edit/tabs.php:35 edit/tabs.php:24 #: edit/friends/blacklist.php:18 msgid "Blacklist" msgstr "" @@ -243,7 +247,7 @@ msgstr "" msgid "Cancel" msgstr "" -#: lib/Folks.php:151 lib/Folks.php:155 +#: lib/Folks.php:156 lib/Folks.php:160 msgid "Cancer" msgstr "" @@ -255,7 +259,7 @@ msgstr "" msgid "Cannot reset password automatically, contact your administrator." msgstr "" -#: lib/Folks.php:274 +#: lib/Folks.php:279 msgid "Cannot retrieve user email." msgstr "" @@ -263,7 +267,7 @@ msgstr "" msgid "Cannot update password, contact your administrator." msgstr "" -#: lib/Folks.php:131 lib/Folks.php:175 +#: lib/Folks.php:136 lib/Folks.php:180 msgid "Capricorn" msgstr "" @@ -428,7 +432,7 @@ msgstr "" msgid "Edit personal information" msgstr "" -#: lib/Folks.php:291 +#: lib/Folks.php:296 msgid "Edit profile" msgstr "" @@ -482,7 +486,7 @@ msgstr "" msgid "Friend" msgstr "" -#: edit/friends/invite.php:52 +#: edit/friends/invite.php:51 #, php-format msgid "Friend \"%s\" was invited to join %s." msgstr "" @@ -492,8 +496,8 @@ msgid "Friend's e-mail" msgstr "" #: friends.php:21 templates/user/user.php:152 templates/edit/tabs.php:1 -#: edit/tabs.php:25 edit/friends/index.php:17 edit/friends/friends.php:18 -#: lib/Folks.php:290 lib/Block/friends.php:3 lib/Block/friends.php:22 +#: edit/tabs.php:25 edit/friends/friends.php:18 lib/Folks.php:295 +#: lib/Block/friends.php:3 lib/Block/friends.php:22 msgid "Friends" msgstr "" @@ -501,15 +505,19 @@ msgstr "" msgid "Friends Birthdays" msgstr "" -#: templates/friends/friends.php:7 +#: templates/friends/friends.php:7 rss/activity.php:52 msgid "Friends activities" msgstr "" +#: templates/common-header.inc:27 +msgid "Friends activity" +msgstr "" + #: edit/friends/from.php:17 msgid "Friends we are waiting approval from" msgstr "" -#: lib/Folks.php:147 lib/Folks.php:151 +#: lib/Folks.php:152 lib/Folks.php:156 msgid "Gemini" msgstr "" @@ -518,7 +526,7 @@ msgstr "" msgid "Gender" msgstr "" -#: templates/edit/groups.php:12 lib/Forms/AddFriend.php:29 +#: templates/edit/groups.php:12 msgid "Group" msgstr "" @@ -562,7 +570,7 @@ msgstr "" msgid "How to preview users" msgstr "" -#: templates/edit/tabs.php:33 +#: templates/edit/tabs.php:34 msgid "I am friend of" msgstr "" @@ -594,11 +602,11 @@ msgstr "" msgid "Last time online" msgstr "" -#: lib/Folks.php:155 lib/Folks.php:159 +#: lib/Folks.php:160 lib/Folks.php:164 msgid "Leo" msgstr "" -#: lib/Folks.php:163 lib/Folks.php:167 +#: lib/Folks.php:168 lib/Folks.php:172 msgid "Libra" msgstr "" @@ -606,7 +614,7 @@ msgstr "" msgid "Limit" msgstr "" -#: list.php:17 templates/list/list.php:10 lib/Folks.php:294 +#: list.php:17 templates/list/list.php:10 lib/Folks.php:299 msgid "List" msgstr "" @@ -662,6 +670,10 @@ msgstr "" msgid "Members" msgstr "" +#: templates/edit/tabs.php:31 +msgid "Might know" +msgstr "" + #: edit/comments.php:30 msgid "Moderate comments - I will approve every single comment" msgstr "" @@ -678,7 +690,7 @@ msgstr "" msgid "Most popular users" msgstr "" -#: lib/Folks.php:289 +#: lib/Folks.php:294 msgid "My profile" msgstr "" @@ -750,7 +762,7 @@ msgstr "" msgid "Offensive content" msgstr "" -#: templates/user/user.php:77 templates/edit/friends.php:32 +#: templates/user/user.php:77 templates/edit/friends.php:33 #: lib/Block/friends.php:37 msgid "Offline" msgstr "" @@ -760,11 +772,19 @@ msgid "Old name" msgstr "" #: online.php:17 templates/user/user.php:75 templates/list/list.php:3 -#: templates/edit/friends.php:30 lib/Block/random.php:38 +#: templates/edit/friends.php:31 lib/Block/random.php:38 #: lib/Block/friends.php:36 msgid "Online" msgstr "" +#: templates/common-header.inc:26 rss/friends.php:48 +msgid "Online friends" +msgstr "" + +#: templates/common-header.inc:24 rss/online.php:24 +msgid "Online users" +msgstr "" + #: edit/privacy.php:34 msgid "Only authenticated users" msgstr "" @@ -802,6 +822,10 @@ msgstr "" msgid "Password changed." msgstr "" +#: templates/common-header.inc:28 edit/friends/know.php:17 rss/know.php:61 +msgid "People you might know" +msgstr "" + #: templates/edit/groups.php:28 msgid "Permissions" msgstr "" @@ -810,7 +834,7 @@ msgstr "" msgid "Picture" msgstr "" -#: lib/Folks.php:135 lib/Folks.php:139 +#: lib/Folks.php:140 lib/Folks.php:144 msgid "Pisces" msgstr "" @@ -866,11 +890,16 @@ msgstr "" msgid "Recent visitors" msgstr "" +#: edit/friends/for.php:43 +msgid "Reject" +msgstr "" + #: lib/Forms/Login.php:28 msgid "Remember login?" msgstr "" -#: templates/edit/friends.php:41 +#: edit/friends/index.php:35 edit/friends/blacklist.php:73 +#: edit/friends/friends.php:36 msgid "Remove" msgstr "" @@ -924,7 +953,7 @@ msgstr "" msgid "Reset Your Password" msgstr "" -#: lib/Folks.php:171 lib/Folks.php:175 +#: lib/Folks.php:176 lib/Folks.php:180 msgid "Sagittarius" msgstr "" @@ -936,11 +965,11 @@ msgstr "" msgid "Save search criteria" msgstr "" -#: lib/Folks.php:167 lib/Folks.php:171 +#: lib/Folks.php:172 lib/Folks.php:176 msgid "Scorpio" msgstr "" -#: search.php:18 lib/Folks.php:293 lib/Forms/Search.php:27 +#: search.php:18 lib/Folks.php:298 lib/Forms/Search.php:27 msgid "Search" msgstr "" @@ -972,7 +1001,9 @@ msgstr "" msgid "Send me my username" msgstr "" -#: templates/user/actions.php:7 templates/edit/friends.php:46 +#: templates/user/actions.php:7 edit/friends/know.php:68 +#: edit/friends/for.php:48 edit/friends/index.php:44 edit/friends/of.php:40 +#: edit/friends/from.php:40 edit/friends/friends.php:45 msgid "Send message" msgstr "" @@ -984,7 +1015,7 @@ msgstr "" msgid "Send this profile to a friend" msgstr "" -#: lib/Folks.php:292 +#: lib/Folks.php:297 msgid "Services" msgstr "" @@ -1072,7 +1103,7 @@ msgid "" "request has been approved." msgstr "" -#: lib/Folks.php:143 lib/Folks.php:147 +#: lib/Folks.php:148 lib/Folks.php:152 msgid "Taurus" msgstr "" @@ -1154,22 +1185,22 @@ msgstr "" msgid "User" msgstr "" -#: lib/Driver.php:381 lib/Driver/sql.php:308 +#: lib/Driver.php:329 lib/Driver/sql.php:308 #, php-format msgid "User \"%s\" does not exists." msgstr "" -#: lib/Friends.php:214 lib/Friends.php:283 +#: lib/Friends.php:220 lib/Friends.php:289 #, php-format msgid "User \"%s\" does not exits" msgstr "" -#: lib/Friends.php:291 +#: lib/Friends.php:297 #, php-format msgid "User \"%s\" is already in fiend list" msgstr "" -#: lib/Friends.php:299 +#: lib/Friends.php:305 #, php-format msgid "" "User \"%s\" is already in fiend list, but we are waiting his/her approval." @@ -1180,12 +1211,12 @@ msgstr "" msgid "User \"%s\" is not market to be in the removal process." msgstr "" -#: edit/friends/add.php:55 edit/friends/friends.php:59 +#: edit/friends/add.php:55 #, php-format msgid "User \"%s\" was added as your friend." msgstr "" -#: edit/friends/blacklist.php:44 +#: edit/friends/blacklist.php:41 #, php-format msgid "User \"%s\" was added to your blacklist." msgstr "" @@ -1205,17 +1236,17 @@ msgstr "" msgid "User \"%s\" was rejected as a friend." msgstr "" -#: edit/friends/blacklist.php:35 +#: edit/friends/blacklist.php:32 #, php-format msgid "User \"%s\" was removed from your blacklist." msgstr "" -#: edit/friends/add.php:32 edit/friends/friends.php:40 +#: edit/friends/add.php:32 #, php-format msgid "User \"%s\" was removed from your friend list." msgstr "" -#: edit/friends/add.php:45 edit/friends/friends.php:51 +#: edit/friends/add.php:45 #, php-format msgid "" "User %s added you to his firends list on %s. \n" @@ -1303,7 +1334,7 @@ msgstr "" #: templates/friends/friends.php:11 templates/list/list.php:24 #: templates/edit/friends.php:16 account/resetpassword.php:43 -#: lib/Forms/AddFriend.php:19 lib/Forms/Login.php:22 config/prefs.php.dist:40 +#: lib/Forms/AddFriend.php:18 lib/Forms/Login.php:22 config/prefs.php.dist:40 msgid "Username" msgstr "" @@ -1336,11 +1367,13 @@ msgstr "" msgid "Video" msgstr "" -#: templates/edit/friends.php:37 +#: edit/friends/know.php:63 edit/friends/for.php:35 edit/friends/index.php:39 +#: edit/friends/of.php:35 edit/friends/from.php:35 +#: edit/friends/blacklist.php:77 edit/friends/friends.php:40 msgid "View profile" msgstr "" -#: lib/Folks.php:159 lib/Folks.php:163 +#: lib/Folks.php:164 lib/Folks.php:168 msgid "Virgo" msgstr "" @@ -1348,11 +1381,11 @@ msgstr "" msgid "Visit my homepage" msgstr "" -#: templates/edit/tabs.php:31 +#: templates/edit/tabs.php:32 msgid "Wainting for" msgstr "" -#: templates/edit/tabs.php:32 +#: templates/edit/tabs.php:33 msgid "Wainting from" msgstr "" @@ -1360,11 +1393,11 @@ msgstr "" msgid "We are friends of" msgstr "" -#: user.php:48 friends.php:25 edit/activity.php:34 +#: user.php:52 friends.php:25 edit/activity.php:34 msgid "What are you doing right now?" msgstr "" -#: lib/Friends/prefs.php:164 lib/Friends/sql.php:192 +#: lib/Friends/prefs.php:164 lib/Friends/sql.php:193 msgid "Whitelist" msgstr "" @@ -1408,7 +1441,7 @@ msgstr "" msgid "You are entering your data too fast!" msgstr "" -#: templates/user/user.php:407 templates/user/user.php:427 +#: templates/user/user.php:407 templates/user/user.php:426 #, php-format msgid "You are on %s blacklist." msgstr "" @@ -1418,16 +1451,16 @@ msgstr "" msgid "You can still send a private message to user %s." msgstr "" -#: lib/Friends.php:219 +#: lib/Friends.php:225 #, php-format msgid "You cannot add \"%s\" to your blacklist." msgstr "" -#: lib/Friends.php:277 +#: lib/Friends.php:283 msgid "You cannot add yourself as your own friend." msgstr "" -#: lib/Friends.php:208 +#: lib/Friends.php:214 msgid "You cannot add yourself to your blacklist." msgstr "" @@ -1435,7 +1468,7 @@ msgstr "" msgid "You cannot log activities for other users." msgstr "" -#: lib/Driver.php:753 lib/Forms/Activity.php:33 +#: lib/Driver.php:701 lib/Forms/Activity.php:33 msgid "You cannot post an empty activity message." msgstr "" diff --git a/folks/po/sl_SI.po b/folks/po/sl_SI.po index a206f1ef6..4175edbba 100644 --- a/folks/po/sl_SI.po +++ b/folks/po/sl_SI.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: sl_SI\n" "Report-Msgid-Bugs-To: dev@lists.horde.org\n" -"POT-Creation-Date: 2009-02-18 19:29+0100\n" +"POT-Creation-Date: 2009-02-22 20:39+0100\n" "PO-Revision-Date: 2008-12-29 00:24+0100\n" "Last-Translator: Marko Milost \n" "Language-Team: Slovene \n" @@ -26,7 +26,7 @@ msgstr "" msgid "%s Invited to join %s." msgstr "%s vas vabi da se prijavite na %s" -#: edit/friends/add.php:42 edit/friends/friends.php:48 +#: edit/friends/add.php:42 #, php-format msgid "%s added you as a friend on %s" msgstr "%s vas je dodal kot prijatelja na %s" @@ -41,12 +41,12 @@ msgstr "%s vas je potrdil kot prijatelja na %s" msgid "%s rejected you as a friend on %s" msgstr "%s je zavrnil vaše prijateljstvo na %s" -#: user.php:63 +#: user.php:67 #, php-format msgid "%s's profile" msgstr "%s se predstavlja" -#: edit/edit.php:30 edit/edit.php:46 lib/Forms/AddFriend.php:29 +#: edit/edit.php:30 edit/edit.php:46 msgid "--- Select ---" msgstr "--- Izberi ---" @@ -70,7 +70,7 @@ msgstr "" msgid "-u, --username[=username] Horde login username" msgstr "" -#: edit/friends/add.php:41 edit/friends/friends.php:47 +#: edit/friends/add.php:41 #, php-format msgid "A confirmation was send to \"%s\"." msgstr "Potrditev je bila poslana na \"%s\"." @@ -99,11 +99,11 @@ msgstr "Aktivnost" msgid "Activity successfully deleted" msgstr "Aktivnost je bil uspešno izbisana" -#: user.php:54 friends.php:31 edit/activity.php:40 +#: user.php:58 friends.php:31 edit/activity.php:40 msgid "Activity successfully posted" msgstr "Aktivnost je bila uspešno dodana" -#: templates/edit/tabs.php:23 +#: templates/edit/tabs.php:23 edit/friends/know.php:59 msgid "Add" msgstr "Dodaj" @@ -117,7 +117,7 @@ msgstr "Dodamo %s kot prijatelja?" msgid "Add %s to you blacklist?" msgstr "Dodamo %s na črno listo?" -#: lib/Forms/AddFriend.php:33 +#: lib/Forms/AddFriend.php:19 msgid "Add / Remove" msgstr "Dodaj / Odstrani" @@ -133,8 +133,7 @@ msgstr "Dodaj prijatelja" msgid "Add group" msgstr "Dodaj skupino" -#: edit/friends/add.php:62 edit/friends/blacklist.php:71 -#: edit/friends/friends.php:74 +#: edit/friends/add.php:62 edit/friends/blacklist.php:79 msgid "Add or remove user" msgstr "Dodaj ali odstrani uporabnika" @@ -175,7 +174,8 @@ msgstr "Starost do" msgid "Albums" msgstr "Albumi" -#: templates/edit/tabs.php:24 lib/Block/friends.php:35 +#: templates/edit/tabs.php:24 edit/friends/index.php:17 +#: lib/Block/friends.php:35 msgid "All" msgstr "Vsi" @@ -207,11 +207,15 @@ msgid "" "PUBLIC CONTENT." msgstr "Aplikacije katerih ne beležim JAVNEGA pregleda mojih aktivnosti" -#: lib/Folks.php:131 lib/Folks.php:135 +#: edit/friends/for.php:39 +msgid "Approve" +msgstr "Potrdi" + +#: lib/Folks.php:136 lib/Folks.php:140 msgid "Aquarius" msgstr "Vodnar" -#: lib/Folks.php:139 lib/Folks.php:143 +#: lib/Folks.php:144 lib/Folks.php:148 msgid "Aries" msgstr "Oven" @@ -235,7 +239,7 @@ msgstr "Dostopne storitve" msgid "Birthday" msgstr "Rojstni dan" -#: templates/user/actions.php:21 templates/edit/tabs.php:34 edit/tabs.php:24 +#: templates/user/actions.php:21 templates/edit/tabs.php:35 edit/tabs.php:24 #: edit/friends/blacklist.php:18 msgid "Blacklist" msgstr "Črna lista" @@ -248,7 +252,7 @@ msgstr "Telo sporočila" msgid "Cancel" msgstr "Prekliči" -#: lib/Folks.php:151 lib/Folks.php:155 +#: lib/Folks.php:156 lib/Folks.php:160 msgid "Cancer" msgstr "Rak" @@ -261,7 +265,7 @@ msgid "Cannot reset password automatically, contact your administrator." msgstr "" "Ne da se avtomatično ponastaviti gesla, kontaktirajte podporo uporabnikom." -#: lib/Folks.php:274 +#: lib/Folks.php:279 msgid "Cannot retrieve user email." msgstr "Ne morem prebrati email uporabnika." @@ -269,7 +273,7 @@ msgstr "Ne morem prebrati email uporabnika." msgid "Cannot update password, contact your administrator." msgstr "Ne morem nastaviti gesla, obrnite se na podporo." -#: lib/Folks.php:131 lib/Folks.php:175 +#: lib/Folks.php:136 lib/Folks.php:180 msgid "Capricorn" msgstr "Kozorog" @@ -439,7 +443,7 @@ msgstr "Urejanje profila" msgid "Edit personal information" msgstr "Uredite osebne podatke" -#: lib/Folks.php:291 +#: lib/Folks.php:296 msgid "Edit profile" msgstr "Uredi profil" @@ -493,7 +497,7 @@ msgstr "Posreduj" msgid "Friend" msgstr "Prijatelj" -#: edit/friends/invite.php:52 +#: edit/friends/invite.php:51 #, php-format msgid "Friend \"%s\" was invited to join %s." msgstr "Uporabnik \"%s\" je bil povabljen da obišče %s" @@ -503,8 +507,8 @@ msgid "Friend's e-mail" msgstr "Perijateljev e-mail" #: friends.php:21 templates/user/user.php:152 templates/edit/tabs.php:1 -#: edit/tabs.php:25 edit/friends/index.php:17 edit/friends/friends.php:18 -#: lib/Folks.php:290 lib/Block/friends.php:3 lib/Block/friends.php:22 +#: edit/tabs.php:25 edit/friends/friends.php:18 lib/Folks.php:295 +#: lib/Block/friends.php:3 lib/Block/friends.php:22 msgid "Friends" msgstr "Prijatelji" @@ -512,15 +516,19 @@ msgstr "Prijatelji" msgid "Friends Birthdays" msgstr "Rojstni dnevi prijateljev" -#: templates/friends/friends.php:7 +#: templates/friends/friends.php:7 rss/activity.php:52 msgid "Friends activities" msgstr "Aktivnisti prijateljev" +#: templates/common-header.inc:27 +msgid "Friends activity" +msgstr "Aktivnisti prijateljev" + #: edit/friends/from.php:17 msgid "Friends we are waiting approval from" msgstr "Uporabniki na katere čakamo da nas potrdijo" -#: lib/Folks.php:147 lib/Folks.php:151 +#: lib/Folks.php:152 lib/Folks.php:156 msgid "Gemini" msgstr "Dvojčka" @@ -529,7 +537,7 @@ msgstr "Dvojčka" msgid "Gender" msgstr "Spol" -#: templates/edit/groups.php:12 lib/Forms/AddFriend.php:29 +#: templates/edit/groups.php:12 msgid "Group" msgstr "Skupina" @@ -573,7 +581,7 @@ msgstr "Domača stran" msgid "How to preview users" msgstr "Kako naj pregledujem uporabnike" -#: templates/edit/tabs.php:33 +#: templates/edit/tabs.php:34 msgid "I am friend of" msgstr "Mi smo prijatelji od" @@ -605,11 +613,11 @@ msgstr "Zadnji komentarji na mojem profilu" msgid "Last time online" msgstr "Zadnjič online" -#: lib/Folks.php:155 lib/Folks.php:159 +#: lib/Folks.php:160 lib/Folks.php:164 msgid "Leo" msgstr "Lev" -#: lib/Folks.php:163 lib/Folks.php:167 +#: lib/Folks.php:168 lib/Folks.php:172 msgid "Libra" msgstr "Tehtnica" @@ -617,7 +625,7 @@ msgstr "Tehtnica" msgid "Limit" msgstr "Omeji" -#: list.php:17 templates/list/list.php:10 lib/Folks.php:294 +#: list.php:17 templates/list/list.php:10 lib/Folks.php:299 msgid "List" msgstr "Spisek" @@ -673,6 +681,10 @@ msgstr "Mora imeti" msgid "Members" msgstr "Člani" +#: templates/edit/tabs.php:31 +msgid "Might know" +msgstr "Morda poznate" + #: edit/comments.php:30 msgid "Moderate comments - I will approve every single comment" msgstr "Moderiranje komentarjev - potrdil bom vsak komentar" @@ -689,7 +701,7 @@ msgstr "Najbolj aktvni uporabniki" msgid "Most popular users" msgstr "Najbolj priljubljeni uporabniki" -#: lib/Folks.php:289 +#: lib/Folks.php:294 msgid "My profile" msgstr "Moj profil" @@ -761,7 +773,7 @@ msgstr "Število uporabnikov na vsaki strani" msgid "Offensive content" msgstr "Neprimerna ali žaljiva vsebina" -#: templates/user/user.php:77 templates/edit/friends.php:32 +#: templates/user/user.php:77 templates/edit/friends.php:33 #: lib/Block/friends.php:37 msgid "Offline" msgstr "Offline" @@ -771,11 +783,19 @@ msgid "Old name" msgstr "Staro ime" #: online.php:17 templates/user/user.php:75 templates/list/list.php:3 -#: templates/edit/friends.php:30 lib/Block/random.php:38 +#: templates/edit/friends.php:31 lib/Block/random.php:38 #: lib/Block/friends.php:36 msgid "Online" msgstr "Online" +#: templates/common-header.inc:26 rss/friends.php:48 +msgid "Online friends" +msgstr "Prijetelji online" + +#: templates/common-header.inc:24 rss/online.php:24 +msgid "Online users" +msgstr "Uporabniki online" + #: edit/privacy.php:34 msgid "Only authenticated users" msgstr "Samo overjeni uporabniki" @@ -813,6 +833,10 @@ msgstr "Geslo" msgid "Password changed." msgstr "Geslo je bilo spremenjeno." +#: templates/common-header.inc:28 edit/friends/know.php:17 rss/know.php:61 +msgid "People you might know" +msgstr "Uporabnike katere morda poznate" + #: templates/edit/groups.php:28 msgid "Permissions" msgstr "Pravice" @@ -821,7 +845,7 @@ msgstr "Pravice" msgid "Picture" msgstr "Slika" -#: lib/Folks.php:135 lib/Folks.php:139 +#: lib/Folks.php:140 lib/Folks.php:144 msgid "Pisces" msgstr "Ribi" @@ -877,11 +901,16 @@ msgstr "Naključni uporabniki" msgid "Recent visitors" msgstr "Zadnji obiskovalci" +#: edit/friends/for.php:43 +msgid "Reject" +msgstr "Zavrni" + #: lib/Forms/Login.php:28 msgid "Remember login?" msgstr "Si zapomnim prijavo?" -#: templates/edit/friends.php:41 +#: edit/friends/index.php:35 edit/friends/blacklist.php:73 +#: edit/friends/friends.php:36 msgid "Remove" msgstr "Odstrani" @@ -935,7 +964,7 @@ msgstr "Ponastavi" msgid "Reset Your Password" msgstr "Ponastavi svoje geslo" -#: lib/Folks.php:171 lib/Folks.php:175 +#: lib/Folks.php:176 lib/Folks.php:180 msgid "Sagittarius" msgstr "Strelec" @@ -947,11 +976,11 @@ msgstr "Shrani" msgid "Save search criteria" msgstr "Shrani rezultate iskanja" -#: lib/Folks.php:167 lib/Folks.php:171 +#: lib/Folks.php:172 lib/Folks.php:176 msgid "Scorpio" msgstr "Škorpijon" -#: search.php:18 lib/Folks.php:293 lib/Forms/Search.php:27 +#: search.php:18 lib/Folks.php:298 lib/Forms/Search.php:27 msgid "Search" msgstr "Najdi" @@ -983,7 +1012,9 @@ msgstr "Zaščitno vprašanje, ki ga bomo uporabili pri ponastavljanju gesla" msgid "Send me my username" msgstr "Pošlji mi moje uporabniško ime" -#: templates/user/actions.php:7 templates/edit/friends.php:46 +#: templates/user/actions.php:7 edit/friends/know.php:68 +#: edit/friends/for.php:48 edit/friends/index.php:44 edit/friends/of.php:40 +#: edit/friends/from.php:40 edit/friends/friends.php:45 msgid "Send message" msgstr "Pošlji sporočilo" @@ -995,7 +1026,7 @@ msgstr "Pošlji osebno sporočilo" msgid "Send this profile to a friend" msgstr "Obvesti prijatelja za ta profil" -#: lib/Folks.php:292 +#: lib/Folks.php:297 msgid "Services" msgstr "Servisi" @@ -1085,7 +1116,7 @@ msgstr "" "Poslana je bila zahteva za registracijo \"%s\" v sistem. Ne morete se " "prijaviti, dokler vaša zahteva ne bo potrjena." -#: lib/Folks.php:143 lib/Folks.php:147 +#: lib/Folks.php:148 lib/Folks.php:152 msgid "Taurus" msgstr "Bik" @@ -1171,22 +1202,22 @@ msgstr "" msgid "User" msgstr "Uporabnik" -#: lib/Driver.php:381 lib/Driver/sql.php:308 +#: lib/Driver.php:329 lib/Driver/sql.php:308 #, php-format msgid "User \"%s\" does not exists." msgstr "Uporabnik \"%s\" ne obstaja." -#: lib/Friends.php:214 lib/Friends.php:283 +#: lib/Friends.php:220 lib/Friends.php:289 #, php-format msgid "User \"%s\" does not exits" msgstr "Uporabnik \"%s\" ne obstaja" -#: lib/Friends.php:291 +#: lib/Friends.php:297 #, php-format msgid "User \"%s\" is already in fiend list" msgstr "Uporabnik \"%s\" je že v vašem spisku prijateljev." -#: lib/Friends.php:299 +#: lib/Friends.php:305 #, php-format msgid "" "User \"%s\" is already in fiend list, but we are waiting his/her approval." @@ -1198,12 +1229,12 @@ msgstr "" msgid "User \"%s\" is not market to be in the removal process." msgstr "Uporabnik \"%s\" ni v postopku izbrisa." -#: edit/friends/add.php:55 edit/friends/friends.php:59 +#: edit/friends/add.php:55 #, php-format msgid "User \"%s\" was added as your friend." msgstr "Uporabnik \"%s\" je sedaj vaš prijatelj." -#: edit/friends/blacklist.php:44 +#: edit/friends/blacklist.php:41 #, php-format msgid "User \"%s\" was added to your blacklist." msgstr "Uporabnik \"%s\" je sedaj v vaši črni listi." @@ -1223,17 +1254,17 @@ msgstr "Uporabnik \"%s\" je potrjen kot vaš prijatelj." msgid "User \"%s\" was rejected as a friend." msgstr "Uporabnik \"%s\" je zavrnjen kot vaš prijatelj." -#: edit/friends/blacklist.php:35 +#: edit/friends/blacklist.php:32 #, php-format msgid "User \"%s\" was removed from your blacklist." msgstr "Uporabnik \"%s\" je odstranjen z vaše črne liste." -#: edit/friends/add.php:32 edit/friends/friends.php:40 +#: edit/friends/add.php:32 #, php-format msgid "User \"%s\" was removed from your friend list." msgstr "Uporabnik \"%s\" je odstranjen z vašega spiska prijateljev." -#: edit/friends/add.php:45 edit/friends/friends.php:51 +#: edit/friends/add.php:45 #, php-format msgid "" "User %s added you to his firends list on %s. \n" @@ -1334,7 +1365,7 @@ msgstr "Uporabnik je bil prijavljen." #: templates/friends/friends.php:11 templates/list/list.php:24 #: templates/edit/friends.php:16 account/resetpassword.php:43 -#: lib/Forms/AddFriend.php:19 lib/Forms/Login.php:22 config/prefs.php.dist:40 +#: lib/Forms/AddFriend.php:18 lib/Forms/Login.php:22 config/prefs.php.dist:40 msgid "Username" msgstr "Uporabniško ime" @@ -1367,11 +1398,13 @@ msgstr "Uporabniki ki čakajo na našo potrditev" msgid "Video" msgstr "Video" -#: templates/edit/friends.php:37 +#: edit/friends/know.php:63 edit/friends/for.php:35 edit/friends/index.php:39 +#: edit/friends/of.php:35 edit/friends/from.php:35 +#: edit/friends/blacklist.php:77 edit/friends/friends.php:40 msgid "View profile" msgstr "Preglej profil" -#: lib/Folks.php:159 lib/Folks.php:163 +#: lib/Folks.php:164 lib/Folks.php:168 msgid "Virgo" msgstr "Devica" @@ -1379,11 +1412,11 @@ msgstr "Devica" msgid "Visit my homepage" msgstr "Obišči mojo domačo stran" -#: templates/edit/tabs.php:31 +#: templates/edit/tabs.php:32 msgid "Wainting for" msgstr "Čakajo na nas" -#: templates/edit/tabs.php:32 +#: templates/edit/tabs.php:33 msgid "Wainting from" msgstr "Čakamo na" @@ -1391,11 +1424,11 @@ msgstr "Čakamo na" msgid "We are friends of" msgstr "Mi smo prijatelji od" -#: user.php:48 friends.php:25 edit/activity.php:34 +#: user.php:52 friends.php:25 edit/activity.php:34 msgid "What are you doing right now?" msgstr "Kaj delate trenutno?" -#: lib/Friends/prefs.php:164 lib/Friends/sql.php:192 +#: lib/Friends/prefs.php:164 lib/Friends/sql.php:193 msgid "Whitelist" msgstr "Prijatelji" @@ -1439,7 +1472,7 @@ msgstr "Že imate skupino poimenovano \"%s\"." msgid "You are entering your data too fast!" msgstr "Prehitro vnašate podatke!" -#: templates/user/user.php:407 templates/user/user.php:427 +#: templates/user/user.php:407 templates/user/user.php:426 #, php-format msgid "You are on %s blacklist." msgstr "Ste na črni listi uporabnika %s." @@ -1449,16 +1482,16 @@ msgstr "Ste na črni listi uporabnika %s." msgid "You can still send a private message to user %s." msgstr "Še vedno mu lahko pošljete osebno sporočilo %s." -#: lib/Friends.php:219 +#: lib/Friends.php:225 #, php-format msgid "You cannot add \"%s\" to your blacklist." msgstr "Ne morete dodati \"%s\" na črno listo." -#: lib/Friends.php:277 +#: lib/Friends.php:283 msgid "You cannot add yourself as your own friend." msgstr "Sami sebe ne morete dodati kot prijatelja." -#: lib/Friends.php:208 +#: lib/Friends.php:214 msgid "You cannot add yourself to your blacklist." msgstr "Samega sebe ne morete dodati na črno listo." @@ -1466,7 +1499,7 @@ msgstr "Samega sebe ne morete dodati na črno listo." msgid "You cannot log activities for other users." msgstr "Ne morete beležiti aktivnosti za druge uporabnike." -#: lib/Driver.php:753 lib/Forms/Activity.php:33 +#: lib/Driver.php:701 lib/Forms/Activity.php:33 msgid "You cannot post an empty activity message." msgstr "Ne morete javiti prazne aktivnosti" diff --git a/folks/rss/activity.php b/folks/rss/activity.php new file mode 100644 index 000000000..76627bb6a --- /dev/null +++ b/folks/rss/activity.php @@ -0,0 +1,57 @@ + + * @package Folks + */ + +define('AUTH_HANDLER', true); +require_once dirname(__FILE__) . '/../lib/base.php'; + +$auth = Auth::singleton($conf['auth']['driver']); +if (!Auth::getAuth() && + (!isset($_SERVER['PHP_AUTH_USER']) || + !$auth->authenticate($_SERVER['PHP_AUTH_USER'], array('password' => isset($_SERVER['PHP_AUTH_PW']) ? $_SERVER['PHP_AUTH_PW'] : null)))) { + header('WWW-Authenticate: Basic realm="Letter RSS Interface"'); + header('HTTP/1.0 401 Unauthorized'); + echo '401 Unauthorized'; + exit; +} + +require_once FOLKS_BASE . '/lib/Friends.php'; +$friends_driver = Folks_Friends::singleton(); + +// Get friends +$friend_list = $friends_driver->getFriends(); +if ($friend_list instanceof PEAR_Error) { + $notification->push($friend_list); + $friend_list = array(); +} + +// Get friends activities +$firendActivities = array(); +foreach ($friend_list as $user) { + $activities = $folks_driver->getActivity($user); + if ($activities instanceof PEAR_Error) { + continue; + } + foreach ($activities as $activity) { + $firendActivities[$activity['activity_date']] = array('message' => $activity['activity_message'], + 'scope' => $activity['activity_scope'], + 'user' => $user); + } +} +krsort($firendActivities); + +$title = _("Friends activities"); + +$link = Folks::getUrlFor('list', 'online', true); +$rss_link = Horde::applicationUrl('rss/friends.php', true); + +require FOLKS_TEMPLATES . '/feed/activities.php'; \ No newline at end of file diff --git a/folks/rss/friends.php b/folks/rss/friends.php new file mode 100644 index 000000000..c50331a98 --- /dev/null +++ b/folks/rss/friends.php @@ -0,0 +1,52 @@ + + * @package Folks + */ + +define('AUTH_HANDLER', true); +require_once dirname(__FILE__) . '/../lib/base.php'; + +$auth = Auth::singleton($conf['auth']['driver']); +if (!Auth::getAuth() && + (!isset($_SERVER['PHP_AUTH_USER']) || + !$auth->authenticate($_SERVER['PHP_AUTH_USER'], array('password' => isset($_SERVER['PHP_AUTH_PW']) ? $_SERVER['PHP_AUTH_PW'] : null)))) { + header('WWW-Authenticate: Basic realm="Letter RSS Interface"'); + header('HTTP/1.0 401 Unauthorized'); + echo '401 Unauthorized'; + exit; +} + +require_once FOLKS_BASE . '/lib/Friends.php'; +$friends_driver = Folks_Friends::singleton(); + +$friends = $friends_driver->getFriends(); +if ($friends instanceof PEAR_Error) { + $friends = array(); +} + +$online = $folks_driver->getOnlineUsers(); +if ($online instanceof PEAR_Error) { + $online = array(); +} + +$users = array(); +foreach ($friends as $friend) { + if (array_key_exists($friend, $online)) { + $users[] = $friend; + } +} + + +$title = _("Online friends"); +$link = Folks::getUrlFor('list', 'online', true); +$rss_link = Horde::applicationUrl('rss/friends.php', true); + +require FOLKS_TEMPLATES . '/feed/feed.php'; \ No newline at end of file diff --git a/folks/rss/know.php b/folks/rss/know.php new file mode 100644 index 000000000..e0d9bcbc8 --- /dev/null +++ b/folks/rss/know.php @@ -0,0 +1,65 @@ + + * @package Folks + */ + +define('AUTH_HANDLER', true); +require_once dirname(__FILE__) . '/../lib/base.php'; + +$auth = Auth::singleton($conf['auth']['driver']); +if (!Auth::getAuth() && + (!isset($_SERVER['PHP_AUTH_USER']) || + !$auth->authenticate($_SERVER['PHP_AUTH_USER'], array('password' => isset($_SERVER['PHP_AUTH_PW']) ? $_SERVER['PHP_AUTH_PW'] : null)))) { + header('WWW-Authenticate: Basic realm="Letter RSS Interface"'); + header('HTTP/1.0 401 Unauthorized'); + echo '401 Unauthorized'; + exit; +} + +require_once FOLKS_BASE . '/lib/Friends.php'; +$friends_driver = Folks_Friends::singleton(); + +// Get friends +$my_list = $friends_driver->getFriends(); +if ($my_list instanceof PEAR_Error) { + $notification->push($my_list); + $my_list = array(); +} + +// Get all friends of frends and make a top list of common users +$users = array(); +foreach ($my_list as $friend) { + $friends = Folks_Friends::singleton(null, array('user' => $friend)); + $friend_friends = $friends->getFriends(); + if ($friend_friends instanceof PEAR_Error) { + continue; + } + foreach ($friend_friends as $friend_friend) { + if ($friend_friend == Auth::getAuth() || + in_array($friend_friend, $my_list)) { + continue; + } elseif (isset($users[$friend_friend])) { + $users[$friend_friend] += 1; + } else { + $users[$friend_friend] = 0; + } + } +} + +arsort($users); +$users = array_slice($users, 0, 20, true); +$users = array_keys($users); + +$title = _("People you might know"); +$link = Folks::getUrlFor('list', 'online', true); +$rss_link = Horde::applicationUrl('rss/friends.php', true); + +require FOLKS_TEMPLATES . '/feed/feed.php'; \ No newline at end of file diff --git a/folks/rss/online.php b/folks/rss/online.php new file mode 100644 index 000000000..121613750 --- /dev/null +++ b/folks/rss/online.php @@ -0,0 +1,28 @@ + + * @package Folks + */ + +define('AUTH_HANDLER', true); +require_once dirname(__FILE__) . '/../lib/base.php'; + +$users = $folks_driver->getOnlineUsers(); +if ($users instanceof PEAR_Error) { + $users = array(); +} else { + $users = array_flip($users); +} + +$title = _("Online users"); +$link = Folks::getUrlFor('list', 'online', true); +$rss_link = Horde::applicationUrl('rss/online.php', true); + +require FOLKS_TEMPLATES . '/feed/feed.php'; \ No newline at end of file diff --git a/folks/templates/edit/add.php b/folks/templates/edit/add.php new file mode 100644 index 000000000..d2de40fb9 --- /dev/null +++ b/folks/templates/edit/add.php @@ -0,0 +1,3 @@ + + +renderActive(null, null, null, 'post')?> \ No newline at end of file diff --git a/folks/templates/feed/activities.php b/folks/templates/feed/activities.php new file mode 100644 index 000000000..c66afd900 --- /dev/null +++ b/folks/templates/feed/activities.php @@ -0,0 +1,27 @@ +' ?> + + + + <?php echo $title ?> + + + getImageDir() ?>/folks.png + + <?php echo $title ?> + + + + + get('name') ?> + $activity): ?> + + <?php echo htmlspecialchars($activity['user']) ?> + + + + + + + + + diff --git a/folks/templates/feed/feed.php b/folks/templates/feed/feed.php new file mode 100644 index 000000000..a4d35a2e5 --- /dev/null +++ b/folks/templates/feed/feed.php @@ -0,0 +1,27 @@ +' ?> + + + + <?php echo $title ?> + + + getImageDir() ?>/folks.png + + <?php echo $title ?> + + + + + get('name') ?> + + + <?php echo htmlspecialchars($user) ?> + '?> ]]> + + + + + + + + diff --git a/folks/templates/user/user.php b/folks/templates/user/user.php index ba0720234..b6db6d874 100644 --- a/folks/templates/user/user.php +++ b/folks/templates/user/user.php @@ -79,7 +79,7 @@ include FOLKS_TEMPLATES . '/user/actions.php'; ($profile['last_online'] == 'all' || Auth::isAuthenticated() && ( $profile['last_online'] == 'authenticated' || - $profile['last_online'] == 'friends' && $folks_driver->isFriend($user, Auth::getAuth()))) + $profile['last_online'] == 'friends' && $friends_driver->isFriend(Auth::getAuth()))) ) { echo ' ' . _("Last time online") . ': ' . Folks::format_datetime($profile['last_online_on']); } @@ -140,7 +140,7 @@ foreach ($profile['activity_log'] as $item) { getFriends($user); +$friends = $friends_driver->getFriends(); if (!empty($friends)): ?> @@ -402,7 +402,7 @@ case 'never': case 'authenticated': $allow_comments = Auth::isAuthenticated(); if ($allow_comments) { - if ($folks_driver->isBlacklisted($user, Auth::getAuth())) { + if ($friends_driver->isBlacklisted(Auth::getAuth())) { $allow_comments = false; $comments_reason = sprintf(_("You are on %s blacklist."), $user); } @@ -415,14 +415,13 @@ case 'authenticated': break; case 'friends': - $allow_comments = $folks_driver->isFriend($user, Auth::getAuth()); + $allow_comments = $friends_driver->isFriend(Auth::getAuth()); $comments_reason = _("Only authenticated users can post comments."); break; default: $allow_comments = true; - - if (Auth::isAuthenticated() && $folks_driver->isBlacklisted($user, Auth::getAuth())) { + if (Auth::isAuthenticated() && $friends_driver->isBlacklisted(Auth::getAuth())) { $allow_comments = false; $comments_reason = sprintf(_("You are on %s blacklist."), $user); } @@ -445,4 +444,4 @@ if ($allow_comments) { } } else { echo $comments_reason; -} +} \ No newline at end of file diff --git a/folks/user.php b/folks/user.php index aca877961..abb359394 100644 --- a/folks/user.php +++ b/folks/user.php @@ -22,6 +22,10 @@ if ($profile instanceof PEAR_Error) { exit; } +// Load its friend list +require_once FOLKS_BASE . '/lib/Friends.php'; +$friends_driver = Folks_Friends::singleton(null, array('user' => $user)); + // Log user view $folks_driver->logView($user); @@ -29,7 +33,7 @@ $folks_driver->logView($user); if ($profile['activity_log'] == 'all' || Auth::isAuthenticated() && ( $profile['activity_log'] == 'authenticated' || - $profile['activity_log'] == 'friends' && $folks_driver->isFriend($user, Auth::getAuth())) + $profile['activity_log'] == 'friends' && $friends_driver->isFriend($user)) ) { $profile['activity_log'] = $folks_driver->getActivity($user); if ($profile['activity_log'] instanceof PEAR_Error) { @@ -88,7 +92,7 @@ case 'public_authenticated': break; case 'public_friends': - if ($folks_driver->isFriend($user, Auth::getAuth())) { + if ($friends_driver->isFriend($user)) { require FOLKS_TEMPLATES . '/user/user.php'; } else { require FOLKS_TEMPLATES . '/user/friends.php'; -- 2.11.0