Skip to content

Instantly share code, notes, and snippets.

<?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');
@bugsysop
bugsysop / trimmed.php
Created December 7, 2013 17:30
Kirby CMS Trimmed & lowercase parser
<?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())?>">
#!/usr/bin/env bash
# Usage: {script} DIRECTORY [ PREFIX ]
#
# --help, h Displays this help
#
# Report bugs to Henrique Moody <[email protected]>
#
_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 <[email protected]>
#
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');