petem
New Member
Posts: 30
inherit
76061
0
Sept 17, 2007 10:48:19 GMT -8
petem
30
April 2006
petem
|
Post by petem on Apr 5, 2006 7:03:13 GMT -8
Forum URL: petem.proboards75.comJust wondered is there anyway for me and my moderators to still be ranked, as the moderator title takes over the ranking at the moment!!! Thanks for the help Pete
|
|
Blaze
New Member
Posts: 64
inherit
129984
0
Nov 14, 2011 3:57:56 GMT -8
Blaze
64
August 2008
obieglo
|
Post by Blaze on Apr 5, 2006 7:33:47 GMT -8
Forum URL: petem.proboards75.comJust wondered is there anyway for me and my moderators to still be ranked, as the moderator title takes over the ranking at the moment!!! Thanks for the help Pete Take a look at this code or this one. First one replaces the members group, the second one adds the ranking below the members group.
|
|
petem
New Member
Posts: 30
inherit
76061
0
Sept 17, 2007 10:48:19 GMT -8
petem
30
April 2006
petem
|
Post by petem on Apr 5, 2006 7:39:47 GMT -8
Thank you, the second one is ideal for what I want!!!
However I copied and pasted it into my global header, and it hasn't worked!! Do you have any idea why? Is there anything I need to change??
|
|
Blaze
New Member
Posts: 64
inherit
129984
0
Nov 14, 2011 3:57:56 GMT -8
Blaze
64
August 2008
obieglo
|
Post by Blaze on Apr 5, 2006 7:42:28 GMT -8
If you click on the first link, you can read an explanation for the code and what to edit.
|
|
petem
New Member
Posts: 30
inherit
76061
0
Sept 17, 2007 10:48:19 GMT -8
petem
30
April 2006
petem
|
Post by petem on Apr 5, 2006 8:25:12 GMT -8
<script type="text/javascript"> <!-- /* use ranks in addition to member group names in miniprofile by california */
var starImg = "http://www.4d5.net/v4images/star.gif"; var exceptionList = "username1, username2, username3"; // do not leave blank var userRanks = [ ['New Member', 0], ['Junior Member', 50], ['Full Member', 100], ['Senior Member', 250], ['God', 500] // last line doesn't get a comma ];
var iCell = document.getElementsByTagName("td"); var exceptStr = ")|user=("+exceptionList.replace(/,\s?/g, '|')+")"; var pStr = '(<br\\s?\\/?>('+userRanks.join('|').replace(/,\d+/g, '')+exceptStr+')'; var rankRe = new RegExp(pStr, 'i'); if(location.href.match(/on=(displ|search2|viewpr|pmv|(user)?rece|cal\w+iew)/)){ for(m=0; m<iCell.length; m++){ var c = iCell[m].innerHTML; if(iCell[m].width == "20%" && !c.match(rankRe) && c.match(/Posts: ([\d,]+)/)){ var nPosts = parseInt(RegExp.$1.replace(/,/g, '')); var fBold = iCell[m].getElementsByTagName("b")[0]; var rNum = 0; for(u=0; u<userRanks.length+1; u++){ if(u == userRanks.length || nPosts < userRanks[1]){ rNum = u-1; break; } } var rImg = iCell[m].getElementsByTagName("img"); var rFrag = document.createDocumentFragment(); rFrag.appendChild(document.createElement("br")); rFrag.appendChild(document.createTextNode(userRanks[rNum][0])); rFrag.appendChild(document.createElement("br")); for(s=0; s<rNum+1; s++){ with(rFrag.appendChild(new Image())){ src = starImg; alt = "*"; } } var mpBr2 = iCell[m].getElementsByTagName("br")[2]; mpBr2.parentNode.insertBefore(rFrag, mpBr2); } } }
// --> </script>
Sorry but I still dont under stand which bits I have to change and what to put in!! I do however understand that I will have to change the rankin bit to fit my ranking system but what else do i have to change?? Please could you highlight it for me!!
Thanks
|
|
Blaze
New Member
Posts: 64
inherit
129984
0
Nov 14, 2011 3:57:56 GMT -8
Blaze
64
August 2008
obieglo
|
Post by Blaze on Apr 5, 2006 8:31:10 GMT -8
<script type="text/javascript"> <!-- /* use ranks in addition to member group names in miniprofile by california */ var starImg = " URL TO STAR IMAGE";; var exceptionList = "username1, username2, username3"; // do not leave blank var userRanks = [ ['New Member', 0], ['Junior Member', 50], ['Full Member', 100], ['Senior Member', 250], ['God', 500] // last line doesn't get a comma]; var iCell = document.getElementsByTagName("td"); var exceptStr = ")|user=("+exceptionList.replace(/,\s?/g, '|')+")"; var pStr = '(<br\\s?\\/?>('+userRanks.join('|').replace(/,\d+/g, '')+exceptStr+')'; var rankRe = new RegExp(pStr, 'i'); if(location.href.match(/on=(displ|search2|viewpr|pmv|(user)?rece|cal\w+iew)/)){ for(m=0; m<iCell.length; m++){ var c = iCell[m].innerHTML; if(iCell[m].width == "20%" && !c.match(rankRe) && c.match(/Posts: ([\d,]+)/)){ var nPosts = parseInt(RegExp.$1.replace(/,/g, '')); var fBold = iCell[m].getElementsByTagName("b")[0]; var rNum = 0; for(u=0; u<userRanks.length+1; u++){ if(u == userRanks.length || nPosts < userRanks [1]){ rNum = u-1; break; } } var rImg = iCell[m].getElementsByTagName("img"); var rFrag = document.createDocumentFragment(); rFrag.appendChild(document.createElement("br")); rFrag.appendChild(document.createTextNode(userRanks[rNum][0])); rFrag.appendChild(document.createElement("br")); for(s=0; s<rNum+1; s++){ with(rFrag.appendChild(new Image())){ src = starImg; alt = "*"; } } var mpBr2 = iCell[m].getElementsByTagName("br")[2]; mpBr2.parentNode.insertBefore(rFrag, mpBr2); } } }
// --> </script>
Sorry but I still dont under stand which bits I have to change and what to put in!! I do however understand that I will have to change the rankin bit to fit my ranking system but what else do i have to change?? Please could you highlight it for me!!
ThanksYou have to edit the red parts. The first will have your link to an image, the second will be a list of all of your members ranks and there post number behind it. Note: there may not be a group called "members" in that section.
|
|
Lizzy
New Member
Posts: 42
inherit
64311
0
Jul 15, 2010 18:02:15 GMT -8
Lizzy
42
November 2005
lizzy8
|
Post by Lizzy on Apr 5, 2006 11:11:56 GMT -8
I know this isn't my thread, but I'm trying to do this same thing and didn't want to start a brand new thread. Is there a way to make this code only apply to one group? ie. JUST the mods and not the admin?
|
|
inherit
Proboards Legend
12897
0
Oct 16, 2016 6:49:45 GMT -8
Snakeair
I don't know what to write here.
40,721
August 2003
snakeair
|
Post by Snakeair on Apr 5, 2006 11:31:07 GMT -8
Please make a thread in the coding support board to get help on coding problems. The board is in the coding and designs board.
|
|
Lizzy
New Member
Posts: 42
inherit
64311
0
Jul 15, 2010 18:02:15 GMT -8
Lizzy
42
November 2005
lizzy8
|
Post by Lizzy on Apr 5, 2006 11:38:26 GMT -8
Please make a thread in the coding support board to get help on coding problems. The board is in the coding and designs board. okie, thanks
|
|
Blaze
New Member
Posts: 64
inherit
129984
0
Nov 14, 2011 3:57:56 GMT -8
Blaze
64
August 2008
obieglo
|
Post by Blaze on Apr 5, 2006 11:46:45 GMT -8
You should ask here since this is the place where the code has been made.
|
|
petem
New Member
Posts: 30
inherit
76061
0
Sept 17, 2007 10:48:19 GMT -8
petem
30
April 2006
petem
|
Post by petem on Apr 6, 2006 4:46:12 GMT -8
i have edited the bits in red to fit my board, so now what???
<script type="text/javascript"> <!-- /* use ranks in addition to member group names in miniprofile by california */
var starImg = "http://s3.images.proboards.com/starblue.gif";; var exceptionList = "username1, username2, username3"; // do not leave blank var userRanks = [ ['Primary School Champion', 1], [‘High School Champion’, 4], [‘Town Champion’, 8], [‘County Champion, 10], [‘National Finalist’, 20], [‘National Medalist’, 35], ['National Champion’, 50], [‘Wolrd Youth Champion’, 75], [‘AAA's Champion’, 100], [‘World Junior Champion’, 150], [‘European Champion’, 200], [‘Commenwealth Champion’, 250], [‘Olympic Medalist’, 300], [‘Wolrd Champion’, 400], [‘WR Holder’, 500], [‘Olympic Champion’, 600], [‘Double WR Holder’, 700], ['Double Olympic Champion', 800], ['Superhuman', 900], ['God', 1000] // last line doesn't get a comma ]; var iCell = document.getElementsByTagName("td"); var exceptStr = ")|user=("+exceptionList.replace(/,\s?/g, '|')+")"; var pStr = '(<br\\s?\\/?>('+userRanks.join('|').replace(/,\d+/g, '')+exceptStr+')'; var rankRe = new RegExp(pStr, 'i'); if(location.href.match(/on=(displ|search2|viewpr|pmv|(user)?rece|cal\w+iew)/)){ for(m=0; m<iCell.length; m++){ var c = iCell[m].innerHTML; if(iCell[m].width == "20%" && !c.match(rankRe) && c.match(/Posts: ([\d,]+)/)){ var nPosts = parseInt(RegExp.$1.replace(/,/g, '')); var fBold = iCell[m].getElementsByTagName("b")[0]; var rNum = 0; for(u=0; u<userRanks.length+1; u++){ if(u == userRanks.length || nPosts < userRanks[1]){ rNum = u-1; break; } } var rImg = iCell[m].getElementsByTagName("img"); var rFrag = document.createDocumentFragment(); rFrag.appendChild(document.createElement("br")); rFrag.appendChild(document.createTextNode(userRanks[rNum][0])); rFrag.appendChild(document.createElement("br")); for(s=0; s<rNum+1; s++){ with(rFrag.appendChild(new Image())){ src = starImg; alt = "*"; } } var mpBr2 = iCell[m].getElementsByTagName("br")[2]; mpBr2.parentNode.insertBefore(rFrag, mpBr2); } } }
// --> </script>
|
|
petem
New Member
Posts: 30
inherit
76061
0
Sept 17, 2007 10:48:19 GMT -8
petem
30
April 2006
petem
|
Post by petem on Apr 6, 2006 6:52:39 GMT -8
y doesn't the above code work??? please help
|
|
#eb7100
1480
0
1
May 10, 2024 4:10:55 GMT -8
Craig
208,885
September 2001
cmdynasty
|
Post by Craig on Apr 6, 2006 16:37:57 GMT -8
var starImg = "http://s3.images.proboards.com/starblue.gif";; var exceptionList = "username1, username2, username3"; // do not leave blank var userRanks = [ ['Primary School Champion', 1], ['High School Champion', 4], ['Town Champion', 8], ['County Champion', 10], ['National Finalist', 20], ['National Medalist', 35], ['National Champion', 50], ['Wolrd Youth Champion', 75], ['AAA\'s Champion', 100], ['World Junior Champion', 150], ['European Champion', 200], ['Commenwealth Champion', 250], ['Olympic Medalist', 300], ['Wolrd Champion', 400], ['WR Holder', 500], ['Olympic Champion', 600], ['Double WR Holder', 700], ['Double Olympic Champion', 800], ['Superhuman', 900], ['God', 1000] // last line doesn't get a comma ];
if you are going to add a rank containing a ', then add a \ before it. eg don\'t
|
|
petem
New Member
Posts: 30
inherit
76061
0
Sept 17, 2007 10:48:19 GMT -8
petem
30
April 2006
petem
|
Post by petem on Apr 10, 2006 7:33:33 GMT -8
petem.proboards75.com<script type="text/javascript"> <!-- var keep = 'yes'; star = 'http://proboards8.com/images/star.gif'; ['Primary School Champion', 1], [‘High School Champion’, 3], [‘Town Champion’, 7], [‘County Champion, 10], [‘National Finalist’, 20], [‘National Medalist’, 30], ['National Champion’, 40], [‘Wolrd Youth Champion’, 50], [‘AAA\'s Champion’, 75], [‘World Junior Champion’, 100], [‘European Champion’, 125], [‘Commenwealth Champion’, 150], [‘Olympic Medalist’, 175], [‘Wolrd Champion’, 200], [‘WR Holder’, 250], [‘Olympic Champion’, 300], [‘Double WR Holder’, 400], ['Double Olympic Champion', 500], ['Superhuman', 750], ['God', 1000] ]; td = document.getElementsByTagName("td"); for(i=0; i<td.length; i++) { if(td .width == '20%' && td.innerHTML.match(/group/i) && td.parentNode.innerHTML.match(/Posts: (.+?)</)) { posts = parseInt(RegExp.$1.replace(/,/g,'')); newRank = document.createElement('div'); for(r=rank.length-1; r>=0; r--) { if(posts >= rank[r][2]) { newRank.appendChild(document.createElement('br')); newRank.appendChild(document.createTextNode(rank[r][0])); newRank.appendChild(document.createElement('br')); for(z=0; z<rank[r][1]; z++) { newRank.appendChild(document.createElement('img')); newRank.lastChild.src = star; } newRank.appendChild(document.createElement('br')); break; } } if(keep.toLowerCase() == 'no') { td.innerHTML = td.innerHTML.replace(/<br>(.+?)<br><img(.+?)<br>/i,newRank.innerHTML) } else { td.innerHTML = td.innerHTML.replace(/<br><img(.+?)<br>/i,'<br><img$1' +newRank.innerHTML) } } } //--> </script>
Right, I have tried everything I can possibly think of with this code and still can't get it to work!!!!!
Has anybody got any idea's as it is really starting to annoy me!
|
|
inherit
"support Goddess"
59854
0
Oct 16, 2007 9:22:41 GMT -8
Ms PiXie
have a nice day :)
7,823
September 2005
pixiestix
|
Post by Ms PiXie on Apr 10, 2006 7:39:11 GMT -8
petem.proboards75.com<script type="text/javascript"> <!-- var keep = 'yes'; star = 'http://proboards8.com/images/star.gif'; ['Primary School Champion', 1], [‘High School Champion’, 3], [‘Town Champion’, 7], [‘County Champion, 10], [‘National Finalist’, 20], [‘National Medalist’, 30], ['National Champion’, 40], [‘Wolrd Youth Champion’, 50], [‘AAA\'s Champion’, 75], [‘World Junior Champion’, 100], [‘European Champion’, 125], [‘Commenwealth Champion’, 150], [‘Olympic Medalist’, 175], [‘Wolrd Champion’, 200], [‘WR Holder’, 250], [‘Olympic Champion’, 300], [‘Double WR Holder’, 400], ['Double Olympic Champion', 500], ['Superhuman', 750], ['God', 1000] ]; td = document.getElementsByTagName("td"); for(i=0; i<td.length; i++) { if(td .width == '20%' && td.innerHTML.match(/group/i) && td.parentNode.innerHTML.match(/Posts: (.+?)</)) { posts = parseInt(RegExp.$1.replace(/,/g,'')); newRank = document.createElement('div'); for(r=rank.length-1; r>=0; r--) { if(posts >= rank[r][2]) { newRank.appendChild(document.createElement('br')); newRank.appendChild(document.createTextNode(rank[r][0])); newRank.appendChild(document.createElement('br')); for(z=0; z<rank[r][1]; z++) { newRank.appendChild(document.createElement('img')); newRank.lastChild.src = star; } newRank.appendChild(document.createElement('br')); break; } } if(keep.toLowerCase() == 'no') { td.innerHTML = td.innerHTML.replace(/<br>(.+?)<br><img(.+?)<br>/i,newRank.innerHTML) } else { td.innerHTML = td.innerHTML.replace(/<br><img(.+?)<br>/i,'<br><img$1' +newRank.innerHTML) } } } //--> </script>
Right, I have tried everything I can possibly think of with this code and still can't get it to work!!!!!
Has anybody got any idea's as it is really starting to annoy me! Please make a thread in the coding support board to get help on coding problems. The board is in the coding and designs board. as snake said,post this issue in code support ,click here
|
|