Provide zblog template_zblog them_wordpress template download and customization

Zblog function GetCommentByID: Get comment object data through comment ID

Tianxing Studio 2022-07-28 20:32 Zblog function one thousand two hundred and fifty-six 0 Comments


before Tianxing Studio It was introduced that the "GetCommentList" function is used to obtain the comment list. If you want to obtain a specified single comment, you need to use the "GetCommentByID" function introduced in this article.

The GetCommentByID function is constructed in“ zblogphp . php "file is about 3609 lines.

Function parameters:

$id: integer type, which is the comment id of the data to be obtained;

Function output:

Output an object object whose content is all the values of the specified comment.

For example, output the user name of the comment whose comment ID is "1":

 $zbp->GetCommentByID(1)->Author->Name;

Before use, it is better to judge whether this comment exists, complete examples (only in Zblogphp template Effective within the document):

 {if $zbp->GetCommentByID(1)->ID != 0} Reviewer: {$zbp ->GetCommentByID (1) ->Author ->Name} The article title of the comment: {$zbp ->GetCommentByID (1) ->Post ->Title} Comment content: {$zbp ->GetCommentByID (1) ->Content} {/if}

Other data values of the output object are as follows:

 Zblog function GetCommentByID: Get comment object data through comment ID zblog comment GetCommentByID zblog function zblog function Page 1


Can't find a tutorial that can solve your problem?

You can try to search or ask questions directly online. We also provide charging technical support. If you need it, you can contact us online.

Online questions Online Service

welcome you Comment: Cancel Reply

 Please fill in the verification code
  • Latest articles
  • Hot article ranking
  • Most Comments
Label aggregation
  • Sign in
  • Registered account Forgot your password?
  • register
  • Already have an account? Direct login Forgot your password?
  • Social account login