1var $ace = $ace || { }; 2 3$ace.blockOnline = { 4 title:'', 5 subtitle:'', 6 head:'', 7 info:'', 8 options:{}, 9 list:[], 10 11 request:function () { 12 var $that = $ace.blockOnline; 13 var params = { 14 security_ls_key:LIVESTREET_SECURITY_KEY, 15 users_max:$that.options['users_max'], 16 users_period:$that.options['users_period'], 17 renew_time:$that.options['renew_time'], 18 avatar_size:$that.options['avatar_size'] 19 }; 20 21 ls.ajax('usersonline', params, function (result) { 22 if (result && !result.bStateError) { 23 $that.onLoad(result); 24 } 25 }); 26 27 }, 28 29 onLoad:function (result) { 30 var $that = $ace.blockOnline; 31 if (!result) { 32 //msgErrorBox.alert('Error','Please try again later'); 33 } 34 if (result.bStateError) { 35 //msgErrorBox.alert(result.sMsgTitle,result.sMsg); 36 } else { 37 $that.head.text($that.title + ' (' + (result.nUsersTotal) + ')'); 38 $that.info.css('visibility', '') 39 .find('.online_info_regs').text(result.nUsersCount); 40 $that.info.find('.online_info_guests').text(result.nUsersTotal - result.nUsersCount); 41 42 $that.list.empty(); 43 $.each(result.aUsersOnline, function(index, item) { 44 var div_name = '', div_avatar = '', div_last = ''; 45 46 if ($that.options['show_compact_mode']) $that.list.addClass('compact'); 47 else $that.list.removeClass('compact'); 48 /* 49 if ($that.options['show_last_time']) { 50 var div_last = '<span class="block_online_last">' + item.last + '</span>'; 51 } 52 if ($that.options['show_username']) { 53 div_name = 54 '<span class="block_online_name">' 55 + '<a href="' + item.link + '">' + ($that.options['show_login_only'] ? item.login : item.name) + '</a>' 56 + '</span>'; 57 } 58 if ($that.options['avatar_size'] > 0) { 59 var title = item.name + ' [' + item.last + ']'; 60 div_avatar = 61 '<span class="block_online_avatar">' 62 + '<a href="' + item.link + '"><img src="' + item.avatar + '" alt="' + item.name + '" title="' + title + '"/></a>' 63 + '</span>'; 64 } 65 //$that.list.append($('<li style="display:inline;"></li>').html(div_last + div_avatar + div_name)); 66 */ 67 var li = $('<li style="display:inline;"> </li>'); 68 if ($that.options['show_last_time'] && !$that.options['show_compact_mode']) { 69 li.append($('<nobr>
69<img src="https://alex-odessa.com/templates/skin/jupiter/images/userinfo.gif" height="12" width="12"> <span class="stream-topic1">' + item.last + ',</span></nobr>')); 70 } 71 if ($that.options['show_username']) { 72 li.append($( 73 '<nobr><img src="https://alex-odessa.com/templates/skin/jupiter/images/userinfo.gif" height="12" width="12"> <span class="stream-topic1">' 74 + '<a href="' + item.link + '">' + ($that.options['show_login_only'] ? item.login : item.name) + '</a>' 75 + ',</span></nobr>')); 76 } 77 if ($that.options['avatar_size'] > 0) { 78 var title = item.name + ' [' + item.last + ']'; 79 li.append($( 80 '<span class="block_online_avatar">' 81 + '<a href="' + item.link + '"><img src="' + item.avatar + '" alt="' + item.name + '" title="' + title + '"/></a>' 82 + '</span>')); 83 } 84 $that.list.append(li); 85 }); 86 if ($that.options['renew_time'] > 0) setTimeout($that.request, 1000 * $that.options['renew_time']); 87 } 88 } 89}; 90 91 92$(function () { 93 $ace.blockOnline.head = $('.block.usersonline header h3').first(); 94 $ace.blockOnline.info = $('#block_online_info').first(); 95 $ace.blockOnline.list = $('#block_online_list').first(); 96 $ace.blockOnline.request(); 97});
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.