Merge pull request #1696 from rabuzarus/acl-var
move jotnets to populate_acl
This commit is contained in:
commit
28f0e9a2de
|
@ -283,62 +283,57 @@ function get_acl_permissions($user = null) {
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
function populate_acl($user = null,$celeb = false) {
|
function populate_acl($user = null, $show_jotnets = false) {
|
||||||
|
|
||||||
$perms = get_acl_permissions($user);
|
$perms = get_acl_permissions($user);
|
||||||
|
|
||||||
// We shouldn't need to prune deadguys from the block list. Either way they can't get the message.
|
$jotnets = '';
|
||||||
// Also no point enumerating groups and checking them, that will take place on delivery.
|
if($show_jotnets) {
|
||||||
|
$mail_disabled = ((function_exists('imap_open') && (! get_config('system','imap_disabled'))) ? 0 : 1);
|
||||||
|
|
||||||
// $deny_cid = prune_deadguys($deny_cid);
|
$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;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/*$o = '';
|
if (!$user['hidewall']) {
|
||||||
$o .= '<div id="acl-wrapper">';
|
if($mail_enabled) {
|
||||||
$o .= '<div id="acl-permit-outer-wrapper">';
|
$selected = (($pubmail_enabled) ? ' checked="checked" ' : '');
|
||||||
$o .= '<div id="acl-permit-text">' . t('Visible To:') . '</div><div id="jot-public">' . t('everybody') . '</div>';
|
$jotnets .= '<div class="profile-jot-net"><input type="checkbox" name="pubmail_enable"' . $selected . ' value="1" /> ' . t("Post to Email") . '</div>';
|
||||||
$o .= '<div id="acl-permit-text-end"></div>';
|
}
|
||||||
$o .= '<div id="acl-permit-wrapper">';
|
|
||||||
$o .= '<div id="group_allow_wrapper">';
|
call_hooks('jot_networks', $jotnets);
|
||||||
$o .= '<label id="acl-allow-group-label" for="group_allow" >' . t('Groups') . '</label>';
|
} else
|
||||||
$o .= group_select('group_allow','group_allow',$allow_gid);
|
$jotnets .= sprintf(t('Connectors disabled, since "%s" is enabled.'),
|
||||||
$o .= '</div>';
|
t('Hide your profile details from unknown viewers?'));
|
||||||
$o .= '<div id="contact_allow_wrapper">';
|
}
|
||||||
$o .= '<label id="acl-allow-contact-label" for="contact_allow" >' . t('Contacts') . '</label>';
|
|
||||||
$o .= contact_select('contact_allow','contact_allow',$allow_cid,4,false,$celeb,true);
|
|
||||||
$o .= '</div>';
|
|
||||||
$o .= '</div>' . "\r\n";
|
|
||||||
$o .= '<div id="acl-allow-end"></div>' . "\r\n";
|
|
||||||
$o .= '</div>';
|
|
||||||
$o .= '<div id="acl-deny-outer-wrapper">';
|
|
||||||
$o .= '<div id="acl-deny-text">' . t('Except For:') . '</div>';
|
|
||||||
$o .= '<div id="acl-deny-text-end"></div>';
|
|
||||||
$o .= '<div id="acl-deny-wrapper">';
|
|
||||||
$o .= '<div id="group_deny_wrapper" >';
|
|
||||||
$o .= '<label id="acl-deny-group-label" for="group_deny" >' . t('Groups') . '</label>';
|
|
||||||
$o .= group_select('group_deny','group_deny', $deny_gid);
|
|
||||||
$o .= '</div>';
|
|
||||||
$o .= '<div id="contact_deny_wrapper" >';
|
|
||||||
$o .= '<label id="acl-deny-contact-label" for="contact_deny" >' . t('Contacts') . '</label>';
|
|
||||||
$o .= contact_select('contact_deny','contact_deny', $deny_cid,4,false, $celeb,true);
|
|
||||||
$o .= '</div>';
|
|
||||||
$o .= '</div>' . "\r\n";
|
|
||||||
$o .= '<div id="acl-deny-end"></div>' . "\r\n";
|
|
||||||
$o .= '</div>';
|
|
||||||
$o .= '</div>' . "\r\n";
|
|
||||||
$o .= '<div id="acl-wrapper-end"></div>' . "\r\n";*/
|
|
||||||
|
|
||||||
$tpl = get_markup_template("acl_selector.tpl");
|
$tpl = get_markup_template("acl_selector.tpl");
|
||||||
$o = replace_macros($tpl, array(
|
$o = replace_macros($tpl, array(
|
||||||
'$showall'=> t("Visible to everybody"),
|
'$showall'=> t("Visible to everybody"),
|
||||||
'$show' => t("show"),
|
'$show' => t("show"),
|
||||||
'$hide' => t("don't show"),
|
'$hide' => t("don't show"),
|
||||||
'$allowcid' => json_encode($perms['allow_cid']),
|
'$allowcid' => json_encode($perms['allow_cid']),
|
||||||
'$allowgid' => json_encode($perms['allow_gid']),
|
'$allowgid' => json_encode($perms['allow_gid']),
|
||||||
'$denycid' => json_encode($perms['deny_cid']),
|
'$denycid' => json_encode($perms['deny_cid']),
|
||||||
'$denygid' => json_encode($perms['deny_gid']),
|
'$denygid' => json_encode($perms['deny_gid']),
|
||||||
|
'$networks' => $show_jotnets,
|
||||||
|
'$emailcc' => t('CC: email addresses'),
|
||||||
|
'$emtitle' => t('Example: bob@example.com, mary@example.com'),
|
||||||
|
'$jotnets' => $jotnets,
|
||||||
|
'$aclModalTitle' => t('Permissions'),
|
||||||
|
'$aclModalDismiss' => t('Close'),
|
||||||
'$features' => array(
|
'$features' => array(
|
||||||
"aclautomention"=>(feature_enabled($user['uid'],"aclautomention")?"true":"false")
|
"aclautomention"=>(feature_enabled($user['uid'],"aclautomention")?"true":"false")
|
||||||
),
|
),
|
||||||
));
|
));
|
||||||
|
|
||||||
|
|
|
@ -1024,43 +1024,9 @@ function status_editor($a,$x, $notes_cid = 0, $popup=false) {
|
||||||
'$whereareu' => t('Where are you right now?')
|
'$whereareu' => t('Where are you right now?')
|
||||||
));
|
));
|
||||||
|
|
||||||
|
|
||||||
$jotplugins = '';
|
$jotplugins = '';
|
||||||
$jotnets = '';
|
|
||||||
|
|
||||||
$mail_disabled = ((function_exists('imap_open') && (! get_config('system','imap_disabled'))) ? 0 : 1);
|
|
||||||
|
|
||||||
$mail_enabled = false;
|
|
||||||
$pubmail_enabled = false;
|
|
||||||
|
|
||||||
if(($x['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 (!$a->user['hidewall']) {
|
|
||||||
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_networks', $jotnets);
|
|
||||||
} else
|
|
||||||
$jotnets .= sprintf(t('Connectors disabled, since "%s" is enabled.'),
|
|
||||||
t('Hide your profile details from unknown viewers?'));
|
|
||||||
|
|
||||||
call_hooks('jot_tool', $jotplugins);
|
call_hooks('jot_tool', $jotplugins);
|
||||||
|
|
||||||
if($notes_cid)
|
|
||||||
$jotnets .= '<input type="hidden" name="contact_allow[]" value="' . $notes_cid .'" />';
|
|
||||||
|
|
||||||
|
|
||||||
// Private/public post links for the non-JS ACL form
|
// Private/public post links for the non-JS ACL form
|
||||||
$private_post = 1;
|
$private_post = 1;
|
||||||
if($_REQUEST['public'])
|
if($_REQUEST['public'])
|
||||||
|
@ -1115,15 +1081,14 @@ function status_editor($a,$x, $notes_cid = 0, $popup=false) {
|
||||||
'$defloc' => $x['default_location'],
|
'$defloc' => $x['default_location'],
|
||||||
'$visitor' => $x['visitor'],
|
'$visitor' => $x['visitor'],
|
||||||
'$pvisit' => (($notes_cid) ? 'none' : $x['visitor']),
|
'$pvisit' => (($notes_cid) ? 'none' : $x['visitor']),
|
||||||
'$emailcc' => t('CC: email addresses'),
|
|
||||||
'$public' => t('Public post'),
|
'$public' => t('Public post'),
|
||||||
'$jotnets' => $jotnets,
|
'$jotnets' => $jotnets,
|
||||||
'$emtitle' => t('Example: bob@example.com, mary@example.com'),
|
|
||||||
'$lockstate' => $x['lockstate'],
|
'$lockstate' => $x['lockstate'],
|
||||||
'$bang' => $x['bang'],
|
'$bang' => $x['bang'],
|
||||||
'$profile_uid' => $x['profile_uid'],
|
'$profile_uid' => $x['profile_uid'],
|
||||||
'$preview' => ((feature_enabled($x['profile_uid'],'preview')) ? t('Preview') : ''),
|
'$preview' => ((feature_enabled($x['profile_uid'],'preview')) ? t('Preview') : ''),
|
||||||
'$jotplugins' => $jotplugins,
|
'$jotplugins' => $jotplugins,
|
||||||
|
'$notes_cid' => $notes_cid,
|
||||||
'$sourceapp' => t($a->sourcename),
|
'$sourceapp' => t($a->sourcename),
|
||||||
'$cancel' => t('Cancel'),
|
'$cancel' => t('Cancel'),
|
||||||
'$rand_num' => random_digits(12),
|
'$rand_num' => random_digits(12),
|
||||||
|
|
|
@ -27,7 +27,7 @@ function bookmarklet_content(&$a) {
|
||||||
'nickname' => $a->user['nickname'],
|
'nickname' => $a->user['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'),
|
'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'),
|
||||||
'default_perms' => get_acl_permissions($a->user),
|
'default_perms' => get_acl_permissions($a->user),
|
||||||
'acl' => populate_acl($a->user, $celeb),
|
'acl' => populate_acl($a->user),
|
||||||
'bang' => '',
|
'bang' => '',
|
||||||
'visitor' => 'block',
|
'visitor' => 'block',
|
||||||
'profile_uid' => local_user(),
|
'profile_uid' => local_user(),
|
||||||
|
|
|
@ -345,15 +345,13 @@ function display_content(&$a, $update = 0) {
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($is_owner) {
|
if ($is_owner) {
|
||||||
$celeb = ((($a->user['page-flags'] == PAGE_SOAPBOX) || ($a->user['page-flags'] == PAGE_COMMUNITY)) ? true : false);
|
|
||||||
|
|
||||||
$x = array(
|
$x = array(
|
||||||
'is_owner' => true,
|
'is_owner' => true,
|
||||||
'allow_location' => $a->user['allow_location'],
|
'allow_location' => $a->user['allow_location'],
|
||||||
'default_location' => $a->user['default-location'],
|
'default_location' => $a->user['default-location'],
|
||||||
'nickname' => $a->user['nickname'],
|
'nickname' => $a->user['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'),
|
'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' => populate_acl($a->user, $celeb),
|
'acl' => populate_acl($a->user),
|
||||||
'bang' => '',
|
'bang' => '',
|
||||||
'visitor' => 'block',
|
'visitor' => 'block',
|
||||||
'profile_uid' => local_user(),
|
'profile_uid' => local_user(),
|
||||||
|
|
|
@ -66,8 +66,6 @@ function editpost_content(&$a) {
|
||||||
else
|
else
|
||||||
$lockstate = 'unlock';
|
$lockstate = 'unlock';
|
||||||
|
|
||||||
$celeb = ((($a->user['page-flags'] == PAGE_SOAPBOX) || ($a->user['page-flags'] == PAGE_COMMUNITY)) ? true : false);
|
|
||||||
|
|
||||||
$jotplugins = '';
|
$jotplugins = '';
|
||||||
$jotnets = '';
|
$jotnets = '';
|
||||||
|
|
||||||
|
@ -141,7 +139,7 @@ function editpost_content(&$a) {
|
||||||
'$placeholdercategory' => (feature_enabled(local_user(),'categories') ? t('Categories (comma-separated list)') : ''),
|
'$placeholdercategory' => (feature_enabled(local_user(),'categories') ? t('Categories (comma-separated list)') : ''),
|
||||||
'$emtitle' => t('Example: bob@example.com, mary@example.com'),
|
'$emtitle' => t('Example: bob@example.com, mary@example.com'),
|
||||||
'$lockstate' => $lockstate,
|
'$lockstate' => $lockstate,
|
||||||
'$acl' => '', // populate_acl((($group) ? $group_acl : $a->user), $celeb),
|
'$acl' => '', // populate_acl((($group) ? $group_acl : $a->user)),
|
||||||
'$bang' => (($group) ? '!' : ''),
|
'$bang' => (($group) ? '!' : ''),
|
||||||
'$profile_uid' => $_SESSION['uid'],
|
'$profile_uid' => $_SESSION['uid'],
|
||||||
'$preview' => t('Preview'),
|
'$preview' => t('Preview'),
|
||||||
|
|
|
@ -507,7 +507,7 @@ function events_content(&$a) {
|
||||||
'$sh_text' => t('Share this event'),
|
'$sh_text' => t('Share this event'),
|
||||||
'$sh_checked' => $sh_checked,
|
'$sh_checked' => $sh_checked,
|
||||||
'$preview' => t('Preview'),
|
'$preview' => t('Preview'),
|
||||||
'$acl' => (($cid) ? '' : populate_acl(((x($orig_event)) ? $orig_event : $a->user),false)),
|
'$acl' => (($cid) ? '' : populate_acl(((x($orig_event)) ? $orig_event : $a->user))),
|
||||||
'$submit' => t('Submit')
|
'$submit' => t('Submit')
|
||||||
|
|
||||||
));
|
));
|
||||||
|
|
|
@ -172,8 +172,6 @@ function group_content(&$a) {
|
||||||
'$form_security_token' => get_form_security_token("group_drop"),
|
'$form_security_token' => get_form_security_token("group_drop"),
|
||||||
));
|
));
|
||||||
|
|
||||||
$celeb = ((($a->user['page-flags'] == PAGE_SOAPBOX) || ($a->user['page-flags'] == PAGE_COMMUNITY)) ? true : false);
|
|
||||||
|
|
||||||
|
|
||||||
$context = $context + array(
|
$context = $context + array(
|
||||||
'$title' => t('Group Editor'),
|
'$title' => t('Group Editor'),
|
||||||
|
|
|
@ -466,8 +466,6 @@ function network_content(&$a, $update = 0) {
|
||||||
|
|
||||||
nav_set_selected('network');
|
nav_set_selected('network');
|
||||||
|
|
||||||
$celeb = ((($a->user['page-flags'] == PAGE_SOAPBOX) || ($a->user['page-flags'] == PAGE_COMMUNITY)) ? true : false);
|
|
||||||
|
|
||||||
$content = "";
|
$content = "";
|
||||||
|
|
||||||
if ($cid) {
|
if ($cid) {
|
||||||
|
@ -485,7 +483,7 @@ function network_content(&$a, $update = 0) {
|
||||||
((strlen($a->user['allow_cid'])) || (strlen($a->user['allow_gid'])) ||
|
((strlen($a->user['allow_cid'])) || (strlen($a->user['allow_gid'])) ||
|
||||||
(strlen($a->user['deny_cid'])) || (strlen($a->user['deny_gid']))))) ? 'lock' : 'unlock'),
|
(strlen($a->user['deny_cid'])) || (strlen($a->user['deny_gid']))))) ? 'lock' : 'unlock'),
|
||||||
'default_perms' => get_acl_permissions($a->user),
|
'default_perms' => get_acl_permissions($a->user),
|
||||||
'acl' => populate_acl((($group || $cid || $nets) ? $def_acl : $a->user), $celeb),
|
'acl' => populate_acl((($group || $cid || $nets) ? $def_acl : $a->user), true),
|
||||||
'bang' => (($group || $cid || $nets) ? '!' : ''),
|
'bang' => (($group || $cid || $nets) ? '!' : ''),
|
||||||
'visitor' => 'block',
|
'visitor' => 'block',
|
||||||
'profile_uid' => local_user(),
|
'profile_uid' => local_user(),
|
||||||
|
|
|
@ -46,25 +46,21 @@ function notes_content(&$a,$update = false) {
|
||||||
$commpage = false;
|
$commpage = false;
|
||||||
$commvisitor = false;
|
$commvisitor = false;
|
||||||
|
|
||||||
$celeb = false;
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
$x = array(
|
$x = array(
|
||||||
'is_owner' => $is_owner,
|
'is_owner' => $is_owner,
|
||||||
'allow_location' => (($a->user['allow_location']) ? true : false),
|
'allow_location' => (($a->user['allow_location']) ? true : false),
|
||||||
'default_location' => $a->user['default-location'],
|
'default_location' => $a->user['default-location'],
|
||||||
'nickname' => $a->user['nickname'],
|
'nickname' => $a->user['nickname'],
|
||||||
'lockstate' => 'lock',
|
'lockstate' => 'lock',
|
||||||
'acl' => '',
|
'acl' => '',
|
||||||
'bang' => '',
|
'bang' => '',
|
||||||
'visitor' => 'block',
|
'visitor' => 'block',
|
||||||
'profile_uid' => local_user(),
|
'profile_uid' => local_user(),
|
||||||
'button' => t('Save'),
|
'button' => t('Save'),
|
||||||
'acl_data' => '',
|
'acl_data' => '',
|
||||||
);
|
);
|
||||||
|
|
||||||
$o .= status_editor($a,$x,$a->contact['id']);
|
$o .= status_editor($a,$x,$a->contact['id']);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -1089,8 +1089,6 @@ function photos_content(&$a) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
$celeb = ((($a->user['page-flags'] == PAGE_SOAPBOX) || ($a->user['page-flags'] == PAGE_COMMUNITY)) ? true : false);
|
|
||||||
|
|
||||||
$uploader = '';
|
$uploader = '';
|
||||||
|
|
||||||
$ret = array('post_url' => $a->get_baseurl() . '/photos/' . $a->data['user']['nickname'],
|
$ret = array('post_url' => $a->get_baseurl() . '/photos/' . $a->data['user']['nickname'],
|
||||||
|
@ -1139,11 +1137,11 @@ function photos_content(&$a) {
|
||||||
|
|
||||||
if($a->theme['template_engine'] === 'internal') {
|
if($a->theme['template_engine'] === 'internal') {
|
||||||
$albumselect_e = template_escape($albumselect);
|
$albumselect_e = template_escape($albumselect);
|
||||||
$aclselect_e = (($visitor) ? '' : template_escape(populate_acl($a->user, $celeb)));
|
$aclselect_e = (($visitor) ? '' : template_escape(populate_acl($a->user)));
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
$albumselect_e = $albumselect;
|
$albumselect_e = $albumselect;
|
||||||
$aclselect_e = (($visitor) ? '' : populate_acl($a->user, $celeb));
|
$aclselect_e = (($visitor) ? '' : populate_acl($a->user));
|
||||||
}
|
}
|
||||||
|
|
||||||
$o .= replace_macros($tpl,array(
|
$o .= replace_macros($tpl,array(
|
||||||
|
|
|
@ -181,8 +181,6 @@ function profile_content(&$a, $update = 0) {
|
||||||
$commpage = (($a->profile['page-flags'] == PAGE_COMMUNITY) ? true : false);
|
$commpage = (($a->profile['page-flags'] == PAGE_COMMUNITY) ? true : false);
|
||||||
$commvisitor = (($commpage && $remote_contact == true) ? true : false);
|
$commvisitor = (($commpage && $remote_contact == true) ? true : false);
|
||||||
|
|
||||||
$celeb = ((($a->profile['page-flags'] == PAGE_SOAPBOX) || ($a->profile['page-flags'] == PAGE_COMMUNITY)) ? true : false);
|
|
||||||
|
|
||||||
$a->page['aside'] .= posted_date_widget($a->get_baseurl(true) . '/profile/' . $a->profile['nickname'],$a->profile['profile_uid'],true);
|
$a->page['aside'] .= posted_date_widget($a->get_baseurl(true) . '/profile/' . $a->profile['nickname'],$a->profile['profile_uid'],true);
|
||||||
$a->page['aside'] .= categories_widget($a->get_baseurl(true) . '/profile/' . $a->profile['nickname'],(x($category) ? xmlify($category) : ''));
|
$a->page['aside'] .= categories_widget($a->get_baseurl(true) . '/profile/' . $a->profile['nickname'],(x($category) ? xmlify($category) : ''));
|
||||||
|
|
||||||
|
@ -190,18 +188,20 @@ function profile_content(&$a, $update = 0) {
|
||||||
|
|
||||||
$x = array(
|
$x = array(
|
||||||
'is_owner' => $is_owner,
|
'is_owner' => $is_owner,
|
||||||
'allow_location' => ((($is_owner || $commvisitor) && $a->profile['allow_location']) ? true : false),
|
'allow_location' => ((($is_owner || $commvisitor) && $a->profile['allow_location']) ? true : false),
|
||||||
'default_location' => (($is_owner) ? $a->user['default-location'] : ''),
|
'default_location' => (($is_owner) ? $a->user['default-location'] : ''),
|
||||||
'nickname' => $a->profile['nickname'],
|
'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'),
|
'lockstate' => (((is_array($a->user) && ((strlen($a->user['allow_cid'])) ||
|
||||||
'acl' => (($is_owner) ? populate_acl($a->user, $celeb) : ''),
|
(strlen($a->user['allow_gid'])) || (strlen($a->user['deny_cid'])) ||
|
||||||
'bang' => '',
|
(strlen($a->user['deny_gid']))))) ? 'lock' : 'unlock'),
|
||||||
'visitor' => (($is_owner || $commvisitor) ? 'block' : 'none'),
|
'acl' => (($is_owner) ? populate_acl($a->user, true) : ''),
|
||||||
'profile_uid' => $a->profile['profile_uid'],
|
'bang' => '',
|
||||||
|
'visitor' => (($is_owner || $commvisitor) ? 'block' : 'none'),
|
||||||
|
'profile_uid' => $a->profile['profile_uid'],
|
||||||
'acl_data' => ( $is_owner ? construct_acl_data($a, $a->user) : '' ), // For non-Javascript ACL selector
|
'acl_data' => ( $is_owner ? construct_acl_data($a, $a->user) : '' ), // For non-Javascript ACL selector
|
||||||
);
|
);
|
||||||
|
|
||||||
$o .= status_editor($a,$x);
|
$o .= status_editor($a,$x);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -1097,8 +1097,6 @@ function settings_content(&$a) {
|
||||||
|
|
||||||
$stpl = get_markup_template('settings.tpl');
|
$stpl = get_markup_template('settings.tpl');
|
||||||
|
|
||||||
$celeb = ((($a->user['page-flags'] == PAGE_SOAPBOX) || ($a->user['page-flags'] == PAGE_COMMUNITY)) ? true : false);
|
|
||||||
|
|
||||||
$expire_arr = array(
|
$expire_arr = array(
|
||||||
'days' => array('expire', t("Automatically expire posts after this many days:"), $expire, t('If empty, posts will not expire. Expired posts will be deleted')),
|
'days' => array('expire', t("Automatically expire posts after this many days:"), $expire, t('If empty, posts will not expire. Expired posts will be deleted')),
|
||||||
'advanced' => t('Advanced expiration settings'),
|
'advanced' => t('Advanced expiration settings'),
|
||||||
|
@ -1163,7 +1161,7 @@ function settings_content(&$a) {
|
||||||
'$permissions' => t('Default Post Permissions'),
|
'$permissions' => t('Default Post Permissions'),
|
||||||
'$permdesc' => t("\x28click to open/close\x29"),
|
'$permdesc' => t("\x28click to open/close\x29"),
|
||||||
'$visibility' => $profile['net-publish'],
|
'$visibility' => $profile['net-publish'],
|
||||||
'$aclselect' => populate_acl($a->user,$celeb),
|
'$aclselect' => populate_acl($a->user),
|
||||||
'$suggestme' => $suggestme,
|
'$suggestme' => $suggestme,
|
||||||
'$blockwall'=> $blockwall, // array('blockwall', t('Allow friends to post to your profile page:'), !$blockwall, ''),
|
'$blockwall'=> $blockwall, // array('blockwall', t('Allow friends to post to your profile page:'), !$blockwall, ''),
|
||||||
'$blocktags'=> $blocktags, // array('blocktags', t('Allow friends to tag your posts:'), !$blocktags, ''),
|
'$blocktags'=> $blocktags, // array('blocktags', t('Allow friends to tag your posts:'), !$blocktags, ''),
|
||||||
|
|
|
@ -15,6 +15,14 @@
|
||||||
<a href="#" class='acl-button-hide'>{{$hide}}</a>
|
<a href="#" class='acl-button-hide'>{{$hide}}</a>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
{{if $networks}}
|
||||||
|
<hr style="clear:both"/>
|
||||||
|
<div id="profile-jot-email-label">{{$emailcc}}</div><input type="text" name="emailcc" id="profile-jot-email" title="{{$emtitle|escape:'html'}}" />
|
||||||
|
<div id="profile-jot-email-end"></div>
|
||||||
|
{{if $jotnets}}
|
||||||
|
{{$jotnets}}
|
||||||
|
{{/if}}{{/if}}
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
$(document).ready(function() {
|
$(document).ready(function() {
|
||||||
if(typeof acl=="undefined"){
|
if(typeof acl=="undefined"){
|
||||||
|
|
|
@ -16,6 +16,9 @@
|
||||||
<input type="hidden" name="post_id" value="{{$post_id}}" />
|
<input type="hidden" name="post_id" value="{{$post_id}}" />
|
||||||
<input type="hidden" name="preview" id="jot-preview" value="0" />
|
<input type="hidden" name="preview" id="jot-preview" value="0" />
|
||||||
<input type="hidden" name="post_id_random" value="{{$rand_num}}" />
|
<input type="hidden" name="post_id_random" value="{{$rand_num}}" />
|
||||||
|
{{if $notes_cid}}
|
||||||
|
<input type="hidden" name="contact_allow[]" value="<{{$notes_cid}}>" />
|
||||||
|
{{/if}}
|
||||||
<div id="jot-title-wrap"><input name="title" id="jot-title" type="text" placeholder="{{$placeholdertitle|escape:'html'}}" value="{{$title|escape:'html'}}" class="jothidden" style="display:none"></div>
|
<div id="jot-title-wrap"><input name="title" id="jot-title" type="text" placeholder="{{$placeholdertitle|escape:'html'}}" value="{{$title|escape:'html'}}" class="jothidden" style="display:none"></div>
|
||||||
{{if $placeholdercategory}}
|
{{if $placeholdercategory}}
|
||||||
<div id="jot-category-wrap"><input name="category" id="jot-category" type="text" placeholder="{{$placeholdercategory|escape:'html'}}" value="{{$category|escape:'html'}}" class="jothidden" style="display:none" /></div>
|
<div id="jot-category-wrap"><input name="category" id="jot-category" type="text" placeholder="{{$placeholdercategory|escape:'html'}}" value="{{$category|escape:'html'}}" class="jothidden" style="display:none" /></div>
|
||||||
|
@ -74,10 +77,6 @@
|
||||||
<div style="display: none;">
|
<div style="display: none;">
|
||||||
<div id="profile-jot-acl-wrapper" style="width:auto;height:auto;overflow:auto;">
|
<div id="profile-jot-acl-wrapper" style="width:auto;height:auto;overflow:auto;">
|
||||||
{{$acl}}
|
{{$acl}}
|
||||||
<hr style="clear:both"/>
|
|
||||||
<div id="profile-jot-email-label">{{$emailcc}}</div><input type="text" name="emailcc" id="profile-jot-email" title="{{$emtitle|escape:'html'}}" />
|
|
||||||
<div id="profile-jot-email-end"></div>
|
|
||||||
{{$jotnets}}
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
|
@ -15,6 +15,15 @@
|
||||||
<a href="#" class='acl-button-hide'>{{$hide}}</a>
|
<a href="#" class='acl-button-hide'>{{$hide}}</a>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
{{if $networks}}
|
||||||
|
<hr style="clear:both"/>
|
||||||
|
<div id="profile-jot-email-label">{{$emailcc}}</div><input type="text" name="emailcc" id="profile-jot-email" title="{{$emtitle|escape:'html'}}" />
|
||||||
|
<div id="profile-jot-email-end"></div>
|
||||||
|
{{if $jotnets}}
|
||||||
|
{{$jotnets}}
|
||||||
|
<div id="profile-jot-networks-end"></div>
|
||||||
|
{{/if}}{{/if}}
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
window.allowCID = {{$allowcid}};
|
window.allowCID = {{$allowcid}};
|
||||||
window.allowGID = {{$allowgid}};
|
window.allowGID = {{$allowgid}};
|
||||||
|
|
|
@ -18,6 +18,9 @@
|
||||||
<input type="hidden" name="preview" id="jot-preview" value="0" />
|
<input type="hidden" name="preview" id="jot-preview" value="0" />
|
||||||
<input type="hidden" name="post_id_random" value="{{$rand_num}}" />
|
<input type="hidden" name="post_id_random" value="{{$rand_num}}" />
|
||||||
<div id="jot-title-wrap"><input name="title" id="jot-title" type="text" placeholder="{{$placeholdertitle}}" value="{{$title}}" class="jothidden" style="display:none"></div>
|
<div id="jot-title-wrap"><input name="title" id="jot-title" type="text" placeholder="{{$placeholdertitle}}" value="{{$title}}" class="jothidden" style="display:none"></div>
|
||||||
|
{{if $notes_cid}}
|
||||||
|
<input type="hidden" name="contact_allow[]" value="<{{$notes_cid}}>" />
|
||||||
|
{{/if}}
|
||||||
{{if $placeholdercategory}}
|
{{if $placeholdercategory}}
|
||||||
<div id="jot-category-wrap"><input name="category" id="jot-category" type="text" placeholder="{{$placeholdercategory}}" value="{{$category}}" class="jothidden" style="display:none" /></div>
|
<div id="jot-category-wrap"><input name="category" id="jot-category" type="text" placeholder="{{$placeholdercategory}}" value="{{$category}}" class="jothidden" style="display:none" /></div>
|
||||||
{{/if}}
|
{{/if}}
|
||||||
|
@ -74,10 +77,6 @@
|
||||||
<div style="display: none;">
|
<div style="display: none;">
|
||||||
<div id="profile-jot-acl-wrapper">
|
<div id="profile-jot-acl-wrapper">
|
||||||
{{$acl}}
|
{{$acl}}
|
||||||
<hr/>
|
|
||||||
<div id="profile-jot-email-label">{{$emailcc}}</div><input type="text" name="emailcc" id="profile-jot-email" title="{{$emtitle}}" />
|
|
||||||
{{$jotnets}}
|
|
||||||
<div id="profile-jot-networks-end"></div>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
|
@ -15,6 +15,14 @@
|
||||||
<a href="#" class='acl-button-hide'>{{$hide}}</a>
|
<a href="#" class='acl-button-hide'>{{$hide}}</a>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
{{if $networks}}
|
||||||
|
<hr style="clear:both"/>
|
||||||
|
<div id="profile-jot-email-label">{{$emailcc}}</div><input type="text" name="emailcc" id="profile-jot-email" title="{{$emtitle|escape:'html'}}" />
|
||||||
|
<div id="profile-jot-email-end"></div>
|
||||||
|
{{if $jotnets}}
|
||||||
|
{{$jotnets}}
|
||||||
|
{{/if}}{{/if}}
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
window.allowCID = {{$allowcid}};
|
window.allowCID = {{$allowcid}};
|
||||||
window.allowGID = {{$allowgid}};
|
window.allowGID = {{$allowgid}};
|
||||||
|
|
|
@ -16,6 +16,9 @@
|
||||||
<input type="hidden" name="post_id" value="{{$post_id}}" />
|
<input type="hidden" name="post_id" value="{{$post_id}}" />
|
||||||
<input type="hidden" name="preview" id="jot-preview" value="0" />
|
<input type="hidden" name="preview" id="jot-preview" value="0" />
|
||||||
<input type="hidden" name="post_id_random" value="{{$rand_num}}" />
|
<input type="hidden" name="post_id_random" value="{{$rand_num}}" />
|
||||||
|
{{if $notes_cid}}
|
||||||
|
<input type="hidden" name="contact_allow[]" value="<{{$notes_cid}}>" />
|
||||||
|
{{/if}}
|
||||||
<div id="jot-title-wrap"><input name="title" id="jot-title" type="text" placeholder="{{$placeholdertitle}}" value="{{$title}}" class="jothidden" style="display:none"></div>
|
<div id="jot-title-wrap"><input name="title" id="jot-title" type="text" placeholder="{{$placeholdertitle}}" value="{{$title}}" class="jothidden" style="display:none"></div>
|
||||||
{{if $placeholdercategory}}
|
{{if $placeholdercategory}}
|
||||||
<div id="jot-category-wrap"><input name="category" id="jot-category" type="text" placeholder="{{$placeholdercategory}}" value="{{$category}}" class="jothidden" style="display:none" /></div>
|
<div id="jot-category-wrap"><input name="category" id="jot-category" type="text" placeholder="{{$placeholdercategory}}" value="{{$category}}" class="jothidden" style="display:none" /></div>
|
||||||
|
@ -76,10 +79,6 @@
|
||||||
<div style="display: none;">
|
<div style="display: none;">
|
||||||
<div id="profile-jot-acl-wrapper" style="width:auto;height:auto;overflow:auto;">
|
<div id="profile-jot-acl-wrapper" style="width:auto;height:auto;overflow:auto;">
|
||||||
{{$acl}}
|
{{$acl}}
|
||||||
<hr style="clear:both"/>
|
|
||||||
<div id="profile-jot-email-label">{{$emailcc}}</div><input type="text" name="emailcc" id="profile-jot-email" title="{{$emtitle}}" />
|
|
||||||
<div id="profile-jot-email-end"></div>
|
|
||||||
{{$jotnets}}
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
|
@ -17,6 +17,9 @@
|
||||||
<input type="hidden" name="post_id" value="{{$post_id}}" />
|
<input type="hidden" name="post_id" value="{{$post_id}}" />
|
||||||
<input type="hidden" name="preview" id="jot-preview" value="0" />
|
<input type="hidden" name="preview" id="jot-preview" value="0" />
|
||||||
<input type="hidden" name="post_id_random" value="{{$rand_num}}" />
|
<input type="hidden" name="post_id_random" value="{{$rand_num}}" />
|
||||||
|
{{if $notes_cid}}
|
||||||
|
<input type="hidden" name="contact_allow[]" value="<{{$notes_cid}}>" />
|
||||||
|
{{/if}}
|
||||||
|
|
||||||
<textarea rows="5" cols="64" class="profile-jot-text" id="profile-jot-text" name="body" >{{if $content}}{{$content}}{{else}}{{$share}}{{/if}}</textarea>
|
<textarea rows="5" cols="64" class="profile-jot-text" id="profile-jot-text" name="body" >{{if $content}}{{$content}}{{else}}{{$share}}{{/if}}</textarea>
|
||||||
|
|
||||||
|
@ -44,10 +47,6 @@
|
||||||
<div style="display: none;">
|
<div style="display: none;">
|
||||||
<div id="profile-jot-acl-wrapper" style="width:auto;height:auto;overflow:auto;">
|
<div id="profile-jot-acl-wrapper" style="width:auto;height:auto;overflow:auto;">
|
||||||
{{$acl}}
|
{{$acl}}
|
||||||
<hr style="clear:both"/>
|
|
||||||
<div id="profile-jot-email-label">{{$emailcc}}</div><input type="text" name="emailcc" id="profile-jot-email" title="{{$emtitle}}" />
|
|
||||||
<div id="profile-jot-email-end"></div>
|
|
||||||
{{$jotnets}}
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue