Add feeds.
authorDuck (Jakob Munih) <duck@obala.net>
Sun, 22 Feb 2009 19:48:05 +0000 (20:48 +0100)
committerDuck (Jakob Munih) <duck@obala.net>
Sun, 22 Feb 2009 19:48:05 +0000 (20:48 +0100)
Remove dirver isFriend and isBlacklisted copy of friends method.
Fix send message link.
Slovenian translation update

22 files changed:
folks/edit/friends/blacklist.php
folks/edit/friends/for.php
folks/edit/friends/friends.php
folks/edit/friends/from.php
folks/edit/friends/index.php
folks/edit/friends/know.php [new file with mode: 0644]
folks/edit/friends/of.php
folks/lib/Driver.php
folks/lib/Folks.php
folks/lib/Friends.php
folks/locale/sl_SI/LC_MESSAGES/folks.mo
folks/po/folks.pot
folks/po/sl_SI.po
folks/rss/activity.php [new file with mode: 0644]
folks/rss/friends.php [new file with mode: 0644]
folks/rss/know.php [new file with mode: 0644]
folks/rss/online.php [new file with mode: 0644]
folks/templates/edit/add.php [new file with mode: 0644]
folks/templates/feed/activities.php [new file with mode: 0644]
folks/templates/feed/feed.php [new file with mode: 0644]
folks/templates/user/user.php
folks/user.php

index 2dbd1cc..eaaffeb 100644 (file)
@@ -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');
 
index 16a35e5..5ea034d 100644 (file)
@@ -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';
index 73c6b9d..3fb4892 100644 (file)
@@ -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';
index da9e20f..e8ac38d 100644 (file)
@@ -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';
index 41ecc08..4abbb6a 100644 (file)
@@ -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 (file)
index 0000000..32edf90
--- /dev/null
@@ -0,0 +1,77 @@
+<?php
+/**
+ * $Id: friends.php 976 2008-10-07 21:24:47Z duck $
+ *
+ * Copyright Obala d.o.o. (www.obala.si)
+ *
+ * See the enclosed file COPYING for license information (GPL). If you
+ * did not receive this file, see http://www.fsf.org/copyleft/gpl.html.
+ *
+ * @author Duck <duck@obala.net>
+ * @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
index 11a7084..b3f4d48 100644 (file)
@@ -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';
index 2416818..0829354 100644 (file)
@@ -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
index 84fe1dc..86219d4 100644 (file)
@@ -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);
     }
 
     /**
index 4b06b28..cb3ad46 100644 (file)
@@ -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;
index 9947ed8..4ad339e 100644 (file)
Binary files a/folks/locale/sl_SI/LC_MESSAGES/folks.mo and b/folks/locale/sl_SI/LC_MESSAGES/folks.mo differ
index f4b22bf..8c47db8 100644 (file)
@@ -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 <EMAIL@ADDRESS>\n"
 "Language-Team: LANGUAGE <LL@li.org>\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 ""
 
index a206f1e..4175edb 100644 (file)
@@ -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 <marko.milost@obala.si>\n"
 "Language-Team: Slovene <sl@li.org>\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 (file)
index 0000000..76627bb
--- /dev/null
@@ -0,0 +1,57 @@
+<?php
+/**
+ * $Id: friends.php 976 2008-10-07 21:24:47Z duck $
+ *
+ * Copyright Obala d.o.o. (www.obala.si)
+ *
+ * See the enclosed file COPYING for license information (GPL). If you
+ * did not receive this file, see http://www.fsf.org/copyleft/gpl.html.
+ *
+ * @author Duck <duck@obala.net>
+ * @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 (file)
index 0000000..c50331a
--- /dev/null
@@ -0,0 +1,52 @@
+<?php
+/**
+ * $Id: friends.php 976 2008-10-07 21:24:47Z duck $
+ *
+ * Copyright Obala d.o.o. (www.obala.si)
+ *
+ * See the enclosed file COPYING for license information (GPL). If you
+ * did not receive this file, see http://www.fsf.org/copyleft/gpl.html.
+ *
+ * @author Duck <duck@obala.net>
+ * @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 (file)
index 0000000..e0d9bcb
--- /dev/null
@@ -0,0 +1,65 @@
+<?php
+/**
+ * $Id: friends.php 976 2008-10-07 21:24:47Z duck $
+ *
+ * Copyright Obala d.o.o. (www.obala.si)
+ *
+ * See the enclosed file COPYING for license information (GPL). If you
+ * did not receive this file, see http://www.fsf.org/copyleft/gpl.html.
+ *
+ * @author Duck <duck@obala.net>
+ * @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 (file)
index 0000000..1216137
--- /dev/null
@@ -0,0 +1,28 @@
+<?php
+/**
+ * $Id: friends.php 976 2008-10-07 21:24:47Z duck $
+ *
+ * Copyright Obala d.o.o. (www.obala.si)
+ *
+ * See the enclosed file COPYING for license information (GPL). If you
+ * did not receive this file, see http://www.fsf.org/copyleft/gpl.html.
+ *
+ * @author Duck <duck@obala.net>
+ * @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 (file)
index 0000000..d2de40f
--- /dev/null
@@ -0,0 +1,3 @@
+<?php require dirname(__FILE__) . '/tabs.php'; ?>
+
+<?php echo $friend_form->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 (file)
index 0000000..c66afd9
--- /dev/null
@@ -0,0 +1,27 @@
+<?php echo '<?xml version="1.0" encoding="' . NLS::getCharset() . '"?>' ?>
+
+<rss version="2.0" xmlns:media="http://search.yahoo.com/mrss/">
+ <channel>
+  <title><?php echo $title ?></title>
+  <description><?php echo $title ?></description>
+  <image>
+   <url><?php echo $registry->getImageDir() ?>/folks.png</url>
+   <link><?php echo $link ?></link>
+   <title><?php echo $title ?></title>
+  </image>
+  <link><?php echo $link ?></link>
+  <atom:link rel="self" type="application/rss+xml" title="<?php echo $title ?>" href="<?php echo $rss_link ?>" xmlns:atom="http://www.w3.org/2005/Atom"></atom:link>
+  <pubDate><?php echo htmlspecialchars(date('r')); ?></pubDate>
+  <generator><?php echo $registry->get('name') ?></generator>
+<?php foreach ($firendActivities as $activity_date => $activity): ?>
+   <item>
+    <title><?php echo htmlspecialchars($activity['user']) ?></title>
+    <description><?php echo htmlspecialchars(strip_tags($activity['message'])) ?></description>
+    <link><?php echo Folks::getUrlFor('user', $activity['user'], true) ?></link>
+    <author><?php echo $activity['user'] ?></author>
+    <pubDate><?php echo htmlspecialchars(date('r'), $activity_date); ?></pubDate>
+  </item>
+  <?php endforeach; ?>
+ </channel>
+</rss>
+
diff --git a/folks/templates/feed/feed.php b/folks/templates/feed/feed.php
new file mode 100644 (file)
index 0000000..a4d35a2
--- /dev/null
@@ -0,0 +1,27 @@
+<?php echo '<?xml version="1.0" encoding="' . NLS::getCharset() . '"?>' ?>
+
+<rss version="2.0" xmlns:media="http://search.yahoo.com/mrss/">
+ <channel>
+  <title><?php echo $title ?></title>
+  <description><?php echo $title ?></description>
+  <image>
+   <url><?php echo $registry->getImageDir() ?>/folks.png</url>
+   <link><?php echo $link ?></link>
+   <title><?php echo $title ?></title>
+  </image>
+  <link><?php echo $link ?></link>
+  <atom:link rel="self" type="application/rss+xml" title="<?php echo $title ?>" href="<?php echo $rss_link ?>" xmlns:atom="http://www.w3.org/2005/Atom"></atom:link>
+  <pubDate><?php echo htmlspecialchars(date('r')); ?></pubDate>
+  <generator><?php echo $registry->get('name') ?></generator>
+<?php foreach ($users as $user): ?>
+   <item>
+    <title><?php echo htmlspecialchars($user) ?></title>
+    <description><![CDATA[ <?php echo '<img src="' . Folks::getImageUrl($user, 'small', true) . '" />'?> ]]></description>
+    <link><?php echo Folks::getUrlFor('user', $user, true) ?></link>
+    <author><?php echo $user ?></author>
+  </item>
+  <?php endforeach; ?>
+ </channel>
+</rss>
+
+
index ba07202..b6db6d8 100644 (file)
@@ -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) {
 </tr>
 
 <?php
-$friends = $folks_driver->getFriends($user);
+$friends = $friends_driver->getFriends();
 if (!empty($friends)):
 ?>
 <tr>
@@ -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
index aca8779..abb3593 100644 (file)
@@ -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';