inherit
147672
0
Oct 20, 2023 5:21:22 GMT -8
Jen Parsons
612
September 2009
jennnnnn
|
Post by Jen Parsons on Mar 1, 2010 17:41:42 GMT -8
If you use the more current code all awards will still be there.. All you'd need to do is add the editing.. Thanks!
|
|
inherit
151748
0
Jun 27, 2010 20:34:00 GMT -8
Shadow Wolf
44
February 2010
tutela
|
Post by Shadow Wolf on Mar 1, 2010 21:50:29 GMT -8
For some reason I cannot get my site to read the images on my photobucket. Here's the code: <script type="text/javascript"> <!-- // Delete password field in Firefox if(document.modifyForm && document.modifyForm.password) { window.onload = function(){ document.modifyForm.password.value = '';} } // --> </script> <!-- 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" style="width: 480px; height: 270px; overflow : auto;"></div> </div> <script type="text/javascript"> <!-- /* Awards system by Todge Copyright © 2009 Please keep this header intact */ // Edit Below... var mods = /^(admin|tutela)$/; var cardcode = 'http://i791./yy195/Shadow_Wolf1987/Awards%20for%20Pandemonium/##.gif'; //URL your awards with the number replaced with '##'. var awdInfo = new Array(3);var aLength = awdInfo.length; //How many awards do you have? awdInfo[1] = "Fallen Angel|Awarded to one who has posted more than 150 posts total"; awdInfo[2] = "Demon|Awarded to one who has posted more than 300 posts total"; awdInfo[3] = "Demon Lieutenant|Awarded to one who has posted more than 625 posts total"; // Edit Above... if(awdInfo[aLength] == undefined) { awdInfo.length++; } 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].replace(/_/g,' ')+"'s Awards"; document.getElementById('theAwards').innerHTML = '<img src="'+cardcode.replace('##',parseInt('0x'+theAwards[1]))+'" width="50px">'; for(t=2; t<theAwards.length; t++) { document.getElementById('theAwards').innerHTML += '<img src="'+cardcode.replace('##',parseInt('0x'+theAwards[t]))+'" 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 { if(miniPro[m].getElementsByTagName('a')[2].firstChild.nodeName != '#text') { var peep = miniPro[m].getElementsByTagName('a')[2].firstChild.innerHTML; } else { var peep = miniPro[m].getElementsByTagName('a')[2].innerHTML; } peep = peep.replace(/ /g,'_'); 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 .colSpan == '2' && awardsCell.innerHTML.match(/Recent Activity/)) { awardsCell = awardsCell.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%"><tbody><tr><td align="center" valign="top" width="66%" style="border-right: 1px solid black;">'; for(a=1; a<awdInfo.length; a++) { if(a<16){var awd = new RegExp('0'+a.toString(16));} else {var awd = new RegExp(a.toString(16));} var id = 'award'+awd; id = id.replace(/\//g,''); awardContent += '<img ';
if(awdsofar.search(awd) == -1 && pb_username.match(mods)){awardContent += 'class="nope" ';} else if(awdsofar.search(awd) == -1 && !pb_username.match(mods)){awardContent += 'style="display: none;" ';}
awardContent += 'src="'+cardcode.replace('##',a)+'" border="0" alt="'+awdInfo+'" id="'+id+'" width="9%">'; } awardContent += '<td/><td width="34%" valign="top" align="center"><br>'; awardContent += '<br><div id="awardInfo"></div></td></tr></tbody></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].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.innerHTML.match(/The information you fill out on this page/) && inst.size == '2') { inst.parentNode.align = 'center'; inst.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.replace('##',parseInt('0x'+award))+'"><br><b>'+awdInfo[parseInt('0x'+award)].replace('|','<\/b><br>'); } else if(awdsofar.match(/\[AWD\]/)) { 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.replace('##',parseInt('0x'+award))+'"><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.replace('##',parseInt('0x'+award))+'"><br><b>'+awdInfo[parseInt('0x'+award)].replace('|','<\/b><br>'); }} // --> </script>
|
|
inherit
126307
0
Dec 5, 2015 7:43:40 GMT -8
RobiWanKen0bi
Mean, green, smackdown machine!
92
June 2008
robiwan
|
Post by RobiWanKen0bi on Mar 2, 2010 5:45:49 GMT -8
You won't be able to see them because we can't give them I'm using Firefox as well. dynastygal is right. It doesn't make any sense. I'm using Firefox too, but I doubt it has anything to do with the browser. Seems the code doesn't like us. First of all how should it look like in the "Modify profile" page, since nobody provided preview so far. I mean where should it be located? In the "Admin Functions" part? Because I've been through it dozens of times and it only has it's original functions (member group, custom title, warning level etc.)
|
|
#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 Mar 2, 2010 10:23:14 GMT -8
When you click on an image and it takes you to the modify profile page, does the URL have 'award=##' at the end?
dynastygal, what version of FF are you using? thrill had a similar problem which was resolved after updating to the latest.
|
|
#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 Mar 2, 2010 10:33:48 GMT -8
Shadow Wolf, for 1, you have told the code you have 3 awards, but there only appears to be 1 on photobucket.. Also, for the URL you have this.. http://i791./yy195/Shadow_Wolf1987/Awards%20for%20Pandemonium/1.gif %20 is actually a space, and while it shouldn't make any difference, the 'true' URL should be.. http://i791./yy195/Shadow_Wolf1987/Awards for Pandemonium/1.gif Though, to be honest, you should try not to include spaces in URLs, instead use the underscore _ character instead.
|
|
dynastygal
inherit
-3924158
0
Jun 1, 2024 22:08:14 GMT -8
dynastygal
0
January 1970
GUEST
|
Post by dynastygal on Mar 2, 2010 11:20:10 GMT -8
The url has award=## at the end, yes (with the number being the number of the award). I'm on version 3.0.18 Edit: updating to 3.6 made it work Woo.
|
|
inherit
126307
0
Dec 5, 2015 7:43:40 GMT -8
RobiWanKen0bi
Mean, green, smackdown machine!
92
June 2008
robiwan
|
Post by RobiWanKen0bi on Mar 2, 2010 13:33:05 GMT -8
My version of Firefox was 3.58. Updated to 3.6, so let me try. Here goes nothin'.... EDIT: Yaaay! It... didn't work. Well I'm out of ideas.
|
|
dynastygal
inherit
-3924333
0
Jun 1, 2024 22:08:14 GMT -8
dynastygal
0
January 1970
GUEST
|
Post by dynastygal on Mar 2, 2010 13:38:35 GMT -8
|
|
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 Mar 2, 2010 13:48:08 GMT -8
Try switching the order of the money and awards code, Dynasty. The awards code may not be compatible with other codes that modify the Custom Title text.
Is it in your main or global footer? If it's in the global, the [AWD]... shouldn't be showing.
|
|
dynastygal
inherit
-3924351
0
Jun 1, 2024 22:08:14 GMT -8
dynastygal
0
January 1970
GUEST
|
Post by dynastygal on Mar 2, 2010 13:51:52 GMT -8
My money code is above the awards code. Both in Global Footer.
|
|
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 Mar 2, 2010 13:53:48 GMT -8
Did switching them work? I had to do that for it to work on my forum.
|
|
inherit
126307
0
Dec 5, 2015 7:43:40 GMT -8
RobiWanKen0bi
Mean, green, smackdown machine!
92
June 2008
robiwan
|
Post by RobiWanKen0bi on Mar 2, 2010 13:58:21 GMT -8
It doesn't work for me, not in IE, nor in the newest version of FF, so I'm open for suggestions. Man, I haven't had this much trouble with a code... ever!
|
|
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 Mar 2, 2010 14:03:55 GMT -8
I'm sure Todge had a lot more trouble perfecting it for everyone. Robi, board URL?
|
|
dynastygal
inherit
-3924366
0
Jun 1, 2024 22:08:14 GMT -8
dynastygal
0
January 1970
GUEST
|
Post by dynastygal on Mar 2, 2010 14:05:50 GMT -8
Did switching them work? I had to do that for it to work on my forum. Now it makes people earn more moolah XD But I don't mind that as it can just be an extra for receiving your first award. But the thing in new posts is still there.
|
|
inherit
126307
0
Dec 5, 2015 7:43:40 GMT -8
RobiWanKen0bi
Mean, green, smackdown machine!
92
June 2008
robiwan
|
Post by RobiWanKen0bi on Mar 2, 2010 14:24:35 GMT -8
Trill: Credit do. Todge did put a lot of effort into this code and the 12 pages of this topic so far are the proof of it. My new test board: ben10cn.proboards.com/index.cgi (where the code apparently isn't working)
|
|