Skip to content

Instantly share code, notes, and snippets.

@fabriziomachado
fabriziomachado / default.html
Created August 5, 2011 12:34
application/views/layouts/default.php
<!DOCTYPE html>
<html lang="pt-br">
<head>
<meta charset="utf-8">
<title>{title_for_layout}</title>
{css_for_layout}
{js_for_layout}
<!--[if lt IE 8]><link rel="stylesheet" href="assets/css/blueprint/ie.css" type="text/css" media="screen, projection"><![endif]-->
</head>
<body>
@fabriziomachado
fabriziomachado / MY_Controller.php
Created August 5, 2011 12:32
application/core/MY_Controller.php
<?php
class MY_Controller extends CI_Controller
{
# public $layout = 'default';
public $title = 'Unesc - Universidade do Extremo Sul Catarinense';
public $css = array('application','libs/blueprint/screen');
public $js = array('application','libs/jquery-1.6.2.min','libs/modernizr-2.0.6');
public $data = array();
public $view = TRUE;
@fabriziomachado
fabriziomachado / Layout.php
Created August 5, 2011 12:30
application/hook/Layout.php
<?php if (!defined('BASEPATH')) exit('No direct script access allowed');
class Layout
{
public $base_url;
public function initx(){
return 'ok!';
}
/**
* Metodo que executa as implementacoes.
<a id='like_12' href='#' onclick='function(this)'>curti!</a>
<a id='like' data-speaker-id='12' href='#'>curti!</a>
$('#like').live('click', function(event){
speaker_id = $(this).attr('data-speaker_id');
sendRequest('/like',{speaker:speaker_id},
'#vote_'+speaker_id);
return false;
});