This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/usr/bin/env bash | |
| # Usage: {script} DIRECTORY | |
| # Find PHP's commented code and remove then. | |
| # | |
| # --help, -h Displays this help | |
| # | |
| # Report bugs to Henrique Moody <[email protected]> | |
| # | |
| declare -r SCRIPT_NAME=$(basename ${0}) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/usr/bin/env bash | |
| # Usage: {script} DIRECTORY [ PREFIX ] | |
| # | |
| # --help, h Displays this help | |
| # | |
| # Report bugs to Henrique Moody <[email protected]> | |
| # | |
| _help() | |
| { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| /* | |
| Kirby CMS Trimmed & lowercase parser | |
| Install: | |
| Drop this php file in your plugins folder. It's done ! | |
| Usage : | |
| <section role="main" class="<?php echo trimmed($page->title())?>"> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| class kirbytextExtended extends kirbytext { | |
| function __construct($text, $markdown=true) { | |
| parent::__construct($text, $markdown); | |
| $this->addTags('thumb'); | |
| $this->addAttributes('crop', 'quality'); | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| s::start(); | |
| function panelUser() { | |
| $cookie = cookie::get('auth'); | |
| if(!$cookie) return false; | |
| $info = s::get($cookie); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| // Source and documentation : http://www.texniq.de/en/kirby-wiki/split-long-posts-into-pages | |
| // store the content of the kirbytext text variable in $text | |
| $text = kirbytext($page->text()); | |
| // split the content of $text whenever a <!--pagebreak--> code is encountered and store in the array $pages | |
| $pages = explode('<!--pagebreak-->', $text); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| /** | |
| * Instructions: | |
| * | |
| * 1. Put this into the document root of your Kirby site | |
| * 2. Make sure to setup the base url for your site correctly | |
| * 3. Run this script with `php statify.php` or open it in your browser | |
| * 4. Upload all files and folders from static to your server | |
| * 5. Test your site |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| //If you want to remove the paragraph tags from the resulting string, uncomment the second line of the function. | |
| function getFirstPara($string){ | |
| $string = substr($string,0, strpos($string, "</p>")+4); | |
| //$string = str_replace("<p>", "", str_replace("<p/>", "", $string)); | |
| return $string; | |
| } | |
| $text = getFirstPara(kirbytext($page->text())); ?> | |
| ?> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/bash | |
| # Takes one parameter: a remote git repository URL. | |
| # | |
| # This is the stuff this script does: | |
| # | |
| # 1. Clones the repository | |
| # 2. Fetches all remote branches | |
| # 3. Compresses the folder | |
| # 4. Deletes the cloned folder. |