Merge branch 'master' of https://github.com/friendica/friendica into threaded_items
This commit is contained in:
commit
10eb873f7c
134 changed files with 3484 additions and 1943 deletions
|
@ -45,22 +45,16 @@ function contacts_init(&$a) {
|
|||
$a->page['aside'] .= networks_widget('contacts',$_GET['nets']);
|
||||
$base = $a->get_baseurl();
|
||||
|
||||
$a->page['htmlhead'] .= '<script src="' . $a->get_baseurl(true) . '/library/jquery_ac/friendica.complete.js" ></script>';
|
||||
$a->page['htmlhead'] .= <<< EOT
|
||||
|
||||
<script>$(document).ready(function() {
|
||||
var a;
|
||||
a = $("#contacts-search").autocomplete({
|
||||
serviceUrl: '$base/acl',
|
||||
minChars: 2,
|
||||
width: 350,
|
||||
});
|
||||
a.setOptions({ params: { type: 'a' }});
|
||||
|
||||
});
|
||||
|
||||
</script>
|
||||
EOT;
|
||||
$tpl = get_markup_template("contacts-head.tpl");
|
||||
$a->page['htmlhead'] .= replace_macros($tpl,array(
|
||||
'$baseurl' => $a->get_baseurl(true),
|
||||
'$base' => $base
|
||||
));
|
||||
$tpl = get_markup_template("contacts-end.tpl");
|
||||
$a->page['end'] .= replace_macros($tpl,array(
|
||||
'$baseurl' => $a->get_baseurl(true),
|
||||
'$base' => $base
|
||||
));
|
||||
|
||||
|
||||
}
|
||||
|
@ -247,6 +241,10 @@ function contacts_content(&$a) {
|
|||
'$baseurl' => $a->get_baseurl(true),
|
||||
'$editselect' => $editselect,
|
||||
));
|
||||
$a->page['end'] .= replace_macros(get_markup_template('contact_end.tpl'), array(
|
||||
'$baseurl' => $a->get_baseurl(true),
|
||||
'$editselect' => $editselect,
|
||||
));
|
||||
|
||||
require_once('include/contact_selectors.php');
|
||||
|
||||
|
|
|
@ -36,7 +36,6 @@ function editpost_content(&$a) {
|
|||
$o .= '<h2>' . t('Edit post') . '</h2>';
|
||||
|
||||
$tpl = get_markup_template('jot-header.tpl');
|
||||
|
||||
$a->page['htmlhead'] .= replace_macros($tpl, array(
|
||||
'$baseurl' => $a->get_baseurl(),
|
||||
'$editselect' => (($plaintext) ? 'none' : '/(profile-jot-text|prvmail-text)/'),
|
||||
|
@ -45,6 +44,15 @@ function editpost_content(&$a) {
|
|||
'$nickname' => $a->user['nickname']
|
||||
));
|
||||
|
||||
$tpl = get_markup_template('jot-end.tpl');
|
||||
$a->page['end'] .= replace_macros($tpl, array(
|
||||
'$baseurl' => $a->get_baseurl(),
|
||||
'$editselect' => (($plaintext) ? 'none' : '/(profile-jot-text|prvmail-text)/'),
|
||||
'$ispublic' => ' ', // t('Visible to <strong>everybody</strong>'),
|
||||
'$geotag' => $geotag,
|
||||
'$nickname' => $a->user['nickname']
|
||||
));
|
||||
|
||||
|
||||
$tpl = get_markup_template("jot.tpl");
|
||||
|
||||
|
|
|
@ -145,6 +145,9 @@ function events_content(&$a) {
|
|||
$htpl = get_markup_template('event_head.tpl');
|
||||
$a->page['htmlhead'] .= replace_macros($htpl,array('$baseurl' => $a->get_baseurl()));
|
||||
|
||||
$etpl = get_markup_template('event_end.tpl');
|
||||
$a->page['end'] .= replace_macros($etpl,array('$baseurl' => $a->get_baseurl()));
|
||||
|
||||
$o ="";
|
||||
// tabs
|
||||
$tabs = profile_tabs($a, True);
|
||||
|
|
|
@ -18,24 +18,17 @@ function message_init(&$a) {
|
|||
));
|
||||
$base = $a->get_baseurl();
|
||||
|
||||
$a->page['htmlhead'] .= '<script src="' . $a->get_baseurl(true) . '/library/jquery_ac/friendica.complete.js" ></script>';
|
||||
$a->page['htmlhead'] .= <<< EOT
|
||||
$head_tpl = get_markup_template('message-head.tpl');
|
||||
$a->page['htmlhead'] .= replace_macros($head_tpl,array(
|
||||
'$baseurl' => $a->get_baseurl(true),
|
||||
'$base' => $base
|
||||
));
|
||||
|
||||
<script>$(document).ready(function() {
|
||||
var a;
|
||||
a = $("#recip").autocomplete({
|
||||
serviceUrl: '$base/acl',
|
||||
minChars: 2,
|
||||
width: 350,
|
||||
onSelect: function(value,data) {
|
||||
$("#recip-complete").val(data);
|
||||
}
|
||||
});
|
||||
|
||||
});
|
||||
|
||||
</script>
|
||||
EOT;
|
||||
$end_tpl = get_markup_template('message-end.tpl');
|
||||
$a->page['end'] .= replace_macros($end_tpl,array(
|
||||
'$baseurl' => $a->get_baseurl(true),
|
||||
'$base' => $base
|
||||
));
|
||||
|
||||
}
|
||||
|
||||
|
@ -242,7 +235,6 @@ function message_content(&$a) {
|
|||
|
||||
|
||||
$tpl = get_markup_template('msg-header.tpl');
|
||||
|
||||
$a->page['htmlhead'] .= replace_macros($tpl, array(
|
||||
'$baseurl' => $a->get_baseurl(true),
|
||||
'$editselect' => (($plaintext) ? 'none' : '/(profile-jot-text|prvmail-text)/'),
|
||||
|
@ -250,6 +242,14 @@ function message_content(&$a) {
|
|||
'$linkurl' => t('Please enter a link URL:')
|
||||
));
|
||||
|
||||
$tpl = get_markup_template('msg-end.tpl');
|
||||
$a->page['end'] .= replace_macros($tpl, array(
|
||||
'$baseurl' => $a->get_baseurl(true),
|
||||
'$editselect' => (($plaintext) ? 'none' : '/(profile-jot-text|prvmail-text)/'),
|
||||
'$nickname' => $a->user['nickname'],
|
||||
'$linkurl' => t('Please enter a link URL:')
|
||||
));
|
||||
|
||||
$preselect = (isset($a->argv[2])?array($a->argv[2]):false);
|
||||
|
||||
|
||||
|
@ -399,12 +399,17 @@ function message_content(&$a) {
|
|||
require_once("include/bbcode.php");
|
||||
|
||||
$tpl = get_markup_template('msg-header.tpl');
|
||||
|
||||
$a->page['htmlhead'] .= replace_macros($tpl, array(
|
||||
'$nickname' => $a->user['nickname'],
|
||||
'$baseurl' => $a->get_baseurl(true)
|
||||
));
|
||||
|
||||
$tpl = get_markup_template('msg-end.tpl');
|
||||
$a->page['end'] .= replace_macros($tpl, array(
|
||||
'$nickname' => $a->user['nickname'],
|
||||
'$baseurl' => $a->get_baseurl(true)
|
||||
));
|
||||
|
||||
|
||||
$mails = array();
|
||||
$seen = 0;
|
||||
|
|
|
@ -69,30 +69,11 @@ function photos_init(&$a) {
|
|||
$a->page['aside'] .= $o;
|
||||
|
||||
|
||||
$a->page['htmlhead'] .= "<script> var ispublic = '" . t('everybody') . "';" ;
|
||||
$tpl = get_markup_template("photos_head.tpl");
|
||||
$a->page['htmlhead'] .= replace_macros($tpl,array(
|
||||
'$ispublic' => t('everybody')
|
||||
));
|
||||
|
||||
$a->page['htmlhead'] .= <<< EOT
|
||||
|
||||
$(document).ready(function() {
|
||||
|
||||
$('#contact_allow, #contact_deny, #group_allow, #group_deny').change(function() {
|
||||
var selstr;
|
||||
$('#contact_allow option:selected, #contact_deny option:selected, #group_allow option:selected, #group_deny option:selected').each( function() {
|
||||
selstr = $(this).text();
|
||||
$('#jot-perms-icon').removeClass('unlock').addClass('lock');
|
||||
$('#jot-public').hide();
|
||||
});
|
||||
if(selstr == null) {
|
||||
$('#jot-perms-icon').removeClass('lock').addClass('unlock');
|
||||
$('#jot-public').show();
|
||||
}
|
||||
|
||||
}).trigger('change');
|
||||
|
||||
});
|
||||
|
||||
</script>
|
||||
EOT;
|
||||
}
|
||||
|
||||
return;
|
||||
|
@ -962,7 +943,7 @@ function photos_content(&$a) {
|
|||
$selname = (($datum) ? hex2bin($datum) : '');
|
||||
|
||||
|
||||
$albumselect = '<select id="photos-upload-album-select" name="album" size="4">';
|
||||
$albumselect = '';
|
||||
|
||||
|
||||
$albumselect .= '<option value="" ' . ((! $selname) ? ' selected="selected" ' : '') . '> </option>';
|
||||
|
@ -977,8 +958,6 @@ function photos_content(&$a) {
|
|||
|
||||
$celeb = ((($a->user['page-flags'] == PAGE_SOAPBOX) || ($a->user['page-flags'] == PAGE_COMMUNITY)) ? true : false);
|
||||
|
||||
$albumselect .= '</select>';
|
||||
|
||||
$uploader = '';
|
||||
|
||||
$ret = array('post_url' => $a->get_baseurl() . '/photos/' . $a->data['user']['nickname'],
|
||||
|
@ -1195,15 +1174,12 @@ function photos_content(&$a) {
|
|||
|
||||
}
|
||||
|
||||
if(! $cmd !== 'edit') {
|
||||
$a->page['htmlhead'] .= '<script>
|
||||
$(document).keydown(function(event) {' . "\n";
|
||||
|
||||
if($prevlink)
|
||||
$a->page['htmlhead'] .= 'if(event.ctrlKey && event.keyCode == 37) { event.preventDefault(); window.location.href = \'' . $prevlink . '\'; }' . "\n";
|
||||
if($nextlink)
|
||||
$a->page['htmlhead'] .= 'if(event.ctrlKey && event.keyCode == 39) { event.preventDefault(); window.location.href = \'' . $nextlink . '\'; }' . "\n";
|
||||
$a->page['htmlhead'] .= '});</script>';
|
||||
if( $cmd === 'edit') {
|
||||
$tpl = get_markup_template('photo_edit_head.tpl');
|
||||
$a->page['htmlhead'] .= replace_macros($tpl,array(
|
||||
'$prevlink' => $prevlink,
|
||||
'$nextlink' => $nextlink
|
||||
));
|
||||
}
|
||||
|
||||
if($prevlink)
|
||||
|
|
|
@ -279,6 +279,7 @@ function profile_photo_crop_ui_head(&$a, $ph){
|
|||
$a->config['imagecrop_resolution'] = $smallest;
|
||||
$a->config['imagecrop_ext'] = $ph->getExt();
|
||||
$a->page['htmlhead'] .= get_markup_template("crophead.tpl");
|
||||
$a->page['end'] .= get_markup_template("cropend.tpl");
|
||||
return;
|
||||
}}
|
||||
|
||||
|
|
|
@ -546,6 +546,10 @@ function profiles_content(&$a) {
|
|||
'$baseurl' => $a->get_baseurl(true),
|
||||
'$editselect' => $editselect,
|
||||
));
|
||||
$a->page['end'] .= replace_macros(get_markup_template('profed_end.tpl'), array(
|
||||
'$baseurl' => $a->get_baseurl(true),
|
||||
'$editselect' => $editselect,
|
||||
));
|
||||
|
||||
|
||||
$opt_tpl = get_markup_template("profile-hide-friends.tpl");
|
||||
|
@ -557,9 +561,6 @@ function profiles_content(&$a) {
|
|||
'$no_selected' => (($r[0]['hide-friends'] == 0) ? " checked=\"checked\" " : "")
|
||||
));
|
||||
|
||||
$a->page['htmlhead'] .= "<script type=\"text/javascript\" src=\"js/country.js\" ></script>";
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
|
|
@ -18,30 +18,10 @@ function settings_init(&$a) {
|
|||
|
||||
// These lines provide the javascript needed by the acl selector
|
||||
|
||||
$a->page['htmlhead'] .= "<script> var ispublic = '" . t('everybody') . "';" ;
|
||||
|
||||
$a->page['htmlhead'] .= <<< EOT
|
||||
|
||||
$(document).ready(function() {
|
||||
|
||||
$('#contact_allow, #contact_deny, #group_allow, #group_deny').change(function() {
|
||||
var selstr;
|
||||
$('#contact_allow option:selected, #contact_deny option:selected, #group_allow option:selected, #group_deny option:selected').each( function() {
|
||||
selstr = $(this).text();
|
||||
$('#jot-perms-icon').removeClass('unlock').addClass('lock');
|
||||
$('#jot-public').hide();
|
||||
});
|
||||
if(selstr == null) {
|
||||
$('#jot-perms-icon').removeClass('lock').addClass('unlock');
|
||||
$('#jot-public').show();
|
||||
}
|
||||
|
||||
}).trigger('change');
|
||||
|
||||
});
|
||||
|
||||
</script>
|
||||
EOT;
|
||||
$tpl = get_markup_template("settings-head.tpl");
|
||||
$a->page['htmlhead'] .= replace_macros($tpl,array(
|
||||
'$ispublic' => t('everybody')
|
||||
));
|
||||
|
||||
|
||||
|
||||
|
@ -781,6 +761,11 @@ function settings_content(&$a) {
|
|||
'$theme_config' => $theme_config,
|
||||
));
|
||||
|
||||
$tpl = get_markup_template("settings_display_end.tpl");
|
||||
$a->page['end'] .= replace_macros($tpl, array(
|
||||
'$theme' => array('theme', t('Display Theme:'), $theme_selected, '', $themes)
|
||||
));
|
||||
|
||||
return $o;
|
||||
}
|
||||
|
||||
|
|
|
@ -116,34 +116,41 @@ function wallmessage_content(&$a) {
|
|||
|
||||
|
||||
$tpl = get_markup_template('wallmsg-header.tpl');
|
||||
$a->page['htmlhead'] .= replace_macros($tpl, array(
|
||||
'$baseurl' => $a->get_baseurl(true),
|
||||
'$editselect' => '/(profile-jot-text|prvmail-text)/',
|
||||
'$nickname' => $user['nickname'],
|
||||
'$linkurl' => t('Please enter a link URL:')
|
||||
));
|
||||
|
||||
$a->page['htmlhead'] .= replace_macros($tpl, array(
|
||||
'$baseurl' => $a->get_baseurl(true),
|
||||
'$editselect' => '/(profile-jot-text|prvmail-text)/',
|
||||
'$nickname' => $user['nickname'],
|
||||
'$linkurl' => t('Please enter a link URL:')
|
||||
));
|
||||
$tpl = get_markup_template('wallmsg-end.tpl');
|
||||
$a->page['end'] .= replace_macros($tpl, array(
|
||||
'$baseurl' => $a->get_baseurl(true),
|
||||
'$editselect' => '/(profile-jot-text|prvmail-text)/',
|
||||
'$nickname' => $user['nickname'],
|
||||
'$linkurl' => t('Please enter a link URL:')
|
||||
));
|
||||
|
||||
|
||||
|
||||
$tpl = get_markup_template('wallmessage.tpl');
|
||||
$o .= replace_macros($tpl,array(
|
||||
'$header' => t('Send Private Message'),
|
||||
'$subheader' => sprintf( t('If you wish for %s to respond, please check that the privacy settings on your site allow private mail from unknown senders.'), $user['username']),
|
||||
'$to' => t('To:'),
|
||||
'$subject' => t('Subject:'),
|
||||
'$recipname' => $user['username'],
|
||||
'$nickname' => $user['nickname'],
|
||||
'$subjtxt' => ((x($_REQUEST,'subject')) ? strip_tags($_REQUEST['subject']) : ''),
|
||||
'$text' => ((x($_REQUEST,'body')) ? escape_tags(htmlspecialchars($_REQUEST['body'])) : ''),
|
||||
'$readonly' => '',
|
||||
'$yourmessage' => t('Your message:'),
|
||||
'$select' => $select,
|
||||
'$parent' => '',
|
||||
'$upload' => t('Upload photo'),
|
||||
'$insert' => t('Insert web link'),
|
||||
'$wait' => t('Please wait')
|
||||
));
|
||||
$tpl = get_markup_template('wallmessage.tpl');
|
||||
$o .= replace_macros($tpl,array(
|
||||
'$header' => t('Send Private Message'),
|
||||
'$subheader' => sprintf( t('If you wish for %s to respond, please check that the privacy settings on your site allow private mail from unknown senders.'), $user['username']),
|
||||
'$to' => t('To:'),
|
||||
'$subject' => t('Subject:'),
|
||||
'$recipname' => $user['username'],
|
||||
'$nickname' => $user['nickname'],
|
||||
'$subjtxt' => ((x($_REQUEST,'subject')) ? strip_tags($_REQUEST['subject']) : ''),
|
||||
'$text' => ((x($_REQUEST,'body')) ? escape_tags(htmlspecialchars($_REQUEST['body'])) : ''),
|
||||
'$readonly' => '',
|
||||
'$yourmessage' => t('Your message:'),
|
||||
'$select' => $select,
|
||||
'$parent' => '',
|
||||
'$upload' => t('Upload photo'),
|
||||
'$insert' => t('Insert web link'),
|
||||
'$wait' => t('Please wait')
|
||||
));
|
||||
|
||||
return $o;
|
||||
}
|
||||
return $o;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue