Difference between revisions of "Functions:pageForumPostsGet"
From Whirlwind eCommerce Wiki
(New page: == Description == Retrieves array of forum post data == Syntax == $postArray = eV::pageForumPostsGet([$userId][,$pageId,][$templateIdList,][$fieldList,][$orderBy]); == Paramaters == *$us...) |
|||
Line 14: | Line 14: | ||
== Return Values == | == 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: | |
<pre> | <pre> | ||
Array | Array | ||
( | ( | ||
+ | ['ratingAverage'] => FLOAT | ||
+ | ['ratingTotal'] => INT | ||
+ | ['ratingCount'] => INT | ||
+ | ['ratingCount1'] => INT | ||
+ | ['ratingCount2'] => INT | ||
+ | ['ratingCount3'] => INT | ||
+ | ['ratingCount4'] => INT | ||
+ | ['ratingCount5'] => INT | ||
['posts'] => Array | ['posts'] => Array | ||
( | ( | ||
[0] => Array | [0] => Array | ||
( | ( | ||
− | [] => | + | [post_createDate] => DATETIME |
− | + | [post_modDate] => DATETIME | |
− | post_modDate | + | [post_userId] => INT |
− | post_userId | + | [post_handle] => STRING |
− | post_handle | + | [post_postHandle] => STRING |
− | post_postHandle | + | [post_userHandle] => STRING |
− | post_userHandle | + | [post_emailAddress] => STRING |
− | post_emailAddress | + | [post_postEmailAddress] => STRING |
− | post_postEmailAddress | + | [post_userEmailAddress] => STRING |
− | post_userEmailAddress | + | [post_firstName] => STRING |
− | post_firstName | + | [post_lastName] => STRING |
− | post_lastName | + | [post_emailAddress] => STRING |
− | post_emailAddress | + | [post_userImage] => STRING |
− | post_userImage | + | [post_copy] => STRING |
− | post_copy | + | [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 ... | |
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
) | ) | ||
− | + | ||
) | ) | ||
</pre> | </pre> | ||
Line 80: | Line 85: | ||
// get postings for current page | // get postings for current page | ||
− | + | ||
</source> | </source> |
Revision as of 15:52, 19 October 2008
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