PHP code example of pubvana / comments

1. Go to this page and download the library: Download pubvana/comments library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

pubvana / comments example snippets


'plugins' => [
    'pubvana/comments' => [
        'enabled'  => true,
        'priority' => 55,
    ],
],

$comments = $app->comments();

$comments->findForContent('post', $postId);        // Threaded tree for display
$comments->create($data);                           // Create comment (validates depth, captcha, purifies)
$comments->approve($id);                            // Set status to approved
$comments->reject($id);                             // Set status to rejected
$comments->delete($id);                             // Hard delete
$comments->list($page, $perPage, $status);          // Admin listing
$comments->countByStatus($status);                  // Count by status
$comments->verifyCaptcha($token, $remoteIp);        // Manual captcha check