aboutsummaryrefslogtreecommitdiffstats
path: root/mod/profile.php
diff options
context:
space:
mode:
authorFriendika <info@friendika.com>2011-04-20 05:48:12 -0700
committerFriendika <info@friendika.com>2011-04-20 05:48:12 -0700
commite302741e49adc73150bcd3027de1fdb157600a9b (patch)
tree75080ee319360286244e0f33de6639e693f5a357 /mod/profile.php
parent0af6014c940eba5c5d9399e922794da373738337 (diff)
downloadvolse-hubzilla-e302741e49adc73150bcd3027de1fdb157600a9b.tar.gz
volse-hubzilla-e302741e49adc73150bcd3027de1fdb157600a9b.tar.bz2
volse-hubzilla-e302741e49adc73150bcd3027de1fdb157600a9b.zip
merge status editor instances
Diffstat (limited to 'mod/profile.php')
-rw-r--r--mod/profile.php95
1 files changed, 13 insertions, 82 deletions
diff --git a/mod/profile.php b/mod/profile.php
index 77df6cbdb..eea6b92a5 100644
--- a/mod/profile.php
+++ b/mod/profile.php
@@ -120,88 +120,19 @@ function profile_content(&$a, $update = 0) {
if(can_write_wall($a,$a->profile['profile_uid'])) {
- $geotag = ((($is_owner || $commvisitor) && $a->profile['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->profile['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')
- ));
-
- require_once('include/acl_selectors.php');
-
- $tpl = load_view_file('view/jot.tpl');
-
- if(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';
-
- $jotplugins = '';
- $jotnets = '';
-
- $mail_disabled = ((function_exists('imap_open') && (! get_config('system','imap_disabled'))) ? 0 : 1);
-
- $mail_enabled = false;
- $pubmail_enabled = false;
-
- if(($is_owner) && (! $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(
- '$baseurl' => $a->get_baseurl(),
- '$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' => '',
- '$defloc' => (($is_owner) ? $a->user['default-location'] : ''),
- '$return_path' => $a->cmd,
- '$visitor' => (($is_owner || $commvisitor) ? 'block' : 'none'),
- '$lockstate' => $lockstate,
- '$emailcc' => t('CC: email addresses'),
- '$jotnets' => $jotnets,
- '$emtitle' => t('Example: bob@example.com, mary@example.com'),
- '$bang' => '',
- '$acl' => (($is_owner) ? populate_acl($a->user, $celeb) : ''),
- '$profile_uid' => $a->profile['profile_uid']
- ));
+ $x = array(
+ 'is_owner' => $is_owner,
+ 'allow_location' => ((($is_owner || $commvisitor) && $a->profile['allow_location']) ? true : false),
+ 'default_location' => (($is_owner) ? $a->user['default-location'] : ''),
+ 'nickname' => $a->profile['nickname'],
+ 'lockstate' => (((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' => (($is_owner) ? populate_acl($a->user, $celeb) : ''),
+ 'bang' => '',
+ 'visitor' => (($is_owner || $commvisitor) ? 'block' : 'none'),
+ 'profile_uid' => $a->profile['profile_uid']
+ );
+
+ $o .= status_editor($a,$x);
}
// This is ugly, but we can't pass the profile_uid through the session to the ajax updater,