Post by Peter on Oct 31, 2004 14:17:28 GMT
Created by Uchiha Sasuke
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
alright, here it is, put this code in your MAIN FOOTER
this goes in your BOARD FOOTERS
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
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
*/
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[i].innerHTML.match(/\?ctitle=(.+?)\?titleuser=(.+?)\?/)) {
iTD[i].innerHTML = iTD[i].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]") {}
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
*/
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 (newtitle=="[regular]") {} 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>