Download the PHP package sayamaapps/kirby-higawari without Composer

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

Higawari

Daily menu for Kirby CMS 5. Higawari (日替わり) is Japanese for "changes every day": a menu of dishes, each menu valid on a date you set, shown on that day and nothing else.

Code, comments and this README are in English. The Panel texts and the snippet texts are in German and English.

Requirements

Installation

Composer installs the plugin into site/plugins/higawari/. Until the package is on Packagist, add the repository first:

Off by default. Switch it on in site/config/config.php:

Configuration

All options are read as sayamaapps.higawari.<name>, flat or nested. null counts as "not set". A broken value is reported to the PHP error log once and the default is used; with Kirby's debug option on, it throws instead.

Option Default Meaning
active false Master switch. Only a real true switches it on.
days 1 How many days a menu is shown, counted from its date: 1 is the day itself, 3 is the date and the two days after. From 1 to 366. Only in mode from; mode until ignores it.
dateMode from What the date means, see Two date modes. from: the first day, shown for days days. until: the last day ("Anzeigen bis"). Any other value is reported and from is used.
timezone Europe/Berlin The zone in which "today" is decided.
currency € Shown after a price, with a space: 7,50 €. An empty string shows bare numbers: 7,50.
emptyText null Shown in place of the menu when none is valid. null shows nothing.
note null A line under the dishes, for example about prices or allergens.
language site language de or en, for the snippet and Panel texts. Otherwise the default language, then the first two letters of locale, then English.

Content field contract

The Panel tab writes two fields. Their names are a compatibility promise: sites that already store these field names keep working unchanged, so their content needs no migration.

Field Type Meaning
tageskarteDatum date "Gilt am", in mode until "Anzeigen bis": the day the menu is valid on, or with dateMode until the last day it is shown. Empty: nothing is shown.
tagesgerichte structure, max. 5 The dishes (see below).

Dish fields:

Field Type Meaning
gericht text, required, max. 160 The dish.
beschreibung textarea, max. 300 Further lines, one per line break.
preis number, 0 to 999, step 0.01 Optional. Empty shows the dish without a price.
kennzeichnungen text, max. 40 Optional markers, shown as written.

Reading rules, the same for the Panel content and imported data: a dish without a name is dropped; a price that cannot be read (abc, 1000, 12.345) drops the dish rather than showing a wrong amount; a decimal comma and a decimal point both work; at most five dishes are shown, in order.

Two date modes

Switching the mode changes the meaning of the stored date, not the content: a site that moves from from to until has to re-enter the dates that should now mean "until".

Why these fields

Left out on purpose

Blueprints

Add the tab to a page blueprint with extends:

Pieces for your own blueprints: higawari/tabs/daily-menu (the tab), higawari/fields/date and higawari/fields/dishes. The tab and the date show the texts of the configured dateMode, so the same blueprint works in both modes.

Snippet

Markup, with classes only and no inline style:

With dateMode until, the line reads Bis einschließlich Samstag, 10.10.2026 (English: Until Saturday, 10 October 2026), and its datetime is the last day.

With nothing valid, the snippet prints nothing, or only <p class="higawari-leer"> with the emptyText option. Every value is escaped. The page is never cached by Kirby, because the menu depends on the clock. To change the markup, create site/snippets/higawari.php; Kirby uses it instead.

No CSS is shipped. The classes are the hooks for your own stylesheet.

Page method

Clearing

CLEARED empties both fields together. Keeping the date would hide a menu entered the next day, because the old date has already passed.

Fude

The dishes field carries a fude: marker, so a site with Fude 1.4 or later gets the menu as a chat collection without a line in site/config/fude.php: a bot may replace the whole menu, update or delete a dish (at most five), and every change sets tageskarteDatum. That is today, unless the chat names another day ("the menu for tomorrow"); the marker sets editable, Fude refuses a past day. The bot learns what the date means from the field's label and help text. The marker sets readImages, so the chat side may read a photo of the blackboard as the new menu; the dishes on it still arrive as a draft that someone confirms. touch stamps the day in Fude's fude.timezone (default Europe/Berlin). Without Fude, Kirby ignores the marker.

Dish
Required gericht
Asked — (the menu comes as one message or a photo; asking every day would slow it down)
Free beschreibung, preis, kennzeichnungen

Privacy

Higawari processes no visitor data: it sets no cookies, uses no browser storage and makes no request to a third party. There is nothing to add to a site's privacy policy.

Development

Every tests/*Test.php is a standalone script: exit code 0 means pass, so the suite also runs on a hoster's PHP without a test framework. MenuTest and I18nTest need no Kirby; KirbyTest and BlueprintsTest boot a real Kirby 5 on a throwaway site and need no network connection. CI runs them on PHP 8.2 to 8.4.

Changelog

See CHANGELOG.md.

License

MIT, see LICENSE.


All versions of kirby-higawari 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-higawari contains the following files

Loading the files please wait ...