Difference between revisions of "Functions:pageForumPostsGet"

From Whirlwind eCommerce Wiki
Jump to: navigation, search
(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 ==
Return multi dimensional array where first dimension is the index associated with the specific post, the second dimension is an associative array of data for that post.  
+
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.  
Return array is as follows:
+
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
 
                 (
 
                 (
                   [] => Array
+
                   [post_createDate] => DATETIME
post_createDate
+
                  [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
  
page_title
+
                  [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
  
reply_copy
+
                  [isEditable] => BIT
reply_handle
+
                  [deleteLink] => STRING
reply_emailAddress
+
                  [editLink] => STRING
reply_firstName
+
                  [replyLink] => STRING
reply_lastName
+
                  [anchor] => STRING
reply_userEmailAddress
+
reply_userHandle
+
reply_postHandle
+
reply_userImage
+
reply_postId
+
reply_userId
+
reply_title
+
reply_createDate
+
reply_modDate
+
reply_postEmailAddress
+
reply_postHandle
+
  
ratingAverage
+
                  [agreeTotal] => INT
ratingTotal
+
                  [agreeCount] => INT
ratingCount
+
                )
ratingCount1
+
          [1] => Array ...
ratingCount2
+
ratingCount3
+
ratingCount4
+
ratingCount5
+
 
+
agreeTotal
+
agreeCount
+
 
         )
 
         )
    [1] ...
+
 
 
)
 
)
 
</pre>
 
</pre>
Line 80: Line 85:
  
 
// get postings for current page
 
// get postings for current page
$postArr = eV::pageForumPostsGet(NULL,$pageId,NULL,'
+
 
 
</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