Distroquery support

This commit is contained in:
Silvan Calarco 2015-04-06 20:46:06 +02:00
parent 328dcab16d
commit 9e4011e1bc
2 changed files with 26 additions and 2 deletions

View File

@ -190,12 +190,34 @@ function openmamba_webbuild_status_func() {
$urlargs = substr($_SERVER[REQUEST_URI], $urlargspos);
}
// print "<table width=\"100%\" style=\"border:0;\"><tr><td>";
print "<div id=\"noajax_msg\"><p>Il supporto per AJAX non è abilitato nel tuo browser. L'aggiornamento live non sarà disponibile, premi Ricarica per aggiornare la pagina.</p></div>";
print "<span class=webbuild id=\"output\">Caricamento in corso, attendere...</span>";
print "<div id=\"noajax_msg\"><p>AJAX support is not enabled in your browser. Live page updates will not be available, press Reload to update.</p></div>";
print "<span class=webbuild id=\"output\">Loading, please wait...</span>";
print "<script>webbuild_status_getvalues(\"" . $urlargs . "\");</script>";//</td></tr></table>";
}
add_shortcode('openmamba_webbuild_status', 'openmamba_webbuild_status_func');
function openmamba_distroquery_func() {
$urlargspos = strpos($_SERVER[REQUEST_URI], '?');
if ($urlargspos > 0) {
$urlargs = substr($_SERVER[REQUEST_URI], $urlargspos + 1);
}
$outputlang = get_bloginfo("language");
if ($outputlang == "it")
$outputlang = "it_IT.UTF-8";
else
$outputlang = "en_US.UTF-8";
print "<div id=\"noajax_msg\"><p>AJAX support is not enabled in your browser. Live page updates will not be available, press Reload to update.</p></div>";
print "<br><span id=\"queryform\"></span><br>";
print "<span id=\"querystatus\"></span><br><span id=\"queryreply\">&nbsp;</span>";
print "<script>distroquery_request(\"" . $urlargs . "\");</script>";
}
add_shortcode('openmamba_distroquery', 'openmamba_distroquery_func');
// bbpress tag cloud
add_filter('widget_tag_cloud_args','set_number_tags');
function set_number_tags($args) {

View File

@ -63,6 +63,8 @@ print '<script type="text/javascript" src="' . get_stylesheet_directory_uri() .
print '<link rel="stylesheet" type="text/css" href="' . get_stylesheet_directory_uri() . '/styles/webbuild.css">';
# socialbox
print '<script type="text/javascript" src="' . get_stylesheet_directory_uri() . '/scripts/socialbox.js"></script>';
# distroquery
print '<script type="text/javascript" src="' . get_stylesheet_directory_uri() . '/scripts/distroquery.js"></script>';
$file = fopen(get_stylesheet_directory() . "/webbuild.js.inc", "r");
print fread($file, 20000);