Download the PHP package takepart-media/statamic-oreos without Composer

On this page you can find all versions of the php package takepart-media/statamic-oreos. 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 statamic-oreos

Statamic Oreos

Cookie consent manager for Statamic 3.

Features

Oreos gives you the opportunity to manage cookie consents on two levels: groups of consents and the regarding settings are managed via the addons’ config-file, whereas the corresponding titles and descriptions are managed from within the control panel. This enables your authors to not only edit texts on the fly, without the need to deploy the site or the developer to open their editor, but also to manage texts in multi-site (and multi-lang) installations.

How to Install

You can search for this addon in the Tools > Addons section of the Statamic control panel and click install, or run the following command from your project root:

After that, publish the config file to customize your consent groups and to tweak other settings.

To customize the user experience, you are free to publish the views to customize them based on your needs:

How to Use

Default views

Popup

To add the popup with the included form to your layout, use the oreos:popup tag to place it at it's belonging position (usually near the end of the body as first-level child, e.g. in your main layout file):

resources/views/layout.antlers.html

When saved, the page gets reloaded (technically, we got redirected to the referers page after saving within the posted controller's action at /!/oreos/save), so all statements to check for consents should return the correct setting.

Formular

To recall the settings, usually within the privacy statements, add the oreos:form tag. This can be done within your content, but be sure to allow antlers to be parsed:

This will show just the form from within the popup, not the popup itself (everything around the form). By passing parameters, you can show or hide certain elements. If you are using custom views, this feature might be broken. The default config (if parameters are omitted, the default value will kick in):

Custom views

Pretty sure you want to customize the experience for your visitors: we got you covered. With the help of our tags, you can pretty easily overwrite and customize both the popup as well as the form – or just some part of it.

First, publish the addon’s views:

This should create the two files inside the folder /resources/views/vendor/oreos/ for the form (form.antlers.php) and the popup (popup.antlers.html). Those files can be customized as you wish. You even have the possibility to completely omit our views and just use our backbone, by using our controller endpoint and our oreos tag from within your own partials or templates. Have a look at form.antlers.php how everything is wired up!

Use cookie groups elsewhere

With the help of the oreos tag, you can display your cookie groups with all relevant information everywhere on your website:

The following attributes are augmented within the oreos-loop:

Handle Type  Description
handle string The group handle you configured inside the config/oreos.php
title string The title for your group as written in the control panel (localized).
description string The description for your group as written in the control panel (localized).
details array Further details as bard field written in the control panel (localized).
consent bool If the user has given their consent or not.
explicit bool If the cookie is explicitly set.
required bool If the consent is required.
default bool If the checkbox is checked by default.
checked bool If the checkbox in the form is checked or not. Calculated based on consent, explicit, default and required.

Check for consents

To check if a cookie group was given consent to, use the oreo:yourgrouphandle tag:

Usage with static caching

When used with static caching enabled, without any further changes, your site will throw a 419 page expired error. For the plugin to work, you have to exclude the oreo-popup as well as all checks from cache by using the {{ nocache }}-tag: https://statamic.dev/tags/nocache

Authors

© 2021 TAKEPART Media + Science GmbH


All versions of statamic-oreos with dependencies

PHP Build Version
Package Version
No informations.
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 takepart-media/statamic-oreos contains the following files

Loading the files please wait ....