diff options
author | Friendika <info@friendika.com> | 2011-04-20 05:48:12 -0700 |
---|---|---|
committer | Friendika <info@friendika.com> | 2011-04-20 05:48:12 -0700 |
commit | e302741e49adc73150bcd3027de1fdb157600a9b (patch) | |
tree | 75080ee319360286244e0f33de6639e693f5a357 /mod/network.php | |
parent | 0af6014c940eba5c5d9399e922794da373738337 (diff) | |
download | volse-hubzilla-e302741e49adc73150bcd3027de1fdb157600a9b.tar.gz volse-hubzilla-e302741e49adc73150bcd3027de1fdb157600a9b.tar.bz2 volse-hubzilla-e302741e49adc73150bcd3027de1fdb157600a9b.zip |
merge status editor instances
Diffstat (limited to 'mod/network.php')
-rw-r--r-- | mod/network.php | 94 |
1 files changed, 12 insertions, 82 deletions
diff --git a/mod/network.php b/mod/network.php index 3e6c5dc4a..f40d34353 100644 --- a/mod/network.php +++ b/mod/network.php @@ -71,91 +71,21 @@ function network_content(&$a, $update = 0) { $_SESSION['return_url'] = $a->cmd; - $geotag = (($a->user['allow_location']) ? load_view_file('view/jot_geotag.tpl') : ''); - - $tpl = load_view_file('view/jot-header.tpl'); - - $a->page['htmlhead'] .= replace_macros($tpl, array( - '$baseurl' => $a->get_baseurl(), - '$geotag' => $geotag, - '$nickname' => $a->user['nickname'], - '$linkurl' => t('Please enter a link URL:'), - '$utubeurl' => t('Please enter a YouTube link:'), - '$vidurl' => t("Please enter a video\x28.ogg\x29 link/URL:"), - '$audurl' => t("Please enter an audio\x28.ogg\x29 link/URL:"), - '$whereareu' => t('Where are you right now?'), - '$title' => t('Enter a title for this item') - )); - - - $tpl = load_view_file("view/jot.tpl"); - - if(($group) || (is_array($a->user) && ((strlen($a->user['allow_cid'])) || (strlen($a->user['allow_gid'])) || (strlen($a->user['deny_cid'])) || (strlen($a->user['deny_gid']))))) - $lockstate = 'lock'; - else - $lockstate = 'unlock'; - $celeb = ((($a->user['page-flags'] == PAGE_SOAPBOX) || ($a->user['page-flags'] == PAGE_COMMUNITY)) ? true : false); - $jotplugins = ''; - $jotnets = ''; - - $mail_disabled = ((function_exists('imap_open') && (! get_config('system','imap_disabled'))) ? 0 : 1); - - $mail_enabled = false; - $pubmail_enabled = false; - - if(! $mail_disabled) { - $r = q("SELECT * FROM `mailacct` WHERE `uid` = %d AND `server` != '' LIMIT 1", - intval(local_user()) - ); - if(count($r)) { - $mail_enabled = true; - if(intval($r[0]['pubmail'])) - $pubmail_enabled = true; - } - } - - if($mail_enabled) { - $selected = (($pubmail_enabled) ? ' checked="checked" ' : ''); - $jotnets .= '<div class="profile-jot-net"><input type="checkbox" name="pubmail_enable"' . $selected . 'value="1" /> ' - . t("Post to Email") . '</div>'; - } - - - 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, - '$action' => 'item', - '$share' => t('Share'), - '$upload' => t('Upload photo'), - '$weblink' => t('Insert web link'), - '$youtube' => t('Insert YouTube video'), - '$video' => t('Insert Vorbis [.ogg] video'), - '$audio' => t('Insert Vorbis [.ogg] audio'), - '$setloc' => t('Set your location'), - '$noloc' => t('Clear browser location'), - '$title' => t('Set title'), - '$wait' => t('Please wait'), - '$permset' => t('Permission settings'), - '$content' => '', - '$post_id' => '', - '$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 || $cid) ? $def_acl : $a->user), $celeb), - '$bang' => (($group || $cid) ? '!' : ''), - '$profile_uid' => local_user() - )); + $x = array( + 'is_owner' => true, + 'allow_location' => $a->user['allow_location'], + 'default_location' => $a->user['default_location'], + 'nickname' => $a->user['nickname'], + 'lockstate' => ((($group) || (is_array($a->user) && ((strlen($a->user['allow_cid'])) || (strlen($a->user['allow_gid'])) || (strlen($a->user['deny_cid'])) || (strlen($a->user['deny_gid']))))) ? 'lock' : 'unlock'), + 'acl' => populate_acl((($group || $cid) ? $def_acl : $a->user), $celeb), + 'bang' => (($group || $cid) ? '!' : ''), + 'visitor' => 'block', + 'profile_uid' => local_user() + ); + $o .= status_editor($a,$x); // The special div is needed for liveUpdate to kick in for this page. // We only launch liveUpdate if you are on the front page, you aren't |