aboutsummaryrefslogtreecommitdiffstats
path: root/mod
diff options
context:
space:
mode:
authorFriendika <info@friendika.com>2011-02-16 23:05:48 -0800
committerFriendika <info@friendika.com>2011-02-16 23:05:48 -0800
commit9f8b6dff1ce7ddce93647d7155ecdfb102a2f4e0 (patch)
treeba0a4bad4395fc2e0b80aab68851ca27009c3177 /mod
parent4bff52990e5f340cf879abf7c1cdaea7ee928d74 (diff)
downloadvolse-hubzilla-9f8b6dff1ce7ddce93647d7155ecdfb102a2f4e0.tar.gz
volse-hubzilla-9f8b6dff1ce7ddce93647d7155ecdfb102a2f4e0.tar.bz2
volse-hubzilla-9f8b6dff1ce7ddce93647d7155ecdfb102a2f4e0.zip
ajax live update for all network pages and subpages
Diffstat (limited to 'mod')
-rw-r--r--mod/network.php16
1 files changed, 13 insertions, 3 deletions
diff --git a/mod/network.php b/mod/network.php
index bb0850d68..773c21be2 100644
--- a/mod/network.php
+++ b/mod/network.php
@@ -40,6 +40,14 @@ function network_content(&$a, $update = 0) {
$nouveau = false;
+ if($update && (x($_SESSION,'netargs'))) {
+ $nouveau = $_SESSION['netargs']['nouveau'];
+ $group = $_SESSION['netargs']['group'];
+ $a->pager['page'] = $_SESSION['netargs']['page'];
+ $a->set_pager_itemspage(50);
+ }
+
+
if(! $update) {
$o .= '<script> $(document).ready(function() { $(\'#nav-network-link\').addClass(\'nav-selected\'); });</script>';
@@ -56,6 +64,8 @@ function network_content(&$a, $update = 0) {
}
}
+
+ $_SESSION['netarg'] = array('nouveau' => $nouveau, 'group' => $group, 'page' => $a->pager['page']);
$_SESSION['return_url'] = $a->cmd;
$geotag = (($a->user['allow_location']) ? load_view_file('view/jot_geotag.tpl') : '');
@@ -106,10 +116,10 @@ function network_content(&$a, $update = 0) {
// filtering by group and also you aren't writing a comment (the last
// criteria is discovered in javascript).
- if($a->pager['start'] == 0 && $a->argc == 1) {
+// if($a->pager['start'] == 0 && $a->argc == 1) {
$o .= '<div id="live-network"></div>' . "\r\n";
$o .= "<script> var profile_uid = " . $_SESSION['uid'] . "; </script>\r\n";
- }
+// }
}
@@ -341,7 +351,7 @@ function network_content(&$a, $update = 0) {
if($item['last-child']) {
$comment = replace_macros($cmnt_tpl,array(
'$return_path' => '',
- '$jsreload => '', // $_SESSION['return_url'],
+ '$jsreload' => '', // $_SESSION['return_url'],
'$type' => 'net-comment',
'$id' => $item['item_id'],
'$parent' => $item['parent'],