Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
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: about 1 month 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 (over 7 years ago)
- Default Branch: master
- Last Pushed: 2022-10-11T10:35:19.000Z (about 2 years ago)
- Last Synced: 2024-10-29T22:47:47.550Z (about 2 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://img.shields.io/packagist/v/heimrichhannot/contao-disqus-bundle.svg)](https://packagist.org/packages/heimrichhannot/contao-disqus-bundle)
[![](https://img.shields.io/packagist/dt/heimrichhannot/contao-disqus-bundle.svg)](https://packagist.org/packages/heimrichhannot/contao-disqus-bundle)
[![Build Status](https://travis-ci.org/heimrichhannot/contao-disqus-bundle.svg?branch=master)](https://travis-ci.org/heimrichhannot/contao-disqus-bundle)
[![Coverage Status](https://coveralls.io/repos/github/heimrichhannot/contao-disqus-bundle/badge.svg?branch=master)](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);
```