Post by Trip on Nov 22, 2014 9:32:35 GMT -5
Hello everybody here on Coderz Help, today, I've managed to code up an entire feature for SuddenLaunch!!
Ever heard of Custom Titles, well this baby will give the Administrators FULL POWER over Custom Titles!!
Coding this was kind of tricky at certain points, but I managed to complete it. =)
NOW, I present to you all:
Custom Titles [SL Version] BETA
Code Specifications:
Code Speed: Moderate-Fast
Compatibility: IE4+ Recommended
Browser Speed Limit: No Limit
TOS Check: Permitted
UserType: Friendly
Now for the code!
Goes in Main Footer ONLY:
Goes in ALL Other (Not Main) Board Footers:
And that's all to it. =)
Only Administrators have the power to Customize Titles.
Here's how it works:[/u]
Step #1 - Edit the board portion of the code (if need be) to match the current member group names that you have.
Step #2 - Go to someone's (or your) profile and find the Custom Title box.
Step #3 - Next, enter a Custom Title, then press the 'Update' button.
Step #4 - Save their profile.
Featurettes:
Well, that's all to it!!
I really hope that you enjoy!! If you have any questions or comments, please post them or PM me. Thanks!! ^^!
Ever heard of Custom Titles, well this baby will give the Administrators FULL POWER over Custom Titles!!
Coding this was kind of tricky at certain points, but I managed to complete it. =)
NOW, I present to you all:
Custom Titles [SL Version] BETA
Code Specifications:
Code Speed: Moderate-Fast
Compatibility: IE4+ Recommended
Browser Speed Limit: No Limit
TOS Check: Permitted
UserType: Friendly
Now for the code!
Goes in Main Footer ONLY:
<script language="JavaScript">
<!--
//Custom Titles v1.0 [SuddenLaunch Version]
//Created by Trip aka Naoki
//MAIN FOOTER PORTION
//Do not post this code anywhere without my permission
var cusTitle = '<br /><b>Custom Title: </b> <input name="ct" type="text" value=""> <input name="pAdd" type="button" value="Update" onClick="UDate();this.disabled=true;">';
if(location.href.match("=profile&username=")){
if(document.creator.settings6){
var chAdmin = document.body.getElementsByTagName('input');
var kTxt = document.body.getElementsByTagName('td');
for(crest=0;crest<chAdmin.length;crest++){
for(p=0;p<kTxt.length;p++){
if(chAdmin[crest].name=="usertext"){
if(kTxt[p].width=="320" && kTxt[p].innerHTML.match(/Personal Text:/gi)){
chAdmin[crest].outerHTML+=cusTitle; chAdmin[crest].style.display='none';
kTxt[p].style.visibility = 'hidden';
}}}}}
if(!document.creator.settings6){
var chAdmin = document.body.getElementsByTagName('input');
var kTxt = document.body.getElementsByTagName('td');
for(crest=0;crest<chAdmin.length;crest++){
for(p=0;p<kTxt.length;p++){
if(chAdmin[crest].name=="usertext"){
if(kTxt[p].width=="320" && kTxt[p].innerHTML.match(/Personal Text:/gi)){
chAdmin[crest].style.display='none';
kTxt[p].style.visibility = 'hidden';
}}}}}}
function UDate(){
var chAdmin = document.body.getElementsByTagName('input');
for(z=0;z<chAdmin.length;z++){
for(crest=0;crest<chAdmin.length;crest++){
if(chAdmin[z].name=="ct"){
if(chAdmin[crest].name=="usertext"){
if(chAdmin[crest].value.match(/£(.+?)#/)){
chAdmin[crest].value = chAdmin[crest].value.replace(RegExp.$1,chAdmin[z].value);
chAdmin[z].disabled = true;
}else{
chAdmin[z].disabled = true;
chAdmin[crest].value+='£'+chAdmin[z].value+'#';
}}}}}}
if(location.href.match(/(=viewprofile&username=|=profile2)/)){
var kiken = document.body.getElementsByTagName('td');
for(x=0;x<kiken.length;x++){
for(c=0;c<kiken.length;c=c+2){
if(kiken[x].className=="windowbg" && kiken[x].innerHTML.match(/£(.+?)#/)){
keyken = RegExp.$1;
if(kiken[c].innerHTML.match(/B>Posts:(\s)/gi)){
kiken[x].innerHTML = kiken[x].innerHTML.replace(/£(.+?)#/,"");
kiken[c].innerHTML+="<center><br /><br /><table class=catbg width='82%'><td class=windowbg><font size=2><b>Custom Title:</b> <em><b>"+keyken+"</b></em></font></td></table></center>";
}}}}}
//-->
</script>
Goes in ALL Other (Not Main) Board Footers:
<script>
//Custom Titles [SuddenLaunch Version]
//Created by Trip aka Naoki
//BOARD FOOTER (Not MAIN FOOTER) Portion
//Do not post this code anywhere without my permission
/*CHANGE NAMES BELOW TO FIT YOUR GROUP SETTINGS*/
var virtue = new Array(8);
virtue[0] = "Administrator";
virtue[1] = "Global Moderator";
virtue[2] = "Moderator";
virtue[3] = "Newbie";
virtue[4] = "Junior Member";
virtue[5] = "Full Member";
virtue[6] = "Senior Member";
virtue[7] = "God";
/*NO EDITING BELOW*/
var kiken = document.body.getElementsByTagName('td');
for(x=0;x<kiken.length;x++){
for(t=0;t<virtue.length;t++){
if(kiken[x].width=="20%" && kiken[x].innerHTML.match(/£(.+?)#/) && kiken[x].innerHTML.match(virtue[t])){
kiken[x].innerHTML = kiken[x].innerHTML.replace(/£(.+?)#/,"");
kiken[x].innerHTML = kiken[x].innerHTML.replace(virtue[t],RegExp.$1);
}}}
</script>
And that's all to it. =)
Only Administrators have the power to Customize Titles.
Here's how it works:[/u]
Step #1 - Edit the board portion of the code (if need be) to match the current member group names that you have.
Step #2 - Go to someone's (or your) profile and find the Custom Title box.
Step #3 - Next, enter a Custom Title, then press the 'Update' button.
Step #4 - Save their profile.
Featurettes:
[*]Can See Custom Title in Posts
[*]Can See Custom Title on View Profile Page
Well, that's all to it!!
I really hope that you enjoy!! If you have any questions or comments, please post them or PM me. Thanks!! ^^!