class uKnowvaTags


Located at : UKNOWVA_ROOT/libraries/conv/tags.php

This class has all the functions related to tags in uKnowva uKnowva 2.5.1 shall facilitate tagging through two characters: @: this is for users and user groups and community groups hash(#): actually for tags which can be used across various other content types like articles, documents, knowledge posts, polls, etc

Properties

static $_errormsg

Methods

addTag($tag, $otherinfo = array())

No description

canCreateTag()

No description

deleteTag($tag_id)

No description

updateTagCount($tags)

No description

updateTagHits($tags)

No description

getMaxTagLength()

No description

getMinTagLength()

No description

tagExists($tag)

No description

getTagInfo($id)

No description

boolean
tagContent(array $tags, string $content_type, int|string $content_id, string $option = null, array $taginfo = array())

tag a content

returns
getTagsForContent(string $content_type, string|int $content_id, string $option = null)

returns an array of tags the given content is tagged with

getTagId($tag, $create = true, $taginfo = array())

No description

parseTaggable($string, $tags = '@|#')

No description

replaceTags($string, $tags = null, $replace = array('@grp:', '@ugrp:', '@', '#'), $attributes = array())

No description

getTaggedUsers($tags, $exclude_users = array())

No description

sendNotification($tags, $message, $exclude_users = array(), $type = null, $link = null, $icon = null, $readonlyonce = true)

No description

sendEmail(array $tags, string $subject, string $body, array $exclude_users = array())

this function sends an email notification to all the entities that are tagged in a string

updateSubscription($tagid, $type, $id, $subscribe = true, $notify_by = 'notification')

No description

getSubscriptionInfo($tagid)

No description

getSubscribedUsers($tagid)

No description

getUnSubscribedUsers($tagid)

No description

getUserSubscribedTags($userid)

No description

array
getAuthorizedTags(string $foruser = null)

returns an array of tags that the user is authorized to view

Details

at line 28
addTag($tag, $otherinfo = array())

Parameters

$tag
$otherinfo

at line 105
canCreateTag()

at line 128
deleteTag($tag_id)

Parameters

$tag_id

at line 149
updateTagCount($tags)

Parameters

$tags

at line 162
updateTagHits($tags)

Parameters

$tags

at line 174
getMaxTagLength()

at line 182
getMinTagLength()

at line 190
tagExists($tag)

Parameters

$tag

at line 211
getTagInfo($id)

Parameters

$id

at line 238
boolean tagContent(array $tags, string $content_type, int|string $content_id, string $option = null, array $taginfo = array())

tag a content

Parameters

array $tags is the array of tags,
string $content_type will be the type of content like article, file, folder, com_users, activity, comment, etc. Should not be more than 64 characters.
int|string $content_id is a unique identifier of the content_type. example: file id, activity id, comment id, etc
string $option is the name of your component .i.e. comusers, comuvwdocs, etc.
array $taginfo can be an additional array which consist of other options tha you can set as defined in the #__tags table

Return Value

boolean true on success

at line 319
returns getTagsForContent(string $content_type, string|int $content_id, string $option = null)

returns an array of tags the given content is tagged with

Parameters

string $content_type
string|int $content_id
string $option

Return Value

returns an associative array with values as tags and tagid as key

at line 347
getTagId($tag, $create = true, $taginfo = array())

Parameters

$tag
$create
$taginfo

at line 376
parseTaggable($string, $tags = '@|#')

Parameters

$string
$tags

at line 414
replaceTags($string, $tags = null, $replace = array('@grp:', '@ugrp:', '@', '#'), $attributes = array())

Parameters

$string
$tags
$replace
$attributes

at line 504
getTaggedUsers($tags, $exclude_users = array())

Parameters

$tags
$exclude_users

at line 544
sendNotification($tags, $message, $exclude_users = array(), $type = null, $link = null, $icon = null, $readonlyonce = true)

Parameters

$tags
$message
$exclude_users
$type
$link
$icon
$readonlyonce

at line 555
sendEmail(array $tags, string $subject, string $body, array $exclude_users = array())

this function sends an email notification to all the entities that are tagged in a string

Parameters

array $tags
string $subject E-mail subject
string $body Message body
array $exclude_users

at line 567
updateSubscription($tagid, $type, $id, $subscribe = true, $notify_by = 'notification')

Parameters

$tagid
$type
$id
$subscribe
$notify_by

at line 661
getSubscriptionInfo($tagid)

Parameters

$tagid

at line 674
getSubscribedUsers($tagid)

Parameters

$tagid

at line 699
getUnSubscribedUsers($tagid)

Parameters

$tagid

at line 709
getUserSubscribedTags($userid)

Parameters

$userid

at line 720
array getAuthorizedTags(string $foruser = null)

returns an array of tags that the user is authorized to view

Parameters

string $foruser the userid of the user

Return Value

array object list of tags with key as tag