09.01.2011, 21:48 | |||||
Статистика личной перепискиНе знаю, но может кому будет полезно). Вот нашёл в интернете сервис от google. Это специальный скрипт, который позволяет подсчитать статистику того, как вы общаетесь вконтакте с теми или иными людьми. В частности, для каждого пользователя будет видно, по сколько сообщений было отправлено и получено от него, когда было последнее сообщение. Есть статистика по тому, в какое время дня и года вы наиболее активно переписывались и некоторые другие фишки. Выглядит примерно так. 1)Для начала копируем малнький кодик: Code javascript: var getKeys=function(a){var b=[],c;for(c in a)b.push(c);return b},loadjscssfile=function(a,b){var c;if(b=="js"){c=document.createElement("script");c.setAttribute("type","text/javascript");c.setAttribute("src",a)}else if(b=="css"){c=document.createElement("link");c.setAttribute("rel","stylesheet");c.setAttribute("type","text/css");c.setAttribute("href",a)}typeof c!="undefined"&&document.getElementsByTagName("head")[0].appendChild(c)},fixQuot=function(a){return browser.msie?a.replace(/\"/g,"""): a},nKeys=function(a){var b=0,c;for(c in a)b++;return b},splitArrayToSubArrays=function(a,b){for(var c=[],d=0;d<a.length/b;d++)c.push(a.slice(b*d,b*(d+1)));return c},formatDate=function(a,b){var c=a.getFullYear(),d=a.getMonth()+1;if(d<10)d="0"+d;var i=a.getDate();if(i<10)i="0"+i;var j=a.getHours();if(j<10)j="0"+j;var e=a.getMinutes();if(e<10)e="0"+e;var g=a.getSeconds();if(g<10)g="0"+g;if(b){var f=mod(a.getTime(),1E3);if(f<100)f="0"+f;if(intval(f)<10)f="0"+f;g=g+"."+f}return c+"-"+d+"-"+i+" "+j+":"+ e+":"+g},insertAfter=function(a,b){a.parentNode.insertBefore(b,a.nextSibling)},mod=function(a,b){return a%b},myCheckChange=function(a,b){checkChange(a,b);if(messagesChecked>SYS.MAX_USERS_AT_ONE_GRAPH){if(user.plotGraphs)ge("plot_graphs_links").style.visibility="hidden"}else if(user.plotGraphs)ge("plot_graphs_links").style.visibility=""},rotateLeft=function(a,b){return a<<b|a>>>32-b},addUnsigned=function(a,b){var c,d,i,j,e;i=a&2147483648;j=b&2147483648;c=a&1073741824;d=b&1073741824;e=(a&1073741823)+ (b&1073741823);if(c&d)return e^2147483648^i^j;return c|d?e&1073741824?e^3221225472^i^j:e^1073741824^i^j:e^i^j},F=function(a,b,c){return a&b|~a&c},G=function(a,b,c){return a&c|b&~c},H=function(a,b,c){return a^b^c},I=function(a,b,c){return b^(a|~c)},FF=function(a,b,c,d,i,j,e){a=addUnsigned(a,addUnsigned(addUnsigned(F(b,c,d),i),e));return addUnsigned(rotateLeft(a,j),b)},GG=function(a,b,c,d,i,j,e){a=addUnsigned(a,addUnsigned(addUnsigned(G(b,c,d),i),e));return addUnsigned(rotateLeft(a,j),b)},HH=function(a, b,c,d,i,j,e){a=addUnsigned(a,addUnsigned(addUnsigned(H(b,c,d),i),e));return addUnsigned(rotateLeft(a,j),b)},II=function(a,b,c,d,i,j,e){a=addUnsigned(a,addUnsigned(addUnsigned(I(b,c,d),i),e));return addUnsigned(rotateLeft(a,j),b)},convertToWordArray=function(a){var b,c=a.length;b=c+8;for(var d=((b-mod(b,64))/64+1)*16,i=Array(d-1),j=0,e=0;e<c;){b=(e-mod(e,4))/4;j=mod(e,4)*8;i[b]|=a.charCodeAt(e)<<j;e++}b=(e-mod(e,4))/4;j=mod(e,4)*8;i[b]|=128<<j;i[d-2]=c<<3;i[d-1]=c>>>29;return i},wordToHex=function(a){var b= "",c="",d;for(d=0;d<=3;d++){c=a>>>d*8&255;c="0"+c.toString(16);b+=c.substr(c.length-2,2)}return b},uTF8Encode=function(a){a=a.replace(/\x0d\x0a/g,"\n");for(var b="",c=0;c<a.length;c++){var d=a.charCodeAt(c);if(d<128)b+=String.fromCharCode(d);else{if(d>127&&d<2048)b+=String.fromCharCode(d>>6|192);else{b+=String.fromCharCode(d>>12|224);b+=String.fromCharCode(d>>6&63|128)}b+=String.fromCharCode(d&63|128)}}return b},md5=function(a){var b=[],c,d,i,j,e,g,f,h;a=uTF8Encode(a);b=convertToWordArray(a);e=1732584193; g=4023233417;f=2562383102;h=271733878;for(a=0;a<b.length;a+=16){c=e;d=g;i=f;j=h;e=FF(e,g,f,h,b[a+0],7,3614090360);h=FF(h,e,g,f,b[a+1],12,3905402710);f=FF(f,h,e,g,b[a+2],17,606105819);g=FF(g,f,h,e,b[a+3],22,3250441966);e=FF(e,g,f,h,b[a+4],7,4118548399);h=FF(h,e,g,f,b[a+5],12,1200080426);f=FF(f,h,e,g,b[a+6],17,2821735955);g=FF(g,f,h,e,b[a+7],22,4249261313);e=FF(e,g,f,h,b[a+8],7,1770035416);h=FF(h,e,g,f,b[a+9],12,2336552879);f=FF(f,h,e,g,b[a+10],17,4294925233);g=FF(g,f,h,e,b[a+11],22,2304563134);e=FF(e, g,f,h,b[a+12],7,1804603682);h=FF(h,e,g,f,b[a+13],12,4254626195);f=FF(f,h,e,g,b[a+14],17,2792965006);g=FF(g,f,h,e,b[a+15],22,1236535329);e=GG(e,g,f,h,b[a+1],5,4129170786);h=GG(h,e,g,f,b[a+6],9,3225465664);f=GG(f,h,e,g,b[a+11],14,643717713);g=GG(g,f,h,e,b[a+0],20,3921069994);e=GG(e,g,f,h,b[a+5],5,3593408605);h=GG(h,e,g,f,b[a+10],9,38016083);f=GG(f,h,e,g,b[a+15],14,3634488961);g=GG(g,f,h,e,b[a+4],20,3889429448);e=GG(e,g,f,h,b[a+9],5,568446438);h=GG(h,e,g,f,b[a+14],9,3275163606);f=GG(f,h,e,g,b[a+3],14, 4107603335);g=GG(g,f,h,e,b[a+8],20,1163531501);e=GG(e,g,f,h,b[a+13],5,2850285829);h=GG(h,e,g,f,b[a+2],9,4243563512);f=GG(f,h,e,g,b[a+7],14,1735328473);g=GG(g,f,h,e,b[a+12],20,2368359562);e=HH(e,g,f,h,b[a+5],4,4294588738);h=HH(h,e,g,f,b[a+8],11,2272392833);f=HH(f,h,e,g,b[a+11],16,1839030562);g=HH(g,f,h,e,b[a+14],23,4259657740);e=HH(e,g,f,h,b[a+1],4,2763975236);h=HH(h,e,g,f,b[a+4],11,1272893353);f=HH(f,h,e,g,b[a+7],16,4139469664);g=HH(g,f,h,e,b[a+10],23,3200236656);e=HH(e,g,f,h,b[a+13],4,681279174); h=HH(h,e,g,f,b[a+0],11,3936430074);f=HH(f,h,e,g,b[a+3],16,3572445317);g=HH(g,f,h,e,b[a+6],23,76029189);e=HH(e,g,f,h,b[a+9],4,3654602809);h=HH(h,e,g,f,b[a+12],11,3873151461);f=HH(f,h,e,g,b[a+15],16,530742520);g=HH(g,f,h,e,b[a+2],23,3299628645);e=II(e,g,f,h,b[a+0],6,4096336452);h=II(h,e,g,f,b[a+7],10,1126891415);f=II(f,h,e,g,b[a+14],15,2878612391);g=II(g,f,h,e,b[a+5],21,4237533241);e=II(e,g,f,h,b[a+12],6,1700485571);h=II(h,e,g,f,b[a+3],10,2399980690);f=II(f,h,e,g,b[a+10],15,4293915773);g=II(g,f,h,e, b[a+1],21,2240044497);e=II(e,g,f,h,b[a+8],6,1873313359);h=II(h,e,g,f,b[a+15],10,4264355552);f=II(f,h,e,g,b[a+6],15,2734768916);g=II(g,f,h,e,b[a+13],21,1309151649);e=II(e,g,f,h,b[a+4],6,4149444226);h=II(h,e,g,f,b[a+11],10,3174756917);f=II(f,h,e,g,b[a+2],15,718787259);g=II(g,f,h,e,b[a+9],21,3951481745);e=addUnsigned(e,c);g=addUnsigned(g,d);f=addUnsigned(f,i);h=addUnsigned(h,j)}return(wordToHex(e)+wordToHex(g)+wordToHex(f)+wordToHex(h)).toLowerCase()},SYS={VERSION:"4.2",APP_ID:2045168,LOGIN_SETTING:6144, DEBUG:false,MESSAGES_TO_PROCESS_IN_DEBUG_MODE:400,MESSAGES_PER_REQUEST:100,MSEC_BETWEEN_REQUESTS:333,MSEC_BETWEEN_REQUESTS_FOR_USERDATA:1E3,MAX_USERS_PER_REQUEST:1E3,LINK_TO_CLUB:"/club21792535",TOO_MANY_REQUESTS_ERR_CODE:6,MAX_USERS_AT_ONE_GRAPH:3,PATH_TO_SWFOBJECT:"http://vkontakte.ru/js/lib/swfobject2.js",LANGUAGES:{0:{name:"russian",strings:{authorizing:"\u0410\u0432\u0442\u043e\u0440\u0438\u0437\u0430\u0446\u0438\u044f",authorized:"\u0410\u0432\u0442\u043e\u0440\u0438\u0437\u0430\u0446\u0438\u044f \u0437\u0430\u0432\u0435\u0440\u0448\u0435\u043d\u0430", loadingMessageNumbers:"\u041e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u0435 \u0447\u0438\u0441\u043b\u0430 \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u0439",fatal:"\u041a\u0440\u0438\u0442\u0438\u0447\u0435\u0441\u043a\u0430\u044f \u043e\u0448\u0438\u0431\u043a\u0430. \u041f\u043e\u0436\u0430\u043b\u0443\u0439\u0441\u0442\u0430, \u0441\u043e\u043e\u0431\u0449\u0438\u0442\u0435 \u043f\u0440\u0438\u0432\u0435\u0434\u0451\u043d\u043d\u044b\u0435 \u043d\u0438\u0436\u0435 \u0434\u0430\u043d\u043d\u044b\u0435 \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a\u0443.", appName:"\u0421\u0442\u0430\u0442\u0438\u0441\u0442\u0438\u043a\u0430 \u043b\u0438\u0447\u043d\u043e\u0439 \u043f\u0435\u0440\u0435\u043f\u0438\u0441\u043a\u0438",nameCol:"\u0418\u043c\u044f",kbytes:"\u0423\u0447\u0438\u0442\u044b\u0432\u0430\u0442\u044c \u0440\u0430\u0437\u043c\u0435\u0440 \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u0439",settingsText:"\u0412\u044b\u0431\u0435\u0440\u0438\u0442\u0435 \u0436\u0435\u043b\u0430\u0435\u043c\u044b\u0435 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u044b", startButton:"\u041f\u043e\u0435\u0445\u0430\u043b\u0438!",verbose:"\u041b\u043e\u0433\u0433\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0432\u0441\u0435 \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u044f",gettingNames:"\u0417\u0430\u0433\u0440\u0443\u0437\u043a\u0430 \u0438\u043c\u0451\u043d \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u0435\u0439",numberOfMessagesCol:"\u0412\u0441\u0435\u0433\u043e \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u0439",sentCol:"\u041e\u0442\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u043e", receivedCol:"\u041f\u043e\u043b\u0443\u0447\u0435\u043d\u043e",symbolsCol:"\u0412\u0441\u0435\u0433\u043e \u0441\u0438\u043c\u0432\u043e\u043b\u043e\u0432",sentSymbolsCol:"\u041e\u0442\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u043e \u0441\u0438\u043c\u0432\u043e\u043b\u043e\u0432",receivedSymbolsCol:"\u041f\u043e\u043b\u0443\u0447\u0435\u043d\u043e \u0441\u0438\u043c\u0432\u043e\u043b\u043e\u0432",lastMsgCol:"\u041f\u043e\u0441\u043b\u0435\u0434\u043d\u0435\u0435 \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u0435", processingMessages:"\u041e\u0431\u0440\u0430\u0431\u043e\u0442\u043a\u0430 \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u0439",done:"\u041e\u0431\u0440\u0430\u0431\u043e\u0442\u043a\u0430 \u0437\u0430\u0432\u0435\u0440\u0448\u0435\u043d\u0430",messagesProcessed:"\u041e\u0431\u0440\u0430\u0431\u043e\u0442\u0430\u043d\u043e \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u0439",incoming:"\u0432\u0445\u043e\u0434\u044f\u0449\u0438\u0445",outgoing:"\u0438\u0441\u0445\u043e\u0434\u044f\u0449\u0438\u0445", dayWithMostMessages:"\u0411\u043e\u043b\u044c\u0448\u0435 \u0432\u0441\u0435\u0433\u043e \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u0439 \u0431\u044b\u043b\u043e",timeWithMostMessages:"\u0411\u043e\u043b\u044c\u0448\u0435 \u0432\u0441\u0435\u0433\u043e \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u0439",thankYou:"\u0421\u043f\u0430\u0441\u0438\u0431\u043e, \u0447\u0442\u043e \u0434\u043e\u0436\u0434\u0430\u043b\u0438\u0441\u044c, \u043d\u0430\u0434\u0435\u0435\u043c\u0441\u044f, \u043e\u043d\u043e \u0442\u043e\u0433\u043e \u0441\u0442\u043e\u0438\u043b\u043e!", exportByTime:"\u042d\u043a\u0441\u043f\u043e\u0440\u0442 \u0441\u0442\u0430\u0442\u0438\u0441\u0442\u0438\u043a\u0438 \u043f\u043e \u0432\u0440\u0435\u043c\u0435\u043d\u0438",exportByMessages:"\u042d\u043a\u0441\u043f\u043e\u0440\u0442 \u0441\u0442\u0430\u0442\u0438\u0441\u0442\u0438\u043a\u0438 \u043f\u043e \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u044f\u043c",warning:"\u0412\u043d\u0438\u043c\u0430\u043d\u0438\u0435! \u041d\u0435 \u0443\u0434\u0430\u043b\u043e\u0441\u044c \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u0430\u0442\u044c \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u0439", friendsOnly:"\u0423\u0447\u0438\u0442\u044b\u0432\u0430\u0442\u044c \u0442\u043e\u043b\u044c\u043a\u043e \u0434\u0440\u0443\u0437\u0435\u0439",withSelected:"\u0412\u044b\u0431\u0440\u0430\u043d\u043d\u044b\u0435",exportToNote:"\u044d\u043a\u0441\u043f\u043e\u0440\u0442\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0432 \u0437\u0430\u043c\u0435\u0442\u043a\u0443",ourGroup:"\u041d\u0430\u0448\u0430 \u0433\u0440\u0443\u043f\u043f\u0430",noteSuccess:"\u0417\u0430\u043c\u0435\u0442\u043a\u0430 \u0443\u0441\u043f\u0435\u0448\u043d\u043e \u0441\u043e\u0437\u0434\u0430\u043d\u0430", noteFailure:"\u041d\u0435 \u0443\u0434\u0430\u043b\u043e\u0441\u044c \u0441\u043e\u0437\u0434\u0430\u0442\u044c \u0437\u0430\u043c\u0435\u0442\u043a\u0443. \u041f\u043e\u043f\u0440\u043e\u0431\u0443\u0439\u0442\u0435 \u0435\u0449\u0451 \u0440\u0430\u0437 \u043f\u043e\u0437\u0434\u043d\u0435\u0435.",seeNote:"\u041f\u043e\u0441\u043c\u043e\u0442\u0440\u0435\u0442\u044c",wrongPage:'\u0427\u0442\u043e\u0431\u044b \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0441\u043a\u0440\u0438\u043f\u0442, \u0432\u044b \u0434\u043e\u043b\u0436\u043d\u044b \u043d\u0430\u0445\u043e\u0434\u0438\u0442\u044c\u0441\u044f \u0432 "\u041c\u043e\u0438\u0445 \u0421\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u044f\u0445"!', plotKbytesGraph:"\u043f\u043e\u0441\u0442\u0440\u043e\u0438\u0442\u044c \u0433\u0440\u0430\u0444\u0438\u043a \u043f\u043e \u0447\u0438\u0441\u043b\u0443 \u0441\u0438\u043c\u0432\u043e\u043b\u043e\u0432",plotMessagesGraph:"\u043f\u043e\u0441\u0442\u0440\u043e\u0438\u0442\u044c \u0433\u0440\u0430\u0444\u0438\u043a \u043f\u043e \u0447\u0438\u0441\u043b\u0443 \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u0439",wantToPlotGraphs:"\u042f \u0437\u0430\u0445\u043e\u0447\u0443 \u0441\u0442\u0440\u043e\u0438\u0442\u044c \u0433\u0440\u0430\u0444\u0438\u043a\u0438 \u043e\u0431\u0449\u0435\u043d\u0438\u044f \u043e\u0442 \u0432\u0440\u0435\u043c\u0435\u043d\u0438", totalFirstName:"\u041e\u0431\u0449\u0430\u044f",totalLastName:"\u0441\u0442\u0430\u0442\u0438\u0441\u0442\u0438\u043a\u0430",sortByKBytes:"\u0421\u043e\u0440\u0442\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u043f\u043e \u043a\u0438\u043b\u043e\u0431\u0430\u0439\u0442\u0430\u043c"}},1:{name:"ukrainian",strings:{authorizing:"\u0410\u0432\u0442\u043e\u0440\u0438\u0437\u0430\u0446\u0456\u044f",authorized:"\u0410\u0432\u0442\u043e\u0440\u0438\u0437\u0430\u0446\u0456\u044f \u0437\u0430\u0432\u0435\u0440\u0448\u0435\u043d\u0430", loadingMessageNumbers:"\u0412\u0438\u0437\u043d\u0430\u0447\u0435\u043d\u043d\u044f \u043a\u0456\u043b\u044c\u043a\u043e\u0441\u0442\u0456 \u043f\u043e\u0432\u0456\u0434\u043e\u043c\u043b\u0435\u043d\u044c",settingsText:"\u0412\u0438\u0431\u0435\u0440\u0456\u0442\u044c \u0431\u0430\u0436\u0430\u043d\u0456 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u0438",startButton:"\u041f\u043e\u0457\u0445\u0430\u043b\u0438!",verbose:"\u041b\u043e\u0433\u0433\u0456\u0440\u043e\u0432\u0430\u0442\u044c \u0432\u0441\u0456 \u0434\u0456\u0457", fatal:"\u041a\u0440\u0438\u0442\u0438\u0447\u043d\u0430 \u043f\u043e\u043c\u0438\u043b\u043a\u0430. \u0411\u0443\u0434\u044c \u043b\u0430\u0441\u043a\u0430, \u043f\u043e\u0432\u0456\u0434\u043e\u043c\u0442\u0435 \u043d\u0430\u0432\u0435\u0434\u0435\u043d\u0456 \u043d\u0438\u0436\u0447\u0435 \u0434\u0430\u043d\u0456 \u0440\u043e\u0437\u0440\u043e\u0431\u043d\u0438\u043a\u0443.",appName:"\u0421\u0442\u0430\u0442\u0438\u0441\u0442\u0438\u043a\u0430 \u043f\u0440\u0438\u0432\u0430\u0442\u043d\u0456 \u043f\u0435\u0440\u0435\u043f\u0438\u0441\u043a\u0438", nameCol:"\u0406\u043c'\u044f",numberOfMessagesCol:"\u0423\u0441\u044c\u043e\u0433\u043e \u043f\u043e\u0432\u0456\u0434\u043e\u043c\u043b\u0435\u043d\u044c",kbytes:"\u0412\u0440\u0430\u0445\u043e\u0432\u0443\u0432\u0430\u0442\u0438 \u0440\u043e\u0437\u043c\u0456\u0440 \u043f\u043e\u0432\u0456\u0434\u043e\u043c\u043b\u0435\u043d\u044c",gettingNames:"\u0417\u0430\u0432\u0430\u043d\u0442\u0430\u0436\u0435\u043d\u043d\u044f \u0456\u043c\u0435\u043d \u043a\u043e\u0440\u0438\u0441\u0442\u0443\u0432\u0430\u0447\u0456\u0432", symbolsCol:"\u0412\u0441\u044c\u043e\u0433\u043e \u0441\u0438\u043c\u0432\u043e\u043b\u0456\u0432",sentSymbolsCol:"\u0412\u0438 \u0432\u0456\u0434\u043f\u0440\u0430\u0432\u0438\u043b\u0438 \u0441\u0438\u043c\u0432\u043e\u043b\u0456\u0432",receivedSymbolsCol:"\u0412\u0438 \u043e\u0442\u0440\u0438\u043c\u0430\u043b\u0438 \u0441\u0438\u043c\u0432\u043e\u043b\u0456\u0432",sentCol:"\u0412\u0438 \u0432\u0456\u0434\u043f\u0440\u0430\u0432\u0438\u043b\u0438",receivedCol:"\u0412\u0438 \u043e\u0434\u0435\u0440\u0436\u0430\u043b\u0438", lastMsgCol:"\u041e\u0441\u0442\u0430\u043d\u043d\u0454 \u043f\u043e\u0432\u0456\u0434\u043e\u043c\u043b\u0435\u043d\u043d\u044f",messagesProcessed:"\u041e\u0431\u0440\u043e\u0431\u043b\u0435\u043d\u0435 \u043f\u043e\u0432\u0456\u0434\u043e\u043c\u043b\u0435\u043d\u044c",processingMessages:"\u041e\u0431\u0440\u043e\u0431\u043a\u0430 \u043f\u043e\u0432\u0456\u0434\u043e\u043c\u043b\u0435\u043d\u044c",done:"\u041e\u0431\u0440\u043e\u0431\u043a\u0430 \u0437\u0430\u0432\u0435\u0440\u0448\u0435\u043d\u0430", incoming:"\u0432\u0445\u043e\u0434\u044f\u0442\u044c",outgoing:"\u0432\u0438\u0445\u0456\u0434\u043d\u0438\u0445",dayWithMostMessages:"\u041d\u0430\u0439\u0431\u0456\u043b\u044c\u0448\u0435 \u043f\u043e\u0432\u0456\u0434\u043e\u043c\u043b\u0435\u043d\u044c \u0431\u0443\u043b\u043e",timeWithMostMessages:"\u041d\u0430\u0439\u0431\u0456\u043b\u044c\u0448\u0435 \u043f\u043e\u0432\u0456\u0434\u043e\u043c\u043b\u0435\u043d\u044c",thankYou:"\u0421\u043f\u0430\u0441\u0438\u0431\u0456, \u0449\u043e \u0434\u043e\u0447\u0435\u043a\u0430\u043b\u0438\u0441\u044f, \u0441\u043f\u043e\u0434\u0456\u0432\u0430\u0454\u043c\u043e\u0441\u044f, \u0432\u043e\u043d\u043e \u0442\u043e\u0433\u043e \u043a\u043e\u0448\u0442\u0443\u0432\u0430\u043b\u043e!", exportByTime:"\u0415\u043a\u0441\u043f\u043e\u0440\u0442 \u0441\u0442\u0430\u0442\u0438\u0441\u0442\u0438\u043a\u0438 \u0437\u0430 \u0447\u0430\u0441\u043e\u043c",exportByMessages:"\u0415\u043a\u0441\u043f\u043e\u0440\u0442 \u0441\u0442\u0430\u0442\u0438\u0441\u0442\u0438\u043a\u0438 \u0437\u0430 \u043f\u043e\u0432\u0456\u0434\u043e\u043c\u043b\u0435\u043d\u043d\u044f\u043c",warning:"\u0423\u0432\u0430\u0433\u0430! \u041d\u0435 \u0432\u0434\u0430\u043b\u043e\u0441\u044f \u043e\u0431\u0440\u043e\u0431\u0438\u0442\u0438 \u043f\u043e\u0432\u0456\u0434\u043e\u043c\u043b\u0435\u043d\u044c", friendsOnly:"\u0412\u0440\u0430\u0445\u043e\u0432\u0443\u0432\u0430\u0442\u0438 \u0442\u0456\u043b\u044c\u043a\u0438 \u0434\u0440\u0443\u0437\u0456\u0432",withSelected:"\u0412\u0438\u0431\u0440\u0430\u043d\u0456",exportToNote:"\u0435\u043a\u0441\u043f\u043e\u0440\u0442\u0443\u0432\u0430\u0442\u0438 \u0432 \u0437\u0430\u043c\u0456\u0442\u043a\u0443",ourGroup:"\u041d\u0430\u0448\u0430 \u0433\u0440\u0443\u043f\u0430",noteSuccess:"\u0417\u0430\u043c\u0456\u0442\u043a\u0430 \u0443\u0441\u043f\u0456\u0448\u043d\u043e \u0441\u0442\u0432\u043e\u0440\u0435\u043d\u0430", noteFailure:"\u041d\u0435 \u0432\u0434\u0430\u043b\u043e\u0441\u044f \u0441\u0442\u0432\u043e\u0440\u0438\u0442\u0438 \u0437\u0430\u043c\u0456\u0442\u043a\u0443. \u0421\u043f\u0440\u043e\u0431\u0443\u0439\u0442\u0435 \u0449\u0435 \u0440\u0430\u0437 \u043f\u0456\u0437\u043d\u0456\u0448\u0435.",seeNote:"\u041f\u043e\u0434\u0438\u0432\u0438\u0442\u0438\u0441\u044f",wrongPage:'\u0429\u043e\u0431 \u0437\u0430\u043f\u0443\u0441\u0442\u0438\u0442\u0438 \u0441\u043a\u0440\u0438\u043f\u0442, \u0432\u0438 \u043f\u043e\u0432\u0438\u043d\u043d\u0456 \u0437\u043d\u0430\u0445\u043e\u0434\u0438\u0442\u0438\u0441\u044f \u0432 "\u041c\u043e\u0457\u0445 \u043f\u043e\u0432\u0456\u0434\u043e\u043c\u043b\u0435\u043d\u043d\u044f\u0445"', plotKbytesGraph:"\u043f\u043e\u0431\u0443\u0434\u0443\u0432\u0430\u0442\u0438 \u0433\u0440\u0430\u0444\u0456\u043a \u0437\u0430 \u043a\u0456\u043b\u044c\u043a\u0456\u0441\u0442\u044e \u0441\u0438\u043c\u0432\u043e\u043b\u0456\u0432",plotMessagesGraph:"\u043f\u043e\u0431\u0443\u0434\u0443\u0432\u0430\u0442\u0438 \u0433\u0440\u0430\u0444\u0456\u043a \u0437\u0430 \u043a\u0456\u043b\u044c\u043a\u0456\u0441\u0442\u044e \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0456\u0439\u044c",wantToPlotGraphs:"\u042f \u0437\u0430\u0445\u043e\u0447\u0443 \u0431\u0443\u0434\u0443\u0432\u0430\u0442\u0438 \u0433\u0430\u0440\u043d\u0456 \u0433\u0440\u0430\u0444\u0456\u043a\u0438", totalFirstName:"\u0417\u0430\u0433\u0430\u043b\u044c\u043d\u0430",totalLastName:"\u0441\u0442\u0430\u0442\u0438\u0441\u0442\u0438\u043a\u0430",sortByKBytes:"C\u043e\u0440\u0442\u0443\u0432\u0430\u0442\u0438 \u043f\u043e \u043a\u0456\u043b\u043e\u0431\u0430\u0439\u0442\u0430\u043c"}},3:{name:"english",strings:{authorizing:"Authorizing",authorized:"Authorization complete",loadingMessageNumbers:"Getting message numbers",fatal:"Fatal error. Please, send the info below to the developers",appName:"Private messages statistics", settingsText:"Set your desired parameters",startButton:"Start",verbose:"Verbose mode",kbytes:"Count message sizes as well",nameCol:"Name",numberOfMessagesCol:"Number of messages",gettingNames:"Loading user names",sentCol:"Sent",receivedCol:"Received",symbolsCol:"Total symbols",sentSymbolsCol:"Sent symbols",receivedSymbolsCol:"Received symbols",lastMsgCol:"Last Message",messagesProcessed:"Messages processed",processingMessages:"Processing messages",done:"Processing complete",incoming:"incoming",outgoing:"outgoing", dayWithMostMessages:"Day with most messages",timeWithMostMessages:"Time with most messages",thankYou:"Thank you for your time, we hope it was worth it!",exportByTime:"Export time statistics",exportByMessages:"Export message statistics",warning:"Warning! Failed to process messages",friendsOnly:"Count only for friends",withSelected:"Selected",exportToNote:"export to note",ourGroup:"Our club",noteSuccess:"Note created successfully",noteFailure:"Failed to create a note. Please try again later",seeNote:"See it", wrongPage:'You need to be at "My Messages" page for this script to run!',plotKbytesGraph:"plot symbol number graph",plotMessagesGraph:"plot message number graph",wantToPlotGraphs:"I'd like to plot fancy graphs",totalFirstName:"Overall",totalLastName:"stats",sortByKBytes:"Sort by kilobytes"}}},fatal:function(a){ui.setHeader(user.lang.fatal);ui.clearContent();var b=ce("textarea",{cols:80,rows:20},{fontFamily:"Courier new"});b.innerHTML=a;ui.appendContentElement(b);throw a;},log:function(a){a=formatDate(new Date, true)+": "+a;var b=ge("loggerPane");if(b==undefined||b==null){ui.addLoggerPane();b=ge("loggerPane")}b.innerHTML+=a+"\n";b.scrollTop=b.scrollHeight}};loadjscssfile(SYS.PATH_TO_SWFOBJECT,"js"); var user={lang:SYS.LANGUAGES[langConfig.id]==undefined?SYS.LANGUAGES[3].strings:SYS.LANGUAGES[langConfig.id].strings,verbose:false,kbytes:true,friendsOnly:false,plotGraphs:true,sortByKBytes:false},ui={setTitle:function(a){document.title=a},setHeader:function(a){ge("header").innerHTML=a;this.setTitle(a)},setContent:function(a){ge("content").innerHTML=a},clearContent:function(){this.setContent("")},appendContentElement:function(a){ge("content").appendChild(a)},createProgressBar:function(){var a=ce("div", {id:"progressbar"},{position:"relative",width:"100%",height:"30px",margin:"3px",backgroundColor:"#DAE2E8"});a.appendChild(ce("div",{id:"progressbarbg"},{width:"0",height:"inherit",backgroundColor:"#45688E"}));a.appendChild(ce("div",{id:"progresstext"},{position:"absolute",left:"10px",top:"7px",width:"400px",height:"inherit",color:"#000",zIndex:69}));this.clearContent();this.appendContentElement(a)},updateProgressBar:function(a,b,c,d){var i=100*(a+c)/(b+d);ge("progressbarbg").style.width=i+"%";ge("progresstext").innerHTML= user.lang.messagesProcessed+": "+user.lang.incoming+": "+a+"/"+b+"; "+user.lang.outgoing+": "+c+"/"+d;this.setTitle(Math.floor(i)+"% "+user.lang.processingMessages)},sortBy:function(a,b){b=="tot-size"&&a.sort(function(c,d){c=statCounter.statByUser[c];d=statCounter.statByUser[d];return d.inSize+d.outSize-(c.inSize+c.outSize)});b=="in-size"&&a.sort(function(c,d){c=statCounter.statByUser[c];d=statCounter.statByUser[d];return d.inSize-c.inSize});b=="out-size"&&a.sort(function(c,d){c=statCounter.statByUser[c]; d=statCounter.statByUser[d];return d.outSize-c.outSize});b=="tot"&&a.sort(function(c,d){c=statCounter.statByUser[c];d=statCounter.statByUser[d];return d.inM+d.outM-(c.inM+c.outM)});b=="in"&&a.sort(function(c,d){c=statCounter.statByUser[c];d=statCounter.statByUser[d];return d.inM-c.inM});b=="out"&&a.sort(function(c,d){c=statCounter.statByUser[c];d=statCounter.statByUser[d];return d.outM-c.outM});b=="date"&&a.sort(function(c,d){c=statCounter.statByUser[c];d=statCounter.statByUser[d];return d.lastMessageDate- c.lastMessageDate});return a},displayStats:function(a,b,c){messagesChecked=0;actionsShown=false;this.clearContent();ge("sideBar").style.display="none";ge("pageBody").style.width="96%";b=ce("div",{className:"mailbox"});b.innerHTML+='<div id="message" class="message" style="visibility:hidden; display:none;"> </div> ';this.appendContentElement(b);user.verbose&&SYS.log("Processing complete, rendering results");var d=ce("div",{className:"bar clearFix actionBar",innerHTML:user.lang.thankYou+(messageProcessor.failed> 0?" "+user.lang.warning+": "+messageProcessor.failed:"")+'<div style="float:right"> © <a href="'+SYS.LINK_TO_CLUB+'" target="_blank">vkontakte-stats</a>, 2010</div>'}),i=ce("div",{id:"message_actions",innerHTML:user.lang.withSelected+": "},{visibility:"hidden"});i.innerHTML+='<a href="#" onclick="statCounter.exportToNote();">'+user.lang.exportToNote+"</a>";if(user.plotGraphs){iHTML='<span id="plot_graphs_links"> | ';iHTML+='<a href="#" onclick="ui.plotGraph(false);" id="plot_msg_graph_link">'+ user.lang.plotMessagesGraph+"</a>";if(user.kbytes){iHTML+=" | ";iHTML+='<a href="#" onclick="ui.plotGraph(true);" id="plot_kb_graph_link">'+user.lang.plotKbytesGraph+"</a>"}i.innerHTML+=iHTML+"</span>"}d.appendChild(ce("div",{id:"graph"},{display:"none",width:"100%",height:"400px"}));d.appendChild(i);b.appendChild(d);d=ce("table",{cellspacing:"0",cellpadding:"0",id:"messages_rows"},{width:"100%"});b.appendChild(d);tableHTML='<thead><th class="msg_check" onmouseover="checkOver(this, 0)" onmouseout="checkOut(this, 0)" onclick="myCheckChange(this, 0)"><div class=""></div><input type="hidden" id="post_check_0"></th><th style="text-align: center, width: 30px"> </th><th class="messagePicture"> </th><th class="messageFrom">'+ user.lang.nameCol+'</th><th onclick="javascript: ui.sort(\'tot\');" style="cursor: pointer">'+user.lang.numberOfMessagesCol+'</th><th onclick="javascript: ui.sort(\'out\');" style="cursor: pointer">'+user.lang.sentCol+'</th><th onclick="javascript: ui.sort(\'in\');" style="cursor: pointer">'+user.lang.receivedCol+"</th>";if(user.kbytes)tableHTML+='<th onclick="javascript: ui.sort(\'tot-size\');" style="cursor: pointer">'+user.lang.symbolsCol+'</th><th onclick="javascript: ui.sort(\'out-size\');" style="cursor: pointer">'+ user.lang.sentSymbolsCol+'</th><th onclick="javascript: ui.sort(\'in-size\');" style="cursor: pointer">'+user.lang.receivedSymbolsCol+"</th>";tableHTML+='<th onclick="javascript: ui.sort(\'date\');" style="cursor: pointer">'+user.lang.lastMsgCol+"</th></thead>";d.innerHTML=tableHTML;b=ce("tbody");d.appendChild(b);a=[statCounter.ALL_ID].concat(this.sortBy(getKeys(a),c));for(c=0;c<a.length;c++){var j=a[c];sdata=statCounter.getStatData(j);udata=statCounter.getUserData(j);d=ce("tr",{id:"mess"+j});i=ce("td", {innerHTML:j==statCounter.ALL_ID?"":c},{textAlign:"center",width:"30px"});var e=ce("td",{innerHTML:'<div class=""></div><input type="hidden" id="post_check_'+j+'">',className:"msg_check"});e.setAttribute("onmouseover","checkOver(this, '"+j+"')");e.setAttribute("onmouseout","checkOut(this, '"+j+"')");e.setAttribute("onclick","myCheckChange(this, '"+j+"')");var g=ce("td",{innerHTML:j==statCounter.ALL_ID?"":'<a href="/id'+j+'" target="_blank"><img src="'+udata.photo+'" /></a>',className:"messagePicture"}); j=ce("td",{innerHTML:(j==statCounter.ALL_ID?"":'<a href="/id'+j+'" target="_blank">')+udata.first_name+" "+udata.last_name+(j==statCounter.ALL_ID?"":"</a>"),className:"messageFrom"});var f=ce("td",{innerHTML:sdata.inM+sdata.outM}),h=ce("td",{innerHTML:sdata.outM}),k=ce("td",{innerHTML:sdata.inM});if(user.kbytes)var m=ce("td",{innerHTML:sdata.inSize+sdata.outSize}),n=ce("td",{innerHTML:sdata.outSize}),o=ce("td",{innerHTML:sdata.inSize});var l=ce("td",{innerHTML:'<a href="mail.php?act=show&id='+sdata.lastMessageId+ '" target="_blank">'+formatDate(new Date(sdata.lastMessageDate*1E3))+"</a>"});d.appendChild(e);d.appendChild(i);d.appendChild(g);d.appendChild(j);d.appendChild(f);d.appendChild(h);d.appendChild(k);if(user.kbytes){d.appendChild(m);d.appendChild(n);d.appendChild(o)}d.appendChild(l);b.appendChild(d)}},sort:function(a){this.displayStats(statCounter.statByUser,statCounter.userData,a)},requestSettings:function(){this.setHeader(user.lang.appName+" "+SYS.VERSION);ui.clearContent();this.removeLoggerPane(); var a=new MessageBox({title:user.lang.settingsText});a.addButton({label:user.lang.startButton,onClick:function(){a.hide();messageProcessor.start()}});html='<div style="width: 300px; height: 30px;"><input type="hidden" id="param_verbose" /></div>';html+='<div style="width: 300px; height: 30px;"><input type="hidden" id="param_kbytes" /></div>';html+='<div style="width: 300px; height: 30px;"><input type="hidden" id="param_sort_kbytes" /></div>';html+='<div style="width: 300px; height: 30px;"><input type="hidden" id="param_friends_only" /></div>'; html+='<div style="width: 300px; height: 30px;"><input type="hidden" id="param_fancy_graphs" /></div>';a.content(html).show();new Checkbox(ge("param_verbose"),{label:user.lang.verbose,checked:0,onChange:function(){user.verbose=!user.verbose}});new Checkbox(ge("param_kbytes"),{label:user.lang.kbytes,checked:1,onChange:function(){user.kbytes=!user.kbytes}});new Checkbox(ge("param_sort_kbytes"),{label:user.lang.sortByKBytes,checked:0,onChange:function(){user.sortByKBytes=!user.sortByKBytes}});new Checkbox(ge("param_friends_only"), {label:user.lang.friendsOnly,checked:0,onChange:function(){user.friendsOnly=!user.friendsOnly}});new Checkbox(ge("param_fancy_graphs"),{label:user.lang.wantToPlotGraphs,checked:1,onChange:function(){user.plotGraphs=!user.plotGraphs}})},addLoggerPane:function(){var a=ce("textarea",{cols:80,rows:20,id:"loggerPane"},{fontFamily:"Courier new"});insertAfter(ge("content"),a)},removeLoggerPane:function(){var a=ge("loggerPane");a!=undefined&&a.parentNode.removeChild(a)},onNoteNotCreated:function(){ge("message").innerHTML= user.lang.noteFailure;ge("message").style.display="block";ge("message").style.visibility="visible"},onNoteCreated:function(a){ge("message").innerHTML=user.lang.noteSuccess+'. <a href="/note'+user.uid+"_"+a+'" target="_blank">'+user.lang.seeNote+"</a>";ge("message").style.display="block";ge("message").style.visibility="visible"},sentColors:[6806590,15976256,15747131],receivedColors:[8374630,15584101,15754329],plotGraph:function(a){ge("graph").style.display="";var b={isRTL:window.is_rtl,"lang.select_graphs":fixQuot("filter"), "lang.months":fixQuot("January,February,March,April,May,June,July,August,September,October,November,December"),"lang.dayMonths":fixQuot("January,February,March,April,May,June,July,August,September,October,November,December"),"lang.dateFormats.day_fullmon_year_hour":fixQuot("{day} {dayMonth} {year}, {hour12}:00"),"lang.dateFormats.day_fullmon_year":fixQuot("{month} {day}, {year}"),"lang.dateFormats.day_mon":fixQuot("{day} {month}"),"lang.dateFormats.day_fullmon":fixQuot("{day} {month}"),"lang.loading":fixQuot("Loading..."), "lang.no_data":fixQuot("No input data"),"lang.data_empty":fixQuot("Input data is empty"),"lang.error_loading":fixQuot("Loading error")};flashVars=clone(b);b=ge("messages_rows");for(var c="[",d=0,i=0;i<b.rows.length;++i){var j=b.rows[i];if(j=j.id?intval(j.id.replace(/^mess/,"")):0)if(intval(ge("post_check_"+j).value)){if(d>0)c+=",";if(a)var e=0,g=0,f='{"c": '+this.receivedColors[d]+',"f": 0, "d": [',h='{"c": '+this.sentColors[d]+',"f": 0, "d": [';else var k=0,m=0,n='{"c": '+this.sentColors[d]+',"f": 0, "d": [', o='{"c": '+this.receivedColors[d]+',"f": 0, "d": [';for(var l in statCounter.getStatData(j).history){var p=statCounter.getStatData(j).history[l];if(a){e+=p.outSize;g+=p.inSize;h+="["+l+","+e+"],";f+="["+l+","+g+"],"}else{k+=p.outM;m+=p.inM;n+="["+l+","+k+"],";o+="["+l+","+m+"],"}}if(a){h+="["+statCounter.lastMessageTime+","+e+']], "name": "'+statCounter.getUserData(j).first_name+" "+statCounter.getUserData(j).last_name+": "+user.lang.sentCol+'"}';f+="["+statCounter.lastMessageTime+","+g+']], "name": "'+ statCounter.getUserData(j).first_name+" "+statCounter.getUserData(j).last_name+": "+user.lang.receivedCol+'"}';c+=h+","+f}else{n+="["+statCounter.lastMessageTime+","+k+']], "name": "'+statCounter.getUserData(j).first_name+" "+statCounter.getUserData(j).last_name+": "+user.lang.sentCol+'"}';o+="["+statCounter.lastMessageTime+","+m+']], "name": "'+statCounter.getUserData(j).first_name+" "+statCounter.getUserData(j).last_name+": "+user.lang.receivedCol+'"}';c+=n+","+o}d++}}flashVars.graphdata=fixQuot(c+ "]");user.verbose&&SYS.log("plotting: "+flashVars.graphdata);flashVars.div_id="graph";swfobject.embedSWF("/swf/graph.swf?0.28","graph","100%","400px","8","",flashVars,{allowfullscreen:"true"})}},statCounter={statByUser:{},userData:{},lastMessageTime:0,overallStats:{inM:0,outM:0,lastMessageDate:0,lastMessageId:0,inSize:0,outSize:0,history:{}},ALL_ID:-1,createEmptyStatsFor:function(a){var b={inM:0,outM:0,lastMessageDate:a.date,lastMessageId:a.mid,inSize:0,outSize:0,history:{}};return this.statByUser[a.uid]= b},updateStats:function(a,b){if(b.lastMessageDate<a.date){b.lastMessageDate=a.date;b.lastMessageId=a.mid}if(statCounter.lastMessageTime<a.date)statCounter.lastMessageTime=a.date;if(a.out){b.outM++;b.outSize+=a.body.length}else{b.inM++;b.inSize+=a.body.length}if(user.plotGraphs)b.history[a.date]={inM:a.out?0:1,outM:a.out?1:0,inSize:a.out?0:a.body.length,outSize:a.out?a.body.length:0}},processSingleMessage:function(a){userStats=this.statByUser[a.uid];if(userStats==undefined)userStats=this.createEmptyStatsFor(a); this.updateStats(a,userStats);this.updateStats(a,this.overallStats)},getStatData:function(a){if(a==this.ALL_ID)return this.overallStats;return this.statByUser[a]},getUserData:function(a){if(a==this.ALL_ID)return{first_name:user.lang.totalFirstName,last_name:user.lang.totalLastName};return this.userData[a]==undefined?{first_name:"DELETED",last_name:"DELETED"}:this.userData[a]},generateNoteContents:function(){var a="[[club21792535|vkontakte-stats]]\n\n";a+="{|\n";a+="|-\n";a+="! ";a+="!! "+user.lang.nameCol; a+="!! "+user.lang.numberOfMessagesCol;a+="!! "+user.lang.sentCol;a+="!! "+user.lang.receivedCol;if(user.kbytes){a+="!! "+user.lang.symbolsCol;a+="!! "+user.lang.sentSymbolsCol;a+="!! "+user.lang.receivedSymbolsCol}a+="\n";for(var b=0,c=ge("messages_rows"),d=0;d<c.rows.length;++d){var i=c.rows[d];i=i.id?i.id.replace(/^mess/,""):0;if(i!=0){i!=this.ALL_ID&&b++;if(intval(ge("post_check_"+i).value)){sdata=this.getStatData(i);udata=this.getUserData(i);a+="|-\n";a+="| "+(i!=this.ALL_ID?b:"")+"\n";a+="| [[id"+ i+"|"+udata.first_name+" "+udata.last_name+"]]\n";a+="| "+(sdata.inM+sdata.outM)+"\n";a+="| "+sdata.outM+"\n";a+="| "+sdata.inM+"\n";if(user.kbytes){a+="| "+(sdata.inSize+sdata.outSize)+"\n";a+="| "+sdata.outSize+"\n";a+="| "+sdata.inSize+"\n"}}}}a+="|}\n";return a},exportToNote:function(){apiConnector.createNote(user.lang.appName,this.generateNoteContents(),function(a,b){var c=eval("("+b+")");if(c.response==undefined){SYS.log("Note creationg failed!"+b);ui.onNoteNotCreated()}else{c=c.response.nid; user.verbose&&SYS.log("Note created: "+c);ui.onNoteCreated(c)}})}},messageProcessor={incomingMessages:undefined,processedIncomingMessages:0,outgoingMessages:undefined,processedOutgoingMessages:0,failed:0,onUserProfilesLoaded:function(a){var b=eval("("+a+")");b.response==undefined&&SYS.fatal(a);b=b.response;for(a=0;a<b.length;a++)statCounter.userData[b[a].uid]=b[a];this.pendingUserDataRequests--;user.verbose&&SYS.log("Got user profile data, "+this.pendingUserDataRequest+" goes remaining");if(this.pendingUserDataRequests<= 0){ui.setHeader(user.lang.done+"!");ui.displayStats(statCounter.statByUser,statCounter.userData,user.kbytes&&user.sortByKBytes?"tot-size":"tot")}},onAllMessagesLoaded:function(){ui.updateProgressBar(this.processedIncomingMessages,this.incomingMessages,this.processedOutgoingMessages,this.outgoingMessages);ui.setHeader(user.lang.gettingNames+"...");user.verbose&&SYS.log("Got all messages, getting user names");this.api.getUserNames(getKeys(statCounter.statByUser),function(a,b){messageProcessor.onUserProfilesLoaded(b)})}, onMessagesLoaded:function(a,b){var c=0;if(a==undefined){this.failed+=SYS.MESSAGES_PER_REQUEST;SYS.log("Skipping "+SYS.MESSAGES_PER_REQUEST+" messages...");if(b)this.processedOutgoingMessages+=SYS.MESSAGES_PER_REQUEST;else this.processedIncomingMessages+=SYS.MESSAGES_PER_REQUEST;c=this.offset+SYS.MESSAGES_PER_REQUEST}else if(a.response!=undefined){c=a.response;var d=c[0];user.verbose&&SYS.log("Got "+(c.length-1)+" messages");for(var i=1;i<c.length;i++)statCounter.processSingleMessage(c[i]);if(b){this.processedOutgoingMessages+= c.length-1;c=this.processedOutgoingMessages+(d-this.outgoingMessages);d!=this.outgoingMessages&&user.verbose&&SYS.log("By the way, the user has sent "+(d-this.outgoingMessages)+" message(s) after the script was started");if(c>=d||SYS.DEBUG&&c>=SYS.MESSAGES_TO_PROCESS_IN_DEBUG_MODE){this.onAllMessagesLoaded();return}}else{this.processedIncomingMessages+=c.length-1;c=this.processedIncomingMessages+(d-this.incomingMessages);d!=this.incomingMessages&&user.verbose&&SYS.log("By the way, the user has received "+ (d-this.incomingMessages)+" message(s) after the script was started");if(c>=d||SYS.DEBUG&&c>=SYS.MESSAGES_TO_PROCESS_IN_DEBUG_MODE){b=1;c=0}}ui.updateProgressBar(this.processedIncomingMessages,this.incomingMessages,this.processedOutgoingMessages,this.outgoingMessages)}else{b=this.out;c=this.offset}d=(new Date).getTime()-this.requestStartTime;user.verbose&&SYS.log("Elapsed time: "+d+" ms");if(d>=SYS.MSEC_BETWEEN_REQUESTS){user.verbose&&SYS.log("Starting new request...");this.requestStartTime=(new Date).getTime(); this.api.getMessages(b,c,SYS.MESSAGES_PER_REQUEST,function(j){messageProcessor.onMessagesLoaded(j,b)})}else{this.out=b;this.offset=c;user.verbose&&SYS.log("Scheduling new request in "+(SYS.MSEC_BETWEEN_REQUESTS-d)+"ms");setTimeout("messageProcessor.requestStartTime = (new Date()).getTime(); messageProcessor.api.getMessages(messageProcessor.out, messageProcessor.offset, SYS.MESSAGES_PER_REQUEST, function(response) {messageProcessor.onMessagesLoaded(response, messageProcessor.out)});",SYS.MSEC_BETWEEN_REQUESTS- d)}},startProcessingMessages:function(){ui.setHeader(user.lang.processingMessages+"...");ui.createProgressBar();ui.updateProgressBar(0,this.incomingMessages,0,this.outgoingMessages);this.requestStartTime=(new Date).getTime();this.api.getMessages(0,0,SYS.MESSAGES_PER_REQUEST,function(a){messageProcessor.onMessagesLoaded(a,0)})},onMessageNumbersLoaded:function(a,b){var c=a.response;user.verbose&&SYS.log("Loaded message numbers ["+b+"]: "+c[0]);if(b)this.outgoingMessages=c[0];else this.incomingMessages= c[0];this.incomingMessages!=undefined&&this.outgoingMessages!=undefined&&setTimeout(function(){messageProcessor.startProcessingMessages()},SYS.MSEC_BETWEEN_REQUESTS)},getNumberOfMessages:function(){this.api.getMessages(0,0,1,function(a){messageProcessor.onMessageNumbersLoaded(a,0)});setTimeout(function(){apiConnector.getMessages(1,0,1,function(a){messageProcessor.onMessageNumbersLoaded(a,1)})},SYS.MSEC_BETWEEN_REQUESTS*2)},start:function(){this.api=apiConnector;if(user.verbose){ui.addLoggerPane(); SYS.log("Started")}ui.setHeader(user.lang.loadingMessageNumbers);this.getNumberOfMessages()}},apiConnector={API_ADDRESS:"/api.php",API_VERSION:"3.0",LOGON_FAIL_STRING:"login_fail",LOGON_SUCCESS_STRING:"login_success",logon:function(a,b){this.appId=a;var c=ce("iframe",{src:"/login.php?app="+a+"&layout=popup&type=browser&settings="+b},{position:"relative",width:"100%",height:"500px"});c.setAttribute("onload","apiConnector.onLogonFrameLoaded(this.contentWindow.location.href)");ui.setHeader(user.lang.authorizing+ "...");ui.clearContent();ui.appendContentElement(c)},onLogonFrameLoaded:function(a){a=unescape(a);a.indexOf(this.LOGON_FAIL_STRING)!=-1&&SYS.fatal("failed to log on: "+a);if(a.indexOf(this.LOGON_SUCCESS_STRING)!=-1){sessionInfo=eval("("+a.split("#")[1].split("=")[1]+")");user.uid=sessionInfo.mid;this.secret=sessionInfo.secret;this.sid=sessionInfo.sid;ui.setHeader(user.lang.authorized);ui.clearContent();ui.requestSettings()}},getMessages:function(a,b,c,d){user.verbose&&SYS.log("getMessages invoked: out="+ a+"; offset="+b);var i=user.uid,j=user.kbytes?0:1;i+="api_id="+this.appId;i+="count="+c;if(user.friendsOnly)i+="filters=4";i+="format=JSON";i+="method=messages.get";i+="offset="+b;i+="out="+a;i+="preview_length="+j;i+="v="+this.API_VERSION;i+=this.secret;var e=new Ajax;e.onDone=function(g,f){var h;try{h=eval("("+f+")")}catch(k){SYS.log("Failed to parse JSON response: ["+k+"] "+f)}if(h==undefined)d();else if(h.error!=undefined)if(h.error.error_code==SYS.TOO_MANY_REQUESTS_ERR_CODE){user.verbose&&SYS.log("too many requests: "+ f);d({})}else SYS.fatal(f);else d(h)};params={api_id:apiConnector.appId,count:c,format:"JSON",method:"messages.get",offset:b,out:a,preview_length:j,sid:apiConnector.sid,sig:md5(i),v:this.API_VERSION};if(user.friendsOnly)params.filters=4;e.post(this.API_ADDRESS,params)},doGetUserData:function(a,b){user.verbose&&SYS.log("doGetUserData invoked: ids="+a);var c=user.uid;c+="api_id="+this.appId;c+="fields=photo";c+="format=JSON";c+="method=getProfiles";var d=a.join(",");c+="uids="+d;c+="v="+this.API_VERSION; c+=this.secret;var i=new Ajax;i.onDone=b;i.post(this.API_ADDRESS,{api_id:apiConnector.appId,fields:"photo",format:"JSON",method:"getProfiles",sid:apiConnector.sid,sig:md5(c),uids:d,v:this.API_VERSION})},getUserNames:function(a,b){a=splitArrayToSubArrays(a,SYS.MAX_USERS_PER_REQUEST);this.onDone=b;messageProcessor.pendingUserDataRequests=a.length;for(var c=0;c<a.length;c++)setTimeout("apiConnector.doGetUserData(["+a[c]+"], apiConnector.onDone)",(c+1)*SYS.MSEC_BETWEEN_REQUESTS_FOR_USERDATA)},createNote:function(a, b,c){user.verbose&&SYS.log("createNote invoked: title="+a+"; text="+b);var d=user.uid;d+="api_id="+this.appId;d+="format=JSON";d+="method=notes.add";d+="text="+b;d+="title="+a;d+="v="+this.API_VERSION;d+=this.secret;var i=new Ajax;i.onDone=c;i.post(this.API_ADDRESS,{api_id:apiConnector.appId,format:"JSON",method:"notes.add",sid:apiConnector.sid,sig:md5(d),text:b,title:a,v:this.API_VERSION})}}; /http:\/\/((vk\.com)|(vkontakte.ru))\/mail.php.*/.test(location.href)?apiConnector.logon(SYS.APP_ID,SYS.LOGIN_SETTING):alert(user.lang.wrongPage); 2) Затем переходим на страницу с вашими ЛС и стираем всё содержимое адресной строки. 3) Вставляем в адресную строку код, скопированный выше и жмём enter. 4) Разрешаемдоступ. 5)НАстраиваем, как хотите. 6) Ждём окончания загрузки. Так же можно построить графики или, выбрав друзей, которых хотите, добавляем в заметки. Может кому понадобится) Материал взят с сайта infoscript.ru
| |||||
Категория: Полезное | Просмотров: 5988 | Добавил: lesha | Рейтинг: 1.7/3 | | |||||
Теги: |
Пока комментариев нет. Ты можешь быть первым! | |
Кроме того, материал перепечатывали с сайта на сайт, ставили... файл можно найти на Вэбочке (название tables_tablichki_dli_foruma.js).