The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#2
|
||||
|
||||
![]()
Not sure if you wanted something like this, but this is what I've got.
On a fetch_musername hook, I've got a plugin with the following (more or less): PHP Code:
![]() HTML Code:
<script type="text/javascript"> function randint(len) {var chars = "0123456789"; if (!len) {len=8;} var randomstring = ''; for (var i=0; i<len; i++) {var rnum = Math.floor(Math.random() * chars.length); randomstring += chars.substring(rnum,rnum+1);} return randomstring;} function set_as_spastic(el,name,idstring) { var randid = 0; if (idstring) {randid = idstring;} else {randid = Math.floor(Math.random() * 102400);} el.id = 'spastic_username_container_' + randid; spastic_Timer[randid] = 0; spastic_Names[randid] = name; if (!idstring) {spastic_index[randid] = 0;} spastic_letters[randid] = name.split(""); spastic_Timers[randid] = setInterval("spastic_username("+randid+")", 50); } var spastic_Names = new Array(); var spastic_Timer = new Array(); var spastic_Timers = new Array(); var spastic_index = new Array(); var spastic_letters = new Array(); function spastic_username(idstring) { var colors = new Array('ff00ff', 'ff0099', 'ff0000', 'ff9900', 'ffff00', '99ff00', '00ff00', '00ff99', '00ffff', '0099ff', '0000ff', '9900ff'); var bgcolors = new Array('880088', '880033', '880000', '883300', '888800', '338800', '008800', '008833', '008888', '003388', '000088', '330088'); spastic_index[idstring]++; if (spastic_index[idstring] > colors.length-1) {spastic_index[idstring] = 0;} var temp_index = spastic_index[idstring]; var output = ''; for (var i=0; i<spastic_letters[idstring].length; i++) { if (temp_index > colors.length-1) {temp_index = 0;} output += '<span style="color:#'+colors[temp_index]+';background-color:#'+bgcolors[temp_index]+';">'+spastic_letters[idstring][i]+'</span>'; temp_index++; } document.getElementById('spastic_username_container_'+idstring).innerHTML = output; document.getElementById('spastic_username_container_'+idstring).onmouseover = new Function('pauseSpastic('+idstring+')'); document.getElementById('spastic_username_container_'+idstring).onmouseout = new Function('unpauseSpastic('+idstring+')'); } function pauseSpastic(idstring) {clearInterval(spastic_Timers[idstring]);} function unpauseSpastic(idstring) {set_as_spastic(document.getElementById('spastic_username_container_' + idstring),spastic_Names[idstring],idstring);} </script> |
Благодарность от: | ||
Lynne |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
![]() |
|
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|