Yeah it is custom codded by Shawn any chance shawn that you can make it opensource though you have to link back to DigitalPoint in footer ?please
There's already an entire discussion that's been taking place about the Digital Point Spy - might be worth a look
http://forums.digitalpoint.com/showpost.php?p=1336181&postcount=94 http://forums.digitalpoint.com/showpost.php?p=1336214&postcount=95
oh and btw guys i found a spy mod for vb which is same like Shawn spy mod http://www.vbulletin.org/forum/showthread.php?t=125947 Enjoy!
Someone was bound to do it... But I wonder if it's possible they lifted as most of it from me by chance considering everything is the same? hah From my source: <script language="javascript" src="clientscript/digitalpoint_prototype.js"></script> <script language="javascript" src="clientscript/digitalpoint_effects.js"></script> <script language="javascript" src="clientscript/digitalpoint_spy.js"></script> <script language="javascript"> spymax = 25; </script> <title>Digital Point Forum Spy</title> </head> <body onload="init()"> Code (markup): Theirs: </script> <script language="javascript" src="clientscript/va_prototype.js"></script> <script language="javascript" src="clientscript/va_effects.js"></script> <script language="javascript" src="clientscript/va_spy.js"></script> <script language="javascript"> spymax = 25; </script> <title>ViperAlley iSpy</title> </head> <body onload="init();"> Code (markup): My JavaScript: var spymax; var play = 1; var whats = new Array(); var titles = new Array(); var previews = new Array(); var whos = new Array(); var threadids = new Array(); var postids = new Array(); var userids = new Array(); var spyids = new Array(); var forumids = new Array(); var forumnames = new Array(); var highestid = 0; var fadetime = .25; var pushtime = 1500; var fadetime_end = 1.5; var pushtime_end = 4000 var initalfill_flag = 0; function init() { if (is_ie) { // IE is dog crap // First run, let's add cells to rows for (i = spymax; i >= 1; i--){ document.getElementById("spy_table").rows[i].insertCell(); document.getElementById("spy_table").rows[i].insertCell(); document.getElementById("spy_table").rows[i].insertCell(); // document.getElementById("spy_table").style.background = '#FF0000'; if (i + 5 > spymax) { document.getElementById("spy_table").rows[i].cells[0].style.filter = 'alpha(opacity=' + (((spymax - i) * 20) + 5) + ')'; document.getElementById("spy_table").rows[i].cells[1].style.filter = 'alpha(opacity=' + (((spymax - i) * 20) + 5) + ')'; document.getElementById("spy_table").rows[i].cells[2].style.filter = 'alpha(opacity=' + (((spymax - i) * 20) + 5) + ')'; // document.getElementById("spy_table").rows[i].className = "alt1"; // document.getElementById("spy_table").rows[i].style.background = '#EAF4E9'; // document.getElementById("spy_table").rows[i].cells[1].style.display = "none"; // document.getElementById("spy_table").rows[i].cells[2].style.display = "none"; } } } getXML(); } function pauseSpy() { var playimg = document.getElementById("vsplay"); var pauseimg = document.getElementById("vspause"); playimg.src = "images/misc/play_up.gif"; playimg.alt = "Click to Play"; pauseimg.src = "images/misc/pause_down.gif"; pauseimg.alt = "Paused..."; pause(); } function playSpy() { var playimg = document.getElementById("vsplay"); var pauseimg = document.getElementById("vspause"); playimg.src = "images/misc/play_down.gif"; playimg.alt = "Playing..."; pauseimg.src = "images/misc/pause_up.gif"; pauseimg.alt = "Click to Pause"; resume(); } function pause() { play = 0; } function resume() { play = 1; } function getXML() { if (highestid > 0) { var querystring = "do=xml&last=" + highestid; } else { var querystring = "do=xml"; } if (document.getElementById("subscribed_flag").checked) { querystring = querystring + "&subscribed=1"; } querystring = querystring + '&r=' + Math.random(); var url = "spy.php"; var myAjax = null; myAjax = new Ajax.Request( url, { method: 'get', asynchronous: true, parameters: querystring, onComplete: processXML }); } function processXML(request) { var events; var event; try { events = request.responseXML.getElementsByTagName("events")[0]; event = events.getElementsByTagName("event"); } catch (e) { setTimeout("getXML()", 30000); return; } for (i = 0; i < event.length; i++) { try { whats[i] = event[i].getElementsByTagName("what")[0].firstChild.nodeValue; } catch (e) { whats[i] = "Who Knows"; } try { titles[i] = event[i].getElementsByTagName("title")[0].firstChild.nodeValue; } catch (e) { titles[i] = ""; } try { previews[i] = event[i].getElementsByTagName("preview")[0].firstChild.nodeValue; } catch (e) { previews[i] = ""; } try { whos[i] = event[i].getElementsByTagName("who")[0].firstChild.nodeValue; } catch (e) { whos[i] = "Anonymous"; } try { threadids[i] = event[i].getElementsByTagName("threadid")[0].firstChild.nodeValue; } catch (e) { threadids[i] = ""; } try { postids[i] = event[i].getElementsByTagName("postid")[0].firstChild.nodeValue; } catch (e) { postids[i] = ""; } try { userids[i] = event[i].getElementsByTagName("userid")[0].firstChild.nodeValue; } catch (e) { userids[i] = ""; } try { spyids[i] = event[i].getElementsByTagName("id")[0].firstChild.nodeValue; } catch (e) { spyids[i] = 1; } try { forumids[i] = event[i].getElementsByTagName("forumid")[0].firstChild.nodeValue; } catch (e) { forumids[i] = 1; } try { forumnames[i] = event[i].getElementsByTagName("forumname")[0].firstChild.nodeValue; } catch (e) { forumnames[i] = 1; } } push(); } function push() { if (play == 0) { setTimeout("push()", 1000); return; } var cell; var cellnext; var text; var clip; var who_clip = ''; var where = ''; var post_url; var style = ""; var what = whats.pop(); var title = titles.pop(); var preview = previews.pop(); var who = whos.pop(); var threadid = threadids.pop(); var postid = postids.pop(); var userid = userids.pop(); var spyid = spyids.pop(); var forumid = forumids.pop(); var forumname = forumnames.pop(); highestid = Math.max(parseInt(spyid), highestid); if (vB_PHP_Emulator.prototype.stripos(what, 'Thread')) { post_url = 'showthread.php?t=' + threadid; } else { post_url = 'showthread.php?p=' + postid + '#post' + postid ; } if (what == 'New User') { clip = '<strong>New User Registration</strong>'; } else if(title.length == 0) { // Why?? clip = '<strong>Unknown</strong>'; } else { clip = '<strong><a href="' + post_url + '">' + title + '</a></strong>'; } if (preview.length > 0) clip = clip + '<br /><div class=\"smallfont\">' + preview + '</div>'; if (userid.length > 0) { who_clip = 'by <a href="member.php?u=' + userid + '">' + who + '</a>'; } if (parseInt(forumname.length) > 0) { if (who_clip.length > 0) where = '<br />'; where = where + '<strong><a href="forumdisplay.php?f=' + forumid + '">' + forumname + '</a></strong>'; } else { where = ''; } text = '<td class="alt1"><div class="smallfont"><strong>' + what + '</strong></div></td><td class="alt2"><div class="smallfont">' + who_clip + where + '</div></td><td class="alt1Active">' + clip + "</td>"; Element.setOpacity('row1', 0.0); if (is_ie) { // Because IE is a big pile of dog crap var split1 = vB_PHP_Emulator.prototype.stripos(text, '>') + 1; var split2 = vB_PHP_Emulator.prototype.stripos(text, '</td>'); var split3 = vB_PHP_Emulator.prototype.stripos(text, '>', split2 + 5) + 1; var split4 = vB_PHP_Emulator.prototype.stripos(text, '</td>', split3 + 1); var split5 = vB_PHP_Emulator.prototype.stripos(text, '>', split4 + 5) + 1; var split6 = vB_PHP_Emulator.prototype.stripos(text, '</td>', split5 + 1); for (i = (spymax - 1); i >= 1; i--) { cell = document.getElementById("spy_table").rows[i]; cellnext = document.getElementById("spy_table").rows[i + 1]; if (cell.innerHTML.length > 31) { cellnext.cells[0].innerHTML = cell.cells[0].innerHTML; cellnext.cells[1].innerHTML = cell.cells[1].innerHTML; cellnext.cells[2].innerHTML = cell.cells[2].innerHTML; cellnext.style.display = ''; } } document.getElementById("row1").cells[0].innerHTML = text.substring(split1, split2); document.getElementById("row1").cells[1].innerHTML = text.substring(split3, split4); document.getElementById("row1").cells[2].innerHTML = text.substring(split5, split6); } else { for (i = (spymax - 1); i >= 1; i--) { cell = document.getElementById("row" + i); cellnext = document.getElementById("row" + (i + 1)); if (cell.innerHTML != "") { cellnext.innerHTML = cell.innerHTML; cellnext.style.display = ''; } } document.getElementById("row1").innerHTML = text; } Effect.Appear('row1', { duration: fadetime }); if (whats.length > 0) { setTimeout("push()", pushtime); } else { fadetime = fadetime_end; pushtime = pushtime_end; setTimeout("getXML()", 5000); } } Code (javascript): Theirs: /* Prototype JavaScript framework, version 1.4.0 * (c) 2005 Sam Stephenson <sam@conio.net> * * Prototype is freely distributable under the terms of an MIT-style license. * For details, see the Prototype web site: http://prototype.conio.net/ * * Modified for vBulletin use. /*--------------------------------------------------------------------------*/ var spymax; var play = 1; var whats = new Array(); var titles = new Array(); var previews = new Array(); var posters = new Array(); var threadids = new Array(); var postids = new Array(); var userids = new Array(); var spyids = new Array(); var forumids = new Array(); var forumnames = new Array(); var views = new Array(); var replies = new Array(); var whens = new Array(); var lastposts = new Array(); var highestid = 0; var fadetime = .25; var pushtime = 1000; function init() { if (is_ie) { for (i = spymax; i >= 1; i--){ document.getElementById("spy_table").rows[i].insertCell(); document.getElementById("spy_table").rows[i].insertCell(); document.getElementById("spy_table").rows[i].insertCell(); document.getElementById("spy_table").rows[i].insertCell(); if (i + 5 > spymax) { document.getElementById("spy_table").rows[i].cells[0].style.filter = 'alpha(opacity=' + (((spymax - i) * 20) + 5) + ')'; document.getElementById("spy_table").rows[i].cells[1].style.filter = 'alpha(opacity=' + (((spymax - i) * 20) + 5) + ')'; document.getElementById("spy_table").rows[i].cells[2].style.filter = 'alpha(opacity=' + (((spymax - i) * 20) + 5) + ')'; document.getElementById("spy_table").rows[i].cells[3].style.filter = 'alpha(opacity=' + (((spymax - i) * 20) + 5) + ')'; } } } getXML(); } function pauseSpy() { var playimg = document.getElementById("vaplay"); var pauseimg = document.getElementById("vapause"); playimg.src = "images/misc/play_up.gif"; playimg.alt = "Click to Play"; pauseimg.src = "images/misc/pause_down.gif"; pauseimg.alt = "Paused..."; pause(); } function playSpy() { var playimg = document.getElementById("vaplay"); var pauseimg = document.getElementById("vapause"); playimg.src = "images/misc/play_down.gif"; playimg.alt = "Playing..."; pauseimg.src = "images/misc/pause_up.gif"; pauseimg.alt = "Click to Pause"; resume(); } function pause() { play = 0; } function resume() { play = 1; } function getXML() { if (highestid > 0) { var querystring = "do=xml&last=" + highestid; } else { var querystring = "do=xml"; } querystring = querystring + '&r=' + Math.random(); var url = "vaispy.php"; var myAjax = null; myAjax = new Ajax.Request( url, { method: 'get', asynchronous: true, parameters: querystring, onComplete: processXML }); } function processXML(request) { var events; var event; try { events = request.responseXML.getElementsByTagName("events")[0]; event = events.getElementsByTagName("event"); } catch (e) { setTimeout("getXML()", 5000); return; } for (i = 0; i < event.length; i++) { try { whats[i] = event[i].getElementsByTagName("what")[0].firstChild.nodeValue; } catch (e) { whats[i] = "Unknown"; } try { whens[i] = event[i].getElementsByTagName("when")[0].firstChild.nodeValue; } catch (e) { whens[i] = ""; } try { titles[i] = event[i].getElementsByTagName("title")[0].firstChild.nodeValue; } catch (e) { titles[i] = ""; } try { previews[i] = event[i].getElementsByTagName("preview")[0].firstChild.nodeValue; } catch (e) { previews[i] = ""; } try { posters[i] = event[i].getElementsByTagName("poster")[0].firstChild.nodeValue; } catch (e) { posters[i] = "Guest"; } try { threadids[i] = event[i].getElementsByTagName("threadid")[0].firstChild.nodeValue; } catch (e) { threadids[i] = ""; } try { postids[i] = event[i].getElementsByTagName("postid")[0].firstChild.nodeValue; } catch (e) { postids[i] = ""; } try { lastposts[i] = event[i].getElementsByTagName("lastpost")[0].firstChild.nodeValue; } catch (e) { lastposts[i] = ""; } try { userids[i] = event[i].getElementsByTagName("userid")[0].firstChild.nodeValue; } catch (e) { userids[i] = ""; } try { spyids[i] = event[i].getElementsByTagName("id")[0].firstChild.nodeValue; } catch (e) { spyids[i] = 1; } try { forumids[i] = event[i].getElementsByTagName("forumid")[0].firstChild.nodeValue; } catch (e) { forumids[i] = 1; } try { forumnames[i] = event[i].getElementsByTagName("forumname")[0].firstChild.nodeValue; } catch (e) { forumnames[i] = 1; } try { views[i] = event[i].getElementsByTagName("views")[0].firstChild.nodeValue; } catch (e) { views[i] = 1; } try { replies[i] = event[i].getElementsByTagName("replies")[0].firstChild.nodeValue; } catch (e) { replies[i] = 1; } } push(); } function push() { if (play == 0) { setTimeout("push()", 1000); return; } var cell; var cellnext; var text; var clip; var poster_clip = ''; var where = ''; var post_url; var style = ''; var what = whats.pop(); var when = whens.pop(); var title = titles.pop(); var preview = previews.pop(); var poster = posters.pop(); var threadid = threadids.pop(); var postid = postids.pop(); var userid = userids.pop(); var spyid = spyids.pop(); var forumid = forumids.pop(); var forumname = forumnames.pop(); var view = views.pop(); var numreplies = replies.pop(); var lastpost = lastposts.pop(); highestid = Math.max(parseInt(spyid), highestid); if (vB_PHP_Emulator.prototype.stripos(what, 'thread')) { post_url = 'showthread.php?t=' + threadid; } else { post_url = 'showthread.php?p=' + postid + '#post' + postid ; } if(title.length == 0) { clip = '<strong>Unknown</strong>'; } else { clip = '<strong><a href="' + post_url + '">' + title + '</a></strong>'; } if (preview.length > 0) { clip = clip + '<br /><div class=\"smallfont\">' + preview ; } clip = clip + ' (' + view + ' views, ' + numreplies + ' replies)</div>'; if (userid.length > 0) { poster_clip = '<a href="member.php?u=' + userid + '">' + poster + '</a>'; } poster_clip = poster_clip + '<br />' + when; if (parseInt(forumname.length) > 0) { where = where + '<strong><a href="forumdisplay.php?f=' + forumid + '">' + forumname + '</a></strong>'; } else { where = ''; } text = '<td class="alt1" align="center"><div class="smallfont"><strong>' + what + '</strong></div></td><td class="alt2"><div class="smallfont">' + poster_clip + '</div></td><td class="alt1Active">' + clip + '</td><td align="center" class="alt1"><div class="smallfont">' + where + '</div></td>'; Element.setOpacity('row1', 0.0); if (is_ie) { var split1 = vB_PHP_Emulator.prototype.stripos(text, '>') + 1; var split2 = vB_PHP_Emulator.prototype.stripos(text, '</td>'); var split3 = vB_PHP_Emulator.prototype.stripos(text, '>', split2 + 5) + 1; var split4 = vB_PHP_Emulator.prototype.stripos(text, '</td>', split3 + 1); var split5 = vB_PHP_Emulator.prototype.stripos(text, '>', split4 + 5) + 1; var split6 = vB_PHP_Emulator.prototype.stripos(text, '</td>', split5 + 1); var split7 = vB_PHP_Emulator.prototype.stripos(text, '>', split6 + 5) + 1; var split8 = vB_PHP_Emulator.prototype.stripos(text, '</td>', split7 + 1); for (i = (spymax - 1); i >= 1; i--) { cell = document.getElementById("spy_table").rows[i]; cellnext = document.getElementById("spy_table").rows[i + 1]; if (cell.innerHTML.length > 31) { cellnext.cells[0].innerHTML = cell.cells[0].innerHTML; cellnext.cells[1].innerHTML = cell.cells[1].innerHTML; cellnext.cells[2].innerHTML = cell.cells[2].innerHTML; cellnext.cells[3].innerHTML = cell.cells[3].innerHTML; cellnext.style.display = ''; } } document.getElementById("row1").cells[0].innerHTML = text.substring(split1, split2); document.getElementById("row1").cells[1].innerHTML = text.substring(split3, split4); document.getElementById("row1").cells[2].innerHTML = text.substring(split5, split6); document.getElementById("row1").cells[3].innerHTML = text.substring(split7, split8); } else { for (i = (spymax - 1); i >= 1; i--) { cell = document.getElementById("row" + i); cellnext = document.getElementById("row" + (i + 1)); if (cell.innerHTML != "") { cellnext.innerHTML = cell.innerHTML; cellnext.style.display = ''; } } document.getElementById("row1").innerHTML = text; } Effect.Appear('row1', { duration: fadetime }); if (whats.length > 0) { setTimeout("push()", pushtime); } else { setTimeout("getXML()", 7000); } } Code (javascript):
just found out this thread.. that's a one, Shawn.. now I don't need to hit the refresh button every 5 mins or so.. thanks