![]() |
IP.Board
3.3.0
|
Composite class, holds main functionality. More...
Public Member Functions | |
| add ($relId, $memberId, array $notifyOpts, $isAnon=0) | |
| allowedFrequencies () | |
| buildNotificationData ($data, $type) | |
| excludeNotification ($row) | |
| getCount ($relId) | |
| getDataByAreaAndLastSentOlderThanDate ($date, $types=array(), $parseMembers=false, $sendMax=null) | |
| getDataByMemberIdAndArea ($memberId, $limit=500) | |
| getDataByMemberIdAndRelationshipId ($relId, $memberId, $checkNotVisibleToo=false) | |
| getDataByRelationshipId ($relId, $skipAnon=true, $ignoreData=array(), $followType=array()) | |
| getDataForSetDialogue ($relid) | |
| getDataJoins ($field='l.like_rel_id') | |
| getNotifyType () | |
| getTitleFromId ($relId) | |
| getUrlFromId ($relId) | |
| getVernacular () | |
| init () | |
| isLiked ($relId, $memberId, $checkNotVisibleToo=false) | |
| notificationCanSend ($metaData) | |
| remove ($relId, $memberId=null) | |
| removeByMemberId ($memberId) | |
| render ($view, $relId, $opts=array(), $memberId=null) | |
| sendDigestNotifications ($type, $sendMax=null) | |
| sendNotifications ($relId, $type, $notificationOpts=array(), &$sentToIds=array()) | |
| skin () | |
| templatePrefix () | |
| toggleVisibility ($relId, $visible=true) | |
Protected Member Functions | |
| _cleanNotifyOptions (array $notifyOpts) | |
| _formatNameString (array $data) | |
Protected Attributes | |
| $_app | |
| $_area | |
| $cache | |
| $caches | |
| $DB | |
| $lang | |
| $likeCache = null | |
| $member | |
| $memberData | |
| $registry | |
| $request | |
| $settings | |
Composite class, holds main functionality.
| _cleanNotifyOptions | ( | array $ | notifyOpts | ) | [protected] |
Clean the notification options to make sure they're all nice and fluffy
| array | $notifyOpts | Notification options |
| _formatNameString | ( | array $ | data | ) | [protected] |
Formats the Bob, Bill, Joe and 2038 Others Hate You
| array | $data | Likes data |
| add | ( | $ | relId, |
| $ | memberId, | ||
| array $ | notifyOpts, | ||
| $ | isAnon = 0 |
||
| ) |
Add a like
| integer | $relId | Relationship ID |
| integer | $memberID | Member ID of user being added |
| array | $notifyOpts | Notification options |
| integer | $isAnon | Anonymous flag |
Return an array of acceptable frequencies Possible: immediate, offline, daily, weekly
Reimplemented in like_calendar_calendars_composite, like_calendar_events_composite, like_forums_forums_composite, like_forums_topics_composite, like_blog_blog_composite, like_blog_entries_composite, like_downloads_categories_composite, like_downloads_files_composite, like_gallery_albums_composite, like_ccs_composite, and like_gallery_images_composite.
| buildNotificationData | ( | $ | data, |
| $ | type | ||
| ) |
Builds the notification data via the app class
| array | $data | like_ DB data and like owner member data |
| string | $type | Types of notifications to send |
Reimplemented in like_forums_topics_composite, and like_forums_forums_composite.
| excludeNotification | ( | $ | row | ) |
Function to let plugins determine if a notification should not be sent. Return false to send notification, or true to skip sending it.
| array | Notification data |
Reimplemented in like_forums_topics_composite.
| getCount | ( | $ | relId | ) |
Return number of people who 'like' the item
| integer | $relId | Relationship ID |
| getDataByAreaAndLastSentOlderThanDate | ( | $ | date, |
| $ | types = array(), |
||
| $ | parseMembers = false, |
||
| $ | sendMax = null |
||
| ) |
Get data based on an area and last sent greater than date [unix timestampe]
| integer | $date | Unix timestamp |
| array | $types | Array of notification types (optional) |
| array | $parseMembers | Parse extra data for each member and build display photo (false is default) |
| integer | $sendMax | Null (use ipsRegistry::$setting or send INT only) |
| getDataByMemberIdAndArea | ( | $ | memberId, |
| $ | limit = 500 |
||
| ) |
Get data based on a member ID
| integer | $memberId | Member ID |
| integer | $limit | Max results |
| getDataByMemberIdAndRelationshipId | ( | $ | relId, |
| $ | memberId, | ||
| $ | checkNotVisibleToo = false |
||
| ) |
Get data based on a relationship ID and a member ID
| mixed | $relId | Relationship IDs (int|array) |
| integer | $memberId | Member ID |
| boolean | $checkNotVisibleToo | return a match even if not visible to the user |
| getDataByRelationshipId | ( | $ | relId, |
| $ | skipAnon = true, |
||
| $ | ignoreData = array(), |
||
| $ | followType = array() |
||
| ) |
Get data based on a relationship ID
| integer | $relId | Relationship ID |
| boolean | $skipAnon | Skip anonymous rows flag |
| array | ||
| array | Type of follow (immediate, none, offline, daily, etc) |
| getDataForSetDialogue | ( | $ | relid | ) |
Fetch form data for set dialogue
| integer | $relId | Relationship ID |
| getDataJoins | ( | $ | field = 'l.like_rel_id' | ) |
Fetches joins for fetching data
| string | $field | DB field name (defaults to 'l.like_rel_id') |
Reimplemented in like_forums_topics_composite, and like_forums_forums_composite.
| getNotifyType | ( | ) |
Return types of notification available for this item
Reimplemented in like_calendar_calendars_composite, like_calendar_events_composite, like_forums_forums_composite, like_forums_topics_composite, like_blog_blog_composite, like_blog_entries_composite, like_downloads_categories_composite, like_downloads_files_composite, like_gallery_albums_composite, and like_gallery_images_composite.
| getTitleFromId | ( | $ | relId | ) |
Return the title based on the passed id
| mixed | $relId | Relationship ID or array of IDs |
Reimplemented in like_gallery_albums_composite.
| getUrlFromId | ( | $ | relId | ) |
Return the URL based on the passed id
| mixed | $relId | Relationship ID or array of IDs |
Reimplemented in like_gallery_albums_composite.
| getVernacular | ( | ) |
Gets the vernacular (like or follow)
Reimplemented in like_forums_forums_composite, like_forums_topics_composite, like_blog_blog_composite, like_blog_entries_composite, like_downloads_categories_composite, like_downloads_files_composite, like_gallery_albums_composite, like_calendar_calendars_composite, like_calendar_events_composite, and like_gallery_images_composite.
| init | ( | ) |
Init all. Yes, it is.
| isLiked | ( | $ | relId, |
| $ | memberId, | ||
| $ | checkNotVisibleToo = false |
||
| ) |
Has this user made this item a like already dudes?
| mixed | $relId | Relationship IDs (int|array) |
| integer | $memberId | Member ID |
| boolean | $checkNotVisibleToo | return a match even if not visible to the user |
| notificationCanSend | ( | $ | metaData | ) |
Check notifications that are to be sent to make sure they're valid and that
| array | $metaData | like_ DB data and like owner member data |
Reimplemented in like_forums_forums_composite, and like_forums_topics_composite.
| remove | ( | $ | relId, |
| $ | memberId = null |
||
| ) |
Removes a like
| mixed | $relId | Relationship IDs (int|array) |
| integer | $memberId | Optional - If supplied, it'll remove that member rel. or it will remove all |
| removeByMemberId | ( | $ | memberId | ) |
Removes all likes based on member ID
| integer | $memberId | Member ID |
| render | ( | $ | view, |
| $ | relId, | ||
| $ | opts = array(), |
||
| $ | memberId = null |
||
| ) |
Render a view
| string | $view | Type of View |
| integer | $relId | Relationship ID |
| array | $opts | Options |
| integer | $memberId | Member ID |
| sendDigestNotifications | ( | $ | type, |
| $ | sendMax = null |
||
| ) |
Send digest notifications to anyone subscribed to item
| string | $type | Types of notifications to send (Possible: daily, weekly) |
| integer | $sendMax | Null (use ipsRegistry::$setting or send INT only) |
| sendNotifications | ( | $ | relId, |
| $ | type, | ||
| $ | notificationOpts = array(), |
||
| &$ | sentToIds = array() |
||
| ) |
Send notifications to anyone subscribed to item
| integer | $relId | Relationship ID |
| array | $type | Types of notifications to send (Possible: immediate, offline, daily, weekly) |
| array | $notificationOpts | Notification options [Keys: notification_key, notification_url, email_template, email_subject, build_message_array, from (optional), ignore_data( type => ids )] |
| array | $sentToIds | Pass a value by reference to get the ID numbers of members that were sent a notification |
| skin | ( | ) |
Fetch the template group
Reimplemented in like_gallery_albums_composite, like_gallery_images_composite, like_forums_forums_composite, like_forums_topics_composite, like_blog_blog_composite, like_blog_entries_composite, like_calendar_calendars_composite, like_calendar_events_composite, like_downloads_categories_composite, like_downloads_files_composite, and like_ccs_composite.
| templatePrefix | ( | ) |
Fetch the template prefix. This allows you to have two follow implementations in one skin file (i.e. skin_calendars -> eventLikeMoreDialog() and skin_calendars -> calendarLikeMoreDialog())
Reimplemented in like_calendar_calendars_composite, and like_calendar_events_composite.
| toggleVisibility | ( | $ | relId, |
| $ | visible = true |
||
| ) |
Toggle visibility
| mixed | $relId | Relationship ID or array ids |
| boolean | $visible | Visible (true) or not (false) |
$_app [protected] |
Application key
$_area [protected] |
Area key
$likeCache = null [protected] |
Cache object
$registry [protected] |
Registry Object Shortcuts
Reimplemented in like_forums_forums_composite, like_forums_topics_composite, like_blog_blog_composite, like_blog_entries_composite, like_calendar_calendars_composite, like_calendar_events_composite, like_downloads_categories_composite, like_downloads_files_composite, like_gallery_albums_composite, like_ccs_composite, and like_gallery_images_composite.