embeddable pastes

This commit is contained in:
Claude 2012-05-01 14:55:36 +02:00
parent e94a797029
commit 46e7f0ad6a
3 changed files with 20 additions and 1 deletions

View File

@ -27,6 +27,7 @@ Changelog
* Added backup function (yoursite.com/backup; set credentials in stikked.php config)
* Added pagination to the replies table
* Embeddable pastes
* GeSHi updated to version 1.0.8.10
* Codemirror turned off by default
* Codemirror: Syntax changes dynamically with selection in language dropdown

View File

@ -44,6 +44,7 @@ $route['scaffolding_trigger'] = "";
$route['cron/:any'] = "main/cron";
$route['view/raw/:any'] = 'main/raw';
$route['view/embed/:any'] = 'main/embed';
$route['view/options'] = 'main/view_options';
$route['view/download/:any'] = 'main/download';
$route['view/:any'] = 'main/view';

View File

@ -6,6 +6,7 @@
* - _form_prep()
* - index()
* - raw()
* - embed()
* - download()
* - lists()
* - view()
@ -292,6 +293,22 @@ class Main extends CI_Controller
}
}
function embed()
{
$this->load->model('pastes');
$check = $this->pastes->checkPaste(3);
if ($check)
{
$data = $this->pastes->getPaste(3);
$this->load->view('view/embed', $data);
}
else
{
show_404();
}
}
function download()
{
$this->load->model('pastes');
@ -449,6 +466,6 @@ class Main extends CI_Controller
echo file_get_contents('./static/js/' . $js[0]);
}
}
exit;
exit;
}
}