https://github.com/heimrichhannot/contao-disqus-bundle
A contao bundle to add disqus to news article.
https://github.com/heimrichhannot/contao-disqus-bundle
Last synced: 4 months ago
JSON representation
A contao bundle to add disqus to news article.
- Host: GitHub
- URL: https://github.com/heimrichhannot/contao-disqus-bundle
- Owner: heimrichhannot
- License: other
- Created: 2017-08-23T14:03:23.000Z (almost 8 years ago)
- Default Branch: master
- Last Pushed: 2022-10-11T10:35:19.000Z (almost 3 years ago)
- Last Synced: 2025-02-22T20:06:15.106Z (5 months ago)
- Language: PHP
- Homepage:
- Size: 37.1 KB
- Stars: 0
- Watchers: 6
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE.md
Awesome Lists containing this project
README
# Contao Disqus Bundle
[](https://packagist.org/packages/heimrichhannot/contao-disqus-bundle)
[](https://packagist.org/packages/heimrichhannot/contao-disqus-bundle)
[](https://travis-ci.org/heimrichhannot/contao-disqus-bundle)
[](https://coveralls.io/github/heimrichhannot/contao-disqus-bundle?branch=master)Add the disqus comment system to your contao page.
## Features
* integrates into news article rendering
* stand alone module to integrate wherever you want
* Service for even more custom placement## Requirements
* Contao 4.4
* PHP 7## Installation
```
composer require heimrichhannot/contao-disqus-bundle
```## Setup
There are three options to integrate disqus.
### News
* in your news template (usually `news_full.html5`), add following code:
```
disqus_section): ?>
disqus_section ?>```
* in your news archive, active disqus comments and enter disqus forum name### Module
* create a module with the bundles disqus comments module and enter all need informations
* add module to an article### Service
* output the result of `DisqusRenderer::render()` (callable from `huh.disqus.renderer` service)
```php
// Example from DisqusCommentModule (we recommend injecting the service instead of calling it direct from container):$this->Template->disqus_block = System::getContainer()->get('huh.disqus.renderer')->render($this->disqus_shortname, $this->disqus_identifier);
```