예제 #1
0
 public function action_create()
 {
     $tp = Templateparser::parse(Input::get('sowbody'));
     $view = View::make('sowtemplates.create');
     $view->template = $tp;
     $this->layout->content = $view;
 }
예제 #2
0
 public function run()
 {
     echo "\nBYE-BYE EXISTING TEMPLATES!\n\n";
     DB::query('UPDATE `templates` set `visible` = 0');
     $template_files = scandir('_templates');
     foreach ($template_files as $tf) {
         if ($tf != "." && $tf != "..") {
             echo "Parsing " . $tf . "... ";
             $tp = Templateparser::parse(File::get('_templates/' . $tf));
             echo "'" . $tp->title . "' created.\n";
         }
     }
 }