public function match_request( $request )
{
return strpos($request, 'blog') !== false;
}
/*
MAIN function: display the chat room, or run an AJAX request
*/
public function process_request( $request )
{
$category_1 = qa_opt('qa_blog_cat_1');
$category_2 = qa_opt('qa_blog_cat_2');
$category_3 = qa_opt('qa_blog_cat_3');
$category_4 = qa_opt('qa_blog_cat_4');
$category_5 = qa_opt('qa_blog_cat_5');
$qa_content=qa_content_prepare();
$cat = -1;
if (isset($_GET['category'])) $cat = $_GET['category'];
$qa_content['navigation']['sub'] = array();
$qa_content['navigation']['sub']['all'] = array( 'label' => qa_lang('qa_blog_lang/nav_all'),
'url' => qa_path_to_root().'/blog',
'selected' => isset($_GET['category']) ? 0 : 1);
$qa_content['navigation']['sub']['cat1'] = array('label' => $category_1,
'url' => qa_path_to_root().'/blog?category=1',
'selected' => $cat == 1 ? 1 : 0);
$qa_content['navigation']['sub']['cat2'] = array('label' => $category_2,
'url' => qa_path_to_root().'/blog?category=2',
'selected' => $cat == 2 ? 1 : 0);
$qa_content['navigation']['sub']['cat3'] = array('label' => $category_3,
'url' => qa_path_to_root().'/blog?category=3',
'selected' => $cat == 3 ? 1 : 0);
$qa_content['navigation']['sub']['cat4'] = array('label' => $category_4,
'url' => qa_path_to_root().'/blog?category=4',
'selected' => $cat == 4 ? 1 : 0);
$qa_content['navigation']['sub']['cat5'] = array('label' => $category_5,
'url' => qa_path_to_root().'/blog?category=5',
'selected' => $cat == 5 ? 1 : 0);
$qa_content['navigation']['sub']['post'] = array('label' => qa_lang('qa_blog_lang/nav_post'),
'url' => qa_path_to_root().'/articles');