'Quick Post', 'url' => 'http://habariproject.org/', 'author' => 'Habari Community', 'authorurl' => 'http://habariproject.org/', 'version' => '.1', 'description' => '', 'license' => 'Apache License 2.0', ); } public function filter_rewrite_rules( $rules ) { $rules[] = new RewriteRule(array( 'name' => 'quickpost', 'parse_regex' => '/^quickpost[\/]{0,1}$/i', 'build_str' => 'quickpost', 'handler' => 'QuickpostHandler', 'action' => 'act_display_processor', 'priority' => 7, 'is_active' => 1, )); return $rules; } } class QuickpostHandler extends ActionHandler { public function act_display_processor($args) { $postdata= array( 'slug' => Utils::slugify( $args->handler_vars['title'] ), 'title' => $args->handler_vars['title'], 'tags' => $args->handler_vars['tags'], 'content' => $args->handler_vars['content'], 'user_id' => User::identify()->id, 'pubdate' => $args->handler_vars['date'], 'status' => Post::status( 'published' ), 'content_type' => 1, ); $post= Post::create( $postdata ); Utils::redirect( 'http://myintarweb.com/tracker/' . $post->slug ); } } ?>