Functions:pageForumPostsGet
From Whirlwind eCommerce Wiki
Description
Retrieves array of forum post data
Syntax
$postArray = eV::pageForumPostsGet([$userId][,$pageId,][$templateIdList,][$fieldList,][$orderBy]);
Paramaters
- $userId INT OPTIONAL (either userId OR pageId MUST be passed)
- Entering a value into this field will filter all forum posts by this user. Use this field to get all forum posts on all pages by a specific user.
- $pageId INT OPTIONAL (either userId or pageId MUST be passed)
- Entering a value into this field will filter all forum posts by this page. Use this field to show all forum posts made to a particular page.
- $templateIdList STRING OPTIONAL
- comma delimited list of templateIds to filter post results by. This is used in conjunction with userId to show only posts made by the user to pages that belong to certain templates (I.e. show only posts to products via product templates)
Return Values
Returns an associative array of aggregate post data. The 'posts' root element contains an indexed array of all individual posts qualifying for this request. Each indexed element is an associative array of post data. The returned array is as follows:
Array ( ['ratingAverage'] => FLOAT ['ratingTotal'] => INT ['ratingCount'] => INT ['ratingCount1'] => INT ['ratingCount2'] => INT ['ratingCount3'] => INT ['ratingCount4'] => INT ['ratingCount5'] => INT ['posts'] => Array ( [0] => Array ( [post_createDate] => DATETIME [post_modDate] => DATETIME [post_userId] => INT [post_handle] => STRING [post_postHandle] => STRING [post_userHandle] => STRING [post_emailAddress] => STRING [post_postEmailAddress] => STRING [post_userEmailAddress] => STRING [post_firstName] => STRING [post_lastName] => STRING [post_emailAddress] => STRING [post_userImage] => STRING [post_copy] => STRING [page_title] => STRING [reply_copy] => STRING [reply_handle] => STRING [reply_emailAddress] => STRING [reply_firstName] => STRING [reply_lastName] => STRING [reply_userEmailAddress] => STRING [reply_userHandle] => STRING [reply_postHandle] => STRING [reply_userImage] => STRING [reply_postId] => INT [reply_userId] => INT [reply_title] => STRING [reply_createDate] => DATETIME [reply_modDate] => DATETIME [reply_postEmailAddress] => STRING [reply_postHandle] => STRING [isEditable] => BIT [deleteLink] => STRING [editLink] => STRING [replyLink] => STRING [anchor] => STRING [agreeTotal] => INT [agreeCount] => INT ) [1] => Array ... ) )
Examples
- Simple Example
// get postings for current page