X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=mod%2Fnetwork.php;h=79a2f2b3896c6490acc789abc7b705b197ff3e7d;hb=3ad7c395fb9a33319531e04673563e7c9983d8f0;hp=096c8a79ff1e45a59fdfb9ca5476b8eb40df0cca;hpb=aeb585fee1c634f75128a60cdb10ef8c8451e69a;p=friendica.git diff --git a/mod/network.php b/mod/network.php index 096c8a79ff..79a2f2b389 100644 --- a/mod/network.php +++ b/mod/network.php @@ -38,23 +38,23 @@ function network_content(&$a, $update = 0) { $group = 0; - if(! $update) { - $o .= ''; + $nouveau = false; + require_once('include/acl_selectors.php'); - $nouveau = false; + if(($a->argc > 2) && $a->argv[2] === 'new') + $nouveau = true; - if(($a->argc > 2) && $a->argv[2] === 'new') + if($a->argc > 1) { + if($a->argv[1] === 'new') $nouveau = true; - - // pull out the group here because the updater might have different args - if($a->argc > 1) { - if($a->argv[1] === 'new') - $nouveau = true; - else { - $group = intval($a->argv[1]); - $group_acl = array('allow_gid' => '<' . $group . '>'); - } + else { + $group = intval($a->argv[1]); + $group_acl = array('allow_gid' => '<' . $group . '>'); } + } + + if(! $update) { + $o .= ''; $_SESSION['return_url'] = $a->cmd; @@ -68,7 +68,6 @@ function network_content(&$a, $update = 0) { '$nickname' => $a->user['nickname'] )); - require_once('include/acl_selectors.php'); $tpl = load_view_file("view/jot.tpl"); @@ -79,11 +78,21 @@ function network_content(&$a, $update = 0) { $celeb = ((($a->user['page-flags'] == PAGE_SOAPBOX) || ($a->user['page-flags'] == PAGE_COMMUNITY)) ? true : false); + $jotplugins = ''; + $jotnets = ''; + call_hooks('jot_tool', $jotplugins); + call_hooks('jot_networks', $jotnets); + + $tpl = replace_macros($tpl,array('$jotplugins' => $jotplugins)); + $o .= replace_macros($tpl,array( '$return_path' => $a->cmd, '$baseurl' => $a->get_baseurl(), '$defloc' => $a->user['default-location'], '$visitor' => 'block', + '$emailcc' => t('CC: email addresses'), + '$jotnets' => $jotnets, + '$emtitle' => t('Example: bob@example.com, mary@example.com'), '$lockstate' => $lockstate, '$acl' => populate_acl((($group) ? $group_acl : $a->user), $celeb), '$bang' => (($group) ? '!' : ''), @@ -96,10 +105,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) { $o .= '
' . "\r\n"; - $o .= "\r\n"; - } + $o .= "\r\n"; } @@ -124,6 +133,8 @@ function network_content(&$a, $update = 0) { intval($_SESSION['uid']) ); if(! count($r)) { + if($update) + killme(); notice( t('No such group') . EOL ); goaway($a->get_baseurl() . '/network'); return; // NOTREACHED @@ -240,7 +251,7 @@ function network_content(&$a, $update = 0) { '$lock' => $lock, '$thumb' => $profile_avatar, '$title' => $item['title'], - '$body' => bbcode($item['body']), + '$body' => smilies(bbcode($item['body'])), '$ago' => relative_date($item['created']), '$location' => $location, '$indent' => '', @@ -330,7 +341,8 @@ function network_content(&$a, $update = 0) { if($item['last-child']) { $comment = replace_macros($cmnt_tpl,array( - '$return_path' => $_SESSION['return_url'], + '$return_path' => '', + '$jsreload' => '', // $_SESSION['return_url'], '$type' => 'net-comment', '$id' => $item['item_id'], '$parent' => $item['parent'], @@ -415,6 +427,7 @@ function network_content(&$a, $update = 0) { '$owner_url' => $owner_url, '$owner_photo' => $owner_photo, '$owner_name' => $owner_name, + '$plink' => get_plink($item), '$drop' => $drop, '$vote' => $likebuttons, '$like' => $like, @@ -430,8 +443,10 @@ function network_content(&$a, $update = 0) { } } - if(! $update) + if(! $update) { $o .= paginate($a); + $o .= '
' . t('Shared content is covered by the Creative Commons Attribution 3.0 license.') . '
'; + } return $o; } \ No newline at end of file