wdgt
H ! -
u
off
0.4
Resources/about.png
[ HANA-WP-STAT 0.4 ]
170
93
http://www.neox.net/w/2007/05/02/hana-wp-stat/
Arial Bold
14
#000000
you need wordpress + hana-xml-stat plugin
190
50
http://www.neox.net/w/2007/05/01/hana-xml-stat/
Arial
12
#000000
main_window
HANA-WP-STAT
120
300
true
true
var items = new Array();
items[0] = new MenuItem();
items[0].title = "Update Stat Now";
items[0].enabled = true;
items[0].checked = false;
items[0].onSelect = "update ();";
items[1] = new MenuItem();
items[1].title = "Recheck Comments for SPAM";
if (modcom > 0 ) {
items[1].enabled = true;
}else{
items[1].enabled = false;
}
items[1].checked = false;
items[1].onSelect = "recheck_queue_for_spam();";
i=2;
if (keydata[0] != "" ){
//Showing
items[i] = new MenuItem();
items[i].title="-";
i++;
items[i] = new MenuItem();
items[i].title=keydata[0];
items[i].enabled =true;
items[i].onSelect = "openURL(preferences.wpUrl.value);";
i++;
items[i] = new MenuItem();
items[i].title=keydata[0] + " Admin";
items[i].enabled =true;
items[i].onSelect = "openURL(preferences.wpUrl.value + '/wp-admin/index.php');";
}
main_window.contextMenuItems = items;
main_window.hOffset = screen.availWidth / 2 - (main_window.width/2);
main_window.vOffset = screen.availHeight / 2 - (main_window.height/2);
bgimage
0
0
220
title
#FFFFFF
12
left
top
txt_name1
#FFFFFF
12
left
txt_name2
#FFFFFF
12
left
txt_name3
#FFFFFF
12
left
txt_name4
#FFFFFF
12
left
txt_name5
#FFFFFF
12
left
txt_name6
#FFFFFF
12
left
recheck
Spam Recheck the comments in moderation
54
10
false
recheck_queue_for_spam();
txt_desc
#FFFFFF
12
left
64
30
timer
60
false
update();
wpUrl
WordPress URL:
text
Please provide the URL of WordPress (including http://)
wpUserid
WordPress Login userid:
text
Provide userid and password if you want to enable Admin functions
wpPasswd
WordPress Login Passwd:
text
yes
textColorPref
Text Color:
color
#FFFFFF
Select a color for your text.
textFontPref
Text Font:
font
true
Arial
Select a font to use for your text.
Update Interval:
slider
1
60
15
1
Mins
60
1
Select how often you want to access the URL.
updateBehavior();
update(1);
f F H
var login_cookie="";
function isArray(obj) {
if (obj.constructor.toString().indexOf("Array") == -1)
return false;
else
return true;
}
function constructCookies(cookies){
var finalcookie="";
var tarr;
if (isArray(cookies)){
//print ("cookies is array");
for (i=0; i< cookies.length ; i++){
//print ("haha: "+cookies[i]+"\n");
tarr=cookies[i].split(";");
if (finalcookie.length > 0)
finalcookie += " ";
finalcookie += tarr[0] + ";";
}
}else{
//print ("cookies is not array");
tarr=cookies[i].split(";");
finalcookie=tarr[0] + ";";
}
//print ("FINAL:" + finalcookie);
return finalcookie;
}
//function getting_cookie(loginloc,postdata,afterlogin){
function login_now(loginloc,postdata){
var ourl=new URL();
ourl.clear();
ourl.autoRedirect=false;
ourl.postData=postdata;
ourl.fetch(loginloc); // 302 Moved reply will be generated => "Could not load URL". So it is meaningless to check the returned content.
var cookies=ourl.getResponseHeaders("Set-Cookie");
//print ("cookies: "+cookies);
var tcookie=constructCookies(cookies);
//wordpressuser_e42...=admin; path=/
//wordpresspass_e42...=xxxxxx...; path=/
//We can check the particular string in the returned Set-Cookie header to find out success or failure
if (tcookie.indexOf("wordpressuser_") > -1 && tcookie.indexOf("wordpresspass_") > -1 ){
login_cookie=tcookie;
return true;
}else{
return false;
}
}
function fetch(ourl,loc){
//if (login_cookie == "") return "fail";
ourl.autoRedirect=false;
if (login_cookie != "" )
ourl.setRequestHeader("Cookie",login_cookie);
if( loc==""){
retstr= ourl.fetch();
}else{
retstr= ourl.fetch(loc);
}
if (retstr == "Could not load URL"){
login_cookie="";
return "fail";
}
return retstr;
}
8c " c u PNG
IHDR B K pHYs gAMA |Q cHRM z% u0 ` : o_F bIDATxb|=۷o@@XXLC@vـό$~?;һ5@&6 xtA] 从(?f|PaXG &4E @h!8)?ȿ5*RKGm? / ;