2018-03-11 12:07:57 +01:00
|
|
|
<?php include ('header.php'); ?>
|
|
|
|
<main id="main">
|
|
|
|
<?php include dirname(__FILE__).('/widgets/user_header.php'); ?>
|
|
|
|
<div class="article_wrap">
|
|
|
|
<aside class="left_column">
|
|
|
|
<div class="profile_icon_box">
|
|
|
|
<img id="js_profile_image" src="/assets/images/missing.png" mediaaccess="true">
|
|
|
|
</div>
|
|
|
|
<section class="profile_section_wrap">
|
|
|
|
<h1 class="profile_displayname">
|
2018-07-01 17:07:18 +02:00
|
|
|
<a id="js_profile_displayname" href="#"></a>
|
2018-03-11 12:07:57 +01:00
|
|
|
</h1>
|
|
|
|
<h2 class="profile_username">
|
2018-07-31 18:51:17 +02:00
|
|
|
@<a id="js_profile_username" href="#"></a><span class="profile_followed_by invisible"><?=_('FOLLOWS YOU')?></span>
|
2018-03-11 12:07:57 +01:00
|
|
|
</h2>
|
2018-07-01 17:07:18 +02:00
|
|
|
<p id="js_profile_bio" class="profile_bio"></p>
|
2018-11-16 19:14:32 +01:00
|
|
|
<div id="js_profile_fields" class="profile_fields"></div>
|
2018-09-23 16:14:28 +02:00
|
|
|
<div id="js_profile_public_link" class="profile_with_icon invisible" style="margin-bottom:5px">
|
2018-10-02 19:50:54 +02:00
|
|
|
<a target="_blank"><i class="fa fa-fw fa-link" aria-hidden="true"></i><span><?=_('Open public profile')?></span></a>
|
2018-09-23 16:14:28 +02:00
|
|
|
</div>
|
|
|
|
<div id="js_profile_joined_date" class="profile_with_icon" style="margin-bottom:5px">
|
|
|
|
<span><i class="fa fa-fw fa-calendar" aria-hidden="true"></i><span></span></span>
|
|
|
|
</div>
|
2018-10-14 15:37:55 +02:00
|
|
|
<div id="profile_toot_buttons" style="height:31px;margin-bottom:5px;display:none">
|
|
|
|
<button class="toot_button profile_sendto" style="width:calc(50% - 3px)"><div class="toot_button_label"><i class="fa fa-fw fa-pencil-square-o"></i><span><?=_('Toot to')?></span></div></button>
|
|
|
|
<button class="toot_button profile_sendto" style="width:calc(50% - 3px)" privacy="direct"><div class="toot_button_label"><i class="fa fa-fw fa-envelope"></i><span><?=_('Message')?></span></div></button>
|
|
|
|
</div>
|
2018-03-11 12:07:57 +01:00
|
|
|
<?php include dirname(__FILE__).('/widgets/user_recent_images.php'); ?>
|
|
|
|
</section>
|
|
|
|
</aside>
|
|
|
|
<article class="center_column">
|
|
|
|
<header class="timeline_header">
|
|
|
|
<ul class="header_items">
|
|
|
|
<li class="item toots view">
|
|
|
|
<a id="toots_link">
|
2018-07-31 18:51:17 +02:00
|
|
|
<?=_('Toots')?>
|
2018-03-11 12:07:57 +01:00
|
|
|
</a>
|
|
|
|
</li>
|
|
|
|
<li class="item wreplies">
|
|
|
|
<a id="with_replies_link">
|
2018-07-31 18:51:17 +02:00
|
|
|
<?=_('Toots')?> & <?=_('replies')?>
|
2018-03-11 12:07:57 +01:00
|
|
|
</a>
|
|
|
|
</li>
|
|
|
|
<li class="item media">
|
|
|
|
<a id="media_link">
|
2018-07-31 18:51:17 +02:00
|
|
|
<?=_('Media')?>
|
2018-03-11 12:07:57 +01:00
|
|
|
</a>
|
|
|
|
</li>
|
|
|
|
</ul>
|
|
|
|
</header>
|
|
|
|
<div id="js-stream_update">
|
|
|
|
<button>
|
2018-07-31 18:51:17 +02:00
|
|
|
<?=_('View ')?><span></span><?=_(' new Toots')?>
|
|
|
|
|
2018-03-11 12:07:57 +01:00
|
|
|
</button>
|
|
|
|
</div>
|
|
|
|
<ul id="js-timeline" class="timeline">
|
|
|
|
</ul>
|
|
|
|
<footer id="js-timeline_footer" class="timeline_footer">
|
|
|
|
<i class="fa fa-spin fa-circle-o-notch" aria-hidden="true"></i>
|
|
|
|
</footer>
|
|
|
|
</article>
|
|
|
|
<aside class="right_column">
|
|
|
|
<section class="side_widgets_wrap">
|
|
|
|
<?php include dirname(__FILE__).('/widgets/side_who_to_follow.php'); ?>
|
|
|
|
</section>
|
|
|
|
<?php include dirname(__FILE__).('/widgets/side_footer.php'); ?>
|
|
|
|
</aside>
|
|
|
|
</div>
|
|
|
|
</main>
|
|
|
|
<script>
|
|
|
|
current_file = "/user";
|
|
|
|
$("#toots_link").attr('href', location.pathname+location.search);
|
|
|
|
$("#with_replies_link").attr('href', location.pathname+'/with_replies'+location.search);
|
|
|
|
$("#media_link").attr('href', location.pathname+'/media'+location.search);
|
|
|
|
$("#js-profile_nav_toots").toggleClass("view");
|
|
|
|
$("#js-profile_nav_toots > a").attr('href', location.pathname+location.search);
|
|
|
|
$("#js-profile_nav_following > a").attr('href', location.pathname+'/following'+location.search);
|
|
|
|
$("#js-profile_nav_followers > a").attr('href', location.pathname+'/followers'+location.search);
|
|
|
|
$("#js-profile_nav_favourites > a").attr('href', location.pathname+'/favourites'+location.search);
|
|
|
|
$(function() {
|
2018-07-13 19:37:22 +02:00
|
|
|
<?php if(isset($_GET['mid'])) { ?>
|
|
|
|
const account_id = <?= htmlspecialchars((string)filter_input(INPUT_GET,'mid'),ENT_QUOTES) ?>;
|
2018-03-11 12:07:57 +01:00
|
|
|
api.get('accounts/'+account_id, function(userprofile) {
|
2018-07-13 19:37:22 +02:00
|
|
|
if(userprofile !== null) {
|
|
|
|
<?php } else if(isset($_GET['user'])) {
|
|
|
|
$name = preg_split("/@/",$_GET['user'])[1];
|
|
|
|
$domain = preg_split("/@/",$_GET['user'])[2];
|
2018-03-11 12:07:57 +01:00
|
|
|
$url= "https://$domain/@$name";
|
|
|
|
?>
|
|
|
|
const query = '<?= htmlspecialchars((string)filter_input(INPUT_GET, 'user'), ENT_QUOTES) ?>';
|
2018-07-13 19:37:22 +02:00
|
|
|
api.get('search',[{name:'q',data:query},{name:'resolve',data:'true'}],function(search) {
|
|
|
|
if(!search.accounts.length) {
|
2018-03-11 12:07:57 +01:00
|
|
|
location.href = "/404.php";
|
2018-07-13 19:37:22 +02:00
|
|
|
}
|
|
|
|
else if("@"+search.accounts[0].acct === query || "@"+search.accounts[0].acct+"@"+localStorage.current_instance === query) {
|
|
|
|
userprofile = search.accounts[0];
|
|
|
|
<?php } ?>
|
|
|
|
$('title').text(replaced_emoji_return(userprofile.display_name)+' (@'+userprofile.acct+') | Halcyon');
|
|
|
|
setAccount(userprofile);
|
2018-10-14 15:37:55 +02:00
|
|
|
$(".profile_sendto").attr("acct","@"+userprofile.acct);
|
|
|
|
$(".profile_sendto").attr("display_name",userprofile.display_name);
|
2018-07-13 19:37:22 +02:00
|
|
|
api.get("accounts/"+userprofile.id+"/statuses",[{name:'pinned',data:'true'},{name:'limit',data:'40'}],function(statuses) {
|
|
|
|
for(var i=0;i<statuses.length;i++) {
|
|
|
|
timeline_pinned_template(statuses[i]).appendTo("#js-timeline");
|
|
|
|
}
|
|
|
|
replaceInternalLink();
|
|
|
|
replace_emoji();
|
|
|
|
setTimeline("accounts/"+userprofile.id+"/statuses",[{name:'exclude_replies',data:'true'}],"false",true);
|
|
|
|
});
|
|
|
|
setRecentImages(userprofile.id)
|
|
|
|
}
|
|
|
|
else {
|
2018-03-11 12:07:57 +01:00
|
|
|
location.href = "/404.php";
|
|
|
|
}
|
|
|
|
});
|
|
|
|
})
|
|
|
|
</script>
|
2018-04-15 19:21:52 +02:00
|
|
|
<?php include ('footer.php'); ?>
|