Post by Ross on Sept 26, 2005 17:39:41 GMT
Global Footer
Complete karma rewrite with the ability to change the number of points you get each time someone gives/takes karma and the time someone must wait before they can use karma again. Plus you can change the actual karma words
<script type="text/javascript">
<!--
/* karma mod
by ross */
// Number of Hours Before You Can Use Karma Again. Must be greater than 1!
var timeToWait = 24;
// Number of points for each karma a member has
var amountToAdd = 100;
// Replacement Words
var iKarma = 'Reputation:'
var iExhalt = 'Bless';
var iSmite = 'Curse';
function karmaWait()
{
var date = new Date();
date.setTime(date.getTime() + (timeToWait * 3600 * 1000));
document.cookie = 'karma=1; expires='+ date +';';
}
var td = document.getElementsByTagName('td');
for(i=0; i<td.length; i++)
{
if(td.width == '20%' && td.innerHTML.match(/Karma:/i))
{
var a = td.getElementsByTagName('a');
if(a[a.length-1].href.match(/&type=/))
{
a[a.length-1].innerHTML = '<span onclick="karmaWait()">'+iSmite+'</span>';
a[a.length-2].innerHTML = '<span onclick="karmaWait()">'+iExhalt+'</span>';
}
if(td.parentNode.innerHTML.match(/Karma: (.+?)</i))
{
karma = RegExp.$1;
ext = (karma.match(/-/))? '-' : '';
nK = amountToAdd * parseInt(karma.replace(/,/g,'').replace(/-/g,''));
td.innerHTML = td.innerHTML.replace('Karma: '+karma, iKarma+' '+ext+nK);
if(location.href.match(/ion=viewprofile/))
{
for(j=0; j<td.length; j++)
if(td[j].innerHTML.match(/Karma:/) && td[j].width == '25%')
{
td[j].firstChild.innerHTML = iKarma;
td[j+1].firstChild.innerHTML = ext+nK;
}
}
}
if(document.cookie.match(/karma=1/))
{
td.innerHTML = td.innerHTML.replace(/\[ <(.+)> \| <(.+)> \]/i,'')
}
}
}
//-->
</script>
Complete karma rewrite with the ability to change the number of points you get each time someone gives/takes karma and the time someone must wait before they can use karma again. Plus you can change the actual karma words
<script type="text/javascript">
<!--
/* karma mod
by ross */
// Number of Hours Before You Can Use Karma Again. Must be greater than 1!
var timeToWait = 24;
// Number of points for each karma a member has
var amountToAdd = 100;
// Replacement Words
var iKarma = 'Reputation:'
var iExhalt = 'Bless';
var iSmite = 'Curse';
function karmaWait()
{
var date = new Date();
date.setTime(date.getTime() + (timeToWait * 3600 * 1000));
document.cookie = 'karma=1; expires='+ date +';';
}
var td = document.getElementsByTagName('td');
for(i=0; i<td.length; i++)
{
if(td.width == '20%' && td.innerHTML.match(/Karma:/i))
{
var a = td.getElementsByTagName('a');
if(a[a.length-1].href.match(/&type=/))
{
a[a.length-1].innerHTML = '<span onclick="karmaWait()">'+iSmite+'</span>';
a[a.length-2].innerHTML = '<span onclick="karmaWait()">'+iExhalt+'</span>';
}
if(td.parentNode.innerHTML.match(/Karma: (.+?)</i))
{
karma = RegExp.$1;
ext = (karma.match(/-/))? '-' : '';
nK = amountToAdd * parseInt(karma.replace(/,/g,'').replace(/-/g,''));
td.innerHTML = td.innerHTML.replace('Karma: '+karma, iKarma+' '+ext+nK);
if(location.href.match(/ion=viewprofile/))
{
for(j=0; j<td.length; j++)
if(td[j].innerHTML.match(/Karma:/) && td[j].width == '25%')
{
td[j].firstChild.innerHTML = iKarma;
td[j+1].firstChild.innerHTML = ext+nK;
}
}
}
if(document.cookie.match(/karma=1/))
{
td.innerHTML = td.innerHTML.replace(/\[ <(.+)> \| <(.+)> \]/i,'')
}
}
}
//-->
</script>