200520 New reply layout and Longhorn theme
This commit is contained in:
24
action.php
24
action.php
@ -276,6 +276,24 @@ foreach($_GET as $key => $value){
|
||||
case "userinfo":
|
||||
$info = api_get("accounts/".htmlentities($value));
|
||||
$rel = api_get("accounts/relationships?id=".htmlentities($value));
|
||||
$photos = api_get("accounts/".htmlentities($value)."/statuses?only_media=true&limit=5&exclude_reblogs=true");
|
||||
$photo = array();
|
||||
$c = 0;
|
||||
if (!empty($photos)){
|
||||
foreach ($photos as $elem){
|
||||
if ($elem['media_attachments'][0]['type'] == "image"){
|
||||
$photo[$c]['url'] = $elem['media_attachments'][0]['url'];
|
||||
if ($elem['sensitive'] == true){
|
||||
$photo[$c]['s'] = true;
|
||||
}
|
||||
$c++;
|
||||
|
||||
}
|
||||
if ($c == 3){
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
echo "<div class='userinfo_he' style='background-color:#".averageColor($info['avatar'])."; background-size:cover;" . (!empty($info['header']) ? "background-image:url(".$info['header'].");" : "") . "'>
|
||||
<span style='margin:5px; display:inline-block;'>
|
||||
@ -291,6 +309,11 @@ foreach($_GET as $key => $value){
|
||||
<span id='".$info['id']."' class='profileButton ".(in_array($info['id'],$user_settings['nsfw']) ? "unnsfw" : "nsfw" )."'>".(in_array($info['id'],$user_settings['nsfw']) ? "NSFW <span class='fontello'></span>" : "NSFW <span class='fontello'></span>" )."</span>
|
||||
".($logedin ? "<span id='" . $info['id'] . "' class='profileButton " . ($rel[0]['muting'] ? "un" : "") . "mute'>" . ($rel[0]['muting'] ? " Unmute" : " Mute") . "</span>" : "")."
|
||||
</span>
|
||||
<div style='display:flex; width:280px'>";
|
||||
foreach ($photo as $elem){
|
||||
echo "<div style='overflow:hidden; display:block; height:90px; flex:1; background-image:url(\"".$elem['url']."\"); ".(isset($elem['s']) ? "filter: blur(5px);" : "")." background-size:cover; margin:2px;'></div>";
|
||||
}
|
||||
echo "</div>
|
||||
</div>
|
||||
";
|
||||
die();
|
||||
@ -367,3 +390,4 @@ if(isset($_POST['status'])){
|
||||
die();
|
||||
}
|
||||
|
||||
|
||||
|
Reference in New Issue
Block a user