X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=mod%2Fprofile.php;h=59835bd4cbf5b3bf85b78818b7f1809c41de0363;hb=63622966666729ba82fef8f12484e022500ff867;hp=8a9b8b66664d21805ac6145f901b5c3d24cc40f6;hpb=2ad162f991fdd32122b029398b9ab9e8801c0462;p=friendica.git diff --git a/mod/profile.php b/mod/profile.php index 8a9b8b6666..59835bd4cb 100644 --- a/mod/profile.php +++ b/mod/profile.php @@ -98,6 +98,8 @@ function profile_content(App $a, $update = 0) { $category = ((x($_GET,'category')) ? $_GET['category'] : ''); } + $hashtags = (x($_GET, 'tag') ? $_GET['tag'] : ''); + if (Config::get('system','block_public') && (! local_user()) && (! remote_user())) { return login(); } @@ -185,6 +187,7 @@ function profile_content(App $a, $update = 0) { $a->page['aside'] .= posted_date_widget(System::baseUrl(true) . '/profile/' . $a->profile['nickname'],$a->profile['profile_uid'],true); $a->page['aside'] .= categories_widget(System::baseUrl(true) . '/profile/' . $a->profile['nickname'],(x($category) ? xmlify($category) : '')); + $a->page['aside'] .= tagcloud_wall_widget(); if (can_write_wall($a,$a->profile['profile_uid'])) { @@ -254,6 +257,11 @@ function profile_content(App $a, $update = 0) { //$sql_extra .= protect_sprintf(file_tag_file_query('item',$category,'category')); } + if (x($hashtags)) { + $sql_post_table .= sprintf("INNER JOIN (SELECT `oid` FROM `term` WHERE `term` = '%s' AND `otype` = %d AND `type` = %d AND `uid` = %d ORDER BY `tid` DESC) AS `term` ON `item`.`id` = `term`.`oid` ", + dbesc(protect_sprintf($hashtags)), intval(TERM_OBJ_POST), intval(TERM_HASHTAG), intval($a->profile['profile_uid'])); + } + if ($datequery) { $sql_extra2 .= protect_sprintf(sprintf(" AND `thread`.`created` <= '%s' ", dbesc(datetime_convert(date_default_timezone_get(),'',$datequery)))); }