tags: possibility to filter posts for tags and profile owner (profile)
This commit is contained in:
parent
59ae5633ec
commit
19afabd268
3 changed files with 23 additions and 8 deletions
|
@ -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();
|
||||
}
|
||||
|
@ -255,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))));
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue