Download the PHP package sayamaapps/kirby-noren without Composer

On this page you can find all versions of the php package sayamaapps/kirby-noren. 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 kirby-noren

Noren

Opening hours for Kirby CMS 5, with an "open now" status and German public holidays.

Noren (暖簾) is the curtain hung in a shop's doorway while it is open. On a website, the plugin answers the same question: are you open right now, and if not, when again? It prints unstyled markup and provides the data for your own markup and schema.org.

Features

Requirements

Installation

Composer installs to site/plugins/noren/. Add that path to .gitignore and deploy it like vendor/.

Usage

Setup

Switch Noren on in site/config/config.php:

Texts are English unless noren.language, the site language or Kirby's locale says otherwise. A German single-language site without a locale must set noren.language.

Give the location pages this blueprint, for example site/blueprints/pages/betrieb.yml:

Keep the title line, because extends: does not carry it over. Pages with the template betrieb are locations (see template).

Snippets

Call snippet('noren/status') for the "open now" line, snippet('noren/table') for the full week and snippet('noren/compact') for short lines.

Snippet Variables (all optional)
noren/status $only (a unit, area or location id), $link (page with all hours), $units, $now
noren/table $area or $schedule, $now
noren/compact $area or $schedule, $mode (grouped or consecutive), $title, $now

To change the markup, create a file with the same name in site/snippets/noren/. The markup classes are listed in docs/reference.md.

Own markup and schema.org

Site and page methods return the data behind the snippets, for example site()->norenStatus('laden') or page()->norenTable(). When Noren is off or there is no plan, they return null or []. All methods and return shapes: docs/reference.md.

Content field contract

The German field names are the defaults; rename them with fields. One location with several areas (a shop and a café, say) lists them in bereiche and gives each hours row its bereich. Several sites are several location pages; locations selects them explicitly.

Field (option key) Content
bereiche (areas) Areas: schluessel (required), name, kurzname
zeiten (hours) Weekly rows: bereich, tag, von1, bis1, von2, bis2, hinweis
schliessungen (closures) Closures and special days: von, bis (Y-m-d, inclusive), bereich, anlass, hinweis, oeffnet, schliesst (short hours instead of closed)
zeitenschluessel (areaRef) On a non-location page: the area whose hours apply
kurzname (short) On a location page: the short name shown as status label

Configuration

Every option is noren.<name>, flat or nested. null means "not set". Booleans must be real true or false. A broken value is logged once and the default is used; with Kirby's debug option on, it throws instead.

Option Default Description
active false Master switch. Off: methods return null or [], snippets print nothing.
template 'betrieb' Template of the location pages: a string or a list.
locations null Closure or list of page ids for the locations; overrides template.
fields see Content field contract Field names as a map. Give only the keys you change.
timezone 'Europe/Berlin' Time zone of all date logic.
language site language en or de.
holidays false Public holidays: a state code, or an array with state and flags. See Public holidays.
holidayEve false Adds a notice to the status when tomorrow is a public holiday.
holidayRow true "Public holidays" row in the table (needs holidays).
holidayNote true Note on the next public holiday under the table (needs holidays).
holidayNoteDays 14 How many days ahead that note looks.
leadDays 14 Closures and special days show on the site this many days ahead. schema.org always gets all of them.
lookahead 90 How many days the status searches for the next opening.
overnightUntil '06:00' Latest end of a block running past midnight, as 'HH:MM'. false turns overnight blocks off.
closureLabel Betriebsferien / Closed for holidays Name of multi-day closures, for example 'Praxisurlaub'. Translated by default.
compact 'grouped' Default mode of noren/compact: grouped or consecutive.
status true false hides the noren/status snippet.
mergeAreas false Areas with identical hours become one unit, such as "Hofladen und Hofcafé". site()->norenUnits(null, false) still returns one unit per area.

Public holidays

Off by default. With holidays set, the holidays of a state are calculated for any year, Easter included. Pass flags in an array, for example ['state' => 'BY', 'augsburg' => true, 'extra' => ['06-24' => 'Stadtfest']]. The regional days of each state are listed in docs/reference.md.

Flag Default Applies to
assumption true Bavaria: Assumption Day, in Catholic municipalities only. Always in Saarland.
augsburg false Bavaria: Augsburg Peace Festival, in the city of Augsburg only.
corpusChristi false Saxony and Thuringia: Corpus Christi, in some Catholic municipalities.
sundays true Brandenburg: Easter Sunday and Whit Sunday, which are statutory holidays there.

Privacy

Noren processes no visitor data. It sets no cookies, uses no browser storage and makes no request to a third party, so a site's privacy policy needs no entry for it.

Maintenance

Tests: composer test (after composer install --ignore-platform-req=ext-gd). Issues and pull requests are welcome, without a support promise. Report security problems privately through GitHub's vulnerability reporting. Changes: CHANGELOG.md.

License

MIT, see LICENSE.


All versions of kirby-noren with dependencies

PHP Build Version
Package Version
Requires php Version ^8.2
ext-mbstring Version *
getkirby/composer-installer Version ^1.2
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 sayamaapps/kirby-noren contains the following files

Loading the files please wait ...