mirror of
https://github.com/friendica/friendica
synced 2025-04-25 02:30:11 +00:00
New channel option "discover"
This commit is contained in:
parent
b3e4b9675a
commit
08ee1e1f63
6 changed files with 43 additions and 15 deletions
|
@ -291,6 +291,20 @@ class Timeline extends BaseModule
|
|||
$cid, $this->getMedianRelationThreadScore($cid, 4), $this->getMedianComments($uid, 4), $this->getMedianActivities($uid, 4), $cid,
|
||||
$uid, Contact\User::FREQUENCY_ALWAYS
|
||||
];
|
||||
} elseif ($this->selectedTab == ChannelEntity::DISCOVER) {
|
||||
$cid = Contact::getPublicIdByUserId($uid);
|
||||
|
||||
$condition = [
|
||||
"`owner-id` IN (SELECT `cid` FROM `contact-relation` WHERE `relation-cid` = ? AND NOT `follows`) AND
|
||||
(`owner-id` IN (SELECT `cid` FROM `contact-relation` WHERE `relation-cid` = ? AND NOT `follows` AND `relation-thread-score` > ?) OR
|
||||
`owner-id` IN (SELECT `cid` FROM `contact-relation` WHERE `cid` = ? AND `relation-thread-score` > ?) OR
|
||||
((`comments` >= ? OR `activities` >= ?) AND
|
||||
(`owner-id` IN (SELECT `cid` FROM `contact-relation` WHERE `cid` = ? AND `relation-thread-score` > ?)) OR
|
||||
(`owner-id` IN (SELECT `cid` FROM `contact-relation` WHERE `relation-cid` = ? AND `relation-thread-score` > ?))))",
|
||||
$cid, $cid, $this->getMedianRelationThreadScore($cid, 4), $cid, $this->getMedianRelationThreadScore($cid, 4),
|
||||
$this->getMedianComments($uid, 4), $this->getMedianActivities($uid, 4), $cid, 0, $cid, 0
|
||||
];
|
||||
|
||||
} elseif ($this->selectedTab == ChannelEntity::FOLLOWERS) {
|
||||
$condition = ["`owner-id` IN (SELECT `pid` FROM `account-user-view` WHERE `uid` = ? AND `rel` = ?)", $uid, Contact::FOLLOWER];
|
||||
} elseif ($this->selectedTab == ChannelEntity::SHARERSOFSHARERS) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue