Skip to content

Instantly share code, notes, and snippets.

@bugsysop
bugsysop / longpost.php
Last active August 29, 2015 13:56 — forked from texnixe/longpost.php
Template for Kirby CMS that splits long post into several pages
<?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);
<?php
s::start();
function panelUser() {
$cookie = cookie::get('auth');
if(!$cookie) return false;
$info = s::get($cookie);
<?php
class kirbytextExtended extends kirbytext {
function __construct($text, $markdown=true) {
parent::__construct($text, $markdown);
$this->addTags('thumb');
$this->addAttributes('crop', 'quality');
#!/usr/bin/env bash
# Usage: {script} DIRECTORY [ PREFIX ]
#
# --help, h Displays this help
#
# Report bugs to Henrique Moody <henriquemoody@gmail.com>
#
_help()
{
#!/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 <henriquemoody@gmail.com>
#
declare -r SCRIPT_NAME=$(basename ${0})
class Bootstrap_Walker_Nav_Menu extends Walker_Nav_Menu {
function start_lvl( &$output, $depth ) {
//In a child UL, add the 'dropdown-menu' class
$indent = str_repeat( "\t", $depth );
$output .= "\n$indent<ul class=\"dropdown-menu\">\n";
}
// Photoshop Script to Create iPhone Icons from iTunesArtwork
//
// WARNING!!! In the rare case that there are name collisions, this script will
// overwrite (delete permanently) files in the same folder in which the selected
// iTunesArtwork file is located. Therefore, to be safe, before running the
// script, it's best to make sure the selected iTuensArtwork file is the only
// file in its containing folder.
//
// Copyright (c) 2010 Matt Di Pasquale
// Added tweaks Copyright (c) 2012 by Josh Jones http://www.appsbynight.com
<?php # -*- coding: utf-8 -*-
/**
* Create a nav menu with very basic markup.
*
* @author Thomas Scholz http://toscho.de
* @version 1.0
*/
class T5_Nav_Menu_Walker_Simple extends Walker_Nav_Menu
{
/**
<?php
/**
* Plugin Name: T5 Preset editor post content
* Description: Default text for post content.
* Author: Thomas Scholz
* Author URI: http://toscho.de
* Version: 2012.04.17.2
*/
/*
<?php
class kirbytextExtended extends kirbytext {
function __construct($text=false, $markdown=true, $smartypants=true {
parent::__construct($text, $markdown, $smartypants);
// define custom tags
$this->addTags('figure');