[GIT] setup initial configuration
This commit is contained in:
commit
46b0df0faf
32 changed files with 10188 additions and 0 deletions
0
site/cache/.gitkeep
vendored
Normal file
0
site/cache/.gitkeep
vendored
Normal file
1
site/plugins/columns
Symbolic link
1
site/plugins/columns
Symbolic link
|
|
@ -0,0 +1 @@
|
|||
../../modules/getkirby-plugins/columns
|
||||
1
site/plugins/kirbytextraw
Symbolic link
1
site/plugins/kirbytextraw
Symbolic link
|
|
@ -0,0 +1 @@
|
|||
../../modules/kirby-plugin-kirbytextRaw
|
||||
1
site/plugins/piwik/.gitignore
vendored
Executable file
1
site/plugins/piwik/.gitignore
vendored
Executable file
|
|
@ -0,0 +1 @@
|
|||
.idea
|
||||
33
site/plugins/piwik/Readme.md
Executable file
33
site/plugins/piwik/Readme.md
Executable file
|
|
@ -0,0 +1,33 @@
|
|||
# Piwik plugin
|
||||
|
||||
A plugin for [Kirby CMS](http://getkirby.com) that generates piwik analytics code to use in your templates.
|
||||
|
||||
## Installation
|
||||
|
||||
Put the `piwik` folder in `/site/plugins`.
|
||||
|
||||
Configure piwik URL and site id in your page config.
|
||||
|
||||
### Config Variables
|
||||
|
||||
- spicy.piwik.active: true / false (Default: true)
|
||||
- spicy.piwik.url: 'stats.yourpage.com'
|
||||
- spicy.piwik.id: 1 (replace with the page ID in your piwik installation)
|
||||
|
||||
## How to use it
|
||||
|
||||
You can use this in a template file.
|
||||
|
||||
## Example usage
|
||||
|
||||
### Snippets
|
||||
|
||||
```php
|
||||
<!-- use this right before closing </body> tag -->
|
||||
<?php echo piwik(); ?>
|
||||
```
|
||||
|
||||
## Author
|
||||
|
||||
Michael Fürmann @ Spicy Web
|
||||
<https://spicyweb.de>
|
||||
18
site/plugins/piwik/piwik.php
Executable file
18
site/plugins/piwik/piwik.php
Executable file
|
|
@ -0,0 +1,18 @@
|
|||
<?php
|
||||
|
||||
/**
|
||||
* Piwik Plugin
|
||||
*
|
||||
* @author Michael Fürmann <michael@spicyweb.de>
|
||||
* @version 1.0.0
|
||||
*/
|
||||
|
||||
function piwik($options = array()) {
|
||||
if(!c::get('spicy.piwik.active', true) || !c::get('spicy.piwik.url') || !c::get('spicy.piwik.id'))
|
||||
return;
|
||||
$options['url'] = c::get('spicy.piwik.url');
|
||||
$options['id'] = c::get('spicy.piwik.id');
|
||||
// Return template HTML
|
||||
return tpl::load(__DIR__ . DS . 'template.php', $options);
|
||||
}
|
||||
?>
|
||||
15
site/plugins/piwik/template.php
Executable file
15
site/plugins/piwik/template.php
Executable file
|
|
@ -0,0 +1,15 @@
|
|||
<!-- Piwik -->
|
||||
<script type="text/javascript">
|
||||
var _paq = _paq || [];
|
||||
_paq.push(['trackPageView']);
|
||||
_paq.push(['enableLinkTracking']);
|
||||
(function() {
|
||||
var u="<?= $url?>/";
|
||||
_paq.push(['setTrackerUrl', u+'piwik.php']);
|
||||
_paq.push(['setSiteId', <?= $id?>]);
|
||||
var d=document, g=d.createElement('script'), s=d.getElementsByTagName('script')[0];
|
||||
g.type='text/javascript'; g.async=true; g.defer=true; g.src=u+'piwik.js'; s.parentNode.insertBefore(g,s);
|
||||
})();
|
||||
</script>
|
||||
<noscript><p><img src="<?= $url?>/piwik.php?idsite=<?= $id?>" style="border:0;" alt="" /></p></noscript>
|
||||
<!-- End Piwik Code -->
|
||||
1
site/plugins/thumbext
Symbolic link
1
site/plugins/thumbext
Symbolic link
|
|
@ -0,0 +1 @@
|
|||
../../modules/kirby-plugin-thumbExt
|
||||
1
site/tags/html5video.php
Symbolic link
1
site/tags/html5video.php
Symbolic link
|
|
@ -0,0 +1 @@
|
|||
../../modules/kirby-kirbytag-html5video/html5video.php
|
||||
29
site/tags/html5youtube.php
Normal file
29
site/tags/html5youtube.php
Normal file
|
|
@ -0,0 +1,29 @@
|
|||
<?php
|
||||
/*
|
||||
* kirbytag html5youtube
|
||||
* responsive html5 youtube player embedding
|
||||
*
|
||||
* copyright: Jannik Beyerstedt | http://jannikbeyerstedt.de | code@jannikbeyerstedt.de
|
||||
* license: http://www.gnu.org/licenses/gpl-3.0.txt GPLv3 License
|
||||
*
|
||||
* version 2.0.1 (09.01.2015)
|
||||
* changelog:
|
||||
* - v2.0: kirby 2 support
|
||||
* - v2.0.1: fix some html validation issues with & symbols
|
||||
*/
|
||||
|
||||
kirbytext::$tags['html5youtube'] = array(
|
||||
'attr' => array(
|
||||
'options'
|
||||
),
|
||||
'html' => function($tag) {
|
||||
$base = 'https://www.youtube-nocookie.com/embed/';
|
||||
$end = '?rel=0&html5=1';
|
||||
|
||||
$videoID = $tag->attr('html5youtube');
|
||||
$options = $tag->attr('options');
|
||||
|
||||
return '<div class="video-container"><iframe src="' . $base . $videoID . $end . $options . '" allowfullscreen></iframe></div>';
|
||||
}
|
||||
|
||||
);
|
||||
1
site/widgets/gitupdate
Symbolic link
1
site/widgets/gitupdate
Symbolic link
|
|
@ -0,0 +1 @@
|
|||
../../modules/kirby-widget-gitupdate
|
||||
Loading…
Add table
Add a link
Reference in a new issue