aboutsummaryrefslogtreecommitdiffstats
path: root/mod/network.php
diff options
context:
space:
mode:
Diffstat (limited to 'mod/network.php')
-rw-r--r--mod/network.php94
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