Utility functions for people tags
This commit is contained in:
parent
1b1a427237
commit
4b8ee81ca9
@ -269,6 +269,11 @@ $default =
|
||||
'group' =>
|
||||
array('maxaliases' => 3,
|
||||
'desclimit' => null),
|
||||
'peopletag' =>
|
||||
array('maxtags' => 100, // maximum number of tags a user can create.
|
||||
'maxpeople' => 500, // maximum no. of people with the same tag by the same user
|
||||
'allow_tagging' => array('all' => true), // equivalent to array('local' => true, 'remote' => true)
|
||||
'desclimit' => null),
|
||||
'oohembed' => array('endpoint' => 'http://oohembed.com/oohembed/'),
|
||||
'search' =>
|
||||
array('type' => 'fulltext'),
|
||||
|
@ -45,6 +45,7 @@ define('NOTICE_INBOX_SOURCE_SUB', 1);
|
||||
define('NOTICE_INBOX_SOURCE_GROUP', 2);
|
||||
define('NOTICE_INBOX_SOURCE_REPLY', 3);
|
||||
define('NOTICE_INBOX_SOURCE_FORWARD', 4);
|
||||
define('NOTICE_INBOX_SOURCE_PROFILE_TAG', 5);
|
||||
define('NOTICE_INBOX_SOURCE_GATEWAY', -1);
|
||||
|
||||
# append our extlib dir as the last-resort place to find libs
|
||||
|
20
lib/util.php
20
lib/util.php
@ -753,17 +753,19 @@ function common_find_mentions($text, $notice)
|
||||
foreach ($hmatches[1] as $hmatch) {
|
||||
|
||||
$tag = common_canonical_tag($hmatch[0]);
|
||||
$plist = Profile_list::getByTaggerAndTag($sender->id, $tag);
|
||||
if (!empty($plist) && !$plist->private) {
|
||||
$tagged = $sender->getTaggedSubscribers($tag);
|
||||
|
||||
$tagged = Profile_tag::getTagged($sender->id, $tag);
|
||||
$url = common_local_url('showprofiletag',
|
||||
array('tagger' => $sender->nickname,
|
||||
'tag' => $tag));
|
||||
|
||||
$url = common_local_url('subscriptions',
|
||||
array('nickname' => $sender->nickname,
|
||||
'tag' => $tag));
|
||||
|
||||
$mentions[] = array('mentioned' => $tagged,
|
||||
'text' => $hmatch[0],
|
||||
'position' => $hmatch[1],
|
||||
'url' => $url);
|
||||
$mentions[] = array('mentioned' => $tagged,
|
||||
'text' => $hmatch[0],
|
||||
'position' => $hmatch[1],
|
||||
'url' => $url);
|
||||
}
|
||||
}
|
||||
|
||||
Event::handle('EndFindMentions', array($sender, $text, &$mentions));
|
||||
|
Loading…
Reference in New Issue
Block a user