friendsofvictoire/disqus-widget
Laravel package that adds a Disqus comment widget to your application, with a Blade component and configurable shortname so you can drop threaded comments into any page. Simple setup and minimal overhead.
First, the reality check: despite the naming, this is not a Laravel package. It is a Symfony bundle (FriendsOfVictoire\WidgetDisqusBundle) written for Victoire CMS, the Symfony 2/3-era CMS. There is no service provider, no facade, no config/disqus.php. If you are on Laravel, the answer is to embed Disqus directly (one <script> tag and a #disqus_thread div) — this package has nothing to offer you. The rest of this assessment assumes you are maintaining an existing Victoire site and have a real reason to use it.
Minimal steps for that case:
composer require friendsofvictoire/disqus-widget (check the composer.json constraints first — it was last tagged in Nov 2016 and will pull against old Symfony/Victoire versions).new FriendsOfVictoire\WidgetDisqusBundle\WidgetDisqusBundle() in AppKernel::registerBundles() (Symfony <4) or in config/bundles.php (Symfony 4+).Where to look first: the Widget/ directory (the widget class and its getName()/getForm() methods), then Resources/views/ for the Twig template that actually emits the Disqus embed, then DependencyInjection/ for any config keys such as the forum shortname. The widget class is the source of truth for what fields the editor form exposes.
First use case: drop a comment thread onto a blog article or news page template so editors can add/remove comments per page from the CMS UI without touching Twig.
Editor-driven placement. The canonical workflow is not code — it's an editor opening a page in Victoire, dragging the Disqus widget into a slot, filling in the form (typically forum shortname plus a thread identifier/title), saving, and publishing. Your job as the developer is usually to make that form sane and the template correct, not to render it manually.
Per-page thread identity. The single most important implementation decision is the Disqus thread identifier. Use something stable and unique per content entity — the page slug, the business entity id, or a namespaced key like article-42 — passed into disqus_config:
var disqus_config = function () {
this.page.url = '{{ page_url }}';
this.page.identifier = '{{ thread_identifier }}';
};
Never derive the identifier from the current URL alone; the moment you change a route or move a page, every existing comment thread is orphaned. If the widget's form doesn't expose an identifier field, subclass the widget or add it to the form type — that is the intended extension point.
Shortname in config, not hardcoded. If the bundle supports a bundle-level config for the forum shortname, put it there (per environment) and let the widget override only when a site genuinely needs multiple forums. Hardcoding a shortname in the template makes staging and production indistinguishable, which causes cross-environment comment leakage.
Template override instead of editing vendor code. Override the widget Twig template through standard Symfony bundle inheritance (an app-level Resources/FriendsOfVictoireWidgetDisqusBundle/views/... path, or twig.paths precedence) so you can control lazy-loading, disqus_config, and consent gating without patching the vendor directory. This is also where you fix the embed if the bundle was written against the legacy Disqus embed and you now need the current one.
Fork-into-app as the maintenance pattern. Given the package's age (last release 2016, one star, zero dependents), the realistic long-term pattern is to copy the handful of files into your own src/ as a first-party bundle, keep the same widget name so existing page content still resolves, and then own the code. Treat the original as a scaffold, not a dependency you upgrade.
cache:clear, confirm the bundle is registered, and confirm the widget is tagged/discovered as Victoire expects. Check the widget's name string matches what the DI configuration references.#disqus_thread div that isn't present or is renamed, or a blocked script. Verify in the rendered HTML: the container id, the embed.js script load, and the shortname in the network request.How can I help you explore Laravel packages today?