require FOLKS_TEMPLATES . '/common-header.inc';
require FOLKS_TEMPLATES . '/menu.inc';
-echo $tabs->render('blacklist');
+echo $tabs->render('add');
+require FOLKS_TEMPLATES . '/edit/header.php';
require FOLKS_TEMPLATES . '/edit/add.php';
+require FOLKS_TEMPLATES . '/edit/footer.php';
require $registry->get('templates', 'horde') . '/common-footer.inc';
\ No newline at end of file
require FOLKS_TEMPLATES . '/menu.inc';
echo $tabs->render('blacklist');
+require FOLKS_TEMPLATES . '/edit/header.php';
require FOLKS_TEMPLATES . '/edit/friends.php';
-
$friend_form->renderActive();
+require FOLKS_TEMPLATES . '/edit/footer.php';
require $registry->get('templates', 'horde') . '/common-footer.inc';
\ No newline at end of file
require FOLKS_TEMPLATES . '/menu.inc';
echo $tabs->render('friendsof');
+require FOLKS_TEMPLATES . '/edit/header.php';
require FOLKS_TEMPLATES . '/edit/friends.php';
+require FOLKS_TEMPLATES . '/edit/footer.php';
require $registry->get('templates', 'horde') . '/common-footer.inc';
\ No newline at end of file
require FOLKS_TEMPLATES . '/menu.inc';
echo $tabs->render('friends');
+require FOLKS_TEMPLATES . '/edit/header.php';
require FOLKS_TEMPLATES . '/edit/friends.php';
+require FOLKS_TEMPLATES . '/edit/footer.php';
require $registry->get('templates', 'horde') . '/common-footer.inc';
\ No newline at end of file
require FOLKS_TEMPLATES . '/menu.inc';
echo $tabs->render('friendsof');
+require FOLKS_TEMPLATES . '/edit/header.php';
require FOLKS_TEMPLATES . '/edit/friends.php';
+require FOLKS_TEMPLATES . '/edit/footer.php';
require $registry->get('templates', 'horde') . '/common-footer.inc';
\ No newline at end of file
require FOLKS_TEMPLATES . '/menu.inc';
echo $tabs->render('friends');
+require FOLKS_TEMPLATES . '/edit/header.php';
require FOLKS_TEMPLATES . '/edit/friends.php';
+require FOLKS_TEMPLATES . '/edit/footer.php';
require $registry->get('templates', 'horde') . '/common-footer.inc';
\ No newline at end of file
require FOLKS_TEMPLATES . '/menu.inc';
echo $tabs->render('friends');
+require FOLKS_TEMPLATES . '/edit/header.php';
require FOLKS_TEMPLATES . '/edit/invite.php';
+require FOLKS_TEMPLATES . '/edit/footer.php';
require $registry->get('templates', 'horde') . '/common-footer.inc';
\ No newline at end of file
require FOLKS_TEMPLATES . '/menu.inc';
echo $tabs->render('friends');
+require FOLKS_TEMPLATES . '/edit/header.php';
require FOLKS_TEMPLATES . '/edit/friends.php';
+require FOLKS_TEMPLATES . '/edit/footer.php';
require $registry->get('templates', 'horde') . '/common-footer.inc';
\ No newline at end of file
require FOLKS_TEMPLATES . '/menu.inc';
echo $tabs->render('friendsof');
+require FOLKS_TEMPLATES . '/edit/header.php';
require FOLKS_TEMPLATES . '/edit/friends.php';
+require FOLKS_TEMPLATES . '/edit/footer.php';
require $registry->get('templates', 'horde') . '/common-footer.inc';
\ No newline at end of file
continue;
}
foreach ($activities as $activity) {
- $firendActivities[$activity['activity_date']] = array('message' => $activity['activity_message'],
- 'scope' => $activity['activity_scope'],
- 'user' => $user);
+ $firendActivities[$activity['activity_date']] = $activity;
}
}
krsort($firendActivities);
+$firendActivities = array_slice($firendActivities, 0, 30);
// Own activities
$activities = $folks_driver->getActivity(Auth::getAuth());
exit;
}
-// Users online
-$online = $folks_driver->getOnlineUsers();
-if ($online instanceof PEAR_Error) {
- $notification->push($online);
- $online = array();
-}
-
Horde::addScriptFile('stripe.js', 'horde', true);
require FOLKS_TEMPLATES . '/common-header.inc';
-<?php require dirname(__FILE__) . '/tabs.php'; ?>
-
<?php echo $friend_form->renderActive(null, null, null, 'post')?>
\ No newline at end of file
-<?php require dirname(__FILE__) . '/tabs.php'; ?>
-
<h1 class="header"><?php echo $title ?></h1>
<?php
-<?php require dirname(__FILE__) . '/tabs.php'; ?>
-
<?php echo $form->renderActive(null, null, null, 'post')?>
\ No newline at end of file
+++ /dev/null
-<h1 class="header"><?php echo _("Friends") ?></h1>
-<br />
-<br />
-
-<?php
-
-// Users online
-$online = $folks_driver->getOnlineUsers();
-if ($online instanceof PEAR_Error) {
- return $online;
-}
-
-// Get groups
-$groups = $friends->getGroups();
-if ($groups instanceof PEAR_Error) {
- $notification->push($groups);
- $groups = array();
-}
-
-$vars = Variables::getDefaultVariables();
-$ftabs = new Horde_UI_Tabs('ftab', $vars);
-
-$ftabs->addTab(_("Add"), Horde::applicationUrl('edit/friends/add.php'), 'add');
-$ftabs->addTab(_("All"), Horde::applicationUrl('edit/friends/index.php'), 'all');
-$ftabs->addTab(_("Invite"), Horde::applicationUrl('edit/friends/invite.php'), 'invite');
-
-foreach ($groups as $group_id => $group_name) {
- $ftabs->addTab($group_name, Horde::applicationUrl('edit/friends/friends.php'), $group_id);
-}
-
-$ftabs->addTab(_("Might know"), Horde::applicationUrl('edit/friends/know.php'), 'know');
-$ftabs->addTab(_("Wainting for"), Horde::applicationUrl('edit/friends/for.php'), 'for');
-$ftabs->addTab(_("Wainting from"), Horde::applicationUrl('edit/friends/from.php'), 'from');
-$ftabs->addTab(_("I am friend of"), Horde::applicationUrl('edit/friends/of.php'), 'of');
-$ftabs->addTab(_("Blacklist"), Horde::applicationUrl('edit/friends/blacklist.php'), 'blacklist');
-
-echo $ftabs->render();
<h1 class="header">
<span style="float: right"><a href="<?php echo Horde::applicationUrl('edit/friends/index.php') ?>"><?php echo _("Edit friends") ?></a></span>
<?php echo _("Friends activities") ?></h1>
-<table id="friendactivities" class="striped sortable" style="width: 100%">
-<thead>
-<tr>
- <th><?php echo _("User") ?></th>
- <th><?php echo _("Activity") ?></th>
-</tr>
-</thead>
-<tbody>
<?php
-foreach ($firendActivities as $activity_date => $activity) {
- echo '<tr>'
- . '<td><a href="' . Folks::getUrlFor('user', $activity['user']) . '">'
- . '<img src="' . Folks::getImageUrl($activity['user']) . '" class="userMiniIcon" /> '
- . $activity['user'] . '</a></td>'
- . ' <td>' . $activity['message'] . '<br />' .
- '<span class="small">' . Folks::format_datetime($activity_date) . '</span>'
- . '</td></tr>';
-}
+$list = $firendActivities;
+require FOLKS_TEMPLATES . '/block/activities.php';
?>
-</table>
-
-<br />
-<br />
-
-<h1 class="header">
-<span style="float: right"><a href="<?php echo Horde::applicationUrl('edit/activity.php') ?>"><?php echo _("Edit activities") ?></a></span>
-<?php echo _("Your activities") ?>
-</h1>
-<table id="activities" class="striped sortable" style="width: 100%">
-<thead>
-<tr>
- <th><?php echo _("Application") ?></th>
- <th><?php echo _("Activity") ?></th>
-</tr>
-</thead>
-<tbody>
-<?php foreach ($activities as $activity) { ?>
-<tr>
- <td><a href="<?php echo $registry->get('webroot', $activity['activity_scope']) ?>" />
- <img src="<?php echo $registry->getImageDir($activity['activity_scope']) . '/' . $activity['activity_scope'] ?>.png" />
- <?php echo $registry->get('name', $activity['activity_scope']) ?></a>
- </td>
- <td>
- <?php echo $activity['activity_message']; unset($activity['activity_message']); ?><br >
- <span class="small"><?php echo Folks::format_datetime($activity['activity_date']) ?></span>
- </td>
-</tr>
-<?php } ?>
-</tbody>
-</table>
-
</td>
<td>
-<h1 class="header"><?php echo _("Online friends") ?></h1>
-<?php
-// Prepare actions
-$actions = array(
- array('url' => Horde::applicationUrl('user.php'),
- 'id' => 'user',
- 'name' => _("View profile")));
-if ($registry->hasInterface('letter')) {
- $actions[] = array('url' => $registry->callByPackage('letter', 'compose', ''),
- 'id' => 'user_to',
- 'name' => _("Send message"));
-}
-$list = array_intersect($friend_list, array_flip($online));
-require FOLKS_TEMPLATES . '/block/users.php';
-?>
-
-<br />
-<br />
-
<h1 class="header"><?php echo _("People you might know") ?></h1>
<?php
// Prepare actions
require FOLKS_TEMPLATES . '/block/users.php';
?>
+<br />
+<br />
+
+<h1 class="header">
+<span style="float: right"><a href="<?php echo Horde::applicationUrl('edit/activity.php') ?>"><?php echo _("Edit activities") ?></a></span>
+<?php echo _("Your activities") ?>
+</h1>
+<?php
+$list = $activities;
+require FOLKS_TEMPLATES . '/block/activities.php';
+?>
+
</td>
</tr>
</table>