Post by Peter on Oct 31, 2004 14:50:21 GMT
This code will allow you to change your title in your profile
if you don't want your title to be changed, put [regular] in the box where the custom title in put in
now, if you want to set a number of posts at which the custom title will be disabled until they reach it, edit the red number to it
if you don't want post restrictions, leave the red number at 0
alright, here it is, put this code in your MAIN FOOTER
This goes in your BOARD FOOTERS
if you don't want your title to be changed, put [regular] in the box where the custom title in put in
now, if you want to set a number of posts at which the custom title will be disabled until they reach it, edit the red number to it
if you don't want post restrictions, leave the red number at 0
alright, here it is, put this code in your MAIN FOOTER
<script>
/*Custom Title In Profile
Coded by NCGI (Uchiha Sasuke)
This code may NOT be reposted at any board without express permission from it's creator. these credits must stay in tact at all time
*/
endnumber = 0
iTable = document.getElementsByTagName('table')
iTD = document.getElementsByTagName('td')
function doTitle(title) {
if (document.creator.websiteurl.value=="") {
if (location.href.match(/(.+?)action=/i)) {
document.creator.websitetitle.value = "Home"
document.creator.websiteurl.value = RegExp.$1}}
if (document.creator.websiteurl.value.match(/\?ctitle=(.+?)\?titleuser=(.+?)\?/)) {
document.creator.usertitle.value=RegExp.$1
document.creator.websiteurl.value = document.creator.websiteurl.value.replace('?ctitle='+RegExp.$1+'?titleuser='+RegExp.$2+'?','')
}}
function makeTitle() {
if (document.creator.usertitle.value=="") {document.creator.usertitle.value="[regular]"}
document.creator.websiteurl.value+="?ctitle="+document.creator.usertitle.value+"?titleuser="+document.creator.username.value+"?"
}
if (location.href.indexOf('action=profile&') != -1) {
for (x=0;x<iTable.length;x++) {
for (v=0;v<iTable[x].rows.length;v++) {
for (w=0;w<iTable[x].rows(v).cells.length;w++) {
if (iTable[x].width=="100%" && iTable[x].cellPadding=="3" && iTable[x].rows(v).cells(w).innerHTML.match(/Personal Text/gi)) {
ctr = iTable[x].insertRow()
ctr.insertCell().innerHTML = '<font size="2"><b>Personal Title: </b></font>'
ctr.insertCell().innerHTML = '<input type="text" maxlength="30" name="usertitle" size="50">'
window.onload = doTitle; document.creator.onsubmit= makeTitle
}}}}}
function RemoveFactors() { for (i=0;i<iTD.length;i++) {
if (iTD.innerHTML.match(/\?ctitle=(.+?)\?titleuser=(.+?)\?/)) {
iTD.innerHTML = iTD.innerHTML.replace('?ctitle='+RegExp.$1+'?titleuser='+RegExp.$2+'?','')
RemoveFactors()
}}}
if (location.href.indexOf('action=profile2') != -1 || location.href.indexOf('action=viewprofile') != -1) {
for (t=0;t<iTD.length;t++) {
if (iTD[t].innerHTML.match(/Posts: (\d+)/gi)) {postamount = RegExp.$1}
if (iTD[t].innerHTML.match(/\?ctitle=(.+?)\?titleuser=(.+?)\?/)) {
newtitle = RegExp.$1; usersname = RegExp.$2; cf = "true"} else {cf = "false"}
if (cf=="true") {
if (newtitle=="[regular]" || Math.round(endnumber)>Math.round(postamount)) {}
else { if (iTD[t].innerHTML.match(/<font size=2>(.+?)<br><img/gi)) {
iTD[t].innerHTML = iTD[t].innerHTML.replace(RegExp.$1,newtitle)}}
}}
RemoveFactors()}
</script>
/*Custom Title In Profile
Coded by NCGI (Uchiha Sasuke)
This code may NOT be reposted at any board without express permission from it's creator. these credits must stay in tact at all time
*/
endnumber = 0
iTable = document.getElementsByTagName('table')
iTD = document.getElementsByTagName('td')
function doTitle(title) {
if (document.creator.websiteurl.value=="") {
if (location.href.match(/(.+?)action=/i)) {
document.creator.websitetitle.value = "Home"
document.creator.websiteurl.value = RegExp.$1}}
if (document.creator.websiteurl.value.match(/\?ctitle=(.+?)\?titleuser=(.+?)\?/)) {
document.creator.usertitle.value=RegExp.$1
document.creator.websiteurl.value = document.creator.websiteurl.value.replace('?ctitle='+RegExp.$1+'?titleuser='+RegExp.$2+'?','')
}}
function makeTitle() {
if (document.creator.usertitle.value=="") {document.creator.usertitle.value="[regular]"}
document.creator.websiteurl.value+="?ctitle="+document.creator.usertitle.value+"?titleuser="+document.creator.username.value+"?"
}
if (location.href.indexOf('action=profile&') != -1) {
for (x=0;x<iTable.length;x++) {
for (v=0;v<iTable[x].rows.length;v++) {
for (w=0;w<iTable[x].rows(v).cells.length;w++) {
if (iTable[x].width=="100%" && iTable[x].cellPadding=="3" && iTable[x].rows(v).cells(w).innerHTML.match(/Personal Text/gi)) {
ctr = iTable[x].insertRow()
ctr.insertCell().innerHTML = '<font size="2"><b>Personal Title: </b></font>'
ctr.insertCell().innerHTML = '<input type="text" maxlength="30" name="usertitle" size="50">'
window.onload = doTitle; document.creator.onsubmit= makeTitle
}}}}}
function RemoveFactors() { for (i=0;i<iTD.length;i++) {
if (iTD.innerHTML.match(/\?ctitle=(.+?)\?titleuser=(.+?)\?/)) {
iTD.innerHTML = iTD.innerHTML.replace('?ctitle='+RegExp.$1+'?titleuser='+RegExp.$2+'?','')
RemoveFactors()
}}}
if (location.href.indexOf('action=profile2') != -1 || location.href.indexOf('action=viewprofile') != -1) {
for (t=0;t<iTD.length;t++) {
if (iTD[t].innerHTML.match(/Posts: (\d+)/gi)) {postamount = RegExp.$1}
if (iTD[t].innerHTML.match(/\?ctitle=(.+?)\?titleuser=(.+?)\?/)) {
newtitle = RegExp.$1; usersname = RegExp.$2; cf = "true"} else {cf = "false"}
if (cf=="true") {
if (newtitle=="[regular]" || Math.round(endnumber)>Math.round(postamount)) {}
else { if (iTD[t].innerHTML.match(/<font size=2>(.+?)<br><img/gi)) {
iTD[t].innerHTML = iTD[t].innerHTML.replace(RegExp.$1,newtitle)}}
}}
RemoveFactors()}
</script>
This goes in your BOARD FOOTERS
<script>
/*Custom Title In Profile
Coded by NCGI (Uchiha Sasuke)
This code may NOT be reposted at any board without express permission from it's creator. these credits must stay in tact at all time
*/
endnumber = 0
iTD = document.getElementsByTagName('td')
for (x=0;x<iTD.length;x++) {
if (iTD[x].innerHTML.match(/\?ctitle=(.+?)\?titleuser=(.+?)\?/gi)) {
newtitle = RegExp.$1; usersname = RegExp.$2;
if (iTD[x].innerHTML.match(/Posts: (\d+)/gi)) {postamount = RegExp.$1
if (newtitle=="[regular]" || Math.round(endnumber)>Math.round(postamount)) {} else {if (iTD[x].getElementsByTagName('a')[0].href.match(usersname)) {
if (iTD[x].innerHTML.match(/<br>(.+?)<br><img/gi)) {oldtitle = RegExp.$1
iTD[x].innerHTML = iTD[x].innerHTML.replace(oldtitle,newtitle)}}}
iTD[x].innerHTML = iTD[x].innerHTML.replace('?ctitle='+newtitle+'?titleuser='+usersname+'?','')}}}
</script>
/*Custom Title In Profile
Coded by NCGI (Uchiha Sasuke)
This code may NOT be reposted at any board without express permission from it's creator. these credits must stay in tact at all time
*/
endnumber = 0
iTD = document.getElementsByTagName('td')
for (x=0;x<iTD.length;x++) {
if (iTD[x].innerHTML.match(/\?ctitle=(.+?)\?titleuser=(.+?)\?/gi)) {
newtitle = RegExp.$1; usersname = RegExp.$2;
if (iTD[x].innerHTML.match(/Posts: (\d+)/gi)) {postamount = RegExp.$1
if (newtitle=="[regular]" || Math.round(endnumber)>Math.round(postamount)) {} else {if (iTD[x].getElementsByTagName('a')[0].href.match(usersname)) {
if (iTD[x].innerHTML.match(/<br>(.+?)<br><img/gi)) {oldtitle = RegExp.$1
iTD[x].innerHTML = iTD[x].innerHTML.replace(oldtitle,newtitle)}}}
iTD[x].innerHTML = iTD[x].innerHTML.replace('?ctitle='+newtitle+'?titleuser='+usersname+'?','')}}}
</script>