Hi everyone! I'd like to share an extension I've been working on: Ads Manager (dashzeveg/flarum-ads-manager).
What it does
Ads Manager lets you place ad codes in multiple locations across your forum with full control over visibility, device targeting, and randomization. It works with all types of ad codes — HTML/image-based ads such as affiliate banners and custom HTML, as well as JavaScript-based ad networks like Google AdSense and DCM (DoubleClick Campaign Manager).
Ad Positions
There are 7 available positions:
- Header Top (above the header)
- Header Bottom (below the header)
- Left Sidebar (after tags on the index page)
- Right Sidebar (before the scrubber on discussion pages)
- After First Post (end of the first post in a discussion)
- Discussion List (between discussions on the index page)
- Tags Page (above the content on the tags page)
Features
Each ad position supports up to 5 separate ad slots for both desktop and mobile, a toggle to enable/disable the position, a randomize option to show a different ad on each page load, a toggle to show or hide mobile ads on mobile devices, and per-page visibility controls for Home, Discussion, Tags, and User pages (for Header Top and Header Bottom). The Discussion List position also has a configurable frequency — you can set how many discussions appear between each ad.
📦 Installation
composer require dashzeveg/flarum-ads-manager
Then enable it in your admin panel.
🔄 Update
composer require dashzeveg/flarum-ads-manager
php flarum migrate
php flarum cache:clear
🔗 Links
📄 License
This extension is licensed under the MIT License. See the LICENSE file in the GitHub repository for details.
Feedback and contributions are welcome! Let me know if you run into any issues.