PHP code example of nikolaposa / zf-disqus

1. Go to this page and download the library: Download nikolaposa/zf-disqus 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/ */

    

nikolaposa / zf-disqus example snippets



return [
    'disqus' => [
        'shortname' => 'your_disqus_shortname'
        //any other Disqus config can be provided here
    ],
    // ...
];


return [
    'modules' => [
        // ...
        'ZfDisqus',
    ],
    // ...
];
html
<!-- post.phtml -->


    //Page-specific Disqus configuration
    $this->disqus()->configure([
        'identifier' => 'article_' . $this->post->id
        'title' => $this->post->title,
    ]);
html
<!-- layout.phtml -->
<html>
    <head>
        <title>Blog</title>
    </head>

    <body>
         echo $this->content;