Commit 1fbcd296 by Scott

Add option for using microdata

parent 793dee91
......@@ -356,6 +356,7 @@
'smtp_port' => 25,
'sort_answers_by' => 'created',
'tags_or_categories' => 'tc',
'use_microdata' => 1,
'voting_on_as' => 1,
'voting_on_qs' => 1,
);
......
......@@ -280,6 +280,7 @@
'tags_or_categories' => 'Question classification:',
'time_approved' => 'Time approved',
'time_written' => 'Time written',
'use_microdata' => 'Use schema.org microdata:',
'votes_separated' => 'Show separate up and down votes:',
'voting_on_as' => 'Allow voting on answers:',
'voting_on_q_page_only' => 'Allow voting on question page only:',
......
......@@ -218,6 +218,7 @@
'smtp_authenticate' => 'checkbox',
'suspend_register_users' => 'checkbox',
'tag_separator_comma' => 'checkbox',
'use_microdata' => 'checkbox',
'votes_separated' => 'checkbox',
'voting_on_as' => 'checkbox',
'voting_on_q_page_only' => 'checkbox',
......@@ -382,7 +383,7 @@
}
array_push($showoptions,
'show_user_points', 'show_post_update_meta', 'show_compact_numbers', '',
'show_user_points', 'show_post_update_meta', 'show_compact_numbers', 'use_microdata', '',
'sort_answers_by', 'show_selected_first', 'page_size_q_as', 'show_a_form_immediate'
);
......
......@@ -497,8 +497,8 @@
$qa_content=array(
'content_type' => 'text/html; charset='.$charset,
'charset' => $charset,
'direction' => qa_opt('site_text_direction'),
'microdata' => qa_opt('use_microdata'),
'site_title' => qa_html(qa_opt('site_title')),
......@@ -519,9 +519,7 @@
),
'sidebar' => qa_opt('show_custom_sidebar') ? qa_opt('custom_sidebar') : null,
'sidepanel' => qa_opt('show_custom_sidepanel') ? qa_opt('custom_sidepanel') : null,
'widgets' => array(),
);
......
......@@ -51,6 +51,8 @@ class qa_html_theme_base
// whether to use new block layout in rankings (true) or fall back to tables (false)
protected $ranking_block_layout = false;
// whether schema.org microdata is being used
protected $microdata;
public function __construct($template, $content, $rooturl, $request)
......@@ -64,6 +66,8 @@ class qa_html_theme_base
$this->request = $request;
$this->isRTL = isset($content['direction']) && $content['direction'] === 'rtl';
$this->microdata = isset($content['microdata']) && $content['microdata'] == 1;
}
/**
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment