heimrichhannot / contao-disqus-bundle
Contao 4 disqus bundle
Installs: 304
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 6
Forks: 0
Open Issues: 0
Type:contao-bundle
Requires
- php: ^7.0 || ^8.0
- contao/core-bundle: ^4.9
- contao/news-bundle: ^4.9
- symfony/translation-contracts: ^1.0 || ^2.0 || ^3.0
- twig/twig: ^1.38 || ^2.7 || ^3.0
Requires (Dev)
- contao/manager-plugin: ^2.0
- contao/test-case: ^1.1
- friendsofphp/php-cs-fixer: ^2.2
- php-coveralls/php-coveralls: ^2.0
- php-http/guzzle6-adapter: ^1.1
- php-http/message-factory: ^1.0.2
- phpunit/phpunit: >=6.0 <6.5
- symfony/phpunit-bridge: ^3.2
README
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:
<?php if ($this->disqus_section): ?>
<?php $this->disqus_section ?>
<?php endif; ?>
- 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 fromhuh.disqus.renderer
service)
// 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);