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 PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> | |
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> | |
<head> | |
<title><?php echo $this->layout->placeholder('title'); ?></title> | |
<?php echo $this->layout->placeholder('meta'); ?> | |
<?php echo $this->layout->css(); ?> | |
<?php echo $this->layout->js(); ?> | |
</head> | |
<body> | |
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'); | |
class page extends CI_Model { | |
var $code = ""; | |
var $permalink = ""; | |
function __construct() | |
{ | |
parent::__construct(); | |
} |
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
<textarea id="content"></textarea> | |
<div class="clear"></div> | |
<input type="submit" /> | |
</form> |
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
$(function() { | |
$('textarea#content').tinymce({ | |
// Location of TinyMCE script | |
script_url : '/js/tiny_mce/tiny_mce.js', | |
// General options | |
theme : "advanced", | |
plugins : "pagebreak,style,layer,table,save,advhr,advimage,advlink,emotions,iespell,inlinepopups,insertdatetime,preview,media,searchreplace,print,contextmenu,paste,directionality,fullscreen,noneditable,visualchars,nonbreaking,xhtmlxtras,template", | |
// Theme options |
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 | |
function add() | |
{ | |
$this->setupLayout('Add page',array(),true); // this set's the title, navigation bar, and whether this is an admin view of frontend view | |
$this->save(); | |
} | |
function edit($id=null) | |
{ | |
$this->setupLayout('Edit page',array(),true); |
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 | |
function save($id=null) | |
{ | |
$this->title = $this->input->post('title'); | |
$this->code = $this->input->post('code'); | |
$this->permalink = $this->input->post('permalink'); | |
if ($this->input->post("id")){ // is there an id | |
$this->modified = date('Y-m-d H:i:s'); // then it's modified |
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
user: | |
has_many: comments => author | |
can_be: author, recipient | |
comment: | |
belongs_to_many: users => recipients | |
has_one: user => author |
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
class Freeza # you can define a class once | |
def hello | |
puts "hello" | |
end | |
end | |
f = Freeza.new | |
f.hello | |
class Freeza # twice |
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
@import "attributeEditController.j" | |
... | |
attribController = [[AttributeEditController alloc] initWithCibName:"attributeEditController" bundle:nil]; | |
[verticalSplitter addSubview:[attribController view]]; |
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
@import <Foundation/CPObject.j> | |
@implementation AppController : CPObject | |
{ | |
CPWindow theWindow; //this "outlet" is connected automatically by the Cib | |
IBOutlet CPButtonBar buttonBar; | |
IBOutlet CPToolbar toolBar; | |
} |