nikolaposa/disqus-helper 问题修复 & 功能扩展

解决BUG、新增功能、兼容多环境部署,快速响应你的开发需求

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

nikolaposa/disqus-helper

最新稳定版本:2.1.2

Composer 安装命令:

composer require nikolaposa/disqus-helper

包简介

PHP library which facilitates integration of Disqus widgets.

README 文档

README

Build Status Scrutinizer Code Quality Code Coverage Latest Stable Version PDS Skeleton

PHP library which facilitates integration of Disqus widgets.

Installation

The preferred method of installation is via Composer. Run the following command to install the latest version of a package and add it to your project's composer.json:

composer require nikolaposa/disqus-helper

Usage

Initialization

use DisqusHelper\Disqus;

$disqus = Disqus::create('disqus_shortname');

Template

<html>
    <head>
        <title>Blog</title>

        <?php
            //Page-specific Disqus configuration
            $disqus->configure([
                'page.identifier' => 'article1',
                'page.title' => 'My article',
            ]);
        ?>
    </head>

    <body>
        <article>
            <h1>My article</h1>
            <!-- Comments count widget -->
            <?php echo $disqus->commentsCount(['url' => 'http://example.com/article1.html']); ?>

            <p>My article text</p>
        </article>

        <div>
            <h2>Comments:</h2>
            <!-- Thread widget -->
            <?php echo $disqus->thread(); ?>
        </div>

        <!-- MUST be called at the end, usually before closing </body> tag -->
        <?php echo $disqus->getCode(); ?>
    </body>
</html>

See more examples.

Author

Nikola Poša

Copyright and license

Copyright 2017 Nikola Poša. Released under MIT License - see the LICENSE file for details.

统计信息

  • 总下载量: 32.31k
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 4
  • 点击次数: 0
  • 依赖项目数: 1
  • 推荐数: 0

GitHub 信息

  • Stars: 4
  • Watchers: 1
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2015-09-03