mediatheque

This commit is contained in:
armansansd
2023-07-18 10:47:46 +01:00
commit 4b7c97a02e
3044 changed files with 544089 additions and 0 deletions
+17
View File
@@ -0,0 +1,17 @@
# v1.0.2
## 05/29/2016
1. [](#bugfix)
* Fixed links in blueprint
# v1.0.1
## 09/30/2016
1. [](#improved)
* Fixed icon
# v1.0.0
## 09/30/2016
1. [](#new)
* Initial Release
+21
View File
@@ -0,0 +1,21 @@
The MIT License (MIT)
Copyright (c) 2016 Team Grav
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
+7
View File
@@ -0,0 +1,7 @@
# Auto Date Plugin
The **Auto Date** Plugin is designed for [Grav CMS](http://github.com/getgrav/grav) and automatically adds the current date to frontmatter when createing a new page via the Admin plugin.
## Description
There's not much to this plugin, simply install it and whenever you create a new page via the admin plugin, the current date will be inserted in the frontmatter of the page and show up in the **Options** -> **Publishing** Tab. The format of the date is dependent upon the value set in `system.yaml` under `pages: dateformat: default` and if not set will use `H:i d-m-Y` as the date format.
+42
View File
@@ -0,0 +1,42 @@
<?php
namespace Grav\Plugin;
use Grav\Common\Plugin;
use RocketTheme\Toolbox\Event\Event;
/**
* Class AutoDatePlugin
* @package Grav\Plugin
*/
class AutoDatePlugin extends Plugin
{
/**
* @return array
*
* The getSubscribedEvents() gives the core a list of events
* that the plugin wants to listen to. The key of each
* array section is the event that the plugin listens to
* and the value (in the form of an array) contains the
* callable (or function) as well as the priority. The
* higher the number the higher the priority.
*/
public static function getSubscribedEvents()
{
return [
'onAdminCreatePageFrontmatter' => ['onAdminCreatePageFrontmatter', 0]
];
}
/**
* Initialize the plugin
*/
public function onAdminCreatePageFrontmatter(Event $event)
{
$header = $event['header'];
if (!isset($header['date'])) {
$header['date'] = date($this->grav['config']->get('system.pages.dateformat.default', 'H:i d-m-Y'));
$header['publish_date'] = date($this->grav['config']->get('system.pages.dateformat.default', 'H:i d-m-Y'));
$event['header'] = $header;
}
}
}
+1
View File
@@ -0,0 +1 @@
enabled: true
+30
View File
@@ -0,0 +1,30 @@
name: Auto Date
version: 1.0.2
description: Automatically adds date to frontmatter when creating a new page via Grav Admin plugin
icon: clock-o
author:
name: Team Grav
email: devs@getgrav.org
url: http://getgrav.org
homepage: https://github.com/getgrav/grav-plugin-auto-date
keywords: plugin, auto-date, date, frontmatter
bugs: https://github.com/getgrav/grav-plugin-auto-date/issues
docs: https://github.com/getgrav/grav-plugin-auto-date/blob/develop/README.md
license: MIT
dependencies:
- { name: admin, version: '>=1.2.3' }
form:
validation: strict
fields:
enabled:
type: toggle
label: Plugin status
highlight: 1
default: 0
options:
1: Enabled
0: Disabled
validate:
type: bool