Commit 59ad6e0a by Scott

Coding style (default plugins)

parent 9b5766d2
...@@ -20,93 +20,85 @@ ...@@ -20,93 +20,85 @@
More about this license: http://www.question2answer.org/license.php More about this license: http://www.question2answer.org/license.php
*/ */
class qa_basic_adsense { class qa_basic_adsense
{
public function allow_template($template) public function allow_template($template)
{ {
return ($template!='admin'); return ($template!='admin');
} }
public function allow_region($region) public function allow_region($region)
{ {
return in_array($region, array('main', 'side', 'full')); return in_array($region, array('main', 'side', 'full'));
} }
public function admin_form(&$qa_content) public function admin_form(&$qa_content)
{ {
$saved=false; $saved=false;
if (qa_clicked('adsense_save_button')) { if (qa_clicked('adsense_save_button')) {
$trimchars="=;\"\' \t\r\n"; // prevent common errors by copying and pasting from Javascript $trimchars="=;\"\' \t\r\n"; // prevent common errors by copying and pasting from Javascript
qa_opt('adsense_publisher_id', trim(qa_post_text('adsense_publisher_id_field'), $trimchars)); qa_opt('adsense_publisher_id', trim(qa_post_text('adsense_publisher_id_field'), $trimchars));
$saved=true; $saved=true;
} }
return array( return array(
'ok' => $saved ? 'AdSense settings saved' : null, 'ok' => $saved ? 'AdSense settings saved' : null,
'fields' => array( 'fields' => array(
array( array(
'label' => 'AdSense Publisher ID:', 'label' => 'AdSense Publisher ID:',
'value' => qa_html(qa_opt('adsense_publisher_id')), 'value' => qa_html(qa_opt('adsense_publisher_id')),
'tags' => 'name="adsense_publisher_id_field"', 'tags' => 'name="adsense_publisher_id_field"',
'note' => 'Example: <i>pub-1234567890123456</i>', 'note' => 'Example: <i>pub-1234567890123456</i>',
),
), ),
),
'buttons' => array( 'buttons' => array(
array( array(
'label' => 'Save Changes', 'label' => 'Save Changes',
'tags' => 'name="adsense_save_button"', 'tags' => 'name="adsense_save_button"',
),
), ),
); ),
} );
}
public function output_widget($region, $place, $themeobject, $template, $request, $qa_content) public function output_widget($region, $place, $themeobject, $template, $request, $qa_content)
{ {
$divstyle=''; $divstyle='';
switch ($region) { switch ($region) {
case 'full': // Leaderboard case 'full': // Leaderboard
$divstyle='width:728px; margin:0 auto;'; $divstyle='width:728px; margin:0 auto;';
case 'main': // Leaderboard case 'main': // Leaderboard
$width=728; $width=728;
$height=90; $height=90;
$format='728x90_as'; $format='728x90_as';
break; break;
case 'side': // Wide skyscraper case 'side': // Wide skyscraper
$width=160; $width=160;
$height=600; $height=600;
$format='160x600_as'; $format='160x600_as';
break; break;
} }
?> ?>
<div style="<?php echo $divstyle?>"> <div style="<?php echo $divstyle?>">
<script type="text/javascript"> <script type="text/javascript">
google_ad_client = <?php echo qa_js(qa_opt('adsense_publisher_id'))?>; google_ad_client = <?php echo qa_js(qa_opt('adsense_publisher_id'))?>;
google_ad_width = <?php echo qa_js($width)?>; google_ad_width = <?php echo qa_js($width)?>;
google_ad_height = <?php echo qa_js($height)?>; google_ad_height = <?php echo qa_js($height)?>;
google_ad_format = <?php echo qa_js($format)?>; google_ad_format = <?php echo qa_js($format)?>;
google_ad_type = "text_image"; google_ad_type = "text_image";
google_ad_channel = ""; google_ad_channel = "";
</script> </script>
<script type="text/javascript" <script type="text/javascript" src="http://pagead2.googlesyndication.com/pagead/show_ads.js"></script>
src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script>
</div> </div>
<?php <?php
}
} }
}
/*
Omit PHP closing tag to help avoid accidental output
*/
\ No newline at end of file
...@@ -34,15 +34,10 @@ ...@@ -34,15 +34,10 @@
*/ */
if (!defined('QA_VERSION')) { // don't allow this page to be requested directly from browser if (!defined('QA_VERSION')) { // don't allow this page to be requested directly from browser
header('Location: ../../'); header('Location: ../../');
exit; exit;
} }
qa_register_plugin_module('widget', 'qa-basic-adsense.php', 'qa_basic_adsense', 'Basic AdSense'); qa_register_plugin_module('widget', 'qa-basic-adsense.php', 'qa_basic_adsense', 'Basic AdSense');
/*
Omit PHP closing tag to help avoid accidental output
*/
\ No newline at end of file
...@@ -34,15 +34,10 @@ ...@@ -34,15 +34,10 @@
*/ */
if (!defined('QA_VERSION')) { // don't allow this page to be requested directly from browser if (!defined('QA_VERSION')) { // don't allow this page to be requested directly from browser
header('Location: ../../'); header('Location: ../../');
exit; exit;
} }
qa_register_plugin_module('event', 'qa-event-logger.php', 'qa_event_logger', 'Event Logger'); qa_register_plugin_module('event', 'qa-event-logger.php', 'qa_event_logger', 'Event Logger');
/*
Omit PHP closing tag to help avoid accidental output
*/
\ No newline at end of file
...@@ -20,11 +20,6 @@ ...@@ -20,11 +20,6 @@
More about this license: http://www.question2answer.org/license.php More about this license: http://www.question2answer.org/license.php
*/ */
return array( return array(
'page_title' => 'Example plugin page (US English)', 'page_title' => 'Example plugin page (US English)',
); );
/*
Omit PHP closing tag to help avoid accidental output
*/
\ No newline at end of file
...@@ -20,11 +20,6 @@ ...@@ -20,11 +20,6 @@
More about this license: http://www.question2answer.org/license.php More about this license: http://www.question2answer.org/license.php
*/ */
return array( return array(
'page_title' => 'Example plugin page (UK English)', 'page_title' => 'Example plugin page (UK English)',
); );
/*
Omit PHP closing tag to help avoid accidental output
*/
\ No newline at end of file
...@@ -20,85 +20,79 @@ ...@@ -20,85 +20,79 @@
More about this license: http://www.question2answer.org/license.php More about this license: http://www.question2answer.org/license.php
*/ */
class qa_example_page { class qa_example_page
{
private $directory;
private $urltoroot;
private $directory;
private $urltoroot;
public function load_module($directory, $urltoroot)
public function load_module($directory, $urltoroot) {
{ $this->directory=$directory;
$this->directory=$directory; $this->urltoroot=$urltoroot;
$this->urltoroot=$urltoroot; }
}
public function suggest_requests() // for display in admin interface public function suggest_requests() // for display in admin interface
{ {
return array( return array(
array( array(
'title' => 'Example', 'title' => 'Example',
'request' => 'example-plugin-page', 'request' => 'example-plugin-page',
'nav' => 'M', // 'M'=main, 'F'=footer, 'B'=before main, 'O'=opposite main, null=none 'nav' => 'M', // 'M'=main, 'F'=footer, 'B'=before main, 'O'=opposite main, null=none
), ),
); );
} }
public function match_request($request)
{
return $request == 'example-plugin-page';
}
public function match_request($request)
{
return $request == 'example-plugin-page';
}
public function process_request($request)
{
$qa_content=qa_content_prepare();
$qa_content['title']=qa_lang_html('example_page/page_title'); public function process_request($request)
$qa_content['error']='An example error'; {
$qa_content['custom']='Some <b>custom html</b>'; $qa_content=qa_content_prepare();
$qa_content['form']=array( $qa_content['title']=qa_lang_html('example_page/page_title');
'tags' => 'method="post" action="'.qa_self_html().'"', $qa_content['error']='An example error';
$qa_content['custom']='Some <b>custom html</b>';
'style' => 'wide', $qa_content['form']=array(
'tags' => 'method="post" action="'.qa_self_html().'"',
'ok' => qa_post_text('okthen') ? 'You clicked OK then!' : null, 'style' => 'wide',
'title' => 'Form title', 'ok' => qa_post_text('okthen') ? 'You clicked OK then!' : null,
'fields' => array( 'title' => 'Form title',
'request' => array(
'label' => 'The request',
'tags' => 'name="request"',
'value' => qa_html($request),
'error' => qa_html('Another error'),
),
'fields' => array(
'request' => array(
'label' => 'The request',
'tags' => 'name="request"',
'value' => qa_html($request),
'error' => qa_html('Another error'),
), ),
'buttons' => array( ),
'ok' => array(
'tags' => 'name="okthen"',
'label' => 'OK then',
'value' => '1',
),
),
'hidden' => array( 'buttons' => array(
'hiddenfield' => '1', 'ok' => array(
'tags' => 'name="okthen"',
'label' => 'OK then',
'value' => '1',
), ),
); ),
$qa_content['custom_2']='<p><br>More <i>custom html</i></p>'; 'hidden' => array(
'hiddenfield' => '1',
),
);
return $qa_content; $qa_content['custom_2']='<p><br>More <i>custom html</i></p>';
}
return $qa_content;
} }
}
/*
Omit PHP closing tag to help avoid accidental output
*/
\ No newline at end of file
...@@ -34,16 +34,11 @@ ...@@ -34,16 +34,11 @@
*/ */
if (!defined('QA_VERSION')) { // don't allow this page to be requested directly from browser if (!defined('QA_VERSION')) { // don't allow this page to be requested directly from browser
header('Location: ../../'); header('Location: ../../');
exit; exit;
} }
qa_register_plugin_module('page', 'qa-example-page.php', 'qa_example_page', 'Example Page'); qa_register_plugin_module('page', 'qa-example-page.php', 'qa_example_page', 'Example Page');
qa_register_plugin_phrases('qa-example-lang-*.php', 'example_page'); qa_register_plugin_phrases('qa-example-lang-*.php', 'example_page');
/*
Omit PHP closing tag to help avoid accidental output
*/
\ No newline at end of file
...@@ -20,23 +20,18 @@ ...@@ -20,23 +20,18 @@
More about this license: http://www.question2answer.org/license.php More about this license: http://www.question2answer.org/license.php
*/ */
class qa_html_theme_layer extends qa_html_theme_base { class qa_html_theme_layer extends qa_html_theme_base
{
public function head_css() public function head_css()
{ {
qa_html_theme_base::head_css(); qa_html_theme_base::head_css();
if (strlen(qa_opt('facebook_app_id')) && strlen(qa_opt('facebook_app_secret'))) if (strlen(qa_opt('facebook_app_id')) && strlen(qa_opt('facebook_app_secret'))) {
$this->output( $this->output(
'<style>', '<style>',
'.fb-login-button.fb_iframe_widget.fb_hide_iframes span {display:none;}', '.fb-login-button.fb_iframe_widget.fb_hide_iframes span {display:none;}',
'</style>' '</style>'
); );
} }
} }
}
/*
Omit PHP closing tag to help avoid accidental output
*/
\ No newline at end of file
...@@ -20,73 +20,68 @@ ...@@ -20,73 +20,68 @@
More about this license: http://www.question2answer.org/license.php More about this license: http://www.question2answer.org/license.php
*/ */
class qa_facebook_login_page { class qa_facebook_login_page
{
private $directory; private $directory;
private $urltoroot; private $urltoroot;
public function load_module($directory, $urltoroot) public function load_module($directory, $urltoroot)
{ {
$this->directory=$directory; $this->directory=$directory;
$this->urltoroot=$urltoroot; $this->urltoroot=$urltoroot;
} }
public function match_request($request) public function match_request($request)
{ {
return ($request=='facebook-login'); return ($request=='facebook-login');
} }
public function process_request($request) public function process_request($request)
{ {
if ($request=='facebook-login') { if ($request=='facebook-login') {
$app_id=qa_opt('facebook_app_id'); $app_id=qa_opt('facebook_app_id');
$app_secret=qa_opt('facebook_app_secret'); $app_secret=qa_opt('facebook_app_secret');
$tourl=qa_get('to'); $tourl=qa_get('to');
if (!strlen($tourl)) if (!strlen($tourl))
$tourl=qa_path_absolute(''); $tourl=qa_path_absolute('');
if (strlen($app_id) && strlen($app_secret)) { if (strlen($app_id) && strlen($app_secret)) {
require_once $this->directory.'facebook.php'; require_once $this->directory.'facebook.php';
$facebook = new Facebook(array( $facebook = new Facebook(array(
'appId' => $app_id, 'appId' => $app_id,
'secret' => $app_secret, 'secret' => $app_secret,
'cookie' => true, 'cookie' => true,
)); ));
$fb_userid=$facebook->getUser(); $fb_userid=$facebook->getUser();
if ($fb_userid) { if ($fb_userid) {
try { try {
$user=$facebook->api('/me?fields=email,name,verified,location,website,about,picture'); $user=$facebook->api('/me?fields=email,name,verified,location,website,about,picture');
if (is_array($user)) if (is_array($user))
qa_log_in_external_user('facebook', $fb_userid, array( qa_log_in_external_user('facebook', $fb_userid, array(
'email' => @$user['email'], 'email' => @$user['email'],
'handle' => @$user['name'], 'handle' => @$user['name'],
'confirmed' => @$user['verified'], 'confirmed' => @$user['verified'],
'name' => @$user['name'], 'name' => @$user['name'],
'location' => @$user['location']['name'], 'location' => @$user['location']['name'],
'website' => @$user['website'], 'website' => @$user['website'],
'about' => @$user['bio'], 'about' => @$user['bio'],
'avatar' => strlen(@$user['picture']['data']['url']) ? qa_retrieve_url($user['picture']['data']['url']) : null, 'avatar' => strlen(@$user['picture']['data']['url']) ? qa_retrieve_url($user['picture']['data']['url']) : null,
)); ));
} catch (FacebookApiException $e) { } catch (FacebookApiException $e) {
}
} else {
qa_redirect_raw($facebook->getLoginUrl(array('redirect_uri' => $tourl)));
} }
}
qa_redirect_raw($tourl); } else {
qa_redirect_raw($facebook->getLoginUrl(array('redirect_uri' => $tourl)));
}
} }
}
qa_redirect_raw($tourl);
}
} }
}
/*
Omit PHP closing tag to help avoid accidental output
*/
\ No newline at end of file
...@@ -20,116 +20,109 @@ ...@@ -20,116 +20,109 @@
More about this license: http://www.question2answer.org/license.php More about this license: http://www.question2answer.org/license.php
*/ */
class qa_facebook_login { class qa_facebook_login
{
public function match_source($source) public function match_source($source)
{ {
return $source=='facebook'; return $source=='facebook';
} }
public function login_html($tourl, $context) public function login_html($tourl, $context)
{ {
$app_id=qa_opt('facebook_app_id'); $app_id=qa_opt('facebook_app_id');
if (!strlen($app_id)) if (!strlen($app_id))
return; return;
$this->facebook_html(qa_path_absolute('facebook-login', array('to' => $tourl)), false, $context); $this->facebook_html(qa_path_absolute('facebook-login', array('to' => $tourl)), false, $context);
} }
public function logout_html($tourl) public function logout_html($tourl)
{ {
$app_id=qa_opt('facebook_app_id'); $app_id=qa_opt('facebook_app_id');
if (!strlen($app_id)) if (!strlen($app_id))
return; return;
$this->facebook_html($tourl, true, 'menu'); $this->facebook_html($tourl, true, 'menu');
} }
public function facebook_html($tourl, $logout, $context) public function facebook_html($tourl, $logout, $context)
{ {
if (($context=='login') || ($context=='register')) if (($context=='login') || ($context=='register'))
$size='large'; $size='large';
else else
$size='medium'; $size='medium';
?> ?>
<div id="fb-root" style="display:inline;"></div> <div id="fb-root" style="display:inline;"></div>
<script> <script>
window.fbAsyncInit = function() { window.fbAsyncInit = function() {
FB.init({ FB.init({
appId : <?php echo qa_js(qa_opt('facebook_app_id'), true)?>, appId : <?php echo qa_js(qa_opt('facebook_app_id'), true)?>,
status : true, status : true,
cookie : true, cookie : true,
xfbml : true, xfbml : true,
oauth : true oauth : true
}); });
FB.Event.subscribe('<?php echo $logout ? 'auth.logout' : 'auth.login'?>', function(response) { FB.Event.subscribe('<?php echo $logout ? 'auth.logout' : 'auth.login'?>', function(response) {
setTimeout("window.location=<?php echo qa_js($tourl)?>", 100); setTimeout("window.location=<?php echo qa_js($tourl)?>", 100);
}); });
}; };
(function(d){ (function(d){
var js, id = 'facebook-jssdk'; if (d.getElementById(id)) {return;} var js, id = 'facebook-jssdk'; if (d.getElementById(id)) {return;}
js = d.createElement('script'); js.id = id; js.async = true; js = d.createElement('script'); js.id = id; js.async = true;
js.src = "//connect.facebook.net/en_US/all.js"; js.src = "//connect.facebook.net/en_US/all.js";
d.getElementsByTagName('head')[0].appendChild(js); d.getElementsByTagName('head')[0].appendChild(js);
}(document)); }(document));
</script> </script>
<div class="fb-login-button" style="display:inline; vertical-align:middle;" size="<?php echo $size?>" <?php echo $logout ? 'autologoutlink="true"' : 'scope="email,user_about_me,user_location,user_website"'?>> <div class="fb-login-button" style="display:inline; vertical-align:middle;" size="<?php echo $size?>" <?php echo $logout ? 'autologoutlink="true"' : 'scope="email,user_about_me,user_location,user_website"'?>>
</div> </div>
<?php <?php
} }
public function admin_form()
{
$saved=false;
if (qa_clicked('facebook_save_button')) { public function admin_form()
qa_opt('facebook_app_id', qa_post_text('facebook_app_id_field')); {
qa_opt('facebook_app_secret', qa_post_text('facebook_app_secret_field')); $saved=false;
$saved=true;
}
$ready=strlen(qa_opt('facebook_app_id')) && strlen(qa_opt('facebook_app_secret')); if (qa_clicked('facebook_save_button')) {
qa_opt('facebook_app_id', qa_post_text('facebook_app_id_field'));
qa_opt('facebook_app_secret', qa_post_text('facebook_app_secret_field'));
$saved=true;
}
return array( $ready=strlen(qa_opt('facebook_app_id')) && strlen(qa_opt('facebook_app_secret'));
'ok' => $saved ? 'Facebook application details saved' : null,
'fields' => array( return array(
array( 'ok' => $saved ? 'Facebook application details saved' : null,
'label' => 'Facebook App ID:',
'value' => qa_html(qa_opt('facebook_app_id')),
'tags' => 'name="facebook_app_id_field"',
),
array( 'fields' => array(
'label' => 'Facebook App Secret:', array(
'value' => qa_html(qa_opt('facebook_app_secret')), 'label' => 'Facebook App ID:',
'tags' => 'name="facebook_app_secret_field"', 'value' => qa_html(qa_opt('facebook_app_id')),
'error' => $ready ? null : 'To use Facebook Login, please <a href="http://developers.facebook.com/setup/" target="_blank">set up a Facebook application</a>.', 'tags' => 'name="facebook_app_id_field"',
),
), ),
'buttons' => array( array(
array( 'label' => 'Facebook App Secret:',
'label' => 'Save Changes', 'value' => qa_html(qa_opt('facebook_app_secret')),
'tags' => 'name="facebook_save_button"', 'tags' => 'name="facebook_app_secret_field"',
), 'error' => $ready ? null : 'To use Facebook Login, please <a href="http://developers.facebook.com/setup/" target="_blank">set up a Facebook application</a>.',
), ),
); ),
}
'buttons' => array(
array(
'label' => 'Save Changes',
'tags' => 'name="facebook_save_button"',
),
),
);
} }
}
/*
Omit PHP closing tag to help avoid accidental output
*/
\ No newline at end of file
...@@ -35,19 +35,15 @@ ...@@ -35,19 +35,15 @@
*/ */
if (!defined('QA_VERSION')) { // don't allow this page to be requested directly from browser if (!defined('QA_VERSION')) { // don't allow this page to be requested directly from browser
header('Location: ../../'); header('Location: ../../');
exit; exit;
} }
if (!QA_FINAL_EXTERNAL_USERS) { // login modules don't work with external user integration // login modules don't work with external user integration
qa_register_plugin_module('login', 'qa-facebook-login.php', 'qa_facebook_login', 'Facebook Login'); if (!QA_FINAL_EXTERNAL_USERS) {
qa_register_plugin_module('page', 'qa-facebook-login-page.php', 'qa_facebook_login_page', 'Facebook Login Page'); qa_register_plugin_module('login', 'qa-facebook-login.php', 'qa_facebook_login', 'Facebook Login');
qa_register_plugin_layer('qa-facebook-layer.php', 'Facebook Login Layer'); qa_register_plugin_module('page', 'qa-facebook-login-page.php', 'qa_facebook_login_page', 'Facebook Login Page');
} qa_register_plugin_layer('qa-facebook-layer.php', 'Facebook Login Layer');
}
/*
Omit PHP closing tag to help avoid accidental output
*/
\ No newline at end of file
...@@ -20,61 +20,55 @@ ...@@ -20,61 +20,55 @@
More about this license: http://www.question2answer.org/license.php More about this license: http://www.question2answer.org/license.php
*/ */
class qa_mouseover_admin_form { class qa_mouseover_admin_form
{
public function option_default($option) public function option_default($option)
{ {
if ($option === 'mouseover_content_max_len') if ($option === 'mouseover_content_max_len')
return 480; return 480;
} }
public function admin_form(&$qa_content)
{
$saved = qa_clicked('mouseover_save_button');
if ($saved) { public function admin_form(&$qa_content)
qa_opt('mouseover_content_on', (int) qa_post_text('mouseover_content_on_field')); {
qa_opt('mouseover_content_max_len', (int) qa_post_text('mouseover_content_max_len_field')); $saved = qa_clicked('mouseover_save_button');
}
qa_set_display_rules($qa_content, array( if ($saved) {
'mouseover_content_max_len_display' => 'mouseover_content_on_field', qa_opt('mouseover_content_on', (int) qa_post_text('mouseover_content_on_field'));
)); qa_opt('mouseover_content_max_len', (int) qa_post_text('mouseover_content_max_len_field'));
}
return array( qa_set_display_rules($qa_content, array(
'ok' => $saved ? 'Mouseover settings saved' : null, 'mouseover_content_max_len_display' => 'mouseover_content_on_field',
));
'fields' => array( return array(
array( 'ok' => $saved ? 'Mouseover settings saved' : null,
'label' => 'Show content preview on mouseover in question lists',
'type' => 'checkbox',
'value' => qa_opt('mouseover_content_on'),
'tags' => 'name="mouseover_content_on_field" id="mouseover_content_on_field"',
),
array( 'fields' => array(
'id' => 'mouseover_content_max_len_display', array(
'label' => 'Maximum length of preview:', 'label' => 'Show content preview on mouseover in question lists',
'suffix' => 'characters', 'type' => 'checkbox',
'type' => 'number', 'value' => qa_opt('mouseover_content_on'),
'value' => (int) qa_opt('mouseover_content_max_len'), 'tags' => 'name="mouseover_content_on_field" id="mouseover_content_on_field"',
'tags' => 'name="mouseover_content_max_len_field"',
),
), ),
'buttons' => array( array(
array( 'id' => 'mouseover_content_max_len_display',
'label' => 'Save Changes', 'label' => 'Maximum length of preview:',
'tags' => 'name="mouseover_save_button"', 'suffix' => 'characters',
), 'type' => 'number',
'value' => (int) qa_opt('mouseover_content_max_len'),
'tags' => 'name="mouseover_content_max_len_field"',
), ),
); ),
}
'buttons' => array(
array(
'label' => 'Save Changes',
'tags' => 'name="mouseover_save_button"',
),
),
);
} }
}
/*
Omit PHP closing tag to help avoid accidental output
*/
\ No newline at end of file
...@@ -20,53 +20,47 @@ ...@@ -20,53 +20,47 @@
More about this license: http://www.question2answer.org/license.php More about this license: http://www.question2answer.org/license.php
*/ */
class qa_html_theme_layer extends qa_html_theme_base { class qa_html_theme_layer extends qa_html_theme_base
{
public function q_list($q_list) public function q_list($q_list)
{ {
if (!empty($q_list['qs']) && qa_opt('mouseover_content_on')) { // first check it is not an empty list and the feature is turned on if (!empty($q_list['qs']) && qa_opt('mouseover_content_on')) { // first check it is not an empty list and the feature is turned on
// Collect the question ids of all items in the question list (so we can do this in one DB query) // Collect the question ids of all items in the question list (so we can do this in one DB query)
$postids = array(); $postids = array();
foreach ($q_list['qs'] as $question) { foreach ($q_list['qs'] as $question) {
if (isset($question['raw']['postid'])) if (isset($question['raw']['postid']))
$postids[] = $question['raw']['postid']; $postids[] = $question['raw']['postid'];
} }
if (!empty($postids)) { if (!empty($postids)) {
// Retrieve the content for these questions from the database and put into an array fetching // Retrieve the content for these questions from the database and put into an array fetching
// the minimal amount of characters needed to determine the string should be shortened or not // the minimal amount of characters needed to determine the string should be shortened or not
$maxlength = qa_opt('mouseover_content_max_len'); $maxlength = qa_opt('mouseover_content_max_len');
$result = qa_db_query_sub('SELECT postid, LEFT(content, #) content, format FROM ^posts WHERE postid IN (#)', $maxlength + 1, $postids); $result = qa_db_query_sub('SELECT postid, LEFT(content, #) content, format FROM ^posts WHERE postid IN (#)', $maxlength + 1, $postids);
$postinfo = qa_db_read_all_assoc($result, 'postid'); $postinfo = qa_db_read_all_assoc($result, 'postid');
// Get the regular expression fragment to use for blocked words and the maximum length of content to show // Get the regular expression fragment to use for blocked words and the maximum length of content to show
$blockwordspreg = qa_get_block_words_preg(); $blockwordspreg = qa_get_block_words_preg();
// Now add the popup to the title for each question // Now add the popup to the title for each question
foreach ($q_list['qs'] as $index => $question) { foreach ($q_list['qs'] as $index => $question) {
if (isset($postinfo[$question['raw']['postid']])) { if (isset($postinfo[$question['raw']['postid']])) {
$thispost = $postinfo[$question['raw']['postid']]; $thispost = $postinfo[$question['raw']['postid']];
$text = qa_viewer_text($thispost['content'], $thispost['format'], array('blockwordspreg' => $blockwordspreg)); $text = qa_viewer_text($thispost['content'], $thispost['format'], array('blockwordspreg' => $blockwordspreg));
$text = qa_shorten_string_line($text, $maxlength); $text = qa_shorten_string_line($text, $maxlength);
$title = isset($question['title']) ? $question['title'] : ''; $title = isset($question['title']) ? $question['title'] : '';
$q_list['qs'][$index]['title'] = sprintf('<span title="%s">%s</span>', qa_html($text), $title); $q_list['qs'][$index]['title'] = sprintf('<span title="%s">%s</span>', qa_html($text), $title);
}
} }
} }
} }
qa_html_theme_base::q_list($q_list); // call back through to the default function
} }
qa_html_theme_base::q_list($q_list); // call back through to the default function
} }
}
/*
Omit PHP closing tag to help avoid accidental output
*/
\ No newline at end of file
...@@ -34,16 +34,11 @@ ...@@ -34,16 +34,11 @@
*/ */
if (!defined('QA_VERSION')) { // don't allow this page to be requested directly from browser if (!defined('QA_VERSION')) { // don't allow this page to be requested directly from browser
header('Location: ../../'); header('Location: ../../');
exit; exit;
} }
qa_register_plugin_layer('qa-mouseover-layer.php', 'Mouseover Layer'); qa_register_plugin_layer('qa-mouseover-layer.php', 'Mouseover Layer');
qa_register_plugin_module('module', 'qa-mouseover-admin-form.php', 'qa_mouseover_admin_form', 'Mouseover Layer'); qa_register_plugin_module('module', 'qa-mouseover-admin-form.php', 'qa_mouseover_admin_form', 'Mouseover Layer');
/*
Omit PHP closing tag to help avoid accidental output
*/
\ No newline at end of file
...@@ -20,18 +20,12 @@ ...@@ -20,18 +20,12 @@
More about this license: http://www.question2answer.org/license.php More about this license: http://www.question2answer.org/license.php
*/ */
class qa_html_theme_layer extends qa_html_theme_base { class qa_html_theme_layer extends qa_html_theme_base
{
public function head_links() public function head_links()
{ {
qa_html_theme_base::head_links(); qa_html_theme_base::head_links();
$this->output('<link rel="search" type="application/opensearchdescription+xml" title="'.qa_html(qa_opt('site_title')).'" href="'.qa_path_html('opensearch.xml').'"/>');
}
$this->output('<link rel="search" type="application/opensearchdescription+xml" title="'.qa_html(qa_opt('site_title')).'" href="'.qa_path_html('opensearch.xml').'"/>');
} }
}
/*
Omit PHP closing tag to help avoid accidental output
*/
\ No newline at end of file
...@@ -20,38 +20,32 @@ ...@@ -20,38 +20,32 @@
More about this license: http://www.question2answer.org/license.php More about this license: http://www.question2answer.org/license.php
*/ */
class qa_opensearch_xml { class qa_opensearch_xml
{
public function match_request($request) public function match_request($request)
{ {
return ($request=='opensearch.xml'); return ($request=='opensearch.xml');
} }
public function process_request($request)
{
@ini_set('display_errors', 0); // we don't want to show PHP errors inside XML
$titlexml=qa_xml(qa_opt('site_title')); public function process_request($request)
$template=str_replace('_searchTerms_placeholder_', '{searchTerms}', qa_path_absolute('search', array('q' => '_searchTerms_placeholder_'))); {
@ini_set('display_errors', 0); // we don't want to show PHP errors inside XML
header('Content-type: text/xml; charset=utf-8'); $titlexml=qa_xml(qa_opt('site_title'));
$template=str_replace('_searchTerms_placeholder_', '{searchTerms}', qa_path_absolute('search', array('q' => '_searchTerms_placeholder_')));
echo '<?xml version="1.0" encoding="UTF-8"?>'."\n"; header('Content-type: text/xml; charset=utf-8');
echo '<OpenSearchDescription xmlns="http://a9.com/-/spec/opensearch/1.1/" xmlns:moz="http://www.mozilla.org/2006/browser/search/">'."\n";
echo "\t<ShortName>".$titlexml."</ShortName>\n"; echo '<?xml version="1.0" encoding="UTF-8"?>'."\n";
echo "\t<Description>".qa_xml(qa_lang('main/search_button')).' '.$titlexml."</Description>\n"; echo '<OpenSearchDescription xmlns="http://a9.com/-/spec/opensearch/1.1/" xmlns:moz="http://www.mozilla.org/2006/browser/search/">'."\n";
echo "\t".'<Url type="text/html" method="get" template="'.qa_xml($template).'"/>'."\n";
echo "\t<InputEncoding>UTF-8</InputEncoding>\n";
echo '</OpenSearchDescription>'."\n"; echo "\t<ShortName>".$titlexml."</ShortName>\n";
echo "\t<Description>".qa_xml(qa_lang('main/search_button')).' '.$titlexml."</Description>\n";
echo "\t".'<Url type="text/html" method="get" template="'.qa_xml($template).'"/>'."\n";
echo "\t<InputEncoding>UTF-8</InputEncoding>\n";
return null; echo '</OpenSearchDescription>'."\n";
}
return null;
} }
}
/*
Omit PHP closing tag to help avoid accidental output
*/
\ No newline at end of file
...@@ -34,16 +34,11 @@ ...@@ -34,16 +34,11 @@
*/ */
if (!defined('QA_VERSION')) { // don't allow this page to be requested directly from browser if (!defined('QA_VERSION')) { // don't allow this page to be requested directly from browser
header('Location: ../../'); header('Location: ../../');
exit; exit;
} }
qa_register_plugin_layer('qa-opensearch-layer.php', 'OpenSearch Layer'); qa_register_plugin_layer('qa-opensearch-layer.php', 'OpenSearch Layer');
qa_register_plugin_module('page', 'qa-opensearch-page.php', 'qa_opensearch_xml', 'OpenSearch XML'); qa_register_plugin_module('page', 'qa-opensearch-page.php', 'qa_opensearch_xml', 'OpenSearch XML');
/*
Omit PHP closing tag to help avoid accidental output
*/
\ No newline at end of file
...@@ -34,15 +34,10 @@ ...@@ -34,15 +34,10 @@
*/ */
if (!defined('QA_VERSION')) { // don't allow this page to be requested directly from browser if (!defined('QA_VERSION')) { // don't allow this page to be requested directly from browser
header('Location: ../../'); header('Location: ../../');
exit; exit;
} }
qa_register_plugin_module('captcha', 'qa-recaptcha-captcha.php', 'qa_recaptcha_captcha', 'reCAPTCHA'); qa_register_plugin_module('captcha', 'qa-recaptcha-captcha.php', 'qa_recaptcha_captcha', 'reCAPTCHA');
/*
Omit PHP closing tag to help avoid accidental output
*/
\ No newline at end of file
...@@ -20,129 +20,117 @@ ...@@ -20,129 +20,117 @@
More about this license: http://www.question2answer.org/license.php More about this license: http://www.question2answer.org/license.php
*/ */
if (!defined('QA_VERSION')) { // don't allow this page to be requested directly from browser class qa_recaptcha_captcha
header('Location: ../'); {
exit; private $directory;
public function load_module($directory, $urltoroot)
{
$this->directory=$directory;
} }
class qa_recaptcha_captcha { public function admin_form()
{
$saved=false;
private $directory; if (qa_clicked('recaptcha_save_button')) {
qa_opt('recaptcha_public_key', qa_post_text('recaptcha_public_key_field'));
qa_opt('recaptcha_private_key', qa_post_text('recaptcha_private_key_field'));
public function load_module($directory, $urltoroot) $saved=true;
{
$this->directory=$directory;
} }
$form=array(
'ok' => $saved ? 'reCAPTCHA settings saved' : null,
public function admin_form() 'fields' => array(
{ 'public' => array(
$saved=false; 'label' => 'reCAPTCHA public key:',
'value' => qa_opt('recaptcha_public_key'),
if (qa_clicked('recaptcha_save_button')) { 'tags' => 'name="recaptcha_public_key_field"',
qa_opt('recaptcha_public_key', qa_post_text('recaptcha_public_key_field'));
qa_opt('recaptcha_private_key', qa_post_text('recaptcha_private_key_field'));
$saved=true;
}
$form=array(
'ok' => $saved ? 'reCAPTCHA settings saved' : null,
'fields' => array(
'public' => array(
'label' => 'reCAPTCHA public key:',
'value' => qa_opt('recaptcha_public_key'),
'tags' => 'name="recaptcha_public_key_field"',
),
'private' => array(
'label' => 'reCAPTCHA private key:',
'value' => qa_opt('recaptcha_private_key'),
'tags' => 'name="recaptcha_private_key_field"',
'error' => $this->recaptcha_error_html(),
),
), ),
'buttons' => array( 'private' => array(
array( 'label' => 'reCAPTCHA private key:',
'label' => 'Save Changes', 'value' => qa_opt('recaptcha_private_key'),
'tags' => 'name="recaptcha_save_button"', 'tags' => 'name="recaptcha_private_key_field"',
), 'error' => $this->recaptcha_error_html(),
), ),
); ),
return $form; 'buttons' => array(
} array(
'label' => 'Save Changes',
'tags' => 'name="recaptcha_save_button"',
),
),
);
return $form;
}
public function recaptcha_error_html()
{
if (!function_exists('fsockopen'))
return 'To use reCAPTCHA, the fsockopen() PHP function must be enabled on your server. Please check with your system administrator.';
elseif ( (!strlen(trim(qa_opt('recaptcha_public_key')))) || (!strlen(trim(qa_opt('recaptcha_private_key')))) ) { public function recaptcha_error_html()
require_once $this->directory.'recaptchalib.php'; {
if (!function_exists('fsockopen'))
return 'To use reCAPTCHA, the fsockopen() PHP function must be enabled on your server. Please check with your system administrator.';
$url=recaptcha_get_signup_url(@$_SERVER['HTTP_HOST'], qa_opt('site_title')); elseif ( (!strlen(trim(qa_opt('recaptcha_public_key')))) || (!strlen(trim(qa_opt('recaptcha_private_key')))) ) {
require_once $this->directory.'recaptchalib.php';
return 'To use reCAPTCHA, you must <a href="'.qa_html($url).'">sign up</a> to get these keys.'; $url=recaptcha_get_signup_url(@$_SERVER['HTTP_HOST'], qa_opt('site_title'));
}
return null; return 'To use reCAPTCHA, you must <a href="'.qa_html($url).'">sign up</a> to get these keys.';
} }
return null;
}
public function allow_captcha()
{
return function_exists('fsockopen') && strlen(trim(qa_opt('recaptcha_public_key'))) && strlen(trim(qa_opt('recaptcha_private_key')));
}
public function allow_captcha()
{
return function_exists('fsockopen') && strlen(trim(qa_opt('recaptcha_public_key'))) && strlen(trim(qa_opt('recaptcha_private_key')));
}
public function form_html(&$qa_content, $error)
{
require_once $this->directory.'recaptchalib.php';
$language=qa_opt('site_language'); public function form_html(&$qa_content, $error)
if (strpos('|en|nl|fr|de|pt|ru|es|tr|', '|'.$language.'|')===false) // supported as of 3/2010 {
$language='en'; require_once $this->directory.'recaptchalib.php';
$qa_content['script_lines'][]=array( $language=qa_opt('site_language');
"var RecaptchaOptions={", if (strpos('|en|nl|fr|de|pt|ru|es|tr|', '|'.$language.'|')===false) // supported as of 3/2010
"\ttheme:'white',", $language='en';
"\tlang:".qa_js($language),
"};",
);
return recaptcha_get_html(qa_opt('recaptcha_public_key'), $error, qa_is_https_probably()); $qa_content['script_lines'][]=array(
} "var RecaptchaOptions={",
"\ttheme:'white',",
"\tlang:".qa_js($language),
"};",
);
return recaptcha_get_html(qa_opt('recaptcha_public_key'), $error, qa_is_https_probably());
}
public function validate_post(&$error)
{
if ( (!empty($_POST['recaptcha_challenge_field'])) && (!empty($_POST['recaptcha_response_field'])) ) {
require_once $this->directory.'recaptchalib.php';
$answer=recaptcha_check_answer( public function validate_post(&$error)
qa_opt('recaptcha_private_key'), {
qa_remote_ip_address(), if ( (!empty($_POST['recaptcha_challenge_field'])) && (!empty($_POST['recaptcha_response_field'])) ) {
$_POST['recaptcha_challenge_field'], require_once $this->directory.'recaptchalib.php';
$_POST['recaptcha_response_field']
);
if ($answer->is_valid) $answer=recaptcha_check_answer(
return true; qa_opt('recaptcha_private_key'),
qa_remote_ip_address(),
$_POST['recaptcha_challenge_field'],
$_POST['recaptcha_response_field']
);
$error=@$answer->error; if ($answer->is_valid)
} return true;
return false; $error=@$answer->error;
} }
return false;
} }
}
/*
Omit PHP closing tag to help avoid accidental output
*/
\ No newline at end of file
...@@ -34,15 +34,10 @@ ...@@ -34,15 +34,10 @@
*/ */
if (!defined('QA_VERSION')) { // don't allow this page to be requested directly from browser if (!defined('QA_VERSION')) { // don't allow this page to be requested directly from browser
header('Location: ../../'); header('Location: ../../');
exit; exit;
} }
qa_register_plugin_module('widget', 'qa-tag-cloud.php', 'qa_tag_cloud', 'Tag Cloud'); qa_register_plugin_module('widget', 'qa-tag-cloud.php', 'qa_tag_cloud', 'Tag Cloud');
/*
Omit PHP closing tag to help avoid accidental output
*/
\ No newline at end of file
...@@ -20,131 +20,125 @@ ...@@ -20,131 +20,125 @@
More about this license: http://www.question2answer.org/license.php More about this license: http://www.question2answer.org/license.php
*/ */
class qa_tag_cloud { class qa_tag_cloud
{
public function option_default($option) public function option_default($option)
{ {
if ($option === 'tag_cloud_count_tags') if ($option === 'tag_cloud_count_tags')
return 100; return 100;
if ($option === 'tag_cloud_font_size') if ($option === 'tag_cloud_font_size')
return 24; return 24;
if ($option === 'tag_cloud_minimal_font_size') if ($option === 'tag_cloud_minimal_font_size')
return 8; return 8;
if ($option === 'tag_cloud_size_popular') if ($option === 'tag_cloud_size_popular')
return true; return true;
}
public function admin_form()
{
$saved = qa_clicked('tag_cloud_save_button');
if ($saved) {
qa_opt('tag_cloud_count_tags', (int) qa_post_text('tag_cloud_count_tags_field'));
qa_opt('tag_cloud_font_size', (int) qa_post_text('tag_cloud_font_size_field'));
qa_opt('tag_cloud_minimal_font_size', (int) qa_post_text('tag_cloud_minimal_font_size_field'));
qa_opt('tag_cloud_size_popular', (int) qa_post_text('tag_cloud_size_popular_field'));
} }
return array(
'ok' => $saved ? 'Tag cloud settings saved' : null,
public function admin_form() 'fields' => array(
{ array(
$saved = qa_clicked('tag_cloud_save_button'); 'label' => 'Maximum tags to show:',
'type' => 'number',
'value' => (int) qa_opt('tag_cloud_count_tags'),
'suffix' => 'tags',
'tags' => 'name="tag_cloud_count_tags_field"',
),
if ($saved) { array(
qa_opt('tag_cloud_count_tags', (int) qa_post_text('tag_cloud_count_tags_field')); 'label' => 'Biggest font size:',
qa_opt('tag_cloud_font_size', (int) qa_post_text('tag_cloud_font_size_field')); 'suffix' => 'pixels',
qa_opt('tag_cloud_minimal_font_size', (int) qa_post_text('tag_cloud_minimal_font_size_field')); 'type' => 'number',
qa_opt('tag_cloud_size_popular', (int) qa_post_text('tag_cloud_size_popular_field')); 'value' => (int) qa_opt('tag_cloud_font_size'),
} 'tags' => 'name="tag_cloud_font_size_field"',
),
return array( array(
'ok' => $saved ? 'Tag cloud settings saved' : null, 'label' => 'Smallest allowed font size:',
'suffix' => 'pixels',
'fields' => array( 'type' => 'number',
array( 'value' => (int) qa_opt('tag_cloud_minimal_font_size'),
'label' => 'Maximum tags to show:', 'tags' => 'name="tag_cloud_minimal_font_size_field"',
'type' => 'number',
'value' => (int) qa_opt('tag_cloud_count_tags'),
'suffix' => 'tags',
'tags' => 'name="tag_cloud_count_tags_field"',
),
array(
'label' => 'Biggest font size:',
'suffix' => 'pixels',
'type' => 'number',
'value' => (int) qa_opt('tag_cloud_font_size'),
'tags' => 'name="tag_cloud_font_size_field"',
),
array(
'label' => 'Smallest allowed font size:',
'suffix' => 'pixels',
'type' => 'number',
'value' => (int) qa_opt('tag_cloud_minimal_font_size'),
'tags' => 'name="tag_cloud_minimal_font_size_field"',
),
array(
'label' => 'Font size represents tag popularity',
'type' => 'checkbox',
'value' => qa_opt('tag_cloud_size_popular'),
'tags' => 'name="tag_cloud_size_popular_field"',
),
), ),
'buttons' => array( array(
array( 'label' => 'Font size represents tag popularity',
'label' => 'Save Changes', 'type' => 'checkbox',
'tags' => 'name="tag_cloud_save_button"', 'value' => qa_opt('tag_cloud_size_popular'),
), 'tags' => 'name="tag_cloud_size_popular_field"',
), ),
); ),
}
'buttons' => array(
array(
'label' => 'Save Changes',
'tags' => 'name="tag_cloud_save_button"',
),
),
);
}
public function allow_template($template)
{
$allowed = array(
'activity', 'qa', 'questions', 'hot', 'ask', 'categories', 'question',
'tag', 'tags', 'unanswered', 'user', 'users', 'search', 'admin', 'custom',
);
return in_array($template, $allowed);
}
public function allow_template($template)
{
$allowed = array(
'activity', 'qa', 'questions', 'hot', 'ask', 'categories', 'question',
'tag', 'tags', 'unanswered', 'user', 'users', 'search', 'admin', 'custom',
);
return in_array($template, $allowed);
}
public function allow_region($region)
{
return ($region === 'side');
}
public function allow_region($region)
{
return ($region === 'side');
}
public function output_widget($region, $place, $themeobject, $template, $request, $qa_content)
{
require_once QA_INCLUDE_DIR . 'db/selects.php';
$populartags = qa_db_single_select(qa_db_popular_tags_selectspec(0, (int) qa_opt('tag_cloud_count_tags'))); public function output_widget($region, $place, $themeobject, $template, $request, $qa_content)
{
require_once QA_INCLUDE_DIR . 'db/selects.php';
$maxcount = reset($populartags); $populartags = qa_db_single_select(qa_db_popular_tags_selectspec(0, (int) qa_opt('tag_cloud_count_tags')));
$themeobject->output(sprintf('<h2 style="margin-top: 0; padding-top: 0;">%s</h2>', qa_lang_html('main/popular_tags'))); $maxcount = reset($populartags);
$themeobject->output('<div style="font-size: 10px;">'); $themeobject->output(sprintf('<h2 style="margin-top: 0; padding-top: 0;">%s</h2>', qa_lang_html('main/popular_tags')));
$maxsize = qa_opt('tag_cloud_font_size'); $themeobject->output('<div style="font-size: 10px;">');
$minsize = qa_opt('tag_cloud_minimal_font_size');
$scale = qa_opt('tag_cloud_size_popular');
$blockwordspreg = qa_get_block_words_preg();
foreach ($populartags as $tag => $count) { $maxsize = qa_opt('tag_cloud_font_size');
$matches = qa_block_words_match_all($tag, $blockwordspreg); $minsize = qa_opt('tag_cloud_minimal_font_size');
if (empty($matches)) { $scale = qa_opt('tag_cloud_size_popular');
if ($scale) { $blockwordspreg = qa_get_block_words_preg();
$size = number_format($maxsize * $count / $maxcount, 1);
if ($size < $minsize)
$size = $minsize;
} else
$size = $maxsize;
$themeobject->output(sprintf('<a href="%s" style="font-size: %dpx; vertical-align: baseline;">%s</a>', qa_path_html('tag/' . $tag), $size, qa_html($tag))); foreach ($populartags as $tag => $count) {
} $matches = qa_block_words_match_all($tag, $blockwordspreg);
} if (empty($matches)) {
if ($scale) {
$size = number_format($maxsize * $count / $maxcount, 1);
if ($size < $minsize)
$size = $minsize;
} else
$size = $maxsize;
$themeobject->output('</div>'); $themeobject->output(sprintf('<a href="%s" style="font-size: %dpx; vertical-align: baseline;">%s</a>', qa_path_html('tag/' . $tag), $size, qa_html($tag)));
}
} }
$themeobject->output('</div>');
} }
}
/*
Omit PHP closing tag to help avoid accidental output
*/
\ No newline at end of file
...@@ -34,16 +34,11 @@ ...@@ -34,16 +34,11 @@
*/ */
if (!defined('QA_VERSION')) { // don't allow this page to be requested directly from browser if (!defined('QA_VERSION')) { // don't allow this page to be requested directly from browser
header('Location: ../../'); header('Location: ../../');
exit; exit;
} }
qa_register_plugin_module('editor', 'qa-wysiwyg-editor.php', 'qa_wysiwyg_editor', 'WYSIWYG Editor'); qa_register_plugin_module('editor', 'qa-wysiwyg-editor.php', 'qa_wysiwyg_editor', 'WYSIWYG Editor');
qa_register_plugin_module('page', 'qa-wysiwyg-upload.php', 'qa_wysiwyg_upload', 'WYSIWYG Upload'); qa_register_plugin_module('page', 'qa-wysiwyg-upload.php', 'qa_wysiwyg_upload', 'WYSIWYG Upload');
/*
Omit PHP closing tag to help avoid accidental output
*/
\ No newline at end of file
...@@ -245,8 +245,3 @@ class qa_wysiwyg_editor ...@@ -245,8 +245,3 @@ class qa_wysiwyg_editor
return qa_html(number_format($bytes/1048576, 1)); return qa_html(number_format($bytes/1048576, 1));
} }
} }
/*
Omit PHP closing tag to help avoid accidental output
*/
\ No newline at end of file
...@@ -56,8 +56,3 @@ class qa_wysiwyg_upload ...@@ -56,8 +56,3 @@ class qa_wysiwyg_upload
return null; return null;
} }
} }
/*
Omit PHP closing tag to help avoid accidental output
*/
\ No newline at end of file
...@@ -34,15 +34,10 @@ ...@@ -34,15 +34,10 @@
*/ */
if (!defined('QA_VERSION')) { // don't allow this page to be requested directly from browser if (!defined('QA_VERSION')) { // don't allow this page to be requested directly from browser
header('Location: ../../'); header('Location: ../../');
exit; exit;
} }
qa_register_plugin_module('page', 'qa-xml-sitemap.php', 'qa_xml_sitemap', 'XML Sitemap'); qa_register_plugin_module('page', 'qa-xml-sitemap.php', 'qa_xml_sitemap', 'XML Sitemap');
/*
Omit PHP closing tag to help avoid accidental output
*/
\ No newline at end of file
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