Download the PHP package usamamuneerchaudhary/billboard without Composer

On this page you can find all versions of the php package usamamuneerchaudhary/billboard. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package billboard

Packagist License

Ad management for Statamic 6. Create placements for the slots in your templates, add image, text or ad network ads to them, and let Billboard handle rotation, scheduling, targeting and reporting.

Contents

Requirements

Installation

vendor:publish copies the front-end script and stylesheet to public/vendor/billboard. The control panel loads its assets from the package. The migration creates one table, billboard_stats. To change the table name or connection, publish the config first (see Configuration).

Quick start

  1. In the control panel, go to Advertising → Placements and create a placement, for example Sidebar.
  2. Add its tag to a template:

  3. Go to Advertising → Ads, create an ad, and choose Sidebar under Placement & schedule.

That's it. The first placement on each page also outputs Billboard's small script and stylesheet.

Templates

Antlers

A placement that doesn't exist, or has nothing to show and no fallback, outputs nothing, so a template never breaks.

Blade

Custom markup with a tag pair

Use the tag as a pair to write your own markup. Ads are chosen on the server in this mode.

Keep {{ placement_attributes }} on the wrapper and {{ attributes }} on each ad. The script uses them for impression counting and device targeting.

These variables are available:

Antlers doesn't escape output, so use | entities on text your editors enter.

Inside a page, post, or other entry

Template tags are for fixed slots, such as a sidebar in the layout. To place an ad in the body of an entry, editors do it from the publish form. The content renders the ad; they do not paste PHP or a Blade directive into the entry.

Markdown content. On a Markdown field, open the field menu and choose Insert advertisement, then pick a placement. That inserts {{ billboard:test }} (or [billboard:test]) into the content. {{ content }} renders it with the rest of the page. The same shortcode is left as text in the control panel, so listings do not load a live ad.

Bard and Replicator. Set content.inject_sets to true in the billboard config to add an Advertisement set to every Bard and Replicator field on entries, terms, and globals. Editors insert that set and pick a placement. In the template, output the set with the rest of the content:

{{ placement }} is the rendered ad. While injection is on, set billboard: false on a Bard or Replicator field to keep the set off that field. You can also add the Advertisement set yourself in the blueprint builder when injection is off.

Its own field. In the blueprint builder, add the Advertisement field wherever a single placement belongs, including inside your own sets. Output the field handle. Antlers prints the ad; Blade needs unescaped output:

Do not name that field billboard. {{ billboard }} is the tag, so a field with the same handle would be hidden by it.

The Ad placements dictionary is still available when you want the handle in your own markup:

Choosing ads on the server or in the browser

Each placement has a Choose ads setting.

On the server (default) picks ads while the page renders and outputs only those ads. Use this when pages aren't statically cached, or when you use half-measure caching or {{ nocache }} around the tag.

In the browser outputs every eligible ad inside <template> elements. The script picks which to show using each ad's weight, start and end time, device and daily visitor limit. Choose this if your site uses full static caching; otherwise every visitor of a cached page would see the same ad, and a finished campaign would keep showing until the cache clears.

Two settings help keep cached pages fresh:

Visitors without JavaScript see nothing in browser placements. Server placements render normally without JavaScript, but won't count impressions.

Targeting and limits

You'll find these on each ad under Targeting & limits.

Reporting and privacy

What is recorded: one row per ad, placement and day, holding an impression count and a click count. There are no IP addresses, cookies, user agents, visitor IDs or page URLs.

What counts:

What doesn't count:

Data kept in the browser: only for ads with a daily visitor limit, a per-ad counter is stored in localStorage under billboard:seen:{ad id}. It never leaves the browser. Depending on where your visitors are, storing it may require consent. If that's a concern, don't use daily visitor limits.

Rate limiting: tracking requests are limited per visitor (tracking.rate_limit, 120 per minute). The limiter keys on the visitor's IP in your cache for up to a minute, which is the same mechanism Laravel uses for login throttling. IPs are never written to the database.

Retention: daily totals older than Keep statistics for (395 days by default) are deleted by the billboard:prune-stats command. The command is scheduled daily, so make sure your server runs Laravel's scheduler.

You'll find reports under Advertising → Reports. You can filter by period, placement and ad, compare with the previous period, and export CSV.

Permissions

Billboard adds an Advertising group to roles:

Permission Allows
View ads Seeing the ads listing
Edit ads Changing ads, and enabling or disabling them
Create ads Creating ads
Delete ads Deleting ads
Edit HTML ads Creating or changing HTML ads. Grant this only to people you trust with site code. Others see HTML ads read-only.
Manage placements Creating, editing and deleting placements, including fallback HTML
View ad reports The reports page, CSV export and dashboard widget

Every control panel route and action checks these on the server.

Dashboard widget

Add it to config/statamic/cp.php:

The widget only appears for users who can view ad reports.

Customising the output

Styles. The default stylesheet uses :where(), so any rule of yours wins. Adjust it with custom properties:

To style everything yourself, turn off Include default styles in the add-on settings.

Markup. Publish the views:

This copies placement.blade.php, ad.blade.php and assets.blade.php to resources/views/vendor/billboard. Keep the data-billboard-* attributes.

Scripts loaded later. If placements are added to the page after load, for example by Livewire or a JavaScript router, call:

Configuration

Editors manage day-to-day options under Tools → Addons → Billboard → Settings: reporting, privacy signals, retention, label, default styles and static cache clearing.

Developer options live in the config file:

Key Default Description
storage.ads content/billboard/ads Folder for ad YAML files
storage.placements content/billboard/placements Folder for placement YAML files
assets.container first container Asset container for image ads (BILLBOARD_ASSET_CONTAINER)
assets.folder billboard Upload folder within the container
tracking.connection default Database connection (BILLBOARD_DB_CONNECTION)
tracking.table billboard_stats Stats table name
tracking.rate_limit 120 Tracking requests per minute per visitor
tracking.cap_cache_seconds 60 How long lifetime totals are cached for limits
tracking.bot_patterns [] Extra user agent substrings to ignore
frontend.mobile_breakpoint 768 Viewport width below which a visitor counts as mobile
frontend.auto_assets true Output the script and stylesheet with the first placement

Ads and placements are plain YAML files, so commit them with the rest of your content. If your site has no asset containers, image ads use an image URL field instead of the asset picker.

Events

Listen for these to sync with other systems or clear your own caches:

Commands

Security notes

Developing

npm run dev starts Vite with hot reloading for the control panel pages.

Support

Please include your Statamic, Laravel and PHP versions, and what you expected to happen.

License

Billboard is free software, released under the MIT license.


All versions of billboard with dependencies

PHP Build Version
Package Version
Requires php Version ^8.3
statamic/cms Version ^6.0
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package usamamuneerchaudhary/billboard contains the following files

Loading the files please wait ...