Remove dirver isFriend and isBlacklisted copy of friends method.
Fix send message link.
Slovenian translation update
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';
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');
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',
'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';
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';
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';
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';
--- /dev/null
+<?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
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';
}
/**
- * 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
/**
* 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);
*/
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);
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);
$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)) {
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);
}
/**
*/
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);
*/
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);
*/
public function isFriend($user)
{
+ if ($user == $this->_user) {
+ return true;
+ }
+
$friends = $this->getFriends();
if ($friends instanceof PEAR_Error) {
return $friends;
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"
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 ""
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 ""
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 ""
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 ""
msgid "Add %s to you blacklist?"
msgstr ""
-#: lib/Forms/AddFriend.php:33
+#: lib/Forms/AddFriend.php:19
msgid "Add / Remove"
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 ""
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 ""
"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 ""
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 ""
msgid "Cancel"
msgstr ""
-#: lib/Folks.php:151 lib/Folks.php:155
+#: lib/Folks.php:156 lib/Folks.php:160
msgid "Cancer"
msgstr ""
msgid "Cannot reset password automatically, contact your administrator."
msgstr ""
-#: lib/Folks.php:274
+#: lib/Folks.php:279
msgid "Cannot retrieve user email."
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 ""
msgid "Edit personal information"
msgstr ""
-#: lib/Folks.php:291
+#: lib/Folks.php:296
msgid "Edit profile"
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 ""
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 ""
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 ""
msgid "Gender"
msgstr ""
-#: templates/edit/groups.php:12 lib/Forms/AddFriend.php:29
+#: templates/edit/groups.php:12
msgid "Group"
msgstr ""
msgid "How to preview users"
msgstr ""
-#: templates/edit/tabs.php:33
+#: templates/edit/tabs.php:34
msgid "I am friend of"
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 ""
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 ""
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 ""
msgid "Most popular users"
msgstr ""
-#: lib/Folks.php:289
+#: lib/Folks.php:294
msgid "My profile"
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 ""
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 ""
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 ""
msgid "Picture"
msgstr ""
-#: lib/Folks.php:135 lib/Folks.php:139
+#: lib/Folks.php:140 lib/Folks.php:144
msgid "Pisces"
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 ""
msgid "Reset Your Password"
msgstr ""
-#: lib/Folks.php:171 lib/Folks.php:175
+#: lib/Folks.php:176 lib/Folks.php:180
msgid "Sagittarius"
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 ""
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 ""
msgid "Send this profile to a friend"
msgstr ""
-#: lib/Folks.php:292
+#: lib/Folks.php:297
msgid "Services"
msgstr ""
"request has been approved."
msgstr ""
-#: lib/Folks.php:143 lib/Folks.php:147
+#: lib/Folks.php:148 lib/Folks.php:152
msgid "Taurus"
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."
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 ""
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"
#: 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 ""
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 ""
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 ""
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 ""
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 ""
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 ""
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 ""
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"
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"
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 ---"
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\"."
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"
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"
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"
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"
"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"
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"
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"
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."
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"
msgid "Edit personal information"
msgstr "Uredite osebne podatke"
-#: lib/Folks.php:291
+#: lib/Folks.php:296
msgid "Edit profile"
msgstr "Uredi profil"
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"
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"
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"
msgid "Gender"
msgstr "Spol"
-#: templates/edit/groups.php:12 lib/Forms/AddFriend.php:29
+#: templates/edit/groups.php:12
msgid "Group"
msgstr "Skupina"
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"
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"
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"
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"
msgid "Most popular users"
msgstr "Najbolj priljubljeni uporabniki"
-#: lib/Folks.php:289
+#: lib/Folks.php:294
msgid "My profile"
msgstr "Moj profil"
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"
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"
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"
msgid "Picture"
msgstr "Slika"
-#: lib/Folks.php:135 lib/Folks.php:139
+#: lib/Folks.php:140 lib/Folks.php:144
msgid "Pisces"
msgstr "Ribi"
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"
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"
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"
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"
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"
"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"
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."
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."
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"
#: 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"
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"
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"
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"
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."
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."
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"
--- /dev/null
+<?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
--- /dev/null
+<?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
--- /dev/null
+<?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
--- /dev/null
+<?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
--- /dev/null
+<?php require dirname(__FILE__) . '/tabs.php'; ?>
+
+<?php echo $friend_form->renderActive(null, null, null, 'post')?>
\ No newline at end of file
--- /dev/null
+<?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>
+
--- /dev/null
+<?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>
+
+
($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']);
}
</tr>
<?php
-$friends = $folks_driver->getFriends($user);
+$friends = $friends_driver->getFriends();
if (!empty($friends)):
?>
<tr>
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);
}
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);
}
}
} else {
echo $comments_reason;
-}
+}
\ No newline at end of file
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);
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) {
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';