inherit
King Oligochaete
126470
0
Feb 24, 2021 12:23:15 GMT -8
Wormopolis
Stop rating plugins with 1 star that dont deserve it.
20,002
June 2008
tbserialkillers
Wormo's Mini-Profile
|
Post by Wormopolis on Jan 18, 2010 18:04:25 GMT -8
Hey Todge... you rock.
|
|
#00AF33
Official Code Helper
19529
0
1
Nov 19, 2012 14:18:28 GMT -8
Todge
**
17,290
January 2004
todge
|
Post by Todge on Jan 19, 2010 9:54:21 GMT -8
I do?? Thank you.. You do too
|
|
inherit
*this CT deserves an achievement*
136400
0
Jun 25, 2021 18:23:00 GMT -8
Trill
hola
6,232
January 2009
ghbraingle
|
Post by Trill on Jan 19, 2010 17:01:09 GMT -8
You really do rock, Todge. I truly appreciate all the hard work you put into this! Thank you so much! ;D Now I know why you were voted "Best Coder"!
|
|
#00AF33
Official Code Helper
19529
0
1
Nov 19, 2012 14:18:28 GMT -8
Todge
**
17,290
January 2004
todge
|
Post by Todge on Jan 21, 2010 16:56:45 GMT -8
Here ya go.. This is (hopefully) the finished code.. <!-- Awards System --> <style type="text/css"> <!-- .nope { opacity: 0.5; filter:alpha(opacity=40); } .yep { opacity: 1.0; filter:alpha(opacity=100); } --> </style> <div id="peepAwards" class="windowbg" style="border: 1px solid black; width: 500px; height: 300px; position: fixed; padding: 5px; display: none;" align="center" onClick="this.style.display='none';"> <b id="peepName"></b> <hr width="80%"> <div id="theAwards"></div> </div>
<script type="text/javascript"> <!-- /* Awards system (for ッ T♪î‼) by Todge Copyright © 2009 Please keep this header intact */
// Edit Below...
var mods = /^(admin|mod1|mod2|mod3)$/; var cardcode = 'http://i802./yy303/iceblade_gh/cards/'; var awdInfo = new Array(126);
awdInfo[1] = "Merlin|The Wizard"; awdInfo[2] = "Cornelius Agrippa|The Alchemist"; awdInfo[3] = "Elfrida Clagg|Chiefteness of the Wizard's Council"; // Edit Above...
var awdimgs = new Array(); var awdsofar = '';
function popAwards(theAwards) { theAwards = theAwards.split('|'); document.getElementById('peepAwards').style.left = '200px'; document.getElementById('peepAwards').style.top = '100px'; document.getElementById('peepAwards').style.display = ''; if(document.all) { document.getElementById('peepAwards').style.position = 'absolute'; document.getElementById('peepAwards').style.top = document.body.scrollTop+100; } document.getElementById('peepName').innerHTML = theAwards[0]+"'s Awards"; document.getElementById('theAwards').innerHTML = '<img src="'+cardcode+parseInt('0x'+theAwards[1])+'.gif" width="50px">'; for(t=2; t<theAwards.length; t++) { document.getElementById('theAwards').innerHTML += '<img src="'+cardcode+parseInt('0x'+theAwards[t])+'.gif" width="50px">'; }}
// Get received awards from the mini-profile...
if(location.href.match(/action=(viewprofile|display)/)) { var miniPro = document.getElementsByTagName('td'); for(m=0; m<miniPro.length; m++) { if(miniPro[m].className.match(/windowbg/) && miniPro[m].width == '20%' && miniPro[m].innerHTML.match(/\[AWD\]/)) { awdsofar = miniPro[m].innerHTML.split(/\[AWD\]/)[1].split(/<br/i)[0]; var tr = 'AWD]'+awdsofar; tr = new RegExp(tr,'i'); if(location.href.match(/action=viewprofile/)) { miniPro[m].innerHTML = miniPro[m].innerHTML.replace(tr,'').replace(/br>\[<br/i,'br'); break; } else { var peep = miniPro[m].getElementsByTagName('a')[2].innerHTML; awdsofarlength = awdsofar.length-2; for(w=awdsofarlength; w>0; w=w-2) { awdsofar = awdsofar.replace(awdsofar.substring(0,w),awdsofar.substring(0,w)+'|'); } miniPro[m].innerHTML = miniPro[m].innerHTML.replace(tr,'<a href=javascript:popAwards("'+peep+'|'+awdsofar+'")>Awards</a>').replace(/br>\[/i,'br>'); }}} awdsofarlength = awdsofar.length-2; for(w=awdsofarlength; w>0; w=w-2) { awdsofar = awdsofar.replace(awdsofar.substring(0,w),awdsofar.substring(0,w)+'|'); }}
// Add award images to profile page..
if(location.href.match(/action=viewprofile/)) { var awardsCell = document.getElementsByTagName('td'); for(a=0; a<awardsCell.length; a++) { if(awardsCell[a].colSpan == '2' && awardsCell[a].innerHTML.match(/Recent Activity/)) { awardsCell = awardsCell[a].parentNode; break; }}
var newTR = document.createElement('TR'); var newTD = document.createElement('TD'); newTD.id = 'awards'; newTD.colSpan = 2; newTR.appendChild(newTD); var awardContent = '<font size="2"><b>Awards Received</b><hr size="1"></font><table width="100%"><tr><td align="center" width="66%" style="border-right: 1px solid black;">'; for(a=1; a<102; a++) { b=a-1; if(b.toString().match(/0$/)){ awardContent += '<br>';} if(a<16){ var awd = new RegExp('0'+a.toString(16)); awardContent += '<img '; if(awdsofar.search(awd) == -1){awardContent += 'class="nope" ';} awardContent += 'src="'+cardcode+a+'.gif" border="0" alt="'+awdInfo[a]+'" id="award'+0+a.toString(16)+'" width="9%">';} else{ var awd = new RegExp(a.toString(16)); awardContent += '<img '; if(awdsofar.search(awd) == -1){awardContent += 'class="nope" ';} awardContent += 'src="'+cardcode+a+'.gif" border="0" alt="'+awdInfo[a]+'" id="award'+a.toString(16)+'" width="9%">';} } awardContent += '<td/><td width="33%" valign="top" align="center"><br>'; for(a=102; a<awdInfo.length+1; a++){ var awd = new RegExp(a.toString(16)); awardContent += '<img '; if(awdsofar.search(awd) == -1){awardContent += 'class="nope" ';} awardContent += 'src="'+cardcode+a+'.gif" border="0" alt="'+awdInfo[a]+'" id="award'+a.toString(16)+'" width="18%">';} awardContent += '<br><br><div id="awardInfo"></div></td></tr></table>'; newTD.innerHTML += awardContent; awardsCell.parentNode.insertBefore(newTR,awardsCell);
// Add mouseover and onclick functions to the awards..
for(a=1; a<awdInfo.length+1; a++) { if(a<16){ var awd = 'award0'+a.toString(16);} else{ var awd = 'award'+a.toString(16);} document.getElementById(awd).onmouseover = function(){ document.getElementById('awardInfo').innerHTML = '<img src="'+this.src+'" width = "80%"><br><b>'+this.alt.replace('|','</b><br>');} if(pb_username.match(mods)){ document.getElementById(awd).style.cursor = 'pointer'; var modLink = document.links; for(m=0; m<modLink.length; m++) { if(modLink[m].href.match(/tion=modifyprofile/)) { modLink = modLink[m].href; break; }} document.getElementById(awd).onclick = function(){ location.href = modLink+'&award='+this.id.split('award')[1]; }}}}
// Add awards code to the Custom Title field..
if(document.modifyForm && document.modifyForm.customtitle && location.href.match(/&award=/)) { var td = document.getElementsByTagName('td'); for(t=0; t<td.length; t++) { if(td[t].className == 'titlebg' && td[t].width == '100%' && td[t].firstChild.innerHTML.match(/Modify Profile<\/b>/i)) { td[t].firstChild.innerHTML = 'Confirm Award'; var confTR = document.createElement('tr'); var confTD = document.createElement('td'); confTD.id = 'confirmation'; confTD.className = 'windowbg'; confTD.align = 'center'; confTR.appendChild(confTD); td[t+1].parentNode.parentNode.insertBefore(confTR,td[t+1].parentNode); }} var mForm = document.modifyForm; var inst = document.getElementsByTagName('font'); for(i=0; i<inst.length; i++) { if(inst[i].innerHTML.match(/The information you fill out on this page/) && inst[i].size == '2') { inst[i].parentNode.align = 'center'; inst[i].id = 'instructions'; }} var mTot = mForm.children.length; for(m=0; m<mTot-1; m++) { if(mForm.children[m].nodeName == 'INPUT' && mForm.children[m].value.match(/Modify Profile/)) { break; } else { mForm.children[m].style.display = 'none'; }} var modButton = document.getElementsByTagName('INPUT'); for(m=0; m<modButton.length; m++) { if(modButton[m].value.match(/Modify Profile/)) { modButton[m].value = 'Confirm'; modButton[m+1].style.display = 'none';
function goBack() { document.location.href = document.referrer; return; }
var cancel = document.createElement('a'); cancel.href = document.location.href.replace('modify','view').split('&award')[0]; cancel.innerHTML = '<input type="button" value="Cancel">'; cancel.onclck = function(){document.location.href = document.referrer;} modButton[m].parentNode.insertBefore(cancel,modButton[m+1]); }}
var award = location.href.split('&award=')[1]; var awdsofar = document.modifyForm.customtitle.value; awdsofarlength = awdsofar.length-2; for(w=awdsofarlength; w>4; w=w-2) { awdsofar = awdsofar.replace(awdsofar.substring(0,w),awdsofar.substring(0,w)+'|'); } if(awdsofar.match(/\[AWD\]/) && awdsofar.match(award)) { document.getElementById('instructions').innerHTML = document.getElementById('instructions').innerHTML.replace(/The information you fill out on this page will be used on various parts of this forum/,'You have chosen to remove this award from '+document.modifyForm.name.value) document.getElementById('instructions').innerHTML = document.getElementById('instructions').innerHTML.replace(/All required fields are marked with an asterisk \*/,'Please confirm or <a href="'+cancel.href+'">cancel</a> to return to the profile page'); awdsofar = awdsofar.replace(award,''); document.modifyForm.customtitle.value = awdsofar.replace(/\|/g,''); document.getElementById('confirmation').innerHTML = '<img src="'+cardcode+parseInt('0x'+award)+'.gif"><br><b>'+awdInfo[parseInt('0x'+award)].replace('|','<\/b><br>'); } else if(document.modifyForm.customtitle.value.match(/\[AWD\]/) && !document.modifyForm.customtitle.value.match(award)) { document.getElementById('instructions').innerHTML = document.getElementById('instructions').innerHTML.replace(/The information you fill out on this page will be used on various parts of this forum/,'You have chosen to give '+document.modifyForm.name.value+' this award.') document.getElementById('instructions').innerHTML = document.getElementById('instructions').innerHTML.replace(/All required fields are marked with an asterisk \*/,'Please confirm or <a href="'+cancel.href+'">cancel</a> to return to the profile page'); document.modifyForm.customtitle.value += award; document.getElementById('confirmation').innerHTML = '<img src="'+cardcode+parseInt('0x'+award)+'.gif"><br><b>'+awdInfo[parseInt('0x'+award)].replace('|','<\/b><br>'); } else { document.getElementById('instructions').innerHTML = document.getElementById('instructions').innerHTML.replace(/The information you fill out on this page will be used on various parts of this forum/,'You have chosen to give '+document.modifyForm.name.value+' this award.') document.getElementById('instructions').innerHTML = document.getElementById('instructions').innerHTML.replace(/All required fields are marked with an asterisk \*/,'Please confirm or <a href="'+cancel.href+'">cancel</a> to return to the profile page'); document.modifyForm.customtitle.value = '[AWD]'+award; document.getElementById('confirmation').innerHTML = '<img src="'+cardcode+parseInt('0x'+award)+'.gif"><br><b>'+awdInfo[parseInt('0x'+award)].replace('|','<\/b><br>'); }} // --> </script> Edit the name and description of the awards as before. This variable.. var mods = /^(admin|mod1|mod2|mod3)$/; is a list of all the moderators that you want to have the ability to give and take awards.. The confirmation screen has been tidied up. Also, when viewing posts, the mini-profiles should now have an 'Awards' link, clicking it should pop-up a window listing the awards for that member. Just click on the window to close it. Hope it suits your needs.
|
|
inherit
*this CT deserves an achievement*
136400
0
Jun 25, 2021 18:23:00 GMT -8
Trill
hola
6,232
January 2009
ghbraingle
|
Post by Trill on Jan 21, 2010 18:25:02 GMT -8
Thanks Todge. I love the idea about having a popup in the mini-profiles. However, there's either a minor bug or code conflict. I've been testing the awards with Gizmo (username) at ghbraingle.proboards.com and, when clicking on an award, the confirmation screen no longer displays, even when the award is listed in the array with a title/description. Some things in the 'modify profile' page change, like centering titles and "Confirm" appearing as the title. But the rest of the modify profile page still displays and the award confirmation doesn't appear. Also, this is probably a code conflict, but the awards link in the mini profile isn't appearing correctly. See gizmo's posts here for an example: ghbraingle.proboards.com/index.cgi?action=display&board=archives2&thread=783&page=1#5673Thank you! Love this code! ;D
|
|
inherit
144784
0
Aug 4, 2011 5:21:04 GMT -8
SilentDeath
232
August 2009
silentdeath1226
|
Post by SilentDeath on Jan 21, 2010 18:42:23 GMT -8
Can I use this!?
|
|
#00AF33
Official Code Helper
19529
0
1
Nov 19, 2012 14:18:28 GMT -8
Todge
**
17,290
January 2004
todge
|
Post by Todge on Jan 22, 2010 9:53:45 GMT -8
I have no problems with you using it silentdeath1226, as long as Trill doesn't mind either.. I will be making another version of this code that is a little less specialised for 'general' use (this was written specifically for Trill's needs) if you'd rather wait for that. Trill.. I think the code may be confliciting with this code.. /*Profile Editable Karma and Post Money - By iAlex - Open Source*/ Can you try switching the order those two appear in your footer, or disabling the above code to see if it solves your problems. Thanks.
|
|
inherit
144784
0
Aug 4, 2011 5:21:04 GMT -8
SilentDeath
232
August 2009
silentdeath1226
|
Post by SilentDeath on Jan 22, 2010 14:14:04 GMT -8
Todge, I do not mind waiting. Take your time. I do not mind. You can even wait till I am dead to release it. ;D LMAO jk.
|
|
inherit
*this CT deserves an achievement*
136400
0
Jun 25, 2021 18:23:00 GMT -8
Trill
hola
6,232
January 2009
ghbraingle
|
Post by Trill on Jan 23, 2010 12:53:48 GMT -8
I have no problems with you using it silentdeath1226, as long as Trill doesn't mind either.. I will be making another version of this code that is a little less specialised for 'general' use (this was written specifically for Trill's needs) if you'd rather wait for that. Trill.. I think the code may be confliciting with this code.. /*Profile Editable Karma and Post Money - By iAlex - Open Source*/ Can you try switching the order those two appear in your footer, or disabling the above code to see if it solves your problems. Thanks. I've removed the custom title (money), money code, and CrossFury, but it doesn't seem to change anything at all. ghbraingle.proboards.com/index.cgi?action=display&board=archives2&thread=783&page=1#5673Curiously, how is the "Confirm Award" page supposed to look? I don't notice anything except for the page centering. Edit: The code doesn't seem to be adding or subtracting any awards now. Thanks very much!
|
|
#00AF33
Official Code Helper
19529
0
1
Nov 19, 2012 14:18:28 GMT -8
Todge
**
17,290
January 2004
todge
|
Post by Todge on Jan 23, 2010 17:13:56 GMT -8
Can you please either allow guests to view your forum, or if you wouldn't mind, set up a test account and PM me the username and the password..
I will not post anything, I just need to see the code ij operation.. Thanks.
|
|
inherit
137322
0
Jul 30, 2010 10:36:30 GMT -8
staceybob
32
February 2009
staceybob
|
Post by staceybob on Jan 26, 2010 3:53:51 GMT -8
Trill/Todge, would you guys mind me using this code? (Modifying the images to my own of course).
Stacey xxx
|
|
#00AF33
Official Code Helper
19529
0
1
Nov 19, 2012 14:18:28 GMT -8
Todge
**
17,290
January 2004
todge
|
Post by Todge on Jan 26, 2010 10:57:45 GMT -8
It's ok by me..
|
|
inherit
*this CT deserves an achievement*
136400
0
Jun 25, 2021 18:23:00 GMT -8
Trill
hola
6,232
January 2009
ghbraingle
|
Post by Trill on Jan 26, 2010 11:34:11 GMT -8
|
|
inherit
151375
0
Apr 19, 2013 21:46:00 GMT -8
rubix
368
January 2010
j0ker
|
Post by rubix on Jan 26, 2010 21:22:09 GMT -8
Hello, i would love to use this code, i have been searching for something like this for awhile! So I'm asking if i have permission to use this code? And I am also wondering if someone could show me how to change the images. I would like them to be halo ranks and i already have them uploaded on Photobucket ( http://s983./ae319/TheGrimmReaperr/Halo%203/) Thanks if anyone can help me
|
|
#00AF33
Official Code Helper
19529
0
1
Nov 19, 2012 14:18:28 GMT -8
Todge
**
17,290
January 2004
todge
|
Post by Todge on Jan 27, 2010 9:54:50 GMT -8
Yep, you can use the code.. You need to edit this part.. // Edit Below...
var mods = /^(admin|mod1|mod2|mod3)$/; var cardcode = 'http://i802./yy303/iceblade_gh/cards/'; var awdInfo = new Array(126);
awdInfo[1] = "Merlin|The Wizard"; awdInfo[2] = "Cornelius Agrippa|The Alchemist"; awdInfo[3] = "Elfrida Clagg|Chiefteness of the Wizard's Council";
// Edit Above... The red part is a list of all the members you would like to be able to set awards.. They need to have access to change member's profiles. The blue part is the address of all your images, up to and including the last / in the address (All your images need to be saved to the same folder etc and numbered consecutively, starting with 1) The orange is the length of the of the image array.. Change the number to the amount of images you are using.. And the purple is a list of all your images, in the format NAME OF IMAGE|DESCRIPTION.. Please note that this code was made specifically for Trill, I will be adding a more general code to the [codeindex] after I have sorted out an issue with Trill's code.
|
|