070921 Sidebar Custom Hashtags

This commit is contained in:
daisuke
2021-09-07 19:07:04 -05:00
parent ddff7399ad
commit 7cdfd4e99e
8 changed files with 43 additions and 10 deletions

View File

@ -93,7 +93,15 @@ if (isset($_POST['action']) && $_POST['action'] == "settings"){
$user_settings['mtwords'] = array();
$mtwords = explode("\n",$value);
foreach ($mtwords as $word){
$user_settings['mtwords'][] = $word;
$user_settings['mtwords'][] = sanitize($word);
}
break;
case "fhtags":
$user_settings['fhtags'] = array();
$fhtags = explode("\n",$value);
foreach ($fhtags as $word){
$user_settings['fhtags'][] = sanitize($word);
}
break;
@ -276,6 +284,7 @@ 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;
@ -294,6 +303,7 @@ foreach($_GET as $key => $value){
}
}
}
*/
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;'>
@ -307,12 +317,15 @@ foreach($_GET as $key => $value){
<span style='width:290; height:30px; display:block; margin-top:10px;'>
".($logedin ? "<span id='".$info['id']."' class='profileButton ".(($rel[0]['following'] || $rel[0]['requested']) ? "unfollow" : "follow" )."'>".($rel[0]['following'] || $rel[0]['requested'] ? "Following" : "Follow" )."</span>" : "")."
<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'>&#xf205;</span>" : "NSFW <span class='fontello'>&#xf204;</span>" )."</span>
".($logedin ? "<span id='" . $info['id'] . "' class='profileButton " . ($rel[0]['muting'] ? "un" : "") . "mute'>" . ($rel[0]['muting'] ? "&#xe81a; Unmute" : "&#xe81b; Mute") . "</span>" : "")."
".($logedin ? "<span id='" . $info['id'] . "' class='profileButton " . ($rel[0]['muting'] ? "un" : "") . "mute'>" . ($rel[0]['muting'] ? "&#xe81a; Unmute" : "&#xe81b; Mute") . "</span>" : "")."<br>
</span>
" . ($rel[0]['followed_by'] ? "<span class='profileButton' width:290; height:25px; display:inline-block; margin-top:5px; style='background-color: rgba(255,255,255,.5);'>&#xe80c; Follows You</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>
";