This file contains 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 Theme_Mytemplate extends Theme { | |
public $name = 'Mein Template'; | |
public $author = 'Mirko Düßeldorf'; | |
public $author_website = 'http://www.derduesseldorf.de'; | |
public $website = 'http://www.derduesseldorf.de'; | |
public $description = 'Mein erstes Template für PyroCMS'; | |
public $version = '1.0'; | |
This file contains 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
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta charset="UTF-8"> | |
<title>{{settings:site_name}} » {{template:title}}</title> | |
{{template:metadata}} | |
{{theme:css file="styles.css"}} | |
</head> | |
This file contains 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 | |
/** | |
* Gist Plugin | |
* | |
* Simple Plugin to fetch a gist from github | |
* | |
* usage: {{gist:get id="gistid"}} | |
* | |
* @author Mirko Düßeldorf |
This file contains 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 | |
/** | |
* Video Plugin | |
* | |
* Plugin to fetch Videos from various Sites | |
* | |
* youtube: {{video:youtube id="youtubeid"}} | |
* vimeo: {{video:vimeo id="vimeoid"}} | |
* |
This file contains 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 | |
/** | |
* | |
* Plugin to fetch a themeimage by urlsegment | |
* | |
* usage: {{image:get by="url" default="default" img-type="png"}} | |
* | |
* Attributes: |
This file contains 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 (!defined('BASEPATH')) exit('No direct script access allowed'); | |
/** | |
* Sitemap module public controller | |
* | |
* Renders a human-readable sitemap with all public pages and blog categories | |
* Also renders a machine-readable sitemap for search engines | |
* | |
* @author Barnabas Kendall <barnabas@bkendall.biz> | |
* @license Apache License v2.0 | |
* @version 1.1 |
This file contains 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 Complex { | |
/** | |
* Real | |
* @var double | |
*/ | |
private $real; |
This file contains 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
public List<T> Query<T>(string query) where T:new() | |
{ | |
List<T> res = new List<T>(); | |
MySqlCommand q = new MySqlCommand(query, this.db); | |
MySqlDataReader r = q.ExecuteReader(); | |
while (r.Read()) | |
{ | |
T t = new T(); | |
for (int inc = 0; inc < r.FieldCount; inc++) |
This file contains 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
// Normally you would calculate with css3 | |
style="width: calc((value/amount) * 100%);" | |
// With ExtJS - in order to build a native app - you have to use this workaround | |
style="width: {[(values.value/values.amount) * 100]}%;" |
This file contains 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
... | |
require 'Slim/Slim.php'; | |
require 'NotORM.php'; | |
\Slim\Slim::registerAutoloader(); | |
$app = new \Slim\Slim(); | |
$pdoDatabase = new PDO( | |
"mysql:dbname=szwebapp;host=localhost", |
OlderNewer